static void Postfix(SlotGroup sg, ListerHaulables __instance) { Map map = MapFieldInfo.GetValue(__instance) as Map; if (map == null) { throw new Exception($"Could not get map to change {sg.parent.SlotYielderLabel()} on..."); } map.listerStackables().Update(sg); }
static void Postfix(Thing t, ListerHaulables __instance) { Map map = MapFieldInfo.GetValue(__instance) as Map; if (map == null) { throw new Exception($"Could not get map to despawn {t.Label} from..."); } map.listerStackables().TryRemove(t); }