mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 18:47:16 +01:00
Minor typo-fixes as well as making some variable names more intuitive.
This commit is contained in:
parent
0efe2c3095
commit
cafbdf720e
2 changed files with 17 additions and 8 deletions
|
|
@ -985,18 +985,21 @@ class Object(models.Model):
|
|||
otype = int(self.type)
|
||||
return defines_global.OBJECT_TYPES[otype][1][0]
|
||||
|
||||
#state access functions
|
||||
|
||||
def get_state(self):
|
||||
def get_state(self):
|
||||
return self.state
|
||||
|
||||
def set_state(self, cmd_table=None):
|
||||
def set_state(self, state_name=None):
|
||||
"""
|
||||
Set the state by defining which cmd_table is currently used.
|
||||
Only allow setting a state on a player object, otherwise
|
||||
fail silently.
|
||||
"""
|
||||
if self.is_player():
|
||||
self.state = cmd_table
|
||||
self.state = state_name
|
||||
|
||||
def clear_state(self):
|
||||
"Set to no state (return to normal operation)"
|
||||
self.state = None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue