Adds the super speed smite (#10707)

* Add super speed smite

* Increase acceleration and speed so it can actually gib
This commit is contained in:
Julian Giebel
2022-08-23 16:04:17 +02:00
committed by GitHub
parent 24090fcf9c
commit 99aab9f409
4 changed files with 33 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ using Content.Shared.Inventory;
using Content.Shared.MobState;
using Content.Shared.MobState.Components;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Nutrition.Components;
using Content.Shared.Popups;
using Content.Shared.Tabletop.Components;
@@ -70,6 +71,7 @@ public sealed partial class AdminVerbSystem
[Dependency] private readonly TabletopSystem _tabletopSystem = default!;
[Dependency] private readonly VomitSystem _vomitSystem = default!;
[Dependency] private readonly WeldableSystem _weldableSystem = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifierSystem = default!;
// All smite verbs have names so invokeverb works.
private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
@@ -810,5 +812,23 @@ public sealed partial class AdminVerbSystem
Message = Loc.GetString("admin-smite-disarm-prone-description"),
};
args.Verbs.Add(disarmProne);
Verb superSpeed = new()
{
Text = "Super speed",
Category = VerbCategory.Smite,
IconTexture = "/Textures/Interface/AdminActions/super_speed.png",
Act = () =>
{
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(args.Target);
_movementSpeedModifierSystem?.ChangeBaseSpeed(args.Target, 400, 8000, 40, movementSpeed);
_popupSystem.PopupEntity(Loc.GetString("admin-smite-super-speed-prompt"), args.Target,
Filter.Entities(args.Target), PopupType.LargeCaution);
},
Impact = LogImpact.Extreme,
Message = Loc.GetString("admin-smite-super-speed-description"),
};
args.Verbs.Add(superSpeed);
}
}