evennia.contrib.evscaperoom.room

Room class and mechanics for the Evscaperoom.

This is a special room class that not only depicts the evscaperoom itself, it also acts as a central store for the room state, score etc. When deleting this, that particular escaperoom challenge should be gone.

class evennia.contrib.evscaperoom.room.EvscapeRoom(*args, **kwargs)[source]

Bases: evennia.contrib.evscaperoom.objects.EvscaperoomObject, evennia.objects.objects.DefaultRoom

The room to escape from.

at_object_creation()[source]

Called once, when the room is first created.

statehandler[source]
property state
log(message, caller=None)[source]

Log to a file specificially for this room.

score(new_score, reason)[source]

We don’t score individually but for everyone in room together. You can only be scored for a given reason once.

progress(new_progress)[source]

Progress is what we set it to be (0-100%)

achievement(caller, achievement, subtext='')[source]

Give the caller a personal achievment. You will only ever get one of the same type

Parameters
  • caller (Object) – The receiver of the achievement.

  • achievement (str) – The title/name of the achievement.

  • subtext (str, optional) – Eventual subtext/explanation of the achievement.

get_all_characters()[source]

Get the player characters in the room.

Returns

chars (Queryset) – The characters.

set_flag(flagname)[source]

Set flag on object

unset_flag(flagname)[source]

Unset flag on object

check_flag(flagname)[source]

Check if flag is set on this object

check_perm(caller, permission)[source]
tag_character(character, tag, category=None)[source]

Tag a given character in this room.

Parameters
  • character (Character) – Player character to tag.

  • tag (str) – Tag to set.

  • category (str, optional) – Tag-category. If unset, use room’s tagcategory.

tag_all_characters(tag, category=None)[source]

Set a given tag on all players in the room.

Parameters
  • room (EvscapeRoom) – The room to escape from.

  • tag (str) – The tag to set.

  • category (str, optional) – If unset, will use the room’s tagcategory.

character_cleanup(char)[source]

Clean all custom tags/attrs on a character.

character_exit(char)[source]

Have a character exit the room - return them to the room menu.

at_object_receive(moved_obj, source_location)[source]

Called when an object arrives in the room. This can be used to sum up the situation, set tags etc.

at_object_leave(moved_obj, target_location, **kwargs)[source]

Called when an object leaves the room; if this is a Character we need to clean them up and move them to the menu state.

delete()[source]

Delete this room and all items related to it. Only move the players.

return_appearance(looker, **kwargs)[source]

Could be modified per state. We generally don’t worry about the contents of the object by default.

exception DoesNotExist

Bases: evennia.contrib.evscaperoom.objects.EvscaperoomObject.DoesNotExist, evennia.objects.objects.DefaultRoom.DoesNotExist

exception MultipleObjectsReturned

Bases: evennia.contrib.evscaperoom.objects.EvscaperoomObject.MultipleObjectsReturned, evennia.objects.objects.DefaultRoom.MultipleObjectsReturned

path = 'evennia.contrib.evscaperoom.room.EvscapeRoom'
typename = 'EvscapeRoom'