If a class is caching the TraitsImplementing enumerable, instead cache the results of enumerating it to an array. The avoids having to enumerate the sequence each time it is needed.
Remove redundant ‘this’.
Remove unused using directives.
Simplify LINQ chains.
Add some trait property descriptions.
Add readonly where viable.
Add fullstops to some yaml descriptions.
Removes Reloads trait.
This enables adding multiple AmmoPools via @ differentiators and
Name which adds the possibility to assign each armament to a specific
ammo pool.
Furthermore, this moves all Reloads functionality onto AmmoPool.
Now a combination of all three is possible on a single actor: no limited
ammo, limited ammo that can reload on its own, and limited ammo which
needs to be reloaded at a rearm actor.
Additionally moves RearmSound from Minelayer to AmmoPool.
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.
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
In Mobile.cs IsMoving now has a public set as opposed to the initial internal.
Added IMoveInfo interface to go with *Info classes that require IMove.
WithRotor now uses IMove.IsMoving instead of (self.CenterPosition.Z > 0) as part of a check.