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

feat: add WithWorldGuard and HandlerContext system parameters #327

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

makspll
Copy link
Owner

@makspll makspll commented Feb 26, 2025

This should allow things like:

fn my_system(mut with_guard: WIthWorldGuard<HandlerContext<LuaScriptingPlugin>>) {
	let (world_guard, handler_ctxt) = with_guard.get_mut();
	handler_ctxt.call("my_script" , ... // etc )
}

In theory it also lets you call scripts in ANY system, however the world guard will know about the other resources/ components being accessed, meaning that it will not be possible to access &mut from scripts if you access ANYTHING else (other than the handler context).

This is a good first step towards #244 , as it demonstrates how systems and WorldGuard should interact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant