Sea Block


No ore patches, expand from a small island. Also install the 'Sea Block Pack - Official' mod for a complete modpack

Overhaul
9 months ago
0.14 - 1.1
97.6K

b lib.takeeffect() assumes the unlock is in the research

6 years ago

Hi,

I'm trying to make an extension to the sea block mod (which is not that easy atm...). One of the issues i'm having is that you 'assume' a lot of things in your code.

The one that i can't find a workaround is in your data-final-fixes.lua line 38-39.
There you want to add science-pack-3 to the advanced-research (no issue, i can work with that), but you still assume its in the advanced-electronics research.

I would suggest 2 options:
Option 1: Try to remove it, then you got your return value, if not, just add it to that research without removing it elsewhere (then it has 2 unlocks)
Option 2: Try to remove it, if its not there, iterate over all other technologies to find where it is, and then return lib.takeeffect("newFoundTechName", name)

Great mod, I hope we can find some mod compatibility :D

kind regards,
lovely_santa

PS: I'm trying to alter the way science packs is beiing made, by my MoreScience mod.

6 years ago

I added a check in 0.2.9. It logs a warning and doesn't change anything if the effect is not found.

New response