From 624f118b4fa8ab9a7eb35aa74a3169c541d27f15 Mon Sep 17 00:00:00 2001 From: hivehum Date: Thu, 19 Sep 2024 23:56:21 -0400 Subject: [PATCH 1/4] i have no idea if this works. but i hope so --- Resources/Prototypes/GameRules/events.yml | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index e6c257443a92..5368b7941fa4 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -39,6 +39,7 @@ - id: RevenantSpawn - id: SleeperAgents - id: ZombieOutbreak + - id: ChangelingAwakening - type: entityTable id: SleeperlessAntagEventsTable @@ -50,6 +51,7 @@ - id: NinjaSpawn - id: RevenantSpawn - id: ZombieOutbreak + - id: ChangelingAwakening - type: entity id: BaseStationEvent @@ -444,6 +446,34 @@ - type: InitialInfectedRole prototype: InitialInfected +- type: entity + id: ChangelingAwakening + parent: BaseGameRule + components: + - type: StationEvent + earliestStart: 60 + minimumPlayers: 30 # roundstart changeling is 15 which seems insane + weight: 2 # twice as common as zombies + duration: 1 + - type: ChangelingRule + - type: AntagSelection + definitions: + - prefRoles: [ Changeling ] + max: 3 + playerRatio: 10 + blacklist: + components: + - AntagImmune + briefing: + text: changeling-role-greeting + color: Yellow + sound: "/Audio/Ambience/Antag/changeling_start.ogg" + components: + - type: Changeling + mindComponents: + - type: ChangelingRole + prototype: Changeling + - type: entity parent: BaseNukeopsRule id: LoneOpsSpawn From e6ec3373ab76f05978e133ac96c733e8fd7273d0 Mon Sep 17 00:00:00 2001 From: hivehum Date: Fri, 20 Sep 2024 18:58:52 -0400 Subject: [PATCH 2/4] ty flotsam for triaging this --- Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs | 9 ++++++--- .../Rules/Components/ChangelingRuleComponent.cs | 6 +++--- .../game-ticking/game-presets/preset-changeling.ftl | 5 +++++ Resources/Prototypes/GameRules/events.yml | 6 +++--- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs b/Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs index afd42c390c02..13760b2e176a 100644 --- a/Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs @@ -53,10 +53,13 @@ public bool MakeChangeling(EntityUid target, ChangelingRuleComponent rule) // briefing if (TryComp(target, out var metaData)) { - var briefing = Loc.GetString("changeling-role-greeting", ("name", metaData?.EntityName ?? "Unknown")); + if (rule.SendBriefing) + { + var briefing = Loc.GetString("changeling-role-greeting", ("name", metaData?.EntityName ?? "Unknown")); + _antag.SendBriefing(target, briefing, Color.Yellow, BriefingSound); + } + var briefingShort = Loc.GetString("changeling-role-greeting-short", ("name", metaData?.EntityName ?? "Unknown")); - - _antag.SendBriefing(target, briefing, Color.Yellow, BriefingSound); _role.MindAddRole(mindId, new RoleBriefingComponent { Briefing = briefingShort }, mind, true); } // hivemind stuff diff --git a/Content.Server/GameTicking/Rules/Components/ChangelingRuleComponent.cs b/Content.Server/GameTicking/Rules/Components/ChangelingRuleComponent.cs index d6435d15d262..69c8761e066f 100644 --- a/Content.Server/GameTicking/Rules/Components/ChangelingRuleComponent.cs +++ b/Content.Server/GameTicking/Rules/Components/ChangelingRuleComponent.cs @@ -1,7 +1,4 @@ -using Content.Shared.NPC.Prototypes; -using Content.Shared.Roles; using Content.Shared.Store; -using Robust.Shared.Audio; using Robust.Shared.Prototypes; namespace Content.Server.GameTicking.Rules.Components; @@ -24,4 +21,7 @@ public sealed partial class ChangelingRuleComponent : Component "ChangelingStealDNAObjective", "EscapeIdentityObjective" }; + + [DataField("sendBriefing")] + public bool SendBriefing = true; } diff --git a/Resources/Locale/en-US/game-ticking/game-presets/preset-changeling.ftl b/Resources/Locale/en-US/game-ticking/game-presets/preset-changeling.ftl index 8d711beefcbf..012ea60e6b14 100644 --- a/Resources/Locale/en-US/game-ticking/game-presets/preset-changeling.ftl +++ b/Resources/Locale/en-US/game-ticking/game-presets/preset-changeling.ftl @@ -19,3 +19,8 @@ changeling-role-greeting = changeling-role-greeting-short = You are a changeling who has taken the shape of {$name}. + +changeling-midround-role-greeting = + You feel an intense pang in your stomach. Your skin crawls. You remember. You remember. You remember why you're really here. + Your objectives are listed in the character menu. + Absorb, shapeshift and evolve to complete them! diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index 5368b7941fa4..ab4b15456707 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -456,6 +456,8 @@ weight: 2 # twice as common as zombies duration: 1 - type: ChangelingRule + components: + sendBriefing: false - type: AntagSelection definitions: - prefRoles: [ Changeling ] @@ -465,9 +467,7 @@ components: - AntagImmune briefing: - text: changeling-role-greeting - color: Yellow - sound: "/Audio/Ambience/Antag/changeling_start.ogg" + text: changeling-midround-role-greeting components: - type: Changeling mindComponents: From 781caeeed63b83200fcff9fade1849494624597d Mon Sep 17 00:00:00 2001 From: hivehum Date: Fri, 20 Sep 2024 19:02:02 -0400 Subject: [PATCH 3/4] miscommunication lmao --- Resources/Prototypes/GameRules/events.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index ab4b15456707..4cb762606770 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -468,6 +468,8 @@ - AntagImmune briefing: text: changeling-midround-role-greeting + color: Yellow + sound: "/Audio/Ambience/Antag/changeling_start.ogg" components: - type: Changeling mindComponents: From 96177a4dde985d81197389f33c5a6a05e71f269d Mon Sep 17 00:00:00 2001 From: hivehum Date: Fri, 20 Sep 2024 19:09:12 -0400 Subject: [PATCH 4/4] by god we are figuring this shit out --- Resources/Prototypes/GameRules/events.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index 4cb762606770..c611c454b068 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -456,8 +456,7 @@ weight: 2 # twice as common as zombies duration: 1 - type: ChangelingRule - components: - sendBriefing: false + sendBriefing: false - type: AntagSelection definitions: - prefRoles: [ Changeling ]