Earthquake Class
Manages all earthquakes in the world
Declared on: line 21 of Lua/earthquake.lua.
Method Index
- afterLoad(old, new)
- createEarthquake()
- isActive()
- nextEarthquake()
- onEndDay()
- tick()
Member Index
- active
- current_map_earthquake
- damage_timer
- disabled
- next_planned
- remaining_damage
- size
- start_day
- start_month
- warning_timer
- world
function Earthquake:Earthquake(world, convert)
Track earthquakes in the world
Parameters:
| Name | Type | Description |
|---|---|---|
| world | table | Owned by this world |
| convert | boolean | If true, world is upgraded from before this Earthquake class |
Declared on: line 61 of Lua/earthquake.lua.
function Earthquake:afterLoad(old, new)
Afterload sections before 189 were taken from World
Parameters:
| Name | Type | Description |
|---|---|---|
| old | integer | The old version of the save game. |
| new | integer | The current version of the save game format. |
Declared on: line 217 of Lua/earthquake.lua.
function Earthquake:createEarthquake()
Create a small or medium quake now for the "Create Earthquake" cheat
Declared on: line 195 of Lua/earthquake.lua.
function Earthquake:isActive()
Check if there is a current earthquake
Declared on: line 211 of Lua/earthquake.lua.
function Earthquake:nextEarthquake()
Called when it is time to have another earthquake
Declared on: line 168 of Lua/earthquake.lua.
function Earthquake:onEndDay()
Check if it's time for an earthquake
Declared on: line 158 of Lua/earthquake.lua.
function Earthquake:tick()
Perform actions to simulate an active earthquake.
Declared on: line 72 of Lua/earthquake.lua.