using GadgetCore.API;
using UnityEngine;

namespace CombatChipChest
{
  public class MenuOpenEventScript : MonoBehaviour
  {
    void OnEnable()
    {
      if(Menuu.curProfession == 1)
      {
        Core.menu.CloseMenu();
        GameObject gameObject = (GameObject)Object.Instantiate(Resources.Load("txtError"), MenuScript.player.transform.position, Quaternion.identity);
        gameObject.SendMessage("InitError", "You are an Ironman!");
        return;
      }
      Core.combatChipStore.UpdateUI(gameObject);
    }
  }
}
