Skip to content

Commit

Permalink
finally
Browse files Browse the repository at this point in the history
  • Loading branch information
alsoandanswer committed Jan 26, 2025
1 parent b146ef3 commit c481db0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 33 deletions.
56 changes: 23 additions & 33 deletions code/game/machinery/cryo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

/obj/machinery/atmospherics/unary/cryo_cell/Initialize()
. = ..()
icon = 'icons/obj/cryogenics_split.dmi'
update_icon()
atmos_init()

Expand Down Expand Up @@ -259,8 +258,9 @@
if(put_mob(L))
user.visible_message(SPAN_NOTICE("[user] puts [L] into [src]."),
SPAN_NOTICE("You put [L] into [src]."), range = 3)

qdel(attacking_item)
sleep(2.5 SECONDS)
update_icon()

else if(default_deconstruction_screwdriver(user, attacking_item))
return TRUE
Expand Down Expand Up @@ -309,41 +309,27 @@

if(user.pulling == L)
user.pulling = null
sleep(2.5 SECONDS)
update_icon()


/obj/machinery/atmospherics/unary/cryo_cell/update_icon()
/obj/machinery/atmospherics/unary/cryo_cell/update_icon(var/only_pickle = FALSE)
ClearOverlays()
icon_state = "pod[on]"

var/image/I

if(panel_open)
AddOverlays("pod_panel")

I = image(icon, "pod[on]_top")
I.pixel_z = 32
AddOverlays(I)

if(occupant)
var/image/pickle = image(occupant.icon, occupant.icon_state)
pickle.overlays = occupant.overlays
pickle.pixel_z = 11
AddOverlays(pickle)
I = image(icon, "pod_liquid0")
AddOverlays(I)
I = image(icon, "pod_liquid1")
I.pixel_z = 32
AddOverlays(I)
I = image(icon, "pod_glass0")
AddOverlays(I)
I = image(icon, "pod_glass1")
I.pixel_z = 32
AddOverlays(I)
I = image(icon, "pod[on]_over")
AddOverlays(I)
I = image(icon, "pod[on]_top_over")
I.pixel_z = 32
I = image(icon, "pod_over")
AddOverlays(I)

if(panel_open)
AddOverlays("pod_panel")

if(powered())
var/warn_state = "off"
if(on)
Expand All @@ -354,12 +340,12 @@
warn_state = "warn"
I = overlay_image(icon, "lights_[warn_state]")
AddOverlays(I)
I = overlay_image(icon, "lights_[warn_state]_top")
I.pixel_z = 32
AddOverlays(I)
AddOverlays(emissive_appearance(icon, "lights_mask"))
I = emissive_appearance(icon, "lights_mask_top")
I.pixel_z = 32

if(occupant && !only_pickle)
I = image(icon, "pod_liquid")
AddOverlays(I)
I = image(icon, "pod_glass")
AddOverlays(I)

/obj/machinery/atmospherics/unary/cryo_cell/proc/process_occupant()
Expand Down Expand Up @@ -406,6 +392,7 @@
occupant = null
current_heat_capacity = initial(current_heat_capacity)
update_use_power(POWER_USE_IDLE)
flick_overlay_view(mutable_appearance(icon, "pod_opening"), 2.5 SECONDS)
update_icon()

/obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/human/M as mob)
Expand All @@ -421,9 +408,9 @@
if (M.abiotic())
to_chat(usr, SPAN_WARNING("Subject may not have abiotic items on."))
return
// if(!node)
// to_chat(usr, SPAN_WARNING("The cell is not correctly connected to its pipe network!"))
// return
if(!node)
to_chat(usr, SPAN_WARNING("The cell is not correctly connected to its pipe network!"))
return
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
Expand All @@ -437,7 +424,8 @@
update_use_power(POWER_USE_ACTIVE)
// M.metabslow = 1
add_fingerprint(usr)
update_icon()
update_icon(TRUE)
flick_overlay_view(mutable_appearance(icon, "pod_closing"), 2.5 SECONDS)
return 1

/obj/machinery/atmospherics/unary/cryo_cell/verb/move_eject()
Expand Down Expand Up @@ -473,6 +461,8 @@
SPAN_NOTICE("You climb into [src]."), range = 3)

put_mob(usr)
sleep(2.5 SECONDS)
update_icon()
return

/atom/proc/return_air_for_internal_lifeform(var/mob/living/lifeform)
Expand Down
Binary file modified icons/obj/cryogenics.dmi
Binary file not shown.

0 comments on commit c481db0

Please sign in to comment.