fixed render funciton and obsbuilder

This commit is contained in:
Chanumask
2023-11-02 12:02:03 +01:00
parent ee4d29d50b
commit 4a8c12a5c3
7 changed files with 31 additions and 19 deletions

View File

@@ -49,9 +49,6 @@ class Battery(_Object):
summary.update(dict(belongs_to=self._bound_entity.name, chargeLevel=self.charge_level))
return summary
def render(self):
return None
class Pod(Entity):

View File

@@ -23,6 +23,10 @@ class Batteries(Collection):
def var_has_position(self):
return False
@property
def var_can_be_bound(self):
return True
@property
def obs_tag(self):
return self.__class__.__name__

View File

@@ -12,7 +12,7 @@ class DoorIndicator(Entity):
return d.VALUE_ACCESS_INDICATOR
def render(self):
return None
return []
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

View File

@@ -135,7 +135,7 @@ class DropOffLocations(Collection):
@staticmethod
def trigger_drop_off_location_spawn(state, n_locations):
empty_positions = state.entities.empty_positions[:n_locations]
empty_positions = state.entities.empty_positions()[:n_locations]
do_entites = state[i.DROP_OFF]
drop_offs = [DropOffLocation(pos) for pos in empty_positions]
do_entites.add_items(drop_offs)