mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Added move_type to obj.move_to and its many hooks and what calls it.
This commit is contained in:
parent
ae21036a34
commit
c99cd45f93
10 changed files with 48 additions and 37 deletions
|
|
@ -130,7 +130,7 @@ def menunode_inspect_and_buy(caller, raw_string):
|
|||
if wealth >= value:
|
||||
rtext = f"You pay {value} gold and purchase {ware.key}!"
|
||||
caller.db.gold -= value
|
||||
ware.move_to(caller, quiet=True)
|
||||
ware.move_to(caller, quiet=True, move_type="buy")
|
||||
else:
|
||||
rtext = f"You cannot afford {value} gold for {ware.key}!"
|
||||
caller.msg(rtext)
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class CmdEnterTrain(Command):
|
|||
def func(self):
|
||||
train = self.obj
|
||||
self.caller.msg("You board the train.")
|
||||
self.caller.move_to(train)
|
||||
self.caller.move_to(train, move_type="board")
|
||||
|
||||
|
||||
class CmdLeaveTrain(Command):
|
||||
|
|
@ -107,7 +107,7 @@ class CmdLeaveTrain(Command):
|
|||
def func(self):
|
||||
train = self.obj
|
||||
parent = train.location
|
||||
self.caller.move_to(parent)
|
||||
self.caller.move_to(parent, move_type="disembark")
|
||||
|
||||
|
||||
class CmdSetTrain(CmdSet):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue