From 6b8a74e682779b17c738ed33010966f9a72005ea Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:23:38 -0400 Subject: [PATCH] mob ai: iff factions, small turbolift/maploader fix (#6702) replaces old faction system with one that supports lists --- citadel.dme | 5 +- code/__DEFINES/mobs/iff.dm | 109 +++++++++ code/game/machinery/computer/arcade/orion.dm | 1 - code/game/machinery/turrets/turret.dm | 2 +- code/game/objects/items/weapons/nullrod.dm | 2 +- code/game/objects/items/weapons/other.dm | 4 +- code/game/objects/mob_spawner.dm | 6 +- code/game/objects/random/mob.dm | 2 +- code/game/objects/structures/ashlander.dm | 8 +- code/game/objects/structures/props/nest.dm | 2 +- code/game/objects/structures/props/swarm.dm | 8 +- code/game/turfs/change_turf.dm | 7 + .../holders/polaris/ai_holder_cooperation.dm | 3 +- .../ai/holders/polaris/ai_holder_targeting.dm | 2 +- code/modules/ai/holders/polaris/interfaces.dm | 2 +- code/modules/blob2/blobs/base_blob.dm | 14 +- code/modules/blob2/blobs/factory.dm | 2 +- code/modules/blob2/overmind/overmind.dm | 3 +- code/modules/blob2/overmind/powers.dm | 2 +- code/modules/blob2/overmind/types.dm | 8 +- code/modules/ghostroles/roles/ashlander.dm | 2 +- code/modules/ghostroles/roles/pirate.dm | 2 +- code/modules/holodeck/HolodeckObjects.dm | 4 +- code/modules/mapping/map.dm | 4 +- code/modules/mapping/map_level.dm | 82 ++++--- code/modules/maps/_shim/away_spawner.dm | 2 +- .../maps/away_missions/140x140/snowfield.dm | 6 +- .../mob/living/carbon/alien/larva/larva.dm | 2 +- .../mob/living/carbon/alien/progression.dm | 3 +- .../human/ai_controlled/ai_controlled.dm | 2 - .../mob/living/living-defense-legacy.dm | 2 +- code/modules/mob/living/living_defines.dm | 4 +- code/modules/mob/living/movement.dm | 2 +- .../mob/living/silicon/robot/drone/swarm.dm | 6 +- .../mob/living/simple_mob/simple_mob.dm | 2 + .../subtypes/animal/farm animals/goat.dm | 4 +- .../subtypes/animal/farm animals/lythios.dm | 7 +- .../animal/giant_spider/_giant_spider.dm | 3 +- .../subtypes/animal/giant_spider/carrier.dm | 2 +- .../subtypes/animal/passive/crab.dm | 4 +- .../subtypes/animal/passive/passive.dm | 4 + .../simple_mob/subtypes/animal/pets/fox_vr.dm | 2 +- .../simple_mob/subtypes/animal/roach/roach.dm | 5 +- .../simple_mob/subtypes/animal/sif/diyaab.dm | 2 +- .../simple_mob/subtypes/animal/sif/duck.dm | 2 +- .../subtypes/animal/sif/frostfly.dm | 2 +- .../subtypes/animal/sif/glitterfly.dm | 2 +- .../subtypes/animal/sif/hooligan_crab.dm | 2 +- .../simple_mob/subtypes/animal/sif/kururak.dm | 4 +- .../simple_mob/subtypes/animal/sif/leech.dm | 2 +- .../simple_mob/subtypes/animal/sif/racoon.dm | 4 +- .../simple_mob/subtypes/animal/sif/savik.dm | 2 +- .../simple_mob/subtypes/animal/sif/shantak.dm | 6 +- .../simple_mob/subtypes/animal/space/alien.dm | 12 +- .../simple_mob/subtypes/animal/space/bats.dm | 4 +- .../simple_mob/subtypes/animal/space/bear.dm | 2 +- .../simple_mob/subtypes/animal/space/carp.dm | 3 +- .../subtypes/animal/space/gaslamp_vr.dm | 3 +- .../simple_mob/subtypes/animal/space/goose.dm | 5 +- .../subtypes/animal/space/horing.dm | 2 +- .../subtypes/animal/space/mouse_army.dm | 3 +- .../simple_mob/subtypes/animal/space/worm.dm | 6 +- .../living/simple_mob/subtypes/blob/blob.dm | 2 +- .../living/simple_mob/subtypes/horror/Eddy.dm | 1 - .../simple_mob/subtypes/horror/Master.dm | 1 - .../simple_mob/subtypes/horror/Rickey.dm | 1 - .../simple_mob/subtypes/horror/Smiley.dm | 1 - .../simple_mob/subtypes/horror/Steve.dm | 1 - .../simple_mob/subtypes/horror/Willy.dm | 1 - .../simple_mob/subtypes/horror/bradley.dm | 1 - .../simple_mob/subtypes/horror/horror .dm | 2 +- .../simple_mob/subtypes/horror/sally.dm | 1 - .../simple_mob/subtypes/horror/shittytim.dm | 1 - .../simple_mob/subtypes/horror/timling.dm | 1 - .../simple_mob/subtypes/humanoid/clown.dm | 4 +- .../simple_mob/subtypes/humanoid/cultist.dm | 17 +- .../subtypes/humanoid/humanoid_vr.dm | 6 - .../subtypes/humanoid/mercs/mercs.dm | 6 +- .../simple_mob/subtypes/humanoid/pirates.dm | 2 +- .../simple_mob/subtypes/humanoid/possessed.dm | 2 +- .../simple_mob/subtypes/humanoid/russian.dm | 48 ---- .../simple_mob/subtypes/lavaland/goliath.dm | 3 +- .../simple_mob/subtypes/lavaland/gutshank.dm | 11 +- .../subtypes/lavaland/stormdrifter.dm | 8 +- .../subtypes/mechanical/combat_drone.dm | 2 +- .../mechanical/corrupt_maint_drone_vr.dm | 2 +- .../mechanical/cyber_horror/cyber_horror.dm | 4 +- .../subtypes/mechanical/disbot_vr.dm | 4 +- .../simple_mob/subtypes/mechanical/golem.dm | 2 +- .../mechanical/hivebot/enigma_hivebot.dm | 13 +- .../subtypes/mechanical/hivebot/hivebot.dm | 2 +- .../subtypes/mechanical/hivebot/support.dm | 2 +- .../subtypes/mechanical/mecha/mecha.dm | 5 +- .../subtypes/mechanical/mecha/micro.dm | 3 +- .../subtypes/mechanical/mecha/ripley.dm | 2 +- .../subtypes/mechanical/mechanical.dm | 2 +- .../subtypes/mechanical/viscerator.dm | 2 +- .../subtypes/mechanical/ward/monitor_ward.dm | 2 +- .../subtypes/mechanical/ward/ward.dm | 3 +- .../subtypes/occult/constructs/_construct.dm | 2 +- .../simple_mob/subtypes/occult/creature.dm | 4 +- .../simple_mob/subtypes/occult/faithless.dm | 4 +- .../subtypes/occult/living_statue.dm | 2 +- .../simple_mob/subtypes/plant/tomato.dm | 2 +- .../living/simple_mob/subtypes/plant/tree.dm | 6 +- .../living/simple_mob/subtypes/slime/slime.dm | 2 +- .../subtypes/slime/xenobio/xenobio.dm | 5 +- .../living/simple_mob/subtypes/vore/bee.dm | 2 +- .../subtypes/vore/corrupt_hounds.dm | 2 +- .../simple_mob/subtypes/vore/deathclaw.dm | 2 +- .../simple_mob/subtypes/vore/demon/demon.dm | 11 +- .../living/simple_mob/subtypes/vore/dino.dm | 2 +- .../living/simple_mob/subtypes/vore/dragon.dm | 4 +- .../living/simple_mob/subtypes/vore/fennec.dm | 3 +- .../living/simple_mob/subtypes/vore/fennix.dm | 3 +- .../living/simple_mob/subtypes/vore/horse.dm | 3 +- .../living/simple_mob/subtypes/vore/jelly.dm | 1 - .../living/simple_mob/subtypes/vore/mimic.dm | 8 +- .../living/simple_mob/subtypes/vore/otie.dm | 14 +- .../simple_mob/subtypes/vore/panther.dm | 3 +- .../living/simple_mob/subtypes/vore/rat.dm | 2 +- .../simple_mob/subtypes/vore/redpanda.dm | 3 +- .../living/simple_mob/subtypes/vore/snake.dm | 3 +- .../simple_mob/subtypes/vore/solargrub.dm | 3 +- .../subtypes/vore/solargrub_larva.dm | 2 +- .../vore/{solarmoth_ch.dm => solarmoth.dm} | 3 +- .../living/simple_mob/subtypes/vore/wolf.dm | 2 +- .../simple_mob/subtypes/vore/wolfgirl.dm | 1 - .../subtypes/vore/zz_vore_overrides.dm | 3 - code/modules/mob/mob-iff.dm | 117 ++++++++++ code/modules/mob/mob.dm | 2 + code/modules/mob/mob_defines.dm | 9 +- code/modules/mob/mob_helpers.dm | 2 +- code/modules/power/fission/engine.dm | 5 +- code/modules/rogueminer_vr/roguemines_mobs.dm | 16 +- code/modules/rogueminer_vr/zonemaster.dm | 2 +- code/modules/species/protean/protean_blob.dm | 3 +- code/modules/species/species.dm | 13 ++ .../species/xenomorphs/alien_species.dm | 4 + code/modules/species/xenomorphs/xenomorphs.dm | 8 +- code/modules/tension/tension.dm | 2 +- code/modules/turbolift/turbolift_map.dm | 2 +- code/modules/xenobio/items/slimepotions.dm | 5 +- maps/away_missions/140x140/listeningpost.dmm | 3 +- maps/away_missions/140x140/zoo.dmm | 206 +++++++++--------- maps/sectors/frozen_140/levels/frozen_140.dmm | 2 +- maps/sectors/frozen_192/levels/frozen_192.dmm | 2 +- .../piratebase_140/levels/piratebase_140.dmm | 2 +- .../piratebase_192/levels/piratebase_192.dmm | 2 +- .../level_specific/class_h/covert_post.dmm | 2 +- .../level_specific/debrisfield/derelict.dmm | 10 +- .../debrisfield_vr/derelict.dmm | 10 +- .../debrisfield_vr/mining_drones.dmm | 2 +- .../underdark/abandonded_outpost.dmm | 2 +- .../level_specific/underdark/wolf_den.dmm | 2 +- .../level_specific/virgo2/Rockybase.dmm | 8 +- maps/submaps/plains/Oldhouse.dmm | 2 +- maps/submaps/plains/Oldhouse_vr.dmm | 2 +- maps/submaps/wilderness/Rockybase.dmm | 8 +- maps/tether/levels/plains.dmm | 2 +- 160 files changed, 685 insertions(+), 466 deletions(-) create mode 100644 code/__DEFINES/mobs/iff.dm delete mode 100644 code/modules/mob/living/simple_mob/subtypes/humanoid/russian.dm rename code/modules/mob/living/simple_mob/subtypes/vore/{solarmoth_ch.dm => solarmoth.dm} (99%) create mode 100644 code/modules/mob/mob-iff.dm diff --git a/citadel.dme b/citadel.dme index e8292eaa5c9..37a4d4c956e 100644 --- a/citadel.dme +++ b/citadel.dme @@ -263,6 +263,7 @@ #include "code\__DEFINES\mobs\biology.dm" #include "code\__DEFINES\mobs\characteristics.dm" #include "code\__DEFINES\mobs\grab.dm" +#include "code\__DEFINES\mobs\iff.dm" #include "code\__DEFINES\mobs\intent.dm" #include "code\__DEFINES\mobs\life.dm" #include "code\__DEFINES\mobs\mobility.dm" @@ -3496,6 +3497,7 @@ #include "code\modules\mob\mob-keybind-triggers.dm" #include "code\modules\mob\mob.dm" #include "code\modules\mob\mob_defines.dm" +#include "code\modules\mob\mob-iff.dm" #include "code\modules\mob\mob_helpers.dm" #include "code\modules\mob\mob_transformation_simple.dm" #include "code\modules\mob\mobility.dm" @@ -3903,7 +3905,6 @@ #include "code\modules\mob\living\simple_mob\subtypes\humanoid\humanoid_vr.dm" #include "code\modules\mob\living\simple_mob\subtypes\humanoid\pirates.dm" #include "code\modules\mob\living\simple_mob\subtypes\humanoid\possessed.dm" -#include "code\modules\mob\living\simple_mob\subtypes\humanoid\russian.dm" #include "code\modules\mob\living\simple_mob\subtypes\humanoid\mercs\mercs.dm" #include "code\modules\mob\living\simple_mob\subtypes\humanoid\mercs\mercs_vr.dm" #include "code\modules\mob\living\simple_mob\subtypes\illusion\illusion.dm" @@ -3983,7 +3984,7 @@ #include "code\modules\mob\living\simple_mob\subtypes\vore\snake.dm" #include "code\modules\mob\living\simple_mob\subtypes\vore\solargrub.dm" #include "code\modules\mob\living\simple_mob\subtypes\vore\solargrub_larva.dm" -#include "code\modules\mob\living\simple_mob\subtypes\vore\solarmoth_ch.dm" +#include "code\modules\mob\living\simple_mob\subtypes\vore\solarmoth.dm" #include "code\modules\mob\living\simple_mob\subtypes\vore\vore.dm" #include "code\modules\mob\living\simple_mob\subtypes\vore\wolf.dm" #include "code\modules\mob\living\simple_mob\subtypes\vore\wolfgirl.dm" diff --git a/code/__DEFINES/mobs/iff.dm b/code/__DEFINES/mobs/iff.dm new file mode 100644 index 00000000000..4edc9d365aa --- /dev/null +++ b/code/__DEFINES/mobs/iff.dm @@ -0,0 +1,109 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station developers. *// + +//* IFF Factions *// + +//? -- Special; These must start with '!' -- ?// +//? ?// +//? These are only valid syntax in places ?// +//? where you should be using them, aka ?// +//? initializers. ?// + +/// get an arbitrary faction that's the same on a given /datum/map_level +#define MOB_IFF_FACTION_BIND_TO_LEVEL "!bind-level" +/// get an arbitrary faction that's the same on a given /datum/map +/// +/// * acts like BIND_TO_LEVEL if there's no parent /datum/map for a /datum/map_level +#define MOB_IFF_FACTION_BIND_TO_MAP "!bind-map" +/// get an arbitrary faction that's the same on a given /datum/map_level for a given key +/// +/// * GROUP must be a string +#define MOB_IFF_FACTION_BIND_TO_LEVEL_GROUP(GROUP) list(MOB_IFF_FACTION_BIND_TO_LEVEL = GROUP) +/// get an arbitrary faction that's the same on a given /datum/map for a given key +/// +/// * GROUP must be a string +/// * acts like BIND_TO_LEVEL if there's no parent /datum/map for a /datum/map_level +#define MOB_IFF_FACTION_BIND_TO_MAP_GROUP list(MOB_IFF_FACTION_BIND_TO_MAP = GROUP) + +// todo: "bind to map template" (?) +// todo: "bind to /area" (?) +// todo: "bind to specific type" handling; maybe just input typepath? + +/// automatically detect what we should bind to +/// +/// * submap +/// * map +/// todo: impl +#define MOB_IFF_FACTION_BIND_AUTO MOB_IFF_FACTION_BIND_TO_MAP +/// automatically detect what we should bind to, and use a specific separated group +/// +/// * submap +/// * map +/// todo: impl +#define MOB_IFF_FACTION_BIND_AUTO_GROUP(GROUP) list(MOB_IFF_FACTION_BIND_TO_MAP = GROUP) + +//? Default factions *// + +/// mobs have this by default +/// +/// * this makes a lot of things assume that the mob is nonhostile. +/// * this should be removed for hostile mobs +#define MOB_IFF_FACTION_NEUTRAL "neutral" +/// generic hostile mob faction +/// +/// * do not check for this; most hostile mobs do not have this +/// * having FACTION_NEUTRAL is an effect; having this is not, this is just a generic one so the mob has a faction. +/// * you probably shouldn't even be using this unless you're doing BIND_TO_LEVEL/MAP_GROUP with this. +#define MOB_IFF_FACTION_HOSTILE "hostile" + +//? AI / machine intelligence factions ?// + +#define MOB_IFF_FACTION_HIVEBOT "ai-hivebot" +#define MOB_IFF_FACTION_SWARMER "ai-swarmer" + +//? Alien factions + +#define MOB_IFF_FACTION_BLOB "alien-blob" +#define MOB_IFF_FACTION_CHIMERIC "alien-chimeric" +#define MOB_IFF_FACTION_SLIME "alien-slime" +#define MOB_IFF_FACTION_STATUE "alien-statue" +#define MOB_IFF_FACTION_XENOMORPH "alien-xenomorph" + +//? Animal factions ?// +//* Farm refers to 'this would not be out of place in a normal earth farm that isn't in a horror series' + +/// goats, cows, sheep +#define MOB_IFF_FACTION_FARM_ANIMAL "farm-animal" +/// ducks, other 'non producing' (canonically, anyways) +#define MOB_IFF_FACTION_FARM_NEUTRAL "farm-neutral" +/// mice and similar +#define MOB_IFF_FACTION_FARM_PEST "farm-pest" +/// cats, dogs +#define MOB_IFF_FACTION_FARM_PET "pet" + +/// man's worst enemy (spiders) +#define MOB_IFF_FACTION_SPIDER "spider" +/// fallout gone wrong - wait what?! (cockroaches) +#define MOB_IFF_FACTION_ROACH "roach" +/// biotech gone wrong (genetic horrors) +#define MOB_IFF_FACTION_MUTANT "mutant" +/// hydroponics gone wrong (literally any hostile plane) +#define MOB_IFF_FACTION_PLANT "plant" +/// is this a dune reference??? (space worms) +#define MOB_IFF_FACTION_WORM "worm" +/// we're going whaling! (space carps) +#define MOB_IFF_FACTION_CARP "carp" +/// the bane of engineering (solargrubs) +#define MOB_IFF_FACTION_GRUB "grubs" + +//? Human factions ?// + +#define MOB_IFF_FACTION_MERCENARY "mercenary" +#define MOB_IFF_FACTION_MERCENARY_GROUP(GROUP) ("mercenary-" + GROUP) +#define MOB_IFF_FACTION_PIRATE "mercenary" +#define MOB_IFF_FACTION_PIRATE_GROUP(GROUP) ("mercenary-" + GROUP) + +//? Paracausal factions ?// + +#define MOB_IFF_FACTION_CLOCKWORK_CULT "clock-cult" +#define MOB_IFF_FACTION_SANGUINE_CULT "blood-cult" diff --git a/code/game/machinery/computer/arcade/orion.dm b/code/game/machinery/computer/arcade/orion.dm index c1c365ded1b..77d2a6c5f98 100644 --- a/code/game/machinery/computer/arcade/orion.dm +++ b/code/game/machinery/computer/arcade/orion.dm @@ -487,7 +487,6 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events()) /mob/living/simple_mob/hostile/humanoid/orion name = "spaceport security" desc = "Premier corporate security forces for all spaceports found along the Orion Trail." - faction = "orion" loot_list = list() //del_on_death = TRUE diff --git a/code/game/machinery/turrets/turret.dm b/code/game/machinery/turrets/turret.dm index 02a1860c9e1..c469d5d39eb 100644 --- a/code/game/machinery/turrets/turret.dm +++ b/code/game/machinery/turrets/turret.dm @@ -543,7 +543,7 @@ if(L.invisibility >= INVISIBILITY_LEVEL_ONE) // Cannot see him. see_invisible is a mob-var return TURRET_NOT_TARGET - if(faction && L.faction == faction) + if(faction && L.has_iff_faction(faction)) return TURRET_NOT_TARGET if(!emagged && issilicon(L) && check_all == FALSE) // Don't target silica, unless told to neutralize everything. diff --git a/code/game/objects/items/weapons/nullrod.dm b/code/game/objects/items/weapons/nullrod.dm index b70acf30e7b..ce93b1ee66b 100644 --- a/code/game/objects/items/weapons/nullrod.dm +++ b/code/game/objects/items/weapons/nullrod.dm @@ -359,7 +359,7 @@ if(used_blessing) else if(user.mind && (user.mind.isholy)) to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.") - user.faction |= "carp" + user.add_iff_faction(MOB_IFF_FACTION_CARP) used_blessing = TRUE /obj/item/nullrod/claymore/bostaff //May as well make it a "claymore" and inherit the blocking diff --git a/code/game/objects/items/weapons/other.dm b/code/game/objects/items/weapons/other.dm index 9b5c907b0eb..9cd042fb58f 100644 --- a/code/game/objects/items/weapons/other.dm +++ b/code/game/objects/items/weapons/other.dm @@ -427,11 +427,11 @@ . = CLICKCHAIN_DO_NOT_PROPAGATE if(!target.mind) return - if(target.faction == user.faction) + if(target.shares_iff_faction(user)) to_chat(target, "You are graced by the familiar gaze of the Mother for a brief moment.") to_chat(user, "You smear the Mark of the Mother on [target]'s forehead using the [src].") to_chat(target, "You sense an unfamiliar presence looming over you. It encases you in a gentle, all-encompassing warmth.") - target.faction = user.faction + target.copy_iff_factions(user) playsound(src, pick(use_sound), 25) qdel(src) diff --git a/code/game/objects/mob_spawner.dm b/code/game/objects/mob_spawner.dm index 17005e48980..a7750f0b37d 100644 --- a/code/game/objects/mob_spawner.dm +++ b/code/game/objects/mob_spawner.dm @@ -64,7 +64,7 @@ if(total_spawns > 0) total_spawns-- if(mob_faction) - L.faction = mob_faction + L.set_iff_factions(mob_faction) return L /obj/structure/mob_spawner/proc/get_death_report(var/mob/living/L) @@ -102,7 +102,7 @@ It also makes it so a ghost wont know where all the goodies/mobs are. if(world.time > last_spawn + spawn_delay) var/turf/mainloc = get_turf(src) for(var/mob/living/A in range(range,mainloc)) - if ((A.faction != mob_faction) && (A.move_speed < 12)) + if (((!mob_faction || !A.has_iff_faction(mob_faction))) && (A.move_speed < 12)) var/chosen_mob = choose_spawn() if(chosen_mob) do_spawn(chosen_mob) @@ -279,7 +279,7 @@ It also makes it so a ghost wont know where all the goodies/mobs are. my_mob.low_priority = TRUE if(faction) - my_mob.faction = faction + my_mob.set_iff_factions(faction) if(atmos_comp) var/turf/T = get_turf(src) diff --git a/code/game/objects/random/mob.dm b/code/game/objects/random/mob.dm index fce0aa64581..006dfdbeb27 100644 --- a/code/game/objects/random/mob.dm +++ b/code/game/objects/random/mob.dm @@ -227,7 +227,7 @@ . = ..() if(istype(., /mob/living/simple_mob)) var/mob/living/simple_mob/this_mob = . - this_mob.faction = src.faction + this_mob.copy_iff_factions(src) if (this_mob.minbodytemp > 200) // Temporary hotfix. Eventually I'll add code to change all mob vars to fit the environment they are spawned in. this_mob.minbodytemp = 200 //wander the mobs around so they aren't always in the same spots diff --git a/code/game/objects/structures/ashlander.dm b/code/game/objects/structures/ashlander.dm index f84c552bd6a..58902f3eb82 100644 --- a/code/game/objects/structures/ashlander.dm +++ b/code/game/objects/structures/ashlander.dm @@ -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, "You feel as if an eye briefly regards you, and then turns away.") - else - H.add_modifier(/datum/modifier/ashlander_blessing, 15 MINUTES) + // if(!H.faction == "lavaland") + // to_chat(user, "You feel as if an eye briefly regards you, and then turns away.") + // else + H.add_modifier(/datum/modifier/ashlander_blessing, 15 MINUTES) /datum/modifier/ashlander_blessing name = "The Mother's Blessing" diff --git a/code/game/objects/structures/props/nest.dm b/code/game/objects/structures/props/nest.dm index 2d968a94671..2e494b42e30 100644 --- a/code/game/objects/structures/props/nest.dm +++ b/code/game/objects/structures/props/nest.dm @@ -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("\The [L] crawls out of \the [src].") den_mobs += L tally++ diff --git a/code/game/objects/structures/props/swarm.dm b/code/game/objects/structures/props/swarm.dm index 0941273d10b..5f46aa88711 100644 --- a/code/game/objects/structures/props/swarm.dm +++ b/code/game/objects/structures/props/swarm.dm @@ -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) diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index 94367ea22ca..aa5a0dbbe86 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -43,6 +43,8 @@ GLOBAL_LIST_INIT(multiz_hole_baseturfs, typecacheof(list( /** * get what /turf/baseturf_bottom should be + * + * todo: using a proc is inefficient. is there a better way? like a define? */ /turf/proc/baseturf_core() // todo: this is shitcode, pull it out on maploader refactor. @@ -58,6 +60,8 @@ GLOBAL_LIST_INIT(multiz_hole_baseturfs, typecacheof(list( . = /turf/simulated/open /** * get baseturf on bottom + * + * todo: using a proc is inefficient. is there a better way? like a define? */ /turf/proc/baseturf_bottom() . = islist(baseturfs)? baseturfs[1] : baseturfs @@ -65,6 +69,8 @@ GLOBAL_LIST_INIT(multiz_hole_baseturfs, typecacheof(list( /** * get baseturf underneath + * + * todo: using a proc is inefficient. is there a better way? like a define? */ /turf/proc/baseturf_underneath() . = islist(baseturfs)? baseturfs[length(baseturfs)] : baseturfs @@ -82,6 +88,7 @@ GLOBAL_LIST_INIT(multiz_hole_baseturfs, typecacheof(list( // then we can skip all this bullshit and have proper space zmimic // as long as zm overhead isn't too high. //* THIS CANNOT CALL ANY PROCS UP UNTIL 'new path'! *// + // todo: this entire switch section is kind of ass switch(path) if(null) return diff --git a/code/modules/ai/holders/polaris/ai_holder_cooperation.dm b/code/modules/ai/holders/polaris/ai_holder_cooperation.dm index 3969afff4e3..a34408231de 100644 --- a/code/modules/ai/holders/polaris/ai_holder_cooperation.dm +++ b/code/modules/ai/holders/polaris/ai_holder_cooperation.dm @@ -32,8 +32,9 @@ // Find another AI-controlled mob in the same faction if possible. var/mob/living/first_friend + // todo: this isn't good because we now use factions for different reasons than binding, so all of the same map is often just friends under this defintion for(var/mob/living/L in living_mob_list) - if(L.faction == holder.faction && L.ai_holder) + if(L.shares_iff_faction(holder) && L.ai_holder) first_friend = L break diff --git a/code/modules/ai/holders/polaris/ai_holder_targeting.dm b/code/modules/ai/holders/polaris/ai_holder_targeting.dm index db99ba0e3f3..bb119d77f86 100644 --- a/code/modules/ai/holders/polaris/ai_holder_targeting.dm +++ b/code/modules/ai/holders/polaris/ai_holder_targeting.dm @@ -143,7 +143,7 @@ var/obj/machinery/porta_turret/P = the_target if(P.machine_stat & BROKEN) return FALSE // Already dead. - if(P.faction == holder.faction) + if(holder.has_iff_faction(P.faction)) return FALSE // Don't shoot allied turrets. if(!P.raised && !P.raising) return FALSE // Turrets won't get hurt if they're still in their cover. diff --git a/code/modules/ai/holders/polaris/interfaces.dm b/code/modules/ai/holders/polaris/interfaces.dm index cc6d1943ef7..61897499e1e 100644 --- a/code/modules/ai/holders/polaris/interfaces.dm +++ b/code/modules/ai/holders/polaris/interfaces.dm @@ -47,7 +47,7 @@ return say(message) /mob/living/proc/IIsAlly(mob/living/L) - return src.faction == L.faction + return shares_iff_faction(L) /mob/living/simple_mob/IIsAlly(mob/living/L) . = ..() diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index 6b44bb0e482..09cdcd04c83 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -53,12 +53,14 @@ var/list/blobs = list() return TRUE else if(istype(mover, /mob/living)) var/mob/living/L = mover - if(L.faction == "blob") + if(L.has_iff_faction(MOB_IFF_FACTION_BLOB)) return TRUE else if(istype(mover, /obj/projectile)) var/obj/projectile/P = mover - if(istype(P.firer) && P.firer.faction == "blob") - return TRUE + if(isliving(P.firer)) + var/mob/living/L = P.firer + if(L.has_iff_faction(MOB_IFF_FACTION_BLOB)) + return TRUE return FALSE /obj/structure/blob/examine(mob/user, dist) @@ -253,8 +255,10 @@ var/list/blobs = list() /obj/structure/blob/on_bullet_act(obj/projectile/proj, impact_flags, list/bullet_act_args) . = ..() - if(istype(proj.firer) && proj.firer.faction == "blob") - return + if(isliving(proj.firer)) + var/mob/living/L = proj.firer + if(L.has_iff_faction(MOB_IFF_FACTION_BLOB)) + return TRUE var/damage = proj.get_structure_damage() // So tasers don't hurt the blob. if(!damage) diff --git a/code/modules/blob2/blobs/factory.dm b/code/modules/blob2/blobs/factory.dm index 83f5ea4c5a1..12f8fac4b0a 100644 --- a/code/modules/blob2/blobs/factory.dm +++ b/code/modules/blob2/blobs/factory.dm @@ -35,7 +35,7 @@ var/mob/living/simple_mob/blob/spore/S = null if(overmind) S = new overmind.blob_type.spore_type(src.loc, src) - S.faction = "blob" + S.set_iff_factions(MOB_IFF_FACTION_BLOB) if(istype(S)) S.overmind = overmind overmind.blob_mobs.Add(S) diff --git a/code/modules/blob2/overmind/overmind.dm b/code/modules/blob2/overmind/overmind.dm index 12f4b176302..bee62d99dfb 100644 --- a/code/modules/blob2/overmind/overmind.dm +++ b/code/modules/blob2/overmind/overmind.dm @@ -10,7 +10,8 @@ var/list/overminds = list() see_in_dark = 8 invisibility = INVISIBILITY_OBSERVER - faction = "blob" + iff_factions = MOB_IFF_FACTION_BLOB + var/obj/structure/blob/core/blob_core = null // The blob overmind's core var/blob_points = 0 var/max_blob_points = 200 diff --git a/code/modules/blob2/overmind/powers.dm b/code/modules/blob2/overmind/powers.dm index 67429f3e8f7..e94fd9a0a58 100644 --- a/code/modules/blob2/overmind/powers.dm +++ b/code/modules/blob2/overmind/powers.dm @@ -207,7 +207,7 @@ for(var/mob/living/L in view(src)) if(L.stat == DEAD) continue // Already dying or dead. - if(L.faction == "blob") + if(L.has_iff_faction(MOB_IFF_FACTION_BLOB)) continue // No friendly fire. if(locate(/obj/structure/blob) in L.loc) continue // Already has a blob over them. diff --git a/code/modules/blob2/overmind/types.dm b/code/modules/blob2/overmind/types.dm index 9b01a843fb5..42a56f5df37 100644 --- a/code/modules/blob2/overmind/types.dm +++ b/code/modules/blob2/overmind/types.dm @@ -266,8 +266,7 @@ if(istype(S)) S.overmind = O O.blob_mobs.Add(S) - else - S.faction = "blob" + S.add_iff_faction(MOB_IFF_FACTION_BLOB) S.update_icons() /datum/blob_type/fulminant_organism/on_death(obj/structure/blob/B) @@ -277,8 +276,7 @@ if(istype(S)) S.overmind = B.overmind B.overmind.blob_mobs.Add(S) - else - S.faction = "blob" + S.add_iff_faction(MOB_IFF_FACTION_BLOB) S.update_icons() @@ -500,7 +498,7 @@ for(var/mob/living/L in range(get_turf(victim), 1)) // We don't use orange(), in case there is more than one mob on the target tile. if(L == victim) // Already hit. continue - if(L.faction == "blob") // No friendly fire + if(L.has_iff_faction(MOB_IFF_FACTION_BLOB)) continue L.blob_act() diff --git a/code/modules/ghostroles/roles/ashlander.dm b/code/modules/ghostroles/roles/ashlander.dm index b228bc81ce0..e0f0be05ccf 100644 --- a/code/modules/ghostroles/roles/ashlander.dm +++ b/code/modules/ghostroles/roles/ashlander.dm @@ -112,7 +112,7 @@ /datum/ghostrole_instantiator/human/player_static/ashlander/AfterSpawn(mob/created, list/params) . = ..() - created.faction = "lavaland" + created.set_iff_factions(MOB_IFF_FACTION_BIND_TO_MAP) created.mind.teach_crafting_recipe(ashlander_crafting) created.remove_language(/datum/language/common) diff --git a/code/modules/ghostroles/roles/pirate.dm b/code/modules/ghostroles/roles/pirate.dm index d33d16700f5..93bfa9ee038 100644 --- a/code/modules/ghostroles/roles/pirate.dm +++ b/code/modules/ghostroles/roles/pirate.dm @@ -50,7 +50,7 @@ /datum/ghostrole_instantiator/human/player_static/pirate/GetOutfit(client/C, mob/M, list/params) var/datum/outfit/outfit = ..() //var/mob/M = /mob/living/carbon/human/H - M.faction = "pirate" + M.set_iff_factions(MOB_IFF_FACTION_PIRATE) switch(params["fluff"]) if("immigrant") return /datum/outfit/pirate/immigrant diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index 0afe78ce86f..dfe40dcf534 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -428,11 +428,11 @@ /mob/living/simple_mob/animal/space/carp/holodeck/proc/set_safety(var/safe) if (safe) - faction = "neutral" + set_iff_factions(MOB_IFF_FACTION_NEUTRAL) legacy_melee_damage_lower = 0 legacy_melee_damage_upper = 0 else - faction = "carp" + set_iff_factions(MOB_IFF_FACTION_CARP) legacy_melee_damage_lower = initial(legacy_melee_damage_lower) legacy_melee_damage_upper = initial(legacy_melee_damage_upper) diff --git a/code/modules/mapping/map.dm b/code/modules/mapping/map.dm index 77d3d456985..cc028361119 100644 --- a/code/modules/mapping/map.dm +++ b/code/modules/mapping/map.dm @@ -129,8 +129,8 @@ for(var/i in 1 to length(levels)) if(ispath(levels[i])) var/datum/map_level/level_path = levels[i] - var/datum/map_level/level_instance = new level_path - level_instance.hardcoded = TRUE + var/datum/map_level/level_instance = new level_path(src) + level_instance.hardcoded = TRUE // todo: map can just also not be hardcoded levels[i] = level_instance if(levels_match_mangling_id) level_instance.mangling_id = mangling_id || id diff --git a/code/modules/mapping/map_level.dm b/code/modules/mapping/map_level.dm index 38935b04e44..9c8436799c1 100644 --- a/code/modules/mapping/map_level.dm +++ b/code/modules/mapping/map_level.dm @@ -45,23 +45,41 @@ var/base_turf = /turf/space /// base area typepath for this level var/base_area = /area/space - /// id of north zlevel - overrides linkage if set. can be set to path, autoconverts to id on new. - /// can also be set to instance - used for structs. + /// id of north zlevel - overrides linkage if set. + /// + /// * can also be set to path + /// * can also be set to instance - used for structs + /// * do not manually set it to levelpath::id, map levels generate ids dynamically! var/link_north - /// id of south zlevel - overrides linkage if set. can be set to path, autoconverts to id on new. - /// can also be set to instance - used for structs. + /// id of south zlevel - overrides linkage if set. + /// + /// * can also be set to path + /// * can also be set to instance - used for structs + /// * do not manually set it to levelpath::id, map levels generate ids dynamically! can also be set to instance - used for structs. var/link_south - /// id of west zlevel - overrides linkage if set. can be set to path, autoconverts to id on new. - /// can also be set to instance - used for structs. + /// id of west zlevel - overrides linkage if set. + /// + /// * can also be set to path + /// * can also be set to instance - used for structs + /// * do not manually set it to levelpath::id, map levels generate ids dynamically! can also be set to instance - used for structs. var/link_west - /// id of east zlevel - overrides linkage if set. can be set to path, autoconverts to id on new. - /// can also be set to instance - used for structs. + /// id of east zlevel - overrides linkage if set. + /// + /// * can also be set to path + /// * can also be set to instance - used for structs + /// * do not manually set it to levelpath::id, map levels generate ids dynamically! can also be set to instance - used for structs. var/link_east - /// id of below zlevel - overrides linkage if set. can be set to path, autoconverts to id on new. - /// can also be set to instance - used for structs. + /// id of below zlevel - overrides linkage if set. + /// + /// * can also be set to path + /// * can also be set to instance - used for structs + /// * do not manually set it to levelpath::id, map levels generate ids dynamically! can also be set to instance - used for structs. var/link_below - /// id of above zlevel - overrides linkage if set. can be set to path, autoconverts to id on new. - /// can also be set to instance - used for structs. + /// id of above zlevel - overrides linkage if set. + /// + /// * can also be set to path + /// * can also be set to instance - used for structs + /// * do not manually set it to levelpath::id, map levels generate ids dynamically! can also be set to instance - used for structs. var/link_above /// gas string / atmosphere path / atmosphere id for indoors air /// if atmosphere path, it'll be automatically packed to ID on serialize, as we don't want to serialize paths to disk. @@ -152,16 +170,6 @@ if(!isnull(parent_map)) id = "[parent_map.id]-[id]" - #define UNPACK_LINK(vname) if(ispath(vname, /datum/map_level)) { var/datum/map_level/cast_##vname = vname; vname = initial(cast_##vname.id) ; } - UNPACK_LINK(link_north) - UNPACK_LINK(link_south) - UNPACK_LINK(link_east) - UNPACK_LINK(link_west) - UNPACK_LINK(link_below) - UNPACK_LINK(link_above) - BLOCK_BYOND_BUG_2072419 - #undef UNPACK_LINK - /datum/map_level/Destroy() if(loaded) . = QDEL_HINT_LETMELIVE @@ -236,18 +244,36 @@ transition = data["transition"] if(!isnull(data["base_turf"])) base_turf = text2path(data["base_turf"]) + + // Resolve links, including if they got serlalized as typepaths. + // todo: typepaths should be trampled into ids on save instead. + var/resolving_link + var/maybe_link_path if(!isnull(data["link_north"])) - link_north = data["link_north"] + resolving_link = data["north"] + maybe_link_path = text2path(resolving_link) + link_north = ispath(maybe_link_path) ? maybe_link_path : resolving_link if(!isnull(data["link_south"])) - link_south = data["link_south"] + resolving_link = data["south"] + maybe_link_path = text2path(resolving_link) + link_south = ispath(maybe_link_path) ? maybe_link_path : resolving_link if(!isnull(data["link_above"])) - link_above = data["link_above"] + resolving_link = data["above"] + maybe_link_path = text2path(resolving_link) + link_above = ispath(maybe_link_path) ? maybe_link_path : resolving_link if(!isnull(data["link_below"])) - link_below = data["link_below"] + resolving_link = data["below"] + maybe_link_path = text2path(resolving_link) + link_below = ispath(maybe_link_path) ? maybe_link_path : resolving_link if(!isnull(data["link_west"])) - link_west = data["link_west"] + resolving_link = data["west"] + maybe_link_path = text2path(resolving_link) + link_west = ispath(maybe_link_path) ? maybe_link_path : resolving_link if(!isnull(data["link_east"])) - link_east = data["link_east"] + resolving_link = data["east"] + maybe_link_path = text2path(resolving_link) + link_east = ispath(maybe_link_path) ? maybe_link_path : resolving_link + if(!isnull(data["air_indoors"])) air_indoors = data["air_indoors"] if(!isnull(data["air_outdoors"])) diff --git a/code/modules/maps/_shim/away_spawner.dm b/code/modules/maps/_shim/away_spawner.dm index 08ed95275c1..861b714f3aa 100644 --- a/code/modules/maps/_shim/away_spawner.dm +++ b/code/modules/maps/_shim/away_spawner.dm @@ -58,7 +58,7 @@ For now this is still usable but bad. my_mob.low_priority = TRUE if(faction) - my_mob.faction = faction + my_mob.set_iff_factions(faction) if(atmos_comp) var/turf/T = get_turf(src) diff --git a/code/modules/maps/away_missions/140x140/snowfield.dm b/code/modules/maps/away_missions/140x140/snowfield.dm index 77ae30c9e42..8c1d71f1ca1 100644 --- a/code/modules/maps/away_missions/140x140/snowfield.dm +++ b/code/modules/maps/away_missions/140x140/snowfield.dm @@ -61,7 +61,8 @@ icon_gib = "bear-gib" say_list_type = /datum/say_list/polar_bear - faction = "polar" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + maxHealth = 80 health = 80 // Polar bear will fuck you up. @@ -89,13 +90,10 @@ ..() /mob/living/simple_mob/animal/sif/sakimm/polar - faction = "polar" /mob/living/simple_mob/animal/sif/diyaab/polar - faction = "polar" /mob/living/simple_mob/animal/sif/shantak/polar - faction = "polar" // -- Items -- // diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index b542ea2d1d4..64741a5c14f 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -16,7 +16,7 @@ language = "Hivemind" maxHealth = 25 health = 25 - faction = "xeno" + iff_factions = MOB_IFF_FACTION_XENOMORPH catalogue_data = list(/datum/category_item/catalogue/fauna/alien/larva) /mob/living/carbon/alien/larva/Initialize(mapload) diff --git a/code/modules/mob/living/carbon/alien/progression.dm b/code/modules/mob/living/carbon/alien/progression.dm index a76fc409c23..c082f7d2e51 100644 --- a/code/modules/mob/living/carbon/alien/progression.dm +++ b/code/modules/mob/living/carbon/alien/progression.dm @@ -30,8 +30,7 @@ transfer_languages(src, adult) - if(src.faction != "neutral") - adult.faction = src.faction + adult.copy_iff_factions(src) if(mind) mind.transfer(adult) diff --git a/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm b/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm index c43d9c05500..d0275e768bd 100644 --- a/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm +++ b/code/modules/mob/living/carbon/human/ai_controlled/ai_controlled.dm @@ -117,8 +117,6 @@ generate_gender = TRUE identifying_gender = NEUTER - faction = "xeno" - to_wear_helmet = /obj/item/clothing/head/helmet/dermal to_wear_glasses = /obj/item/clothing/glasses/goggles to_wear_mask = /obj/item/clothing/mask/gas/half diff --git a/code/modules/mob/living/living-defense-legacy.dm b/code/modules/mob/living/living-defense-legacy.dm index 6f88e783acd..ed9609f7d8f 100644 --- a/code/modules/mob/living/living-defense-legacy.dm +++ b/code/modules/mob/living/living-defense-legacy.dm @@ -136,7 +136,7 @@ ..() /mob/living/blob_act(var/obj/structure/blob/B) - if(stat == DEAD || faction == "blob") + if(stat == DEAD || has_iff_faction(MOB_IFF_FACTION_BLOB)) return var/damage = rand(30, 40) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index d65c614a6c6..9312e6a33a1 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -73,7 +73,9 @@ /// This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. var/failed_last_breath = 0 - var/lastpuke = 0 + var/lastpuke = 0//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station developers. *// + /// Makes attacks harder to land. Negative numbers increase hit chance. var/evasion = 0 diff --git a/code/modules/mob/living/movement.dm b/code/modules/mob/living/movement.dm index c67d50f33fa..f75f2182feb 100644 --- a/code/modules/mob/living/movement.dm +++ b/code/modules/mob/living/movement.dm @@ -396,7 +396,7 @@ // riding same thing, don't block each other return TRUE // can't throw blob stuff through blob stuff - if(istype(mover, /obj/structure/blob) && faction == "blob" && !mover.throwing) //Blobs should ignore things on their faction. + if(istype(mover, /obj/structure/blob) && has_iff_faction(MOB_IFF_FACTION_BLOB) && !mover.throwing) //Blobs should ignore things on their faction. return TRUE /mob/living/CheckExit(atom/movable/AM, atom/newLoc) diff --git a/code/modules/mob/living/silicon/robot/drone/swarm.dm b/code/modules/mob/living/silicon/robot/drone/swarm.dm index 5cb7268301d..8a45b86d418 100644 --- a/code/modules/mob/living/silicon/robot/drone/swarm.dm +++ b/code/modules/mob/living/silicon/robot/drone/swarm.dm @@ -3,7 +3,7 @@ real_name = "drone" icon = 'icons/mob/swarmbot.dmi' icon_state = "swarmer" - faction = "swarmer" + iff_factions = MOB_IFF_FACTION_SWARMER maxHealth = 75 health = 75 cell_emp_mult = 0.5 @@ -69,7 +69,7 @@ real_name = "drone" icon = 'icons/mob/swarmbot.dmi' icon_state = "swarmer_ranged" - faction = "swarmer" + iff_factions = MOB_IFF_FACTION_SWARMER law_type = /datum/ai_laws/swarm_drone/soldier module_type = /obj/item/robot_module/drone/swarm/ranged @@ -85,7 +85,7 @@ real_name = "drone" icon = 'icons/mob/swarmbot.dmi' icon_state = "swarmer_melee" - faction = "swarmer" + iff_factions = MOB_IFF_FACTION_SWARMER law_type = /datum/ai_laws/swarm_drone/soldier module_type = /obj/item/robot_module/drone/swarm/melee diff --git a/code/modules/mob/living/simple_mob/simple_mob.dm b/code/modules/mob/living/simple_mob/simple_mob.dm index af9e9d3dd7b..909771c1d52 100644 --- a/code/modules/mob/living/simple_mob/simple_mob.dm +++ b/code/modules/mob/living/simple_mob/simple_mob.dm @@ -14,6 +14,8 @@ mob_swap_flags = ~HEAVY mob_push_flags = ~HEAVY + iff_factions = MOB_IFF_FACTION_BIND_AUTO + //? Attacks - Basic /// melee style var/datum/unarmed_attack/melee_style diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/goat.dm b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/goat.dm index bc476272828..9eb1d0be798 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/goat.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/goat.dm @@ -16,7 +16,9 @@ icon_dead = "goat_dead" catalogue_data = list(/datum/category_item/catalogue/fauna/livestock/goat) - faction = "goat" + iff_factions = list( + MOB_IFF_FACTION_FARM_ANIMAL, + ) health = 40 maxHealth = 40 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/lythios.dm b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/lythios.dm index b6000dcdd3c..79981b31e3d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/lythios.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/farm animals/lythios.dm @@ -22,7 +22,7 @@ icon_dead = "icegoat_dead" catalogue_data = list(/datum/category_item/catalogue/fauna/livestock/icegoat) - faction = "goat" + iff_factions = MOB_IFF_FACTION_FARM_ANIMAL minbodytemp = 180 maxbodytemp = 275 @@ -117,7 +117,7 @@ icon_dead = "woolie_dead" catalogue_data = list(/datum/category_item/catalogue/fauna/livestock/woolie) - faction = "goat" + iff_factions = MOB_IFF_FACTION_FARM_ANIMAL minbodytemp = 180 maxbodytemp = 300 @@ -189,7 +189,8 @@ minbodytemp = 180 maxbodytemp = 350 - faction = "grubs" + iff_factions = MOB_IFF_FACTION_FARM_ANIMAL + maxHealth = 50 health = 50 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/_giant_spider.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/_giant_spider.dm index ecf24ffe0e5..a59f1056122 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/_giant_spider.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/_giant_spider.dm @@ -69,7 +69,8 @@ icon_dead = "guard_dead" has_eye_glow = TRUE - faction = "spiders" + iff_factions = MOB_IFF_FACTION_SPIDER + maxHealth = 200 health = 200 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/carrier.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/carrier.dm index e3aca574fd8..f59fa86255d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/carrier.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/carrier.dm @@ -60,7 +60,7 @@ swarmling.health = swarm_health swarmling.legacy_melee_damage_lower = swarm_dam_lower swarmling.legacy_melee_damage_upper = swarm_dam_upper - swarmling.faction = swarmling_faction + swarmling.set_iff_factions(swarmling_faction) swarmling.adjust_scale(0.75) new_spiders += swarmling else if(src) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/crab.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/crab.dm index d4188d3fbd5..f14c48c6dbb 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/crab.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/crab.dm @@ -10,7 +10,9 @@ name = "crab" desc = "A hard-shelled crustacean. Seems quite content to lounge around all the time." tt_desc = "E Cancer bellianus" - faction = "crabs" + + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + catalogue_data = list(/datum/category_item/catalogue/fauna/crab) icon_state = "crab" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/passive.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/passive.dm index 1a3aff961f1..1dd44c59b33 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/passive.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/passive.dm @@ -3,3 +3,7 @@ /mob/living/simple_mob/animal/passive ai_holder_type = /datum/ai_holder/polaris/simple_mob/passive mob_bump_flag = 0 + iff_factions = list( + MOB_IFF_FACTION_NEUTRAL, + MOB_IFF_FACTION_FARM_PET, + ) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm index bd25ba38076..81fd2f00028 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm @@ -24,7 +24,7 @@ mob_size = MOB_SMALL //Foxes are not smaller than cats so bumping them up to small randomized = TRUE - faction = "fox" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP response_help = "scritches" response_disarm = "gently pushes aside" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/roach/roach.dm b/code/modules/mob/living/simple_mob/subtypes/animal/roach/roach.dm index baeb4b6a8c1..649c396a415 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/roach/roach.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/roach/roach.dm @@ -62,7 +62,8 @@ see_in_dark = 6 universal_understand = 1 - faction = "roaches" + + iff_factions = MOB_IFF_FACTION_ROACH mob_size = MOB_SMALL pass_flags = ATOM_PASS_TABLE @@ -377,7 +378,7 @@ item_state = "uberfallen" icon_living = "uberfallen" icon_dead = "uberfallen_dead" - faction = "synthtide" + catalogue_data = list(/datum/category_item/catalogue/fauna/roach/uberfallen) maxHealth = 30 health = 30 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/diyaab.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/diyaab.dm index 0e68b5967b9..d1f50ecf646 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/diyaab.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/diyaab.dm @@ -19,7 +19,7 @@ tt_desc = "S Choeros hirtus" //diyaab and shantak are technically reletives! catalogue_data = list(/datum/category_item/catalogue/fauna/diyaab) - faction = "diyaab" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP icon_state = "diyaab" icon_living = "diyaab" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/duck.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/duck.dm index 34b8aef5de3..5a3124821ec 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/duck.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/duck.dm @@ -19,7 +19,7 @@ tt_desc = "S Anatidae vitriae" catalogue_data = list(/datum/category_item/catalogue/fauna/crystalduck) - faction = "duck" + iff_factions = MOB_IFF_FACTION_FARM_NEUTRAL icon_state = "duck" icon_living = "duck" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm index d09429d0ead..0369de91df8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm @@ -30,7 +30,7 @@ tt_desc = "S Carabidae glacios" catalogue_data = list(/datum/category_item/catalogue/fauna/frostfly) - faction = "diyaab" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP icon_state = "firefly" icon_living = "firefly" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/glitterfly.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/glitterfly.dm index d37f68a4758..3664d597676 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/glitterfly.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/glitterfly.dm @@ -28,7 +28,7 @@ tt_desc = "S Lepidoptera adamas" catalogue_data = list(/datum/category_item/catalogue/fauna/glitterfly) - faction = "neutral" + iff_factions = MOB_IFF_FACTION_NEUTRAL icon_state = "butterfly" icon_living = "butterfly" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/hooligan_crab.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/hooligan_crab.dm index 09bc573d829..1afaf0aec5b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/hooligan_crab.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/hooligan_crab.dm @@ -36,7 +36,7 @@ mod_min = 100 mod_max = 150 - faction = "crabs" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP maxHealth = 200 health = 200 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm index aa8b855bdc0..9874709f312 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm @@ -23,7 +23,7 @@ tt_desc = "S Felidae fluctursora" catalogue_data = list(/datum/category_item/catalogue/fauna/kururak) - faction = "kururak" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP icon_state = "bigcat" icon_living = "bigcat" @@ -292,7 +292,7 @@ continue if(!K.ai_holder) continue - if(K.faction != src.faction) + if(!K.shares_iff_faction(src)) continue var/datum/ai_holder/polaris/AI = K.ai_holder to_chat(K, SPAN_NOTICE("The pack leader wishes for you to follow them.")) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm index d031352454d..1306b7868f2 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm @@ -33,7 +33,7 @@ tt_desc = "S Hirudinea phorus" catalogue_data = list(/datum/category_item/catalogue/fauna/iceleech) - faction = "leech" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP icon_state = "leech" item_state = "brainslug" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm index 293d140e762..f607f5267a7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm @@ -17,7 +17,7 @@ tt_desc = "S Procyon cogitae" catalogue_data = list(/datum/category_item/catalogue/fauna/sakimm) - faction = "sakimm" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP icon_state = "raccoon" icon_living = "raccoon" @@ -349,4 +349,4 @@ /mob/living/simple_mob/animal/sif/sakimm/dexter name = "Dexter" desc = "A tame, oversized rodent with hands. It seems really friendly." - faction = "neutral" + iff_factions = MOB_IFF_FACTION_NEUTRAL diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/savik.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/savik.dm index b5f2bc6d75d..5ac610fd67e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/savik.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/savik.dm @@ -21,7 +21,7 @@ name = "savik" tt_desc = "S Pistris tellus" //landshark catalogue_data = list(/datum/category_item/catalogue/fauna/savik) - faction = "savik" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP icon_state = "savik" icon_living = "savik" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/shantak.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/shantak.dm index 73cd15895da..f715b466daf 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/shantak.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/shantak.dm @@ -25,7 +25,7 @@ tt_desc = "S Choeros shantak" catalogue_data = list(/datum/category_item/catalogue/fauna/shantak) - faction = "shantak" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP icon_state = "shantak" icon_living = "shantak" @@ -74,7 +74,7 @@ continue if(!S.ai_holder) continue - if(S.faction != src.faction) + if(!S.shares_iff_faction(src)) continue var/datum/ai_holder/polaris/AI = S.ai_holder AI.set_follow(src) @@ -94,4 +94,4 @@ name = "Scruffy" ai_holder_type = /datum/ai_holder/polaris/simple_mob/passive makes_dirt = 0 - faction = "neutral" + iff_factions = MOB_IFF_FACTION_NEUTRAL diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/alien.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/alien.dm index 405b220f837..0aeff455be7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/alien.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/alien.dm @@ -26,6 +26,9 @@ desc = "Warriors serve as the primary combat caste within a Hive Structure, while having fewer numbers than the endless drone hordes, they are none-the-less extremely formidable. " value = CATALOGUER_REWARD_MEDIUM +/mob/living/simple_mob/animal/space/alien + iff_factions = MOB_IFF_FACTION_XENOMORPH + /mob/living/simple_mob/animal/space/alien/warrior name = "xenomorph warrior" desc = "A feral Xenomorph that plays the part of the Hive Structures main fighter. Standing at an even larger stance than a drone, its exoskeleton is fully militarized, intended to take hits from both melee and ranged alike. Its claws can easily tear through armor and flesh, while its acid does the rest." @@ -46,7 +49,6 @@ catalogue_data = list(/datum/category_item/catalogue/fauna/feral_alien/warrior) ai_holder_type = /datum/ai_holder/polaris/simple_mob/melee/evasive - faction = "xeno" mob_class = MOB_CLASS_ABERRATION @@ -97,7 +99,6 @@ legacy_melee_damage_lower = 20 legacy_melee_damage_upper = 20 base_attack_cooldown = 6 - faction = "xeno" attack_sound = 'sound/mobs/biomorphs/drone_attack.ogg' movement_sound = 'sound/mobs/biomorphs/drone_move.ogg' catalogue_data = list(/datum/category_item/catalogue/fauna/feral_alien/drone) @@ -128,7 +129,6 @@ health = 200 legacy_melee_damage_lower = 10 legacy_melee_damage_upper = 10 - faction = "xeno" base_pixel_x = -8 movement_cooldown = 3 projectiletype = /obj/projectile/energy/neurotoxin @@ -153,7 +153,6 @@ health = 250 legacy_melee_damage_lower = 20 legacy_melee_damage_upper = 20 - faction = "xeno" movement_cooldown = 2 base_pixel_x = -8 base_pixel_y = 1 @@ -190,7 +189,6 @@ ) legacy_melee_damage_lower = 50 legacy_melee_damage_upper = 50 - faction = "xeno" movement_cooldown = 2 base_pixel_x = -17 base_pixel_y = 6 @@ -332,7 +330,6 @@ legacy_melee_damage_lower = 40 legacy_melee_damage_upper = 40 attack_armor_type = DAMAGE_MODE_PIERCE | DAMAGE_MODE_SHARP - faction = "xeno" movement_cooldown = 3 base_pixel_x = -18 base_pixel_y = 2 @@ -381,7 +378,6 @@ legacy_melee_damage_lower = 70 legacy_melee_damage_upper = 50 attack_armor_pen = 60 - faction = "xeno" movement_cooldown = 4 base_pixel_x = -15 base_pixel_y = 6 @@ -515,7 +511,6 @@ health = 300 legacy_melee_damage_lower = 35 legacy_melee_damage_upper = 40 - faction = "xeno" movement_cooldown = 0 icon_scale_x = 0.7 icon_scale_y = 0.7 @@ -687,7 +682,6 @@ health = 250 legacy_melee_damage_lower = 10 legacy_melee_damage_upper = 10 - faction = "xeno" movement_cooldown = 4 base_pixel_x = -8 base_pixel_y = 1 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/bats.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/bats.dm index e325e4fbdb7..cb3f6064c4b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/bats.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/bats.dm @@ -17,7 +17,7 @@ icon_gib = "bat_dead" catalogue_data = list(/datum/category_item/catalogue/fauna/bats) - faction = "scarybat" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP maxHealth = 20 health = 20 @@ -57,7 +57,7 @@ // Spookiest of bats /mob/living/simple_mob/animal/space/bats/cult - faction = "cult" + iff_factions = MOB_IFF_FACTION_SANGUINE_CULT supernatural = TRUE /mob/living/simple_mob/animal/space/bats/cult/cultify() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/bear.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/bear.dm index b9c903035ee..777ad7974b7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/bear.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/bear.dm @@ -19,7 +19,7 @@ icon_gib = "bear_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/space_bear) - faction = "russian" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP maxHealth = 125 health = 125 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/carp.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/carp.dm index b15d52832f9..59c791db93c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/carp.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/carp.dm @@ -34,7 +34,8 @@ icon_dead = "carp_dead" icon_gib = "carp_gib" - faction = "carp" + iff_factions = MOB_IFF_FACTION_CARP + maxHealth = 25 health = 25 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/gaslamp_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/gaslamp_vr.dm index 1d97e5bc9a5..f9213088c02 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/gaslamp_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/gaslamp_vr.dm @@ -32,7 +32,8 @@ TODO: Make them light up and heat the air when exposed to oxygen. icon_dead = "gaslamp-dead" icon = 'icons/mob/vore32x64.dmi' - faction = "virgo3b" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + maxHealth = 100 health = 100 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/goose.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/goose.dm index c6f00f33cf2..725f4d1a47e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/goose.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/goose.dm @@ -14,7 +14,7 @@ icon_dead = "goose_dead" catalogue_data = list(/datum/category_item/catalogue/fauna/goose) - faction = "geese" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP maxHealth = 30 health = 30 @@ -52,6 +52,3 @@ set category = "Abilities" add_modifier(/datum/modifier/berserk, 30 SECONDS) - -/mob/living/simple_mob/animal/space/goose/virgo3b - faction = "virgo3b" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/horing.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/horing.dm index bf95597dc56..d490b542631 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/horing.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/horing.dm @@ -9,7 +9,7 @@ icon_rest = "thrumbo_rest" maxHealth = 500 health = 500 - faction = "horing" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP pixel_x = -16 special_attack_min_range = 3 special_attack_max_range = 8 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/mouse_army.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/mouse_army.dm index f76c3a8289a..123116061f7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/mouse_army.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/mouse_army.dm @@ -35,7 +35,8 @@ icon_living = "mouse_gray" icon_dead = "mouse_gray_dead" icon_rest = "mouse_gray_sleep" - faction = "mouse_army" + + iff_factions = MOB_IFF_FACTION_FARM_PEST maxHealth = 50 health = 50 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm b/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm index 1cf183f2550..9ee40ccb70c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/space/worm.dm @@ -15,7 +15,7 @@ movement_cooldown = 0 movement_sound = 'sound/effects/sand_step.ogg' - faction = "worm" + iff_factions = MOB_IFF_FACTION_WORM status_flags = 0 universal_speak = 0 @@ -143,7 +143,7 @@ var/mob/living/simple_mob/animal/space/space_worm/newSegment = new segment_type(loc) current.Attach(newSegment) current = newSegment - current.faction = faction + current.copy_iff_factions(src) /mob/living/simple_mob/animal/space/space_worm/head/verb/toggle_devour() set name = "Toggle Feeding" @@ -404,7 +404,7 @@ /mob/living/simple_mob/animal/space/space_worm/proc/update_body_faction() if(next) // Keep us on the same page, here. - faction = next.faction + copy_iff_factions(next) if(previous) previous.update_body_faction() return 1 diff --git a/code/modules/mob/living/simple_mob/subtypes/blob/blob.dm b/code/modules/mob/living/simple_mob/subtypes/blob/blob.dm index 361a27500e4..9d815960f40 100644 --- a/code/modules/mob/living/simple_mob/subtypes/blob/blob.dm +++ b/code/modules/mob/living/simple_mob/subtypes/blob/blob.dm @@ -33,7 +33,7 @@ /mob/living/simple_mob/blob icon = 'icons/mob/blob.dmi' pass_flags = ATOM_PASS_BLOB | ATOM_PASS_TABLE - faction = "blob" + iff_factions = MOB_IFF_FACTION_BLOB catalogue_data = list(/datum/category_item/catalogue/fauna/blob) heat_damage_per_tick = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Eddy.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Eddy.dm index af439b298ee..f1b32eb16bc 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Eddy.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Eddy.dm @@ -12,7 +12,6 @@ icon_living = "Eddy" icon_dead = "e_head" icon_rest = "Eddy" - faction = "horror" icon = 'icons/mob/horror_show/GHPS.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/Eddy) diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Master.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Master.dm index d49a957e3d4..4c43aea4205 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Master.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Master.dm @@ -12,7 +12,6 @@ icon_living = "Helix" icon_dead = "m_dead" icon_rest = "Helix" - faction = "horror" icon = 'icons/mob/horror_show/master.dmi' icon_gib = "generic_gib" anchored = 1 diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Rickey.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Rickey.dm index c949dafb96e..94281d20ad8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Rickey.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Rickey.dm @@ -12,7 +12,6 @@ icon_living = "Rickey" icon_dead = "r_head" icon_rest = "Rickey" - faction = "horror" icon = 'icons/mob/horror_show/GHPS.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/Rickey) diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Smiley.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Smiley.dm index c5f532332c8..4cb631309df 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Smiley.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Smiley.dm @@ -12,7 +12,6 @@ icon_living = "Smiley" icon_dead = "s_head" icon_rest = "Smiley" - faction = "horror" icon = 'icons/mob/horror_show/GHPS.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/Smiley) diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Steve.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Steve.dm index 507441749a7..9b9c28a3a21 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Steve.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Steve.dm @@ -12,7 +12,6 @@ icon_living = "Steve" icon_dead = "sg_head" icon_rest = "Steve" - faction = "horror" icon = 'icons/mob/horror_show/GHPS.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/Steve) diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/Willy.dm b/code/modules/mob/living/simple_mob/subtypes/horror/Willy.dm index 8e7fe09304d..63ec0ecd54b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/Willy.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/Willy.dm @@ -12,7 +12,6 @@ icon_living = "Willy" icon_dead = "w_head" icon_rest = "Willy" - faction = "horror" icon = 'icons/mob/horror_show/GHPS.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/Willy) diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/bradley.dm b/code/modules/mob/living/simple_mob/subtypes/horror/bradley.dm index e10d0e55705..dd8a6f962a3 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/bradley.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/bradley.dm @@ -12,7 +12,6 @@ icon_living = "Bradley" icon_dead = "b_head" icon_rest = "Bradley" - faction = "horror" icon = 'icons/mob/horror_show/GHPS.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/bradley) diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/horror .dm b/code/modules/mob/living/simple_mob/subtypes/horror/horror .dm index f14bd678eff..e543b849daa 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/horror .dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/horror .dm @@ -27,7 +27,7 @@ /mob/living/simple_mob/horror tt_desc = "Homo Horrificus" - faction = "horror" + iff_factions = MOB_IFF_FACTION_MUTANT icon = 'icons/mob/horror_show/GHPS.dmi' icon_gib = "generic_gib" taser_kill = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/sally.dm b/code/modules/mob/living/simple_mob/subtypes/horror/sally.dm index b051923756d..64ec477eddc 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/sally.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/sally.dm @@ -12,7 +12,6 @@ icon_living = "Sally" icon_dead = "ws_head" icon_rest = "Sally" - faction = "horror" icon = 'icons/mob/horror_show/widehorror.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/Sally) diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/shittytim.dm b/code/modules/mob/living/simple_mob/subtypes/horror/shittytim.dm index 2c051b4d630..4b79e05eed1 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/shittytim.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/shittytim.dm @@ -12,7 +12,6 @@ icon_living = "shitty_tim" icon_dead = "tst_head" icon_rest = "shitty_tim" - faction = "horror" icon = 'icons/mob/horror_show/tallhorror.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/BigTim) diff --git a/code/modules/mob/living/simple_mob/subtypes/horror/timling.dm b/code/modules/mob/living/simple_mob/subtypes/horror/timling.dm index 60fe08909b2..41bfde71be4 100644 --- a/code/modules/mob/living/simple_mob/subtypes/horror/timling.dm +++ b/code/modules/mob/living/simple_mob/subtypes/horror/timling.dm @@ -12,7 +12,6 @@ icon_living = "timling" icon_dead = "tt_head" icon_rest = "timling" - faction = "horror" icon = 'icons/mob/horror_show/tallhorror.dmi' icon_gib = "generic_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/horror/TinyTim) diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/clown.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/clown.dm index e9e9ee7e338..f659511aa4b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/clown.dm +++ b/code/modules/mob/living/simple_mob/subtypes/humanoid/clown.dm @@ -30,7 +30,7 @@ icon_gib = "clown_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/clown) - faction = "clown" + iff_factions = MOB_IFF_FACTION_MERCENARY_GROUP("clown") loot_list = list(/obj/item/bikehorn = 100) @@ -145,7 +145,7 @@ var/mob_count = 0 // Are there enough mobs to consider grenading? var/turf/T = get_turf(A) for(var/mob/M in range(T, 2)) - if(M.faction == faction) // Don't grenade our friends + if(shares_iff_faction(M)) return FALSE if(M in oview(src, special_attack_max_range)) // And lets check if we can actually see at least two people before we throw a grenade if(!M.stat) // Dead things don't warrant a grenade diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/cultist.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/cultist.dm index bf0caab9bcb..cb3ef4c8622 100644 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/cultist.dm +++ b/code/modules/mob/living/simple_mob/subtypes/humanoid/cultist.dm @@ -38,7 +38,7 @@ tt_desc = "NULL" icon = 'icons/mob/cult.dmi' icon_state = "initiate" - faction = "cult" + iff_factions = MOB_IFF_FACTION_SANGUINE_CULT mob_class = MOB_CLASS_DEMONIC /datum/category_item/catalogue/fauna/cultist/human @@ -222,8 +222,6 @@ health = 75 catalogue_data = list(/datum/category_item/catalogue/fauna/cultist/tesh) - faction = "cult" - status_flags = 0 response_help = "pokes" @@ -273,8 +271,6 @@ health = 200 catalogue_data = list(/datum/category_item/catalogue/fauna/cultist/lizard) - faction = "cult" - status_flags = 0 response_help = "pokes" @@ -324,8 +320,6 @@ health = 150 catalogue_data = list(/datum/category_item/catalogue/fauna/cultist/caster) - faction = "cult" - status_flags = 0 response_help = "pokes" @@ -375,8 +369,6 @@ health = 150 catalogue_data = list(/datum/category_item/catalogue/fauna/cultist/initiate) - faction = "cult" - status_flags = 0 response_help = "pokes" @@ -423,8 +415,6 @@ health = 75 catalogue_data = list(/datum/category_item/catalogue/fauna/cultist/castertesh) - faction = "cult" - status_flags = 0 response_help = "pokes" @@ -472,7 +462,6 @@ desc = "A heavily armed cultist with a mirror shield that hurts to look at." icon_state = "cult_elite" icon_living = "cult_elite" - faction = "cult" catalogue_data = list(/datum/category_item/catalogue/fauna/cultist/elite) status_flags = 0 @@ -550,8 +539,6 @@ health = 300 catalogue_data = list(/datum/category_item/catalogue/fauna/cultist/magus) - faction = "cult" - status_flags = 0 response_help = "pokes" @@ -623,8 +610,6 @@ health = 300 catalogue_data = list(/datum/category_item/catalogue/fauna/cultist/hunter) - faction = "cult" - status_flags = 0 response_help = "pokes" diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/humanoid_vr.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/humanoid_vr.dm index f21bd3b164c..24322713677 100644 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/humanoid_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/humanoid/humanoid_vr.dm @@ -3,9 +3,3 @@ /mob/living/simple_mob/humanoid/pirate/ranged ai_holder_type = /datum/ai_holder/polaris/simple_mob/ranged - -/mob/living/simple_mob/humanoid/russian - ai_holder_type = /datum/ai_holder/polaris/simple_mob/melee - -/mob/living/simple_mob/humanoid/russian/ranged - ai_holder_type = /datum/ai_holder/polaris/simple_mob/ranged diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm index 344444ff822..d4e4f8e7996 100644 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm +++ b/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm @@ -54,7 +54,7 @@ icon_gib = "syndicate_gib" catalogue_data = list(/datum/category_item/catalogue/fauna/mercenary/human) - faction = "syndicate" + iff_factions = MOB_IFF_FACTION_MERCENARY movement_cooldown = 2 status_flags = 0 @@ -95,7 +95,7 @@ var/mob_count = 0 // Are there enough mobs to consider grenading? var/turf/T = get_turf(A) for(var/mob/M in range(T, 2)) - if(M.faction == faction) // Don't grenade our friends + if(shares_iff_faction(M)) return FALSE if(M in oview(src, special_attack_max_range)) // And lets check if we can actually see at least two people before we throw a grenade if(!M.stat) // Dead things don't warrant a grenade @@ -607,7 +607,7 @@ icon_living = "voxpirate" icon_dead = "voxpirate_dead" - faction = "voxpirate" + iff_factions = MOB_IFF_FACTION_PIRATE movement_cooldown = 4 status_flags = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/pirates.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/pirates.dm index 64056054591..2a8d48e8be0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/pirates.dm +++ b/code/modules/mob/living/simple_mob/subtypes/humanoid/pirates.dm @@ -25,7 +25,7 @@ icon_dead = "piratemelee_dead" catalogue_data = list(/datum/category_item/catalogue/fauna/pirate) - faction = "pirate" + iff_factions = MOB_IFF_FACTION_PIRATE response_help = "pushes" response_disarm = "shoves" diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/possessed.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/possessed.dm index c3e1564fca6..e539869578a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/possessed.dm +++ b/code/modules/mob/living/simple_mob/subtypes/humanoid/possessed.dm @@ -8,7 +8,7 @@ icon = 'icons/mob/possessed.dmi' icon_state = "eva-rig" - faction = "Possessed" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP movement_cooldown = 10 health = 200 diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/russian.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/russian.dm deleted file mode 100644 index 7de7e01468e..00000000000 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/russian.dm +++ /dev/null @@ -1,48 +0,0 @@ -/datum/category_item/catalogue/fauna/russian - name = "Russians" - desc = "After the Human Diaspora, but before the Final War, many \ - nations hosted their own colonial efforts out into the stars. Although \ - most human settlers live in culturally diverse environments, some of \ - those habitats which trace their lineage back to the Diaspora have remained \ - culturally homogenous. Sometimes xenophobic, and sometimes simply \ - nationalistic, these cultures function just as well as their counterparts. \ - Many of these communities draw their ancestry directly back to Old Russia. \ - Due to this, ethnic and genetic Russians remain heavily represented on the \ - Galactic stage." - value = CATALOGUER_REWARD_TRIVIAL - -/mob/living/simple_mob/humanoid/russian - name = "russian" - desc = "For the Motherland!" - tt_desc = "E Homo sapiens" - icon_state = "russianmelee" - icon_living = "russianmelee" - icon_dead = "russianmelee_dead" - icon_gib = "syndicate_gib" - catalogue_data = list(/datum/category_item/catalogue/fauna/russian) - - faction = "russian" - - response_help = "pokes" - response_disarm = "shoves" - response_harm = "hits" - - harm_intent_damage = 5 - legacy_melee_damage_lower = 15 - legacy_melee_damage_upper = 15 - attacktext = list("punched") - - loot_list = list(/obj/item/material/knife = 100) - - corpse = /obj/spawner/corpse/russian - -/mob/living/simple_mob/humanoid/russian/ranged - icon_state = "russianranged" - icon_living = "russianranged" - - projectiletype = /obj/projectile/bullet - projectilesound = 'sound/weapons/Gunshot4.ogg' - - loot_list = list(/obj/item/gun/ballistic/revolver/mateba = 100) - - corpse = /obj/spawner/corpse/russian/ranged diff --git a/code/modules/mob/living/simple_mob/subtypes/lavaland/goliath.dm b/code/modules/mob/living/simple_mob/subtypes/lavaland/goliath.dm index c9cc8d269a2..ff11f5cdb89 100644 --- a/code/modules/mob/living/simple_mob/subtypes/lavaland/goliath.dm +++ b/code/modules/mob/living/simple_mob/subtypes/lavaland/goliath.dm @@ -74,7 +74,8 @@ hide_amount = 10 exotic_amount = 10 - faction = "lavaland" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + speak_emote = list("bellows") say_list_type = /datum/say_list/goliath ai_holder_type = /datum/ai_holder/polaris/simple_mob/melee/goliath diff --git a/code/modules/mob/living/simple_mob/subtypes/lavaland/gutshank.dm b/code/modules/mob/living/simple_mob/subtypes/lavaland/gutshank.dm index 6efce8ef437..efea68a50c1 100644 --- a/code/modules/mob/living/simple_mob/subtypes/lavaland/gutshank.dm +++ b/code/modules/mob/living/simple_mob/subtypes/lavaland/gutshank.dm @@ -66,7 +66,8 @@ bone_type = /obj/item/stack/material/chitin bone_amount = 5 - faction = "lavaland" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + speak_emote = list("chatters") say_list_type = /datum/say_list/gutshank ai_holder_type = /datum/ai_holder/polaris/simple_mob/melee @@ -187,7 +188,8 @@ bone_type = /obj/item/stack/material/chitin bone_amount = 5 - faction = "lavaland" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + speak_emote = list("chatters") say_list_type = /datum/say_list/gutshank //I changed the ai_holder from simple/melee to retaliate/coop because when riding a Shank, it would override user inputs to charge non-faction mobs. Which is annoying. @@ -219,8 +221,9 @@ /mob/living/simple_mob/animal/shank/proc/RenameMount() var/mob/M = usr - if(!M.mind) return 0 - if(!M.faction == src.faction) + if(!M.mind) + return 0 + if(!shares_iff_faction(M)) to_chat(M, "You don't feel familiar enough with this beast to name it.") return 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/lavaland/stormdrifter.dm b/code/modules/mob/living/simple_mob/subtypes/lavaland/stormdrifter.dm index 3e7d894f96e..7538a59ae6a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/lavaland/stormdrifter.dm +++ b/code/modules/mob/living/simple_mob/subtypes/lavaland/stormdrifter.dm @@ -67,7 +67,8 @@ bone_amount = 0 exotic_amount = 1 - faction = "lavaland" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + speak_emote = list("rumbles") say_list_type = /datum/say_list/stormdrifter ai_holder_type = /datum/ai_holder/polaris/simple_mob/stormdrifter @@ -172,8 +173,9 @@ /mob/living/simple_mob/animal/stormdrifter/bull/proc/RenameMount() var/mob/M = usr - if(!M.mind) return 0 - if(!M.faction == src.faction) + if(!M.mind) + return 0 + if(!shares_iff_faction(M)) to_chat(M, "You don't feel familiar enough with this beast to name it.") return 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/combat_drone.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/combat_drone.dm index 1b69c418208..ccc4a81b2d3 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/combat_drone.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/combat_drone.dm @@ -39,7 +39,7 @@ icon_dead = "drone_dead" has_eye_glow = TRUE - faction = "malf_drone" + iff_factions = MOB_IFF_FACTION_MERCENARY maxHealth = 50 // Shield has 150 for total of 200. health = 50 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/corrupt_maint_drone_vr.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/corrupt_maint_drone_vr.dm index 289d3f1f124..782fa602fdd 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/corrupt_maint_drone_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/corrupt_maint_drone_vr.dm @@ -26,7 +26,7 @@ icon_living = "corrupt-repairbot" hovering = FALSE // Can trigger landmines. - faction = "hivebot" + iff_factions = MOB_IFF_FACTION_HIVEBOT maxHealth = 25 health = 25 movement_cooldown = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/cyber_horror/cyber_horror.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/cyber_horror/cyber_horror.dm index 1f2841dc4cd..ffc0042e0b9 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/cyber_horror/cyber_horror.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/cyber_horror/cyber_horror.dm @@ -22,7 +22,7 @@ icon_gib = "cyber_horror_dead" catalogue_data = list(/datum/category_item/catalogue/fauna/cyberhorror) - faction = "synthtide" + iff_factions = MOB_IFF_FACTION_MUTANT ai_holder_type = /datum/ai_holder/polaris/simple_mob/melee/evasive @@ -462,7 +462,7 @@ var/mob_count = 0 // Are there enough mobs? var/turf/T = get_turf(A) for(var/mob/M in range(T, 2)) - if(M.faction == faction) // Don't grenade our friends + if(shares_iff_faction(M)) return FALSE if(M in oview(src, special_attack_max_range)) if(!M.stat) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/disbot_vr.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/disbot_vr.dm index 5b2946eed9f..8ed30cebead 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/disbot_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/disbot_vr.dm @@ -35,7 +35,9 @@ response_help = "pets the" response_disarm = "gently pushes aside the" response_harm = "hits the" - faction = "vagrant" + + iff_factions = MOB_IFF_FACTION_SWARMER + harm_intent_damage = 3 legacy_melee_damage_lower = 6 legacy_melee_damage_upper = 9 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm index 1ae4a547415..d1363048708 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm @@ -20,7 +20,7 @@ maxHealth = 300 catalogue_data = list(/datum/category_item/catalogue/technology/drone/technomancer_golem) - faction = "golem" + iff_factions = MOB_IFF_FACTION_NEUTRAL // bad faction to use but whatever response_help = "pets" response_disarm = "pushes away" diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/enigma_hivebot.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/enigma_hivebot.dm index a495df25563..3b4b35fd926 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/enigma_hivebot.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/enigma_hivebot.dm @@ -2,6 +2,9 @@ // Enigma hivebots are usually significantly tougher than baseline Hivebots, and are modified with salvaged abductor parts. // These Hivebots are often meant for Event purposes, and carry a different faction than baseline Hivebots. Use these carefully! +/mob/living/simple_mob/mechanical/hivebot/enigma + iff_factions = MOB_IFF_FACTION_HIVEBOT + // Code Stuff /mob/living/simple_mob/mechanical/hivebot/enigma/death() ..() @@ -85,7 +88,6 @@ movement_cooldown = 4 icon_scale_x = 1.4 icon_scale_y = 1.4 - faction = "enigma" attack_sound = 'sound/enigma/enigma_hit2.ogg' movement_sound = 'sound/enigma/enigma_move2.ogg' ai_holder_type = /datum/ai_holder/polaris/simple_mob/hivebot @@ -126,7 +128,6 @@ legacy_melee_damage_upper = 20 base_attack_cooldown = 6 movement_cooldown = 1 - faction = "enigma" attack_sound = 'sound/enigma/enigma_hit.ogg' movement_sound = 'sound/enigma/enigma_move.ogg' ai_holder_type = /datum/ai_holder/polaris/simple_mob/hivebot @@ -156,7 +157,6 @@ movement_cooldown = 5 base_pixel_x = 1.5 base_pixel_y = 1.5 - faction = "enigma" attack_sound = 'sound/weapons/slash.ogg' movement_sound = 'sound/enigma/enigma_move.ogg' ai_holder_type = /datum/ai_holder/polaris/simple_mob/event @@ -182,7 +182,6 @@ legacy_melee_damage_lower = 10 legacy_melee_damage_upper = 10 movement_cooldown = 2 - faction = "enigma" attack_sound = 'sound/items/drill_hit.ogg' movement_sound = 'sound/enigma/enigma_move.ogg' ai_holder_type = /datum/ai_holder/polaris/simple_mob/event @@ -213,7 +212,6 @@ legacy_melee_damage_lower = 0 legacy_melee_damage_upper = 0 movement_cooldown = 6 - faction = "enigma" movement_sound = 'sound/enigma/enigma_move.ogg' ai_holder_type = /datum/ai_holder/polaris/simple_mob/ranged/kiting projectiletype = /obj/projectile/beam/cyan/hivebot @@ -253,7 +251,6 @@ legacy_melee_damage_lower = 20 legacy_melee_damage_upper = 20 movement_cooldown = 6 - faction = "enigma" attack_sound = 'sound/enigma/enigma_hit2.ogg' movement_sound = 'sound/enigma/enigma_move2.ogg' icon_scale_x = 1.1 @@ -301,7 +298,6 @@ legacy_melee_damage_lower = 5 legacy_melee_damage_upper = 5 movement_cooldown = 2 - faction = "enigma" movement_sound = 'sound/enigma/enigma_move.ogg' ai_holder_type = /datum/ai_holder/polaris/simple_mob/hivebot projectiletype = /obj/projectile/beam/weak @@ -327,7 +323,6 @@ legacy_melee_damage_lower = 5 legacy_melee_damage_upper = 5 movement_cooldown = 4 - faction = "enigma" movement_sound = 'sound/enigma/enigma_move.ogg' ai_holder_type = /datum/ai_holder/polaris/simple_mob/ranged/sniper projectiletype = /obj/projectile/beam/xray @@ -353,7 +348,6 @@ legacy_melee_damage_lower = 0 legacy_melee_damage_upper = 0 movement_cooldown = 2 - faction = "enigma" movement_sound = 'sound/enigma/enigma_move.ogg' ai_holder_type = /datum/ai_holder/polaris/simple_mob/ranged/kiting projectiletype = /obj/projectile/ion @@ -370,7 +364,6 @@ attack_sound = 'sound/enigma/enigma_hit2.ogg' icon_state = "mimir" icon_living = "mimir" - faction = "enigma" icon_scale_x = 1.3 icon_scale_y = 1.3 movement_cooldown = 3 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm index 5f5f37fc1c0..f16bc3c8923 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm @@ -29,7 +29,7 @@ icon_living = "basic" catalogue_data = list(/datum/category_item/catalogue/technology/drone/hivebot/basic) - faction = "hivebot" + iff_factions = MOB_IFF_FACTION_HIVEBOT maxHealth = 3 LASERS_TO_KILL health = 3 LASERS_TO_KILL diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/support.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/support.dm index c6a5eb97c47..55356b748a8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/support.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/support.dm @@ -54,7 +54,7 @@ for(var/mob/living/L in hearers(7, src)) if(!L.ai_holder) continue - if(L.faction != src.faction) + if(!L.shares_iff_faction(src)) continue var/datum/ai_holder/polaris/AI = L.ai_holder AI.set_follow(src) diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm index 3ec87c9c34f..560154dc30d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm @@ -7,7 +7,8 @@ desc = "A big stompy mech!" icon = 'icons/mecha/mecha.dmi' - faction = "syndicate" + iff_factions = MOB_IFF_FACTION_MERCENARY + movement_cooldown = 5 movement_sound = "mechstep" // This gets fed into playsound(), which can also take strings as a 'group' of sound files. turn_sound = 'sound/mecha/mechturn.ogg' @@ -70,7 +71,7 @@ // 'Eject' our pilot, if one exists. if(pilot_type) var/mob/living/L = new pilot_type(loc) - L.faction = src.faction + L.copy_iff_factions(src) new wreckage(loc) // Leave some wreckage. diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/micro.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/micro.dm index e1db2ddcf48..2c097410608 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/micro.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/micro.dm @@ -19,7 +19,8 @@ icon = 'icons/mecha/micro.dmi' icon_state = "whisker" wreckage = /obj/structure/loot_pile/mecha/mouse_tank - faction = "mouse_army" + + iff_factions = MOB_IFF_FACTION_FARM_PEST maxHealth = 150 armor_legacy_mob = list( diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/ripley.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/ripley.dm index 5a39727e599..af36e6f16cf 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/ripley.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/ripley.dm @@ -81,7 +81,7 @@ desc = "A Ripley modified by pirates. Sports additional riveted armor plating and a jury rigged machine gun in addition to its hull piercing drill." catalogue_data = list(/datum/category_item/catalogue/technology/ripley) icon_state = "pirate" - faction = "pirate" + iff_factions = MOB_IFF_FACTION_PIRATE wreckage = /obj/structure/loot_pile/mecha/ripley/pirate maxHealth = 250 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mechanical.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mechanical.dm index 6dff7160241..2ff147313e0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mechanical.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mechanical.dm @@ -22,7 +22,7 @@ return TRUE /mob/living/simple_mob/mechanical/speech_bubble_appearance() - return faction != "neutral" ? "synthetic_evil" : "machine" + return !has_iff_faction(MOB_IFF_FACTION_NEUTRAL) ? "synthetic_evil" : "machine" // Fix for Virgo 2's Surface /mob/living/simple_mob/mechanical diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/viscerator.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/viscerator.dm index e813fda8edb..1aaa2b0cfae 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/viscerator.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/viscerator.dm @@ -27,7 +27,7 @@ icon_living = "viscerator_attack" hovering = TRUE // Won't trigger landmines. - faction = "syndicate" + iff_factions = MOB_IFF_FACTION_MERCENARY maxHealth = 15 health = 15 movement_cooldown = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/ward/monitor_ward.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/ward/monitor_ward.dm index 0d8dfd04478..00646d8cf5d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/ward/monitor_ward.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/ward/monitor_ward.dm @@ -40,7 +40,7 @@ // For PoIs. /mob/living/simple_mob/mechanical/ward/monitor/syndicate - faction = "syndicate" + iff_factions = MOB_IFF_FACTION_MERCENARY /mob/living/simple_mob/mechanical/ward/monitor/crew icon_state = "ward-nt" diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/ward/ward.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/ward/ward.dm index 4d5f2614f1b..faed7952ab9 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/ward/ward.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/ward/ward.dm @@ -13,7 +13,8 @@ response_help = "pets" response_disarm = "swats away" response_harm = "punches" - faction = "wards" // Needed as most human mobs are in neutral faction. The owner is generally except from any ward hostility regardless. + + iff_factions = MOB_IFF_FACTION_HOSTILE // Needed as most human mobs are in neutral faction. The owner is generally except from any ward hostility regardless. maxHealth = 15 health = 15 diff --git a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm index 03085a30346..b191aaf8ba4 100644 --- a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm +++ b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm @@ -81,7 +81,7 @@ "rad" = 100) can_be_antagged = TRUE - faction = "cult" + iff_factions = MOB_IFF_FACTION_SANGUINE_CULT supernatural = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/occult/creature.dm b/code/modules/mob/living/simple_mob/subtypes/occult/creature.dm index 31c898afc52..39252ebffce 100644 --- a/code/modules/mob/living/simple_mob/subtypes/occult/creature.dm +++ b/code/modules/mob/living/simple_mob/subtypes/occult/creature.dm @@ -15,7 +15,7 @@ mob_class = MOB_CLASS_ABERRATION - faction = "creature" + iff_factions = MOB_IFF_FACTION_MUTANT maxHealth = 40 health = 40 @@ -61,7 +61,7 @@ /mob/living/simple_mob/creature/cult mob_class = MOB_CLASS_DEMONIC - faction = "cult" + iff_factions = MOB_IFF_FACTION_SANGUINE_CULT min_oxy = 0 max_oxy = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/occult/faithless.dm b/code/modules/mob/living/simple_mob/subtypes/occult/faithless.dm index 21bd5de9e9e..c48e9849195 100644 --- a/code/modules/mob/living/simple_mob/subtypes/occult/faithless.dm +++ b/code/modules/mob/living/simple_mob/subtypes/occult/faithless.dm @@ -12,7 +12,7 @@ icon_dead = "faithless_dead" catalogue_data = list(/datum/category_item/catalogue/fauna/horror) - faction = "faithless" + iff_factions = MOB_IFF_FACTION_MUTANT mob_class = MOB_CLASS_DEMONIC @@ -74,7 +74,7 @@ // Cult Variant /mob/living/simple_mob/faithless/cult - faction = "cult" + iff_factions = MOB_IFF_FACTION_SANGUINE_CULT supernatural = TRUE /mob/living/simple_mob/faithless/cult/cultify() diff --git a/code/modules/mob/living/simple_mob/subtypes/occult/living_statue.dm b/code/modules/mob/living/simple_mob/subtypes/occult/living_statue.dm index 55c7f5b6b9a..52506c83b6b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/occult/living_statue.dm +++ b/code/modules/mob/living/simple_mob/subtypes/occult/living_statue.dm @@ -7,7 +7,7 @@ icon_state = "human_male" gender = NEUTER - faction = list("statue") + iff_factions = MOB_IFF_FACTION_STATUE mob_class = MOB_CLASS_ABERRATION diff --git a/code/modules/mob/living/simple_mob/subtypes/plant/tomato.dm b/code/modules/mob/living/simple_mob/subtypes/plant/tomato.dm index c90f7124de0..9501930ae69 100644 --- a/code/modules/mob/living/simple_mob/subtypes/plant/tomato.dm +++ b/code/modules/mob/living/simple_mob/subtypes/plant/tomato.dm @@ -15,7 +15,7 @@ mob_class = MOB_CLASS_PLANT - faction = "plants" + iff_factions = MOB_IFF_FACTION_PLANT maxHealth = 15 health = 15 poison_resist = 1.0 diff --git a/code/modules/mob/living/simple_mob/subtypes/plant/tree.dm b/code/modules/mob/living/simple_mob/subtypes/plant/tree.dm index d9bfb0a66ce..c68277f1d10 100644 --- a/code/modules/mob/living/simple_mob/subtypes/plant/tree.dm +++ b/code/modules/mob/living/simple_mob/subtypes/plant/tree.dm @@ -18,7 +18,11 @@ mob_class = MOB_CLASS_PLANT - faction = "plants" + iff_factions = list( + MOB_IFF_FACTION_BIND_TO_MAP, + MOB_IFF_FACTION_PLANT, + ) + maxHealth = 250 health = 250 poison_resist = 1.0 diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm b/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm index 228f3d15498..2218f6ab57f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm @@ -24,7 +24,7 @@ gender = NEUTER catalogue_data = list(/datum/category_item/catalogue/fauna/slime) - faction = "slime" // Note that slimes are hostile to other slimes of different color regardless of faction (unless Unified). + iff_factions = MOB_IFF_FACTION_SLIME // Note that slimes are hostile to other slimes of different color regardless of faction (unless Unified). maxHealth = 150 movement_cooldown = 0 pass_flags = ATOM_PASS_TABLE diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm index 9bbc247c3f5..be522087644 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm @@ -175,7 +175,7 @@ var/datum/ai_holder/polaris/simple_mob/xenobio_slime/AI = ai_holder AI.pacify() - faction = "neutral" + set_iff_factions(MOB_IFF_FACTION_NEUTRAL) // If for whatever reason the mob AI (or player) decides to try to attack something anyways. legacy_melee_damage_upper = 0 @@ -183,7 +183,6 @@ update_mood() - // These are verbs so that player slimes can evolve/split. /mob/living/simple_mob/slime/xenobio/verb/evolve() set category = "Slime" @@ -279,7 +278,7 @@ if(untamable_inherit) baby.untamable = untamable baby.untamable_inherit = untamable_inherit - baby.faction = faction + baby.copy_iff_factions(src) baby.friends = friends.Copy() if(no_step != 1) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/bee.dm b/code/modules/mob/living/simple_mob/subtypes/vore/bee.dm index 28d0fb60f01..106cc664ccc 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/bee.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/bee.dm @@ -44,7 +44,7 @@ max_n2 = 0 minbodytemp = 0 - faction = "bee" + iff_factions = MOB_IFF_FACTION_FARM_ANIMAL var/poison_type = "spidertoxin" // The reagent that gets injected when it attacks, can be changed to different toxin. var/poison_chance = 10 // Chance for injection to occur. diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/corrupt_hounds.dm b/code/modules/mob/living/simple_mob/subtypes/vore/corrupt_hounds.dm index 0313e5be44b..406dc242ca9 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/corrupt_hounds.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/corrupt_hounds.dm @@ -22,7 +22,7 @@ icon = 'icons/mob/vore64x32.dmi' has_eye_glow = TRUE - faction = "hivebot" + iff_factions = MOB_IFF_FACTION_HIVEBOT maxHealth = 200 health = 200 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/deathclaw.dm b/code/modules/mob/living/simple_mob/subtypes/vore/deathclaw.dm index 60bc6d985d2..5f90d6cc94a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/deathclaw.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/deathclaw.dm @@ -17,7 +17,7 @@ attacktext = list("mauled") - faction = "deathclaw" + iff_factions = MOB_IFF_FACTION_MUTANT maxHealth = 200 health = 200 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon.dm b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon.dm index ff6d8c6ae4b..ffdace5c060 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/demon/demon.dm @@ -11,9 +11,10 @@ icon_rest = "boxfox_rest" icon = 'icons/mob/demon_vr.dmi' - faction = "demon" - maxHealth = 30 - health = 30 + iff_factions = MOB_IFF_FACTION_SANGUINE_CULT + + maxHealth = 300 + health = 300 movement_cooldown = 0 vision_innate = /datum/vision/baseline/demon @@ -33,8 +34,8 @@ response_disarm = "pushes" response_harm = "hits" - legacy_melee_damage_lower = 3 - legacy_melee_damage_upper = 1 + legacy_melee_damage_lower = 10 + legacy_melee_damage_upper = 20 attacktext = list("clawed") diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/dino.dm b/code/modules/mob/living/simple_mob/subtypes/vore/dino.dm index 3db981881bd..3483b9ed344 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/dino.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/dino.dm @@ -12,6 +12,7 @@ randomized = TRUE ai_holder_type = /datum/ai_holder/polaris/simple_mob/melee + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP // By default, this is what most vore mobs are capable of. response_help = "pets" @@ -45,4 +46,3 @@ swallowTime = 1 SECOND // Hungry little bastards. /mob/living/simple_mob/vore/aggressive/dino/virgo3b - faction = "virgo3b" diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/dragon.dm b/code/modules/mob/living/simple_mob/subtypes/vore/dragon.dm index 8581053f9ef..6f282cb1e88 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/dragon.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/dragon.dm @@ -7,7 +7,8 @@ icon_state = "reddragon" icon = 'icons/mob/vore64x64.dmi' - faction = "dragon" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + maxHealth = 500 // Boss health = 500 randomized = TRUE @@ -42,7 +43,6 @@ /mob/living/simple_mob/vore/aggressive/dragon/virgo3b maxHealth = 200 health = 200 - faction = "virgo3b" /datum/say_list/dragonboss say_got_target = list("roars and snaps it jaws!") diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/fennec.dm b/code/modules/mob/living/simple_mob/subtypes/vore/fennec.dm index e4fdab4758b..d0fb4cf782d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/fennec.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/fennec.dm @@ -17,7 +17,8 @@ icon_rest = "fennec_rest" icon = 'icons/mob/vore.dmi' - faction = "fennec" + iff_factions = MOB_IFF_FACTION_FARM_NEUTRAL + maxHealth = 30 health = 30 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/fennix.dm b/code/modules/mob/living/simple_mob/subtypes/vore/fennix.dm index 6273c8adc28..8a3bbd6545a 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/fennix.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/fennix.dm @@ -8,7 +8,8 @@ icon_dead = "fennix_dead" icon = 'icons/mob/vore.dmi' - faction = "fennec" // Will protec other fenfens + iff_factions = MOB_IFF_FACTION_FARM_NEUTRAL + maxHealth = 60 health = 60 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/horse.dm b/code/modules/mob/living/simple_mob/subtypes/vore/horse.dm index 99a1e209835..65e1f008a2b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/horse.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/horse.dm @@ -19,7 +19,8 @@ icon_dead = "horse-dead" icon = 'icons/mob/animal.dmi' - faction = "horse" + iff_factions = MOB_IFF_FACTION_FARM_ANIMAL + maxHealth = 60 health = 60 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/jelly.dm b/code/modules/mob/living/simple_mob/subtypes/vore/jelly.dm index 5f454b39b52..84be80f1699 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/jelly.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/jelly.dm @@ -16,7 +16,6 @@ icon_state = "jelly" icon = 'icons/mob/vore.dmi' - faction = "virgo2" maxHealth = 50 health = 50 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/mimic.dm b/code/modules/mob/living/simple_mob/subtypes/vore/mimic.dm index d605984192c..c6739e6c714 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/mimic.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/mimic.dm @@ -63,7 +63,7 @@ icon_living = "mimicopen" icon = 'icons/mob/animal.dmi' - faction = "mimic" + iff_factions = MOB_IFF_FACTION_CHIMERIC maxHealth = 125 health = 125 @@ -351,8 +351,6 @@ icon_state = "wmimicopen" icon_living = "wmimicopen" - faction = "mimic" - maxHealth = 100 health = 100 movement_cooldown = 5 @@ -395,8 +393,6 @@ icon_state = "tmimicopen" icon_living = "tmimicopen" - faction = "mimic" - maxHealth = 125 health = 125 movement_cooldown = 7 @@ -436,8 +432,6 @@ icon_state = "pmimicopen" icon_living = "pmimicopen" - faction = "mimic" - maxHealth = 150 health = 150 movement_cooldown = 7 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm b/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm index 7d28db4ad0e..29ea3126cd4 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/otie.dm @@ -15,7 +15,6 @@ icon_living = "otie" icon_dead = "otie-dead" icon_rest = "otie_rest" - faction = "otie" maxHealth = 150 health = 150 randomized = TRUE @@ -53,7 +52,6 @@ icon_living = "photie" icon_dead = "photie-dead" icon_rest = "photie_rest" - faction = "virgo3b" tame_chance = 5 // Only a 1 in 20 chance of success. It's feral. What do you expect? // Lazy way of making sure this otie survives outside. min_oxy = 0 @@ -74,7 +72,6 @@ icon_living = "hotie" icon_dead = "hotie-dead" icon_rest = "hotie_rest" - faction = "cult" tame_chance = 20 // Lazy way of making sure this otie survives outside. min_oxy = 0 @@ -91,13 +88,13 @@ /mob/living/simple_mob/otie/red/friendly //gets the pet2tame feature and doesn't kill you right away name = "red otie" desc = "Seems this ominous looking longdog has been infused with wicked infernal forces. This one seems rather peaceful though." - faction = "neutral" + iff_factions = MOB_IFF_FACTION_NEUTRAL tamed = 1 /mob/living/simple_mob/otie/friendly //gets the pet2tame feature and doesn't kill you right away name = "otie" desc = "The classic bioengineered longdog. This one might even tolerate you!" - faction = "neutral" + iff_factions = MOB_IFF_FACTION_NEUTRAL tamed = 1 /mob/living/simple_mob/otie/cotie //same as above but has a little collar :v @@ -106,7 +103,7 @@ icon_state = "cotie" icon_living = "cotie" icon_rest = "cotie_rest" - faction = "neutral" + iff_factions = MOB_IFF_FACTION_NEUTRAL tamed = 1 /mob/living/simple_mob/otie/cotie/phoron //friendly phoron pup with collar @@ -134,12 +131,11 @@ icon_living = "sotie" icon_rest = "sotie_rest" icon_dead = "sotie-dead" - faction = "neutral" + iff_factions = MOB_IFF_FACTION_NEUTRAL maxHealth = 200 //armored or something health = 200 tamed = 1 has_eye_glow = TRUE - loot_list = list(/obj/item/clothing/glasses/sunglasses/sechud,/obj/item/clothing/suit/armor/vest/alt) /mob/living/simple_mob/otie/security/phoron name = "mutated guard otie" @@ -194,7 +190,7 @@ AI.set_follow(friend) if(tamed != 1) tamed = 1 - faction = M.faction + copy_iff_factions(M) sleep(1 SECOND) if(INTENT_GRAB) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/panther.dm b/code/modules/mob/living/simple_mob/subtypes/vore/panther.dm index 196981a2436..d2fdfb75314 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/panther.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/panther.dm @@ -17,7 +17,8 @@ icon_dead = "panther-dead" icon = 'icons/mob/vore64x64.dmi' - faction = "panther" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP + maxHealth = 200 health = 200 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/rat.dm b/code/modules/mob/living/simple_mob/subtypes/vore/rat.dm index 2101732ed4d..a7fafe8a6de 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/rat.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/rat.dm @@ -15,7 +15,7 @@ icon_living = "rous" icon_dead = "rous-dead" icon_rest = "rous_rest" - faction = "mouse" + iff_factions = MOB_IFF_FACTION_FARM_PEST icon = 'icons/mob/vore64x32.dmi' maxHealth = 150 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/redpanda.dm b/code/modules/mob/living/simple_mob/subtypes/vore/redpanda.dm index 96d20383ec1..02948915e3b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/redpanda.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/redpanda.dm @@ -18,7 +18,8 @@ icon_rest = "wah_rest" icon = 'icons/mob/vore.dmi' - faction = "redpanda" //stop naming stuff vaguely + iff_factions = MOB_IFF_FACTION_NEUTRAL + maxHealth = 30 health = 30 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/snake.dm b/code/modules/mob/living/simple_mob/subtypes/vore/snake.dm index 1c08dc55d98..52c594aab27 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/snake.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/snake.dm @@ -19,7 +19,8 @@ icon_state = "snake" icon = 'icons/mob/vore64x64.dmi' - faction = "snake" + iff_factions = MOB_IFF_FACTION_FARM_PEST + maxHealth = 200 health = 200 randomized = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm index 4ec007004a1..c5548a658e1 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub.dm @@ -35,7 +35,8 @@ GLOBAL_LIST_EMPTY(solargrubs) //var/adult_forms = "/mob/living/simple_mob/vore/solarmoth" // CHOMPEDIT VAR that decides what mob the queen form is. ex /mob/living/simple_mob/subtypes/vore/solarmoth; CitRP: Without lunarmoth, quoted out for fun; // CHOMPEDIT End, Rykka waz here. *pawstamp* - faction = "grubs" + iff_factions = MOB_IFF_FACTION_GRUB + maxHealth = 50 //grubs can take a lot of harm health = 50 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm index 16fa82ea690..e2a65637aa0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm @@ -19,7 +19,7 @@ var/global/list/grub_machine_overlays = list() meat_amount = 2 meat_type = /obj/item/reagent_containers/food/snacks/meat/grubmeat - faction = "grubs" + iff_factions = MOB_IFF_FACTION_GRUB response_help = "pats" response_disarm = "nudges" diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solarmoth_ch.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solarmoth.dm similarity index 99% rename from code/modules/mob/living/simple_mob/subtypes/vore/solarmoth_ch.dm rename to code/modules/mob/living/simple_mob/subtypes/vore/solarmoth.dm index 06cd0580240..0f07603df03 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solarmoth_ch.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solarmoth.dm @@ -30,7 +30,8 @@ var/emp_light = 7 var/emp_long = 10 - faction = "grubs" + iff_factions = MOB_IFF_FACTION_GRUB + maxHealth = 200 // Tanky fuckers. health = 200 // Tanky fuckers. diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/wolf.dm b/code/modules/mob/living/simple_mob/subtypes/vore/wolf.dm index f87e3aac491..5eca2385fca 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/wolf.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/wolf.dm @@ -34,8 +34,8 @@ // Adds Phoron Wolf /mob/living/simple_mob/animal/wolf/phoron + iff_factions = MOB_IFF_FACTION_BIND_TO_LEVEL - faction = "underdark" movement_cooldown = 0 harm_intent_damage = 5 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/wolfgirl.dm b/code/modules/mob/living/simple_mob/subtypes/vore/wolfgirl.dm index fc2c1605e28..10ed8ab0163 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/wolfgirl.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/wolfgirl.dm @@ -8,7 +8,6 @@ icon_dead = "wolfgirl-dead" icon = 'icons/mob/vore.dmi' - faction = "wolfgirl" maxHealth = 30 health = 30 diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm b/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm index 9e74a4a7a9c..4b1aa4a4c0d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/zz_vore_overrides.dm @@ -24,6 +24,3 @@ /mob/living/simple_mob/animal/space/carp/holographic /mob/living/simple_mob/animal/space/carp/holographic - -/mob/living/simple_mob/animal/passive/mouse - faction = "mouse" //Giving mice a faction so certain mobs can get along with them. diff --git a/code/modules/mob/mob-iff.dm b/code/modules/mob/mob-iff.dm new file mode 100644 index 00000000000..b4d9ec466f7 --- /dev/null +++ b/code/modules/mob/mob-iff.dm @@ -0,0 +1,117 @@ +//* This file is explicitly licensed under the MIT license. *// +//* Copyright (c) 2024 Citadel Station developers. *// + +//* Basic mob-level IFF system. *// +//* *// +//* This is not on mob AI holder so non-AI holders can access it too. *// + +// todo: typelist them where possible + +//* Init *// + +/mob/proc/init_iff() + if(!iff_factions) + return + set_iff_factions(iff_factions) + +/** + * * descriptor can be a string or a list + * + * @return string faction + */ +/mob/proc/process_iff_faction(descriptor) + if(islist(descriptor)) + switch(descriptor[1]) + if(MOB_IFF_FACTION_BIND_TO_LEVEL) + // if get z returns null it works as an assoc lookup returning null + var/prepend = SSmapping.ordered_levels[get_z(src)]?.id || "unkw" + return "[prepend]-[descriptor[descriptor[1]]]" + if(MOB_IFF_FACTION_BIND_TO_MAP) + // if get z returns null it works as an assoc lookup returning null + var/datum/map_level/level = SSmapping.ordered_levels[get_z(src)] + var/prepend = level?.parent_map?.id || level?.id || "unkw" + return "bind-[prepend]-[descriptor[descriptor[1]]]" + switch(descriptor) + if(MOB_IFF_FACTION_BIND_TO_LEVEL) + // if get z returns null it works as an assoc lookup returning null + var/prepend = SSmapping.ordered_levels[get_z(src)]?.id || "unkw" + return "bind-[prepend]" + if(MOB_IFF_FACTION_BIND_TO_MAP) + // if get z returns null it works as an assoc lookup returning null + var/datum/map_level/level = SSmapping.ordered_levels[get_z(src)] + var/prepend = level?.parent_map?.id || level?.id || "unkw" + return "bind-[prepend]" + else + return descriptor + +//* Direct Operations *// + +/mob/proc/add_iff_faction(string) + if(islist(iff_factions)) + iff_factions |= string + else if(iff_factions) + iff_factions = list(iff_factions, string) + else + iff_factions = string + +/mob/proc/remove_iff_faction(string) + if(islist(iff_factions)) + iff_factions -= string + if(!length(iff_factions)) + iff_factions = null + else if(iff_factions == string) + iff_factions = null + +/mob/proc/clear_iff_factions() + iff_factions = null + +/mob/proc/set_iff_factions(new_factions) + if(islist(new_factions)) + for(var/i in 1 to length(new_factions)) + var/faction = new_factions[i] + if(islist(faction) || ispath(faction) || faction[1] == "!") + faction = process_iff_faction(faction) + new_factions[i] = faction + continue // nothing otherwise to do yet + else if(islist(new_factions) || ispath(new_factions) || new_factions[1] == "!") + new_factions = process_iff_faction(new_factions) + + iff_factions = new_factions + +/mob/proc/has_iff_faction(string) + return islist(iff_factions) ? (string in iff_factions) : (iff_factions == string) + +//* Generation / Resolution *// + +/** + * Gets, or generates an unique IFF faction for ourselves. + * + * * Behavior depends on DF_USE_TAG being in use for us. + */ +/mob/proc/unique_iff_faction() + var/unique_faction = "mob-[tag]" + if(!has_iff_faction(unique_faction)) + add_iff_faction(unique_faction) + return unique_faction + +//* Operations - With Other Mob *// + +/mob/proc/copy_iff_factions(mob/other) + iff_factions = islist(other.iff_factions)? other.iff_factions:Copy() : other.iff_factions + +/** + * Returns a truthy value if we share atleast one IFF faction string with another mob, falsy otherwise. + * + * * does not necessarily return TRUE or FALSE! + */ +/mob/proc/shares_iff_faction(mob/other) + if(islist(iff_factions)) + if(islist(other.iff_factions)) + return length(iff_factions & other.iff_factions) + else if(other.iff_factions) + return other.iff_factions in iff_factions + else if(iff_factions) + if(islist(other.iff_factions)) + return iff_factions in other.iff_factions + else if(other.iff_factions) + return iff_factions == other.iff_factions diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6c4eccc05ae..359eaaac1a1 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -47,6 +47,8 @@ initialize_actionspeed() // ssd overlay update_ssd_overlay() + // iff factions + init_iff() return ..() /mob/Destroy() diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 3c939862f21..5484c23990a 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -117,6 +117,13 @@ /// our inventory datum, if any. var/datum/inventory/inventory + //* IFF *// + /// our IFF factions + /// + /// * Do not read directly, use [code/modules/mob/mob-iff.dm] helpers. + /// * can be set to a string, or a list of strings. + var/iff_factions = MOB_IFF_FACTION_NEUTRAL + //! Size //! todo kill this with fire it should just be part of icon_scale_x/y. /// our size multiplier @@ -293,7 +300,7 @@ var/voice_name = "unidentifiable voice" ///Used for checking whether hostile simple animals will attack you, possibly more stuff later. - var/faction = "neutral" + var/_faction = "neutral" /// To prevent pAIs/mice/etc from getting antag in autotraitor and future auto- modes. Uses inheritance instead of a bunch of typechecks. // todo: what the fuck var/can_be_antagged = FALSE diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 47ea91b2463..2696567e57e 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -500,7 +500,7 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM) if(!istype(src.ai_holder, /datum/ai_holder/polaris)) return SAFE_PERP var/datum/ai_holder/polaris/ai_holder = src.ai_holder - if(has_polaris_AI() && ai_holder.hostile && faction != "neutral") + if(has_polaris_AI() && ai_holder.hostile && !has_iff_faction(MOB_IFF_FACTION_NEUTRAL)) threatcount += 4 return threatcount diff --git a/code/modules/power/fission/engine.dm b/code/modules/power/fission/engine.dm index 07109bcc683..8e64670dd63 100644 --- a/code/modules/power/fission/engine.dm +++ b/code/modules/power/fission/engine.dm @@ -479,7 +479,7 @@ I'm commenting this out until I have time to make this less stupid. // fuck this /obj/nuclear_mistake_spawner name = "the Underdark's revenge" - desc = "hardcoded piece of that that should never be seen PLEASE report this if you do" + desc = "hardcoded piece of trash that should never be seen PLEASE report this if you do" icon = 'icons/mob/screen1.dmi' icon_state = "x" invisibility = 101 @@ -536,7 +536,8 @@ I'm commenting this out until I have time to make this less stupid. my_mob.low_priority = TRUE if(faction) - my_mob.faction = faction + my_mob.clear_iff_factions() + my_mob.add_iff_faction(faction) if(atmos_comp) var/turf/T = get_turf(src) diff --git a/code/modules/rogueminer_vr/roguemines_mobs.dm b/code/modules/rogueminer_vr/roguemines_mobs.dm index 14389fb38ef..25ecd8c57a9 100644 --- a/code/modules/rogueminer_vr/roguemines_mobs.dm +++ b/code/modules/rogueminer_vr/roguemines_mobs.dm @@ -1,23 +1,23 @@ /mob/living/simple_mob/animal/space/bats/roguemines - faction = "roguemines" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP /mob/living/simple_mob/animal/space/carp/roguemines - faction = "roguemines" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP /mob/living/simple_mob/animal/space/goose/roguemines - faction = "roguemines" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP /mob/living/simple_mob/animal/wolf/space/roguemines - faction = "roguemines" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP /mob/living/simple_mob/animal/space/carp/large/roguemines - faction = "roguemines" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP /mob/living/simple_mob/animal/space/bear/roguemines - faction = "roguemines" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP /mob/living/simple_mob/vore/aggressive/corrupthound/space/roguemines - faction = "roguemines" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP /mob/living/simple_mob/animal/space/carp/large/huge/roguemines - faction = "roguemines" + iff_factions = MOB_IFF_FACTION_BIND_TO_MAP diff --git a/code/modules/rogueminer_vr/zonemaster.dm b/code/modules/rogueminer_vr/zonemaster.dm index 8bede43f5d8..aa9d20d5cc8 100644 --- a/code/modules/rogueminer_vr/zonemaster.dm +++ b/code/modules/rogueminer_vr/zonemaster.dm @@ -295,7 +295,7 @@ var/mobchoice = pickweight(rm_controller.mobs["tier[rm_controller.diffstep]"]) rm_controller.dbg("ZM(p): Picked [mobchoice] to spawn.") var/mob/living/newmob = new mobchoice(get_turf(SP)) - newmob.faction = "asteroid_belt" + newmob.set_iff_factions(MOB_IFF_FACTION_BIND_AUTO) spawned_mobs += newmob if(delay) sleep(delay) diff --git a/code/modules/species/protean/protean_blob.dm b/code/modules/species/protean/protean_blob.dm index cf3f64c32e1..165146f9288 100644 --- a/code/modules/species/protean/protean_blob.dm +++ b/code/modules/species/protean/protean_blob.dm @@ -9,7 +9,8 @@ icon_rest = "rest" icon_dead = "puddle" - faction = "neutral" + iff_factions = MOB_IFF_FACTION_NEUTRAL + maxHealth = 250 health = 250 say_list_type = /datum/say_list/protean_blob diff --git a/code/modules/species/species.dm b/code/modules/species/species.dm index a675e88c324..49f83c734ec 100644 --- a/code/modules/species/species.dm +++ b/code/modules/species/species.dm @@ -84,6 +84,13 @@ /// do we have a species statpanel? var/species_statpanel = FALSE + //* IFF *// + + /// Inherent IFF factions + /// + /// * This isn't the best way to do this, but it works. + var/list/iff_factions_inherent + //? Icons /// Normal icon set. var/icobase = 'icons/mob/species/human/body.dmi' @@ -545,6 +552,9 @@ for(var/datum/ability/ability as anything in abilities) ability.associate(H) + for(var/faction in iff_factions_inherent) + H.add_iff_faction(faction) + /** * called when we are removed from a mob */ @@ -572,6 +582,9 @@ for(var/datum/ability/ability as anything in abilities) ability.disassociate(H) + for(var/faction in iff_factions_inherent) + H.remove_iff_faction(faction) + /datum/species/proc/sanitize_species_name(var/name) return sanitizeName(name, MAX_NAME_LEN) diff --git a/code/modules/species/xenomorphs/alien_species.dm b/code/modules/species/xenomorphs/alien_species.dm index eb33fdd386b..e8eaf1b9b05 100644 --- a/code/modules/species/xenomorphs/alien_species.dm +++ b/code/modules/species/xenomorphs/alien_species.dm @@ -85,6 +85,10 @@ BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unseverable/xeno) ) + iff_factions_inherent = list( + MOB_IFF_FACTION_XENOMORPH, + ) + /datum/species/xenos/get_bodytype_legacy() return SPECIES_XENO diff --git a/code/modules/species/xenomorphs/xenomorphs.dm b/code/modules/species/xenomorphs/xenomorphs.dm index 2c44851e4fa..ce9a6e4f548 100644 --- a/code/modules/species/xenomorphs/xenomorphs.dm +++ b/code/modules/species/xenomorphs/xenomorphs.dm @@ -10,22 +10,22 @@ /mob/living/carbon/human/xdrone species = /datum/species/xenos/drone h_style = "Bald" - faction = "xeno" + iff_factions = MOB_IFF_FACTION_XENOMORPH /mob/living/carbon/human/xsentinel species = /datum/species/xenos/sentinel h_style = "Bald" - faction = "xeno" + iff_factions = MOB_IFF_FACTION_XENOMORPH /mob/living/carbon/human/xhunter species = /datum/species/xenos/hunter h_style = "Bald" - faction = "xeno" + iff_factions = MOB_IFF_FACTION_XENOMORPH /mob/living/carbon/human/xqueen species = /datum/species/xenos/queen h_style = "Bald" - faction = "xeno" + iff_factions = MOB_IFF_FACTION_XENOMORPH // I feel like we should generalize/condense down all the various icon-rendering antag procs. /*---------------------------------------- diff --git a/code/modules/tension/tension.dm b/code/modules/tension/tension.dm index 8886f777f6d..7c4fd2bff7d 100644 --- a/code/modules/tension/tension.dm +++ b/code/modules/tension/tension.dm @@ -69,7 +69,7 @@ if(incapacitated(INCAPACITATION_DISABLED)) return 0 // Can't currently hurt you if it's stunned. - var/friendly = threatened.faction == faction + var/friendly = threatened.shares_iff_faction(src) var/threat = guess_threat_level(threatened) diff --git a/code/modules/turbolift/turbolift_map.dm b/code/modules/turbolift/turbolift_map.dm index 0f0dd99deec..c2609f27403 100644 --- a/code/modules/turbolift/turbolift_map.dm +++ b/code/modules/turbolift/turbolift_map.dm @@ -162,7 +162,7 @@ return // Update path appropriately if needed. - var/swap_to = /turf/simulated/open + var/swap_to = /turf/baseturf_bottom if(cz == uz) // Elevator. if(wall_type && (tx == ux || ty == uy || tx == ex || ty == ey) && !(tx >= door_x1 && tx <= door_x2 && ty >= door_y1 && ty <= door_y2)) swap_to = wall_type diff --git a/code/modules/xenobio/items/slimepotions.dm b/code/modules/xenobio/items/slimepotions.dm index fcd47d828ed..8e663c9f84e 100644 --- a/code/modules/xenobio/items/slimepotions.dm +++ b/code/modules/xenobio/items/slimepotions.dm @@ -204,6 +204,7 @@ qdel(src) // Makes slimes not kill (most) humanoids but still fight spiders/carp/bears/etc. +// todo: this is janky as shit /obj/item/slimepotion/loyalty name = "slime loyalty agent" desc = "A potent chemical mix that makes an animal deeply loyal to the species of whoever applies this, and will attack threats to them." @@ -225,7 +226,7 @@ if(S.stat == DEAD) to_chat(user, SPAN_WARNING("The animal is dead!")) return - if(S.faction == user.faction) + if(S.shares_iff_faction(user)) to_chat(user, SPAN_WARNING("\The [S] is already loyal to your species!")) return if(!S.has_polaris_AI()) @@ -239,7 +240,7 @@ to_chat(user, SPAN_NOTICE("You feed \the [S] the agent. It will now try to murder things that want to murder you instead.")) to_chat(S, SPAN_NOTICE("\The [user] feeds you \the [src], and feel that the others will regard you as an outsider now.")) - S.faction = user.faction + S.copy_iff_factions() AI.lost_target() // So hostile things stop attacking people even if not hostile anymore. playsound(src, 'sound/effects/bubbles.ogg', 50, 1) qdel(src) diff --git a/maps/away_missions/140x140/listeningpost.dmm b/maps/away_missions/140x140/listeningpost.dmm index 1789fec7c81..b9abaf16d1b 100644 --- a/maps/away_missions/140x140/listeningpost.dmm +++ b/maps/away_missions/140x140/listeningpost.dmm @@ -61,8 +61,7 @@ dir = 4 }, /mob/living/simple_mob/humanoid/merc{ - desc = "A weary looking syndicate operative."; - faction = "syndicate" + desc = "A weary looking syndicate operative." }, /turf/simulated/floor, /area/awaymission/listeningpost) diff --git a/maps/away_missions/140x140/zoo.dmm b/maps/away_missions/140x140/zoo.dmm index e87147a3208..e69738ee316 100644 --- a/maps/away_missions/140x140/zoo.dmm +++ b/maps/away_missions/140x140/zoo.dmm @@ -1539,7 +1539,7 @@ /area/awaymission/zoo/pirateship) "eB" = ( /mob/living/simple_mob/animal/space/alien{ - faction = "pirate" + iff_factions = "pirate" }, /turf/simulated/floor/plating, /area/awaymission/zoo/pirateship) @@ -2843,7 +2843,7 @@ "ik" = ( /mob/living/simple_mob/humanoid/merc/ranged{ desc = "He doesn't seem like he's looking for a fight."; - faction = "neutral"; + iff_factions = "neutral"; friendly = "hugs"; name = "Mercenary" }, @@ -3606,7 +3606,7 @@ /area/awaymission/zoo) "jT" = ( /mob/living/simple_mob/animal/passive/chicken{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass0" @@ -3620,7 +3620,7 @@ /area/awaymission/zoo) "jV" = ( /mob/living/simple_mob/animal/passive/dog/corgi/puppy{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass0" @@ -3847,7 +3847,7 @@ "kH" = ( /obj/structure/flora/ausbushes/ywflowers, /mob/living/simple_mob/animal/passive/bird/parrot/kea{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -3862,7 +3862,7 @@ "kK" = ( /obj/structure/flora/ausbushes/pointybush, /mob/living/simple_mob/animal/passive/bird/parrot/pink_cockatoo{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -3933,7 +3933,7 @@ /area/awaymission/zoo) "kV" = ( /mob/living/simple_mob/animal/passive/cat{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/wood, /area/awaymission/zoo) @@ -3981,7 +3981,7 @@ /area/awaymission/zoo) "le" = ( /mob/living/simple_mob/animal/passive/bird/parrot/white_cockatoo{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -3992,7 +3992,7 @@ "lg" = ( /obj/structure/flora/ausbushes/fullgrass, /mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/grey{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -4003,14 +4003,14 @@ "li" = ( /obj/structure/flora/ausbushes/brflowers, /mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/yellowish{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) "lj" = ( /obj/structure/flora/ausbushes/ppflowers, /mob/living/simple_mob/animal/passive/bird/parrot/budgerigar/bluegreen{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -4028,7 +4028,7 @@ /area/awaymission/zoo) "lm" = ( /mob/living/simple_mob/horse{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/wood, /area/awaymission/zoo) @@ -4167,14 +4167,14 @@ /area/awaymission/zoo) "lI" = ( /mob/living/simple_mob/animal/passive/bird/parrot/budgerigar{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) "lJ" = ( /obj/structure/flora/ausbushes/sunnybush, /mob/living/simple_mob/animal/passive/bird/parrot/cockatiel{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -4188,7 +4188,7 @@ /area/awaymission/zoo) "lM" = ( /mob/living/simple_mob/animal/passive/cow{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass0" @@ -4280,13 +4280,13 @@ /area/awaymission/zoo) "mb" = ( /mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/yellowish{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) "mc" = ( /mob/living/simple_mob/animal/passive/bird/parrot/white_caique{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -4798,7 +4798,7 @@ /area/awaymission/zoo) "nt" = ( /mob/living/simple_mob/animal/passive/tindalos{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "fullgrass0" @@ -5073,7 +5073,7 @@ /area/awaymission/zoo) "of" = ( /mob/living/simple_mob/vore/aggressive/frog{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass{ icon_state = "grass2" @@ -5104,7 +5104,7 @@ /area/awaymission/zoo) "oj" = ( /mob/living/simple_mob/animal/passive/tindalos{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "fullgrass1" @@ -5173,7 +5173,7 @@ /area/awaymission/zoo) "ov" = ( /mob/living/simple_mob/animal/passive/dog/corgi{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/lino, /area/awaymission/zoo) @@ -5204,7 +5204,7 @@ "oA" = ( /obj/structure/flora/ausbushes/lavendergrass, /mob/living/simple_mob/animal/passive/cat{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass4" @@ -5212,7 +5212,7 @@ /area/awaymission/zoo) "oB" = ( /mob/living/simple_mob/vore/bee{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass{ icon_state = "hive"; @@ -5280,7 +5280,7 @@ /area/awaymission/zoo) "oL" = ( /mob/living/simple_mob/vore/aggressive/giant_snake{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass3" @@ -5336,7 +5336,7 @@ /area/awaymission/zoo) "oU" = ( /mob/living/simple_mob/animal/space/bats{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -5435,13 +5435,13 @@ /area/awaymission/zoo) "pg" = ( /mob/living/carbon/human/sharkm{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/water, /area/awaymission/zoo) "ph" = ( /mob/living/simple_mob/animal/passive/tindalos{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass2" @@ -5461,7 +5461,7 @@ /area/awaymission/zoo) "pk" = ( /mob/living/simple_mob/vore/aggressive/giant_snake{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass0" @@ -5475,7 +5475,7 @@ /area/awaymission/zoo) "pm" = ( /mob/living/simple_mob/animal/passive/cat{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "fullgrass3" @@ -5568,7 +5568,7 @@ /area/awaymission/zoo) "pB" = ( /mob/living/simple_mob/animal/passive/tindalos{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass0" @@ -5588,7 +5588,7 @@ /area/awaymission/zoo) "pE" = ( /mob/living/simple_mob/animal/passive/cat{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass2" @@ -6005,7 +6005,7 @@ /area/awaymission/zoo) "qJ" = ( /mob/living/carbon/human/sparram{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -6044,7 +6044,7 @@ /area/awaymission/zoo) "qR" = ( /mob/living/simple_mob/animal/passive/mouse{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/plating, /area/awaymission/zoo) @@ -6092,7 +6092,7 @@ /area/awaymission/zoo) "rb" = ( /mob/living/carbon/human/neaera{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass{ icon_state = "grass2" @@ -6129,7 +6129,7 @@ /area/awaymission/zoo) "rf" = ( /mob/living/simple_mob/animal/sif/diyaab{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) @@ -6374,7 +6374,7 @@ /area/awaymission/zoo) "rL" = ( /mob/living/simple_mob/animal/space/alien{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert{ icon_state = "asteroidplating"; @@ -6434,7 +6434,7 @@ /area/awaymission/zoo) "rS" = ( /mob/living/simple_mob/animal/space/alien/drone{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert{ icon_state = "asteroidplating"; @@ -6475,7 +6475,7 @@ /area/awaymission/zoo) "rW" = ( /mob/living/simple_mob/animal/passive/penguin{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) @@ -6499,7 +6499,7 @@ /area/awaymission/zoo) "rZ" = ( /mob/living/simple_mob/animal/passive/snake{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "fullgrass1" @@ -6515,7 +6515,7 @@ name = "rocky edge" }, /mob/living/simple_mob/animal/space/alien/drone{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert{ icon_state = "asteroidplating"; @@ -6535,28 +6535,28 @@ "sc" = ( /obj/effect/floor_decal/industrial/outline/yellow, /mob/living/simple_mob/vore/aggressive/mimic{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/tiled/neutral, /area/awaymission/zoo) "sd" = ( /obj/structure/flora/ausbushes/fullgrass, /mob/living/simple_mob/animal/passive/penguin{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) "se" = ( /obj/effect/floor_decal/asteroid, /mob/living/simple_mob/animal/space/bear{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "sf" = ( /obj/structure/flora/grass/both, /mob/living/simple_mob/animal/passive/penguin{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) @@ -6584,7 +6584,7 @@ /area/awaymission/zoo) "sl" = ( /mob/living/simple_mob/animal/space/carp{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/space, /area/awaymission/zoo) @@ -6622,7 +6622,7 @@ name = "rocky edge" }, /mob/living/simple_mob/animal/space/alien/drone{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert{ icon_state = "asteroidplating"; @@ -6646,7 +6646,7 @@ "sq" = ( /obj/effect/spider/stickyweb, /mob/living/simple_mob/animal/giant_spider/hunter{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -6655,14 +6655,14 @@ icon_state = "cocoon_large2" }, /mob/living/simple_mob/animal/giant_spider/hunter{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "ss" = ( /obj/effect/spider/stickyweb, /mob/living/simple_mob/animal/giant_spider{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -6744,7 +6744,7 @@ name = "rocky edge" }, /mob/living/simple_mob/animal/space/alien{ - faction = "zoo"; + iff_factions = "!bind-map"; name = "invisible alien hunter" }, /turf/simulated/floor/holofloor/desert{ @@ -6760,7 +6760,7 @@ icon_state = "cocoon3" }, /mob/living/simple_mob/animal/giant_spider/hunter{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -6769,7 +6769,7 @@ icon_state = "cobweb1" }, /mob/living/simple_mob/animal/giant_spider/hunter{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -6778,7 +6778,7 @@ icon_state = "cocoon2" }, /mob/living/simple_mob/animal/giant_spider/nurse{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -6787,7 +6787,7 @@ icon_state = "cobweb2" }, /mob/living/simple_mob/animal/giant_spider{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -6799,7 +6799,7 @@ icon_state = "cocoon_large1" }, /mob/living/simple_mob/animal/giant_spider{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -6812,19 +6812,19 @@ icon_state = "cocoon_large3" }, /mob/living/simple_mob/animal/giant_spider/hunter{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "sI" = ( /mob/living/simple_mob/animal/giant_spider{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "sJ" = ( /mob/living/simple_mob/animal/passive/bird/parrot/polly{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -6834,13 +6834,13 @@ /area/awaymission/zoo) "sL" = ( /mob/living/simple_mob/animal/space/bear{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "sM" = ( /mob/living/simple_mob/animal/space/alien{ - faction = "zoo"; + iff_factions = "!bind-map"; name = "invisible alien hunter" }, /turf/simulated/floor/holofloor/desert{ @@ -6859,7 +6859,7 @@ /area/awaymission/zoo) "sP" = ( /mob/living/simple_mob/animal/passive/snake{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass4" @@ -6946,7 +6946,7 @@ "ta" = ( /obj/effect/floor_decal/asteroid, /mob/living/simple_mob/animal/space/alien{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert{ icon_state = "asteroidplating"; @@ -7020,7 +7020,7 @@ /area/awaymission/zoo) "ti" = ( /mob/living/simple_mob/animal/passive/yithian{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/wood{ icon_state = "diona" @@ -7046,7 +7046,7 @@ "tn" = ( /obj/effect/floor_decal/asteroid, /mob/living/carbon/human/stok{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -7064,7 +7064,7 @@ /area/awaymission/zoo) "tq" = ( /mob/living/carbon/human/farwa{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) @@ -7074,7 +7074,7 @@ /area/awaymission/zoo) "ts" = ( /mob/living/carbon/human/stok{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -7103,7 +7103,7 @@ "tx" = ( /obj/structure/flora/ausbushes/sunnybush, /mob/living/simple_mob/animal/passive/yithian{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/wood{ icon_state = "diona" @@ -7123,7 +7123,7 @@ /area/awaymission/zoo) "tA" = ( /mob/living/simple_mob/creature{ - faction = "zoo"; + iff_factions = "!bind-map"; name = "redspace abomination" }, /turf/simulated/floor/cult, @@ -7220,7 +7220,7 @@ "tO" = ( /obj/effect/floor_decal/asteroid, /mob/living/simple_mob/vore/aggressive/dino{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -7308,7 +7308,7 @@ /area/awaymission/zoo) "tX" = ( /mob/living/simple_mob/vore/aggressive/dragon{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert{ icon_state = "asteroidplating"; @@ -7317,19 +7317,19 @@ /area/awaymission/zoo) "tY" = ( /mob/living/simple_mob/animal/passive/lizard{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "tZ" = ( /mob/living/simple_mob/tomato{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) "ua" = ( /mob/living/simple_mob/animal/passive/fox{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) @@ -7350,7 +7350,7 @@ "uc" = ( /obj/effect/floor_decal/asteroid, /mob/living/simple_mob/vore/aggressive/deathclaw{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) @@ -7370,7 +7370,7 @@ /area/awaymission/zoo) "ue" = ( /mob/living/simple_mob/animal/space/goose{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/outdoors/beach, /area/awaymission/zoo) @@ -7418,46 +7418,46 @@ /area/awaymission/zoo) "ui" = ( /mob/living/simple_mob/vore/aggressive/deathclaw{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "uj" = ( /mob/living/simple_mob/slime/feral/dark_blue{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "uk" = ( /obj/structure/flora/ausbushes/sparsegrass, /mob/living/simple_mob/vore/aggressive/dino{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "ul" = ( /obj/effect/floor_decal/asteroid, /mob/living/simple_mob/animal/passive/lizard{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "um" = ( /obj/landmark/away, /mob/living/simple_mob/animal/space/goose{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/wood, /area/awaymission/zoo) "un" = ( /mob/living/simple_mob/animal/wolf{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) "uo" = ( /mob/living/simple_mob/animal/space/goose{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/wood, /area/awaymission/zoo) @@ -7538,7 +7538,7 @@ "uz" = ( /obj/effect/floor_decal/asteroid, /mob/living/carbon/human/sergallingm{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass2" @@ -7546,7 +7546,7 @@ /area/awaymission/zoo) "uA" = ( /mob/living/simple_mob/animal/space/bear/brown{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -7558,7 +7558,7 @@ /area/awaymission/zoo) "uC" = ( /mob/living/carbon/human/sergallingm{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass4" @@ -7578,7 +7578,7 @@ /area/awaymission/zoo) "uF" = ( /mob/living/simple_mob/animal/passive/dog/tamaskan{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) @@ -7615,7 +7615,7 @@ /area/awaymission/zoo) "uL" = ( /mob/living/carbon/human/sergallingm{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "fullgrass1" @@ -7623,7 +7623,7 @@ /area/awaymission/zoo) "uM" = ( /mob/living/carbon/human/sergallingm{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass2" @@ -7632,7 +7632,7 @@ "uN" = ( /obj/structure/flora/ausbushes/genericbush, /mob/living/simple_mob/animal/space/bear/brown{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass, /area/awaymission/zoo) @@ -7736,14 +7736,14 @@ /area/awaymission/zoo) "uZ" = ( /mob/living/simple_mob/animal/space/carp/large{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/desert, /area/awaymission/zoo) "va" = ( /obj/structure/flora/ausbushes/fernybush, /mob/living/carbon/human/monkey{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "fullgrass1" @@ -7763,13 +7763,13 @@ /area/awaymission/zoo) "vd" = ( /mob/living/simple_mob/animal/passive/crab{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand, /area/awaymission/zoo) "ve" = ( /mob/living/carbon/human/monkey{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "fullgrass3" @@ -7777,7 +7777,7 @@ /area/awaymission/zoo) "vf" = ( /mob/living/simple_mob/vore/aggressive/panther{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/grass{ icon_state = "grass2" @@ -7845,7 +7845,7 @@ /area/awaymission/zoo) "vl" = ( /mob/living/simple_mob/animal/passive/crab{ - faction = "zoo"; + iff_factions = "!bind-map"; icon_dead = "evilcrab_dead"; icon_living = "evilcrab"; icon_state = "evilcrab" @@ -7861,13 +7861,13 @@ /area/awaymission/zoo) "vn" = ( /mob/living/simple_mob/animal/sif/shantak{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) "vo" = ( /mob/living/carbon/human/monkey{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass2" @@ -7876,7 +7876,7 @@ "vp" = ( /mob/living/simple_mob/animal/sif/shantak{ color = ""; - faction = "zoo"; + iff_factions = "!bind-map"; health = 100; maxHealth = 100; name = "alpha shantak" @@ -7885,20 +7885,20 @@ /area/awaymission/zoo) "vq" = ( /mob/living/simple_mob/animal/space/tree{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) "vr" = ( /obj/structure/flora/bush, /mob/living/simple_mob/animal/sif/shantak{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/snow, /area/awaymission/zoo) "vs" = ( /mob/living/carbon/human/monkey{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "dgrass0" @@ -7907,7 +7907,7 @@ "vt" = ( /obj/structure/flora/ausbushes/lavendergrass, /mob/living/carbon/human/monkey{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/holofloor/beach/sand{ icon_state = "fullgrass1" @@ -7949,7 +7949,7 @@ /area/awaymission/zoo) "vz" = ( /mob/living/simple_mob/animal/space/bear/polar{ - faction = "zoo" + iff_factions = "!bind-map" }, /turf/simulated/floor/outdoors/beach, /area/awaymission/zoo) diff --git a/maps/sectors/frozen_140/levels/frozen_140.dmm b/maps/sectors/frozen_140/levels/frozen_140.dmm index c598c1ec59f..d1fbb4504df 100644 --- a/maps/sectors/frozen_140/levels/frozen_140.dmm +++ b/maps/sectors/frozen_140/levels/frozen_140.dmm @@ -535,7 +535,7 @@ /area/class_p/facility) "wQ" = ( /mob/living/simple_mob/animal/space/tree{ - faction = "frozen" + iff_factions = "frozen" }, /turf/simulated/floor/outdoors/snow/classp, /area/class_p/unexplored) diff --git a/maps/sectors/frozen_192/levels/frozen_192.dmm b/maps/sectors/frozen_192/levels/frozen_192.dmm index 96384fcd648..f2d2b32fe18 100644 --- a/maps/sectors/frozen_192/levels/frozen_192.dmm +++ b/maps/sectors/frozen_192/levels/frozen_192.dmm @@ -242,7 +242,7 @@ /area/class_p/unexplored) "lW" = ( /mob/living/simple_mob/animal/space/tree{ - faction = "frozen" + iff_factions = "frozen" }, /turf/simulated/floor/outdoors/snow/classp, /area/class_p/unexplored) diff --git a/maps/sectors/piratebase_140/levels/piratebase_140.dmm b/maps/sectors/piratebase_140/levels/piratebase_140.dmm index e69c9fe43ed..0b9aa0ae338 100644 --- a/maps/sectors/piratebase_140/levels/piratebase_140.dmm +++ b/maps/sectors/piratebase_140/levels/piratebase_140.dmm @@ -469,7 +469,7 @@ /area/piratebase/halls) "vW" = ( /mob/living/simple_mob/mechanical/mecha/combat/marauder/mauler{ - faction = "voxpirate" + iff_factions = "voxpirate" }, /turf/simulated/floor/reinforced, /area/piratebase/halls) diff --git a/maps/sectors/piratebase_192/levels/piratebase_192.dmm b/maps/sectors/piratebase_192/levels/piratebase_192.dmm index 59da0041ba6..022055adef1 100644 --- a/maps/sectors/piratebase_192/levels/piratebase_192.dmm +++ b/maps/sectors/piratebase_192/levels/piratebase_192.dmm @@ -4410,7 +4410,7 @@ dir = 8 }, /mob/living/simple_mob/animal/giant_spider/pepper{ - faction = "pirate"; + iff_factions = "pirate"; name = "First Mate Lil Peppies" }, /turf/simulated/floor/wood, diff --git a/maps/submaps/level_specific/class_h/covert_post.dmm b/maps/submaps/level_specific/class_h/covert_post.dmm index 2d5d8a9390a..b9108d9ba56 100644 --- a/maps/submaps/level_specific/class_h/covert_post.dmm +++ b/maps/submaps/level_specific/class_h/covert_post.dmm @@ -226,7 +226,7 @@ /area/class_h/POIs/covert_post) "V" = ( /mob/living/simple_mob/animal/passive/honkpet{ - faction = "clown"; + iff_factions = "clown"; name = "Hunkle" }, /turf/simulated/floor/tiled/white, diff --git a/maps/submaps/level_specific/debrisfield/derelict.dmm b/maps/submaps/level_specific/debrisfield/derelict.dmm index fd2f6abe714..58cfe540834 100644 --- a/maps/submaps/level_specific/debrisfield/derelict.dmm +++ b/maps/submaps/level_specific/debrisfield/derelict.dmm @@ -25,7 +25,7 @@ /area/debrisfield/derelict) "ap" = ( /mob/living/simple_mob/mechanical/infectionbot{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/asteroid_steel/airless, /area/debrisfield/derelict) @@ -82,7 +82,7 @@ /area/debrisfield/derelict) "aA" = ( /mob/living/simple_mob/mechanical/infectionbot{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/airless, /area/debrisfield/derelict) @@ -139,7 +139,7 @@ "aR" = ( /obj/mob_spawner/derelict/corrupt_maint_swarm, /mob/living/simple_mob/mechanical/corrupt_maint_drone{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/airless, /area/debrisfield/derelict) @@ -246,7 +246,7 @@ "bo" = ( /obj/mob_spawner/derelict/corrupt_maint_swarm, /mob/living/simple_mob/mechanical/corrupt_maint_drone{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/asteroid_steel/airless, /area/debrisfield/derelict) @@ -283,7 +283,7 @@ /area/debrisfield/derelict) "bu" = ( /mob/living/simple_mob/mechanical/infectionbot{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/white/airless, /area/debrisfield/derelict) diff --git a/maps/submaps/level_specific/debrisfield_vr/derelict.dmm b/maps/submaps/level_specific/debrisfield_vr/derelict.dmm index 29e0a3e15a2..13c4ed44be1 100644 --- a/maps/submaps/level_specific/debrisfield_vr/derelict.dmm +++ b/maps/submaps/level_specific/debrisfield_vr/derelict.dmm @@ -292,7 +292,7 @@ /area/submap/debrisfield_vr/derelict/interior) "aZ" = ( /mob/living/simple_mob/mechanical/infectionbot{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/dark, /area/submap/debrisfield_vr/derelict/interior) @@ -356,7 +356,7 @@ /area/submap/debrisfield_vr/derelict/interior) "bn" = ( /mob/living/simple_mob/mechanical/infectionbot{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/steel_grid, /area/submap/debrisfield_vr/derelict/interior) @@ -406,7 +406,7 @@ "bx" = ( /obj/mob_spawner/derelict/corrupt_maint_swarm, /mob/living/simple_mob/mechanical/corrupt_maint_drone{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/steel_grid, /area/submap/debrisfield_vr/derelict/interior) @@ -546,7 +546,7 @@ "bX" = ( /obj/mob_spawner/derelict/corrupt_maint_swarm, /mob/living/simple_mob/mechanical/corrupt_maint_drone{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/dark, /area/submap/debrisfield_vr/derelict/interior) @@ -609,7 +609,7 @@ /area/submap/debrisfield_vr/derelict/interior) "ci" = ( /mob/living/simple_mob/mechanical/infectionbot{ - faction = "derelict" + iff_factions = "derelict" }, /turf/simulated/floor/tiled/white, /area/submap/debrisfield_vr/derelict/interior) diff --git a/maps/submaps/level_specific/debrisfield_vr/mining_drones.dmm b/maps/submaps/level_specific/debrisfield_vr/mining_drones.dmm index 27c88e83d9d..006b3cc94f9 100644 --- a/maps/submaps/level_specific/debrisfield_vr/mining_drones.dmm +++ b/maps/submaps/level_specific/debrisfield_vr/mining_drones.dmm @@ -7,7 +7,7 @@ /area/space) "c" = ( /mob/living/simple_mob/mechanical/corrupt_maint_drone{ - faction = "poi_mining_drones" + iff_factions = "poi_mining_drones" }, /turf/simulated/floor/airless, /area/submap/debrisfield_vr/mining_outpost) diff --git a/maps/submaps/level_specific/underdark/abandonded_outpost.dmm b/maps/submaps/level_specific/underdark/abandonded_outpost.dmm index 81854381bf9..d6a54d37610 100644 --- a/maps/submaps/level_specific/underdark/abandonded_outpost.dmm +++ b/maps/submaps/level_specific/underdark/abandonded_outpost.dmm @@ -354,7 +354,7 @@ /area/mine/explored/underdark) "bB" = ( /mob/living/simple_mob/mechanical/infectionbot{ - faction = "underdark" + iff_factions = "underdark" }, /turf/simulated/floor/tiled/steel_dirty/virgo3b, /area/mine/explored/underdark) diff --git a/maps/submaps/level_specific/underdark/wolf_den.dmm b/maps/submaps/level_specific/underdark/wolf_den.dmm index 3d43dc486d2..6122e62fce0 100644 --- a/maps/submaps/level_specific/underdark/wolf_den.dmm +++ b/maps/submaps/level_specific/underdark/wolf_den.dmm @@ -37,7 +37,7 @@ /area/mine/explored/underdark) "j" = ( /mob/living/simple_mob/otie/feral{ - faction = "underdark" + iff_factions = "underdark" }, /turf/simulated/mineral/floor/ignore_cavegen/virgo3b, /area/mine/explored/underdark) diff --git a/maps/submaps/level_specific/virgo2/Rockybase.dmm b/maps/submaps/level_specific/virgo2/Rockybase.dmm index f0642ac9f24..ef2d0f99048 100644 --- a/maps/submaps/level_specific/virgo2/Rockybase.dmm +++ b/maps/submaps/level_specific/virgo2/Rockybase.dmm @@ -24,7 +24,7 @@ /mob/living/simple_mob/mechanical/combat_drone{ ai_holder_type = /datum/ai_holder/polaris/simple_mob/ranged/kiting/threatening/returnhome; desc = "An automated combat drone with an aged apperance."; - faction = "syndicate"; + iff_factions = "syndicate"; maxbodytemp = 900 }, /turf/simulated/mineral/floor/ignore_mapgen/virgo2, @@ -114,7 +114,7 @@ /area/submap/virgo2/Rockybase) "ax" = ( /mob/living/bot/cleanbot{ - faction = "malf_drone" + iff_factions = "malf_drone" }, /turf/simulated/floor/tiled/techfloor/virgo2, /area/submap/virgo2/Rockybase) @@ -307,7 +307,7 @@ /area/submap/virgo2/Rockybase) "bf" = ( /mob/living/bot/farmbot{ - faction = "malf_drone" + iff_factions = "malf_drone" }, /turf/simulated/floor/tiled/techfloor/virgo2, /area/submap/virgo2/Rockybase) @@ -341,7 +341,7 @@ /mob/living/simple_mob/mechanical/combat_drone{ ai_holder_type = /datum/ai_holder/polaris/simple_mob/ranged/kiting/threatening/returnhome; desc = "An automated combat drone with an aged apperance."; - faction = "syndicate"; + iff_factions = "syndicate"; maxbodytemp = 900 }, /turf/simulated/floor/tiled/techfloor/virgo2, diff --git a/maps/submaps/plains/Oldhouse.dmm b/maps/submaps/plains/Oldhouse.dmm index df7623b7f23..ee2c21772ce 100644 --- a/maps/submaps/plains/Oldhouse.dmm +++ b/maps/submaps/plains/Oldhouse.dmm @@ -183,7 +183,7 @@ attack_armor_pen = 100; attacktext = list("lightly bonked"); desc = "Furry and brown, this spider is so goddamn fat you're surprised it even moves around."; - faction = "neutral"; + iff_factions = "neutral"; health = 400; legacy_melee_damage_lower = 1; legacy_melee_damage_upper = 3; diff --git a/maps/submaps/plains/Oldhouse_vr.dmm b/maps/submaps/plains/Oldhouse_vr.dmm index 4c3de3e3c55..089de09d635 100644 --- a/maps/submaps/plains/Oldhouse_vr.dmm +++ b/maps/submaps/plains/Oldhouse_vr.dmm @@ -183,7 +183,7 @@ attack_armor_pen = 100; attacktext = list("lightly bonked"); desc = "Furry and brown, this spider is so goddamn fat you're surprised it even moves around."; - faction = "neutral"; + iff_factions = "neutral"; health = 400; maxHealth = 400; legacy_melee_damage_lower = 1; diff --git a/maps/submaps/wilderness/Rockybase.dmm b/maps/submaps/wilderness/Rockybase.dmm index 1571a38f7ae..e7810469bd0 100644 --- a/maps/submaps/wilderness/Rockybase.dmm +++ b/maps/submaps/wilderness/Rockybase.dmm @@ -167,7 +167,7 @@ /area/submap/Rockybase) "aK" = ( /mob/living/bot/cleanbot{ - faction = "malf_drone" + iff_factions = "malf_drone" }, /turf/simulated/floor/tiled, /area/submap/Rockybase) @@ -435,7 +435,7 @@ dir = 8 }, /mob/living/bot/farmbot{ - faction = "malf_drone"; + iff_factions = "malf_drone"; name = "Mr. Weddleton" }, /turf/simulated/floor/tiled, @@ -790,7 +790,7 @@ /area/submap/Rockybase) "cL" = ( /mob/living/simple_mob/mechanical/mecha/combat/gygax/dark/advanced{ - faction = "malf_drone" + iff_factions = "malf_drone" }, /turf/simulated/floor/tiled, /area/submap/Rockybase) @@ -1035,7 +1035,7 @@ "dB" = ( /obj/effect/debris/cleanable/dirt, /mob/living/bot/medibot{ - faction = "malf_drone" + iff_factions = "malf_drone" }, /turf/simulated/floor/tiled, /area/submap/Rockybase) diff --git a/maps/tether/levels/plains.dmm b/maps/tether/levels/plains.dmm index a71bc8e6ad4..a60e9f1db8a 100644 --- a/maps/tether/levels/plains.dmm +++ b/maps/tether/levels/plains.dmm @@ -20,7 +20,7 @@ /turf/simulated/floor/tiled/steel_dirty/virgo3b, /area/mine/unexplored) "i" = ( -/mob/living/simple_mob/animal/space/goose/virgo3b, +/mob/living/simple_mob/animal/space/goose, /turf/simulated/floor/outdoors/grass/sif/virgo3b, /area/tether/outpost/exploration_plains) "j" = (