mt-mods / xcompat

MIT License
4 stars 5 forks source link

Add some kind of API for dig groups #11

Open luk3yx opened 8 months ago

luk3yx commented 8 months ago

Different games sometimes use non-standard dig groups which makes blocks created with other games in mind unbreakable.

wsor4035 commented 8 months ago

Mineclon*s will be fun given they require a node def param in addition to groups

BuckarooBanzay commented 5 months ago
04:36 [discord] <wsor> niklp, buckaroo, and luke: soliciting thoughts on <https://github.com/mt-mods/xcompat/issues/11>
04:36 [discord] <wsor> been considering two options
04:36 [discord] <wsor> * one idea is something like a group where you just add `xcompat_autohandle_groups=1` + a set of standarded xcompat groups like `xcompat.groupname=level` in your groups and it auto handles converting that for you, also handes mineclones node def param etc
04:36 [discord] <wsor> * other idea is creating a function called xcompat.register_node that takes a node def and manipulates the groups, ands the node def param, etc before passing off to minetest to register
04:36 [discord] <wsor> .
04:36 [discord] <wsor> both require hackery (the first with overrides), the latter with faking which reassigning which mod the node came from - [at least the hackery i can think of off the top of my head, maybe more]. slight advantage to the second one is we could chuck other helpful things like being able to register crafts from the node def, like homedecor common does, etc.

+1 for groups = { xcompat_autohandle_groups=1 } this sounds like the least intrusive and most flexible option (a bit hacky yeah, but the lesser evil IMO)