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

Add self_placed block filter #84

Closed
wants to merge 1 commit into from
Closed

Conversation

Jeck
Copy link

@Jeck Jeck commented Feb 16, 2023

This PR adds a filter to check if a given block was placed by the player themself, not just by any player. It functions using the same basic functionality as "player_placed".

What good is a self_placed filter?

  • A skill that levels up when breaking other player's stuff, but not your own.
  • Weapons that deal bonus damage when standing on home turf.
  • Tools that mine your own blocks instantly.
  • Explosives that don't damage your own blocks
  • Probably other uses too.

How does it work?

The implementation relies on Auxilor/eco#243 this pull request.
TL;DR -- eco currently stores an integer "1" for any block placed by a player. The actual value stored is never checked, just its existence. I've taken advantage of that to store a value identifying the placing player instead.

@WillFP
Copy link
Member

WillFP commented Mar 25, 2023

Closing this because it's incompatible with v4

@WillFP WillFP closed this Mar 25, 2023
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.

3 participants