Skip to content

Commit

Permalink
Fixed #87
Browse files Browse the repository at this point in the history
  • Loading branch information
Victorma committed Nov 5, 2019
1 parent 1007f39 commit 8bc2055
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,16 @@ public override bool addElement(int type, string id)
{
var action = new Action(actionType, selectedTarget);
var parentItem = parent as ItemDataControl;
if(parentItem != null && controller.ShowStrictConfirmDialog("Consume item?", "Do you want the item to be removed from the inventory in the action?"))
if(parentItem != null && controller.ShowStrictConfirmDialog("Remove element?", "Do you want the item to be removed or consumed in the action?"))
{
action.Effects.Add(new ConsumeObjectEffect(parentItem.getId()));
if(actionType == Action.DRAG_TO)
{
action.Effects.Add(new RemoveElementEffect(parentItem.getId()));
}
else
{
action.Effects.Add(new ConsumeObjectEffect(parentItem.getId()));
}
}
return action;
});
Expand Down

0 comments on commit 8bc2055

Please sign in to comment.