finished documentation of modules for now.

This commit is contained in:
Joel Friedrich
2023-12-21 16:15:21 +01:00
parent e7933985cb
commit 944887aa2e
15 changed files with 35 additions and 24 deletions

View File

@ -11,7 +11,8 @@ class MachineAction(Action):
def __init__(self):
"""
Attempts to maintain the machine and returns an action result if successful.
When performing this action, the maintainer attempts to maintain the machine at his current position, returning
an action result if successful.
"""
super().__init__(m.MACHINE_ACTION, m.MAINTAIN_VALID, m.MAINTAIN_FAIL)

View File

@ -14,7 +14,8 @@ class Machine(Entity):
def __init__(self, *args, work_interval: int = 10, pause_interval: int = 15, **kwargs):
"""
Represents a machine entity that the maintainer will try to maintain.
Represents a machine entity that the maintainer will try to maintain by performing the maintenance action.
Machines' health depletes over time.
:param work_interval: How long should the machine work before pausing.
:type work_interval: int
@ -31,7 +32,8 @@ class Machine(Entity):
def maintain(self) -> bool:
"""
Attempts to maintain the machine by increasing its health.
Attempts to maintain the machine by increasing its health, which is only possible if the machine is at a maximum
of 98/100 HP.
"""
if self.status == m.STATE_WORK:
return c.NOT_VALID