|
@@ -26,7 +26,7 @@ protected virtual void InitializeBallistic()
|
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, GetAmmoCountEvent>(OnBallisticAmmoCount);
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, GetAmmoCountEvent>(OnBallisticAmmoCount);
|
|
|
|
|
|
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, ExaminedEvent>(OnBallisticExamine);
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, ExaminedEvent>(OnBallisticExamine);
|
|
|
- SubscribeLocalEvent<BallisticAmmoProviderComponent, GetVerbsEvent<Verb>>(OnBallisticVerb);
|
|
|
|
|
|
|
+ SubscribeLocalEvent<BallisticAmmoProviderComponent, GetVerbsEvent<AlternativeVerb>>(OnBallisticVerb);
|
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, InteractUsingEvent>(OnBallisticInteractUsing);
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, InteractUsingEvent>(OnBallisticInteractUsing);
|
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, AfterInteractEvent>(OnBallisticAfterInteract);
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, AfterInteractEvent>(OnBallisticAfterInteract);
|
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, AmmoFillDoAfterEvent>(OnBallisticAmmoFillDoAfter);
|
|
SubscribeLocalEvent<BallisticAmmoProviderComponent, AmmoFillDoAfterEvent>(OnBallisticAmmoFillDoAfter);
|
|
@@ -160,14 +160,14 @@ void SimulateInsertAmmo(EntityUid ammo, EntityUid ammoProvider, EntityCoordinate
|
|
|
args.Repeat = moreSpace && moreAmmo;
|
|
args.Repeat = moreSpace && moreAmmo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void OnBallisticVerb(EntityUid uid, BallisticAmmoProviderComponent component, GetVerbsEvent<Verb> args)
|
|
|
|
|
|
|
+ private void OnBallisticVerb(EntityUid uid, BallisticAmmoProviderComponent component, GetVerbsEvent<AlternativeVerb> args)
|
|
|
{
|
|
{
|
|
|
if (!args.CanAccess || !args.CanInteract || args.Hands == null || !component.Cycleable)
|
|
if (!args.CanAccess || !args.CanInteract || args.Hands == null || !component.Cycleable)
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
if (component.Cycleable)
|
|
if (component.Cycleable)
|
|
|
{
|
|
{
|
|
|
- args.Verbs.Add(new Verb()
|
|
|
|
|
|
|
+ args.Verbs.Add(new AlternativeVerb()
|
|
|
{
|
|
{
|
|
|
Text = Loc.GetString("gun-ballistic-cycle"),
|
|
Text = Loc.GetString("gun-ballistic-cycle"),
|
|
|
Disabled = GetBallisticShots(component) == 0,
|
|
Disabled = GetBallisticShots(component) == 0,
|