I'm trying to change specific items within loot containers to double them with the following code:
object OnLootSpawn(LootContainer container) {
foreach (Item item in container.inventory.itemList) {
string shortname = item.info.shortname;
if (shortname == "scrap") item.amount *= 2;
// etc
}
return null;
}however it doesnt appear to do anything as nothing is doubled even after deleting every single LootContainer and checking newly spawned ones
so im not quite sure what to do
I have tried to use container.PopulateLoot(); at the beginning but it seems to add more scrap and an extra item to what it should be giving