Prevent deployed turrets from hurting non-hostile players?Solved

OK, so I love the mod, thanks Nivex!

But I have one issue. Is there a way to prevent player deployed AutoTurrets from hurting non-hostile players? In effect a forced peacekeeper mode?

it's not my mod. I just try and maintain it

and no, not possible afaik. you'd need a plugin for that. it is a nice concept too

Feel free to nab the idea :).

I cannot code to save my butt.

        private object CanBeTargeted(BasePlayer player, AutoTurret turret)
        {
            return !player.IsNpc && !player.IsHostile() ? false : (object)null;
        }

literally just slap that in any plugin and bam you're done

Locked automatically