Cryterion wrote:I've noticed this is still the case, any suggestions on a workaround to rather having to modify any updates everytime!Cryterion wrote:Hi
had a bit of a problem trying to register an mv machine to be used in another mod, and found the following code changed fixed the naming convention error I kept getting
in /technic/technic/machines/register/machine_base.lua
line 126Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_node("technic:"..ltier.."_"..machine_name, {
change it toYour phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_node(":technic:"..ltier.."_"..machine_name, {
and line 158Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_node(":technic:"..ltier.."_"..machine_name.."_active",{
changed it toYour phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_node(":technic:"..ltier.."_"..machine_name.."_active",{
It still keeps technic functional, but will allow other mods to register lv,mv and hv machines if they wish to use the technic functions.
minetest.register_node(modname..":technic:"..ltier.."_"..machine_name, {
Byakuren wrote:minetest.get_current_modname is a thing too
So it would be best to concatenate minetest.get_current_modname() as the prefix to all of the ids in all of the registry function calls.
ABJ wrote:Well, the original developer is no longer alive, so the thread can't be updated, but it's open source, so yeah.
Inocudom wrote:This strange error came up:
2016-11-08 00:07:08: ERROR[Main]: ModError: Failed to load and run script from /home/derek/.minetest/mods/scifi_nodes/init.lua:
2016-11-08 00:07:08: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:130: attempt to compare number with string
2016-11-08 00:07:08: ERROR[Main]: stack traceback:
2016-11-08 00:07:08: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:130: in function 'register_item'
2016-11-08 00:07:08: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:206: in function 'really_register_node'
2016-11-08 00:07:08: ERROR[Main]: .../derek/.minetest/mods/technic/technic_worldgen/nodes.lua:159: in function 'really_register_node'
2016-11-08 00:07:08: ERROR[Main]: ...derek/.minetest/mods/technic/technic_worldgen/crafts.lua:167: in function 'register_node'
2016-11-08 00:07:08: ERROR[Main]: /home/derek/.minetest/mods/scifi_nodes/init.lua:336: in main chunk
2016-11-08 00:07:08: ERROR[Main]: Check debug.txt for details.
When technic is disabled:
2016-11-08 00:35:44: ERROR[Main]: ModError: Failed to load and run script from /home/derek/.minetest/mods/scifi_nodes/init.lua:
2016-11-08 00:35:44: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:130: attempt to compare number with string
2016-11-08 00:35:44: ERROR[Main]: stack traceback:
2016-11-08 00:35:44: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:130: in function 'register_item'
2016-11-08 00:35:44: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:206: in function 'register_node'
2016-11-08 00:35:44: ERROR[Main]: /home/derek/.minetest/mods/scifi_nodes/init.lua:336: in main chunk
2016-11-08 00:35:44: ERROR[Main]: Check debug.txt for details.
Nore wrote:If you're using Ubuntu or one of its derivatives, you might have a not-so-recent version: could you paste your version number here?
Hybrid Dog wrote:Fixerol, if l remember correctly, l fixed the OOM crashes in my fork.
GreenDiamond, https://github.com/minetest-technic/tec ... es.lua#L53
after the unwanted recipe is added by technic, execute following:
print(dump(technic.recipes))
then search for your unwanted recipe in the shown table, after that write code which takes it from that table
the removal code may look similar to this:
technic.recipes["compres"].recipes["mod:sand"] = nil
Hybrid Dog wrote:The index is "default:desert_sand", not "default:sand 2".
technic.recipes.compressing.recipes["default:desert_sand"] = nil
Don't trust the craft guide, it's not up to date after removing the recipe.
minetest.after(2, function()
technic.recipes.compressing.recipes["default:desert_sand"] = nil
end)
Hybrid Dog wrote:How about this:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.after(2, function()
technic.recipes.compressing.recipes["default:desert_sand"] = nil
end)
Hybrid Dog wrote:Fixerol, if l remember correctly, l fixed the OOM crashes in my fork.
Users browsing this forum: No registered users and 33 guests