Commit Graph

17 Commits

Author SHA1 Message Date
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
reaperrr
cf5abc68ad Refactor CreateEffectWarhead ImpactTypes
Use target validity to simplify ImpactTypes.
2017-07-13 20:58:47 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
reaperrr
7235835280 Move ImpactType to Common.Warhead 2016-10-20 20:31:38 +02: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
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
RoosterDragon
dcf375a412 Store Targetables in Actor.
This can be used to avoid several lookups for these traits, as well as allow Actor to provide specialised methods to deal with target types efficiently. This also reduces some code duplication.
2015-12-12 20:55:17 +00:00
Taryn Hill
9b9d3c8af5 Add DebugOverlayColor to Warhead
This allows us to render WarheadDebugOverlay circles in a
color-per-warhead fashion.
2015-12-09 20:48:10 -06:00
Matija Hustić
d94c645046 First step in the attack mechanism's refactor.
Enabled firing multiple armaments at a target simultaneously.
Each armament defines own cursor for targeting.
The force attack modifier influences armament choice for target.
Autotargeting modified to handle firing multiple armaments simultaneously.
As a consequence, healers (medics) no longer require separate Heal
activity and AttackMedic and AutoHeal traits.
2015-10-06 01:46:55 +02:00
atlimit8
7e31a249ab Load HashSets in OpenRA.Mods.Common/Warheads/Warhead.cs directly from MiniYaml 2015-09-03 13:27:58 -05:00
atlimit8
fadfd179cb Cache FrozenActor ITargetable.TargetTypes union 2015-09-02 23:19:00 -05:00
atlimit8
f5c3575c5a Support multiple ITargetable traits 2015-09-02 23:14:40 -05:00
reaperrr
277ac04f85 Remove legacy 0% = not targetable assumption 2015-08-09 01:11:10 +02:00
RoosterDragon
3a0eb5554e Provide HasStance extension method for Stance enum, to avoid overhead of HasFlag method. 2015-07-15 20:40:38 +01:00
penev92
fe94b7686e Introduce IWarhead and move Warhead to Mods.Common 2015-07-06 22:24:20 +03:00