From 622b4b2497a96336b12527dc2ee7d40946cc4f36 Mon Sep 17 00:00:00 2001
From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com>
Date: Wed, 21 Aug 2024 20:12:18 +0100
Subject: [PATCH 1/2] Removes LAssailant
---
code/game/objects/items/melee/misc.dm | 13 -------------
code/modules/mob/living/living.dm | 4 ----
code/modules/mob/living/simple_animal/slime/life.dm | 5 +----
code/modules/mob/mob_defines.dm | 3 ---
code/modules/recycling/disposal/bin.dm | 1 -
code/modules/research/xenobiology/xenobio_camera.dm | 2 --
6 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 2992edcff8098..6e8f926f87a7e 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -327,10 +327,6 @@
add_fingerprint(user)
- if(!iscarbon(user))
- target.LAssailant = null
- else
- target.LAssailant = WEAKREF(user)
cooldown_check = world.time + cooldown
else
var/wait_desc = get_wait_description()
@@ -743,10 +739,6 @@
target.visible_message(desc["visible"], desc["local"])
- if(!iscarbon(user))
- target.LAssailant = null
- else
- target.LAssailant = user
cooldown_check = world.time + cooldown
else
var/wait_desc = get_wait_description()
@@ -1085,9 +1077,4 @@
var/turf/throw_at = get_ranged_target_turf(target, throw_dir, knockbackpower)
target.throw_at(throw_at, throw_range, 3)
- if(!iscarbon(user))
- target.LAssailant = null
- else
- target.LAssailant = user
-
cooldown = world.time + 15
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index caf4b857864ca..c63839b88e9ce 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -324,10 +324,6 @@
M.visible_message("[src] grabs [M] [(is_zone_selected(BODY_ZONE_L_ARM) || is_zone_selected(BODY_ZONE_R_ARM))? "by their hands":"passively"]!", \
"[src] grabs you [(is_zone_selected(BODY_ZONE_L_ARM) || is_zone_selected(BODY_ZONE_R_ARM))? "by your hands":"passively"]!", null, null, src) //Message sent to area, Message sent to grabbee
to_chat(src, "You grab [M] [(is_zone_selected(BODY_ZONE_L_ARM) || is_zone_selected(BODY_ZONE_R_ARM))? "by their hands":"passively"]!") //Message sent to grabber
- if(!iscarbon(src))
- M.LAssailant = null
- else
- M.LAssailant = WEAKREF(usr)
if(isliving(M))
var/mob/living/L = M
//Share diseases that are spread by touch
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index 5a1bb1e264b51..f55105ec71a94 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -6,6 +6,7 @@
var/attack_cooldown = 0
var/attack_cooldown_time = 20 //How long, in deciseconds, the cooldown of attacks is
+
/mob/living/simple_animal/slime/Life()
set invisibility = 0
if(notransform)
@@ -144,10 +145,6 @@
if(M.stat == DEAD)
if(client)
to_chat(src, "This subject does not have a strong enough life energy anymore...")
- else if(!rabid && !attacked)
- var/mob/last_to_hurt = M.LAssailant?.resolve()
- if(last_to_hurt && last_to_hurt != M && prob(50))
- add_friendship(last_to_hurt, 1)
//we go rabid after finishing to feed on a human with a client.
if(M.client && ishuman(M))
rabid = 1
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 97f9b47330cce..90b7b70b2be9f 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -160,9 +160,6 @@
/// Can this mob enter shuttles
var/move_on_shuttle = 1
- ///A weakref to the last mob/living/carbon to push/drag/grab this mob (exclusively used by slimes friend recognition)
- var/datum/weakref/LAssailant = null
-
/**
* construct spells and mime spells.
*
diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm
index b279a252b4716..9096d84b85e79 100644
--- a/code/modules/recycling/disposal/bin.dm
+++ b/code/modules/recycling/disposal/bin.dm
@@ -139,7 +139,6 @@
else
target.visible_message("[user] has placed [target] in [src].", "[user] has placed you in [src].")
log_combat(user, target, "stuffed", addition="into [src]")
- target.LAssailant = WEAKREF(user)
. = TRUE
update_appearance()
diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm
index 7ab05ae3f0c17..4fc8f5587dd4b 100644
--- a/code/modules/research/xenobiology/xenobio_camera.dm
+++ b/code/modules/research/xenobiology/xenobio_camera.dm
@@ -250,7 +250,6 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/computer/camera_advanced/xenobio)
if(X.monkeys >= 1)
var/mob/living/carbon/monkey/food = new /mob/living/carbon/monkey(remote_eye.loc, TRUE, owner)
if (!QDELETED(food))
- food.LAssailant = WEAKREF(C)
X.monkeys--
X.monkeys = round(X.monkeys, 0.1) //Prevents rounding errors
to_chat(owner, "[X] now has [X.monkeys] monkeys stored.")
@@ -462,7 +461,6 @@ DEFINE_BUFFER_HANDLER(/obj/machinery/computer/camera_advanced/xenobio)
if(X.monkeys >= 1)
var/mob/living/carbon/monkey/food = new /mob/living/carbon/monkey(T, TRUE, C)
if (!QDELETED(food))
- food.LAssailant = WEAKREF(C)
X.monkeys--
X.monkeys = round(X.monkeys, 0.1) //Prevents rounding errors
to_chat(C, "[X] now has [X.monkeys] monkeys stored.")
From 672fdb52f631ac3eab85cd0fafe4db1f052bc2f3 Mon Sep 17 00:00:00 2001
From: PowerfulBacon <26465327+PowerfulBacon@users.noreply.github.com>
Date: Wed, 21 Aug 2024 20:18:44 +0100
Subject: [PATCH 2/2] Update misc.dm
---
code/game/objects/items/melee/misc.dm | 4 ----
1 file changed, 4 deletions(-)
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 6e8f926f87a7e..6d4c517ea8efe 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -510,10 +510,6 @@
add_fingerprint(user)
- if(!iscarbon(user))
- target.LAssailant = null
- else
- target.LAssailant = WEAKREF(user)
COOLDOWN_START(src, cooldown_check, cooldown)
//Telescopic Baton