Files
Bubberstation/code/modules/bitrunning/components/npc_friendly.dm
SkyratBot 3238023f73 [MIRROR] Adds more bitrunning antagonists + fixes (READY) [MDB IGNORE] (#25054)
* Adds more bitrunning antagonists + fixes (READY)

* Update role_preferences.dm

* Update poll_ignore.dm

* Update poll_ignore.dm

* Update cyber_police.dm

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-11-16 18:50:32 -05:00

38 lines
812 B
Plaintext

/// Makes a mob friendly with most NPC factions
/datum/component/npc_friendly
/// The list of factions to add to the player
var/list/npc_factions = list(
FACTION_BOSS,
FACTION_CARP,
FACTION_HIVEBOT,
FACTION_HOSTILE,
FACTION_MIMIC,
FACTION_PIRATE,
FACTION_SPIDER,
FACTION_STICKMAN,
ROLE_ALIEN,
ROLE_GLITCH,
ROLE_SYNDICATE,
)
/// List of factions previously held by the player
var/list/previous_factions = list()
/datum/component/npc_friendly/Initialize()
. = ..()
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
var/mob/living/player = parent
previous_factions.Add(player.faction)
player.faction |= npc_factions
/datum/component/npc_friendly/Destroy(force, silent)
. = ..()
var/mob/living/player = parent
player.faction.Cut()
player.faction.Add(previous_factions)