Skip to content
Permalink
Browse files

Item - remove MessageBus arg from Drop()

  • Loading branch information...
bobbymcr committed Dec 15, 2018
1 parent efb7da3 commit a5d7fcedb5f7c852f2c597bad6b0209d3f42705e
Showing with 9 additions and 9 deletions.
  1. +1 −1 core/src/Inventory.cs
  2. +3 −3 core/src/Item.cs
  3. +3 −3 core/test/InventoryTest.cs
  4. +2 −2 sample/src/Coin.cs
@@ -66,7 +66,7 @@ private void Drop(Word verb, Word noun, Items targetItems)
return;
}

if (item.Drop(this.bus))
if (item.Drop())
{
targetItems.Add(noun.Primary, item);
this.Output($"You {verb} the {noun}.");
@@ -29,9 +29,9 @@ public bool Take()
return this.TakeCore();
}

public bool Drop(MessageBus bus)
public bool Drop()
{
return this.DropCore(bus);
return this.DropCore();
}

protected virtual bool DoCore(MessageBus bus, Word verb, Word noun)
@@ -44,7 +44,7 @@ protected virtual bool TakeCore()
return true;
}

protected virtual bool DropCore(MessageBus bus)
protected virtual bool DropCore()
{
return true;
}
@@ -276,15 +276,15 @@ public TestItem(MessageBus bus, bool canDrop = true)

public override string LongDescription => "It's a test key.";

protected override bool DropCore(MessageBus bus)
protected override bool DropCore()
{
if (!this.canDrop)
{
bus.Send(new OutputMessage("I won't let you drop this!"));
this.Output("I won't let you drop this!");
return false;
}

return base.DropCore(bus);
return base.DropCore();
}
}

@@ -23,10 +23,10 @@ protected override bool TakeCore()
return base.TakeCore();
}

protected override bool DropCore(MessageBus bus)
protected override bool DropCore()
{
this.taken = false;
return base.DropCore(bus);
return base.DropCore();
}

protected override bool DoCore(MessageBus bus, Word verb, Word noun)

0 comments on commit a5d7fce

Please sign in to comment.
You can’t perform that action at this time.