SunResources deprecated

by Sunnova

Resources can be placed, cleaned up, erased or restored, Supports Vanilla, cncs Sulfur, Angels Mods, Bob's Mods, Alien Biomes and Mobile_Factory Mod.

1 year, 9 months ago
0.15 - 1.1
7.24K
Cheats

g Crash with Mobile Factory

3 years ago
(updated 3 years ago)

The game return an icon size error if you have the Mobile Factory mod installed. This is caused by the fact that the Dimensional Ore Icon size is 256.

Here a simple fix you can add inside the SunBuildIcon() Function:

elseif mods["Mobile_Factory"] then
    if iconname == "__Mobile_Factory_Graphics__/graphics/icones/DimensionalFluid.png" then
      iconsize = 32
      oreicons1 = {{icon = iconname, icon_size=iconsize},{icon = "__SunResources__/graphics/check_fg_x256.png",icon_size=iconsize,scale = 0.75, shift = {0,0},}}
      oreicons2 = {{icon = "__SunResources__/graphics/icon_bg_x256.png",icon_size=iconsize,},{icon = iconname,icon_size=iconsize,scale = 0.40, shift = {0,0},}}
      oreicons3 = {{icon = "__SunResources__/graphics/icon_bgr_x256.png",icon_size=iconsize,},{icon = iconname,icon_size=iconsize,scale = 0.40, shift = {0,0},}}
    else
      iconsize = 256
      oreicons1 = {{icon = iconname, icon_size=iconsize},{icon = "__SunResources__/graphics/check_fg_x256.png",icon_size=iconsize,scale = 0.75, shift = {0,0},}}
      oreicons2 = {{icon = "__SunResources__/graphics/icon_bg_x256.png",icon_size=iconsize,},{icon = iconname,icon_size=iconsize,scale = 0.40, shift = {0,0},}}
      oreicons3 = {{icon = "__SunResources__/graphics/icon_bgr_x256.png",icon_size=iconsize,},{icon = iconname,icon_size=iconsize,scale = 0.40, shift = {0,0},}}
    end
3 years ago
(updated 3 years ago)

Ha and yes, I added the x256 icons inside the graphics folder (Modified with Gimp)
I'm not sure this is needed but it works
If you get more questions, you can join the Mobile Factory Discord

3 years ago

Thank you, I'll check it out.

3 years ago

installed Mobile_Factory_0.4.0 and Mobile_Factory_Graphics_0.1.0 to test my changes for 256 icons, getting the following error.

Error while running event Mobile_Factory::on_init()
Mobile_Factory/scripts/objects/mobile-factory.lua:65: attempt to index field 'MFTable' (a nil value)
stack traceback:
Mobile_Factory/scripts/objects/mobile-factory.lua:65: in function 'new'
Mobile_Factory/scripts/game-update.lua:88: in function 'initPlayer'
Mobile_Factory/control.lua:54: in function <Mobile_Factory/control.lua:45>

3 years ago

I just updated a version with a potential fix

3 years ago

I got it working by doing
if global.MFTable == nil then
global.MFTable = {}
end
I'll be uploading the new version of SunResources soon.

3 years ago

Seems to work now
Nice! Thanks for the quick update!

3 years ago

Seems to work now
Nice! Thanks for the quick update!

Very welcome!

New response