Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEA Tool self containment #118

Open
VorTechnix opened this issue Oct 10, 2024 · 8 comments · May be fixed by #117
Open

WEA Tool self containment #118

VorTechnix opened this issue Oct 10, 2024 · 8 comments · May be fixed by #117
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@VorTechnix
Copy link
Collaborator

Problems:

  • Move over to wea_c.pos completely -- Some tools (specifically Cloudwand) still use wea.selection
  • Multiwand still uses wea.farwand.do_raycast -- needs to be moved over to wea_t.do_raycast like the Cloudwand uses
    local looking_pos, node_id = wea.farwand.do_raycast(player)
  • Minimize the number of files that need local wea = worldeditadditions and if possible remove dependency on WEA altogether so that WEA Tool only needs WEA Core as a dependency
  • I will do work after PR Farwand refactor #117 is completed to remove the WE dependency which is mostly just calls to WE.player_notify which I already have plans to replace Implement player notification in WEA core #116
@VorTechnix VorTechnix added enhancement New feature or request help wanted Extra attention is needed labels Oct 10, 2024
@VorTechnix VorTechnix linked a pull request Oct 10, 2024 that will close this issue
@sbrl
Copy link
Owner

sbrl commented Oct 10, 2024

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

@sbrl
Copy link
Owner

sbrl commented Oct 10, 2024

Oh wait, I see why we have do_raycast in wea_t

ignore me on that point

@VorTechnix
Copy link
Collaborator Author

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

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_core and 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!

@sbrl
Copy link
Owner

sbrl commented Oct 10, 2024

Right
That is a problem
Okay

In your branch farwand-refactor I see:

....but I don't see wea.farwand.do_raycast?

@VorTechnix
Copy link
Collaborator Author

local looking_pos, node_id = wea.farwand.do_raycast(player)

@sbrl
Copy link
Owner

sbrl commented Oct 10, 2024

I still can't find that function definition wow

How does it even still work?

@sbrl
Copy link
Owner

sbrl commented Oct 10, 2024

Got it

On dev:

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

@sbrl
Copy link
Owner

sbrl commented Oct 10, 2024

Pushed a commit to tidy this whole situation w/compat pos.lua calls up

b57b3e8..90f9723

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants