mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-17 21:24:01 +00:00
* 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>
38 lines
812 B
Plaintext
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)
|