[MIRROR] Fixes swarm enemies behaving like walls when dead (#10356)

Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-03-11 15:22:16 -07:00
committed by GitHub
parent c97dd30969
commit f730089c46
9 changed files with 26 additions and 16 deletions

View File

@@ -281,3 +281,9 @@
#define REAGENT_ID_NEOLIQUIDFIRE "neoliquidfire" #define REAGENT_ID_NEOLIQUIDFIRE "neoliquidfire"
#define REAGENT_LIQUIDLIFE "Liquid Life" #define REAGENT_LIQUIDLIFE "Liquid Life"
#define REAGENT_ID_LIQUIDLIFE "liquidlife" #define REAGENT_ID_LIQUIDLIFE "liquidlife"
#define REAGENT_NUMBING_FLUID "Numbing Fluid"
#define REAGENT_ID_NUMBING_FLUID "succubi_numbing"
#define REAGENT_PARALYZE_FLUID "Paralyzing Fluid"
#define REAGENT_ID_PARALYZE_FLUID "succubi_paralize"
#define REAGENT_ID_APHRODIAC_FLUID "succubi_aphrodisiac"

View File

@@ -50,7 +50,7 @@
if(isanimal(bound_mob)) if(isanimal(bound_mob))
. += span_notice("[bound_mob.health / bound_mob.maxHealth * 100]%") . += span_notice("[bound_mob.health / bound_mob.maxHealth * 100]%")
if(bound_mob.ooc_notes) if(bound_mob.ooc_notes)
. += span_deptradio("OOC Notes:") + " <a href='byond://?src=\ref[bound_mob];ooc_notes=1'>\[View\]</a> - <a href='byond://?src=\ref[src];print_ooc_notes_to_chat=1'>\[Print\]</a>" . += span_deptradio("OOC Notes:") + " <a href='byond://?src=\ref[bound_mob];ooc_notes=1'>\[View\]</a> - <a href='byond://?src=\ref[src];print_ooc_notes_chat=1'>\[Print\]</a>"
. += span_deptradio("<a href='byond://?src=\ref[bound_mob];vore_prefs=1'>\[Mechanical Vore Preferences\]</a>") . += span_deptradio("<a href='byond://?src=\ref[bound_mob];vore_prefs=1'>\[Mechanical Vore Preferences\]</a>")
//Command! This lets the owner toggle hostile on AI controlled mobs, or send a silent command message to your bound mob, wherever they may be. //Command! This lets the owner toggle hostile on AI controlled mobs, or send a silent command message to your bound mob, wherever they may be.

View File

@@ -41,16 +41,16 @@
if(choice == REAGENT_APHRODISIAC) if(choice == REAGENT_APHRODISIAC)
src.show_message(span_warning("You sink your fangs into [T] and inject your aphrodisiac!")) src.show_message(span_warning("You sink your fangs into [T] and inject your aphrodisiac!"))
src.visible_message(span_red("[src] sinks their fangs into [T]!")) src.visible_message(span_red("[src] sinks their fangs into [T]!"))
T.bloodstr.add_reagent("succubi_aphrodisiac",100) T.bloodstr.add_reagent(REAGENT_ID_APHRODIAC_FLUID,100)
return 0 return 0
else if(choice == "Numbing") else if(choice == "Numbing")
src.show_message(span_warning("You sink your fangs into [T] and inject your poison!")) src.show_message(span_warning("You sink your fangs into [T] and inject your poison!"))
src.visible_message(span_red("[src] sinks their fangs into [T]!")) src.visible_message(span_red("[src] sinks their fangs into [T]!"))
T.bloodstr.add_reagent("numbing_enzyme",20) //Poisons should work when more units are injected T.bloodstr.add_reagent(REAGENT_ID_NUMBING_FLUID,20) //Poisons should work when more units are injected
else if(choice == "Paralyzing") else if(choice == "Paralyzing")
src.show_message(span_warning("You sink your fangs into [T] and inject your poison!")) src.show_message(span_warning("You sink your fangs into [T] and inject your poison!"))
src.visible_message(span_red("[src] sinks their fangs into [T]!")) src.visible_message(span_red("[src] sinks their fangs into [T]!"))
T.bloodstr.add_reagent("succubi_paralize",20) //Poisons should work when more units are injected T.bloodstr.add_reagent(REAGENT_ID_PARALYZE_FLUID,20) //Poisons should work when more units are injected
else else
return //Should never happen return //Should never happen
@@ -65,7 +65,7 @@ mob/living/carbon/proc/charmed() //TODO
/datum/reagent/succubi_aphrodisiac /datum/reagent/succubi_aphrodisiac
name = REAGENT_APHRODISIAC name = REAGENT_APHRODISIAC
id = "succubi_aphrodisiac" id = REAGENT_ID_APHRODIAC_FLUID
description = "A unknown liquid, it smells sweet" description = "A unknown liquid, it smells sweet"
metabolism = REM * 0.8 metabolism = REM * 0.8
color = "#8A0829" color = "#8A0829"
@@ -79,8 +79,8 @@ mob/living/carbon/proc/charmed() //TODO
return return
/datum/reagent/succubi_numbing //Using numbing_enzyme instead. /datum/reagent/succubi_numbing //Using numbing_enzyme instead.
name = "Numbing Fluid" name = REAGENT_NUMBING_FLUID
id = "succubi_numbing" id = REAGENT_ID_NUMBING_FLUID
description = "A unknown liquid, it doesn't smell" description = "A unknown liquid, it doesn't smell"
metabolism = REM * 0.5 metabolism = REM * 0.5
color = "#41029B" color = "#41029B"
@@ -97,8 +97,8 @@ mob/living/carbon/proc/charmed() //TODO
return return
/datum/reagent/succubi_paralize /datum/reagent/succubi_paralize
name = "Paralyzing Fluid" name = REAGENT_PARALYZE_FLUID
id = "succubi_paralize" id = REAGENT_ID_PARALYZE_FLUID
description = "A unknown liquid, it doesn't smell" description = "A unknown liquid, it doesn't smell"
metabolism= REM * 0.5 metabolism= REM * 0.5
color = "#41029B" color = "#41029B"

View File

@@ -129,7 +129,7 @@
AddComponent(/datum/component/swarming) AddComponent(/datum/component/swarming)
/mob/living/simple_mob/animal/giant_spider/CanPass(atom/movable/mover, turf/target) /mob/living/simple_mob/animal/giant_spider/CanPass(atom/movable/mover, turf/target)
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/giant_spider) && mover.density == TRUE) if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/giant_spider) && mover.density == TRUE && stat != DEAD)
return FALSE return FALSE
return ..() return ..()

