It does not seem to be working for searchlights. I did some hacking and made a variant that seems to be work by adding:
private void OnItemUse(Item item, int amount) { string shortName = item.parent?.parent?.info?.shortname ?? item.GetRootContainer()?.entityOwner?.ShortPrefabName; if (string.IsNullOrEmpty(shortName) || !activeShortNames.Contains(shortName) || item == null) { return; } else { item.amount += amount; } }
private void OnItemUse(Item item, int amount) { string shortName = item.parent?.parent?.info?.shortname ?? item.GetRootContainer()?.entityOwner?.ShortPrefabName; if (string.IsNullOrEmpty(shortName) || !activeShortNames.Contains(shortName) || item == null) { return; } else { item.amount += amount; } }