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

Remove area protection checks #91

Merged
merged 1 commit into from
Jul 14, 2024
Merged

Remove area protection checks #91

merged 1 commit into from
Jul 14, 2024

Conversation

Niklp09
Copy link
Member

@Niklp09 Niklp09 commented Jul 13, 2024

Closes Archtec-io/bugtracker#194
Concept approved by SwissalpS.

@Niklp09 Niklp09 requested a review from SwissalpS July 13, 2024 12:53
Copy link

@SwissalpS SwissalpS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (without testing) I like this.

It does make me wonder if later on we might PR a protection check hook for server-mods to more easily override checks to their liking. e.g. staff privs, factions and shared ownerships.

I'd like to keep checks in the mod minimal and easy to read but some servers might want more complicated checks. Giving a hook would allow them to have messy code on their end and the [travelnet] could stay clean.

@SwissalpS
Copy link

check hook could have a signature like function travelnet.protection(pos, player, context) where context is a string or 'enum' for one of: remove, edit, first setup.
optionally node could also be passed so that doesn't need to be looked up again.

I don't think a .register_check(f) type of hook is needed here.

@SwissalpS
Copy link

partially addresses #31

@BuckarooBanzay BuckarooBanzay added the cleanup Code or docs cleanup label Jul 14, 2024
@BuckarooBanzay
Copy link
Member

lgtm 👍

@BuckarooBanzay BuckarooBanzay merged commit 03c2fa6 into master Jul 14, 2024
14 checks passed
@BuckarooBanzay BuckarooBanzay deleted the clean_owner_checks branch July 14, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code or docs cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report by mrBear: Niklp i can not remove my travelnet when ...
3 participants