mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-27 18:41:59 +00:00
* Replace SSingulo with SScalamity; processing cleanup
- SScalamity now handles blobs as well as singularity-types.
- Processing subtypes have been simplified to not require a stop_processing definition.
* this is probably important
* Remove cascade disabling SSgarbage
* Fixed a bug where dust() did not qdel the target mob
* Misc fixes
* Fix decals surviving break-to-plating
* Subsystem flag tweaks
* Apparently subsystems are new'd before config is.
* Fix paper icons
* Speculative fix for insane lag
* Better machinery stat
* Make organs not use SSoverlay
* Misc bugfixes & tweaks
* Nightmode fixes
* Changelog for SMC
* Port /tg/'s improved MC crash handling
* Add some more SS Recover() procs
* supply_controller -> SScargo
* More New() -> Initialize()
* pAI and robot construction overlays
* Fix cargo unit tests
* Merge the DMM Suite's atom/New() into atoms_init
* Lighting pre-baking
* Lighting initialization logging
* Fix some bad SS init orders
* Fix SSlighting logging; rename Processes to MC
* Speculative fix for insane GC lag
* Prebaked openturf/icon_smooth & fix lighting prebake
* SS init status; SSatoms LATEQDEL
* Fix bug with MC init stat panel
* Fix parallax
* Misc
* Ignore SS_NO_DISPLAY during init
* apparently this is important
* REEEEEE
* Image GC fixes; broadcaster radio-new sanity
* RCON Cleanup
* Move pAI recruiter into subsystem
* Move global solars list into sun subsystem
* Make chickens not use a global
* Demote SSdisposals to SS_BACKGROUND; garbage-debug cleanup
* Speed up space init a little
* Fix bad timer flags on floor drying
* Subsystem panic-restart verb for mins
* Explosion speedup
* Minor subsystem & MC logging tweaks
* SSopenturf improvements
* Make pipenet actually initialize (whoops)
* Minor tweaks
* Implement lighting rounding
* comments are hard okay
* Minor lattice tweaks
* Fix some timer issues & better closet init
* Timer sanity
* Request console tweaks + Storage init sanity
* Minor SSmachiner RCON improvements
* Further reduce world-start timer count
* Standardize subsystem logging
* Garbage hard delete profiling from /tg/
* Timer hang detection & recovery
* Log machines that sleep in process() and fuck up SSmachinery
* Fix an issue with external airlocks sleeping in process()
* Failsafe logging
* Minor tweaks
* Revert "Request console tweaks + Storage init sanity"
This reverts commit 98d3579e35.
* Re-implement RC changes
* Fix SQL FT saving
* Fix SSmachinery sleep in disposals
* Minor SS tweaks
* Paper fixes
* Blood drying fixes
* Merge gameticker and SSticker
* Minor global list init cleanup
* Lagcheck biogenerator & bags
* Tweak SScargo init order; RIG Initialize()
* Caching tweaks
* Remove rogue comma
* Initialize fixes
* Lighting destroy cleanup
* Fix emagging airlocks
* Initial SSicon implementation
* Tweaks & Fixes
* Fire + Air alarm queued icon updates
* Overlays + Queued icon cleanup
* Runtime & background fixes
* Kill some meaningless set statements
* Kill some image qdels
* Bump up lighting rounding val
* Fix adv. scanner destroy runtimes
* Remove unneeded icon update limiting
* Move icon smoothing into helpers
* Show a warning if DM 510 compiles without memory leak hack enabled
* Re-organize subsystems & MC defines a little
* Airlock SFX
* Log of Changes
* Make SSicon_update disable itself when not doing anything
* Fix respawn verb runtime when used early in server-init
* Add more information to MC's stat_entry()
* Replace direct refernces to gcDestroyed with QDEL* macros
* plant_controller -> SSplants
* More plant tweaks
* Add more humor to changelog
* Move parallax globals into SSparallax
* Lighting responsiveness tweaks
* Fix parallax init order & better MC init panel stat
* Make mobs GC
* More overlays + Remove intercom spawn()
* SSfast_process; make pinpointers not use spawn-recursion to process
Also made the SM Cascade beach process with SSprocessing instead of a spawn loop.
* Update changelog
* Mob GC tweaks
* Del() cleanup
* Fix insomniac ZAS connection edges
* Minor pAI cleanup
* Convert more things to SSoverlay; fix duplicated overlay in field gens
* SM Bluespace turf tweaks
* Update SSgarbage debug globals list
* Human-type qdel tweaks
* Subsystem suspension; stat_entry improvements
* SQL Statistics cleanup
* Fix runtimes with ambrosia
* More disable() -> suspend(); fix nightmode again
* Human qdel fix; minor tweaks
* Update turbolift to work with StonedMC
* Make lifts use timers instead of a subsystem
* Make SSassets start earlier
* Convert the radio controller into a subsystem
* Fix some missing CHECK_TICKs in asteroid generation
* MC stat tweaks; make shouldnt_see a typecache
* Kill some redundant debug-controller entries
* radio_controller -> SSradio
* Better SSgarbage hard-del logging from /tg/ upstream
* Logging tweaks + GELF
* Misc client caching improvements
* Slime SSoverlay
* Oven icon fixes
* Implant fixes
- Death implants will no longer spam Common on death of user.
- Death implants should handle a deleted user better.
* Holder tweaks + Welding tool Initialize()
* Fix some bad subsystem logging
* Fix suit cooling units spawning without cells
* Starlight tweaks
* Gibber infinite gib fix
* More SSoverlay stuff
* Make crates use CUT_OVERLAY_IN
* Make SSarrivals suspend instead of disable
* Make openturf use split/phased tick checks
* Speculative fix for unwet timer runtimes
* Blood overlay tweaks/fixes
* Update crusher to play nice with SMC + SSoverlay
* Openturf improvements and fixes
* Minor turbolift tweaks
* Lighting performance improvements + ChangeTurf tweaks
* this is probably important
* Fix wall weld noises on changeturf
* More ChangeTurf tweaks
* Explosion tweaks
* Pre-game lobby tweaks
* Openturf tweaks
* Prevent admins from starting the game before init finishes
* Fix Travis
* Kill an unused var
* Fix ChangeTurf runtimes on openturfs
* Fixes
* Browser datum fixes, asset caching
* Update changelog
* Changelog
* Lobby tweaks
* Ticker tweaks; kill ticker var
* Further lobby tweaks
* Cascade tweaks
* air_master -> SSair
* Reduce overhead from radio autosay
* alarm_manager -> SSalarm
* bomb_processor -> SSexplosives
* corp_regs -> SSlaw
* ZAS overlay fixes
* Small wall icon optimization
* Fix effects master
* Assembly tweaks
* Megavend fixes
* Shuttle fixes
* Camera alert performance improvements
* Fix some world.log spam from lighting overlays
* Fix some Initialize() procs
* Openspace responsiveness tweaks
* Make HE pipes animate through openturfs
* Kill a spawn
429 lines
12 KiB
Plaintext
429 lines
12 KiB
Plaintext
/* Morgue stuff
|
|
* Contains:
|
|
* Morgue
|
|
* Morgue trays
|
|
* Creamatorium
|
|
* Creamatorium trays
|
|
*/
|
|
|
|
/*
|
|
* Morgue
|
|
*/
|
|
|
|
/obj/structure/morgue
|
|
name = "morgue"
|
|
desc = "Used to keep bodies in untill someone fetches them."
|
|
icon = 'icons/obj/stationobjs.dmi'
|
|
icon_state = "morgue1"
|
|
dir = EAST
|
|
density = 1
|
|
var/obj/structure/m_tray/connected = null
|
|
anchored = 1.0
|
|
|
|
/obj/structure/morgue/Destroy()
|
|
if(connected)
|
|
qdel(connected)
|
|
connected = null
|
|
return ..()
|
|
|
|
/obj/structure/morgue/proc/update()
|
|
if (src.connected)
|
|
src.icon_state = "morgue0"
|
|
else
|
|
if (src.contents.len)
|
|
src.icon_state = "morgue2"
|
|
else
|
|
src.icon_state = "morgue1"
|
|
return
|
|
|
|
/obj/structure/morgue/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.loc)
|
|
ex_act(severity)
|
|
qdel(src)
|
|
return
|
|
if(2.0)
|
|
if (prob(50))
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.loc)
|
|
ex_act(severity)
|
|
qdel(src)
|
|
return
|
|
if(3.0)
|
|
if (prob(5))
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.loc)
|
|
ex_act(severity)
|
|
qdel(src)
|
|
return
|
|
return
|
|
|
|
/obj/structure/morgue/attack_hand(mob/user as mob)
|
|
if (src.connected)
|
|
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
|
if (!( A.anchored ))
|
|
A.forceMove(src)
|
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
|
qdel(src.connected)
|
|
src.connected = null
|
|
else
|
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
|
src.connected = new /obj/structure/m_tray( src.loc )
|
|
step(src.connected, src.dir)
|
|
src.connected.layer = OBJ_LAYER
|
|
var/turf/T = get_step(src, src.dir)
|
|
if (T.contents.Find(src.connected))
|
|
src.connected.connected = src
|
|
src.icon_state = "morgue0"
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.connected.loc)
|
|
src.connected.icon_state = "morguet"
|
|
src.connected.set_dir(src.dir)
|
|
else
|
|
qdel(src.connected)
|
|
src.connected = null
|
|
src.add_fingerprint(user)
|
|
update()
|
|
return
|
|
|
|
/obj/structure/morgue/attackby(P as obj, mob/user as mob)
|
|
if (istype(P, /obj/item/weapon/pen))
|
|
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
|
if (user.get_active_hand() != P)
|
|
return
|
|
if ((!in_range(src, usr) && src.loc != user))
|
|
return
|
|
t = sanitizeSafe(t, MAX_NAME_LEN)
|
|
if (t)
|
|
src.name = text("Morgue- '[]'", t)
|
|
else
|
|
src.name = "Morgue"
|
|
src.add_fingerprint(user)
|
|
return
|
|
|
|
/obj/structure/morgue/relaymove(mob/user as mob)
|
|
if (user.stat)
|
|
return
|
|
src.connected = new /obj/structure/m_tray( src.loc )
|
|
step(src.connected, EAST)
|
|
src.connected.layer = OBJ_LAYER
|
|
var/turf/T = get_step(src, EAST)
|
|
if (T.contents.Find(src.connected))
|
|
src.connected.connected = src
|
|
src.icon_state = "morgue0"
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.connected.loc)
|
|
src.connected.icon_state = "morguet"
|
|
else
|
|
qdel(src.connected)
|
|
src.connected = null
|
|
return
|
|
|
|
|
|
/*
|
|
* Morgue tray
|
|
*/
|
|
/obj/structure/m_tray
|
|
name = "morgue tray"
|
|
desc = "Apply corpse before closing."
|
|
icon = 'icons/obj/stationobjs.dmi'
|
|
icon_state = "morguet"
|
|
density = 1
|
|
layer = 2.0
|
|
var/obj/structure/morgue/connected = null
|
|
anchored = 1
|
|
throwpass = 1
|
|
|
|
/obj/structure/m_tray/Destroy()
|
|
if(connected && connected.connected == src)
|
|
connected.connected = null
|
|
connected = null
|
|
return ..()
|
|
|
|
/obj/structure/m_tray/attack_hand(mob/user as mob)
|
|
if (src.connected)
|
|
for(var/atom/movable/A as mob|obj in src.loc)
|
|
if (!( A.anchored ))
|
|
A.forceMove(src.connected)
|
|
//Foreach goto(26)
|
|
src.connected.connected = null
|
|
src.connected.update()
|
|
add_fingerprint(user)
|
|
//SN src = null
|
|
qdel(src)
|
|
return
|
|
return
|
|
|
|
/obj/structure/m_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
|
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)
|
|
for(var/mob/B in viewers(user, 3))
|
|
if ((B.client && !( B.blinded )))
|
|
B << "<span class='warning'>\The [user] stuffs [O] into [src]!</span>"
|
|
return
|
|
|
|
|
|
/*
|
|
* Crematorium
|
|
*/
|
|
|
|
/obj/structure/crematorium
|
|
name = "crematorium"
|
|
desc = "A human incinerator. Works well on barbeque nights."
|
|
icon = 'icons/obj/stationobjs.dmi'
|
|
icon_state = "crema1"
|
|
density = 1
|
|
var/obj/structure/c_tray/connected = null
|
|
anchored = 1.0
|
|
var/cremating = 0
|
|
var/id = 1
|
|
var/locked = 0
|
|
var/_wifi_id
|
|
var/datum/wifi/receiver/button/crematorium/wifi_receiver
|
|
|
|
/obj/structure/crematorium/Initialize()
|
|
. = ..()
|
|
if(_wifi_id)
|
|
wifi_receiver = new(_wifi_id, src)
|
|
|
|
/obj/structure/crematorium/Destroy()
|
|
if(connected)
|
|
qdel(connected)
|
|
connected = null
|
|
if(wifi_receiver)
|
|
qdel(wifi_receiver)
|
|
wifi_receiver = null
|
|
return ..()
|
|
|
|
/obj/structure/crematorium/proc/update()
|
|
if (src.connected)
|
|
src.icon_state = "crema0"
|
|
else
|
|
if (src.contents.len)
|
|
src.icon_state = "crema2"
|
|
else
|
|
src.icon_state = "crema1"
|
|
return
|
|
|
|
/obj/structure/crematorium/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.loc)
|
|
ex_act(severity)
|
|
qdel(src)
|
|
return
|
|
if(2.0)
|
|
if (prob(50))
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.loc)
|
|
ex_act(severity)
|
|
qdel(src)
|
|
return
|
|
if(3.0)
|
|
if (prob(5))
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.loc)
|
|
ex_act(severity)
|
|
qdel(src)
|
|
return
|
|
return
|
|
|
|
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
|
// if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH
|
|
// user.show_message("<span class='warning'>Uh-oh, that was a bad idea.</span>", 1)
|
|
// //usr << "Uh-oh, that was a bad idea."
|
|
// src:loc:poison += 20000000
|
|
// src:loc:firelevel = src:loc:poison
|
|
// return
|
|
if (cremating)
|
|
usr << "<span class='warning'>It's locked.</span>"
|
|
return
|
|
if ((src.connected) && (src.locked == 0))
|
|
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
|
if (!( A.anchored ))
|
|
A.forceMove(src)
|
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
|
//src.connected = null
|
|
qdel(src.connected)
|
|
else if (src.locked == 0)
|
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
|
src.connected = new /obj/structure/c_tray( src.loc )
|
|
step(src.connected, SOUTH)
|
|
src.connected.layer = OBJ_LAYER
|
|
var/turf/T = get_step(src, SOUTH)
|
|
if (T.contents.Find(src.connected))
|
|
src.connected.connected = src
|
|
src.icon_state = "crema0"
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.connected.loc)
|
|
src.connected.icon_state = "cremat"
|
|
else
|
|
//src.connected = null
|
|
qdel(src.connected)
|
|
src.add_fingerprint(user)
|
|
update()
|
|
|
|
/obj/structure/crematorium/attackby(P as obj, mob/user as mob)
|
|
if (istype(P, /obj/item/weapon/pen))
|
|
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) 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)
|
|
src.name = text("Crematorium- '[]'", t)
|
|
else
|
|
src.name = "Crematorium"
|
|
src.add_fingerprint(user)
|
|
return
|
|
|
|
/obj/structure/crematorium/relaymove(mob/user as mob)
|
|
if (user.stat || locked)
|
|
return
|
|
src.connected = new /obj/structure/c_tray( src.loc )
|
|
step(src.connected, SOUTH)
|
|
src.connected.layer = OBJ_LAYER
|
|
var/turf/T = get_step(src, SOUTH)
|
|
if (T.contents.Find(src.connected))
|
|
src.connected.connected = src
|
|
src.icon_state = "crema0"
|
|
for(var/atom/movable/A as mob|obj in src)
|
|
A.forceMove(src.connected.loc)
|
|
src.connected.icon_state = "cremat"
|
|
else
|
|
qdel(src.connected)
|
|
src.connected = null
|
|
return
|
|
|
|
/obj/structure/crematorium/proc/cremate(atom/A, mob/user as mob)
|
|
// for(var/obj/machinery/crema_switch/O in src) //trying to figure a way to call the switch, too drunk to sort it out atm
|
|
// if(var/on == 1)
|
|
// return
|
|
if(cremating)
|
|
return //don't let you cremate something twice or w/e
|
|
|
|
if(contents.len <= 0)
|
|
for (var/mob/M in viewers(src))
|
|
M.show_message("<span class='warning'>You hear a hollow crackle.</span>", 1)
|
|
return
|
|
|
|
else
|
|
if(!isemptylist(src.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
|
usr << "You get the feeling that you shouldn't cremate one of the items in the cremator."
|
|
return
|
|
|
|
for (var/mob/M in viewers(src))
|
|
M.show_message("<span class='warning'>You hear a roar as the crematorium activates.</span>", 1)
|
|
|
|
cremating = 1
|
|
locked = 1
|
|
|
|
for(var/mob/living/M in contents)
|
|
if (M.stat!=2)
|
|
if (!iscarbon(M))
|
|
M.emote("scream")
|
|
else
|
|
var/mob/living/carbon/C = M
|
|
if (!(C.species && (C.species.flags & NO_PAIN)))
|
|
C.emote("scream")
|
|
|
|
//Logging for this causes runtimes resulting in the cremator locking up. Commenting it out until that's figured out.
|
|
//M.attack_log += "\[[time_stamp()]\] Has been cremated by <b>[user]/[user.ckey]</b>" //No point in this when the mob's about to be deleted
|
|
//user.attack_log +="\[[time_stamp()]\] Cremated <b>[M]/[M.ckey]</b>"
|
|
//log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
|
|
M.death(1)
|
|
M.ghostize()
|
|
qdel(M)
|
|
|
|
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)
|
|
|
|
new /obj/effect/decal/cleanable/ash(src)
|
|
sleep(30)
|
|
cremating = 0
|
|
locked = 0
|
|
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
|
return
|
|
|
|
|
|
/*
|
|
* Crematorium tray
|
|
*/
|
|
/obj/structure/c_tray
|
|
name = "crematorium tray"
|
|
desc = "Apply body before burning."
|
|
icon = 'icons/obj/stationobjs.dmi'
|
|
icon_state = "cremat"
|
|
density = 1
|
|
layer = 2.0
|
|
var/obj/structure/crematorium/connected = null
|
|
anchored = 1
|
|
throwpass = 1
|
|
|
|
/obj/structure/c_tray/Destroy()
|
|
if(connected && connected.connected == src)
|
|
connected.connected = null
|
|
connected = null
|
|
return ..()
|
|
|
|
/obj/structure/c_tray/attack_hand(mob/user as mob)
|
|
if (src.connected)
|
|
for(var/atom/movable/A as mob|obj in src.loc)
|
|
if (!( A.anchored ))
|
|
A.forceMove(src.connected)
|
|
//Foreach goto(26)
|
|
src.connected.connected = null
|
|
src.connected.update()
|
|
add_fingerprint(user)
|
|
//SN src = null
|
|
qdel(src)
|
|
return
|
|
return
|
|
|
|
/obj/structure/c_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
|
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)
|
|
for(var/mob/B in viewers(user, 3))
|
|
if ((B.client && !( B.blinded )))
|
|
B << text("<span class='warning'>[] stuffs [] into []!</span>", user, O, src)
|
|
//Foreach goto(99)
|
|
return
|
|
|
|
/obj/machinery/button/crematorium
|
|
name = "crematorium igniter"
|
|
desc = "Burn baby burn!"
|
|
icon = 'icons/obj/power.dmi'
|
|
icon_state = "crema_switch"
|
|
req_access = list(access_crematorium)
|
|
id = 1
|
|
|
|
/obj/machinery/button/crematorium/update_icon()
|
|
return
|
|
|
|
/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
|
|
if(..())
|
|
return
|
|
if(src.allowed(user))
|
|
for (var/obj/structure/crematorium/C in world)
|
|
if (C.id == id)
|
|
if (!C.cremating)
|
|
C.cremate(user)
|
|
else
|
|
usr << "<span class='warning'>Access denied.</span>"
|