* toggle clothing fix
* some adding
/// </summary>
[DataField]
public bool DisableOnUnequip;
+
+ /// <summary>
+ /// If true, the clothes must equip for adding action.
+ /// </summary>
+ [DataField]
+ public bool MustEquip = true;
}
/// <summary>
private void OnGetActions(Entity<ToggleClothingComponent> ent, ref GetItemActionsEvent args)
{
+ if (args.InHands && ent.Comp.MustEquip)
+ return;
+
var ev = new ToggleClothingCheckEvent(args.User);
RaiseLocalEvent(ent, ref ev);
+
if (!ev.Cancelled)
args.AddAction(ent.Comp.ActionEntity);
}
stealthy: true
- type: ToggleClothing
action: ActionToggleNinjaGloves
+ disableOnUnequip: true
- type: NinjaGloves
abilities:
- components:
delay: 1.0
- type: ToggleClothing
action: ActionToggleJusticeHelm
+ mustEquip: false
- type: ItemTogglePointLight
- type: ToggleableLightVisuals
clothingVisuals:
# phase cloak
- type: ToggleClothing
action: ActionTogglePhaseCloak
+ disableOnUnequip: true
- type: ComponentToggler
parent: true
components:
sprite: Clothing/Shoes/Boots/magboots.rsi
- type: ToggleClothing
action: ActionToggleMagboots
+ mustEquip: false
- type: ToggleVerb
text: toggle-magboots-verb-get-data-text
- type: ComponentToggler