Revolver Tweaks and Det Buff (#13725)

* revolver changes and det yml

* remove ammo box

* remove comma

* other ammo providers change
This commit is contained in:
Scribbles0
2023-01-26 10:15:20 -08:00
committed by GitHub
parent d6f71db037
commit 058e2e2b56
4 changed files with 10 additions and 8 deletions

View File

@@ -21,7 +21,7 @@ public partial class SharedGunSystem
SubscribeLocalEvent<RevolverAmmoProviderComponent, ComponentHandleState>(OnRevolverHandleState);
SubscribeLocalEvent<RevolverAmmoProviderComponent, ComponentInit>(OnRevolverInit);
SubscribeLocalEvent<RevolverAmmoProviderComponent, TakeAmmoEvent>(OnRevolverTakeAmmo);
SubscribeLocalEvent<RevolverAmmoProviderComponent, GetVerbsEvent<Verb>>(OnRevolverVerbs);
SubscribeLocalEvent<RevolverAmmoProviderComponent, GetVerbsEvent<AlternativeVerb>>(OnRevolverVerbs);
SubscribeLocalEvent<RevolverAmmoProviderComponent, InteractUsingEvent>(OnRevolverInteractUsing);
SubscribeLocalEvent<RevolverAmmoProviderComponent, GetAmmoCountEvent>(OnRevolverGetAmmoCount);
}
@@ -166,18 +166,19 @@ public partial class SharedGunSystem
return false;
}
private void OnRevolverVerbs(EntityUid uid, RevolverAmmoProviderComponent component, GetVerbsEvent<Verb> args)
private void OnRevolverVerbs(EntityUid uid, RevolverAmmoProviderComponent component, GetVerbsEvent<AlternativeVerb> args)
{
if (!args.CanAccess || !args.CanInteract || args.Hands == null) return;
args.Verbs.Add(new Verb()
args.Verbs.Add(new AlternativeVerb()
{
Text = Loc.GetString("gun-revolver-empty"),
Disabled = !AnyRevolverCartridges(component),
Act = () => EmptyRevolver(component, args.User)
Act = () => EmptyRevolver(component, args.User),
Priority = 1
});
args.Verbs.Add(new Verb()
args.Verbs.Add(new AlternativeVerb()
{
Text = Loc.GetString("gun-revolver-spin"),
// Category = VerbCategory.G,