예제 #1
0
        /// <summary>
        /// Initialize MinorObjects class
        /// </summary>
        public Items()
        {
            instance         = this;
            cashRegisterHook = GameObject.Find("STORE/StoreCashRegister/Register").AddComponent <CashRegisterHook>();

            // Car parts order bill hook.
            GameObject           postOrder = GameObject.Find("STORE").transform.Find("LOD/ActivateStore/PostOffice/PostOrderBuy").gameObject;
            EnvelopeOrderBuyHook h         = postOrder.AddComponent <EnvelopeOrderBuyHook>();

            h.Initialize(cashRegisterHook);

            // Fish trap spawner.
            FsmHook.FsmInject(GameObject.Find("fish trap(itemx)").transform.Find("Spawn").gameObject, "Create product", cashRegisterHook.Fishes);

            InitializeList();

            // Uncle's beer case bottle despawner
            Transform uncleBeerCaseTransform = GameObject.Find("YARD").transform.Find("UNCLE/Home/UncleDrinking/Uncle/beer case(itemx)");

            if (uncleBeerCaseTransform == null)
            {
                ModConsole.Print("[MOP] Couldn't find uncle's beer case, so it will be skipped...");
                return;
            }

            uncleBeerCaseTransform.gameObject.AddComponent <UncleBeerCaseHook>();
        }
예제 #2
0
 public void Initialize(CashRegisterHook cashRegisterHook)
 {
     this.cashRegisterHook = cashRegisterHook;
 }