The 515 MegaPR early downport (#7783)

Co-authored-by: Selis <selis@xynolabs.com>
Co-authored-by: Selis <sirlionfur@hotmail.de>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: SatinIsle <thesatinisle@gmail.com>
Co-authored-by: Heroman <alesha3000@list.ru>
Co-authored-by: Casey <a.roaming.shadow@gmail.com>
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
Cadyn
2024-02-27 11:17:32 -08:00
committed by GitHub
parent 96a43a09c1
commit b90f7ec922
254 changed files with 2135 additions and 1576 deletions

View File

@@ -20,7 +20,13 @@
return ..()
/mob/living/Destroy()
QDEL_NULL(ai_holder)
if(ai_holder)
ai_holder.holder = null
ai_holder.UnregisterSignal(src,COMSIG_MOB_STATCHANGE)
if(ai_holder.faction_friends && ai_holder.faction_friends.len) //This list is shared amongst the faction
ai_holder.faction_friends -= src
ai_holder.faction_friends = null
QDEL_NULL(ai_holder)
return ..()
/mob/living/Login()
@@ -222,7 +228,7 @@
holder = new_holder
home_turf = get_turf(holder)
manage_processing(AI_PROCESSING)
GLOB.stat_set_event.register(holder, src, PROC_REF(holder_stat_change))
RegisterSignal(holder, COMSIG_MOB_STATCHANGE, PROC_REF(holder_stat_change))
..()
/datum/ai_holder/Destroy()

View File

@@ -18,8 +18,9 @@
build_faction_friends()
/datum/ai_holder/Destroy()
if(faction_friends.len) //This list is shared amongst the faction
faction_friends -= src
if(faction_friends)
if(faction_friends.len) //This list is shared amongst the faction
faction_friends -= src
return ..()
// Handles everything about that list.
@@ -114,4 +115,3 @@
add_attacker(their_target) // We won't wait and 'warn' them while they're stabbing our ally
set_follow(friend, 10 SECONDS)
ai_log("help_requested() : Exiting.", AI_LOG_DEBUG)

View File

@@ -187,7 +187,7 @@
/datum/ai_holder/simple_mob/humanoid/hostile/post_ranged_attack(atom/A)
//Pick a random turf to step into
var/turf/T = get_step(holder, pick(alldirs))
if(check_trajectory(A, T)) // Can we even hit them from there?
if((A in check_trajectory(A, T))) // Can we even hit them from there?
holder.IMove(T)
holder.face_atom(A)
@@ -197,4 +197,3 @@
/datum/ai_holder/simple_mob/passive/speedy
base_wander_delay = 1

View File

@@ -82,6 +82,8 @@
target = new_target
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_target))
if(target != null)
lose_target_time = 0
track_target_position()
@@ -188,6 +190,7 @@
ai_log("lose_target() : Entering.", AI_LOG_TRACE)
if(target)
ai_log("lose_target() : Had a target, setting to null and LTT.", AI_LOG_DEBUG)
UnregisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_target))
target = null
lose_target_time = world.time
@@ -203,6 +206,7 @@
/datum/ai_holder/proc/remove_target()
ai_log("remove_target() : Entering.", AI_LOG_TRACE)
if(target)
UnregisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_target))
target = null
lose_target_time = 0

View File

@@ -134,4 +134,4 @@
emote_hear = list("hisses")
/datum/say_list/crab
emote_hear = list("hisses")
emote_hear = list("hisses")