public static void RegisterPlantSlotFor(Predicate <GardenCatcher> condition, GardenCatcher.PlantSlot slot) { RegisterGardenCatcherPatcher(x => { if (condition(x)) { x.plantable = x.plantable.Where(y => y.id != slot.id).ToArray().AddToArray(slot); } }); }
//+ REGISTRATION public static void RegisterPlantable(GardenCatcher.PlantSlot plantSlot) { /*if (PLANTABLES.ContainsKey(plantSlot.id)) PLANTABLES[plantSlot.id] = plantSlot; * else PLANTABLES.Add(plantSlot.id, plantSlot);*/ }
public static void RegisterPlantSlot(GardenCatcher.PlantSlot plantSlot) { RegisterGardenCatcherPatcher(x => x.plantable = x.plantable.Where(y => y.id != plantSlot.id).ToArray().AddToArray(plantSlot)); }