Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds entity lists and inspectors for easier debugging and mod-making.
In addition to what's layed out below, I also plan to add more features such as an item spawner window and individual toggles for certain debug overlays.
Console Commands
debugmenu
: Opens an entity explorer window.close
|closeall
: Closes all open windows, and disables the inspector.entities
|entityexplorer
: Opens an entity explorer window.gui
|guiexplorer
|guiheirarchy
: Opens a GUI explorer window.spawnitems
|spawnitem
|itemspawner
: Opens the entity spawner window.inspect
: Enables the entity inspector.entities
: Enables the entity inspector.gui
: Enables the GUI inspector.Windows
All windows can be dragged, and closed with either their respective Close button, or with the
close
|closeall
commands.Entity Explorers
A list of every loaded entity if opened with the console, or a list of entities under the cursor if opened with the entity inspector.
On the left of an entry is its name (if available), its class, and its location. On the right is its ID, and a button to destroy the entity.
Entries can be clicked to open an entity editor window.
Entity Editors
A list of serializable entity editors; same as what would be seen in the submarine and character editors.
GUI Explorers
A heirarchy of GUI elements, with parents above the focused element, and children below.
Opening one of these windows from the console focuses
Screen.Selected.Frame
, while opening one from the GUI inspector focusesGUI.MouseOn
.On the left of an entry is its class, and its style. On the right is its update order, a visibility toggle, and a button to orphan the element. Elements whose parents are the GUI canvas cannot be orphaned.
Hovering over an entry will outline its rect, holding Ctrl will outline each element in its parent heirarchy, and holding Alt will fill in the outlines at half opacity.
Clicking on an entry will open a new GUI Explorer window focused on that element.
Entity Spawner
A categorized list of entities, same as in the Submarine Editor but with only items.
The quality of selected items can be changed with the buttons at the bottom of the window.
Left-clicking an entity in the list will add one to the cursor, while right-clicking will remove one.
Selecting/deselecting items is split based on the selected quality. For example, if "Good" is selected, only "Good" quality items will be added/removed.
When the cursor is off of the window, left clicking in the world will spawn the entities at that location, while clicking on the controlled character's inventory slots will spawn them in the character's inventory.
Holding shift while clicking will preserve the entities in the cursor, allowing them to be spawned multiple times without having to be reselected.
Similar to the inspector modes, clicking the right mouse button or pressing escape outside the window will clear the selected items.
All inspectors override this mode.
Inspector Modes
Regardless of its current mode, clicking the right mouse button or pressing escape will disable the inspector.
Entities
Displays the cursor's current position in the world, and a list of entities under the cursor.
Each entry on the list displays the entity's name (if applicable), and its class.
Clicking the left mouse button will create an Entity Explorer window with a list of each entity under the cursor, as well as any items contained in selected items' or characters' inventories (if applicable).
GUI
Displays the cursor's current position on the screen, and the selected GUI element's class and style.
Hovering over an element will outline its rect, holding Ctrl will outline each element in its parent heirarchy, and holding Alt will fill in the outlines at half opacity.
Clicking the left mouse button will create a GUI Explorer window focused on the currently selected element.
New Content
GUI Styles
English Localization
Media
GUI Explorer
Entity Inspector
Entity Explorer and Entity Editors
Item Spawner