From 892b66470ba42b20e5edf6650d1678c1bb3953c9 Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Tue, 5 Nov 2019 23:07:29 +0100
Subject: [PATCH 1/4] Fixing several minor runtimes.
---
code/datums/traits/neutral.dm | 11 +++++------
code/game/objects/items/RCD.dm | 4 ++--
code/modules/mob/dead/observer/observer.dm | 6 +++---
code/modules/mob/living/carbon/carbon.dm | 2 +-
.../simple_animal/hostile/megafauna/colossus.dm | 2 +-
code/modules/mob/mob_transformation_simple.dm | 4 ++--
code/modules/projectiles/projectile.dm | 4 ++--
.../reagents/chemistry/machinery/chem_dispenser.dm | 6 +++---
8 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm
index c015dba5ec..4b745593fa 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 -= CLAMP(16, 0, quirk_holder.min_arousal)
+ quirk_holder.arousal_rate = round(quirk_holder.arousal_rate * 0.33, 0.1)
/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..a50f3c29ba 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -2,7 +2,7 @@
//This proc is the most basic of the procs. All it does is make a new mob on the same tile and transfer over a few variables.
//Returns the new mob
//Note that this proc does NOT do MMI related stuff!
-/mob/proc/change_mob_type(new_type = null, turf/location = null, new_name = null as text, delete_old_mob = 0 as num)
+/mob/proc/ (new_type = null, turf/location = null, new_name = null as text, delete_old_mob = 0 as num)
if(isnewplayer(src))
to_chat(usr, "Cannot convert players who have not entered yet.")
@@ -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
From 97dd0bd70c8ef8e57daefe7681fdef596bc00090 Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Tue, 5 Nov 2019 23:13:10 +0100
Subject: [PATCH 2/4] Yes.
---
code/modules/mob/mob_transformation_simple.dm | 2 +-
code/modules/surgery/organs/eyes.dm | 2 +-
code/modules/surgery/organs/organ_internal.dm | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm
index a50f3c29ba..2c2efee534 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -2,7 +2,7 @@
//This proc is the most basic of the procs. All it does is make a new mob on the same tile and transfer over a few variables.
//Returns the new mob
//Note that this proc does NOT do MMI related stuff!
-/mob/proc/ (new_type = null, turf/location = null, new_name = null as text, delete_old_mob = 0 as num)
+/mob/proc/change_mob_type(new_type = null, turf/location = null, new_name = null as text, delete_old_mob = 0 as num)
if(isnewplayer(src))
to_chat(usr, "Cannot convert players who have not entered yet.")
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)
From 3c6b1109f1871d1dbcb0d5b5a3a3d5023f8805de Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Thu, 7 Nov 2019 00:40:39 +0100
Subject: [PATCH 3/4] I'm tired.
---
code/datums/traits/neutral.dm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm
index 4b745593fa..260f284cf7 100644
--- a/code/datums/traits/neutral.dm
+++ b/code/datums/traits/neutral.dm
@@ -103,13 +103,13 @@
lose_text = "You don't feel that burning sensation anymore."
/datum/quirk/libido/add()
- quirk_holder.min_arousal += 16
- quirk_holder.arousal_rate *= 3
+ quirk_holder.min_arousal = 16
+ quirk_holder.arousal_rate = 3
/datum/quirk/libido/remove()
if(quirk_holder)
- quirk_holder.min_arousal -= CLAMP(16, 0, quirk_holder.min_arousal)
- quirk_holder.arousal_rate = round(quirk_holder.arousal_rate * 0.33, 0.1)
+ quirk_holder.min_arousal = 0
+ quirk_holder.arousal_rate = 1
/datum/quirk/maso
name = "Masochism"
From 509fbdf4769298052ee6fb8b8a253cf04d62c2d6 Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Thu, 7 Nov 2019 05:34:02 +0100
Subject: [PATCH 4/4] initial.
---
code/datums/traits/neutral.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm
index 260f284cf7..9e05af03b6 100644
--- a/code/datums/traits/neutral.dm
+++ b/code/datums/traits/neutral.dm
@@ -108,8 +108,8 @@
/datum/quirk/libido/remove()
if(quirk_holder)
- quirk_holder.min_arousal = 0
- quirk_holder.arousal_rate = 1
+ quirk_holder.min_arousal = initial(quirk_holder.min_arousal)
+ quirk_holder.arousal_rate = initial(quirk_holder.arousal_rate)
/datum/quirk/maso
name = "Masochism"