This bug causes SAMs to not target drones, but after I uninstalled the plugin, the SAMs’ drone targeting function was restored
Bugs after this month's force wipe
replace the hook code with this:
private object? OnSamSiteTarget(SamSite samSite, BaseCombatEntity target) {
if (samSite.staticRespawn) return null;
var cupboard = samSite.GetBuildingPrivilege(samSite.WorldSpaceBounds());
if (cupboard is null) return null;
//drones can now be targeted by SAM sites 10/2025
if (target.prefabID == 1191314495) {
if (target.OwnerID.IsSteamId() && IsAuthed(cupboard, target.OwnerID)) return false;
return null;
}
var mountPoints = (target as BaseVehicle)?.mountPoints;
if (!IsOccupied(target, mountPoints)) return false;
if (mountPoints != null) {
foreach (var mountPoint in mountPoints) {
var player = mountPoint.mountable.GetMounted();
if (player is not null && IsAuthed(cupboard, player.userID)) return false;
}
}
foreach (var child in target.children) {
if (child is BasePlayer player) {
if (IsAuthed(cupboard, player.userID)) return false;
}
}
return null;
}
Thank you for your help!
This is very helpful!
I learned static sams(launch site) should target player drones, so the order is wrong
if (samSite.staticRespawn) return null;should be above
var mountPoints = (target as BaseVehicle)?.mountPoints;It's going to break again next wipe and need fixed again anyway.
I will look at contributing a proper fix soon.
Merged post
I've created a pull request for the plugin maintainer to review. Hopefully they will merge and release it.
https://github.com/haggbart/rustplugin-samsiteauth/pull/5
If you want to apply the update now, you can get it here:
https://raw.githubusercontent.com/WheteThunger/rustplugin-samsiteauth/refs/heads/master/SAMSiteAuth.cs