diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm index c015dba5ec..9e05af03b6 100644 --- a/code/datums/traits/neutral.dm +++ b/code/datums/traits/neutral.dm @@ -103,14 +103,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/maso name = "Masochism" diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 5e798e1281..8763089464 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -439,11 +439,11 @@ RLD /obj/item/construction/rcd/proc/rcd_create(atom/A, mob/user) var/list/rcd_results = A.rcd_vals(user, src) + if(!rcd_results) + return FALSE var/turf/the_turf = get_turf(A) var/turf_coords = "[COORD(the_turf)]" investigate_log("[user] is attempting to use [src] on [A] (loc [turf_coords] at [the_turf]) with cost [rcd_results["cost"]], delay [rcd_results["delay"]], mode [rcd_results["mode"]].", INVESTIGATE_RCD) - if(!rcd_results) - return FALSE if(do_after(user, rcd_results["delay"] * delay_mod, target = A)) if(checkResource(rcd_results["cost"], user)) var/atom/cached = A diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d599d55886..ca149a39d8 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -285,10 +285,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp // CITADEL EDIT if(istype(loc, /obj/machinery/cryopod)) - var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you won't be able to re-enter this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body") - if(response != "Ghost")//darn copypaste - return var/obj/machinery/cryopod/C = loc + var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you won't be able to re-enter this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body") + if(response != "Ghost" || QDELETED(C) || QDELETED(src) || loc != C) + return C.despawn_occupant() return // END EDIT diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 88aa5f86d0..6d52a5c01b 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -585,7 +585,7 @@ if(!isnull(E.lighting_alpha)) lighting_alpha = E.lighting_alpha - if(client.eye != src) + if(client.eye && client.eye != src) var/atom/A = client.eye if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. return diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index b43bf2bb51..e07584e7c8 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -649,7 +649,7 @@ Difficulty: Very Hard L.heal_overall_damage(heal_power, heal_power) new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF") -/mob/living/simple_animal/hostile/lightgeist/ghostize(can_reenter_corpse = TRUE, send_the_signal = TRUE) +/mob/living/simple_animal/hostile/lightgeist/ghostize(can_reenter_corpse = TRUE, special = FALSE) . = ..() if(.) death() diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index a11e7a228e..2c2efee534 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/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index e1122f7eaa..88e766edfc 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -235,8 +235,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/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 9a228b28e3..b5bfa06786 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -157,8 +157,8 @@ if(beaker) beaker.ex_act(severity, target) -/obj/machinery/chem_dispenser/handle_atom_del(atom/A) - ..() +/obj/machinery/chem_dispenser/Exited(atom/movable/A, atom/newloc) + . = ..() if(A == beaker) beaker = null cut_overlays() @@ -252,7 +252,7 @@ if(!is_operational()) return var/amount = text2num(params["amount"]) - if(beaker && amount in beaker.possible_transfer_amounts) + if(beaker && (amount in beaker.possible_transfer_amounts)) beaker.reagents.remove_all(amount) work_animation() . = TRUE diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index faaa1c63ad..d877af7451 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() . = ..() diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index aaea914e73..194a10f4c4 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -188,7 +188,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)