From 0b5000dc7667bf8bc29750c1d6a74a9c4798f90c Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Sun, 1 Jan 2023 20:18:47 -0500 Subject: [PATCH] Grenade Penguin 2: The Reckoning (#13278) --- .../GameTicking/Rules/TraitorRuleSystem.cs | 12 +++++++++++- Resources/Prototypes/Catalog/uplink_catalog.yml | 2 +- Resources/Prototypes/Entities/Mobs/NPCs/animals.yml | 11 +++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index d563fe2b1d..694455f1e9 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Roles; using Content.Server.Traitor; using Content.Server.Traitor.Uplink; using Content.Server.MobState; +using Content.Server.NPC.Systems; using Content.Shared.CCVar; using Content.Shared.Dataset; using Content.Shared.Roles; @@ -26,7 +27,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem [Dependency] private readonly IConfigurationManager _cfg = default!; [Dependency] private readonly IObjectivesManager _objectivesManager = default!; [Dependency] private readonly IChatManager _chatManager = default!; - [Dependency] private readonly GameTicker _gameTicker = default!; + [Dependency] private readonly FactionSystem _faction = default!; [Dependency] private readonly MobStateSystem _mobStateSystem = default!; [Dependency] private readonly UplinkSystem _uplink = default!; @@ -168,6 +169,12 @@ public sealed class TraitorRuleSystem : GameRuleSystem return false; } + if (mind.OwnedEntity is not { } entity) + { + Logger.ErrorS("preset", "Mind picked for traitor did not have an attached entity."); + return false; + } + // creadth: we need to create uplink for the antag. // PDA should be in place already DebugTools.AssertNotNull(mind.OwnedEntity); @@ -186,6 +193,9 @@ public sealed class TraitorRuleSystem : GameRuleSystem Traitors.Add(traitorRole); traitorRole.GreetTraitor(Codewords); + _faction.RemoveFaction(entity, "NanoTrasen", false); + _faction.AddFaction(entity, "Syndicate"); + var maxDifficulty = _cfg.GetCVar(CCVars.TraitorMaxDifficulty); var maxPicks = _cfg.GetCVar(CCVars.TraitorMaxPicks); diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index e6e86adee8..bd4f664aa4 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -112,7 +112,7 @@ description: uplink-penguin-grenade-desc productEntity: MobGrenadePenguin cost: - Telecrystal: 6 + Telecrystal: 5 categories: - UplinkExplosives conditions: diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 78a5296189..5eaa51ce66 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -1148,8 +1148,8 @@ description: A small penguin with a grenade strapped around its neck. Harvested by the Syndicate from icy shit-hole planets. components: - type: MovementSpeedModifier - baseWalkSpeed : 7 - baseSprintSpeed : 7 + baseWalkSpeed : 3.5 + baseSprintSpeed : 5 - type: InputMover - type: MobMover - type: HTN @@ -1207,6 +1207,13 @@ intensitySlope: 20 totalIntensity: 225 - type: ExplodeOnTrigger + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 50 + behaviors: + - !type:ExplodeBehavior # I have included a snake_hiss.ogg sound file so if you want to use that be my guest - type: entity