Mission Editor – General
Editor sub-module for editing the **name** and **description** of a mission inside the Mission Editor. Validates translation keys and renders translation-status icons.
Editor sub-module for editing the name and description of a mission inside the Mission Editor. Validates translation keys and renders translation-status icons.
Overview
This is a class-based module (C) instantiated per Mission Editor session. It manages ImGui text inputs for the mission's name and description, flags the mission as dirty on edit, and checks whether translations exist via translateLanguage.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | (missionEditor) | Stores editor ref, loads recommended attributes list and boolean flags. |
C:getMissionIssues | (m) → table | Returns issues for missing name/description and missing translations. |
C:setMission | (mission) | Caches mission data, creates ImGui input buffers, resets translation caches. |
C:draw | () | Renders two-column ImGui layout with Name/Description fields and translation icons. |
Key Behaviors
- Translation check – green icon if
translateLanguagereturns something different from the raw key; red otherwise. - Description as table – if
mission.descriptionis a table, the module shows a read-only dump instead of a text input. - Dirty flag –
self.mission._dirty = truewhenever any field is edited.
Usage Example
-- Internally created by the mission editor framework:
local generalTab = require('extensions/editor/missionEditor/general')(missionEditorRef)
generalTab:setMission(currentMission)
generalTab:draw()
-- Querying issues:
local issues = generalTab:getMissionIssues(currentMission)
-- issues → { {label="Name has no translation!", severity="warning"}, ... }Issue Severities
| Condition | Severity |
|---|---|
| Name is empty | error |
| Description is empty | error |
| Name has no translation | warning |
| Description has no translation | warning |
See Also
- Mission Editor - Additional Attributes - Related reference
- Mission Editor - Career Setup - Related reference
- Mission Editor - Conditions - Related reference
- World Editor Guide - Guide
Mission Editor - Dev Notes
Minimal sub-editor module for mission developer notes and the dev-only mission flag.
Mission Editor – Generic Type Data
Editor sub-module for editing **mission-type-specific data** (`missionTypeData`). Provides a type selector dropdown, per-type custom editors, a raw JSON fallback editor, and a flowgraph variable synch