TheDocumentation Index
Fetch the complete documentation index at: https://docs.megaworks.dev/llms.txt
Use this file to discover all available pages before exploring further.
Disease class is the base class used by custom diseases. You create an instance with your disease configuration, then drive its behavior by reacting to state changes and by reading/writing persistent data.
Creating a disease
Create a disease instance by passing the disease config object to the constructor:State management
Diseases are state-driven through theDiseaseState enum.
Disease:setState(state)
- state (DiseaseState)
Disease:getState()
- Returns: DiseaseState
DiseaseState enum).
Config access
Disease:getParameter(key)
- key (string)
- Returns: any (value from your disease config)
Severity / progression
Disease:severityStage()
- Returns: number
Persistent data
Each disease instance has a persistentdata object used to store state that must survive reconnects/restarts.
