public override void Patch()
    {
        PrefabDatabasePatcher.customPrefabs.Add(this);
        EntTechDataPatcher.customTechData.Add(System.IO.Path.GetFileName(Path), (TechType)6969);
        LanguagePatcher.customLanguageLines.Add("GhostRayRedEgg", "Crimson Ray Egg");
        LanguagePatcher.customLanguageLines.Add("Tooltip_GhostRayRedEgg", "The egg of a lava zone Crimson Ray");
        LanguagePatcher.customLanguageLines.Add("GhostRayRedEggUndiscovered", "Inactive Lava Zone egg");
        LanguagePatcher.customLanguageLines.Add("Tooltip_GhostRayRedEggUndiscovered", "Undiscovered Egg from the Inactive Lava Zone");
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, HarvestType> >("harvestTypeList").Add((TechType)6969, HarvestType.Pick);
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, string> >("pickupSoundList").Add((TechType)6969, "event:/loot/pickup_egg");
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, string> >("pickupSoundList").Add((TechType)6968, "event:/loot/pickup_egg");
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, Vector2int> >("itemSizes").Add((TechType)6968, new Vector2int(2, 2));
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, Vector2int> >("itemSizes").Add((TechType)6969, new Vector2int(2, 2));

        LootPatcher.customLootTables.Add(Key, new LootDistributionData.SrcData()
        {
            prefabPath   = Path,
            distribution = new List <LootDistributionData.BiomeData>()
            {
                new LootDistributionData.BiomeData()
                {
                    biome       = BiomeType.InactiveLavaZone_Chamber_Floor,
                    count       = 1,
                    probability = .1f
                }
            }
        });
        WorldEntityInfoPatcher.customWorldEntityInfo.Add(new UWE.WorldEntityInfo()
        {
            cellLevel  = LargeWorldEntity.CellLevel.Near,
            classId    = Key,
            techType   = (TechType)6969,
            slotType   = EntitySlot.Type.Small,
            localScale = Vector3.one,
            prefabZUp  = true
        });
    }
Beispiel #2
0
    // Token: 0x06000005 RID: 5 RVA: 0x0000235C File Offset: 0x0000055C
    public void Patch()
    {
        TechTypeHandler.customTechData.Add(Path.GetFileName(this.Path), (TechType)9999);
        LanguageHandler.SetLanguageLine("GhostRayBlueEgg", "Ghost Ray Egg");
        LanguageHandler.SetLanguageLine("Tooltip_GhostRayBlueEgg", "The egg of a lost river Ghost Ray");
        LanguageHandler.SetLanguageLine("GhostRayBlueEggUndiscovered", "Lost River Egg");
        LanguageHandler.SetLanguageLine("Tooltip_GhostRayBlueEggUndiscovered", "Undiscovered Egg from the Lost River");
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, HarvestType> >("harvestTypeList").Add((TechType)9999, HarvestType.Pick);
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, string> >("pickupSoundList").Add((TechType)9999, "event:/loot/pickup_egg");
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, string> >("pickupSoundList").Add((TechType)9998, "event:/loot/pickup_egg");
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, Vector2int> >("itemSizes").Add((TechType)9998, new Vector2int(2, 2));
        CraftDataHelper.GetCraftDataDictionary <Dictionary <TechType, Vector2int> >("itemSizes").Add((TechType)9999, new Vector2int(2, 2));
        LootPatcher.customLootTables.Add(this.Key, new LootDistributionData.SrcData
        {
            prefabPath   = this.Path,
            distribution = new List <LootDistributionData.BiomeData>
            {
                new LootDistributionData.BiomeData
                {
                    biome       = BiomeType.TreeCove_LakeFloor,
                    count       = 1,
                    probability = 0.2f
                }
            }
        });
        WorldEntityInfoPatcher.customWorldEntityInfo.Add(new WorldEntityInfo
        {
            cellLevel = LargeWorldEntity.CellLevel.Near,
            classId   = this.Key,

            slotType   = EntitySlot.Type.Small,
            localScale = Vector3.one,
            prefabZUp  = true
        });
        this.LoadResource();
    }