Summary:
I was modding and testing some things out, when I noticed that a raider was firing at a improved turret, despite the weapon specifically having the property "<canTargetBuildings>false</canTargetBuildings>" marked down in the XML
None of the vanilla guns use this tag so I guess it's a low priority, but for long-range weapon balance in some mods this is a pretty unfair bug.
Steps to Reproduce:
Step 1) Make a new weapon or change an existing weapon to have the <canTargetBuildings>true</canTargetBuilds> tag set to false.
Step 2) Spawn a pirate/merc/etc and an improvised turret gun (within firing range of each other) with the weapon you made in step 1
Expected Results:
The weapon cannot target buildings, so the pawn shouldn't be able to shoot the turret (because it's a building).
Actual Results:
The raider will now target and fire at the turret gun. The game won't let your colonist target the building with a gun using the canTargetBuildings tag, even though the AI clearly can.
Bumped for visibility, changed the format up a little to clear up the issue.