View File

@@ -96,7 +96,7 @@
// This is so carps can swarm // This is so carps can swarm
/mob/living/simple_mob/animal/space/carp/CanPass(atom/movable/mover, turf/target) /mob/living/simple_mob/animal/space/carp/CanPass(atom/movable/mover, turf/target)
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/space/carp) && mover.density == TRUE) if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/space/carp) && mover.density == TRUE && stat != DEAD)
return FALSE return FALSE
return ..() return ..()

View File

@@ -156,7 +156,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
return FALSE return FALSE
/obj/item/nif/proc/quick_install(var/mob/living/carbon/human/H) /obj/item/nif/proc/quick_install(var/mob/living/carbon/human/H)
if(!H) //Or letting them get deleted if(QDELETED(H)) //Or letting them get deleted
return return
if(H.mind) if(H.mind)
owner = H.mind.name owner = H.mind.name

View File

@@ -39,9 +39,9 @@
var/obj/item/nif/nif var/obj/item/nif/nif
var/datum/nifsoft/commlink/nifsoft var/datum/nifsoft/commlink/nifsoft
/obj/item/communicator/commlink/New(var/newloc,var/soft) /obj/item/communicator/commlink/Initialize(mapload, var/soft)
..() . = ..()
nif = newloc nif = loc
nifsoft = soft nifsoft = soft
/obj/item/communicator/commlink/Destroy() /obj/item/communicator/commlink/Destroy()

View File

@@ -554,6 +554,10 @@
else else
var/mob/living/L = target var/mob/living/L = target
if(!direct_target) if(!direct_target)
// Swarms are special scuffed critters. They must have density FALSE to swarm, but then they don't get hit.
// So we'll check before, just in case. Lying might gives a chance to dodge, however.
if(L.GetComponent(/datum/component/swarming) && L.stat != DEAD && !L.lying)
return TRUE
if(!L.density) if(!L.density)
return FALSE return FALSE
return TRUE return TRUE