Initial Commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using Kitchen;
|
||||
using KitchenMods;
|
||||
using Pets.Components;
|
||||
using Pets.Components.Menu;
|
||||
|
||||
namespace Pets.Systems.EditorMenu
|
||||
{
|
||||
public class ActivatePetEditorDuringNight : ApplianceInteractionSystem, IModSystem
|
||||
{
|
||||
protected override bool IsPossible(ref InteractionData data)
|
||||
{
|
||||
return Require(data.Target, out CPet cPet) && cPet.Owner == data.Interactor;
|
||||
}
|
||||
|
||||
protected override void Perform(ref InteractionData data)
|
||||
{
|
||||
EntityManager.AddComponentData(data.Target, new CTriggerPetEditor
|
||||
{
|
||||
IsTriggered = true,
|
||||
TriggerEntity = data.Interactor
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user