Planetorio


Warptorio2 but the planets thing is a standalone library that can be used by anyone to make and work with planets, surface templates, and simple automation and management of surface-specific events (e.g. only raised if an entity is built on that planets surface) and chunk generation.

Internal
1 year, 7 months ago
0.17 - 1.1
36.7K
Environment

b UpdateTemplate doesn't work

1 year, 11 months ago

Hi,

I'm looking at adding compatibility for a mod that adds other ores (specifically IR3). I was trying to use UpdateTemplate, but it doesn't actually seem to do anything. I think I found the issue though. Happy to make a pull request if you have a Github or anything.

-- control_planets.lua

function planets.UpdateTemplate(tbl) -- update a template in the global table
    if(not global.templates[tbl.key])then error("Tried to update a template that doesnt exist! : " .. tostring(tbl.key)) end
    table.deepmerge(planets.templates[tbl.key],tbl) events.vraise("on_template_updated",{template=tbl}) -- this line should be global.templates, not planets.templates
end

For context, I'm adding compatibility by removing the "nauvis" modifier on most of the planets. I think most people that have done this by changing the code, but we intend to play multiplayer with it, so easiest to do on the mod side.

Thanks!

1 year, 11 months ago

That's not how that function works.
Modded ores fixed in 0.1.4

This thread has been locked.