Skip to content

Commit

Permalink
Closets Mk3 (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
RimiNosha authored Dec 23, 2023
1 parent 8887c22 commit 1e12202
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
/// Vertical squish of the door
var/door_anim_squish = 0.12
/// The maximum angle the door will be drawn at
var/door_anim_angle = 136
var/door_anim_angle = 180
/// X position of the closet door hinge
var/door_hinge_x = -6.5
var/door_hinge_x = -5.5
/// Amount of time it takes for the door animation to play
var/door_anim_time = 1.5 // set to 0 to make the door not animate at all
/// Used for things like the freezer where it's too wide for the door to fit properly on 32x32 sprites.
var/door_open_x_offset = 0

/// Controls whether a door overlay should be applied using the icon_door value as the icon state
var/enable_door_overlay = TRUE
Expand Down Expand Up @@ -122,6 +124,7 @@
if(enable_door_overlay && !is_animating_door)
if(opened && has_opened_overlay)
var/mutable_appearance/door_overlay = mutable_appearance(icon, "[icon_state]_open", alpha = src.alpha)
door_overlay.pixel_x = door_open_x_offset
. += door_overlay
door_overlay.overlays += emissive_blocker(door_overlay.icon, door_overlay.icon_state, alpha = door_overlay.alpha) // If we don't do this the door doesn't block emissives and it looks weird.
else if(has_closed_overlay)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
icon_state = "freezer"
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
door_anim_squish = 0.22
door_anim_angle = 123
door_anim_time = 4
door_hinge_x = -7
door_open_x_offset = -5
/// If FALSE, we will protect the first person in the freezer from an explosion / nuclear blast.
var/jones = FALSE
open_sound = 'sound/effects/fridge_open.ogg'
Expand Down
Binary file modified icons/obj/storage/closet.dmi
Binary file not shown.

0 comments on commit 1e12202

Please sign in to comment.