diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm
index 36c7d70f3c..430b7e07b0 100644
--- a/code/datums/diseases/transformation.dm
+++ b/code/datums/diseases/transformation.dm
@@ -32,16 +32,16 @@
..()
switch(stage)
if(1)
- if (prob(stage_prob) && stage1)
+ if (prob(stage_prob) && length(stage1))
to_chat(affected_mob, pick(stage1))
if(2)
- if (prob(stage_prob) && stage2)
+ if (prob(stage_prob) && length(stage2))
to_chat(affected_mob, pick(stage2))
if(3)
- if (prob(stage_prob*2) && stage3)
+ if (prob(stage_prob*2) && length(stage3))
to_chat(affected_mob, pick(stage3))
if(4)
- if (prob(stage_prob*2) && stage4)
+ if (prob(stage_prob*2) && length(stage4))
to_chat(affected_mob, pick(stage4))
if(5)
do_disease_transformation(affected_mob)
@@ -162,7 +162,7 @@
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = 0
- stage1 = list()
+ stage1 = null
stage2 = list("Your joints feel stiff.", "Beep...boop..")
stage3 = list("Your joints feel very stiff.", "Your skin feels loose.", "You can feel something move...inside.")
stage4 = list("Your skin feels very loose.", "You can feel... something...inside you.")
@@ -195,7 +195,7 @@
desc = "This disease changes the victim into a xenomorph."
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = 0
- stage1 = list()
+ stage1 = null
stage2 = list("Your throat feels scratchy.", "Kill...")
stage3 = list("Your throat feels very scratchy.", "Your skin feels tight.", "You can feel something move...inside.")
stage4 = list("Your skin feels very tight.", "Your blood boils!", "You can feel... something...inside you.")
diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm
index f6ac0e26af..23fd75f982 100644
--- a/code/datums/traits/good.dm
+++ b/code/datums/traits/good.dm
@@ -108,10 +108,10 @@
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/choice_beacon/music/B = new(get_turf(H))
H.put_in_hands(B)
- H.equip_to_slot(B, SLOT_IN_BACKPACK)
+ H.equip_to_slot_if_possible(B, SLOT_IN_BACKPACK)
var/obj/item/musicaltuner/musicaltuner = new(get_turf(H))
H.put_in_hands(musicaltuner)
- H.equip_to_slot(musicaltuner, SLOT_IN_BACKPACK)
+ H.equip_to_slot_if_possible(musicaltuner, SLOT_IN_BACKPACK)
H.regenerate_icons()
/datum/quirk/photographer
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index f707c02ce9..5f2795c857 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -219,8 +219,9 @@
O = new R.result_type(usr.drop_location())
if(O)
O.setDir(usr.dir)
+ log_craft("[O] crafted by [usr] at [loc_name(O.loc)]")
+
use(R.req_amount * multiplier)
- log_craft("[O] crafted by [usr] at [loc_name(O.loc)]")
if(R.applies_mats && custom_materials && custom_materials.len)
var/list/used_materials = list()
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index d26a6efb02..268e8e9109 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -70,7 +70,8 @@
/turf/closed/wall/proc/break_wall()
new sheet_type(src, sheet_amount)
- return new girder_type(src)
+ if(girder_type)
+ return new girder_type(src)
/turf/closed/wall/proc/devastate_wall()
new sheet_type(src, sheet_amount)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index b428f49578..fc2817f134 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -397,7 +397,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(I.flags_inv & HIDEFACIALHAIR)
facialhair_hidden = TRUE
- if(H.wear_mask)
+ if(H.wear_mask && istype(H.wear_mask))
var/obj/item/clothing/mask/M = H.wear_mask
dynamic_fhair_suffix = M.dynamic_fhair_suffix //mask > head in terms of facial hair
if(M.flags_inv & HIDEFACIALHAIR)
@@ -451,7 +451,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(I.flags_inv & HIDEHAIR)
hair_hidden = TRUE
- if(H.wear_mask)
+ if(H.wear_mask && istype(H.wear_mask))
var/obj/item/clothing/mask/M = H.wear_mask
if(!dynamic_hair_suffix) //head > mask in terms of head hair
dynamic_hair_suffix = M.dynamic_hair_suffix
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index 4bf8aa5e23..485cece8b7 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -445,7 +445,7 @@
sleep(3)
step_to(src,movement_target,1)
- if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
+ if(movement_target?.loc) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
if (movement_target.loc.x < src.x)
setDir(WEST)
else if (movement_target.loc.x > src.x)
diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm
index a915d12838..6b93995e62 100644
--- a/code/modules/surgery/organs/eyes.dm
+++ b/code/modules/surgery/organs/eyes.dm
@@ -319,6 +319,8 @@
on_mob.forceMove(scanning)
for(var/i in 1 to light_beam_distance)
scanning = get_step(scanning, scandir)
+ if(!scanning)
+ break
if(scanning.opacity || scanning.has_opaque_atom)
stop = TRUE
var/obj/effect/abstract/eye_lighting/L = LAZYACCESS(eye_lighting, i)