diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm
index 339b00714f7..d2988a6474f 100644
--- a/code/__DEFINES/atmospherics.dm
+++ b/code/__DEFINES/atmospherics.dm
@@ -114,7 +114,4 @@
// Atmos pipe limits
#define MAX_OUTPUT_PRESSURE 4500 // (kPa) What pressure pumps and powered equipment max out at.
-#define MAX_TRANSFER_RATE 200 // (L/s) Maximum speed powered equipment can work at.
-
-// Sound Limits
-#define SOUND_MINIMUM_PRESSURE 10
\ No newline at end of file
+#define MAX_TRANSFER_RATE 200 // (L/s) Maximum speed powered equipment can work at.
\ No newline at end of file
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 9c6f32283ce..56c4d5d51dd 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -263,4 +263,8 @@
#define LAVA_PROOF -2
#define FIRE_PROOF -1
#define FLAMMABLE 0
-#define ON_FIRE 1
\ No newline at end of file
+#define ON_FIRE 1
+
+// Sound
+#define SOUND_MINIMUM_PRESSURE 10
+#define FALLOFF_SOUNDS 0.5
\ No newline at end of file
diff --git a/code/__HELPERS/timed_alerts.dm b/code/__HELPERS/timed_alerts.dm
deleted file mode 100644
index 97e92900288..00000000000
--- a/code/__HELPERS/timed_alerts.dm
+++ /dev/null
@@ -1,37 +0,0 @@
-/client/var/timed_alert/timed_alert
-
-/client/proc/timed_alert(question as text, title as text, default as text, time = 300, \
- choice1 as text, choice2 as text, choice3 as text)
-
- if(timed_alert) del(timed_alert)
- var/timed_alert/ref_alert = new
- timed_alert = ref_alert
-
- var/ref_result
-
- ref_result = ref_alert.timed_alert(src, question, title, time, choice1, choice2, choice3)
- if(!ref_result) ref_result = default
-
- if(ref_alert) del(ref_alert)
-
- return ref_result
-
-
-/mob/proc/timed_alert(question as text, title as text, default as text, time as num, \
- choice1 as text, choice2 as text, choice3 as text)
-
- if(client) return client.timed_alert(question, title, default, time, choice1, choice2, choice3)
- return
-
-
-
-/timed_alert/proc/timed_alert(client/ref_client, question, title, time, choice1, choice2, choice3)
- if(!ref_client) return
- spawn (time) del(src) // When src is deleted, the proc ends immediately. The alert itself closes.
-
- var/ref_answer
- ref_answer = alert(ref_client, question, title, choice1, choice2, choice3)
-
- if(!ref_client || !ref_answer) return
- else return ref_answer
-
diff --git a/code/_onclick/oldcode.dm b/code/_onclick/oldcode.dm
deleted file mode 100644
index a68f9668e78..00000000000
--- a/code/_onclick/oldcode.dm
+++ /dev/null
@@ -1,375 +0,0 @@
-/atom/DblClick(location, control, params) //TODO: DEFERRED: REWRITE
- if(!usr) return
-
- // ------- TIME SINCE LAST CLICK -------
- if(world.time <= usr:lastDblClick+1)
- return
- else
- usr:lastDblClick = world.time
-
- //Putting it here for now. It diverts stuff to the mech clicking procs. Putting it here stops us drilling items in our inventory Carn
- if(istype(usr.loc,/obj/mecha))
- if(usr.client && (src in usr.client.screen))
- return
- var/obj/mecha/Mech = usr.loc
- Mech.click_action(src,usr)
- return
-
- // ------- DIR CHANGING WHEN CLICKING ------
- if( iscarbon(usr) && !usr.buckled )
- if( src.x && src.y && usr.x && usr.y )
- var/dx = src.x - usr.x
- var/dy = src.y - usr.y
-
- if(dy || dx)
- if(abs(dx) < abs(dy))
- if(dy > 0) usr.dir = NORTH
- else usr.dir = SOUTH
- else
- if(dx > 0) usr.dir = EAST
- else usr.dir = WEST
- else
- if(pixel_y > 16) usr.dir = NORTH
- else if(pixel_y < -16) usr.dir = SOUTH
- else if(pixel_x > 16) usr.dir = EAST
- else if(pixel_x < -16) usr.dir = WEST
-
-
-
-
- // ------- AI -------
- else if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/ai = usr
- if(ai.control_disabled)
- return
-
- // ------- CYBORG -------
- else if(istype(usr, /mob/living/silicon/robot))
- var/mob/living/silicon/robot/bot = usr
- if(bot.lockcharge) return
- ..()
-
-
- // ------- SHIFT-CLICK -------
-
- if(params)
- var/parameters = params2list(params)
-
- if(parameters["shift"]){
- if(!isAI(usr))
- ShiftClick(usr)
- else
- AIShiftClick(usr)
- return
- }
-
- // ------- ALT-CLICK -------
-
- if(parameters["alt"]){
- if(!isAI(usr))
- AltClick(usr)
- else
- AIAltClick(usr)
- return
- }
-
- // ------- CTRL-CLICK -------
-
- if(parameters["ctrl"]){
- if(!isAI(usr))
- CtrlClick(usr)
- else
- AICtrlClick(usr)
- return
- }
-
- // ------- MIDDLE-CLICK -------
-
- if(parameters["middle"]){
- if(!isAI(usr))
- MiddleClick(usr)
- return
- }
-
- // ------- THROW -------
- if(usr.in_throw_mode)
- return usr:throw_item(src)
-
- // ------- ITEM IN HAND DEFINED -------
- var/obj/item/W = usr.get_active_hand()
-/* Now handled by get_active_hand()
- // ------- ROBOT -------
- if(istype(usr, /mob/living/silicon/robot))
- if(!isnull(usr:module_active))
- W = usr:module_active
- else
- W = null
-*/
- // ------- ATTACK SELF -------
- if(W == src && usr.stat == 0)
- W.attack_self(usr)
- if(usr.hand)
- usr.update_inv_l_hand(0) //update in-hand overlays
- else
- usr.update_inv_r_hand(0)
- return
-
- // ------- PARALYSIS, STUN, WEAKENED, DEAD, (And not AI) -------
- if(((usr.paralysis || usr.stunned || usr.weakened) && !istype(usr, /mob/living/silicon/ai)) || usr.stat != 0)
- return
-
- // ------- CLICKING STUFF IN CONTAINERS -------
- if((!( src in usr.contents ) && (((!( isturf(src) ) && (!( isturf(src.loc) ) && (src.loc && !( isturf(src.loc.loc) )))) || !( isturf(usr.loc) )) && (src.loc != usr.loc && (!( istype(src, /obj/screen) ) && !( usr.contents.Find(src.loc) ))))))
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/ai = usr
- if(ai.control_disabled || ai.malfhacking)
- return
- else
- return
-
- // ------- 1 TILE AWAY -------
- var/t5
- // ------- AI CAN CLICK ANYTHING -------
- if(istype(usr, /mob/living/silicon/ai))
- t5 = 1
- // ------- CYBORG CAN CLICK ANYTHING WHEN NOT HOLDING STUFF -------
- else if(istype(usr, /mob/living/silicon/robot) && !W)
- t5 = 1
- else
- t5 = in_range(src, usr) || src.loc == usr
-
-// to_chat(world, "according to dblclick(), t5 is [t5]")
-
- // ------- ACTUALLY DETERMINING STUFF -------
- if(((t5 || (W && (W.flags & USEDELAY))) && !( istype(src, /obj/screen) )))
-
- // ------- ( CAN USE ITEM OR HAS 1 SECOND USE DELAY ) AND NOT CLICKING ON SCREEN -------
-
- if(usr.next_move < world.time)
- usr.prev_move = usr.next_move
- usr.next_move = world.time + 10
- else
- // ------- ALREADY USED ONE ITEM WITH USE DELAY IN THE PREVIOUS SECOND -------
- return
-
- // ------- DELAY CHECK PASSED -------
-
- if((src.loc && (get_dist(src, usr) < 2 || src.loc == usr.loc)))
-
- // ------- CLICKED OBJECT EXISTS IN GAME WORLD, DISTANCE FROM PERSON TO OBJECT IS 1 SQUARE OR THEY'RE ON THE SAME SQUARE -------
-
- var/direct = get_dir(usr, src)
- var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( usr.loc )
- var/ok = 0
- if( (direct - 1) & direct)
-
- // ------- CLICKED OBJECT IS LOCATED IN A DIAGONAL POSITION FROM THE PERSON -------
-
- var/turf/Step_1
- var/turf/Step_2
- switch(direct)
- if(5.0)
- Step_1 = get_step(usr, NORTH)
- Step_2 = get_step(usr, EAST)
-
- if(6.0)
- Step_1 = get_step(usr, SOUTH)
- Step_2 = get_step(usr, EAST)
-
- if(9.0)
- Step_1 = get_step(usr, NORTH)
- Step_2 = get_step(usr, WEST)
-
- if(10.0)
- Step_1 = get_step(usr, SOUTH)
- Step_2 = get_step(usr, WEST)
-
- else
- if(Step_1 && Step_2)
-
- // ------- BOTH CARDINAL DIRECTIONS OF THE DIAGONAL EXIST IN THE GAME WORLD -------
-
- var/check_1 = 0
- var/check_2 = 0
- if(step_to(D, Step_1))
- check_1 = 1
- for(var/obj/border_obstacle in Step_1)
- if(border_obstacle.flags & ON_BORDER)
- if(!border_obstacle.CheckExit(D, src))
- check_1 = 0
- // ------- YOU TRIED TO CLICK ON AN ITEM THROUGH A WINDOW (OR SIMILAR THING THAT LIMITS ON BORDERS) ON ONE OF THE DIRECITON TILES -------
- for(var/obj/border_obstacle in get_turf(src))
- if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
- if(!border_obstacle.CanPass(D, D.loc, 1, 0))
- // ------- YOU TRIED TO CLICK ON AN ITEM THROUGH A WINDOW (OR SIMILAR THING THAT LIMITS ON BORDERS) ON THE TILE YOU'RE ON -------
- check_1 = 0
-
- D.loc = usr.loc
- if(step_to(D, Step_2))
- check_2 = 1
-
- for(var/obj/border_obstacle in Step_2)
- if(border_obstacle.flags & ON_BORDER)
- if(!border_obstacle.CheckExit(D, src))
- check_2 = 0
- for(var/obj/border_obstacle in get_turf(src))
- if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
- if(!border_obstacle.CanPass(D, D.loc, 1, 0))
- check_2 = 0
-
-
- if(check_1 || check_2)
- ok = 1
- // ------- YOU CAN REACH THE ITEM THROUGH AT LEAST ONE OF THE TWO DIRECTIONS. GOOD. -------
-
- /*
- More info:
- If you're trying to click an item in the north-east of your mob, the above section of code will first check if tehre's a tile to the north or you and to the east of you
- These two tiles are Step_1 and Step_2. After this, a new dummy object is created on your location. It then tries to move to Step_1, If it succeeds, objects on the turf you're on and
- the turf that Step_1 is are checked for items which have the ON_BORDER flag set. These are itmes which limit you on only one tile border. Windows, for the most part.
- CheckExit() and CanPass() are use to determine this. The dummy object is then moved back to your location and it tries to move to Step_2. Same checks are performed here.
- If at least one of the two checks succeeds, it means you can reach the item and ok is set to 1.
- */
- else
- // ------- OBJECT IS ON A CARDINAL TILE (NORTH, SOUTH, EAST OR WEST OR THE TILE YOU'RE ON) -------
- if(loc == usr.loc)
- ok = 1
- // ------- OBJECT IS ON THE SAME TILE AS YOU -------
- else
- ok = 1
-
- //Now, check objects to block exit that are on the border
- for(var/obj/border_obstacle in usr.loc)
- if(border_obstacle.flags & ON_BORDER)
- if(!border_obstacle.CheckExit(D, src))
- ok = 0
-
- //Next, check objects to block entry that are on the border
- for(var/obj/border_obstacle in get_turf(src))
- if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
- if(!border_obstacle.CanPass(D, D.loc, 1, 0))
- ok = 0
- /*
- See the previous More info, for... more info...
- */
-
- //del(D)
- // Garbage Collect Dummy
- D.loc = null
- D = null
-
- // ------- DUMMY OBJECT'S SERVED IT'S PURPOSE, IT'S REWARDED WITH A SWIFT DELETE -------
- if(!( ok ))
- // ------- TESTS ABOVE DETERMINED YOU CANNOT REACH THE TILE -------
- return 0
-
- if(!( usr.restrained() || (usr.lying && usr.buckled!=src) ))
- // ------- YOU ARE NOT REASTRAINED -------
-
- if(W)
- // ------- YOU HAVE AN ITEM IN YOUR HAND - HANDLE ATTACKBY AND AFTERATTACK -------
- var/ignoreAA = 0 //Ignore afterattack(). Surgery uses this.
- if(t5)
- ignoreAA = src.attackby(W, usr, params)
- if(W && !ignoreAA)
- W.afterattack(src, usr, (t5 ? 1 : 0), params)
-
- else
- // ------- YOU DO NOT HAVE AN ITEM IN YOUR HAND -------
- if(istype(usr, /mob/living/carbon/human))
- // ------- YOU ARE HUMAN -------
- src.attack_hand(usr, usr.hand)
- else
- // ------- YOU ARE NOT HUMAN. WHAT ARE YOU - DETERMINED HERE AND PROPER ATTACK_MOBTYPE CALLED -------
- if(istype(usr, /mob/living/carbon/monkey))
- src.attack_paw(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/alien/humanoid))
- if(usr.m_intent == "walk" && istype(usr, /mob/living/carbon/alien/humanoid/hunter))
- usr.m_intent = "run"
- usr.hud_used.move_intent.icon_state = "running"
- usr.update_icons()
- src.attack_alien(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/alien/larva))
- src.attack_larva(usr)
- else if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
- src.attack_ai(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/slime))
- src.attack_slime(usr)
- else if(istype(usr, /mob/living/simple_animal))
- src.attack_animal(usr)
- else
- // ------- YOU ARE RESTRAINED. DETERMINE WHAT YOU ARE AND ATTACK WITH THE PROPER HAND_X PROC -------
- if(istype(usr, /mob/living/carbon/human))
- src.hand_h(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/monkey))
- src.hand_p(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/alien/humanoid))
- src.hand_al(usr, usr.hand)
- else if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
- src.hand_a(usr, usr.hand)
-
- else
- // ------- ITEM INACESSIBLE OR CLICKING ON SCREEN -------
- if(istype(src, /obj/screen))
- // ------- IT'S THE HUD YOU'RE CLICKING ON -------
- usr.prev_move = usr.next_move
- usr:lastDblClick = world.time + 2
- if(usr.next_move < world.time)
- usr.next_move = world.time + 2
- else
- return
-
- // ------- 2 DECISECOND DELAY FOR CLICKING PASSED -------
-
- if(!( usr.restrained() ))
-
- // ------- YOU ARE NOT RESTRAINED -------
- if((W && !( istype(src, /obj/screen) )))
- // ------- IT SHOULD NEVER GET TO HERE, DUE TO THE ISTYPE(SRC, /OBJ/SCREEN) FROM PREVIOUS IF-S - I TESTED IT WITH A DEBUG OUTPUT AND I COULDN'T GET THIST TO SHOW UP. -------
- src.attackby(W, usr, params)
- if(W)
- W.afterattack(src, usr,, params)
- else
- // ------- YOU ARE NOT RESTRAINED, AND ARE CLICKING A HUD OBJECT -------
- if(istype(usr, /mob/living/carbon/human))
- src.attack_hand(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/monkey))
- src.attack_paw(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/alien/humanoid))
- src.attack_alien(usr, usr.hand)
- else
- // ------- YOU ARE RESTRAINED CLICKING ON A HUD OBJECT -------
- if(istype(usr, /mob/living/carbon/human))
- src.hand_h(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/monkey))
- src.hand_p(usr, usr.hand)
- else if(istype(usr, /mob/living/carbon/alien/humanoid))
- src.hand_al(usr, usr.hand)
- else
- // ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD -------
- if((LASER in usr:mutations) && usr:a_intent == I_HARM && world.time >= usr.next_move)
- // ------- YOU HAVE THE LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED -------
-
- var/turf/T = get_turf(usr)
- var/turf/U = get_turf(src)
-
-
- if(istype(usr, /mob/living/carbon/human))
- usr:nutrition -= rand(1,5)
- usr:handle_regular_hud_updates()
-
- var/obj/item/projectile/beam/A = new /obj/item/projectile/beam( usr.loc )
- A.icon = 'icons/effects/genetics.dmi'
- A.icon_state = "eyelasers"
- playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1)
-
- A.firer = usr
- A.def_zone = usr:get_organ_target()
- A.original = src
- A.current = T
- A.yo = U.y - T.y
- A.xo = U.x - T.x
- A.fire()
-
- usr.next_move = world.time + 6
- return
diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm
index acf34e3c4c8..24fde08e2d8 100644
--- a/code/controllers/ProcessScheduler/core/process.dm
+++ b/code/controllers/ProcessScheduler/core/process.dm
@@ -105,6 +105,10 @@
last_task = 0
last_object = null
+/datum/controller/process/Destroy()
+ ..()
+ return QDEL_HINT_HARDDEL_NOW
+
/datum/controller/process/proc/started()
// Initialize run_start so we can detect hung processes.
run_start = TimeOfGame
@@ -180,8 +184,7 @@
// Allow inheritors to clean up if needed
onKill()
- // This should del
- del(src)
+ qdel(src)
// Do not call this directly - use SHECK or SCHECK_EVERY
/datum/controller/process/proc/sleepCheck(var/tickId = 0)
diff --git a/code/controllers/ProcessScheduler/core/processScheduler.dm b/code/controllers/ProcessScheduler/core/processScheduler.dm
index 494e776650d..8eb0b37c0b8 100644
--- a/code/controllers/ProcessScheduler/core/processScheduler.dm
+++ b/code/controllers/ProcessScheduler/core/processScheduler.dm
@@ -58,6 +58,10 @@ var/global/datum/controller/processScheduler/processScheduler
timeAllowance = world.tick_lag * 0.5
timeAllowanceMax = world.tick_lag
+/datum/controller/processScheduler/Destroy()
+ ..()
+ return QDEL_HINT_HARDDEL_NOW
+
/**
* deferSetupFor
* @param path processPath
@@ -72,7 +76,7 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/setup()
// There can be only one
if(processScheduler && (processScheduler != src))
- del(src)
+ qdel(src)
return 0
var/process
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index e7621dcfc3e..f013e4e817c 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -24,7 +24,7 @@ var/global/pipe_processing_killed = 0
//There can be only one master_controller. Out with the old and in with the new.
if(master_controller != src)
if(istype(master_controller))
- del(master_controller)
+ qdel(master_controller)
master_controller = src
var/watch=0
@@ -38,6 +38,10 @@ var/global/pipe_processing_killed = 0
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
+/datum/controller/game_controller/Destroy()
+ ..()
+ return QDEL_HINT_HARDDEL_NOW
+
/datum/controller/game_controller/proc/setup()
world.tick_lag = config.Ticklag
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index e4f7bc15657..c17a4d057c7 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -128,7 +128,7 @@ datum/hSB
if("hsbtoolbox")
var/obj/item/weapon/storage/hsb = new/obj/item/weapon/storage/toolbox/mechanical
for(var/obj/item/device/radio/T in hsb)
- del(T)
+ qdel(T)
new/obj/item/weapon/crowbar (hsb)
hsb.loc = usr.loc
if("hsbmedkit")
diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm
index 5c509c2d26d..15ec89d71a2 100644
--- a/code/game/gamemodes/setupgame.dm
+++ b/code/game/gamemodes/setupgame.dm
@@ -148,102 +148,3 @@
// Populate the syndicate coalition:
for(var/datum/faction/syndicate/S in ticker.factions)
ticker.syndicate_coalition.Add(S)
-
-
-/* This was used for something before, I think, but is not worth the effort to process now.
-/proc/setupcorpses()
- for(var/obj/effect/landmark/A in landmarks_list)
- if(A.name == "Corpse")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- qdel(A)
- continue
- if(A.name == "Corpse-Engineer")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
- // M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
- //M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
- else
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
- del(A)
- continue
- if(A.name == "Corpse-Engineer-Space")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
- M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/suit/space(M), slot_wear_suit)
- // M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
- else
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
- else
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space(M), slot_head)
- del(A)
- continue
- if(A.name == "Corpse-Engineer-Chief")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
- // M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
- else
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
- del(A)
- continue
- if(A.name == "Corpse-Syndicate")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
- //M.equip_to_slot_or_del(new /obj/item/weapon/gun/revolver(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack(M), slot_back)
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate(M), slot_wear_suit)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head)
- else
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate(M), slot_head)
- else
- M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit)
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head)
- qdel(A)
- continue
-*/
diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index 9388942d549..24b233a4b41 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -39,6 +39,11 @@
src.colorlist += D
+/obj/machinery/pdapainter/Destroy()
+ if(storedpda)
+ qdel(storedpda)
+ storedpda = null
+ return ..()
/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/device/pda))
diff --git a/code/game/machinery/bees_apiary.dm b/code/game/machinery/bees_apiary.dm
deleted file mode 100644
index ad9fb8795cb..00000000000
--- a/code/game/machinery/bees_apiary.dm
+++ /dev/null
@@ -1,245 +0,0 @@
-//http://www.youtube.com/watch?v=-1GadTfGFvU
-//i could have done these as just an ordinary plant, but fuck it - there would have been too much snowflake code
-
-/obj/machinery/apiary
- name = "apiary tray"
- icon = 'icons/obj/hydroponics.dmi'
- icon_state = "hydrotray3"
- density = 1
- anchored = 1
- var/nutrilevel = 0
- var/yieldmod = 1
- var/mut = 1
- var/toxic = 0
- var/dead = 0
- var/health = -1
- var/maxhealth = 100
- var/lastcycle = 0
- var/cycledelay = 100
- var/harvestable_honey = 0
- var/beezeez = 0
- var/swarming = 0
-
- var/bees_in_hive = 0
- var/list/owned_bee_swarms = list()
- var/hydrotray_type = /obj/machinery/portable_atmospherics/hydroponics
-
-//overwrite this after it's created if the apiary needs a custom machinery sprite
-/obj/machinery/apiary/New()
- ..()
- overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary")
-
-/obj/machinery/apiary/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
- if(istype(Proj ,/obj/item/projectile/energy/floramut))
- mut++
- else if(istype(Proj ,/obj/item/projectile/energy/florayield))
- if(!yieldmod)
- yieldmod += 1
-// to_chat(world, "Yield increased by 1, from 0, to a total of [myseed.yield]")
- else if(prob(1/(yieldmod * yieldmod) *100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
- yieldmod += 1
-// to_chat(world, "Yield increased by 1, to a total of [myseed.yield]")
- else
- ..()
- return
-
-/obj/machinery/apiary/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
- if(istype(O, /obj/item/queen_bee))
- if(health > 0)
- to_chat(user, "\red There is already a queen in there.")
- else
- health = 10
- nutrilevel += 10
- user.drop_item()
- del(O)
- to_chat(user, "\blue You carefully insert the queen into [src], she gets busy making a hive.")
- bees_in_hive = 0
- else if(istype(O, /obj/item/beezeez))
- beezeez += 100
- nutrilevel += 10
- user.drop_item()
- if(health > 0)
- to_chat(user, "\blue You insert [O] into [src]. A relaxed humming appears to pick up.")
- else
- to_chat(user, "\blue You insert [O] into [src]. Now it just needs some bees.")
- del(O)
- else if(istype(O, /obj/item/weapon/minihoe))
- if(health > 0)
- to_chat(user, "\red You begin to dislodge the apiary from the tray, the bees don't like that.")
- angry_swarm(user)
- else
- to_chat(user, "\blue You begin to dislodge the dead apiary from the tray.")
- if(do_after(user, 50, target = src))
- new hydrotray_type(src.loc)
- new /obj/item/apiary(src.loc)
- to_chat(user, "\red You dislodge the apiary from the tray.")
- del(src)
- else if(istype(O, /obj/item/weapon/bee_net))
- var/obj/item/weapon/bee_net/N = O
- if(N.caught_bees > 0)
- to_chat(user, "\blue You empty the bees into the apiary.")
- bees_in_hive += N.caught_bees
- N.caught_bees = 0
- else
- to_chat(user, "\blue There are no more bees in the net.")
- else if(istype(O, /obj/item/weapon/reagent_containers/glass))
- var/obj/item/weapon/reagent_containers/glass/G = O
- if(harvestable_honey > 0)
- if(health > 0)
- to_chat(user, "\red You begin to harvest the honey. The bees don't seem to like it.")
- angry_swarm(user)
- else
- to_chat(user, "\blue You begin to harvest the honey.")
- if(do_after(user,50, target = src))
- G.reagents.add_reagent("honey",harvestable_honey)
- harvestable_honey = 0
- to_chat(user, "\blue You successfully harvest the honey.")
- else
- to_chat(user, "\blue There is no honey left to harvest.")
- else
- angry_swarm(user)
- ..()
-
-/obj/machinery/apiary/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
- if(air_group || (height==0)) return 1
-
- if(istype(mover) && mover.checkpass(PASSTABLE))
- return 1
- else
- return 0
-
-/obj/machinery/apiary/process()
-
- if(swarming > 0)
- swarming -= 1
- if(swarming <= 0)
- for(var/mob/living/simple_animal/bee/B in src.loc)
- bees_in_hive += B.strength
- del(B)
- else if(bees_in_hive < 10)
- for(var/mob/living/simple_animal/bee/B in src.loc)
- bees_in_hive += B.strength
- del(B)
-
- if(world.time > (lastcycle + cycledelay))
- lastcycle = world.time
- if(health < 0)
- return
-
- //magical bee formula
- if(beezeez > 0)
- beezeez -= 1
-
- nutrilevel += 2
- health += 1
- toxic = max(0, toxic - 1)
-
- //handle nutrients
- nutrilevel -= bees_in_hive / 10 + owned_bee_swarms.len / 5
- if(nutrilevel > 0)
- bees_in_hive += 1 * yieldmod
- if(health < maxhealth)
- health++
- else
- //nutrilevel is less than 1, so we're effectively subtracting here
- health += max(nutrilevel - 1, round(-health / 2))
- bees_in_hive += max(nutrilevel - 1, round(-bees_in_hive / 2))
- if(owned_bee_swarms.len)
- var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms)
- B.target_turf = get_turf(src)
-
- //clear out some toxins
- if(toxic > 0)
- toxic -= 1
- health -= 1
-
- if(health <= 0)
- return
-
- //make a bit of honey
- if(harvestable_honey < 50)
- harvestable_honey += 0.5
-
- //make some new bees
- if(bees_in_hive >= 10 && prob(bees_in_hive * 10))
- var/mob/living/simple_animal/bee/B = new(get_turf(src), src)
- owned_bee_swarms.Add(B)
- B.mut = mut
- B.toxic = toxic
- bees_in_hive -= 1
-
- //find some plants, harvest
- for(var/obj/machinery/portable_atmospherics/hydroponics/H in view(7, src))
- if(H.seed && !H.dead && prob(owned_bee_swarms.len * 10))
- src.nutrilevel++
- H.nutrilevel++
- if(mut < H.mutation_mod - 1)
- mut = H.mutation_mod - 1
- else if(mut > H.mutation_mod - 1)
- H.mutation_mod = mut
-
- //flowers give us pollen (nutrients)
-/* - All plants should be giving nutrients to the hive.
- if(H.myseed.type == /obj/item/seeds/harebell || H.myseed.type == /obj/item/seeds/sunflowerseed)
- src.nutrilevel++
- H.nutrilevel++
-*/
- //have a few beneficial effects on nearby plants
- if(prob(10))
- H.lastcycle -= 5
- if(prob(10))
- H.seed.lifespan = max(initial(H.seed.lifespan) * 1.5, H.seed.lifespan + 1)
- if(prob(10))
- H.seed.endurance = max(initial(H.seed.endurance) * 1.5, H.seed.endurance + 1)
- if(H.toxins && prob(10))
- H.toxins = min(0, H.toxins - 1)
- toxic++
-
-/obj/machinery/apiary/proc/die()
- if(owned_bee_swarms.len)
- var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms)
- B.target_turf = get_turf(src)
- B.strength -= 1
- if(B.strength <= 0)
- del(B)
- else if(B.strength <= 5)
- B.icon_state = "bees[B.strength]"
- bees_in_hive = 0
- health = 0
-
-/obj/machinery/apiary/proc/angry_swarm(var/mob/M)
- for(var/mob/living/simple_animal/bee/B in owned_bee_swarms)
- B.feral = 25
- B.target_mob = M
-
- swarming = 25
-
- while(bees_in_hive > 0)
- var/spawn_strength = bees_in_hive
- if(bees_in_hive >= 5)
- spawn_strength = 6
-
- var/mob/living/simple_animal/bee/B = new(get_turf(src), src)
- B.target_mob = M
- B.strength = spawn_strength
- B.feral = 25
- B.mut = mut
- B.toxic = toxic
- bees_in_hive -= spawn_strength
-
-/obj/machinery/apiary/verb/harvest_honeycomb()
- set src in oview(1)
- set name = "Harvest honeycomb"
- set category = "Object"
-
- if(usr.stat || !usr.canmove || usr.restrained())
- return
-
- while(health > 15)
- health -= 15
- var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(src.loc)
- if(toxic > 0)
- H.reagents.add_reagent("toxin", toxic)
-
- to_chat(usr, "\blue You harvest the honeycomb from the hive. There is a wild buzzing!")
- angry_swarm(usr)
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index cfb4a4284a3..ee278bd5f7e 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -43,7 +43,7 @@
loopings += ident_tag
loopings[ident_tag] = 0
break
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
for(var/ident_tag in id_tags)
if((M.id_tag == ident_tag) && !(ident_tag in synced) && !(ident_tag in door_only_tags))
@@ -69,7 +69,7 @@
loopings[ident_tag] = 0
break
if(!(ident_tag in synced))
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if((M.id_tag == ident_tag) && !(ident_tag in synced) && !(ident_tag in door_only_tags))
door_only_tags += ident_tag
@@ -90,7 +90,7 @@
visible_message("Cannot locate any mass driver of that ID. Cancelling firing sequence!")
return
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
@@ -104,7 +104,7 @@
M.drive()
sleep(50)
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
@@ -244,7 +244,7 @@
maxtimes[ident_tag] = min(max(round(maxtimes[ident_tag]), 0), 120)
if(href_list["door"])
var/ident_tag = href_list["driver"]
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
@@ -317,7 +317,7 @@
P.failchance = 0//So it has no fail chance when teleporting.
spawn_marauder.Remove(P.target)
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
@@ -330,7 +330,7 @@
M.drive()
sleep(50)
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index a0f6c9a08ce..f952f8f2bc3 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -109,7 +109,7 @@
D.safe = 1
else
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.id_tag == src.id)
if(M.density)
spawn( 0 )
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 394f29a1ccf..ec49d252616 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -980,7 +980,7 @@ About the new airlock wires panel:
wires = new(src)
if(src.closeOtherId != null)
spawn (5)
- for(var/obj/machinery/door/airlock/A in world)
+ for(var/obj/machinery/door/airlock/A in airlocks)
if(A.closeOtherId == src.closeOtherId && A != src)
src.closeOther = A
break
diff --git a/code/game/machinery/drying_rack.dm b/code/game/machinery/drying_rack.dm
deleted file mode 100644
index 9ec3974483f..00000000000
--- a/code/game/machinery/drying_rack.dm
+++ /dev/null
@@ -1,105 +0,0 @@
-/obj/machinery/drying_rack
- name = "drying rack"
- desc = "A large rack with a heater built into the base. Used for drying things out."
- icon = 'icons/obj/hydroponics.dmi'
- icon_state = "drying_rack"
- layer = 2.9
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 5
- active_power_usage = 50
- var/list/accepted = list()
- var/running = 0
- var/volume = 100
-
-/obj/machinery/drying_rack/New()
- ..()
- flags |= NOREACT
- create_reagents(volume)
- accepted = list(/obj/item/weapon/reagent_containers/food/snacks/grown/coffee_arabica,
- /obj/item/weapon/reagent_containers/food/snacks/grown/coffee_robusta,
- /obj/item/weapon/reagent_containers/food/snacks/grown/tobacco,
- /obj/item/weapon/reagent_containers/food/snacks/grown/tobacco_space,
- /obj/item/weapon/reagent_containers/food/snacks/grown/tea_aspera,
- /obj/item/weapon/reagent_containers/food/snacks/grown/tea_astra,
- /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
- /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus,
- /obj/item/weapon/reagent_containers/food/snacks/meat,
- /obj/item/weapon/reagent_containers/food/snacks/grown/grapes,
- /obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes)
-
-
-
-/obj/machinery/drying_rack/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
- if(is_type_in_list(W,accepted))
- if(!running)
- if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meat))
- user.unEquip(W)
- del(W)
- to_chat(user, "You add the meat to the drying rack.")
- src.running = 1
- use_power = 2
- icon_state = "drying_rack_on"
- sleep(60)
- icon_state = "drying_rack"
- new /obj/item/weapon/reagent_containers/food/snacks/sosjerky(src.loc)
- use_power = 1
- src.running = 0
- return
- if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/grapes))
- user.unEquip(W)
- del(W)
- to_chat(user, "You add the grapes to the drying rack.")
- src.running = 1
- use_power = 2
- icon_state = "drying_rack_on"
- sleep(60)
- icon_state = "drying_rack"
- new /obj/item/weapon/reagent_containers/food/snacks/no_raisin(src.loc)
- use_power = 1
- src.running = 0
- return
- if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes))
- user.unEquip(W)
- del(W)
- to_chat(user, "You add the green grapes to the drying rack.")
- src.running = 1
- use_power = 2
- icon_state = "drying_rack_on"
- sleep(60)
- icon_state = "drying_rack"
- new /obj/item/weapon/reagent_containers/food/snacks/no_raisin(src.loc)
- use_power = 1
- src.running = 0
- return
- else
- if(W:dry == 0)
- var/J = W.type
- var/obj/item/weapon/reagent_containers/food/snacks/grown/B = W
- B.reagents.trans_to(src, B.reagents.total_volume)
- to_chat(user, "You add the [W] to the drying rack.")
- user.unEquip(W)
- del(W)
- src.running = 1
- use_power = 2
- icon_state = "drying_rack_on"
- sleep(60)
- icon_state = "drying_rack"
- var/obj/item/weapon/reagent_containers/food/snacks/grown/D = new J(src.loc)
- to_chat(user, "\blue You finish drying the [D]")
- D.icon_state = "[D.icon_state]_dry"
- D.dry = 1
- D.reagents.remove_any(50)
- src.reagents.trans_to(D, src.reagents.total_volume)
- use_power = 1
- src.running = 0
- return
- else
- to_chat(user, "\red That has already been dried!")
- else
- to_chat(user, "\red Please wait until the last item has dried.")
- else
- to_chat(user, "\red You cannot add that to the drying rack.")
-
-
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index 53977708650..cee7706d256 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -19,6 +19,12 @@
src.cell = new(src)
..()
+/obj/machinery/floodlight/Destroy()
+ if(cell)
+ qdel(cell)
+ cell = null
+ return ..()
+
/obj/machinery/floodlight/proc/updateicon()
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
@@ -31,7 +37,7 @@
set_light(0)
src.visible_message("[src] shuts down due to lack of power!")
return
-
+
/obj/machinery/floodlight/attack_ai(mob/user as mob)
return
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index ce5ca3ce85d..68c4ab10a34 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -19,6 +19,12 @@
update_icon()
return
+/obj/machinery/space_heater/Destroy()
+ if(cell)
+ qdel(cell)
+ cell = null
+ return ..()
+
/obj/machinery/space_heater/update_icon()
overlays.Cut()
icon_state = "sheater[on]"
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index 0bb3975d1e6..a4e481f430b 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -61,36 +61,12 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(long_range_link == 0 && machine.long_range_link == 0)
continue
// If we're sending a copy, be sure to create the copy for EACH machine and paste the data
- var/datum/signal/copy = new
+ var/datum/signal/copy
if(copysig)
-
+ copy = new
copy.transmission_method = 2
copy.frequency = signal.frequency
- // Copy the main data contents! Workaround for some nasty bug where the actual array memory is copied and not its contents.
- copy.data = list(
-
- "mob" = signal.data["mob"],
- "mobtype" = signal.data["mobtype"],
- "realname" = signal.data["realname"],
- "name" = signal.data["name"],
- "job" = signal.data["job"],
- "key" = signal.data["key"],
- "vmessage" = signal.data["vmessage"],
- "vname" = signal.data["vname"],
- "vmask" = signal.data["vmask"],
- "compression" = signal.data["compression"],
- "message" = signal.data["message"],
- "connection" = signal.data["connection"],
- "radio" = signal.data["radio"],
- "slow" = signal.data["slow"],
- "traffic" = signal.data["traffic"],
- "type" = signal.data["type"],
- "server" = signal.data["server"],
- "reject" = signal.data["reject"],
- "level" = signal.data["level"],
- "verb" = signal.data["verb"],
- "language" = signal.data["language"]
- )
+ copy.data = signal.data.Copy()
// Keep the "original" signal constant
if(!signal.data["original"])
@@ -98,15 +74,11 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
else
copy.data["original"] = signal.data["original"]
- else
- qdel(copy)
-
-
send_count++
if(machine.is_freq_listening(signal))
machine.traffic++
- if(copysig && copy)
+ if(copysig)
machine.receive_information(copy, src)
else
machine.receive_information(signal, src)
diff --git a/code/game/objects/effects/biomass_rift.dm b/code/game/objects/effects/biomass_rift.dm
deleted file mode 100644
index 5b4cf9970a5..00000000000
--- a/code/game/objects/effects/biomass_rift.dm
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-/obj/effect/biomass
- icon = 'icons/obj/biomass.dmi'
- icon_state = "stage1"
- opacity = 0
- density = 0
- anchored = 1
- layer = 20 //DEBUG
- plane = HUD_PLANE //DEBUG
- var/health = 10
- var/stage = 1
- var/obj/effect/rift/originalRift = null //the originating rift of that biomass
- var/maxDistance = 15 //the maximum length of a thread
- var/newSpreadDistance = 10 //the length of a thread at which new ones are created
- var/curDistance = 1 //the current length of a thread
- var/continueChance = 3 //weighed chance of continuing in the same direction. turning left or right has 1 weight both
- var/spreadDelay = 1 //will change to something bigger later, but right now I want it to spread as fast as possible for testing
-
-/obj/effect/rift
- icon = 'icons/obj/biomass.dmi'
- icon_state = "rift"
- var/list/obj/effect/biomass/linkedBiomass = list() //all the biomass patches that have spread from it
- var/newicon = 1 //DEBUG
-
-/obj/effect/rift/New()
- set background = 1
-
- ..()
-
- for(var/turf/T in orange(1,src))
- if(!IsValidBiomassLoc(T))
- continue
- var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
- starting.dir = get_dir(src,starting)
- starting.originalRift = src
- linkedBiomass += starting
- spawn(1) //DEBUG
- starting.icon_state = "[newicon]"
-
-/obj/effect/rift/Del()
- for(var/obj/effect/biomass/biomass in linkedBiomass)
- del(biomass)
- ..()
-
-/obj/effect/biomass/New()
- set background = 1
-
- ..()
- if(!IsValidBiomassLoc(loc,src))
- del(src)
- return
- spawn(1) //so that the dir and stuff can be set by the source first
- if(curDistance >= maxDistance)
- return
- switch(dir)
- if(NORTHWEST)
- dir = NORTH
- if(NORTHEAST)
- dir = EAST
- if(SOUTHWEST)
- dir = WEST
- if(SOUTHEAST)
- dir = SOUTH
- sleep(spreadDelay)
- Spread()
-
-/obj/effect/biomass/proc/Spread(var/direction = dir)
- set background = 1
- var/possibleDirsInt = 0
-
- for(var/newDirection in cardinal)
- if(newDirection == turn(direction,180)) //can't go backwards
- continue
- var/turf/T = get_step(loc,newDirection)
- if(!IsValidBiomassLoc(T,src))
- continue
- possibleDirsInt |= newDirection
-
- var/list/possibleDirs = list()
-
- if(possibleDirsInt & direction)
- for(var/i=0 , i 0)
return
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index aed9270bf57..e6ce8dc2e73 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -152,8 +152,6 @@ var/list/admin_verbs_debug = list(
/client/proc/toggledebuglogs,
/client/proc/qdel_toggle,
/client/proc/gc_dump_hdl,
- /client/proc/gc_toggle_profiling,
- /client/proc/gc_show_del_report,
/client/proc/debugNatureMapGenerator,
/client/proc/check_bomb_impacts,
/client/proc/test_movable_UI,
diff --git a/code/modules/admin/buildmode.dm b/code/modules/admin/buildmode.dm
index db97d7eb5ec..ed48b2dc6d0 100644
--- a/code/modules/admin/buildmode.dm
+++ b/code/modules/admin/buildmode.dm
@@ -613,7 +613,7 @@
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
L2.color = L.color
link_lines += L2
- for(var/obj/machinery/door/poddoor/P in world)
+ for(var/obj/machinery/door/poddoor/P in airlocks)
if(P.id_tag == M.id)
var/obj/effect/buildmode_line/L = new(holder, M, P, "[M.name] to [P.name]")
L.color = M.normaldoorcontrol ? "#993333" : "#339933"
diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm
index 3849317b03e..7ee714090cc 100644
--- a/code/modules/admin/holder2.dm
+++ b/code/modules/admin/holder2.dm
@@ -24,6 +24,10 @@ var/list/admin_datums = list()
rights = initial_rights
admin_datums[ckey] = src
+/datum/admins/Destroy()
+ ..()
+ return QDEL_HINT_HARDDEL_NOW
+
/datum/admins/proc/associate(client/C)
if(istype(C))
owner = C
@@ -85,7 +89,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
admin_datums -= ckey
if(holder)
holder.disassociate()
- del(holder)
+ qdel(holder)
return 1
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 3a54a20ab0f..d98f2664583 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2562,7 +2562,7 @@
if("eagles")//SCRAW
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
- for(var/obj/machinery/door/airlock/W in world)
+ for(var/obj/machinery/door/airlock/W in airlocks)
if(is_station_level(W.z) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
@@ -2755,12 +2755,12 @@
dat += "No-one has done anything this round!"
usr << browse(dat, "window=admin_log")
if("maint_access_brig")
- for(var/obj/machinery/door/airlock/maintenance/M in world)
+ for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
if(access_maint_tunnels in M.req_access)
M.req_access = list(access_brig)
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
if("maint_access_engiebrig")
- for(var/obj/machinery/door/airlock/maintenance/M in world)
+ for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
if(access_maint_tunnels in M.req_access)
M.req_access = list()
M.req_one_access = list(access_brig,access_engine)
diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index 27048b441dd..e07bda7c8ee 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -89,7 +89,7 @@
if("delete")
for(var/datum/d in objs)
- del(d)
+ qdel(d)
if("select")
var/text = ""
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index baf9afbbb9d..b791a6b0641 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -736,7 +736,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
var/obj/item/weapon/storage/backpack/backpack = new(M)
for(var/obj/item/I in backpack)
- del(I)
+ qdel(I)
M.equip_to_slot_or_del(backpack, slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/mop(M), slot_r_hand)
var/obj/item/weapon/reagent_containers/glass/bucket/bucket = new(M)
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 5506b3b9076..8da22a71b62 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -146,40 +146,16 @@ client/proc/one_click_antag()
return 0
/datum/admins/proc/makeWizard()
- var/list/mob/candidates = list()
- var/mob/theghost = null
- var/time_passed = world.time
- for(var/mob/G in respawnable_list)
- if(istype(G) && G.client && (ROLE_WIZARD in G.client.prefs.be_special))
- if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
- if(player_old_enough_antag(G.client,ROLE_WIZARD))
- spawn(0)
- switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
- if("Yes")
- if((world.time-time_passed)>300)//If more than 30 game seconds passed.
- return
- candidates += G
- if("No")
- return
- else
- return
-
- sleep(300)
+ var/list/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard")
if(candidates.len)
- candidates = shuffle(candidates)
- for(var/mob/dead/observer/i in candidates)
- if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard
+ var/mob/dead/observer/selected = pick(candidates)
+ candidates -= selected
- theghost = i
- break
-
- if(theghost)
- var/mob/living/carbon/human/new_character=makeBody(theghost)
+ var/mob/living/carbon/human/new_character = makeBody(selected)
new_character.mind.make_Wizard()
return 1
-
return 0
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index 0d56f0d1122..7a87264d815 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -57,7 +57,6 @@
if( findtext(href,"