diff --git a/Content.Server/Communications/CommsHackerSystem.cs b/Content.Server/Communications/CommsHackerSystem.cs index 851be07454..1248d21400 100644 --- a/Content.Server/Communications/CommsHackerSystem.cs +++ b/Content.Server/Communications/CommsHackerSystem.cs @@ -64,7 +64,7 @@ public sealed class CommsHackerSystem : SharedCommsHackerSystem var threats = _proto.Index(comp.Threats); var threat = threats.Pick(_random); - CallInThreat(_proto.Index(threat)); + CallInThreat(_proto.Index(threat)); // prevent calling in multiple threats RemComp(uid); @@ -76,10 +76,10 @@ public sealed class CommsHackerSystem : SharedCommsHackerSystem /// /// Makes announcement and adds game rule of the threat. /// - public void CallInThreat(ThreatPrototype threat) + public void CallInThreat(NinjaHackingThreatPrototype ninjaHackingThreat) { - _gameTicker.StartGameRule(threat.Rule, out _); - _chat.DispatchGlobalAnnouncement(Loc.GetString(threat.Announcement), playSound: true, colorOverride: Color.Red); + _gameTicker.StartGameRule(ninjaHackingThreat.Rule, out _); + _chat.DispatchGlobalAnnouncement(Loc.GetString(ninjaHackingThreat.Announcement), playSound: true, colorOverride: Color.Red); } } diff --git a/Content.Shared/Communications/CommsHackerComponent.cs b/Content.Shared/Communications/CommsHackerComponent.cs index fdd1876c1d..810058f1ce 100644 --- a/Content.Shared/Communications/CommsHackerComponent.cs +++ b/Content.Shared/Communications/CommsHackerComponent.cs @@ -29,8 +29,8 @@ public sealed partial class CommsHackerComponent : Component /// Generally some kind of mid-round minor antag, though you could make it call in scrubber backflow if you wanted to. /// You wouldn't do that, right? /// -[Prototype("threat")] -public sealed class ThreatPrototype : IPrototype +[Prototype("ninjaHackingThreat")] +public sealed class NinjaHackingThreatPrototype : IPrototype { [IdDataField] public string ID { get; private set; } = default!; @@ -38,12 +38,12 @@ public sealed class ThreatPrototype : IPrototype /// /// Locale id for the announcement to be made from CentCom. /// - [DataField] - public string Announcement = default!; + [DataField(required: true)] + public LocId Announcement; /// /// The game rule for the threat to be added, it should be able to work when added mid-round otherwise this will do nothing. /// - [DataField] - public EntProtoId Rule = default!; + [DataField(required: true)] + public EntProtoId Rule; } diff --git a/Resources/Prototypes/threats.yml b/Resources/Prototypes/threats.yml index 6e21cc1037..cb20ce19d9 100644 --- a/Resources/Prototypes/threats.yml +++ b/Resources/Prototypes/threats.yml @@ -5,12 +5,12 @@ Dragon: 1 Revenant: 1 -- type: threat +- type: ninjaHackingThreat id: Dragon announcement: terror-dragon rule: Dragon -- type: threat +- type: ninjaHackingThreat id: Revenant announcement: terror-revenant rule: RevenantSpawn