Commit Graph

74 Commits

Author SHA1 Message Date
teinarss
c2279d3071 Change GetField calls to use nameof 2021-02-28 18:43:51 +01:00
Paul Chote
0eb0041f90 Allow ActorInits to target a specific trait by matching the @ suffix. 2020-06-08 19:18:38 +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
abcdefg30
9a5eaa7cb7 Don't throw an exception when a field is missing 2019-12-07 09:15:38 +01:00
Paul Chote
dba1301b61 Change new BitSet<T> to default(BitSet<T>). 2019-06-08 13:19:57 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
f6768fe624 Remove legacy editor actor properties plumbing. 2018-12-08 22:53:13 +01:00
Peter Antal
d2ff5b49fd Allow each caller on MergeOrDefault to discard nodes.
Use filtering ActorInfo's to drop template actors.
2018-03-21 12:10:31 +01:00
RoosterDragon
d0f7511a62 Add TrimExcess to TypeDictionary.
After adding is finished, this can be used to reduce the memory footprint of the dictionary.
2018-03-21 12:08:23 +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
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
RoosterDragon
36c9558b5f Added some comments to TraitsInConstructOrder. 2016-03-29 23:10:49 +01:00
RoosterDragon
3192432a5c Strengthen ordering of TraitsInConstructOrder.
All types that are dependencies of a trait must now occur before it in the construct ordering. Previously, only one type that was a dependency of a trait needed to occur before it.
2016-03-29 23:10:46 +01: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
Paul Chote
ab921682c4 Rewrite yaml merger. 2016-01-30 15:03:56 +00:00
abcdefg30
3c171569a7 Merge pull request #10193 from atlimit8/ITraitInfoInterface
TraitInfoInterface base for interfaces implemented by trait infos
2015-12-29 15:04:57 +01:00
atlimit8
3d2aa751a3 TraitInfoInterface base for interfaces implemented by trait infos 2015-12-07 18:22:43 -06:00
RoosterDragon
0caffa8196 Remove some global state dependence in ActorInfo.
Instead on relying on the global Game.ModData.ObjectCreator, this is passed in via a parameter.
2015-11-28 17:20:32 +01:00
Paul Chote
c7249e6fa6 Move yaml removals to the end of the merge. 2015-11-28 17:20:32 +01:00
Paul Chote
a074bb1d4b Rename MiniYaml MergeLiberal -> MergePartial, MergeStrict -> Merge. 2015-11-28 17:20:21 +01:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00
atlimit8
9cef739dd5 Make ActorInfo.{Traits => traits} private 2015-09-21 15:50:57 -05:00
atlimit8
b889675c83 ActorInfoTest fixup with new ActorInfo ctor 2015-09-21 15:50:57 -05:00
atlimit8
b38b6eadd0 Add IEnumerable<ITraitInfo> ActorInfo.TraitInfos() replacing actorInfo.traits enumeration 2015-09-21 15:50:57 -05:00
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
atlimit8
429a9380e8 Ignore trait property requirements for abstract actor types 2015-07-12 12:44:30 -05:00
atlimit8
7881ff40bf Added FieldLoader.SerializeAttribute.Required to require fields in MiniYaml 2015-07-12 12:44:22 -05:00
abcdefg30
6afc6a879e Update the ActorInfo summary 2015-07-05 18:43:10 +02:00
Paul Chote
8a1f9261c3 Convert hidden [Desc] to a <summary>. 2015-04-22 21:24:48 +12:00
Paul Chote
2cbe269c1e Support multiple inheritance for actor rules. 2015-04-22 21:24:47 +12:00
Paul Chote
0a43b3da72 Rewrite yaml merging block removal.
Fixes #2922, #6818.
2015-04-22 19:58:10 +12: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
Hellhake
5a97a4b63b Fix StyleCop warnings in OpenRA.Game 2015-01-02 12:11:01 +01:00
huwpascoe
db126ce1b6 Reimplemented TraitsInConstructOrder() 2014-10-29 20:37:14 +00:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
Paul Chote
f6f366c4b3 Merge pull request #5401 from RoosterDragon/nodesdict
Changed MiniYaml.NodesDict property into a method.
2014-06-12 17:34:59 +12:00
RoosterDragon
e63f330717 Improved efficiency of startup methods.
- ShpReader will copy the input stream into memory just once rather than for every header.
- ShpReader.CopyImageData switched to use Array.Copy since that uses some unsafe magic for speed.
- In ActorInfo, cache a GetType call and prevent needless materialization in PrerequisitesOf.
- In ObjectCreator, cache type and ctor lookups since these are expensive and often repeated.
- Implement IReadOnlyDictionary<T, U> on Cache<T, U> to provide some supplementary functions.
- In TechTree.GatherOwnedPrerequisites, rearrange a Boolean 'and' expression to evaluate expensive functions later in the chain, and use ContainsKey to speed up name check.
2014-06-09 17:13:01 +01:00
RoosterDragon
2e992a7310 Changed MiniYaml.NodesDict property into a method.
Method is now called ToDictionary.
- Cached a few invocations into locals which should prevent some redundant evaluation.
- Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
2014-06-09 17:06:42 +01:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Scott_NZ
a25aa23805 radoc tidy 2013-03-22 18:12:47 +13:00
Matthias Mailänder
c731a7960e embed the previously manually edited outdated documentation
from https://github.com/OpenRA/OpenRA/wiki/Trait-Documentation
2013-03-20 21:20:27 +01:00
Chris Forbes
3d8dc80f03 complain about junk values like the recent volkov breakage 2012-09-04 10:55:26 +12:00
Chris Forbes
6cb8ee1f9f expose appropriate *Inits, and make them work in editor 2011-11-06 18:17:13 +13:00