Closed zrisher closed 9 years ago
Fixed the bug with CPs, seem to be working.
I think formatting is mostly up to snuff now too, removing WIP tag. Please let me know if you see places that should be amended.
Added some updates to grid ownership and fleet tracking.
Fixed Bugs
Further updates:
Fixed Bugs
Features
This also mostly fixes #33
This is an attempt at improving the usability of the mod by making its cleanup logic more intuitive and powerful. This closes #4, #5, #14, #20, and #26 and I think once we're satisfied with it we are in an excellent place to start our beta release. This also incorporates PR #55.
Format-wise, this is not completely up to the quality I want it to be before incorporating - there's a fair amount of logging and commented areas that I'll need to remove first, and probably some small spacing changes to do.
Functionally, it's running with no crashes consistently on my local machine and when I tested with Chickenbranches tonight (after some fixes). The only current bug I know of is that CPs are not currently distributing rewards - the FACGRID grouping returns zero. But that seems to be unrelated to my changes, and is ripe for a bit of refactoring using your new FactionFleet system.
So I'm submitting this as a WIP - please point out areas where you'd like to see things done differently, this will help me get it ready faster.
Here's a moderately-complete list of changes:
Features
FactionFleet
s now keep track of added GridEnforcers and decide whether to "Support" or "Unsupport" the grid if it's over the Max count set for that class/ownerType. This was necessary to allow more seamless handling of newly classified grids that might be over the limit, such as those produced by merges, newly modded worlds, rule changes, dynamic conceal, or simply changing classifiers. Instead of removing their classifier on init if it's greater than the count already stored, we add it to the fleet but compare its size against existing grids to choose the best targets for support. Unsupported grids receive Violations just like they do for other limits, which are handled by the GE.HullRule
s toHullRuleSet
s which store all class-based rules at a single point for easier consumption by Enforcer logic and greater flexibility of customization. This allows for per-class based capture rates, faction and player limits, and customBlockType
s with case-insensitive partial subtype name matchingVIOLATION
s consumed by a single cleanup process. This process uses the Derelict timers to run timed checks on all Class-based limits, applying limits incrementally. Now we have two basic Violation systems - OnPlacement violations are passed a VIOLATION_TYPE. Over-time violations are held inVIOLATION
s that carry display details, counts, and metadata about the violation like BlockType.Balance
Bug Fixes
<Enabled>False</Enabled>
attribute so it shouldn't be buildable, tested okCode Features
HullClassifier
helper object for hull classifier logic and dataDEST_TYPE.NONE
for more seamless handling of message states that may not have an audienceSecondsRemaining
property on timers to make notifications easierFactionFleet.debugPrint
method spit out a lot more info. It's pretty nicely formatted and won't show extraneous info, but understand if you want to nix this oneTo Do These are things I just need to make issues for after beta release but I haven't yet: