Commit Graph

39 Commits

Author SHA1 Message Date
Curtis Shmyr
3c7f119bb1 Add a damage parameter to Lua OnDamage callback 2020-06-23 19:58:31 +02:00
Paul Chote
86f61298e6 Replace ITraitInfo interface with TraitInfo class. 2020-05-21 13:01:04 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Oliver Brakmann
26d712728a Add scripting support for TimeLimitManager 2019-05-16 14:56:56 +02:00
abcdefg30
38b3a4a668 Split INotifyWinStateChanged from INotifyObjectivesUpdated 2019-04-22 21:04:42 +02:00
abcdefg30
00b8576edf Remove the unused INotifySold.Selling implementation 2019-03-13 23:14:35 +01:00
abcdefg30
f021439dee Use explicit implementation in ScriptTriggers.cs 2019-03-13 23:14:35 +01:00
abcdefg30
2db2148310 Add OnAnyProduction and OnSold lua triggers 2019-03-13 23:14:35 +01:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
abcdefg30
3e93242929 Fix OnAllRemovedFromWorld only triggering once 2019-01-22 23:09:21 +00:00
Oliver Brakmann
e71a31925f Require explicit implementation of INotifyObjectivesUpdated 2018-12-22 16:39:06 +13:00
Paul Chote
ea3731a7cc Pass the original init dict to UnitProducedByOther. 2018-11-03 17:30:05 +01:00
Paul Chote
7e67ce0139 Pass CaptureTypes through the INotifyCapture interface.
Also make it require explicit implementation.
2018-11-03 14:47:22 +01:00
reaperrr
3a82b13093 Make INotifyKilled require explicit implementation 2018-04-29 11:59:49 +01:00
reaperrr
7ca9aa5e0b Make INotifyDamage require explicit implementation 2018-04-29 11:59:49 +01:00
RoosterDragon
5bd5a384b7 Use a BitSet for representing target types.
- Rename Bits<T> to BitSet<T>.
- Implement set based helpers for BitSet<T>.
- When representing TargetTypes of ITargetable in various traits, use a BitSet<TargetableType> instead of HashSet<string> for better performance & reduced memory usage.
- Fix FieldLoader to trim input values when generating a BitSet<T>.
- Require T in BitSet<T> and BitSetAllocator<T> to be a class since it's just a marker value. This allows the JIT to instantiate generic code for these classes once, as they don't benefit from specialized code for T. (Typically JITs will generate shared code for all reference types, and unique code for every value type encountered).
2018-03-21 12:07:44 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Mustafa Alperen Seki
fc07391c8c Add Type Support for InfiltrateFor* traits 2017-12-27 11:13:09 +00:00
GSonderling
488cec64b8 Added support for filtering exits by production type. 2017-12-13 04:08:52 +01:00
reaperrr
8533debc44 Require explicit INotifyAddedToWorld and INotifyRemovedFromWorld 2017-10-07 10:17:11 +02:00
reaperrr
9aaf800bca Require explicit INotifyActorDisposing 2017-09-28 13:14:08 +02:00
reaperrr
761a4f29ab Make INotifyIdle and INotifyBecomingIdle require explicit implementation 2017-09-16 15:51:37 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
reaperrr
d9ecba7b60 Make INotifyInfiltrated require explicit implementation 2016-10-22 18:21:52 +02:00
Matthias Mailänder
abbcdbd5df Add OnSelling and OnSold to the Lua API. 2016-09-02 21:59:59 +02:00
Taryn Hill
c6265527b2 Expose passenger enter/exit notifications to Lua 2016-03-29 07:00:01 -05:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +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
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
Oliver Brakmann
fbd5938f3f Do not fire script triggers while the world is being destroyed 2015-06-21 19:37:25 +02:00
penev92
16dee554c4 Introduce OnDiscovered and OnPlayerDiscovered Lua triggers 2015-03-21 15:19:18 +02:00
RoosterDragon
1515ac54f6 Enforce a line length limit. 2015-03-19 17:20:34 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
Matthias Mailänder
bc3acfeee7 StyleCop clean OpenRA.Game 2015-01-04 15:38:54 +01:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
Paul Chote
ecd3809bc2 Fix a collection of whitespace-style issues in Mods.Common. 2014-12-14 17:06:43 +13:00
atlimit8
91b5ac5070 Move the core of OpenRA.Mods.RA.Scripting to OpenRA.Mods.Common.Scripting 2014-11-26 15:49:16 -06:00