LuaAPI.wiki
changeset 1654 5c7dfdedb5f8
parent 1653 73a4663f0d7b
child 1655 e7d9a849444b
equal deleted inserted replaced
1653:73a4663f0d7b 1654:5c7dfdedb5f8
    74 
    74 
    75 === General variables and constants ===
    75 === General variables and constants ===
    76 Here are some unsorted variables or constants which are available in Lua. *Consider these variables to be read-only.*
    76 Here are some unsorted variables or constants which are available in Lua. *Consider these variables to be read-only.*
    77 
    77 
    78 || *Identifier* || *Description* ||
    78 || *Identifier* || *Description* ||
    79 || `LOCALE` || Current locale identifier (e.g. “de” for German) ||
    79 || `LOCALE` || Current locale identifier (e.g. `"de"` for German) ||
       
    80 || `INTERFACE` || Type of the game interface: `"desktop"` for desktop, `"touch"` for touchscreen ||
       
    81 || `MAX_HOG_HEALTH` || Maximum possible hedgehog health ||
       
    82 || `MAX_TURN_TIME` || Maximum possible turn time in milliseconds ||
    80 || `LAND_WIDTH` || The width of the landscape in pixels. Not available before `onGameStart` ||
    83 || `LAND_WIDTH` || The width of the landscape in pixels. Not available before `onGameStart` ||
    81 || `LAND_HEIGHT` || The height of the landscape in pixels. Not available before `onGameStart` ||
    84 || `LAND_HEIGHT` || The height of the landscape in pixels. Not available before `onGameStart` ||
    82 || `LeftX` || X coordinate of the leftmost point of the landscape. Not available before `onGameStart` ||
    85 || `LeftX` || X coordinate of the leftmost point of the landscape. Not available before `onGameStart` ||
    83 || `RightX` || X coordinate of the rightmost point of the landscape. Not available before `onGameStart` ||
    86 || `RightX` || X coordinate of the rightmost point of the landscape. Not available before `onGameStart` ||
    84 || `TopY` || Y coordinate of the topmost point of the landscape. Not available before `onGameStart` ||
    87 || `TopY` || Y coordinate of the topmost point of the landscape. Not available before `onGameStart` ||
    91 || `ReadyTimeLeft` || Remaining ready time in millseconds, 0 if turn in progress. To set this value, use `SetReadyTimeLeft` ||
    94 || `ReadyTimeLeft` || Remaining ready time in millseconds, 0 if turn in progress. To set this value, use `SetReadyTimeLeft` ||
    92 || `GameTime` || Number of total game ticks ||
    95 || `GameTime` || Number of total game ticks ||
    93 || `TotalRounds` || Number of rounds that have passed. Equals `-1` if game has not started yet or hogs are still being placed. ||
    96 || `TotalRounds` || Number of rounds that have passed. Equals `-1` if game has not started yet or hogs are still being placed. ||
    94 || `CurrentHedgehog` || The hedgehog gear that is currently in play ||
    97 || `CurrentHedgehog` || The hedgehog gear that is currently in play ||
    95 || `AmmoTypeMax` || Maximum ammo type ID (useful to iterate through all ammo types, starting by 0) ||
    98 || `AmmoTypeMax` || Maximum ammo type ID (useful to iterate through all ammo types, starting by 0) ||
    96 || `MAX_HOG_HEALTH` || Maximum possible hedgehog health ||
       
    97 || `MAX_TURN_TIME` || Maximum possible turn time in milliseconds ||
       
    98 || `INTERFACE` || Type of the game interface: `"desktop"` for desktop, `"touch"` for touchscreen ||
       
    99 
    99 
   100 === !GameFlags ===
   100 === !GameFlags ===
   101 The !GameFlags are used to store simple boolean settings of the game.
   101 The !GameFlags are used to store simple boolean settings of the game.
   102 You can read/modify them using the [LuaAPI#GameFlags_functions GameFlags-Functions].
   102 You can read/modify them using the [LuaAPI#GameFlags_functions GameFlags-Functions].
   103 
   103