Exemplo n.º 1
0
 public override void ActivateWorldFuncButton()
 {
     UIHandler.SetMenu(UIHandler.worldEditConsole, true);
     ChatConsole.SendMessage("--------------------", Color.White);
     ChatConsole.SendMessage("Log on to nexus.games for assistance on building worlds and levels. You'll need to register an account to share your work online.", Color.Green);
     ChatConsole.SendMessage("--------------------", Color.White);
 }
Exemplo n.º 2
0
 public override void OnFirstOpen()
 {
     ChatConsole.Clear();
     ChatConsole.SendMessage("Welcome to the World Edit Console.", Color.White);
     ChatConsole.SendMessage("----------------------------------", Color.White);
     ChatConsole.SendMessage("This console allows you to alter the settings for your world campaign.", Color.White);
     ChatConsole.SendMessage("To open or close this console, press the tilde (~) key.", Color.OrangeRed);
     ChatConsole.SendMessage("This console can also be accessed from the tab menu.", Color.OrangeRed);
 }
Exemplo n.º 3
0
        public override void RunTick(WEScene scene)
        {
            if (UIComponent.ComponentWithFocus != null)
            {
                return;
            }

            // Left Mouse Button
            if (Cursor.LeftMouseState == Cursor.MouseDownState.Clicked)
            {
                WorldZoneFormat zone  = scene.currentZone;
                byte            gridX = (byte)Cursor.MiniGridX;
                byte            gridY = (byte)Cursor.MiniGridY;

                byte[] wtData = scene.worldContent.GetWorldTileData(zone, gridX, gridY);

                // If the wand clicked on a warp, then we can attempt to assign a warp link ID.
                if (NodeData.IsObjectAWarp(wtData[5]))
                {
                    UIHandler.SetMenu(UIHandler.worldEditConsole, true);
                    UIHandler.worldEditConsole.Open();
                    UIHandler.worldEditConsole.SendCommand("setWarp " + gridX.ToString() + " " + gridY.ToString() + " ", false);
                    ChatConsole.SendMessage("--------------------", Color.White);
                    ChatConsole.SendMessage("Assign a Link ID to this Warp Node. Must be a number between 1 and 20. Warps that share the same ID will link to each other. ", Color.Red);
                    ChatConsole.SendMessage("--------------------", Color.White);
                    ChatConsole.SendMessage("Example: setWarp " + gridX.ToString() + " " + gridY.ToString() + " 1", Color.Green);
                    ChatConsole.SendMessage("--------------------", Color.White);
                }

                // If the wand clicked on a node, then we can attempt to assign a level.
                if (NodeData.IsObjectANode(wtData[5], false, false, true))
                {
                    UIHandler.SetMenu(UIHandler.worldEditConsole, true);
                    UIHandler.worldEditConsole.Open();
                    UIHandler.worldEditConsole.SendCommand("setLevel " + gridX.ToString() + " " + gridY.ToString() + " ", false);
                    ChatConsole.SendMessage("--------------------", Color.White);
                    ChatConsole.SendMessage("Assign a Level ID to this Node. It can be any valid level, including official levels or levels created by other players. The original author will be credited with the level design.", Color.Red);
                    ChatConsole.SendMessage("--------------------", Color.White);
                    ChatConsole.SendMessage("Example: setLevel " + gridX.ToString() + " " + gridY.ToString() + " TUTORIAL_1", Color.Green);
                    ChatConsole.SendMessage("--------------------", Color.White);
                }
            }

            // Right Mouse Button (Clone Current Tile)
            else if (Cursor.RightMouseState == Cursor.MouseDownState.Clicked)
            {
                scene.CloneTile((byte)Cursor.MiniGridX, (byte)Cursor.MiniGridY);
            }
        }
Exemplo n.º 4
0
        public override void OnClick()
        {
            byte menuOpt = this.GetContextOpt(Cursor.MouseX, Cursor.MouseY);

            // World Tile Tool Options
            if (menuOpt <= 5)
            {
                WE_UI.curWESlotGroup = menuOpt;
                WETools.SetWorldTileToolBySlotGroup(WE_UI.curWESlotGroup);
                WETools.UpdateHelperText();
            }

            // Resize Option
            else if (menuOpt == 6)
            {
                UIHandler.worldEditConsole.Open();
                UIHandler.worldEditConsole.SendCommand("resize ", false);
                ChatConsole.SendMessage("--------------------", Color.White);
                ChatConsole.SendMessage("Resize the World Map", Color.Red);
                ChatConsole.SendMessage("--------------------", Color.White);
            }

            this.CloseMenu();
        }