mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-11-02 21:47:25 +01:00
fixed render funciton and obsbuilder
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user