Пример #1
0
 public static void CopyRoom()
 {
     if (_instance != null)
     {
         try
         {
             InspectorMenu imenu = _HUD.FindMenu <InspectorMenu>(false);
             if (InspectorMenu.ShouldShowInspector(_room))
             {
                 //copy room
                 Program.InvokeMethod(typeof(InspectorDataRoom), _instance, "CopyRoom");
             }
         }
         catch (Exception e)
         {
             Program.Error(e.ToString());
         }
     }
 }
Пример #2
0
 public static void EditRoom()
 {
     if (_instance != null)
     {
         try
         {
             InspectorMenu imenu = _HUD.FindMenu <InspectorMenu>(false);
             //Don't do stuff if inspect is hidden
             if (imenu != null & InspectorMenu.ShouldShowInspector(_room))
             {
                 //edit room
                 Program.InvokeMethod(typeof(InspectorDataRoom), _instance, "EditRoom");
             }
         }
         catch (Exception e)
         {
             Program.Error(e.ToString());
         }
     }
 }
Пример #3
0
        public static void SellRoom()
        {
            SelectMenuRoomItem smenu = _HUD.FindMenu <SelectMenuRoomItem>(false);

            if (smenu != null)
            {
                //sell item
                Program.InvokeMethod(typeof(SelectMenuRoomItem), smenu, "SellButton");
                return;
            }

            if (_instance != null)
            {
                try
                {
                    NotificationMessageUI menu = _HUD.FindMenu <NotificationMessageUI>(false);
                    Program.Log("Menu = " + menu);
                    if (menu != null)
                    {
                        //confirm sell
                        // 0 = Button Ok
                        Program.InvokeMethod(typeof(NotificationMessageUI), menu, "CloseMessage", new object[] { 0 });
                    }
                    else
                    {
                        InspectorMenu imenu = _HUD.FindMenu <InspectorMenu>(false);
                        //Don't do stuff if inspect is hidden
                        if (imenu != null & InspectorMenu.ShouldShowInspector(_room))
                        {
                            //show sell dialog
                            Program.InvokeMethod(typeof(InspectorDataRoom), _instance, "SellRoom");
                        }
                    }
                }
                catch (Exception e)
                {
                    Program.Error(e.ToString());
                }
            }
        }