Track which player "owns" a turtle #518
Conversation
I assume turtles which are placed by turtles inherit the placing turtle's ownership? What happens if I place a turtle using another mod? I would assume the mod's fake player get's ownership. (I may be wrong, but can a mod place blocks without a fake player? What about that?) |
Yep. You can have turtles all the way down!
It depends. If other mods are doing things "correctly" and tracking a tile's owner, then it'll inherit the owner from there too. Otherwise it'll either use that mod's fake user* or CC's fallback fake user. *By "fake user" I mean a fabricated |
Is there a way to check who owns a given turtle via Lua? |
No, though that could be exposed in a later PR or through an upgrade. I'm only interested in fixing permissions mods here - anything else will probably add too much controversy :). |
Alright. I assumed that is what you were going to say, just curious. |
When a player places a turtle, they are marked as its owner. Any actions they perform (such as breaking blocks, moving, etc...) are performed using this player's game profile. This allows turtles to work correctly with various permissions mods. Previously you would have to whitelist all turtles in order for them to function within a claim.
4c0fa1f
to
f28a2c9
This makes it obvious that this is a fake player, allowing easier detection by other mods.
Can one of the admins verify this patch? |
…owner-tracking Track which player "owns" a turtle
When a player places a turtle, they are marked as its owner. Any actions they perform (such as breaking blocks, moving, etc...) are performed using this player's game profile.
This allows turtles to work correctly with various permissions/claim mods. Previously you would have to whitelist all turtles in order for them to function within a claimed area.
See SquidDev-CC/CC-Tweaked#8 for the original issue & explanation. It's worth noting that the SwitchCraft server has been running a build of CC with this patch applied and it has solved all permissions issues. I'll updated the PR should any issues arise.