private static void Postfix(GasMiniPumpConfig __instance, ref BuildingDef __result) { if (__result != null) { __result.EnergyConsumptionWhenActive = 20f; __result.MaterialCategory = new string[] { "RefinedMetal", SimHashes.Polypropylene.ToString() }; __result.Mass = new float[] { BUILDINGS.CONSTRUCTION_MASS_KG.TIER0[0], BUILDINGS.CONSTRUCTION_MASS_KG.TIER0[0] }; } }
public static void Postfix(GasMiniPumpConfig __instance, ref GameObject go) { float ratio = DynamicBuildingsState.StateManager.State.liquidandgas; byte radius = DynamicBuildingsState.StateManager.State.SuckInRadius; Storage storage = go.AddOrGet <Storage>(); storage.capacityKg = 5 * ratio; ElementConsumer elementConsumer = go.AddOrGet <ElementConsumer>(); elementConsumer.consumptionRate = ratio; elementConsumer.consumptionRadius = radius; }