Prevent single-use hyposprays from getting the toggle draw verb
Co-authored-by: Plykiya <plykiya@protonmail.com>
[AutoNetworkedField]
[DataField(required: true)]
public bool OnlyAffectsMobs = false;
+
+ /// <summary>
+ /// Whether or not the hypospray is able to draw from containers or if it's a single use
+ /// device that can only inject.
+ /// </summary>
+ [DataField]
+ public bool InjectOnly = false;
}
// </summary>
private void AddToggleModeVerb(Entity<HyposprayComponent> entity, ref GetVerbsEvent<AlternativeVerb> args)
{
- if (!args.CanAccess || !args.CanInteract || args.Hands == null)
+ if (!args.CanAccess || !args.CanInteract || args.Hands == null || entity.Comp.InjectOnly)
return;
var (_, component) = entity;
solutionName: pen
transferAmount: 15
onlyAffectsMobs: false
+ injectOnly: true
- type: Appearance
- type: SolutionContainerVisuals
maxFillLevels: 1
solutionName: pen
transferAmount: 20
onlyAffectsMobs: false
+ injectOnly: true
- type: SolutionContainerManager
solutions:
pen:
solutionName: pen
transferAmount: 20
onlyAffectsMobs: false
+ injectOnly: true
- type: SolutionContainerManager
solutions:
pen:
solutionName: pen
transferAmount: 20
onlyAffectsMobs: false
+ injectOnly: true
+
- type: SolutionContainerManager
solutions:
pen:
solutionName: pen
transferAmount: 30
onlyAffectsMobs: false
+ injectOnly: true
- type: SolutionContainerManager
solutions:
pen:
solutionName: pen
transferAmount: 30
onlyAffectsMobs: false
+ injectOnly: true
- type: StaticPrice
price: 500
- type: Tag
solutionName: pen
transferAmount: 30
onlyAffectsMobs: false
+ injectOnly: true
- type: StaticPrice
price: 500
- type: Tag