Started expanding docs about tutorial game

This commit is contained in:
Griatch 2022-07-15 01:50:16 +02:00
parent f298de0585
commit e6ac8d347e
9 changed files with 288 additions and 434 deletions

View file

@ -233,7 +233,7 @@ class EquipmentHandler:
# store new state
self._save()
def store(self, obj):
def add(self, obj):
"""
Put something in the backpack specifically (even if it could be wield/worn).
@ -243,6 +243,13 @@ class EquipmentHandler:
self.slots[WieldLocation.BACKPACK].append(obj)
self._save()
def can_remove(self, leaving_object):
"""
Called to check if the object can be removed.
"""
return True # TODO - some things may not be so easy, like mud
def remove(self, obj_or_slot):
"""
Remove specific object or objects from a slot.
@ -423,7 +430,7 @@ class EvAdventureCharacter(LivingMixin, DefaultCharacter):
bool: If move should be allowed or not.
"""
return self.equipment.has_space(moved_object)
return self.equipment.validate_slot_usage(moved_object)
def at_object_receive(self, moved_object, source_location, **kwargs):
"""
@ -444,7 +451,7 @@ class EvAdventureCharacter(LivingMixin, DefaultCharacter):
(need to unwield/remove them first).
"""
self.equipment.can_drop(leaving_object)
return self.equipment.can_remove(leaving_object)
def at_object_leave(self, moved_object, destination, **kwargs):
"""