RkShaRkz / Starsector-IntelliJ-Template

Starsector mod template with pre-configured IntelliJ project files and instructions.
The Unlicense
0 stars 1 forks source link

Fix the caliph shield (and the vayra_modular_shields hullmod too) #55

Closed RkShaRkz closed 1 month ago

RkShaRkz commented 1 month ago

The problem with caliph's shields was that it was overloading from just one hit from a frigate. The initial bug report said it's going to overload on it's own from nothing, however i wasn't able to repro that.

Because of the weird getCustomData() approach that never saved the maps it was getting or generating the ship just went into overload super-fast. (tl;dr it was never draining any flux)

Now that the maps are being saved, it doesn't overload as fast at all, however there might still be hidden caveats - namely:

These things should all be explored and accounted for, to avoid "yea we fixed the shields but caused huge amounts of memory leaks" situation.

Also, the logs need to be muted or wrapped in the VAYRA_DEBUG call, but i'd use something similar to GuardianShield's logFlux() method instead.