public static GameObject CreatePacu(string id, string name, string desc, string anim_file, bool is_baby) { GameObject prefab = BasePacuConfig.CreatePrefab(id, "PacuTropicalBaseTrait", name, desc, anim_file, is_baby, "trp_", 303.15f, 353.15f); prefab = EntityTemplates.ExtendEntityToWildCreature(prefab, PacuTuning.PEN_SIZE_PER_CREATURE, 25f); DecorProvider decorProvider = prefab.AddOrGet <DecorProvider>(); decorProvider.SetValues(DECOR); return(prefab); }
public static GameObject CreatePacu( string id, string name, string desc, string anim_file, bool is_baby) { var prefab = BasePacuConfig.CreatePrefab(id, "PacuOilBaseTrait", name, desc, anim_file, is_baby, "glp_", 243.15f, 278.15f); var def4 = prefab.AddOrGetDef <CreatureCalorieMonitor.Def>(); def4.diet = new Diet(new Diet.Info(new HashSet <Tag> { SimHashes.Carbon.CreateTag() }, SimHashes.Sulfur.CreateTag(), PacuTuning.STANDARD_CALORIES_PER_CYCLE / 140f , CREATURES.CONVERSION_EFFICIENCY.NORMAL)); var wildCreature = EntityTemplates.ExtendEntityToWildCreature(prefab, PacuTuning.PEN_SIZE_PER_CREATURE, 25f); if (!is_baby) { wildCreature.AddComponent <Storage>().capacityKg = 10f; var elementConsumer = (ElementConsumer)wildCreature.AddOrGet <PassiveElementConsumer>(); elementConsumer.elementToConsume = INPUT_ELEMENT; elementConsumer.consumptionRate = 0.2f; elementConsumer.capacityKG = 10f; elementConsumer.consumptionRadius = 3; elementConsumer.showInStatusPanel = true; elementConsumer.sampleCellOffset = new Vector3(0.0f, 0.0f, 0.0f); elementConsumer.isRequired = false; elementConsumer.storeOnConsume = true; elementConsumer.showDescriptor = false; wildCreature.AddOrGet <UpdateElementConsumerPosition>(); var bubbleSpawner = wildCreature.AddComponent <BubbleSpawner>(); bubbleSpawner.element = OUTPUT_ELEMENT; bubbleSpawner.emitMass = 2f; bubbleSpawner.emitVariance = 0.5f; bubbleSpawner.initialVelocity = new Vector2f(0, 1); var elementConverter = wildCreature.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(INPUT_ELEMENT.CreateTag(), 0.2f) }; elementConverter.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(0.2f, OUTPUT_ELEMENT, 0.0f, true, true) }; } return(wildCreature); }
public static GameObject CreatePacu( string id, string name, string desc, string anim_file, bool is_baby) { GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BasePacuConfig.CreatePrefab(id, BASE_TRAIT_ID, name, desc, anim_file, is_baby, null, MIN_TEMP, MAX_TEMP), PacuTuning.PEN_SIZE_PER_CREATURE); Diet diet = new Diet(new Diet.Info[6] { new Diet.Info(new HashSet <Tag>() { SimHashes.Copper.CreateTag(), }, SimHashes.Gold.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false), new Diet.Info(new HashSet <Tag>() { SimHashes.Aluminum.CreateTag(), }, SimHashes.Iron.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false), new Diet.Info(new HashSet <Tag>() { SimHashes.Cuprite.CreateTag(), }, SimHashes.GoldAmalgam.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false), new Diet.Info(new HashSet <Tag>() { SimHashes.AluminumOre.CreateTag(), }, SimHashes.IronOre.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false), // this one is refined -> ore b/c otherwise it would be unbalanced by giving the player too easy tungsten new Diet.Info(new HashSet <Tag>() { SimHashes.Lead.CreateTag(), }, SimHashes.Wolframite.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false), new Diet.Info(new HashSet <Tag>() { SimHashes.Regolith.CreateTag(), }, SimHashes.Salt.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false) }); wildCreature.GetDef <CreatureCalorieMonitor.Def>().diet = diet; wildCreature.GetDef <SolidConsumerMonitor.Def>().diet = diet; return(wildCreature); }
public static GameObject CreatePacu( string id, string name, string desc, string anim_file, bool is_baby) { GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BasePacuConfig.CreatePrefab(id, BASE_TRAIT_ID, name, desc, anim_file, is_baby, null, 303.15f, 353.15f), PacuTuning.PEN_SIZE_PER_CREATURE, 25f); Diet diet = new Diet(new Diet.Info[1] { new Diet.Info(new HashSet <Tag>() { SimHashes.Phosphorite.CreateTag(), SimHashes.Fertilizer.CreateTag(), }, SimHashes.Algae.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.NORMAL, null, 0.0f, false, false) }); wildCreature.GetDef <CreatureCalorieMonitor.Def>().diet = diet; wildCreature.GetDef <SolidConsumerMonitor.Def>().diet = diet; return(wildCreature); }
public static GameObject CreatePacu( string id, string name, string desc, string anim_file, bool is_baby) { GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BasePacuConfig.CreatePrefab(id, BASE_TRAIT_ID, name, desc, anim_file, is_baby, null, 303.15f, 353.15f), PacuTuning.PEN_SIZE_PER_CREATURE, 25f); if (!is_baby) { wildCreature.AddComponent <Storage>().capacityKg = 10f; ElementConsumer elementConsumer = wildCreature.AddOrGet <PassiveElementConsumer>(); elementConsumer.elementToConsume = INPUT_ELEMENT; elementConsumer.consumptionRate = 0.2f; elementConsumer.capacityKG = 10f; elementConsumer.consumptionRadius = 3; elementConsumer.showInStatusPanel = true; elementConsumer.sampleCellOffset = new Vector3(0.0f, 0.0f, 0.0f); elementConsumer.isRequired = false; elementConsumer.storeOnConsume = true; elementConsumer.showDescriptor = false; wildCreature.AddOrGet <UpdateElementConsumerPosition>(); BubbleSpawner bubbleSpawner = wildCreature.AddComponent <BubbleSpawner>(); bubbleSpawner.element = OUTPUT_ELEMENT; bubbleSpawner.emitMass = 2f; bubbleSpawner.emitVariance = 0.5f; bubbleSpawner.initialVelocity = new Vector2f(0, 1); ElementConverter elementConverter = wildCreature.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(INPUT_ELEMENT.CreateTag(), 0.2f) }; elementConverter.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(0.2f, OUTPUT_ELEMENT, 0.0f, true, true, 0.0f, 0.5f, 1f, byte.MaxValue, 0) }; } return(wildCreature); }
public static GameObject CreatePacu(string id, string name, string desc, string anim_file, bool is_baby) { GameObject prefab = BasePacuConfig.CreatePrefab(id, "PacuCleanerBaseTrait", name, desc, anim_file, is_baby, "glp_", 243.15f, 278.15f); prefab = EntityTemplates.ExtendEntityToWildCreature(prefab, PacuTuning.PEN_SIZE_PER_CREATURE, 25f); if (!is_baby) { Storage storage = prefab.AddComponent <Storage>(); storage.capacityKg = 10f; ElementConsumer elementConsumer = prefab.AddOrGet <PassiveElementConsumer>(); elementConsumer.elementToConsume = SimHashes.DirtyWater; elementConsumer.consumptionRate = 0.2f; elementConsumer.capacityKG = 10f; elementConsumer.consumptionRadius = 3; elementConsumer.showInStatusPanel = true; elementConsumer.sampleCellOffset = new Vector3(0f, 0f, 0f); elementConsumer.isRequired = false; elementConsumer.storeOnConsume = true; elementConsumer.showDescriptor = false; prefab.AddOrGet <UpdateElementConsumerPosition>(); BubbleSpawner bubbleSpawner = prefab.AddComponent <BubbleSpawner>(); bubbleSpawner.element = SimHashes.Water; bubbleSpawner.emitMass = 2f; bubbleSpawner.emitVariance = 0.5f; bubbleSpawner.initialVelocity = new Vector2f(0, 1); ElementConverter elementConverter = prefab.AddOrGet <ElementConverter>(); elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(SimHashes.DirtyWater.CreateTag(), 0.2f) }; elementConverter.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(0.2f, SimHashes.Water, 0f, true, true, 0f, 0.5f, 1f, byte.MaxValue, 0) }; } return(prefab); }
public static GameObject CreatePacu( string id, string name, string desc, string anim_file, bool is_baby) { GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BasePacuConfig.CreatePrefab(id, BASE_TRAIT_ID, name, desc, anim_file, is_baby, null, MIN_TEMP, MAX_TEMP), PacuTuning.PEN_SIZE_PER_CREATURE); wildCreature.AddOrGet <DecorProvider>()?.SetValues(DECOR); if (!is_baby) { wildCreature.AddComponent <Storage>().capacityKg = 10f; /* * ElementConsumer elementConsumer = wildCreature.AddOrGet<PassiveElementConsumer>(); * elementConsumer.elementToConsume = INPUT_ELEMENT; * elementConsumer.consumptionRate = 0.2f; * elementConsumer.capacityKG = 10f; * elementConsumer.consumptionRadius = 3; * elementConsumer.showInStatusPanel = true; * elementConsumer.sampleCellOffset = new Vector3(0.0f, 0.0f, 0.0f); * elementConsumer.isRequired = false; * elementConsumer.storeOnConsume = true; * elementConsumer.showDescriptor = false; * wildCreature.AddOrGet<UpdateElementConsumerPosition>(); * BubbleSpawner bubbleSpawner = wildCreature.AddComponent<BubbleSpawner>(); * bubbleSpawner.element = OUTPUT_ELEMENT; * bubbleSpawner.emitMass = 2f; * bubbleSpawner.emitVariance = 0.5f; * bubbleSpawner.initialVelocity = new Vector2f(0, 1); * ElementConverter elementConverter = wildCreature.AddOrGet<ElementConverter>(); * elementConverter.consumedElements = new ElementConverter.ConsumedElement[1] * { * new ElementConverter.ConsumedElement(INPUT_ELEMENT.CreateTag(), 0.2f) * }; * elementConverter.outputElements = new ElementConverter.OutputElement[1] * { * new ElementConverter.OutputElement(0.2f, OUTPUT_ELEMENT, 0.0f, true, true, 0.0f, 0.5f, 1f, byte.MaxValue, 0) * };*/ ElementConsumer elementConsumer1 = wildCreature.AddComponent <PassiveElementConsumer>(); elementConsumer1.elementToConsume = SimHashes.SaltWater; elementConsumer1.consumptionRate = 0.2f; elementConsumer1.capacityKG = 10f; elementConsumer1.consumptionRadius = 3; elementConsumer1.showInStatusPanel = true; elementConsumer1.sampleCellOffset = new Vector3(0.0f, 0.0f, 0.0f); elementConsumer1.isRequired = false; elementConsumer1.storeOnConsume = true; elementConsumer1.showDescriptor = false; ElementConsumer elementConsumer2 = wildCreature.AddComponent <PassiveElementConsumer>(); elementConsumer2.elementToConsume = SimHashes.Brine; elementConsumer2.consumptionRate = 0.2f; elementConsumer2.capacityKG = 10f; elementConsumer2.consumptionRadius = 3; elementConsumer2.showInStatusPanel = true; elementConsumer2.sampleCellOffset = new Vector3(0.0f, 0.0f, 0.0f); elementConsumer2.isRequired = false; elementConsumer2.storeOnConsume = true; elementConsumer2.showDescriptor = false; wildCreature.AddOrGet <UpdateElementConsumerPosition>(); BubbleSpawner bubbleSpawner = wildCreature.AddComponent <BubbleSpawner>(); bubbleSpawner.element = OUTPUT_ELEMENT; bubbleSpawner.emitMass = 2f; bubbleSpawner.emitVariance = 0.5f; bubbleSpawner.initialVelocity = new Vector2f(0, 1); ElementConverter elementConverter1 = wildCreature.AddComponent <ElementConverter>(); elementConverter1.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(new Tag("SaltWater"), 0.2f) }; elementConverter1.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(0.2f, OUTPUT_ELEMENT, 0.0f, true, true, 0.0f, 0.5f, 1f, byte.MaxValue, 0) }; ElementConverter elementConverter2 = wildCreature.AddComponent <ElementConverter>(); elementConverter2.consumedElements = new ElementConverter.ConsumedElement[1] { new ElementConverter.ConsumedElement(new Tag("Brine"), 0.2f) }; elementConverter2.outputElements = new ElementConverter.OutputElement[1] { new ElementConverter.OutputElement(0.2f, OUTPUT_ELEMENT, 0.0f, true, true, 0.0f, 0.5f, 1f, byte.MaxValue, 0) }; } return(wildCreature); }
public static GameObject CreatePacu(string id, string name, string desc, string anim_file, bool is_baby) { GameObject prefab = BasePacuConfig.CreatePrefab(id, "PacuBaseTrait", name, desc, anim_file, is_baby, null, 273.15f, 333.15f); return(EntityTemplates.ExtendEntityToWildCreature(prefab, PacuTuning.PEN_SIZE_PER_CREATURE, 25f)); }