The Lua API would return wrong information on player fields such as the team or faction when it was changed in the lobby. It referenced fields on the PlayerReference, which are pretty much read-only and don't get changed by the lobby.
Added a Damage class to pass damage value and damage(types) instead.
This removes a great amount of overhead and longterm opens possibilities to have damagetypes without warheads.
This allows actors to be tagged with arbitrary strings.
Also includes ScriptTagsInit and MapGlobal.ActorsWithTag
which expose this functionality to map scripters.
When making an Lua function call, any LuaCustomClrObject must be introspected via reflection in order to determine what to expose in Lua code. In OpenRA, we use these for any types that implement IScriptBindable, such as Actor.
Previously, we would need to pay the cost of this reflection for every individual Lua call an Actor used in its ScriptTriggers trait where it passed `self` as a parameter. This would be repeated every time. For performance, we now cache self.ToLuaValue in the trait and use that for all calls so we only pay the reflection cost once on trait construction. This removes a significant overhead in the Lua bridging code.
also reduces amount of headings with only a single entry
SendAirStrike() - now listed under "Support Powers"
Guard() - now listed under "Combat"
FindResources() - now listed under "Movement"
Deploy() - now listed under "General"
SendParaTroopers() - now listed under "Support Powers"
Paradrop() - no listed under "Transports"
Teleport() should probably be listd under "Movement", but I don't know how to change that (currently listed under "General").
note that I changed "ScriptGlobal" to "ScriptPropertyGroup" for SendAirStrike() - I hope that does not screw up anything
- Typo in documentation ("proximitry").
- Add spaces between sentences.
- Remove most occurrences of " " (two spaces) unless clearly used as indendation
- Punctuation (although no fullstop after filenames like "notifications.yaml").
If a class is caching the TraitsImplementing enumerable, instead cache the results of enumerating it to an array. The avoids having to enumerate the sequence each time it is needed.