1. Hello,

    it seems with the update today i will get a problem with a plugin which i wrote.
    Code:
    Privilege radius based on blocks, not cupboardsBuilding privilege is now based on the building blocks instead of exact radius around the cupboard. That means the placement of the cupboard inside the building has no impact on that structures exact build privilege area. Rather, the building itself defines the radius of build privilege (which is currently 16 meters).See the pictures below for some examples of what that looks like in game.
    Source: Updates

    The plugin is currently checking if there is a cupboard in a certain radius of structure, if yes it gets the authorized players of the found cupboard. Now it's based on the structures itself... How am i now able to get the authorized players of a structure like a wall?
     
  2. Looking at the DLL disassemble, you might be able to use BuildingPrivlidge.Get
    public static BuildingPrivlidge Get(Vector3 position, Quaternion rotation, Bounds bounds)

    And from the BuildingPrivlidge class, you get the "authorizedPlayers" .
     
  3. But for that i need the exact position of the Cupboard right?
     
  4. Yes, sorry, I had the wrong idea that Get could be used to get the building privilege associated with entitity at position, but the code seems to actually just check for the presence of the cup itself at position.
     
  5. Ist there a way to determine from an entity which entitys are snapped or placed on it? Sorry if my questions are noobish but i'm relative new to plugin development in Rust
     
  6. Another attempt to help. (I am also new to mods), probably you can use GetEntityLinks(bool linkToNeighbours = true) from your target entity, but you would need to use it recursively until you find a BuildingPrivlidge, or you have ran out of links to check.

    Base validation seems to efficient for actual gameplay, because runtime triggers are actually set on base blocks, and those triggers are used to identify authorized/block permission during walk time.
    [DOUBLEPOST=1512685520][/DOUBLEPOST]Another thing to try:

    var bp_trigger = (target_entity as BaseEntity).FindTrigger(BuildPrivilegeTrigger);
    var bp_block = bp_trigger.privlidgeEntity;
     
  7. removed from game...
    removed from game...
     
  8. Than replaced it?
    BuildPrivilegeTrigger and GetBuildingPrivilege
     
  9. GetBuildingPrivilege still exsits, but needs OBB input now.
    The triggers do not exist anymore. The enter and leave checks are fully done clientside now.
     
  10. i have this problem
    No building for tool cupboard!

    No building for tool cupboard CalculateCostFraction
     
  11. What with BuildingPrivilege
    CheckEntity
    Get
    GetValue
    don't work
     
  12. Is it possible to obtain by means of code the amount of resources that a certain cabinet has? For example, you look at a closet and put a command in the chat and it shows you what you have inside and the time remaining.
     
  13. How to create this OBB?
     
  14. Solved