Esempio n. 1
0
    public void ServerPerformInteraction(HandActivate interaction)
    {
        itemAttributeComponent.RemoveTrait(toolTraits[toolSetting]);    // look over to ItemAttributeV2 and REMOVE the trait specified by the current toolSetting from this component

        // cycle though the list, keeping in check the size of said list
        toolSetting++;
        if (toolSetting >= toolTraits.Count)
        {
            toolSetting = 0;
        }

        Chat.AddExamineMsgFromServer(interaction.Performer, $"You flick the {gameObject.name} into {toolTraits[toolSetting].name} mode");

        itemAttributeComponent.AddTrait(toolTraits[toolSetting]);    // look over to ItemAttributeV2 and ADD the trait specified by the current toolSetting from this component
    }
 private void ToggleBoots()
 {
     if (player == null)
     {
         return;
     }
     if (isOn)
     {
         itemAttributesV2.AddTrait(CommonTraits.Instance.NoSlip);
         ServerChangeSpeed(newSpeed);
     }
     else
     {
         itemAttributesV2.RemoveTrait(CommonTraits.Instance.NoSlip);
         ServerChangeSpeed(initialSpeed);
     }
     //if the ghost NRE will be thrown
     player.Script.pushPull.ServerSetPushable(!isOn);
 }
Esempio n. 3
0
 private void RemoveEffect()
 {
     itemAttributesV2.RemoveTrait(CommonTraits.Instance.NoSlip);
     playerMove.ServerChangeSpeed(playerMove.RunSpeed + runSpeedDebuff, playerMove.WalkSpeed);
     playerMove.PlayerScript.pushPull.ServerSetPushable(true);
 }
		private void RemoveEffect()
		{
			itemAttributesV2.RemoveTrait(CommonTraits.Instance.NoSlip);
			playerMove.RemoveModifier(this);
			playerMove.PlayerScript.pushPull.ServerSetPushable(true);
		}