Commit Graph

109 Commits

Author SHA1 Message Date
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Paul Chote
83477ec19e Move VqaReader to Mods.Common. 2016-01-07 21:07:42 +00:00
RoosterDragon
0c5463208d Store triggers in ScriptTriggers in an array.
We can use the enum to index the array directly, in order to give faster lookups compared to a dictionary.
2015-12-29 14:27:54 +00:00
RoosterDragon
6ab6d774a7 Ensure LuaValues are disposed.
Adding in these missing calls prevents these instances from having to be finalized.
2015-12-23 17:22:51 +00:00
Oliver Brakmann
02fa63c1b4 Merge pull request #9853 from penev92/unglobalFileSystem
Unglobal file system
2015-12-14 20:52:30 +01:00
Pavel Penev
1b88d24cfa Unstatic GlobalFileSystem and rename it to FileSystem
Add a ModFiles field on ModData and move all access to the file system to go through that.
2015-12-14 03:42:22 +02:00
RoosterDragon
c0286bb147 Remove ActorMap.ActorsInWorld.
Prefer the more direct and efficient query on World.Actors instead.
2015-12-12 20:42:44 +00:00
atlimit8
0fc04b7a4a Make Mobile upgradable 2015-12-04 19:22:23 -06:00
Paul Chote
6304d72f44 Add enter behaviour customisation to C4Demolition. 2015-11-25 21:16:15 +00:00
Matthias Mailänder
79bf69cd4c Merge pull request #9978 from RoosterDragon/cache-script-actor-luavalue
Cache self.ToLuaValue in ScriptTriggers
2015-11-22 18:06:41 +01:00
Pavel Penev
4c7e6db4da Merge pull request #9599 from ChaoticMind/lua_debug
Add a Lua wrapper to display debug messages (shows if setting enabled)
2015-11-14 20:00:38 +02:00
RoosterDragon
e6e98d3aa2 Cache self.ToLuaValue in ScriptTriggers.
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.
2015-11-12 22:18:19 +00:00
Paul Chote
dbd23c9d46 Merge pull request #9919 from obrakmann/fix9863
Fix bogus owner check in Lua API production code
2015-11-11 22:23:44 +00:00
Oliver Brakmann
b30bae08c0 Fix bogus owner check in Lua API production code 2015-11-09 19:31:19 +01:00
Matthias Mailänder
0e13472651 Merge pull request #9924 from cjshmyr/lua-islocalplayer
Added 3 Lua player API properties
2015-11-08 08:52:17 +01:00
Curtis Shmyr
2a6c87f81d Added 3 Lua player API properties 2015-11-07 12:17:09 -07:00
Oliver Brakmann
177d983728 Merge pull request #9759 from atlimit8/ActorsHavingTrait
Add ActorsHavingTrait<TTrait>()
2015-11-04 22:26:10 +01:00
atlimit8
b6f17df260 Add ActorsHavingTrait<TTrait>([Func<TTrait, bool]) 2015-10-28 16:36:45 -05:00
atlimit8
dac15edce5 Load rgb[a] hex colors from MiniYaml (+ Lua) 2015-10-27 16:09:48 -05:00
abcdefg30
e65465c539 Fix Utils.FormatTime not working properly on different game speeds 2015-10-24 23:42:32 +02:00
Paul Chote
e0177d7798 Merge pull request #9494 from abcdefg30/luabackground
Add lua support for playing background music
2015-10-24 22:25:35 +01:00
Oliver Brakmann
6420a6ec8a Allow force-attacking things with the Lua API's Attack() method 2015-10-24 00:27:23 +02:00
RoosterDragon
983032205f Merge pull request #9593 from huwpascoe/HealthTrait
Moved Health to OpenRA.Mods.Common
2015-10-20 20:59:04 +01:00
abcdefg30
ce95ff074a Add checks for missing music tracks 2015-10-18 20:43:47 +02:00
abcdefg30
0c373cc8c4 Remove an unused using 2015-10-18 20:43:46 +02:00
abcdefg30
4afef8868e Add lua support for playing background music 2015-10-18 20:43:45 +02:00
abcdefg30
674b1672f5 Merge pull request #9488 from atlimit8/MapMusic
Map Music
2015-10-18 17:47:26 +02:00
Huw Pascoe
c95fc793e4 Moved Health trait to OpenRA.Mods.Common
In preparation for custom hitboxes.
2015-10-12 01:56:00 +01:00
Kevin Azzam
a0bcfb6f35 Add a Lua wrapper to display debug messages (shows if setting enabled) 2015-10-11 13:13:31 +02:00
abcdefg30
be50adbed3 Add a lua function to check for prerequisites 2015-10-06 22:14:23 +02:00
Pavel Penev
0ee38de4bb Rename HeliReturn
Rename HeliReturn to HeliReturnToBase to keep somewhat with the convention established for Plane- against Heli- oriented traits.
2015-10-01 20:15:50 +03:00
Pavel Penev
8a44366667 Merge Plane and Helicopter into Aircraft 2015-10-01 20:15:41 +03:00
atlimit8
f6180d7fa4 Include add/replace playlist entries support using map.yaml 2015-09-30 10:31:49 -05:00
Paul Chote
ef55d646f7 Unstatic the Sound class. 2015-09-20 14:11:06 +01:00
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
atlimit8
6970959ef1 .Trait[OrDefault]<Trait> => .Info.Traits.Get[OrDefault]<TraitInfo> where applicable 2015-09-19 09:49:24 -05:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
atlimit8
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -05:00
abcdefg30
5660b45690 Merge pull request #9267 from clemty/luadocs
Lua API documentation cleanup
2015-09-11 20:32:48 +02:00
Paul Chote
1109ec53d1 Update UI timers for variable game speed. 2015-09-06 17:48:42 +01:00
atlimit8
8250f223c4 More HashSet trait fields & Lint support 2015-09-05 16:59:30 -05:00
clemty
ea71620f47 Lua API documentation cleanup
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
2015-09-05 15:01:14 +02:00
clemty
2bbc1fcda4 LUA and trait documentation fixes
- 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").
2015-08-24 19:41:15 +02:00
Pavel Penev
09f67d18bb Some internal "race" to "faction" renaming 2015-08-22 23:34:36 +03:00
Taryn Hill
7656ad3d12 Use a default of 1d instead of 0d in LightingGlobal if the necessary trait doesn't exist 2015-08-02 10:26:15 -05:00
Taryn Hill
2f452d88b3 Rename EffectsGlobal to LightingGlobal
Remove ChangeLighting in favor of individual channels
Change RA's fort-lonestar to use Lighting instead of Effect
2015-08-02 10:03:39 -05:00
Paul Chote
9b3ef9e7f7 Move MusicPlaylist to Mods.Common. 2015-08-01 22:56:07 +01:00
penev92
4616828b28 Deprecate PlayerProperties.Race 2015-07-25 16:43:34 +03:00
penev92
bb648decc3 Rename Player.Country to Player.Faction 2015-07-15 04:06:52 +03:00
Oliver Brakmann
380cf22477 Merge pull request #8661 from penev92/bleed_renameCountry
Rename the Country trait to Faction
2015-07-14 21:05:52 +02:00