From 6c17609e14d6dce8fed8981c4a2aafedcdb91c09 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 3 May 2023 22:54:58 +0100 Subject: [PATCH] [MIRROR] Stowaway Changelings (Latejoin Changelings) [MDB IGNORE] (#20921) * Stowaway Changelings (Latejoin Changelings) (#74670) ## About The Pull Request Adds a latejoin form of Changeling flavored as a stowaway. ## Why It's Good For The Game We don't have a latejoin form of Changelings. It ups the paranoia that anyone can be a Changeling, latejoin or not. They're also one of the few non-progression antagonists which would work perfectly as a late join. ## Changelog :cl: add: Stowaway Changelings will now appear as a late join form of Changeling. /:cl: --------- Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com> * Stowaway Changelings (Latejoin Changelings) * Delete screenshot_antag_icons_stowawaychangeling.png --------- Co-authored-by: iwishforducks <65363339+iwishforducks@users.noreply.github.com> Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com> --- code/__DEFINES/role_preferences.dm | 2 ++ .../dynamic/dynamic_rulesets_latejoin.dm | 32 +++++++++++++++++++ config/dynamic.json | 4 +++ .../antagonists/stowawaychangeling.ts | 18 +++++++++++ 4 files changed, 56 insertions(+) create mode 100644 tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/stowawaychangeling.ts diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 34d6cf4e171..42f64edc0f1 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -52,6 +52,7 @@ #define ROLE_HERETIC_SMUGGLER "Heretic Smuggler" #define ROLE_PROVOCATEUR "Provocateur" #define ROLE_SYNDICATE_INFILTRATOR "Syndicate Infiltrator" +#define ROLE_STOWAWAY_CHANGELING "Stowaway Changeling" // Other roles #define ROLE_SYNDICATE "Syndicate" @@ -166,6 +167,7 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_HERETIC_SMUGGLER = 0, ROLE_PROVOCATEUR = 14, ROLE_SYNDICATE_INFILTRATOR = 0, + ROLE_STOWAWAY_CHANGELING = 0, // I'm not too sure why these are here, but they're not moving. ROLE_PAI = 0, diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm index 1103c2d3712..b5da6ba8298 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm @@ -224,3 +224,35 @@ new_heretic.knowledge_points = min(new_heretic.knowledge_points, 5) return TRUE + +/// Ruleset for latejoin changelings +/datum/dynamic_ruleset/latejoin/stowaway_changeling + name = "Stowaway Changeling" + antag_datum = /datum/antagonist/changeling + antag_flag = ROLE_STOWAWAY_CHANGELING + antag_flag_override = ROLE_CHANGELING + protected_roles = list( + JOB_CAPTAIN, + JOB_DETECTIVE, + JOB_HEAD_OF_PERSONNEL, + JOB_HEAD_OF_SECURITY, + JOB_PRISONER, + JOB_SECURITY_OFFICER, + JOB_WARDEN, + ) + restricted_roles = list( + JOB_AI, + JOB_CYBORG, + ) + required_candidates = 1 + weight = 2 + cost = 12 + requirements = list(101,101,40,40,20,20,10,10,10,10) + repeatable = TRUE + +/datum/dynamic_ruleset/latejoin/stowaway_changeling/execute() + var/mob/picked_mob = pick(candidates) + assigned += picked_mob.mind + picked_mob.mind.special_role = antag_flag + picked_mob.mind.add_antag_datum(antag_datum) + return TRUE diff --git a/config/dynamic.json b/config/dynamic.json index 090466bff3c..8bd2e8d4ff7 100644 --- a/config/dynamic.json +++ b/config/dynamic.json @@ -158,6 +158,10 @@ "Heretic Smuggler": { "weight": 0 + }, + + "Stowaway Changeling": { + "weight": 0 } } } diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/stowawaychangeling.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/stowawaychangeling.ts new file mode 100644 index 00000000000..8d1191c2b2b --- /dev/null +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/stowawaychangeling.ts @@ -0,0 +1,18 @@ +import { Antagonist, Category } from '../base'; +import { multiline } from 'common/string'; +import { CHANGELING_MECHANICAL_DESCRIPTION } from './changeling'; + +const Stowaway_Changeling: Antagonist = { + key: 'stowawaychangeling', + name: 'Stowaway Changeling', + description: [ + multiline` + A Changeling that found its way onto the shuttle + unbeknownst to the crewmembers on board. + `, + CHANGELING_MECHANICAL_DESCRIPTION, + ], + category: Category.Latejoin, +}; + +export default Stowaway_Changeling;