joe7575 / techage_modpack

A modpack around the mod techage, including the mods like autobahn, basic_materials, compost, hyperloop, signs_bot, minecart, techpack_stairway, towercrane, unified_inventory
12 stars 10 forks source link

Adding new machines is difficult #26

Open jeremyshannon opened 1 month ago

jeremyshannon commented 1 month ago

I wanted to make a reskinned TA3 furnace_top using the the ma_and_pops_furniture mod's oven node & textures, basically cloning the furnace node and doing a minetest.override() on appearance + etc, but I bounced off all the layers of getting a new machine registered.

In particular, techage.register_consumer() seems to be unfriendly to modding, as it generates a techage node whose name fails on registry because the mod calling it has a different namespace, and Minetest doesn't like that. I tried without using register_consumer() but it didn't seem to do anything without it.

Documentation of how this is all supposed to work would be nice, too.

joe7575 commented 1 month ago

techage.register_consumer() has the optional arguments "node_name_prefix" and "inv_name_prefix" See https://github.com/joe7575/techage_modpack/blob/master/techage/basic_machines/consumer.lua#L116C84-L116C117

This allows to register foreign nodes, like he does: https://github.com/Archtec-io/ta_apiary/blob/main/honey_sink.lua#L184