Merge pull request #11364 from kevinz000/gc_debugging

Fixes more xenobio GC memes
This commit is contained in:
Ghom
2020-03-08 01:16:41 +01:00
committed by GitHub
7 changed files with 16 additions and 12 deletions
+1 -1
View File
@@ -296,7 +296,7 @@
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
target.LAssailant = WEAKREF(user)
cooldown_check = world.time + cooldown
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
else
+1 -1
View File
@@ -295,7 +295,7 @@
if(!iscarbon(src))
M.LAssailant = null
else
M.LAssailant = usr
M.LAssailant = WEAKREF(usr)
if(isliving(M))
var/mob/living/L = M
//Share diseases that are spread by touch
@@ -186,12 +186,13 @@
if(M.stat == DEAD) // our victim died
if(!client)
if(!rabid && !attacked)
if(M.LAssailant && M.LAssailant != M)
var/mob/living/carbon/their_attacker = M.getLAssailant()
if(their_attacker != M)
if(prob(50))
if(!(M.LAssailant in Friends))
Friends[M.LAssailant] = 1
if(!(their_attacker in Friends))
Friends[their_attacker] = 1
else
++Friends[M.LAssailant]
++Friends[their_attacker]
else
to_chat(src, "<i>This subject does not have a strong enough life energy anymore...</i>")
+4 -1
View File
@@ -955,6 +955,9 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
. = ..()
update_movespeed(FALSE)
/mob/proc/getLAssailant()
return LAssailant?.resolve()
/// Updates the grab state of the mob and updates movespeed
/mob/setGrabState(newstate)
. = ..()
@@ -975,4 +978,4 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
/mob/proc/equipped_speed_mods()
for(var/obj/item/I in held_items)
if(I.item_flags & SLOWS_WHILE_IN_HAND)
. += I.slowdown
. += I.slowdown
+2 -2
View File
@@ -80,8 +80,8 @@
var/list/faction = list("neutral") //A list of factions that this mob is currently in, for hostile mob targetting, amongst other things
var/move_on_shuttle = 1 // Can move on the shuttle.
//The last mob/living/carbon to push/drag/grab this mob (mostly used by slimes friend recognition)
var/mob/living/carbon/LAssailant = null
/// The last mob/living/carbon to push/drag/grab this mob (mostly used by slimes friend recognition)
var/datum/weakref/LAssailant
var/list/obj/user_movement_hooks //Passes movement in client/Move() to these!
+1 -1
View File
@@ -137,7 +137,7 @@
else
target.visible_message("<span class='danger'>[user] has placed [target] in [src].</span>", "<span class='userdanger'>[user] has placed [target] in [src].</span>")
log_combat(user, target, "stuffed", addition="into [src]")
target.LAssailant = user
target.LAssailant = WEAKREF(user)
update_icon()
/obj/machinery/disposal/proc/can_stuff_mob_in(mob/living/target, mob/living/user, pushing = FALSE)
@@ -236,7 +236,7 @@
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 = C
food.LAssailant = WEAKREF(C)
X.monkeys --
to_chat(owner, "<span class='notice'>[X] now has [X.monkeys] monkey(s) left.</span>")
else
@@ -474,7 +474,7 @@
if(X.monkeys >= 1)
var/mob/living/carbon/monkey/food = new /mob/living/carbon/monkey(T, TRUE, C)
if (!QDELETED(food))
food.LAssailant = C
food.LAssailant = WEAKREF(C)
X.monkeys--
X.monkeys = round(X.monkeys, 0.1) //Prevents rounding errors
to_chat(C, "<span class='notice'>[X] now has [X.monkeys] monkey(s) stored.</span>")