BuildingRestrictor

BuildingRestrictor 0.1.28

Fixed for Rust update
Null check when gathering block counts in proximity
Command counts buildings in proximity if enabled in config
Use largest block limit if user has multiple permissions
Cache user block limit results and monitor permission/group changes to update limit
Added configurable proximity detection radius to config
Modified proximity detection method. The new method is slightly less accurate but is between 7 and 9 times faster to process (Tested on a building with 300 foundations, previous version was ~65ms to process and now it is ~8ms)
  • Like
Reactions: ShuarS
Added config option to require building privilege to use the 'countblocks' command
Added strings to localization
Added null check in OnEntityBuilt (this should never be null...)
Added config option to assign different limits based on permission
Added chat command /countblocks to see how many blocks a base has
Added permission "buildingrestrictor.count" for the above command

Added caching for nearby structure detection - This is somewhat experimental and will require testing on larger servers to determine a true performance impact. All other solutions for improving this function yield a similar amount of processing time, so by doing this the actual check for nearby buildings only happens once every 60 seconds with nearby buildings temporarily recorded (as opposed to every time a block is built). This gives near 0 performance impact of that function for those 60 seconds that the data is stored after which it will perform the check again
Changed CanBuild hook as per changes from Oxide
Changed CanBuild method until hook overloading is fixed
Added spam detection to prevent players from spamming blocks when their base is at max capacity in attempt to lag the server (Options in the config)