Prevent player's drone damage

Hello, 

I am trying to prevent player drones from being damaged.

I have the following flags set:

      "defaultAllowDamage": false,
      "flags": "AuthorizedDamage, HumanNPCDamage, LockedBoxesImmortal, LockedDoorsImmortal, AdminsHurtSleepers, ProtectedSleepers, AnimalsIgnoreSleepers, TurretsIgnorePlayers, CupboardOwnership, SelfDamage",

and tried the following rule:

"players cannot hurt drones",

    {
      "name": "drones",
      "members": "drone.deployed",
      "exclusions": ""
    },

// I've also tried this rule and it didn't work either
    {
      "name": "drones",
      "members": "Drone, drone.deployed",
      "exclusions": ""
    },

 

I get the following in the trace whether the above rule is present or not:

======================
==  STARTING TRACE  ==
==  18:13:01.05098  ==
======================
 From: BasePlayer, player
 To: Drone, drone.deployed
  Checking exclusions between [empty] and [empty]
   Shared locations: none
   No shared locations, or no matching exclusion mapping - no exclusions
 No exclusion found - looking up RuleSet...
 Using RuleSet "default"
 Initiator is player with authorization over non-player target; allow and return

Any assistance with this is greatly appreciated. Thanks

that would be AuthorizedDamage, which is going to override that rule.
you would need to add AuthorizedDamageRequiresOwnership

if drones are not assigned an owner then this likely won't work. that is beyond the scope of what this plugin offers so you would need another plugin to assign ownership if that is the case. this plugin deals with damage only.

Thanks for the quick reply

I have tried adding the "AuthorizedDamageRequiresOwnership" flag, however it still allows damage.

It appears to me that the drones are indeed not assigned an owner as you suggested.

Would you be willing to add a flag such as "PreventDroneDamage"? I am wondering if that is something you would add rather than having to modify the .cs file myself to add it or finding/creating a plugin to handle this one entity. 

The rest of the plugin and rulesets I have work as intended and thank you for creating this very helpful plugin