Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds changelings as a possible midround antagonist (I THINK) (I DONT KNOW IF I DID THIS CORRECTLY) #303

Merged
merged 4 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Content.Server/GameTicking/Rules/ChangelingRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ public bool MakeChangeling(EntityUid target, ChangelingRuleComponent rule)
// briefing
if (TryComp<MetaDataComponent>(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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -24,4 +21,7 @@ public sealed partial class ChangelingRuleComponent : Component
"ChangelingStealDNAObjective",
"EscapeIdentityObjective"
};

[DataField("sendBriefing")]
public bool SendBriefing = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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!
31 changes: 31 additions & 0 deletions Resources/Prototypes/GameRules/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- id: RevenantSpawn
- id: SleeperAgents
- id: ZombieOutbreak
- id: ChangelingAwakening

- type: entityTable
id: SleeperlessAntagEventsTable
Expand All @@ -50,6 +51,7 @@
- id: NinjaSpawn
- id: RevenantSpawn
- id: ZombieOutbreak
- id: ChangelingAwakening

- type: entity
id: BaseStationEvent
Expand Down Expand Up @@ -444,6 +446,35 @@
- 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
sendBriefing: false
- type: AntagSelection
definitions:
- prefRoles: [ Changeling ]
max: 3
playerRatio: 10
blacklist:
components:
- AntagImmune
briefing:
text: changeling-midround-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
Expand Down
Loading