diff --git a/CustomScriptableObject/InstantNoodlePackItem.cs b/CustomScriptableObject/InstantNoodlePackItem.cs new file mode 100644 index 0000000..0d92086 --- /dev/null +++ b/CustomScriptableObject/InstantNoodlePackItem.cs @@ -0,0 +1,43 @@ +using LethalLib.Modules; +using UnityEngine; + +namespace DingusThings.CustomScriptableObject +{ + internal class InstantNoodlePackItem + { + public static void Register() + { + AssetBundle? bundle = DingusThings.Bundle; + if (bundle == null) + { + DingusThings.Logger.LogError("Instant noodle packs failed to load."); + return; + } + + int rarity = 70; + Item maggiItem = bundle.LoadAsset("Assets/DingusThings/Items/MaggiInstantNoodlePack.asset"); + PhysicsProp maggiPhysicsProp = maggiItem.spawnPrefab.AddComponent(); + maggiPhysicsProp.grabbable = true; + maggiPhysicsProp.grabbableToEnemies = true; + maggiPhysicsProp.isInFactory = true; + maggiPhysicsProp.itemProperties = maggiItem; + + // register scrap + NetworkPrefabs.RegisterNetworkPrefab(maggiItem.spawnPrefab); + Utilities.FixMixerGroups(maggiItem.spawnPrefab); + Items.RegisterScrap(maggiItem, rarity, Levels.LevelTypes.All); + + Item indomieItem = bundle.LoadAsset("Assets/DingusThings/Items/IndomieInstantNoodlePack.asset"); + PhysicsProp indomiePhysicsProp = indomieItem.spawnPrefab.AddComponent(); + indomiePhysicsProp.grabbable = true; + indomiePhysicsProp.grabbableToEnemies = true; + indomiePhysicsProp.isInFactory = true; + indomiePhysicsProp.itemProperties = maggiItem; + + // register scrap + NetworkPrefabs.RegisterNetworkPrefab(indomieItem.spawnPrefab); + Utilities.FixMixerGroups(indomieItem.spawnPrefab); + Items.RegisterScrap(indomieItem, rarity, Levels.LevelTypes.All); + } + } +} diff --git a/CustomScriptableObject/MaggiInstantNoodlePackItem.cs b/CustomScriptableObject/MaggiInstantNoodlePackItem.cs deleted file mode 100644 index 37bdfd5..0000000 --- a/CustomScriptableObject/MaggiInstantNoodlePackItem.cs +++ /dev/null @@ -1,32 +0,0 @@ -using LethalLib.Modules; -using UnityEngine; - -namespace DingusThings.CustomScriptableObject -{ - internal class MaggiInstantNoodlePackItem - { - public static void Register() - { - string itemName = "Maggi Instant Noodle pack"; - AssetBundle? bundle = DingusThings.Bundle; - if (bundle == null) - { - DingusThings.Logger.LogError(itemName + " failed to load."); - return; - } - - int rarity = 70; - Item item = bundle.LoadAsset("Assets/DingusThings/Items/MaggiInstantNoodlePack.asset"); - PhysicsProp physicsProp = item.spawnPrefab.AddComponent(); - physicsProp.grabbable = true; - physicsProp.grabbableToEnemies = true; - physicsProp.isInFactory = true; - physicsProp.itemProperties = item; - - // register scrap - NetworkPrefabs.RegisterNetworkPrefab(item.spawnPrefab); - Utilities.FixMixerGroups(item.spawnPrefab); - Items.RegisterScrap(item, rarity, Levels.LevelTypes.All); - } - } -} diff --git a/DingusThings.cs b/DingusThings.cs index 916c018..1d2157e 100644 --- a/DingusThings.cs +++ b/DingusThings.cs @@ -61,7 +61,7 @@ private void Awake() MyHeartItem.Register(); SteamGiftCardItem.Register(); LifebuoyBarSoapItem.Register(); - MaggiInstantNoodlePackItem.Register(); + InstantNoodlePackItem.Register(); Logger.LogInfo($"{PluginString} has loaded!"); } diff --git a/DingusThings.csproj b/DingusThings.csproj index a06f9f8..7a3ff2c 100644 --- a/DingusThings.csproj +++ b/DingusThings.csproj @@ -5,7 +5,7 @@ milodinosaur.DingusThings DingusThings - 1.3.0 + 1.3.1 diff --git a/README.md b/README.md index b7aa7c1..6bdddc3 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,22 @@ Yet another Lethal Company custom scrap pack Model made by me + + + Maggi Instant Noodle pack + + + Model made by me + + + + + Indomie Instant Noodle pack + + + Model made by me + + Assets: https://github.com/ryantanrk/DingusThings-Assets