These affect only the map editor or the patch editor, not the game itself.
Saves the map being edited in the map editor.
Set the icon of the button that activates patch-placement mode in the map editor. In this mode, the map editor shows a list of patch types, and the user can insert, move, and remove patches on the map.
-- Use "icon-editor-patch" for the map editor's patches icon. SetEditorPatchIcon("unit-editor-patch")
Set the icon that is used in the editor to indicate selection.
-- Use "icon-human-patrol-land" for the editor's select icon. SetEditorSelectIcon("icon-human-patrol-land")
Set the icon of the button that activates unit-placement mode in the map editor. In this mode, the map editor shows a list of unit types, and the user can insert, move, and remove units on the map.
-- Use "icon-footman" for the map editor's units icon. SetEditorUnitsIcon("unit-footman")
Set the unit used in the map editor to show the start location.
See also Editor.StartUnit.
SetEditorStartUnit("unit-start-location")
Starts the map editor.
Starts the patch editor.
This variable refers to an object that has at least the following properties and methods: Running ShowTerrainFlags StartUnit TileSelectedPatch UnitTypes
Whether the map editor is running. When the user starts the map editor, the engine sets Editor.Running = EditorEditing. When a Lua script sets Editor.Running = EditorNotRunning, the map editor exits. The value of this property also affects what the engine shows on the screen: for example, patches may get borders around them when the editor is running.
The value of the Editor.Running property should be one of the following constants defined by the engine:
If true, the editor shows the terrain flags of map tiles as colored rectangles. This makes it easier to check that the terrain flags have been correctly and consistently defined in patch types, and that there is enough space for large units to move between obstacles.
The value of this read-only property is the CUnitType object that the editor will use to show the start location of each player. Lua scripts can change it by calling SetEditorStartUnit.
A sorted list of unit-types for the editor. This is only a temporary hack for better sorted units. Because this is a C++ vector rather than a Lua table, the key numbers start from 0 rather than 1.
Editor.UnitTypes.clear() Editor.UnitTypes.push_back("unit-vault") Editor.UnitTypes.push_back("unit-apcs") Editor.UnitTypes.push_back("unit-medic") Editor.UnitTypes.push_back("unit-bazoo") Editor.UnitTypes.push_back("unit-assault") Editor.UnitTypes.push_back("unit-grenadier") Editor.UnitTypes.push_back("unit-camp") Editor.UnitTypes.push_back("unit-hosp")
Fills the map with patches of the selected type, removing all other patches.