diff --git a/code/_helpers/matrices.dm b/code/_helpers/matrices.dm
index 9cb12bf7c2c..f0adc7b2e23 100644
--- a/code/_helpers/matrices.dm
+++ b/code/_helpers/matrices.dm
@@ -25,6 +25,13 @@
//doesn't have an object argument because this is "Stacking" with the animate call above
//3 billion% intentional
+/atom/proc/shake_animation(var/intensity = 8)
+ var/init_px = pixel_x
+ var/shake_dir = pick(-1, 1)
+ animate(src, transform=turn(matrix(), intensity*shake_dir), pixel_x=init_px + 2*shake_dir, time=1)
+ animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING)
+ return intensity
+
// Color matrices:
//Luma coefficients suggested for HDTVs. If you change these, make sure they add up to 1.
@@ -114,4 +121,4 @@
#undef LUMR
#undef LUMG
-#undef LUMB
\ No newline at end of file
+#undef LUMB
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 4113640eec0..f29b40aaa8e 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -49,10 +49,10 @@
else
return null
-//Will return the contents of an atom recursivly to a depth of 'searchDepth'
-/atom/proc/GetAllContents(searchDepth = 5)
+//Will return the contents of an atom recursively to a depth of 'searchDepth'
+/atom/proc/GetAllContents(searchDepth = 5, checkClient = 1, checkSight = 1, includeMobs = 1, includeObjects = 1)
var/list/L = list()
- recursive_content_check(src, L, recursion_limit = searchDepth)
+ recursive_content_check(src, L, searchDepth, checkClient, checkSight, includeMobs, includeObjects)
return L
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 49ff1a159d6..7d946cacd36 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -105,7 +105,7 @@ for reference:
if("brute")
src.health -= W.force * 0.75
else
- animate_shake()
+ shake_animation()
playsound(src.loc, material.hitsound, W.get_clamped_volume(), 1)
if (src.health <= 0)
visible_message("The barricade is smashed apart!")
diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm
index 42e0751c555..9c84ce8ef56 100644
--- a/code/game/objects/effects/chem/foam.dm
+++ b/code/game/objects/effects/chem/foam.dm
@@ -172,7 +172,7 @@
qdel(src)
else
to_chat(user, SPAN_NOTICE("You hit the metal foam but bounce off it."))
- animate_shake()
+ shake_animation()
/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
@@ -193,7 +193,7 @@
if(S.get_amount() < 4)
to_chat(user, SPAN_NOTICE("There isn't enough material here to construct a wall."))
return
-
+
var/material/M = SSmaterials.get_material_by_name(S.default_type)
if(!istype(M))
return
@@ -230,7 +230,7 @@
qdel(src)
else
to_chat(user, SPAN_NOTICE("You hit the metal foam to no effect."))
- animate_shake()
+ shake_animation()
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
if(air_group)
diff --git a/code/game/objects/items/airbubble.dm b/code/game/objects/items/airbubble.dm
index b4d6ba42861..ed8133c953a 100644
--- a/code/game/objects/items/airbubble.dm
+++ b/code/game/objects/items/airbubble.dm
@@ -248,7 +248,7 @@
if ((world.time - last_shake) > 5 SECONDS)
playsound(loc, "sound/items/[pick("rip1","rip2")].ogg", 100, 1)
- animate_shake()
+ shake_animation()
last_shake = world.time
if (!req_breakout())
@@ -274,11 +274,11 @@
return
breakout = FALSE
- to_chat(escapee, "You successfully break out! Tearing the bubble's walls!")
+ to_chat(escapee, "You successfully break out! Tearing the bubble's walls!") // holy shit this is hilarious
visible_message("\the [escapee] successfully broke out of \the [src]! Tearing the bubble's walls!")
playsound(loc, "sound/items/[pick("rip1","rip2")].ogg", 100, 1)
break_open()
- animate_shake()
+ shake_animation()
desc += " It has hole in it! Maybe you shouldn't use it!"
// We are out finally, the bubble is ripped. So dump everything out from it. Especially air and user.
diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm
index 4606c4c6390..85c82f9e2fb 100644
--- a/code/game/objects/items/weapons/policetape.dm
+++ b/code/game/objects/items/weapons/policetape.dm
@@ -202,7 +202,7 @@ var/list/tape_roll_applications = list()
if(user.a_intent == I_HELP)
lifted = !lifted
user.visible_message("[user] [lifted ? "lifts" : "drops"] the [initial(name)], [lifted ? "allowing" : "blocking"] passage.", SPAN_NOTICE("You [lifted ? "lift" : "drop"] the [initial(name)], [lifted ? "allowing" : "blocking"] passage."))
- var/shake_time = animate_shake()
+ var/shake_time = shake_animation()
sleep(shake_time)
if(!allowed(user))
crumple(user)
@@ -239,4 +239,4 @@ var/list/tape_roll_applications = list()
qdel(P)
cur = get_step(cur,dir[i])
- qdel(src)
\ No newline at end of file
+ qdel(src)
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index 98f825ae87a..1da149596e7 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -75,7 +75,7 @@
L.visible_message("[L] tears open the [src], spilling its contents everywhere!", "You tear open the [src], spilling its contents everywhere!")
spill()
else
- animate_shake()
+ shake_animation()
var/toplay = pick(list('sound/effects/creatures/nibble1.ogg','sound/effects/creatures/nibble2.ogg'))
playsound(loc, toplay, 30, 1)
damage(damage)
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index 45c3c42c0ea..7b1b5c8ef0a 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -248,7 +248,7 @@ Frequency:
else
target_closet.visible_message(SPAN_WARNING("\The [target_closet] rattles."))
to_chat(user, SPAN_NOTICE("You teleport into the target closet, bumping into the closed door."))
- target_closet.animate_shake()
+ target_closet.shake_animation()
playsound(get_turf(src), 'sound/effects/grillehit.ogg', 100, TRUE)
/obj/item/closet_teleporter/Destroy()
diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm
index 61eed45d2f2..2fda26da7d5 100644
--- a/code/game/objects/items/weapons/traps.dm
+++ b/code/game/objects/items/weapons/traps.dm
@@ -146,7 +146,7 @@
anchored = FALSE
deployed = FALSE
update_icon()
- animate_shake()
+ shake_animation()
..()
@@ -236,7 +236,7 @@
buckle_mob(L)
playsound(src, 'sound/weapons/beartrap_shut.ogg', 100, 1)
deployed = FALSE
- src.animate_shake()
+ src.shake_animation()
update_icon()
/obj/item/trap/animal/proc/req_breakout()
@@ -252,7 +252,7 @@
if ((world.time - last_shake) > 5 SECONDS)
playsound(loc, "sound/effects/grillehit.ogg", 100, 1)
- animate_shake()
+ shake_animation()
last_shake = world.time
return TRUE
@@ -372,7 +372,7 @@
unbuckle_mob()
captured = null
visible_message(msg)
- animate_shake()
+ shake_animation()
update_icon()
release_time = world.time
@@ -661,4 +661,3 @@
return
else
..()
-
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index bd1fd47444f..9b7a8d06825 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -218,13 +218,6 @@
/obj/proc/Created()
return
-/obj/proc/animate_shake()
- var/init_px = pixel_x
- var/shake_dir = pick(-1, 1)
- animate(src, transform = turn(matrix(), 8*shake_dir), pixel_x = init_px + 2*shake_dir, time = 1)
- animate(transform = null, pixel_x = init_px, time = 6, easing = ELASTIC_EASING)
- return 7 // how long it takes to do this
-
/obj/proc/rotate(var/mob/user, var/anchored_ignore = FALSE)
if(use_check_and_message(user))
return
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index b5f58fb1913..25c8d142cf8 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -376,7 +376,7 @@
return
step_towards(O, loc)
if(user != O)
- user.show_viewers("[user] stuffs [O] into [src]!")
+ user.visible_message(SPAN_DANGER("[user] stuffs \the [O] into \the [src]!"), SPAN_NOTICE("You stuff \the [O] into \the [src]."), range = 3)
add_fingerprint(user)
return
@@ -469,7 +469,7 @@
breakout = 1
for(var/i in 1 to time) //minutes * 6 * 5seconds * 2
playsound(loc, 'sound/effects/grillehit.ogg', 100, 1)
- animate_shake()
+ shake_animation()
if (bar)
bar.update(i)
@@ -496,7 +496,7 @@
visible_message("\the [escapee] successfully broke out of \the [src]!")
playsound(loc, 'sound/effects/grillehit.ogg', 100, 1)
break_open()
- animate_shake()
+ shake_animation()
qdel(bar)
/obj/structure/closet/proc/break_open()
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 0e8c95065ce..d1073256785 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -18,7 +18,9 @@
dir = EAST
density = TRUE
anchored = TRUE
+ var/locked = FALSE
var/obj/structure/m_tray/connected = null
+ var/tray = /obj/structure/m_tray
/obj/structure/morgue/Destroy()
if(connected)
@@ -29,10 +31,21 @@
if(connected)
icon_state = "morgue0"
else
- if(contents.len)
- icon_state = "morgue2"
- else
- icon_state = "morgue1"
+ icon_state = "morgue1"
+ var/list/searching = GetAllContents(searchDepth = 3, checkClient = 0) // Search inside bodybags as well.
+ for(var/mob/living/M in searching)
+ if(iscarbon(M))
+ var/mob/living/carbon/C = M
+ if(C.status_flags & FAKEDEATH)
+ icon_state = "morgue2"
+ switch(C.stat)
+ if(DEAD)
+ icon_state = "morgue2"
+ if(UNCONSCIOUS)
+ icon_state = "morgue3"
+ if(CONSCIOUS)
+ icon_state = "morgue4"
+ break
return
/obj/structure/morgue/ex_act(severity)
@@ -60,7 +73,7 @@
return
/obj/structure/morgue/attack_hand(mob/user)
- if(connected)
+ if(connected && !locked)
for(var/atom/movable/A in connected.loc)
if(!A.anchored)
A.forceMove(src)
@@ -68,29 +81,7 @@
playsound(src, 'sound/effects/roll.ogg', 5, 1)
QDEL_NULL(connected)
else
- var/turf/S = get_step(src, src.dir)
- if(!S)
- return
- else
- if(S.contains_dense_objects())
- to_chat(user, SPAN_WARNING("There's something in the way of \the [src]!"))
- return
- playsound(src, 'sound/effects/roll.ogg', 5, 1)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- connected = new /obj/structure/m_tray(src.loc)
- step(src.connected, src.dir)
- connected.layer = OBJ_LAYER - 0.1
- var/turf/T = get_step(src, src.dir)
- if(T.contents.Find(connected))
- connected.connected = src
- icon_state = "morgue0"
- for(var/atom/movable/A in src)
- A.forceMove(connected.loc)
- connected.icon_state = "morguet"
- connected.set_dir(src.dir)
- else
- QDEL_NULL(connected)
- add_fingerprint(user)
+ relaymove(user)
update_icon()
return
@@ -101,21 +92,21 @@
/obj/structure/morgue/attackby(obj/P, mob/user)
if(P.ispen())
- var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
+ var/t = input(user, "What would you like the label to be?", name) as text
if(user.get_active_hand() != P)
return
- if((!in_range(src, usr) && src.loc != user))
+ if((!in_range(src, usr) > 1 && src.loc != user))
return
t = sanitizeSafe(t, MAX_NAME_LEN)
if(t)
- name = "Morgue- '[t]'"
+ name = "[initial(name)] - '[t]'"
else
- name = "Morgue"
+ name = initial(name)
add_fingerprint(user)
return
/obj/structure/morgue/relaymove(mob/user)
- if(user.stat)
+ if(user.stat || locked)
return
var/turf/S = get_step(src, src.dir)
if(!S)
@@ -124,21 +115,21 @@
if(S.contains_dense_objects())
to_chat(user, SPAN_WARNING("There's something in the way of \the [src]!"))
return
- connected = new /obj/structure/m_tray(src.loc)
- step(connected, EAST)
+ playsound(src, 'sound/effects/roll.ogg', 5, 1)
+ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ connected = new tray(src.loc)
+ step(connected, src.dir)
connected.layer = OBJ_LAYER - 0.1
- var/turf/T = get_step(src, EAST)
+ var/turf/T = get_step(src, src.dir)
if(T.contents.Find(src.connected))
connected.connected = src
- icon_state = "morgue0"
for(var/atom/movable/A in src)
A.forceMove(connected.loc)
- connected.icon_state = "morguet"
else
QDEL_NULL(connected)
+ update_icon()
return
-
/*
* Morgue tray
*/
@@ -148,10 +139,10 @@
icon = 'icons/obj/stationobjs.dmi'
icon_state = "morguet"
density = TRUE
- layer = 2.0
- var/obj/structure/morgue/connected = null
anchored = TRUE
throwpass = TRUE
+ layer = TURF_LAYER
+ var/obj/structure/morgue/connected = null
/obj/structure/m_tray/Destroy()
if(connected?.connected == src)
@@ -180,42 +171,44 @@
return
O.forceMove(src.loc)
if(user != O)
- user.visible_message("[user] stuffs \the [O] into \the [src]!", SPAN_NOTICE("You stuff \the [O] into \the [src]."), range = 3)
-
+ user.visible_message(SPAN_DANGER("[user] stuffs \the [O] into \the [src]!"), SPAN_NOTICE("You stuff \the [O] into \the [src]."), range = 3)
+ add_fingerprint(user)
+ return
/*
* Crematorium
*/
-/obj/structure/crematorium
+/obj/structure/morgue/crematorium
name = "crematorium"
desc = "A human incinerator. Works well on barbeque nights."
- icon = 'icons/obj/stationobjs.dmi'
icon_state = "crema1"
- density = TRUE
- anchored = TRUE
- var/obj/structure/c_tray/connected = null
+ dir = SOUTH
+ tray = /obj/structure/m_tray/c_tray
var/cremating = FALSE
- var/locked = FALSE
var/id = 1
var/_wifi_id
var/datum/wifi/receiver/button/crematorium/wifi_receiver
-/obj/structure/crematorium/Initialize()
+/obj/structure/morgue/crematorium/Initialize()
. = ..()
if(_wifi_id)
wifi_receiver = new(_wifi_id, src)
-/obj/structure/crematorium/Destroy()
- if(connected)
- QDEL_NULL(connected)
+/obj/structure/morgue/crematorium/Destroy()
+ ..()
if(wifi_receiver)
QDEL_NULL(wifi_receiver)
return ..()
-/obj/structure/crematorium/update_icon()
+/obj/structure/morgue/crematorium/update_icon()
+ set_light(0)
if(cremating)
icon_state = "crema_active"
+ set_light(3, 1, LIGHT_COLOR_FIRE)
return
+ for(var/obj/machinery/button/switch/crematorium/C in range(3, src))
+ C.active = FALSE
+ C.update_icon()
if(connected)
icon_state = "crema0"
else
@@ -224,214 +217,152 @@
else
icon_state = "crema1"
-/obj/structure/crematorium/ex_act(severity)
- switch(severity)
- if(1.0)
- for(var/atom/movable/A in src)
- A.forceMove(src.loc)
- ex_act(severity)
- qdel(src)
- return
- if(2.0)
- if(prob(50))
- for(var/atom/movable/A in src)
- A.forceMove(src.loc)
- ex_act(severity)
- qdel(src)
- return
- if(3.0)
- if(prob(5))
- for(var/atom/movable/A in src)
- A.forceMove(src.loc)
- ex_act(severity)
- qdel(src)
- return
- return
-
-/obj/structure/crematorium/attack_hand(mob/user as mob)
+/obj/structure/morgue/crematorium/attack_hand(mob/user as mob)
if(cremating)
to_chat(user, SPAN_WARNING("It's locked."))
return
- if(connected && !locked)
- for(var/atom/movable/A in connected.loc)
- if(!A.anchored )
- A.forceMove(src)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- qdel(connected)
- else if(!locked)
- var/turf/S = get_step(src, src.dir)
- if(!S)
- return
- else
- if(S.contains_dense_objects())
- to_chat(user, SPAN_WARNING("There's something in the way of \the [src]!"))
- return
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
- connected = new /obj/structure/c_tray(src.loc)
- step(connected, src.dir)
- connected.layer = OBJ_LAYER - 0.1
- var/turf/T = get_step(src, src.dir)
- if(T.contents.Find(connected))
- connected.connected = src
- src.icon_state = "crema0"
- for(var/atom/movable/A in src)
- A.forceMove(connected.loc)
- connected.icon_state = "cremat"
- else
- qdel(src.connected)
- add_fingerprint(user)
- update_icon()
+ ..()
-/obj/structure/crematorium/attackby(obj/P, mob/user as mob)
- if(P.ispen())
- var/t = input(user, "What would you like the label to be?", "[src.name]") as text
- if(user.get_active_hand() != P)
- return
- if((!in_range(src, usr) > 1 && src.loc != user))
- return
- t = sanitizeSafe(t, MAX_NAME_LEN)
- if(t)
- name = "Crematorium- '[t]'"
- else
- name = "Crematorium"
- add_fingerprint(user)
- return
-
-/obj/structure/crematorium/relaymove(mob/user)
- if(user.stat || locked)
- return
- var/turf/S = get_step(src, src.dir)
- if(!S)
- return
- else
- if(S.contains_dense_objects())
- to_chat(user, SPAN_WARNING("There's something in the way of \the [src]!"))
- return
- connected = new /obj/structure/c_tray(src.loc)
- step(connected, src.dir)
- connected.layer = OBJ_LAYER - 0.1
- var/turf/T = get_step(src, src.dir)
- if(T.contents.Find(src.connected))
- connected.connected = src
- icon_state = "crema0"
- for(var/atom/movable/A in src)
- A.forceMove(connected.loc)
- connected.icon_state = "cremat"
- else
- QDEL_NULL(connected)
- return
-
-/obj/structure/crematorium/proc/cremate(atom/A, mob/user)
+/obj/structure/morgue/crematorium/proc/cremate(atom/A, mob/user)
if(cremating)
- return
+ return //don't let you cremate something twice or w/e
+
+ cremating = TRUE
+ locked = TRUE
if(contents.len <= 0)
- visible_message(SPAN_WARNING("You hear a hollow crackle coming from \the [src]."), range = 3)
- else
- visible_message(SPAN_WARNING("You hear a roar as \the [src] activates."))
- cremating = TRUE
- locked = TRUE
+ src.audible_message(SPAN_WARNING("You hear a hollow crackle."), 1)
+ flick("crema_empty", src)
+ set_light(3, 1, LIGHT_COLOR_FIRE)
+ sleep(4)
+ cremating = initial(cremating)
+ locked = initial(locked)
update_icon()
+ return
+ else
+ if(length(search_contents_for(/obj/item/disk/nuclear)))
+ to_chat(A, SPAN_WARNING("The crematorium buzzes, indicating that something important is inside the crematorium, and must be removed."))
+ cremating = initial(cremating)
+ locked = initial(locked)
+ update_icon()
+ return
+ src.audible_message(SPAN_WARNING("You hear a roar as \the [src] activates."), 1)
+ flick("crema_start", src)
+ update_icon()
+ var/desperation = 0
- for(var/mob/living/M in contents)
- if(M.stat < UNCONSCIOUS)
- if(!iscarbon(M))
- M.emote("scream")
+ var/list/searching = GetAllContents(searchDepth = 3, checkClient = 0)
+ for(var/mob/living/M in searching)
+ admin_attack_log(A, M, "Began cremating their victim.", "Has begun being cremated.", "began cremating")
+ if(iscarbon(M))
+ var/mob/living/carbon/C = M
+ for(var/I, I < 60, I++)
+ C.bodytemperature += 50
+ C.adjustFireLoss(20)
+ C.adjustBrainLoss(5)
+
+ if(!(C in searching)) //In case we are removed at any point.
+ cremating = initial(cremating)
+ locked = initial(locked)
+ update_icon()
+ continue
+
+ sleep(0.5 SECONDS)
+ if(prob(40) && (C.stat != DEAD))
+ desperation = rand(1,5)
+ switch(desperation) //This is messy. A better solution would probably be to make more sounds, but...
+ if(1)
+ playsound(src.loc, 'sound/weapons/genhit.ogg', 45, 1)
+ shake_animation(2)
+ playsound(src.loc, 'sound/weapons/genhit.ogg', 45, 1)
+ if(2)
+ playsound(src.loc, 'sound/effects/grillehit.ogg', 45, 1)
+ shake_animation(3)
+ playsound(src.loc, 'sound/effects/grillehit.ogg', 45, 1)
+ if(3)
+ playsound(src, 'sound/effects/bang.ogg', 45, 1)
+ if(prob(50))
+ playsound(src, 'sound/effects/bang.ogg', 45, 1)
+ shake_animation()
+ else
+ shake_animation(5)
+ if(4)
+ playsound(src, 'sound/effects/clang.ogg', 45, 1)
+ shake_animation(5)
+ if(5)
+ playsound(src, 'sound/weapons/smash.ogg', 50, 1)
+ if(prob(50))
+ playsound(src, 'sound/weapons/smash.ogg', 50, 1)
+ shake_animation(9)
+ else
+ shake_animation()
+ else
+ sleep(5)
+
+ if(M.stat == DEAD)
+ if(round_is_spooky())
+ if(prob(50))
+ playsound(src, 'sound/effects/ghost.ogg', 10, 5)
+ else
+ playsound(src, 'sound/effects/ghost2.ogg', 10, 5)
+
+ admin_attack_log(A, M, "Cremated their victim.", "Was cremated.", "cremated")
+ if(desperation)
+ M.audible_message("[M]'s screams cease, as does any movement within \the [src]. All that remains is a dull, empty silence.")
else
- var/mob/living/carbon/C = M
- C.emote("scream")
- M.death(1)
- M.ghostize()
- qdel(M)
+ M.audible_message("\The [src] quietly shuts off. All that remains is a dull, empty silence.")
+ M.dust()
for(var/obj/O in contents) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
qdel(O)
- var/obj/effect/decal/cleanable/ash/F = new /obj/effect/decal/cleanable/ash(src)
- F.layer = OBJ_LAYER
+ var/obj/effect/decal/cleanable/ash/C = new /obj/effect/decal/cleanable/ash(src)
+ C.layer = OBJ_LAYER
sleep(30)
- cremating = FALSE
- locked = FALSE
+ cremating = initial(cremating)
+ locked = initial(locked)
update_icon()
- playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
+ playsound(src.loc, 'sound/effects/spray.ogg', 50, 1)
return
-
/*
* Crematorium tray
*/
-/obj/structure/c_tray
+/obj/structure/m_tray/c_tray
name = "crematorium tray"
desc = "Apply body before burning."
- icon = 'icons/obj/stationobjs.dmi'
icon_state = "cremat"
- density = TRUE
- anchored = TRUE
- throwpass = TRUE
- layer = 2.0
- var/obj/structure/crematorium/connected = null
-/obj/structure/c_tray/Destroy()
- if(connected?.connected == src)
- connected.connected = null
- connected = null
- return ..()
+/*
+ * Crematorium switch
+ */
-/obj/structure/c_tray/attack_hand(mob/user)
- if(connected)
- for(var/atom/movable/A in src.loc)
- if(!A.anchored)
- A.forceMove(src.connected)
- connected.connected = null
- connected.update_icon()
- add_fingerprint(user)
- qdel(src)
- return
- return
-
-/obj/structure/c_tray/MouseDrop_T(atom/movable/O, mob/user)
- if(!istype(O, /atom/movable) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O))
- return
- if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
- return
- if(!ismob(user) || user.stat || user.lying || user.stunned)
- return
- O.forceMove(src.loc)
- if(user != O)
- user.visible_message("[user] stuffs \the [O] into \the [src]!", SPAN_NOTICE("You stuff \the [O] into \the [src]."), range = 3)
- return
-
-/obj/machinery/button/crematorium
+/obj/machinery/button/switch/crematorium
name = "crematorium igniter"
desc = "Burn baby burn!"
- icon = 'icons/obj/power.dmi'
- icon_state = "light0"
req_access = list(access_crematorium)
id = 1
var/cremate_dir // something for mappers, setting will make a crematorium in one step in this direction toggle
-/obj/machinery/button/crematorium/update_icon()
- return
-
-/obj/machinery/button/crematorium/attack_hand(mob/user)
- playsound(src, /decl/sound_category/switch_sound, 30)
+/obj/machinery/button/switch/crematorium/attack_hand(mob/user)
+ ..()
if(!allowed(user))
to_chat(user, SPAN_WARNING("Access denied."))
return
- if(..())
- return
- var/list/obj/structure/crematorium/crematoriums = list()
+ var/list/obj/structure/morgue/crematorium/crematoriums = list()
if(!cremate_dir)
- for(var/obj/structure/crematorium/C in range(3, src))
+ for(var/obj/structure/morgue/crematorium/C in range(3, src))
if(C.id == id)
crematoriums += C
else
var/turf/T = get_step(src, cremate_dir)
- var/obj/structure/crematorium/C = locate() in T
+ var/obj/structure/morgue/crematorium/C = locate() in T
if(C?.id == id)
crematoriums += C
for(var/thing in crematoriums)
- var/obj/structure/crematorium/C = thing
- if(!C.cremating)
+ var/obj/structure/morgue/crematorium/C = thing
+ if(!C.cremating && !C.connected)
+ active = TRUE
+ update_icon()
C.cremate(user)
diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm
index caa7dab348d..dd4f67715d0 100644
--- a/code/game/objects/structures/simple_doors.dm
+++ b/code/game/objects/structures/simple_doors.dm
@@ -173,7 +173,7 @@
user.visible_message("\The [user] hits \the [src] with \the [I] with no visible effect.")
else
user.do_attack_animation(src)
- animate_shake()
+ shake_animation()
user.visible_message("\The [user] forcefully strikes \the [src] with \the [I]!")
playsound(src.loc, material.hitsound, W.get_clamped_volume(), 1)
src.health -= W.force * 1
diff --git a/code/modules/global_listener/devices.dm b/code/modules/global_listener/devices.dm
index 0d6afeb6982..6dfd32e9c67 100644
--- a/code/modules/global_listener/devices.dm
+++ b/code/modules/global_listener/devices.dm
@@ -114,7 +114,7 @@
//-------------------------------
/datum/wifi/receiver/button/crematorium/activate(mob/living/user)
..()
- var/obj/structure/crematorium/C = parent
+ var/obj/structure/morgue/crematorium/C = parent
if(istype(C))
C.cremate(user)
diff --git a/code/modules/item_worth/worths_list.dm b/code/modules/item_worth/worths_list.dm
index a6a064b913b..528cee01640 100644
--- a/code/modules/item_worth/worths_list.dm
+++ b/code/modules/item_worth/worths_list.dm
@@ -712,7 +712,7 @@ var/list/worths = list(
/obj/structure/kitchenspike = 35,
/obj/structure/lattice = 1,
/obj/structure/morgue = 100,
- /obj/structure/crematorium = 600,
+ /obj/structure/morgue/crematorium = 600,
/obj/structure/device/piano = 1200, //pianos are expensive,
/obj/structure/noticeboard = 15,
/obj/structure/safe/floor = 180,
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index 8a641191da8..7b5d8c9b6f4 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -1235,7 +1235,7 @@ Note that amputating the affected organ does in fact remove the infection from t
"Your [name] becomes a mangled mess!", \
"You hear a sickening crack.")
else
- owner.visible_message("\The [owner]'s [name] melts away, turning into mangled mess!", \
+ owner.visible_message("\The [owner]'s [name] melts away, turning into a mangled mess!", \
"Your [name] melts away!", \
"You hear a sickening sizzle.")
disfigured = 1
diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm
index 3ea253e5230..6f5950b0612 100644
--- a/code/modules/reagents/reagent_containers/food/snacks.dm
+++ b/code/modules/reagents/reagent_containers/food/snacks.dm
@@ -390,7 +390,7 @@
reagents.trans_to_mob(user, m_bitesize, CHEM_INGEST)
bitecount++
- animate_shake()
+ shake_animation()
playsound(loc, pick('sound/effects/creatures/nibble1.ogg','sound/effects/creatures/nibble2.ogg'), 30, 1)
on_consume(user, user) //mob is both user and target for on_consume since it is feeding itself in this instance
diff --git a/html/changelogs/wezzy_crema_morgue_update.yml b/html/changelogs/wezzy_crema_morgue_update.yml
new file mode 100644
index 00000000000..4c5016c2003
--- /dev/null
+++ b/html/changelogs/wezzy_crema_morgue_update.yml
@@ -0,0 +1,43 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+# balance
+# admin
+# backend
+# security
+# refactor
+#################################
+
+# Your name.
+author: Wowzewow (Wezzy), chaoko99
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - imageadd: "New sprites for morgues and crematoriums."
+ - rscadd: "Adds some morbid animations to cremation."
+ - refactor: "Groups crematoriums under morgues to reuse their code more efficiently."
diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi
index ed7a3762445..d3f173fc57c 100644
Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ
diff --git a/maps/aurora/aurora-3_sublevel.dmm b/maps/aurora/aurora-3_sublevel.dmm
index 278dacfe8e9..37a6b7bd43c 100644
--- a/maps/aurora/aurora-3_sublevel.dmm
+++ b/maps/aurora/aurora-3_sublevel.dmm
@@ -531,7 +531,7 @@
/turf/simulated/floor/plating,
/area/engineering/atmos)
"abq" = (
-/obj/structure/crematorium{
+/obj/structure/morgue/crematorium{
_wifi_id = "xenobio_crema"
},
/turf/simulated/floor/tiled/white,
@@ -5325,7 +5325,7 @@
/turf/simulated/floor/plating,
/area/rnd/xenobiology/cells/alpha)
"ame" = (
-/obj/machinery/button/crematorium{
+/obj/machinery/button/switch/crematorium{
_wifi_id = "xenobio_crema";
pixel_x = -32;
pixel_y = 25;
@@ -11859,7 +11859,7 @@
/turf/simulated/floor/tiled,
/area/medical/patient_wing_post2)
"avo" = (
-/obj/machinery/button/crematorium{
+/obj/machinery/button/switch/crematorium{
_wifi_id = "sci_crema1";
pixel_x = 28;
pixel_y = 28
@@ -25992,7 +25992,7 @@
/turf/simulated/floor/tiled/white,
/area/medical/patient_wing_post1)
"bwz" = (
-/obj/structure/crematorium,
+/obj/structure/morgue/crematorium,
/obj/effect/decal/cleanable/cobweb2,
/turf/simulated/floor/tiled{
name = "cooled floor";
@@ -29112,7 +29112,7 @@
/turf/simulated/floor/beach/sand/alt,
/area/medical/patient_wing_picnic)
"hHI" = (
-/obj/machinery/button/crematorium{
+/obj/machinery/button/switch/crematorium{
req_access = list(66)
},
/obj/structure/table/steel,
@@ -29566,7 +29566,7 @@
},
/area/mine/unexplored)
"iKh" = (
-/obj/structure/crematorium{
+/obj/structure/morgue/crematorium{
_wifi_id = "sci_crema1"
},
/turf/simulated/floor/tiled,
@@ -29896,7 +29896,7 @@
/turf/simulated/floor/plating,
/area/maintenance/scisublevel)
"jvK" = (
-/obj/structure/crematorium,
+/obj/structure/morgue/crematorium,
/turf/simulated/floor/tiled{
name = "cooled floor";
temperature = 278
diff --git a/maps/aurora/aurora-4_mainlevel.dmm b/maps/aurora/aurora-4_mainlevel.dmm
index 3238e02c02d..fda2acc8ddf 100644
--- a/maps/aurora/aurora-4_mainlevel.dmm
+++ b/maps/aurora/aurora-4_mainlevel.dmm
@@ -51786,15 +51786,15 @@
/turf/simulated/floor/plating,
/area/maintenance/bar)
"bSC" = (
-/obj/structure/crematorium{
+/obj/structure/morgue/crematorium{
_wifi_id = "chapel_crema"
},
/turf/simulated/floor/tiled/dark,
/area/chapel/office)
"bSD" = (
-/obj/machinery/button/crematorium{
+/obj/machinery/button/switch/crematorium{
_wifi_id = "chapel_crema";
- cremate_dir = 4;
+ cremate_dir = null;
pixel_x = -32;
pixel_y = 25
},
diff --git a/maps/exodus/exodus-1_station.dmm b/maps/exodus/exodus-1_station.dmm
index d26e0c4fa76..d0eb4080a5a 100644
--- a/maps/exodus/exodus-1_station.dmm
+++ b/maps/exodus/exodus-1_station.dmm
@@ -18394,7 +18394,7 @@
/turf/simulated/floor/wood,
/area/library)
"aJo" = (
-/obj/structure/crematorium,
+/obj/structure/morgue/crematorium,
/turf/simulated/floor/tiled/dark,
/area/chapel/office)
"aJp" = (
@@ -19161,7 +19161,7 @@
/area/chapel/office)
"aKS" = (
/obj/structure/disposalpipe/segment,
-/obj/machinery/button/crematorium{
+/obj/machinery/button/switch/crematorium{
pixel_x = 25
},
/obj/machinery/light/small{
diff --git a/maps/templates/backup/syndicate_base.dmm b/maps/templates/backup/syndicate_base.dmm
index 33357664f2d..df9fc8f69be 100644
--- a/maps/templates/backup/syndicate_base.dmm
+++ b/maps/templates/backup/syndicate_base.dmm
@@ -1867,7 +1867,7 @@
},
/area/derelict)
"eM" = (
-/obj/structure/crematorium,
+/obj/structure/morgue/crematorium,
/turf/simulated/floor/shuttle{
icon_state = "floor7"
},
diff --git a/maps/templates/syndicate_base.dmm b/maps/templates/syndicate_base.dmm
index b058950ff63..62628a8d140 100644
--- a/maps/templates/syndicate_base.dmm
+++ b/maps/templates/syndicate_base.dmm
@@ -1854,7 +1854,7 @@
},
/area/derelict)
"eM" = (
-/obj/structure/crematorium,
+/obj/structure/morgue/crematorium,
/turf/simulated/floor/shuttle{
icon_state = "floor7"
},