diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index b74f24c469..0d4a6a7b3f 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -201,13 +201,12 @@ medical_record_text = "Patient's blood tests report an abnormal concentration of red blood cells in their bloodstream." /datum/quirk/bloodpressure/add() - var/mob/living/M = quirk_holder - M.blood_ratio = 1.2 - M.blood_volume += 150 + quirk_holder.blood_ratio = 1.2 + quirk_holder.blood_volume += 150 /datum/quirk/bloodpressure/remove() - var/mob/living/M = quirk_holder - M.blood_ratio = 1 + if(quirk_holder) + quirk_holder.blood_ratio = 1 /datum/quirk/night_vision name = "Night Vision" diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 91306585b8..c6b4f2fcf5 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -406,12 +406,11 @@ lying_prev = 0 /obj/machinery/jukebox/proc/dance_over() - SSjukeboxes.removejukebox(SSjukeboxes.findjukeboxindex(src)) + var/position = SSjukeboxes.findjukeboxindex(src) + if(!position) + return + SSjukeboxes.removejukebox(position) STOP_PROCESSING(SSobj, src) - for(var/mob/living/L in rangers) - if(!L || !L.client) - continue - L.stop_sound_channel(CHANNEL_JUKEBOX) rangers = list() /obj/machinery/jukebox/disco/dance_over() diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 271ae72d47..f35e9e7d55 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -205,6 +205,9 @@ if(!mineral) if(istype(G, /obj/item/stack/sheet/mineral) && G.sheettype) var/M = G.sheettype + var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]") + if(!mineralassembly) + return if(G.get_amount() >= 2) playsound(src, 'sound/items/crowbar.ogg', 100, 1) user.visible_message("[user] adds [G.name] to the airlock assembly.", \ @@ -214,7 +217,6 @@ return to_chat(user, "You install [M] plating into the airlock assembly.") G.use(2) - var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]") var/obj/structure/door_assembly/MA = new mineralassembly(loc) transfer_assembly_vars(src, MA, TRUE) else diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 94619e1858..7c373f2734 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -166,6 +166,9 @@ if(S.sheettype && S.sheettype != "runed") var/M = S.sheettype if(state == GIRDER_DISPLACED) + var/F = text2path("/obj/structure/falsewall/[M]") + if(!F) + return if(S.get_amount() < 2) to_chat(user, "You need at least two sheets to create a false wall!") return @@ -174,11 +177,13 @@ return S.use(2) to_chat(user, "You create a false wall. Push on it to open or close the passage.") - var/F = text2path("/obj/structure/falsewall/[M]") var/obj/structure/FW = new F (loc) transfer_fingerprints_to(FW) qdel(src) else + var/F = text2path("/turf/closed/wall/mineral/[M]") + if(!F) + return if(S.get_amount() < 2) to_chat(user, "You need at least two sheets to add plating!") return @@ -189,7 +194,7 @@ S.use(2) to_chat(user, "You add the plating.") var/turf/T = get_turf(src) - T.PlaceOnTop(text2path("/turf/closed/wall/mineral/[M]")) + T.PlaceOnTop(F) transfer_fingerprints_to(T) qdel(src) return diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index 5a7710fe29..4a7399f287 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -54,7 +54,7 @@ ..() /datum/species/plasmaman/before_equip_job(datum/job/J, mob/living/carbon/human/H, visualsOnly = FALSE) - var/current_job = J.title + var/current_job = J?.title var/datum/outfit/plasmaman/O = new /datum/outfit/plasmaman switch(current_job) if("Chaplain") diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 9c877fc053..b779ad5d44 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -148,8 +148,8 @@ /obj/machinery/chem_master/on_deconstruction() var/atom/A = drop_location() - beaker.forceMove(A) - bottle.forceMove(A) + beaker?.forceMove(A) + bottle?.forceMove(A) return ..() /obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ diff --git a/code/modules/reagents/chemistry/recipes/special.dm b/code/modules/reagents/chemistry/recipes/special.dm index 5ad9728b22..cc63a8c692 100644 --- a/code/modules/reagents/chemistry/recipes/special.dm +++ b/code/modules/reagents/chemistry/recipes/special.dm @@ -186,6 +186,7 @@ GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related var/datum/chemical_reaction/recipe = get_chemical_reaction(recipe_id) if(!recipe) info = "This recipe is illegible." + return var/list/dat = list("