This PR is made to alleviate some grievances and usage warts that have been ticking me off, such as "not being able to set the exotic's selling price on a per-exotic-system basis from the code"
Additionally, it includes some other quality-enhancers such as getting rid of doublebanging in alot of places, which, while debatable, is still better than just doublebanging everywhere.
Features include:
unhardcoding exotic price from 250000
exotics can now set their own base price from the code by overriding the new getBasePrice() method
upgrades don't have this method since their price calculation was always done differently (based on the level of the upgrade and number of stack items)
no more doublebangs everywhere, we now properly use ?.let { ... } eyesore semantics everywhere instead of that
RewindSystem set it's price to 2500000
Incorporated LunaSettings into the mod, made a setting for maximum number of exotic systems on the ship
got rid of the "remove X cargo.items.credit" custom price workarounds from canAfford()/removeItemsFromFleet() which made custom prices a complete sideeffect of removing the custom (or chip) item from the inventory
make all places use ETModPlugin.MOD_ID instead of hardcoding "exoticatechnologies" as mod ID everywhere
ditto for the 250k fallback for exotic base prices
Consolidate FullMetalSalvo to properly use getPositiveMult and getNegativeMult
Consolidate MissileSpamSystem to properly use getPositiveMult and getNegativeMult
Consolidate RewindSystem to properly use just getNegativeMult for cooldown since getPositiveMult has nothing to improve here
update strings.json to include the "cooldown_string" and get rid of most of the "by lazy" string replacements since they're no longer necessary. they were before, but not anymore.
This PR is made to alleviate some grievances and usage warts that have been ticking me off, such as "not being able to set the exotic's selling price on a per-exotic-system basis from the code"
Additionally, it includes some other quality-enhancers such as getting rid of doublebanging in alot of places, which, while debatable, is still better than just doublebanging everywhere.
Features include:
getBasePrice()
method?.let { ... }
eyesore semantics everywhere instead of thatcanAfford()
/removeItemsFromFleet()
which made custom prices a complete sideeffect of removing the custom (or chip) item from the inventorygetPositiveMult
andgetNegativeMult
getPositiveMult
andgetNegativeMult
getNegativeMult
for cooldown sincegetPositiveMult
has nothing to improve here