diff --git a/code/__HELPERS/colors.dm b/code/__HELPERS/colors.dm index 1c4cbbd9704c..a58721a6603b 100644 --- a/code/__HELPERS/colors.dm +++ b/code/__HELPERS/colors.dm @@ -84,6 +84,10 @@ /// But paired down and modified to work for our color range /// Accepts the color cutoffs as two 3 length list(0-100,...) arguments /proc/blend_cutoff_colors(list/first_color, list/second_color) + // These runtimes usually mean that either the eye or the glasses have an incorrect color_cutoffs + ASSERT(first_color?.len == 3, "First color must be a 3 length list, received [json_encode(first_color)]") + ASSERT(second_color?.len == 3, "Second color must be a 3 length list, received [json_encode(second_color)]") + var/list/output = new /list(3) // Invert the colors, multiply to "darken" (actually lights), then uninvert to get back to what we want diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 2185dd19fde4..f3ddf19bbe64 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -51,7 +51,7 @@ if(MODE_TRAY) //undoes the last mode, meson vision_flags = NONE - color_cutoffs = list() + color_cutoffs = null change_glass_color(user, /datum/client_colour/glass_colour/lightblue) if(MODE_PIPE_CONNECTABLE) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index fde4d21ea444..811d08fcec5e 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -197,7 +197,7 @@ GLOBAL_LIST_INIT(chem_master_containers, list( /// Insert new beaker and/or eject the inserted one /obj/machinery/chem_master/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker) - if(!user?.transferItemToLoc(new_beaker, src)) + if(new_beaker && user && !user.transferItemToLoc(new_beaker, src)) return FALSE if(beaker) try_put_in_hand(beaker, user) diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 6e196b52af5e..aaadb308076d 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -228,7 +228,7 @@ color_cutoffs = high_light_cutoff.Copy() light_level = NIGHTVISION_LIGHT_HIG else - color_cutoffs = list() + color_cutoffs = null light_level = NIGHTVISION_LIGHT_OFF owner.update_sight() diff --git a/monkestation/code/game/machinery/cloning.dm b/monkestation/code/game/machinery/cloning.dm index d194835204ed..5e94c995db4f 100644 --- a/monkestation/code/game/machinery/cloning.dm +++ b/monkestation/code/game/machinery/cloning.dm @@ -383,11 +383,9 @@ icon_state = "pod_0" return - if(!mob_occupant) + if(QDELETED(mob_occupant) || !exp_clone_check(mob_occupant)) return - - exp_clone_check(mob_occupant) - + current_insurance = null REMOVE_TRAIT(mob_occupant, TRAIT_STABLEHEART, CLONING_POD_TRAIT) REMOVE_TRAIT(mob_occupant, TRAIT_STABLELIVER, CLONING_POD_TRAIT) @@ -415,9 +413,9 @@ unattached_flesh.Cut() occupant = null - + /obj/machinery/clonepod/proc/exp_clone_check(mob_occupant) - return + return TRUE /obj/machinery/clonepod/proc/malfunction() var/mob/living/mob_occupant = occupant diff --git a/monkestation/code/game/machinery/exp_cloner.dm b/monkestation/code/game/machinery/exp_cloner.dm index f16bb07afbbc..6d522ee9cfcd 100644 --- a/monkestation/code/game/machinery/exp_cloner.dm +++ b/monkestation/code/game/machinery/exp_cloner.dm @@ -84,6 +84,8 @@ /obj/machinery/clonepod/experimental/exp_clone_check(mob/living/carbon/human/mob_occupant) if(!mob_occupant?.mind) //When experimental cloner fails to get a ghost, it won't spit out a body, so we don't get an army of brainless rejects. qdel(mob_occupant) + return FALSE + return TRUE /obj/machinery/clonepod/experimental/proc/get_clone_preview(datum/dna/clone_dna) RETURN_TYPE(/image) diff --git a/monkestation/code/modules/blueshift/machines/ore_silo.dm b/monkestation/code/modules/blueshift/machines/ore_silo.dm index 9763c8826307..490c89ce06a6 100644 --- a/monkestation/code/modules/blueshift/machines/ore_silo.dm +++ b/monkestation/code/modules/blueshift/machines/ore_silo.dm @@ -7,10 +7,13 @@ /// What this packs into var/packed_type = /obj/item/flatpacked_machine/ore_silo +/obj/machinery/ore_silo/colony_lathe/Initialize(mapload) + . = ..() + AddElement(/datum/element/repackable, packed_type, 10 SECONDS) + /obj/machinery/ore_silo/colony_lathe/silo_log(obj/machinery/machinery_in_question, action, amount, noun, list/mats) . = ..() playsound(src, 'sound/machines/beep.ogg', 30, TRUE) - AddElement(/datum/element/repackable, packed_type, 10 SECONDS) /obj/machinery/ore_silo/colony_lathe/default_deconstruction_crowbar() return