CompatSkills

CompatSkills

8M Downloads

Interacted requirement

pupnewfster opened this issue ยท 2 comments

commented

I have ran into some situations where it would actually be convenient to give items requirements based on what block the item is being "used" on. For example to have a way that diamond swords can be unusable except for right clicking the blood magic alchemy array to make the bound blade.

commented

pupnewfster/GGSkyblock#53 That issue is similar to why I originally did this, but thinking about it this maybe could be done by adding a "looking at" requirement (maybe only refresh every so often), and then using logic requirements to "unlock" it for when they are looking at the correct block.

Edit: actually just using the uncacheable will have it only be called when someone tries to use the thing that is locked so it doesn't matter all that much about refreshing every few seconds. In fact that could potentially have worse performance than just marking it as uncacheable.

commented

One way of doing this though it would really not be ideal is to calculate the block the player is looking at when the requirement is checked. There is a small chance that requirement of that sort would be best to have a new requirement subtype/interface introduced into Reskillable to allow requirements to always be rechecked without any caching.