diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm
index 5635cd7b3e7..6b675d78400 100644
--- a/code/_globalvars/lists/mobs.dm
+++ b/code/_globalvars/lists/mobs.dm
@@ -64,12 +64,16 @@ GLOBAL_LIST_EMPTY(emote_list)
. = list()
for(var/path in subtypesof(/datum/emote))
var/datum/emote/E = new path()
- if(!.[E.key])
- .[E.key] = list(E)
- else
- .[E.key] += E
-
- if(!.[E.key_third_person])
- .[E.key_third_person] = list(E)
- else
- .[E.key_third_person] |= E
+ if(E.key)
+ if(!.[E.key])
+ .[E.key] = list(E)
+ else
+ .[E.key] += E
+ else if(E.message) //Assuming all non-base emotes have this
+ stack_trace("Keyless emote: [E.type]")
+
+ if(E.key_third_person) //This one is optional
+ if(!.[E.key_third_person])
+ .[E.key_third_person] = list(E)
+ else
+ .[E.key_third_person] |= E
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index e4ccba2341e..fc1b6380f26 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -39,7 +39,7 @@
get_cameras()
for(var/cam_tag in bugged_cameras)
var/obj/machinery/camera/camera = bugged_cameras[cam_tag]
- if(camera.bug == src)
+ if(camera && camera.bug == src)
camera.bug = null
bugged_cameras = list()
if(tracking)
@@ -95,6 +95,8 @@
html = "
Select a camera:
\[Cancel camera view\]
"
for(var/entry in cameras)
var/obj/machinery/camera/C = cameras[entry]
+ if(QDELETED(C))
+ continue
var/functions = ""
if(C.bug == src)
functions = " - \[Monitor\] \[Disable\]"
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 3eb8e809202..74cc37dc5ac 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -303,9 +303,9 @@
if(close_valve)
valve_open = FALSE
update_icon()
- investigate_log("Valve was closed by [key_name(user)].
", INVESTIGATE_ATMOS)
+ investigate_log("Valve was closed by [key_name(user)].", INVESTIGATE_ATMOS)
else if(valve_open && holding)
- investigate_log("[key_name(user)] started a transfer into [holding].
", INVESTIGATE_ATMOS)
+ investigate_log("[key_name(user)] started a transfer into [holding].", INVESTIGATE_ATMOS)
/obj/machinery/portable_atmospherics/canister/process_atmos()
..()
diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
index 3df41bcf501..17942b65634 100644
--- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
+++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
@@ -124,13 +124,13 @@
if(!user.transferItemToLoc(T, src))
return
to_chat(user, "[holding ? "In one smooth motion you pop [holding] out of [src]'s connector and replace it with [T]" : "You insert [T] into [src]"].")
- investigate_log("had its internal [holding] swapped with [T] by [key_name(user)].
", INVESTIGATE_ATMOS)
+ investigate_log("had its internal [holding] swapped with [T] by [key_name(user)].", INVESTIGATE_ATMOS)
replace_tank(user, FALSE, T)
update_icon()
else if(W.tool_behaviour == TOOL_WRENCH)
if(!(machine_stat & BROKEN))
if(connected_port)
- investigate_log("was disconnected from [connected_port] by [key_name(user)].
", INVESTIGATE_ATMOS)
+ investigate_log("was disconnected from [connected_port] by [key_name(user)].", INVESTIGATE_ATMOS)
disconnect()
W.play_tool_sound(src)
user.visible_message( \
@@ -153,7 +153,7 @@
"You fasten [src] to the port.", \
"You hear a ratchet.")
update_icon()
- investigate_log("was connected to [possible_port] by [key_name(user)].
", INVESTIGATE_ATMOS)
+ investigate_log("was connected to [possible_port] by [key_name(user)].", INVESTIGATE_ATMOS)
else
return ..()
diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm
index 4eb2579c3fa..062a1199147 100644
--- a/code/modules/atmospherics/machinery/portable/pump.dm
+++ b/code/modules/atmospherics/machinery/portable/pump.dm
@@ -80,7 +80,7 @@
on = FALSE
update_icon()
else if(on && holding && direction == PUMP_OUT)
- investigate_log("[key_name(user)] started a transfer into [holding].
", INVESTIGATE_ATMOS)
+ investigate_log("[key_name(user)] started a transfer into [holding].", INVESTIGATE_ATMOS)
/obj/machinery/portable_atmospherics/pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
@@ -122,14 +122,14 @@
message_admins("[ADMIN_LOOKUPFLW(usr)] turned on a pump that contains [n2o ? "N2O" : ""][n2o && plasma ? " & " : ""][plasma ? "Plasma" : ""] at [ADMIN_VERBOSEJMP(src)]")
log_admin("[key_name(usr)] turned on a pump that contains [n2o ? "N2O" : ""][n2o && plasma ? " & " : ""][plasma ? "Plasma" : ""] at [AREACOORD(src)]")
else if(on && direction == PUMP_OUT)
- investigate_log("[key_name(usr)] started a transfer into [holding].
", INVESTIGATE_ATMOS)
+ investigate_log("[key_name(usr)] started a transfer into [holding].", INVESTIGATE_ATMOS)
. = TRUE
if("direction")
if(direction == PUMP_OUT)
direction = PUMP_IN
else
if(on && holding)
- investigate_log("[key_name(usr)] started a transfer into [holding].
", INVESTIGATE_ATMOS)
+ investigate_log("[key_name(usr)] started a transfer into [holding].", INVESTIGATE_ATMOS)
direction = PUMP_OUT
. = TRUE
if("pressure")
diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm
index 5f7fb1e083c..b1c613a4614 100644
--- a/code/modules/atmospherics/machinery/portable/scrubber.dm
+++ b/code/modules/atmospherics/machinery/portable/scrubber.dm
@@ -109,7 +109,7 @@
on = FALSE
update_icon()
else if(on && holding)
- investigate_log("[key_name(user)] started a transfer into [holding].
", INVESTIGATE_ATMOS)
+ investigate_log("[key_name(user)] started a transfer into [holding].", INVESTIGATE_ATMOS)
/obj/machinery/portable_atmospherics/scrubber/ui_act(action, params)
if(..())
diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm
index 4e6ed4ef28f..ae654cbac44 100644
--- a/code/modules/clothing/shoes/bananashoes.dm
+++ b/code/modules/clothing/shoes/bananashoes.dm
@@ -21,8 +21,9 @@
/obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action()
. = ..()
+ var/mob/wearer = loc
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
- if(on)
+ if(on && istype(wearer))
if(bananium.get_material_amount(/datum/material/bananium) < 100)
on = !on
if(!always_noslip)
@@ -30,7 +31,7 @@
update_icon()
to_chat(loc, "You ran out of bananium!")
else
- new /obj/item/grown/bananapeel/specialpeel(get_step(src,turn(usr.dir, 180))) //honk
+ new /obj/item/grown/bananapeel/specialpeel(get_step(src,turn(wearer.dir, 180))) //honk
bananium.use_amount_mat(100, /datum/material/bananium)
/obj/item/clothing/shoes/clown_shoes/banana_shoes/attack_self(mob/user)
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 609e9f1206d..c0bb4c11034 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -396,7 +396,7 @@
update()
/obj/machinery/light/proc/broken_sparks(start_only=FALSE)
- if(status == LIGHT_BROKEN && has_power())
+ if(!QDELETED(src) && status == LIGHT_BROKEN && has_power())
if(!start_only)
do_sparks(3, TRUE, src)
var/delay = rand(BROKEN_SPARKS_MIN, BROKEN_SPARKS_MAX)
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index f65bbde74ad..9e82f65c96d 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -930,7 +930,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//Then we finish it all up
//This gotdamn variable is a boomer and keeps giving me problems
var/turf/T = get_turf(target)
- var/pressure = T.return_air().return_pressure()
+ var/pressure = max(1,T.return_air().return_pressure())
//We get our range with the strength of the zap and the pressure, the lower the former and the higher the latter the better
var/new_range = CLAMP(zap_str / pressure * 10, 2, 7)
if(prob(5))
diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm
index d238b9fcfd5..099d6db4f50 100644
--- a/code/modules/projectiles/guns/misc/beam_rifle.dm
+++ b/code/modules/projectiles/guns/misc/beam_rifle.dm
@@ -180,7 +180,8 @@
/obj/item/gun/energy/beam_rifle/proc/aiming_beam(force_update = FALSE)
var/diff = abs(aiming_lastangle - lastangle)
- check_user()
+ if(!check_user())
+ return
if(diff < AIMING_BEAM_ANGLE_CHANGE_THRESHOLD && !force_update)
return
aiming_lastangle = lastangle
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 721e02653b0..3638ddb4d8c 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -897,7 +897,8 @@
var/obj/effect/decal/cleanable/greenglow/GG = locate() in T.contents
if(!GG)
GG = new/obj/effect/decal/cleanable/greenglow(T)
- GG.reagents.add_reagent(type, reac_volume)
+ if(!QDELETED(GG))
+ GG.reagents.add_reagent(type, reac_volume)
/datum/reagent/uranium/radium
name = "Radium"