Initial Commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using Easter2025.Components;
|
||||
using Easter2025.Systems;
|
||||
using HarmonyLib;
|
||||
using Kitchen;
|
||||
using Unity.Entities;
|
||||
|
||||
namespace Easter2025.Patches
|
||||
{
|
||||
[HarmonyPatch(typeof(AcceptIntoBin), "AcceptTransfer")]
|
||||
public class AcceptIntoBinPatch
|
||||
{
|
||||
static void Prefix(Entity proposal_entity)
|
||||
{
|
||||
if (UtilitySystem._Require(proposal_entity, out CItemTransferProposal cItemTransferProposal))
|
||||
{
|
||||
if (UtilitySystem._Has<CCanTriggerOrbs>(cItemTransferProposal.Item))
|
||||
{
|
||||
if (!UtilitySystem._Has<CHasOrbs>(cItemTransferProposal.Destination))
|
||||
{
|
||||
UtilitySystem._Set(cItemTransferProposal.Destination, new CHasOrbs());
|
||||
}
|
||||
}
|
||||
if (UtilitySystem._Has<CCanTriggerOrangeOrbs>(cItemTransferProposal.Item))
|
||||
{
|
||||
if (UtilitySystem._Has<CHasOrbs>(cItemTransferProposal.Destination) && !UtilitySystem._Has<CHasOrangeOrbs>(cItemTransferProposal.Destination))
|
||||
{
|
||||
UtilitySystem._Set(cItemTransferProposal.Destination, new CHasOrangeOrbs());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user