Bugs after this month's force wipe

This bug causes SAMs to not target drones, but after I uninstalled the plugin, the SAMs’ drone targeting function was restored

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.