CORE dashboard + a lot of changes
This commit is contained in:
+17
-4
@@ -1,27 +1,40 @@
|
||||
using RPGCore.BackpackEquipment.ObjectModules.Content;
|
||||
using RPGCore.BackpackEquipment.ObjectModules.UnitEquipment.Events;
|
||||
using RPGCore.BackpackEquipment.ObjectModules.UnitEquipment.Objects;
|
||||
using RPGCore.ObjectModules.ActionObjectModule;
|
||||
|
||||
namespace RPGCore.BackpackEquipment.ObjectModules.UnitEquipment.Actions
|
||||
{
|
||||
public class UnEquipAction : BaseAction
|
||||
{
|
||||
private readonly WearableObject _wearable;
|
||||
private readonly int _index;
|
||||
|
||||
public UnEquipAction(WearableObject wearable)
|
||||
{
|
||||
_wearable = wearable;
|
||||
}
|
||||
|
||||
public override void CanDoIt()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
protected override void OnDoIt()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
var takeEvent = new ActionUnEquipEvent { unit = unit, wearable = _wearable };
|
||||
unit.events.InvokeBefore(takeEvent);
|
||||
Check(!takeEvent.isPrevented, string.Format(ActionWasPreventedMessage, nameof(UnEquipAction)));
|
||||
unit.events.InvokeAfter(takeEvent);
|
||||
|
||||
unit.GetComponent<ContentModule>().TransferFrom(_wearable);
|
||||
}
|
||||
|
||||
protected override void OnEndIt()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
protected override void OnCancelIt()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user