Disposable turret balance changes (#18155)

* tweaked stats

* change comment
This commit is contained in:
Arendian
2023-07-20 04:16:09 +02:00
committed by GitHub
parent a91c184b83
commit 657d15751b
5 changed files with 43 additions and 12 deletions

View File

@@ -51,6 +51,13 @@ public sealed partial class BallisticAmmoProviderComponent : Component
[AutoNetworkedField]
public bool Cycled = true;
/// <summary>
/// Is the magazine allowed to be cycled
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("cycleable")]
[AutoNetworkedField]
public bool Cycleable = true;
/// <summary>
/// Is it okay for this entity to directly transfer its valid ammunition into another provider?
/// </summary>

View File

@@ -132,13 +132,13 @@ public abstract partial class SharedGunSystem
{
if (!args.CanAccess || !args.CanInteract || args.Hands == null)
return;
args.Verbs.Add(new Verb()
{
Text = Loc.GetString("gun-ballistic-cycle"),
Disabled = GetBallisticShots(component) == 0,
Act = () => ManualCycle(uid, component, Transform(uid).MapPosition, args.User),
});
if (component.Cycleable == true)
args.Verbs.Add(new Verb()
{
Text = Loc.GetString("gun-ballistic-cycle"),
Disabled = GetBallisticShots(component) == 0,
Act = () => ManualCycle(uid, component, Transform(uid).MapPosition, args.User),
});
}
private void OnBallisticExamine(EntityUid uid, BallisticAmmoProviderComponent component, ExaminedEvent args)