高级玩家
- 贡献度
- 0
- 金元
- 3920
- 积分
- 392
- 精华
- 0
- 注册时间
- 2014-9-1
|
碎石机代码
// Token: 0x060066B0 RID: 26288 RVA: 0x001EC2AC File Offset: 0x001EA4AC
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
{
go.AddOrGet<DropAllWorkable>();
go.AddOrGet<BuildingComplete>().isManuallyOperated = false;
ComplexFabricator complexFabricator = go.AddOrGet<ComplexFabricator>();
complexFabricator.sideScreenStyle = ComplexFabricatorSideScreen.StyleSetting.ListQueueHybrid;
complexFabricator.duplicantOperated = false;
go.AddOrGet<FabricatorIngredientStatusManager>();
go.AddOrGet<CopyBuildingSettings>();
ComplexFabricatorWorkable complexFabricatorWorkable = go.AddOrGet<ComplexFabricatorWorkable>();
BuildingTemplates.CreateComplexFabricatorStorage(go, complexFabricator);
complexFabricatorWorkable.overrideAnims = new KAnimFile[]
{
Assets.GetAnim("anim_interacts_rockrefinery_kanim")
};
complexFabricatorWorkable.workingPstComplete = "working_pst_complete";
Tag tag = SimHashes.Sand.CreateTag();
foreach (Element element in ElementLoader.elements.FindAll((Element e) => e.HasTag(GameTags.Crushable)))
{
ComplexRecipe.RecipeElement[] array = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(element.tag, 100f)
};
ComplexRecipe.RecipeElement[] array2 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Niobium).tag, 5f),
new ComplexRecipe.RecipeElement(tag, 95f)
};
string obsolete_id = ComplexRecipeManager.MakeObsoleteRecipeID("RockCrusher", element.tag);
string text = ComplexRecipeManager.MakeRecipeID("RockCrusher", array, array2);
ComplexRecipe complexRecipe = new ComplexRecipe(text, array, array2);
complexRecipe.time = 40f;
complexRecipe.description = string.Format(STRINGS.BUILDINGS.PREFABS.ROCKCRUSHER.RECIPE_DESCRIPTION, element.name, tag.ProperName());
complexRecipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;
complexRecipe.fabricators = new List<Tag>
{
TagManager.Create("RockCrusher")
};
ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id, text);
}
foreach (Element element2 in ElementLoader.elements.FindAll((Element e) => e.IsSolid && e.HasTag(GameTags.Metal)))
{
Element lowTempTransition = element2.highTempTransition.lowTempTransition;
if (lowTempTransition != element2)
{
ComplexRecipe.RecipeElement[] array3 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(element2.tag, 100f)
};
ComplexRecipe.RecipeElement[] array4 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Niobium).tag, 5f),
new ComplexRecipe.RecipeElement(tag, 95f)
};
string obsolete_id2 = ComplexRecipeManager.MakeObsoleteRecipeID("RockCrusher", lowTempTransition.tag);
string text2 = ComplexRecipeManager.MakeRecipeID("RockCrusher", array3, array4);
ComplexRecipe complexRecipe2 = new ComplexRecipe(text2, array3, array4);
complexRecipe2.time = 40f;
complexRecipe2.description = string.Format(STRINGS.BUILDINGS.PREFABS.ROCKCRUSHER.METAL_RECIPE_DESCRIPTION, lowTempTransition.name, element2.name);
complexRecipe2.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;
complexRecipe2.fabricators = new List<Tag>
{
TagManager.Create("RockCrusher")
};
ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id2, text2);
}
}
Element element3 = ElementLoader.FindElementByHash(SimHashes.Lime);
ComplexRecipe.RecipeElement[] array5 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement("EggShell", 5f)
};
ComplexRecipe.RecipeElement[] array6 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Lime).tag, 5f)
};
string obsolete_id3 = ComplexRecipeManager.MakeObsoleteRecipeID("RockCrusher", element3.tag);
string text3 = ComplexRecipeManager.MakeRecipeID("RockCrusher", array5, array6);
ComplexRecipe complexRecipe3 = new ComplexRecipe(text3, array5, array6);
complexRecipe3.time = 40f;
complexRecipe3.description = string.Format(STRINGS.BUILDINGS.PREFABS.ROCKCRUSHER.LIME_RECIPE_DESCRIPTION, SimHashes.Lime.CreateTag().ProperName(), MISC.TAGS.EGGSHELL);
complexRecipe3.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;
complexRecipe3.fabricators = new List<Tag>
{
TagManager.Create("RockCrusher")
};
ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id3, text3);
Element element4 = ElementLoader.FindElementByHash(SimHashes.Lime);
ComplexRecipe.RecipeElement[] array7 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement("BabyCrabShell", 1f)
};
ComplexRecipe.RecipeElement[] array8 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(element4.tag, 5f)
};
ComplexRecipe complexRecipe4 = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("RockCrusher", array7, array8), array7, array8);
complexRecipe4.time = 40f;
complexRecipe4.description = string.Format(STRINGS.BUILDINGS.PREFABS.ROCKCRUSHER.LIME_RECIPE_DESCRIPTION, SimHashes.Lime.CreateTag().ProperName(), ITEMS.INDUSTRIAL_PRODUCTS.CRAB_SHELL.NAME);
complexRecipe4.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;
complexRecipe4.fabricators = new List<Tag>
{
TagManager.Create("RockCrusher")
};
Element element5 = ElementLoader.FindElementByHash(SimHashes.Lime);
ComplexRecipe.RecipeElement[] array9 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement("CrabShell", 1f)
};
ComplexRecipe.RecipeElement[] array10 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(element5.tag, 10f)
};
ComplexRecipe complexRecipe5 = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("RockCrusher", array9, array10), array9, array10);
complexRecipe5.time = 40f;
complexRecipe5.description = string.Format(STRINGS.BUILDINGS.PREFABS.ROCKCRUSHER.LIME_RECIPE_DESCRIPTION, SimHashes.Lime.CreateTag().ProperName(), ITEMS.INDUSTRIAL_PRODUCTS.CRAB_SHELL.NAME);
complexRecipe5.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;
complexRecipe5.fabricators = new List<Tag>
{
TagManager.Create("RockCrusher")
};
ComplexRecipe.RecipeElement[] array11 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Fossil).tag, 100f)
};
ComplexRecipe.RecipeElement[] array12 = new ComplexRecipe.RecipeElement[]
{
new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Lime).tag, 5f),
new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.SedimentaryRock).tag, 95f)
};
ComplexRecipe complexRecipe6 = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("RockCrusher", array11, array12), array11, array12);
complexRecipe6.time = 40f;
complexRecipe6.description = string.Format(STRINGS.BUILDINGS.PREFABS.ROCKCRUSHER.LIME_FROM_LIMESTONE_RECIPE_DESCRIPTION, SimHashes.Fossil.CreateTag().ProperName(), SimHashes.SedimentaryRock.CreateTag().ProperName(), SimHashes.Lime.CreateTag().ProperName());
complexRecipe6.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;
complexRecipe6.fabricators = new List<Tag>
{
TagManager.Create("RockCrusher")
};
Prioritizable.AddRef(go);
}
|
|