2025-08-27 04:22 CEST

spring: develop e007b71d Diff ] Back to Repository ]
Author Committer Branch Timestamp Parent
-jk- -jk- develop 2010-04-26 17:13:18 develop c742d0dc
Changeset Lua: added a third argument to Set..RulesParam()

e.g. new syntax is SetUnitRulesParam(int unitID, string paramName, float paramValue, { public = true } )
possible values for the table are:
`private` : only readable by the ally (default)
`allied` : readable by ally + ingame allied
`inlos` : readable if the unit is in LOS
`inradar` : readable if the unit is in AirLOS
`public` : readable by all

note: if one condition is fulfilled all beneath it are too (e.g. if an unit is in LOS it can read params with `inradar=true` even if the param has `inlos=false`)
note2: all GameRulesParam are public, TeamRulesParams can just be `private`,`allied` and/or `public`
mod - rts/ExternalAI/SSkirmishAICallbackImpl.cpp Diff ] File ]
mod - rts/Game/SelectedUnits.h Diff ] File ]
mod - rts/Game/UI/SelectionKeyHandler.cpp Diff ] File ]
mod - rts/Lua/LuaRules.cpp Diff ] File ]
mod - rts/Lua/LuaRules.h Diff ] File ]
add - rts/Lua/LuaRulesParams.cpp Diff ] File ]
add - rts/Lua/LuaRulesParams.h Diff ] File ]
mod - rts/Lua/LuaSyncedCtrl.cpp Diff ] File ]
mod - rts/Lua/LuaSyncedRead.cpp Diff ] File ]
mod - rts/Sim/Misc/Team.cpp Diff ] File ]
mod - rts/Sim/Misc/Team.h Diff ] File ]
mod - rts/Sim/Units/Unit.h Diff ] File ]