If the MCV is deployed as a Construction Yard when
the timer expires the structure will take a 50%
damage hit from a chrono-vortex.
If the MCV is in the process of (un)deploying it
will be returned in MCV form.
Add GrantConditionOn*Layer traits
This allows to
- drop some booleans from Locomotor
- drop a good part of the subterranean- and jumpjet-specific code/hacks from Mobile
- grant more than 1 condition per layer type (via multiple traits)
- easily add more traits of this kind for other layers
GetStream must return a unique stream on each call to ensure multiple callers can read their streams without affecting each other. As bag file returned multiple references to the same underlying stream, it was possible for multiple callers to disturb reads of each other, and thus read bad audio from each file.
- 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).
This provides a more efficient way of determining the bounds by avoiding LINQ. A helper that works directly on arrays prevents allocation of an enumerator when the collection is know to be an array.
WithReloadingSpriteTurret was bound to run into conflicts with any WithTurret*Animation traits due to overriding the turret sequence constantly via ITick.
Using (stacked) conditions instead avoids that.
Note: We might want to separate IsTraitDisabled checks later (possibly make the latter cancel the currently produced item), but that can be done in a follow-up.