Fixing new bugs and stuff.

This commit is contained in:
Ghommie
2020-07-27 14:16:01 +02:00
parent 05ee056f25
commit f1c242aadc
7 changed files with 22 additions and 23 deletions

View File

@@ -22,7 +22,8 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
anchored = TRUE
max_integrity = 400
var/obj/structure/tray/connected = null
var/obj/structure/tray/connected
var/starting_tray
var/locked = FALSE
dir = SOUTH
var/message_cooldown
@@ -30,6 +31,9 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
/obj/structure/bodycontainer/Initialize()
. = ..()
if(starting_tray)
connected = new starting_tray(src)
connected.connected = src
GLOB.bodycontainers += src
recursive_organ_check(src)
@@ -37,8 +41,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
GLOB.bodycontainers -= src
open()
if(connected)
qdel(connected)
connected = null
QDEL_NULL(connected)
return ..()
/obj/structure/bodycontainer/on_log(login)
@@ -150,15 +153,11 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
desc = "Used to keep bodies in until someone fetches them. Now includes a high-tech alert system."
icon_state = "morgue1"
dir = EAST
starting_tray = /obj/structure/tray/m_tray
var/beeper = TRUE
var/beep_cooldown = 50
var/next_beep = 0
/obj/structure/bodycontainer/morgue/New()
connected = new/obj/structure/tray/m_tray(src)
connected.connected = src
..()
/obj/structure/bodycontainer/morgue/examine(mob/user)
. = ..()
. += "<span class='notice'>The speaker is [beeper ? "enabled" : "disabled"]. Alt-click to toggle it.</span>"
@@ -208,6 +207,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
desc = "A human incinerator. Works well on barbecue nights."
icon_state = "crema1"
dir = SOUTH
starting_tray = /obj/structure/tray/c_tray
var/id = 1
/obj/structure/bodycontainer/crematorium/attack_robot(mob/user) //Borgs can't use crematoriums without help
@@ -218,17 +218,9 @@ GLOBAL_LIST_EMPTY(crematoriums)
GLOB.crematoriums.Remove(src)
return ..()
/obj/structure/bodycontainer/crematorium/New()
connected = new/obj/structure/tray/c_tray(src)
connected.connected = src
GLOB.crematoriums.Add(src)
..()
/obj/structure/bodycontainer/crematorium/Initialize()
. = ..()
connected = new /obj/structure/tray/c_tray(src)
connected.connected = src
GLOB.crematoriums.Add(src)
/obj/structure/bodycontainer/crematorium/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
id = "[idnum][id]"