From ec3a68dc7a4ff3bb060529be13df5492bd3e6c6e Mon Sep 17 00:00:00 2001 From: Archie Date: Tue, 19 Jan 2021 18:09:23 -0300 Subject: [PATCH] Runtime man bad --- code/game/machinery/doors/airlock_types.dm | 2 +- code/game/objects/items/miscellaneous.dm | 2 +- code/game/turfs/simulated/lava.dm | 2 +- code/modules/flufftext/Hallucination.dm | 4 ++-- .../integrated_electronics/subtypes/manipulation.dm | 2 +- code/modules/mob/mob_helpers.dm | 4 ++-- code/modules/mob/mob_transformation_simple.dm | 2 +- .../modular_computers/computers/item/processor.dm | 4 ++-- code/modules/projectiles/projectile.dm | 4 ++-- code/modules/research/machinery/_production.dm | 5 +++-- code/modules/shuttle/special.dm | 2 +- code/modules/surgery/organs/eyes.dm | 6 +++--- code/modules/surgery/organs/organ_internal.dm | 2 +- modular_citadel/code/datums/traits/neutral.dm | 11 +++++------ 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index 3525742c..3968e3ef 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -500,7 +500,7 @@ SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50)) flash_color(L, flash_color="#960000", flash_time=20) L.Knockdown(40) - L.throw_at(throwtarget, 5, 1,src) + L.throw_at(throwtarget, 5, 1) return 0 /obj/machinery/door/airlock/cult/proc/conceal() diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm index 8983485c..d3047c03 100644 --- a/code/game/objects/items/miscellaneous.dm +++ b/code/game/objects/items/miscellaneous.dm @@ -47,7 +47,7 @@ if(istype(H.ears, /obj/item/radio/headset)) msg = "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows: Item request received. Your package is inbound, please stand back from the landing site. Message ends.\"" to_chat(M, msg) - new /obj/effect/DPtarget(get_turf(src), pod) + new /obj/effect/abstract/DPtarget(get_turf(src), pod) /obj/item/caution desc = "Caution! Wet Floor!" diff --git a/code/game/turfs/simulated/lava.dm b/code/game/turfs/simulated/lava.dm index ce98b16e..efdf8c13 100644 --- a/code/game/turfs/simulated/lava.dm +++ b/code/game/turfs/simulated/lava.dm @@ -109,7 +109,7 @@ O.resistance_flags |= FLAMMABLE //Even fireproof things burn up in lava if(O.resistance_flags & FIRE_PROOF) O.resistance_flags &= ~FIRE_PROOF - if(O.armor.fire > 50) //obj with 100% fire armor still get slowly burned away. + if(O.armor?.fire > 50) //obj with 100% fire armor still get slowly burned away. O.armor = O.armor.setRating(fire = 50) O.fire_act(10000, 1000) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 48c87cae..f229c0ce 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -237,10 +237,10 @@ GLOBAL_LIST_INIT(hallucination_list, list( xeno = new(pump.loc,target) sleep(10) xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) - xeno.throw_at(target,7,1, xeno, FALSE, TRUE) + xeno.throw_at(target,7,1, null, FALSE, TRUE) sleep(10) xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) - xeno.throw_at(pump,7,1, xeno, FALSE, TRUE) + xeno.throw_at(pump,7,1, null, FALSE, TRUE) sleep(10) var/xeno_name = xeno.name to_chat(target, "[xeno_name] begins climbing into the ventilation system...") diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index f4456eaf..12f5791c 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -339,7 +339,7 @@ assembly.visible_message("[assembly] has thrown [A]!") log_attack("[assembly] [REF(assembly)] has thrown [A] with non-lethal force.") A.forceMove(drop_location()) - A.throw_at(locate(x_abs, y_abs, T.z), range, 3, , , , CALLBACK(src, .proc/post_throw, A)) + A.throw_at(locate(x_abs, y_abs, T.z), range, 3, null, null, null, CALLBACK(src, .proc/post_throw, A)) // If the item came from a grabber now we can update the outputs since we've thrown it. if(istype(G)) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 76732918..91f68cd3 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -514,10 +514,10 @@ It's fairly easy to fix if dealing with single letters but not so much with comp //gets ID card object from special clothes slot or null. /mob/proc/get_idcard(hand_first = TRUE) var/obj/item/held_item = get_active_held_item() - . = held_item?.GetID() + . = held_item ? held_item.GetID() : null if(!.) //If so, then check the inactive hand held_item = get_inactive_held_item() - . = held_item?.GetID() + . = held_item ? held_item.GetID() : null /mob/proc/get_id_in_hand() var/obj/item/held_item = get_active_held_item() diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index 673548ff..8c9eb076 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -47,7 +47,7 @@ D.updateappearance(mutcolor_update=1, mutations_overlay_update=1) else if(ishuman(M)) var/mob/living/carbon/human/H = M - client.prefs.copy_to(H) + client?.prefs.copy_to(H) H.dna.update_dna_identity() if(mind && isliving(M)) diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm index 99d648d0..b4ed0b1e 100644 --- a/code/modules/modular_computers/computers/item/processor.dm +++ b/code/modules/modular_computers/computers/item/processor.dm @@ -17,7 +17,7 @@ machinery_computer = null /obj/item/modular_computer/processor/New(comp) - STOP_PROCESSING(SSobj, src) // Processed by its machine + . = ..() if(!comp || !istype(comp, /obj/machinery/modular_computer)) CRASH("Inapropriate type passed to obj/item/modular_computer/processor/New()! Aborting.") @@ -73,4 +73,4 @@ if(MC_SDD) machinery_computer.verbs -= /obj/machinery/modular_computer/proc/eject_disk if(MC_AI) - machinery_computer.verbs -= /obj/machinery/modular_computer/proc/eject_card \ No newline at end of file + machinery_computer.verbs -= /obj/machinery/modular_computer/proc/eject_card diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 2aca847e..4ab19515 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -223,8 +223,8 @@ beam_segments[beam_index] = null /obj/item/projectile/Bump(atom/A) - var/datum/point/pcache = trajectory.copy_to() - if(check_ricochet(A) && check_ricochet_flag(A) && ricochets < ricochets_max) + if(trajectory && check_ricochet(A) && check_ricochet_flag(A) && ricochets < ricochets_max) + var/datum/point/pcache = trajectory.copy_to() ricochets++ if(A.handle_ricochet(src)) on_ricochet(A) diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index 0978986f..48df9a27 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -84,8 +84,9 @@ investigate_log("[key_name(user)] built [amount] of [path] at [src]([type]).", INVESTIGATE_RESEARCH) message_admins("[ADMIN_LOOKUPFLW(user)] has built [amount] of [path] at a [src]([type]).") for(var/i in 1 to amount) - var/obj/item/I = new path(get_turf(src)) - if(efficient_with(I.type)) + var/obj/O = new path(get_turf(src)) + if(efficient_with(O.type) && isitem(O)) + var/obj/item/I = O I.materials = matlist.Copy() SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]")) diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index 4ee94c05..26a49bf6 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -187,7 +187,7 @@ var/mob/living/M = AM var/throwtarget = get_edge_target_turf(src, boot_dir) M.Knockdown(40) - M.throw_at(throwtarget, 5, 1,src) + M.throw_at(throwtarget, 5, 1) to_chat(M, "No climbing on the bar please.") else . = ..() diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 69057c60..fe0595de 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -227,7 +227,7 @@ terminate_effects() . = ..() -/obj/item/organ/eyes/robotic/glow/Remove() +/obj/item/organ/eyes/robotic/glow/Remove(mob/living/carbon/M, special = FALSE) terminate_effects() . = ..() @@ -338,7 +338,7 @@ /obj/item/organ/eyes/robotic/glow/proc/start_visuals() if(!islist(eye_lighting)) regenerate_light_effects() - if((eye_lighting.len < light_beam_distance) || !on_mob) + if((LAZYLEN(eye_lighting) < light_beam_distance) || !on_mob) regenerate_light_effects() sync_light_effects() update_visuals() @@ -377,4 +377,4 @@ /obj/item/organ/eyes/ipc name = "ipc eyes" - icon_state = "cybernetic_eyeballs" \ No newline at end of file + icon_state = "cybernetic_eyeballs" diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index fc205f60..cf224f7c 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -176,7 +176,7 @@ if(owner) // The special flag is important, because otherwise mobs can die // while undergoing transformation into different mobs. - Remove(owner, special=TRUE) + Remove(owner, TRUE) return ..() /obj/item/organ/attack(mob/living/carbon/M, mob/user) diff --git a/modular_citadel/code/datums/traits/neutral.dm b/modular_citadel/code/datums/traits/neutral.dm index de682418..d26f64a1 100644 --- a/modular_citadel/code/datums/traits/neutral.dm +++ b/modular_citadel/code/datums/traits/neutral.dm @@ -9,14 +9,13 @@ lose_text = "You don't feel that burning sensation anymore." /datum/quirk/libido/add() - var/mob/living/M = quirk_holder - M.min_arousal = 16 - M.arousal_rate = 3 + quirk_holder.min_arousal = 16 + quirk_holder.arousal_rate = 3 /datum/quirk/libido/remove() - var/mob/living/M = quirk_holder - M.min_arousal = initial(M.min_arousal) - M.arousal_rate = initial(M.arousal_rate) + if(quirk_holder) + quirk_holder.min_arousal = initial(quirk_holder.min_arousal) + quirk_holder.arousal_rate = initial(quirk_holder.arousal_rate) /datum/quirk/libido/on_process() var/mob/living/M = quirk_holder