Minetest-WorldEditAdditions
Minetest-WorldEditAdditions copied to clipboard
WEA Tool self containment
Problems:
- Move over to
wea_c.poscompletely -- Some tools (specifically Cloudwand) still usewea.selection - Multiwand still uses
wea.farwand.do_raycast-- needs to be moved over towea_t.do_raycastlike the Cloudwand uses https://github.com/sbrl/Minetest-WorldEditAdditions/blob/d638a349a9070a0ada035ef6a655dfc7e260e78c/worldeditadditions_tools/items/multiwand.lua#L47 - Minimize the number of files that need
local wea = worldeditadditionsand if possible remove dependency on WEA altogether so that WEA Tool only needs WEA Core as a dependency - I will do work after PR #117 is completed to remove the WE dependency which is mostly just calls to
WE.player_notifywhich I already have plans to replace #116
Erm I don't see wea_t depending on main wea as a problem - in fact I have an idea in my head to implement an advanced tool that can temporarily take over your hotbar that will depend on wea
Similarly the raycasting function really should live in worldeditadditions_core and not the far wands mod I think, as it could be useful to other functions
but the rest looks good! thanks for doing this, 'cause it's really needed
Oh wait, I see why we have do_raycast in wea_t
ignore me on that point
Erm I don't see
wea_tdepending on mainweaas a problem - in fact I have an idea in my head to implement an advanced tool that can temporarily take over your hotbar that will depend on wea
Oh, ok. I just found that very few things actually were depending on WEA so I figured we could eliminate those but if you're planning to expand that's fine.
Similarly the raycasting function really should live in
worldeditadditions_coreand not the far wands mod I think, as it could be useful to other functions
Right now we have 3 raycast functions: wea.farwand.do_raycast, wea_core.do_raycast and wea_tool.do_raycast which is a wrapper for wea_core.do_raycast. At least one of those needs to go!
Right That is a problem Okay
In your branch farwand-refactor I see:
worldeditadditions_tools.do_raycast- wrapper that manages application of settingsworldeditadditions_core.raycast- core raycasting functionality
....but I don't see wea.farwand.do_raycast?
https://github.com/sbrl/Minetest-WorldEditAdditions/blob/e89d61034fcbf8f2ce9479efc6101155f13cee18/worldeditadditions_farwand/lib/multiwand.lua#L46
I still can't find that function definition wow
How does it even still work?
Got it
On dev: https://github.com/sbrl/Minetest-WorldEditAdditions/blob/30e154944d2ac9282d2960ff711ea39baf57f641/worldeditadditions_farwand/init.lua#L1
note that originally the main namespace is registered under worldeditadditions as wea.farwand
Hence the wea.farwand.do_raycast call in your branch needs to read wea_t.raycast
Pushed a commit to tidy this whole situation w/compat pos.lua calls up
b57b3e85ee42c10b191cdb46d3c16dfb4c3ca89f..90f97234a881de012fcadb69492dba985f873d16