mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-04 16:41:36 +02:00
Documentation
This commit is contained in:

committed by
Steffen Illium

parent
604c0c6f57
commit
855f53b406
marl_factory_grid
configs
modules
batteries
clean_up
destinations
doors
items
machines
maintenance
utils
@ -9,6 +9,16 @@ from marl_factory_grid.modules.items import constants as i
|
||||
class RespawnItems(Rule):
|
||||
|
||||
def __init__(self, n_items: int = 5, respawn_freq: int = 15, n_locations: int = 5):
|
||||
"""
|
||||
Defines the respawning behaviour of items.
|
||||
|
||||
:param n_items: Specifies how many items should respawn.
|
||||
:type n_items: int
|
||||
:param respawn_freq: Specifies how often items should respawn.
|
||||
:type respawn_freq: int
|
||||
:param n_locations: Specifies at how many locations items should be able to respawn.
|
||||
:type: int
|
||||
"""
|
||||
super().__init__()
|
||||
self.spawn_frequency = respawn_freq
|
||||
self._next_item_spawn = respawn_freq
|
||||
|
Reference in New Issue
Block a user