diff --git a/Content.Server/Magic/MagicSystem.cs b/Content.Server/Magic/MagicSystem.cs index bbf884a05b..b0e643799a 100644 --- a/Content.Server/Magic/MagicSystem.cs +++ b/Content.Server/Magic/MagicSystem.cs @@ -396,12 +396,12 @@ private void SpawnSpellHelper(List entityEntries, EntityCoordi #endregion - public void Speak(BaseActionEvent args) + public void Speak(BaseActionEvent args, bool showInChat = true) { if (args is not ISpeakSpell speak || string.IsNullOrWhiteSpace(speak.Speech)) return; _chat.TrySendInGameICMessage(args.Performer, Loc.GetString(speak.Speech), - InGameICChatType.Speak, false); + InGameICChatType.Speak, !showInChat); } } diff --git a/Content.Server/SimpleStation14/Species/Shadowkin/Events/ShadowkinEvents.Powers.cs b/Content.Server/SimpleStation14/Species/Shadowkin/Events/ShadowkinEvents.Powers.cs index 2017fb47d4..b120bc1b45 100644 --- a/Content.Server/SimpleStation14/Species/Shadowkin/Events/ShadowkinEvents.Powers.cs +++ b/Content.Server/SimpleStation14/Species/Shadowkin/Events/ShadowkinEvents.Powers.cs @@ -17,10 +17,10 @@ public sealed partial class ShadowkinTeleportEvent : WorldTargetActionEvent, ISp [DataField("powerCost")] - public float PowerCost = 35f; + public float PowerCost = 40f; [DataField("staminaCost")] - public float StaminaCost = 30f; + public float StaminaCost = 20f; [DataField("speech")] @@ -49,13 +49,13 @@ public sealed partial class ShadowkinDarkSwapEvent : InstantActionEvent, ISpeakS /// How much stamina to drain when darkening. /// [DataField("powerCostOn")] - public float PowerCostOn = 45f; + public float PowerCostOn = 60f; /// /// How much stamina to drain when lightening. /// [DataField("powerCostOff")] - public float PowerCostOff = 35f; + public float PowerCostOff = 45f; /// /// How much stamina to drain when darkening. @@ -71,12 +71,17 @@ public sealed partial class ShadowkinDarkSwapEvent : InstantActionEvent, ISpeakS [DataField("speech")] - public string? Speech { get; } + public string? Speech { get; set; } } public sealed class ShadowkinDarkSwapAttemptEvent : CancellableEntityEventArgs { + EntityUid Performer; + public ShadowkinDarkSwapAttemptEvent(EntityUid performer) + { + Performer = performer; + } } diff --git a/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.Rest.cs b/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.Rest.cs index 076faae2c7..837d037ce9 100644 --- a/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.Rest.cs +++ b/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.Rest.cs @@ -56,7 +56,7 @@ private void Rest(EntityUid uid, ShadowkinRestPowerComponent component, Shadowki // No waking up normally (it would do nothing) _actions.RemoveAction(args.Performer, new InstantAction(_prototype.Index("Wake"))); - _power.TryAddMultiplier(args.Performer, 1f); + _power.TryAddMultiplier(args.Performer, 1.5f); // No action cooldown args.Handled = false; } @@ -66,7 +66,7 @@ private void Rest(EntityUid uid, ShadowkinRestPowerComponent component, Shadowki // Wake up _entity.RemoveComponent(args.Performer); _entity.RemoveComponent(args.Performer); - _power.TryAddMultiplier(args.Performer, -1f); + _power.TryAddMultiplier(args.Performer, -1.5f); // Action cooldown args.Handled = true; } diff --git a/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.Teleport.cs b/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.Teleport.cs index 89dc1258a7..d4c17aa2ae 100644 --- a/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.Teleport.cs +++ b/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinPowerSystem.Teleport.cs @@ -86,7 +86,7 @@ private void Teleport(EntityUid uid, ShadowkinTeleportPowerComponent component, pulledTransform.AttachToGridOrMap(); // Resume pulling - // TODO: This does nothing? + // TODO: This does nothing? // This does things sometimes, but the client never knows _pulling.TryStartPull(puller, pullable); } @@ -99,7 +99,7 @@ private void Teleport(EntityUid uid, ShadowkinTeleportPowerComponent component, _stamina.TakeStaminaDamage(args.Performer, args.StaminaCost); // Speak - _magic.Speak(args); + _magic.Speak(args, false); args.Handled = true; } diff --git a/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinSystem.cs b/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinSystem.cs index b6d862b693..bceabbb95b 100644 --- a/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinSystem.cs +++ b/Content.Server/SimpleStation14/Species/Shadowkin/Systems/ShadowkinSystem.cs @@ -179,32 +179,24 @@ public override void Update(float frameTime) private void ForceDarkSwap(EntityUid uid, ShadowkinComponent component) { - // Add/Remove DarkSwapped component, which will handle the rest + // Add/Remove the component, which should handle the rest if (_entity.HasComponent(uid)) - { - RaiseNetworkEvent(new ShadowkinDarkSwappedEvent(uid, false)); _entity.RemoveComponent(uid); - } else - { - RaiseNetworkEvent(new ShadowkinDarkSwappedEvent(uid, true)); - _entity.EnsureComponent(uid); - } + _entity.AddComponent(uid); } private void ForceTeleport(EntityUid uid, ShadowkinComponent component) { // Create the event we'll later raise, and set it to our Shadowkin. - var args = new ShadowkinTeleportEvent - { - Performer = uid - }; + var args = new ShadowkinTeleportEvent { Performer = uid }; // Pick a random location on the map until we find one that can be reached. var coords = Transform(uid).Coordinates; EntityCoordinates? target = null; - for (var i = 8; i != 0; i--) // It'll iterate up to 8 times, shrinking in distance each time, and if it doesn't find a valid location, it'll return. + // It'll iterate up to 8 times, shrinking in distance each time, and if it doesn't find a valid location, it'll return. + for (var i = 8; i != 0; i--) { var angle = Angle.FromDegrees(_random.Next(360)); var offset = new Vector2((float) (i * Math.Cos(angle)), (float) (i * Math.Sin(angle))); diff --git a/Content.Shared/SimpleStation14/Species/Shadowkin/Components/ShadowkinComponent.cs b/Content.Shared/SimpleStation14/Species/Shadowkin/Components/ShadowkinComponent.cs index 103c8d2d07..2763d3ef2d 100644 --- a/Content.Shared/SimpleStation14/Species/Shadowkin/Components/ShadowkinComponent.cs +++ b/Content.Shared/SimpleStation14/Species/Shadowkin/Components/ShadowkinComponent.cs @@ -77,7 +77,7 @@ public float PowerLevel /// How much energy is gained per second. /// [ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] - public float PowerLevelGain = 2f; + public float PowerLevelGain = 0.75f; /// /// Power gain multiplier diff --git a/Resources/Prototypes/SimpleStation14/Magic/shadowkin.yml b/Resources/Prototypes/SimpleStation14/Magic/shadowkin.yml index fc78d30a3f..2df3454d7a 100644 --- a/Resources/Prototypes/SimpleStation14/Magic/shadowkin.yml +++ b/Resources/Prototypes/SimpleStation14/Magic/shadowkin.yml @@ -2,7 +2,7 @@ id: ShadowkinTeleport name: action-name-shadowkin-teleport description: action-description-shadowkin-teleport - useDelay: 2 + useDelay: 5 range: 32 itemIconStyle: NoItem checkCanAccess: true @@ -12,25 +12,25 @@ sprite: SimpleStation14/Interface/Actions/shadowkin_icons.rsi state: teleport serverEvent: !type:ShadowkinTeleportEvent - powerCost: 35 - staminaCost: 15 + powerCost: 40 + staminaCost: 20 speech: action-description-shadowkin-teleport - type: instantAction id: ShadowkinDarkSwap name: action-name-shadowkin-darkswap description: action-description-shadowkin-darkswap - useDelay: 3 + useDelay: 15 itemIconStyle: NoItem priority: -21 icon: sprite: SimpleStation14/Interface/Actions/shadowkin_icons.rsi state: darkswap serverEvent: !type:ShadowkinDarkSwapEvent - powerCostOn: 55 - powerCostOff: 40 - staminaCostOn: 0 - staminaCostOff: 0 + powerCostOn: 60 + powerCostOff: 45 + staminaCostOn: 25 + staminaCostOff: 25 speech: action-description-shadowkin-darkswap - type: instantAction