mob ai: iff factions, small turbolift/maploader fix (#6702)

replaces old faction system with one that supports lists
This commit is contained in:
silicons
2024-09-06 13:23:38 -06:00
committed by GitHub
parent 6dbb18ede6
commit 6b8a74e682
160 changed files with 685 additions and 466 deletions
+4 -4
View File
@@ -397,10 +397,10 @@
/obj/structure/ashlander/statue/proc/Bless(mob/user)
var/mob/living/carbon/human/H = usr
if(!H.faction == "lavaland")
to_chat(user, "<span class='danger'>You feel as if an eye briefly regards you, and then turns away.</span>")
else
H.add_modifier(/datum/modifier/ashlander_blessing, 15 MINUTES)
// if(!H.faction == "lavaland")
// to_chat(user, "<span class='danger'>You feel as if an eye briefly regards you, and then turns away.</span>")
// else
H.add_modifier(/datum/modifier/ashlander_blessing, 15 MINUTES)
/datum/modifier/ashlander_blessing
name = "The Mother's Blessing"
+1 -1
View File
@@ -53,7 +53,7 @@
var/spawn_choice = pick(creature_types)
var/mob/living/L = new spawn_choice(spawnpoint)
if(den_faction)
L.faction = den_faction
L.set_iff_factions(den_faction)
visible_message("<span class='warning'>\The [L] crawls out of \the [src].</span>")
den_mobs += L
tally++
+5 -3
View File
@@ -14,12 +14,14 @@
/obj/structure/cult/pylon/swarm/CanAllowThrough(atom/movable/mover, turf/target)
if(istype(mover, /mob/living))
var/mob/living/L = mover
if(L.faction == "swarmer")
if(L.has_iff_faction(MOB_IFF_FACTION_SWARMER))
return TRUE
else if(istype(mover, /obj/projectile))
var/obj/projectile/P = mover
if(istype(P.firer) && P.firer.faction == "swarmer")
return TRUE
if(isliving(P.firer))
var/mob/living/L = P.firer
if(L.has_iff_faction(MOB_IFF_FACTION_SWARMER))
return TRUE
return ..()
/obj/structure/cult/pylon/swarm/Initialize(mapload)