Initial Commit

This commit is contained in:
Lachlan Leone
2024-01-20 20:00:35 +11:00
commit d78ae93c97
70 changed files with 3212 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
using System.Collections.Generic;
using KitchenData;
using KitchenLib.Customs;
using KitchenLib.Utils;
using Pets.Components;
using UnityEngine;
namespace Pets.Customs
{
public class PetBed : CustomAppliance
{
public override string UniqueNameID => "PetBed";
public override GameObject Prefab => Mod.Bundle.LoadAsset<GameObject>("PetBed").AssignMaterialsByNames();
public override string Name => "Pet Bed";
public override List<IApplianceProperty> Properties => new List<IApplianceProperty>
{
new CPetBed()
};
}
}
+34
View File
@@ -0,0 +1,34 @@
using System.Collections.Generic;
using Kitchen;
using KitchenData;
using KitchenLib.Customs;
using KitchenLib.References;
using KitchenLib.Utils;
using UnityEngine;
namespace Pets.Customs
{
public class PetLetter : CustomAppliance
{
public override string UniqueNameID => "PetLetter";
public override GameObject Prefab => Mod.Bundle.LoadAsset<GameObject>("PetLetter").AssignMaterialsByNames();
public override List<IApplianceProperty> Properties => new List<IApplianceProperty>
{
new CFixedRotation(),
new CImmovable()
};
public override void OnRegister(Appliance gameDataObject)
{
base.OnRegister(gameDataObject);
LetterView view = gameDataObject.Prefab.AddComponent<LetterView>();
Appliance Letter = GDOUtils.GetExistingGDO(ApplianceReferences.BlueprintLetter) as Appliance;
view.Animator = gameDataObject.Prefab.GetComponent<Animator>();
view.Letter = GameObjectUtils.GetChild(gameDataObject.Prefab, "Letter");
view.MinDelay = 0;
view.MaxDelay = 2;
}
}
}