RandomNotes.wiki
changeset 633 87ad9962ee1f
parent 632 097e645fe00b
child 634 174622a27c8f
equal deleted inserted replaced
632:097e645fe00b 633:87ad9962ee1f
     6 This page is intentionally chaotic and may change rapidliy at any time.
     6 This page is intentionally chaotic and may change rapidliy at any time.
     7 
     7 
     8 = Undocumented LuaAPI functions =
     8 = Undocumented LuaAPI functions =
     9 Full list (without parameters, but automatically generated) at http://hw.ercatec.net/docs/lua_wiki_check.php.
     9 Full list (without parameters, but automatically generated) at http://hw.ercatec.net/docs/lua_wiki_check.php.
    10 
    10 
    11  * CampaignLock
    11  * `CampaignLock`
    12   * Marked as “TODO” in source code
    12   * Marked as “TODO” in source code
    13  * CampaignUnlock
    13  * `CampaignUnlock`
    14   * Marked as “TODO” in source code
    14   * Marked as “TODO” in source code
    15  * SetGearCollisionMask(gearUid, mask)
    15  * `SetGearCollisionMask(gearUid, mask)`
    16   * `mask` can be between `0x0000` and `0xFFFF`. `0xFFFF` collides with everything, `0xFF00` collides with land only, `0x00FF` collides with other gears only. The meaning of other values is unclear and should be discovered.
    16   * `mask` can be between `0x0000` and `0xFFFF`. `0xFFFF` collides with everything, `0xFF00` collides with land only, `0x00FF` collides with other gears only, `0x0000` collides with nothing. The meaning of other values is unclear and should be discovered.
    17  * GetGearCollisionMask(gearUid)
    17  * `GetGearCollisionMask(gearUid)`
    18  * DeclareAchievement(achievementId, teamname, location, value)
    18  * `DeclareAchievement(achievementId, teamname, location, value)`
    19  * EndLuaTest(state)
    19  * `EndLuaTest(state)`
    20   * state is `TEST_SUCCESSFUL` or `TEST_FAILED)
    20   * state is `TEST_SUCCESSFUL` or `TEST_FAILED)`
    21  * SetAmmoStore(loadouts, probabilities, delays, reinforcements)
    21  * `SetAmmoStore(loadouts, probabilities, delays, reinforcements)`
    22  * SetGearAIHints(gearUid, aiHints)
    22  * `SetGearAIHints(gearUid, aiHints)`
    23  * onAchievementsDeclaration()
    23  * `onAchievementsDeclaration()`
    24  * onSpecialPoint(x, y, flags)
    24  * `onSpecialPoint(x, y, flags)`
    25 
    25 
    26 = How to add a settings option =
    26 = How to add a settings option =
    27  * `QStringList HWGame::setArguments()` in `game.cpp` is the function that prepares the argument list
    27  * `QStringList HWGame::setArguments()` in `game.cpp` is the function that prepares the argument list
    28  * `void GameUIConfig::SaveOptions()` in `gameuiconfig.cpp` loads (or initializes) values and set the widgets to those values
    28  * `void GameUIConfig::SaveOptions()` in `gameuiconfig.cpp` loads (or initializes) values and set the widgets to those values
    29  * `PageOptions::PageOptions(QWidget* parent) :  AbstractPage(parent)` is where you would add your widget
    29  * `PageOptions::PageOptions(QWidget* parent) :  AbstractPage(parent)` is where you would add your widget