├── .github └── workflows │ ├── build.yml │ └── release_publish.yml ├── .gitignore ├── COPYING ├── LICENSE.txt ├── README.md ├── build.ps1 ├── docs ├── Contributing.md ├── Manual-zh-Hans.md ├── Manual.md └── images │ ├── cloneobject.png │ ├── configurecopiedobjects.png │ ├── downwardsplacement.png │ ├── dtalogo.png │ ├── mapeditor.jpg │ ├── rotateunit.png │ ├── videopreview.jpg │ └── waterselection.png └── src ├── MapEditorLauncher ├── Logger.cs ├── MapEditorLauncher.csproj ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── SecondStageUpdater │ ├── SecondStageUpdater.exe │ └── SecondStageUpdaterConfig.ini ├── UpdaterLink.cs └── editoricon.ico ├── TSMapEditor.sln ├── TSMapEditor ├── .config │ └── dotnet-tools.json ├── CCEngine │ ├── AutoLATType.cs │ ├── BuildingWithPropertyType.cs │ ├── CCCrypto.cs │ ├── CCFileManager.cs │ ├── CsfFile.cs │ ├── GameConfigINIFiles.cs │ ├── HvaFile.cs │ ├── MixCRC.cs │ ├── MixFile.cs │ ├── Palette.cs │ ├── RGBColor.cs │ ├── RampType.cs │ ├── ScriptAction.cs │ ├── ShpFile.cs │ ├── Theater.cs │ ├── TileSet.cs │ ├── TmpFile.cs │ ├── TriggerActionType.cs │ ├── TriggerEventType.cs │ ├── VplFile.cs │ └── VxlFile.cs ├── Config │ ├── Default │ │ ├── Actions.ini │ │ ├── ArtOverrides.ini │ │ ├── BaseMap.ini │ │ ├── Bridges.ini │ │ ├── BrushSizes.ini │ │ ├── ConnectedOverlays.ini │ │ ├── ConnectedTileDrawer.ini │ │ ├── Constants.ini │ │ ├── EditorRules.ini │ │ ├── EditorThemes.ini │ │ ├── Events.ini │ │ ├── FileManagerConfig.ini │ │ ├── OverlayCollections.ini │ │ ├── ScriptActions.ini │ │ ├── SmudgeCollections.ini │ │ ├── Speeches.ini │ │ ├── TeamTypeFlags.ini │ │ ├── TerrainGeneratorPresets.ini │ │ ├── TerrainObjectCollections.ini │ │ ├── TerrainTypeImpassability.ini │ │ ├── Theaters.ini │ │ ├── Tiberiums.ini │ │ └── UI │ │ │ ├── EditorControlsPanel.ini │ │ │ ├── UIConstants.ini │ │ │ └── Windows │ │ │ ├── AITriggersWindow.ini │ │ │ ├── AboutWindow.ini │ │ │ ├── AircraftOptionsWindow.ini │ │ │ ├── ApplyINICodeWindow.ini │ │ │ ├── AutoApplyImpassableOverlayWindow.ini │ │ │ ├── BasicSectionConfigWindow.ini │ │ │ ├── ChangeHeightWindow.ini │ │ │ ├── ConfigureAlliesWindow.ini │ │ │ ├── CopiedEntryTypesWindow.ini │ │ │ ├── CreateNewMapWindow.ini │ │ │ ├── CreateRandomTriggerSetWindow.ini │ │ │ ├── DeleteTerrainGeneratorPresetWindow.ini │ │ │ ├── DeletionModeConfigurationWindow.ini │ │ │ ├── EditHouseTypeWindow.ini │ │ │ ├── ExpandMapWindow.ini │ │ │ ├── FindWaypointWindow.ini │ │ │ ├── GenerateStandardHousesWindow.ini │ │ │ ├── HistoryWindow.ini │ │ │ ├── HotkeyConfigurationWindow.ini │ │ │ ├── HousesWindow.ini │ │ │ ├── InfantryOptionsWindow.ini │ │ │ ├── InputTerrainGeneratorPresetNameWindow.ini │ │ │ ├── LightingSettingsWindow.ini │ │ │ ├── LocalVariablesWindow.ini │ │ │ ├── MapSizeWindow.ini │ │ │ ├── MegamapGenerationOptionsWindow.ini │ │ │ ├── NewHouseWindow.ini │ │ │ ├── PlaceWaypointWindow.ini │ │ │ ├── RenderedObjectsConfigurationWindow.ini │ │ │ ├── RunScriptWindow.ini │ │ │ ├── ScriptsWindow.ini │ │ │ ├── SelectActionWindow.ini │ │ │ ├── SelectAnimationWindow.ini │ │ │ ├── SelectBridgeWindow.ini │ │ │ ├── SelectBuildingTargetWindow.ini │ │ │ ├── SelectBuildingTypeWindow.ini │ │ │ ├── SelectConnectedTileWindow.ini │ │ │ ├── SelectEventWindow.ini │ │ │ ├── SelectGlobalVariableWindow.ini │ │ │ ├── SelectHouseTypeWindow.ini │ │ │ ├── SelectHouseWindow.ini │ │ │ ├── SelectLocalVariableWindow.ini │ │ │ ├── SelectParticleSystemTypeWindow.ini │ │ │ ├── SelectScriptActionWindow.ini │ │ │ ├── SelectScriptWindow.ini │ │ │ ├── SelectSoundWindow.ini │ │ │ ├── SelectSpeechWindow.ini │ │ │ ├── SelectStringWindow.ini │ │ │ ├── SelectTagWindow.ini │ │ │ ├── SelectTaskForceWindow.ini │ │ │ ├── SelectTeamTypeWindow.ini │ │ │ ├── SelectTechnoTypeWindow.ini │ │ │ ├── SelectThemeWindow.ini │ │ │ ├── SelectTileSetWindow.ini │ │ │ ├── SelectTriggerWindow.ini │ │ │ ├── SelectTutorialLineWindow.ini │ │ │ ├── StructureOptionsWindow.ini │ │ │ ├── TaskforcesWindow.ini │ │ │ ├── TeamTypesWindow.ini │ │ │ ├── TriggersWindow.ini │ │ │ └── VehicleOptionsWindow.ini │ ├── MapCode │ │ ├── Add Reveal Map Trigger.ini │ │ ├── Enable Blue Tiberium Spreader Lighting.ini │ │ ├── Enable Green Tiberium Spreader Lighting.ini │ │ ├── Enable Ore Spreader Lighting.ini │ │ ├── Enable Spreading Ore.ini │ │ ├── Mixed Gems Only Use Blue-Green Colors.ini │ │ ├── Replace Tiberium With Ore.ini │ │ ├── Replace Tiberium With Snowy Ore.ini │ │ ├── Snowy Mixed Gems.ini │ │ ├── Snowy Ore.ini │ │ ├── Snowy Smudges.ini │ │ └── Snowy Tiberium.ini │ ├── ReadMe.txt │ └── Scripts │ │ ├── Apply Animated Water.cs │ │ ├── Count Credits On Map.cs │ │ ├── Disable All Debug Triggers.cs │ │ ├── Make Civilian Vehicles Sleep.cs │ │ ├── Remove All Terrain Objects.cs │ │ ├── Replace Autumn Grass With Tall Grass.cs │ │ ├── Replace Autumn Jungle Grass With Summer Grass.cs │ │ ├── Replace Autumn Trees With Summer Trees.cs │ │ └── Replace Frost With Clear.cs ├── Constants.cs ├── Content │ ├── Content.mgcb │ ├── Shaders │ │ ├── AlphaImageToAlphaMap.fx │ │ ├── AlphaMapApply.fx │ │ ├── ColorDraw.fx │ │ ├── CombineWithDepth.fx │ │ ├── DepthApply.fx │ │ ├── PalettedColorDraw.fx │ │ └── PalettedDrawNoDepth.fx │ ├── SpriteFont0.xnb │ ├── SpriteFont1.xnb │ ├── ToolIcons │ │ ├── 2dmode.png │ │ ├── deletionmode.png │ │ ├── drawconnectedtiles.png │ │ ├── flattenground.png │ │ ├── frameworkmode.png │ │ ├── generateterrain.png │ │ ├── lowercells.png │ │ ├── lowerground.png │ │ ├── lowerground_steep.png │ │ ├── placewaypoint.png │ │ ├── raisecells.png │ │ ├── raiseground.png │ │ ├── raiseground_steep.png │ │ └── terraingeneratoroptions.png │ ├── celltag.png │ ├── checkBoxChecked.png │ ├── checkBoxCheckedD.png │ ├── checkBoxCheckedRed.png │ ├── checkBoxClear.png │ ├── checkBoxClearD.png │ ├── checkBoxClearRed.png │ ├── comboBoxArrow.png │ ├── cursor.cur │ ├── generictile.png │ ├── generictilewithborder.png │ ├── icehighlight.png │ ├── impassablehighlight.png │ ├── openedComboBoxArrow.png │ ├── rangeindicator.png │ ├── sbBackground.png │ ├── sbDownArrow.png │ ├── sbMiddle.png │ ├── sbThumbBottom.png │ ├── sbThumbTop.png │ ├── sbUpArrow.png │ ├── sortbutton.png │ ├── star.png │ ├── tileborder.png │ ├── trackbarBackground.png │ └── trackbarButton.png ├── Extensions │ ├── IniFileEx.cs │ └── ListExtensions.cs ├── GameMath │ ├── CellMath.cs │ ├── Direction.cs │ ├── Point2D.cs │ └── Randomizer.cs ├── Helpers.cs ├── INIExtension.cs ├── Initialization │ ├── IInitializer.cs │ ├── IMap.cs │ ├── Initializer.cs │ ├── MapLoader.cs │ └── MapWriter.cs ├── MapEditorSettings.ini ├── Misc │ ├── AutosaveTimer.cs │ ├── DeletionMode.cs │ ├── INIConfigException.cs │ ├── ListExtensions.cs │ ├── MapFileWatcher.cs │ └── NamedColors.cs ├── Models │ ├── AITriggerType.cs │ ├── AbstractObject.cs │ ├── Aircraft.cs │ ├── AircraftType.cs │ ├── AnimType.cs │ ├── Animation.cs │ ├── ArtConfig │ │ ├── AircraftArtConfig.cs │ │ ├── AnimArtConfig.cs │ │ ├── BuildingArtConfig.cs │ │ ├── IArtConfig.cs │ │ ├── IArtConfigContainer.cs │ │ ├── InfantryArtConfig.cs │ │ ├── InfantrySequence.cs │ │ ├── OverlayArtConfig.cs │ │ └── VehicleArtConfig.cs │ ├── BasicSection.cs │ ├── BridgeType.cs │ ├── BuildingType.cs │ ├── CellTag.cs │ ├── CliffType.cs │ ├── ConnectedOverlayType.cs │ ├── CsfString.cs │ ├── EditorConfig.cs │ ├── Enums │ │ ├── AITriggerConditionType.cs │ │ ├── Difficulty.cs │ │ ├── LandType.cs │ │ ├── LightingPreviewMode.cs │ │ ├── RTTIType.cs │ │ ├── SpotlightType.cs │ │ ├── TerrainOccupation.cs │ │ ├── TheaterType.cs │ │ └── TriggerParamType.cs │ ├── EvaSpeeches.cs │ ├── Foot.cs │ ├── GameObject.cs │ ├── GameObjectType.cs │ ├── GlobalVariable.cs │ ├── House.cs │ ├── HouseType.cs │ ├── IHintable.cs │ ├── IIDContainer.cs │ ├── INIDefineable.cs │ ├── INIDefined.cs │ ├── IPositioned.cs │ ├── Infantry.cs │ ├── InfantryType.cs │ ├── Lighting.cs │ ├── LocalVariable.cs │ ├── Map.cs │ ├── MapFormat │ │ ├── Format5.cs │ │ ├── Format80.cs │ │ ├── IsoMapPack5Tile.cs │ │ ├── MemoryFile.cs │ │ ├── MiniLZO.cs │ │ └── VirtualFile.cs │ ├── MapTile.cs │ ├── Mission.cs │ ├── Overlay.cs │ ├── OverlayType.cs │ ├── ParticleSystemType.cs │ ├── Rules.cs │ ├── RulesColor.cs │ ├── Script.cs │ ├── Smudge.cs │ ├── SmudgeType.cs │ ├── Sounds.cs │ ├── StringTable.cs │ ├── Structure.cs │ ├── SubCell.cs │ ├── SuperWeaponType.cs │ ├── Tag.cs │ ├── TaskForce.cs │ ├── TeamType.cs │ ├── TeamTypeFlag.cs │ ├── Techno.cs │ ├── TechnoType.cs │ ├── TerrainObject.cs │ ├── TerrainType.cs │ ├── Themes.cs │ ├── TiberiumType.cs │ ├── Trigger.cs │ ├── TriggerAction.cs │ ├── TriggerCondition.cs │ ├── Tube.cs │ ├── TutorialLines.cs │ ├── Unit.cs │ ├── UnitType.cs │ ├── Waypoint.cs │ └── Weapon.cs ├── Mutations │ ├── Classes │ │ ├── ChangeAttachedTagMutation.cs │ │ ├── ChangeTechnoOwnerMutation.cs │ │ ├── CloneObjectMutation.cs │ │ ├── DeleteObjectMutation.cs │ │ ├── DeleteTubeMutation.cs │ │ ├── DrawCliffMutation.cs │ │ ├── FillTerrainAreaMutation.cs │ │ ├── HeightMutations │ │ │ ├── AlterElevationMutationBase.cs │ │ │ ├── AlterGroundElevationUndoData.cs │ │ │ ├── FSLowerGroundMutation.cs │ │ │ ├── FSRaiseGroundMutation.cs │ │ │ ├── FlattenGroundMutation.cs │ │ │ ├── HeightComparisonType.cs │ │ │ ├── LowerCellsMutation.cs │ │ │ ├── LowerGroundMutation.cs │ │ │ ├── LowerGroundMutationBase.cs │ │ │ ├── RaiseCellsMutation.cs │ │ │ ├── RaiseGroundMutation.cs │ │ │ ├── RaiseGroundMutationBase.cs │ │ │ └── TransitionRampInfo.cs │ │ ├── MoveObjectMutation.cs │ │ ├── OriginalCellTerrainData.cs │ │ ├── OriginalOverlayInfo.cs │ │ ├── OriginalSmudgeInfo.cs │ │ ├── OriginalTerrainData.cs │ │ ├── PasteTerrainMutation.cs │ │ ├── PlaceAircraftMutation.cs │ │ ├── PlaceBridgeMutation.cs │ │ ├── PlaceBuildingMutation.cs │ │ ├── PlaceCellTagMutation.cs │ │ ├── PlaceConnectedOverlayMutation.cs │ │ ├── PlaceInfantryMutation.cs │ │ ├── PlaceOverlayCollectionMutation.cs │ │ ├── PlaceOverlayMutation.cs │ │ ├── PlaceSmudgeCollectionMutation.cs │ │ ├── PlaceSmudgeMutation.cs │ │ ├── PlaceTerrainObjectCollectionMutation.cs │ │ ├── PlaceTerrainObjectMutation.cs │ │ ├── PlaceTerrainTileMutation.cs │ │ ├── PlaceTubeMutation.cs │ │ ├── PlaceVehicleMutation.cs │ │ ├── PlaceVeinholeMonsterMutation.cs │ │ ├── PlaceWaypointMutation.cs │ │ ├── SetFollowerMutation.cs │ │ ├── SetIceGrowthMutation.cs │ │ └── TerrainGenerationMutation.cs │ ├── Mutation.cs │ └── MutationManager.cs ├── NativeMethods.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Rendering │ ├── AlphaImageRenderStruct.cs │ ├── Camera.cs │ ├── EditorGraphics.cs │ ├── EditorState.cs │ ├── GameClass.cs │ ├── GraphicalBaseNode.cs │ ├── MGTMPImage.cs │ ├── MapView.cs │ ├── MapWideOverlay.cs │ ├── MegamapRenderOptions.cs │ ├── ObjectRenderers │ │ ├── AircraftRenderer.cs │ │ ├── AnimRenderer.cs │ │ ├── BuildingRenderer.cs │ │ ├── CommonDrawParams.cs │ │ ├── InfantryRenderer.cs │ │ ├── ObjectDepthAdjustments.cs │ │ ├── ObjectRenderer.cs │ │ ├── OverlayRenderer.cs │ │ ├── RenderDependencies.cs │ │ ├── SmudgeRenderer.cs │ │ ├── TerrainRenderer.cs │ │ ├── UnitRenderer.cs │ │ └── VxlRenderer.cs │ ├── ObjectSpriteRecord.cs │ ├── Refresh.cs │ ├── RenderObjectFlags.cs │ ├── RendererExtensions.cs │ ├── TheaterGraphics.cs │ ├── TileImage.cs │ └── TubeRefreshHelper.cs ├── Scripts │ ├── ScriptRunner.cs │ └── SmoothenIceScript.cs ├── Settings │ ├── BoolSetting.cs │ ├── DoubleSetting.cs │ ├── IntSetting.cs │ ├── RecentFiles.cs │ ├── SettingBase.cs │ ├── StringSetting.cs │ ├── TerrainGeneratorUserPresets.cs │ └── UserSettings.cs ├── TSMapEditor.csproj ├── UI │ ├── BrushSize.cs │ ├── Controls │ │ ├── DarkeningPanel.cs │ │ ├── EditorButton.cs │ │ ├── EditorDescriptionPanel.cs │ │ ├── EditorGUICreator.cs │ │ ├── EditorLinkLabel.cs │ │ ├── EditorListBox.cs │ │ ├── EditorNumberTextBox.cs │ │ ├── EditorPopUpSelector.cs │ │ ├── EditorSuggestionTextBox.cs │ │ ├── EditorTextBox.cs │ │ ├── EditorWindow.cs │ │ ├── FileBrowserListBox.cs │ │ ├── INItializableWindow.cs │ │ ├── MenuButton.cs │ │ ├── SortButton.cs │ │ ├── TileSetListBox.cs │ │ └── ToolTip.cs │ ├── CursorAction.cs │ ├── CursorActions │ │ ├── AircraftPlacementAction.cs │ │ ├── BuildingPlacementAction.cs │ │ ├── CalculateTiberiumValueCursorAction.cs │ │ ├── ChangeAttachedTagCursorAction.cs │ │ ├── ChangeTechnoOwnerAction.cs │ │ ├── CheckDistanceCursorAction.cs │ │ ├── CheckDistancePathfindingCursorAction.cs │ │ ├── ConnectedOverlayPlacementAction.cs │ │ ├── CopyCustomShapedTerrainCursorAction.cs │ │ ├── CopyRectangularTerrainCursorAction.cs │ │ ├── CopyTerrainCursorActionBase.cs │ │ ├── DeleteTubeCursorAction.cs │ │ ├── DeletionModeCursorAction.cs │ │ ├── DrawCliffCursorAction.cs │ │ ├── GenerateTerrainCursorAction.cs │ │ ├── HeightActions │ │ │ ├── FSLowerGroundCursorAction.cs │ │ │ ├── FSRaiseGroundCursorAction.cs │ │ │ ├── FlattenGroundCursorAction.cs │ │ │ ├── LowerCellsCursorAction.cs │ │ │ ├── LowerGroundCursorAction.cs │ │ │ ├── RaiseCellsCursorAction.cs │ │ │ └── RaiseGroundCursorAction.cs │ │ ├── InfantryPlacementAction.cs │ │ ├── ManageBaseNodesCursorAction.cs │ │ ├── OverlayCollectionPlacementAction.cs │ │ ├── OverlayPlacementAction.cs │ │ ├── PasteTerrainCursorAction.cs │ │ ├── PlaceBridgeCursorAction.cs │ │ ├── PlaceCellTagCursorAction.cs │ │ ├── PlaceSmudgeCollectionCursorAction.cs │ │ ├── PlaceSmudgeCursorAction.cs │ │ ├── PlaceTerrainCursorAction.cs │ │ ├── PlaceTubeCursorAction.cs │ │ ├── PlaceVeinholeMonsterCursorAction.cs │ │ ├── PlaceWaypointCursorAction.cs │ │ ├── SelectCellCursorAction.cs │ │ ├── SetFollowerCursorAction.cs │ │ ├── TerrainObjectCollectionPlacementAction.cs │ │ ├── TerrainObjectPlacementAction.cs │ │ ├── ToggleIceGrowthCursorAction.cs │ │ └── UnitPlacementAction.cs │ ├── EditorContextMenu.cs │ ├── EditorPanel.cs │ ├── EditorThemes.cs │ ├── KeyboardCommand.cs │ ├── KeyboardCommands.cs │ ├── MainMenu.cs │ ├── MapUI.cs │ ├── Notifications │ │ ├── Notification.cs │ │ └── NotificationManager.cs │ ├── ObjectTypeCollection.cs │ ├── OverlayCollection.cs │ ├── OverlayFrameSelector.cs │ ├── Parser.cs │ ├── RecentFilesPanel.cs │ ├── SettingsPanel.cs │ ├── Sidebar │ │ ├── AircraftListPanel.cs │ │ ├── BuildingListPanel.cs │ │ ├── EditorSidebar.cs │ │ ├── ISearchBoxContainer.cs │ │ ├── InfantryListPanel.cs │ │ ├── ObjectListPanel.cs │ │ ├── OverlayListPanel.cs │ │ ├── SidebarMode.cs │ │ ├── SmudgeListPanel.cs │ │ ├── TerrainObjectListPanel.cs │ │ ├── TreeView.cs │ │ └── UnitListPanel.cs │ ├── SmudgeCollection.cs │ ├── TagEventArgs.cs │ ├── TerrainObjectCollection.cs │ ├── TileDisplay.cs │ ├── TileInfoDisplay.cs │ ├── TileSelector.cs │ ├── TopBar │ │ ├── EditorControlsPanel.cs │ │ └── TopBarMenu.cs │ ├── UIHelpers.cs │ ├── UIManager.cs │ └── Windows │ │ ├── AITriggersWindow.cs │ │ ├── AboutWindow.cs │ │ ├── AircraftOptionsWindow.cs │ │ ├── ApplyINICodeWindow.cs │ │ ├── AutoApplyImpassableOverlayWindow.cs │ │ ├── BasicSectionConfigWindow.cs │ │ ├── ChangeHeightWindow.cs │ │ ├── ConfigureAlliesWindow.cs │ │ ├── CopiedEntryTypesWindow.cs │ │ ├── CreateRandomTriggerSetWindow.cs │ │ ├── DeletionModeConfigurationWindow.cs │ │ ├── EditHouseTypeWindow.cs │ │ ├── EditorMessageBox.cs │ │ ├── ExpandMapWindow.cs │ │ ├── FindWaypointWindow.cs │ │ ├── GenerateStandardHousesWindow.cs │ │ ├── HistoryWindow.cs │ │ ├── HotkeyConfigurationWindow.cs │ │ ├── HousesWindow.cs │ │ ├── InfantryOptionsWindow.cs │ │ ├── LightingSettingsWindow.cs │ │ ├── LocalVariablesWindow.cs │ │ ├── MainMenuWindows │ │ ├── CreateNewMapWindow.cs │ │ └── MapSetup.cs │ │ ├── MapSizeWindow.cs │ │ ├── MegamapGenerationOptionsWindow.cs │ │ ├── MegamapWindow.cs │ │ ├── NewHouseWindow.cs │ │ ├── OpenMapWindow.cs │ │ ├── PlaceWaypointWindow.cs │ │ ├── RenderedObjectsConfigurationWindow.cs │ │ ├── RunScriptWindow.cs │ │ ├── SaveMapAsWindow.cs │ │ ├── ScriptsWindow.cs │ │ ├── SelectActionWindow.cs │ │ ├── SelectAnimationWindow.cs │ │ ├── SelectBridgeWindow.cs │ │ ├── SelectBuildingTargetWindow.cs │ │ ├── SelectBuildingTypeWindow.cs │ │ ├── SelectConnectedTileWindow.cs │ │ ├── SelectEventWindow.cs │ │ ├── SelectGlobalVariableWindow.cs │ │ ├── SelectHouseTypeWindow.cs │ │ ├── SelectHouseWindow.cs │ │ ├── SelectLocalVariableWindow.cs │ │ ├── SelectObjectWindow.cs │ │ ├── SelectObjectWindowInfoPanel.cs │ │ ├── SelectParticleSystemTypeWindow.cs │ │ ├── SelectScriptActionWindow.cs │ │ ├── SelectScriptWindow.cs │ │ ├── SelectSoundWindow.cs │ │ ├── SelectSpeechWindow.cs │ │ ├── SelectStringWindow.cs │ │ ├── SelectTagWindow.cs │ │ ├── SelectTaskForceWindow.cs │ │ ├── SelectTeamTypeWindow.cs │ │ ├── SelectTechnoTypeWindow.cs │ │ ├── SelectThemeWindow.cs │ │ ├── SelectTileSetWindow.cs │ │ ├── SelectTriggerWindow.cs │ │ ├── SelectTutorialLineWindow.cs │ │ ├── StructureOptionsWindow.cs │ │ ├── TaskforcesWindow.cs │ │ ├── TeamTypesWindow.cs │ │ ├── TerrainGenerator │ │ ├── DeleteTerrainGeneratorPresetWindow.cs │ │ ├── InputTerrainGeneratorPresetNameWindow.cs │ │ ├── TerrainGeneratorConfigWindow.cs │ │ ├── TerrainGeneratorOverlayGroupsPanel.cs │ │ ├── TerrainGeneratorSmudgeGroupsPanel.cs │ │ ├── TerrainGeneratorTerrainTypeGroupsPanel.cs │ │ └── TerrainGeneratorTileGroupsPanel.cs │ │ ├── TriggersWindow.cs │ │ ├── VehicleOptionsWindow.cs │ │ └── WindowController.cs ├── app.manifest └── editoricon.ico └── build_launcher.bat /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build Map Editor 2 | 3 | on: 4 | push: 5 | branches: [ master, tsclient, yr ] 6 | pull_request: 7 | branches: [ master, tsclient, yr ] 8 | workflow_dispatch: 9 | jobs: 10 | build-editor: 11 | runs-on: windows-2022 12 | 13 | steps: 14 | - uses: actions/checkout@v3.1.0 15 | with: 16 | fetch-depth: 0 17 | 18 | - name: Setup .NET Core SDK 19 | uses: actions/setup-dotnet@v3.0.3 20 | with: 21 | dotnet-version: '8.x.x' 22 | 23 | - name: Build Editor 24 | run: ./build.ps1 25 | shell: pwsh 26 | 27 | - uses: actions/upload-artifact@v4 28 | name: Upload Artifacts 29 | with: 30 | name: WorldAlteringEditor 31 | path: ./Build -------------------------------------------------------------------------------- /build.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | 3 | $Output = Join-Path $PSScriptRoot Build 4 | 5 | dotnet publish src/TSMapEditor/TSMapEditor.csproj --configuration=Release --no-self-contained --output=$Output -------------------------------------------------------------------------------- /docs/images/cloneobject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/docs/images/cloneobject.png -------------------------------------------------------------------------------- /docs/images/configurecopiedobjects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/docs/images/configurecopiedobjects.png -------------------------------------------------------------------------------- /docs/images/downwardsplacement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/docs/images/downwardsplacement.png -------------------------------------------------------------------------------- /docs/images/dtalogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/docs/images/dtalogo.png -------------------------------------------------------------------------------- /docs/images/mapeditor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/docs/images/mapeditor.jpg -------------------------------------------------------------------------------- /docs/images/rotateunit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/docs/images/rotateunit.png -------------------------------------------------------------------------------- /docs/images/videopreview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/docs/images/videopreview.jpg -------------------------------------------------------------------------------- /docs/images/waterselection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/docs/images/waterselection.png -------------------------------------------------------------------------------- /src/MapEditorLauncher/Logger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MapEditorLauncher 4 | { 5 | public static class Logger 6 | { 7 | public static void Log(string str) 8 | { 9 | Console.WriteLine(str); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/MapEditorLauncher/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("World-Altering Editor (WAE) Launcher")] 8 | [assembly: AssemblyDescription("World-Altering Editor (WAE) Launcher")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("Rampastring")] 11 | [assembly: AssemblyProduct("World-Altering Editor (WAE)")] 12 | [assembly: AssemblyCopyright("Copyright © Rami 'Rampastring' Pasanen 2022-2024")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("f786eb3a-1adb-476e-aec0-772f70ed0575")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.1.0")] 35 | [assembly: AssemblyFileVersion("1.0.1.0")] 36 | -------------------------------------------------------------------------------- /src/MapEditorLauncher/SecondStageUpdater/SecondStageUpdater.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/MapEditorLauncher/SecondStageUpdater/SecondStageUpdater.exe -------------------------------------------------------------------------------- /src/MapEditorLauncher/SecondStageUpdater/SecondStageUpdaterConfig.ini: -------------------------------------------------------------------------------- 1 | [SecondStageUpdater] 2 | BuildPath=../ 3 | ProductExecutable=MapEditorLauncher.exe 4 | ;TargetAppGuid= 5 | WaitMode=ProcessName 6 | TargetProcessName=MapEditorLauncher 7 | 8 | [UserInterface] 9 | ProductName=DTA Scenario Editor 10 | WindowTitle=DTA Scenario Editor Updater 11 | WindowSize=600,400 12 | ForeColor=255,255,255 13 | LabelFontStyle=Regular 14 | BackgroundImage=SecondStageUpdaterBG.png 15 | 16 | -------------------------------------------------------------------------------- /src/MapEditorLauncher/editoricon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/MapEditorLauncher/editoricon.ico -------------------------------------------------------------------------------- /src/TSMapEditor/.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "dotnet-mgcb": { 6 | "version": "3.8.1.303", 7 | "commands": [ 8 | "mgcb" 9 | ] 10 | }, 11 | "dotnet-mgcb-editor": { 12 | "version": "3.8.1.303", 13 | "commands": [ 14 | "mgcb-editor" 15 | ] 16 | }, 17 | "dotnet-mgcb-editor-linux": { 18 | "version": "3.8.1.303", 19 | "commands": [ 20 | "mgcb-editor-linux" 21 | ] 22 | }, 23 | "dotnet-mgcb-editor-windows": { 24 | "version": "3.8.1.303", 25 | "commands": [ 26 | "mgcb-editor-windows" 27 | ] 28 | }, 29 | "dotnet-mgcb-editor-mac": { 30 | "version": "3.8.1.303", 31 | "commands": [ 32 | "mgcb-editor-mac" 33 | ] 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/TSMapEditor/CCEngine/BuildingWithPropertyType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.CCEngine 2 | { 3 | public enum BuildingWithPropertyType 4 | { 5 | LeastThreat = 0x0, 6 | HighestThreat = 0x10000, 7 | Nearest = 0x20000, 8 | Farthest = 0x30000, 9 | Invalid = 0x40000 10 | } 11 | 12 | public static class BuildingWithPropertyTypeExtension 13 | { 14 | public static string ToDescription(this BuildingWithPropertyType value) 15 | { 16 | return value switch 17 | { 18 | BuildingWithPropertyType.LeastThreat => "Least threat", 19 | BuildingWithPropertyType.HighestThreat => "Highest threat", 20 | BuildingWithPropertyType.Nearest => "Nearest", 21 | BuildingWithPropertyType.Farthest => "Farthest", 22 | _ => string.Empty, 23 | }; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/TSMapEditor/CCEngine/RGBColor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | 3 | namespace TSMapEditor.CCEngine 4 | { 5 | public struct RGBColor 6 | { 7 | public RGBColor(byte[] buffer, int offset, int shift) 8 | { 9 | R = (byte)(buffer[offset] << shift); 10 | G = (byte)(buffer[offset + 1] << shift); 11 | B = (byte)(buffer[offset + 2] << shift); 12 | } 13 | 14 | public RGBColor(byte r, byte g, byte b) 15 | { 16 | R = r; 17 | G = g; 18 | B = b; 19 | } 20 | 21 | public byte R; 22 | public byte G; 23 | public byte B; 24 | 25 | public Color ToXnaColor() => new Color(R, G, B); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/TSMapEditor/CCEngine/RampType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.CCEngine 2 | { 3 | /// 4 | /// Defines the types of terrain ramps in the game. 5 | /// 6 | /// Taken from TS++, TIBSUN_DEFINES.H 7 | /// https://github.com/Vinifera-Developers/TSpp 8 | /// Originally by CCHyper, adjusted for C# by Rampastring 9 | public enum RampType 10 | { 11 | None = 0, 12 | 13 | // Basic, two adjacent corners raised 14 | West = 1, 15 | North = 2, 16 | East = 3, 17 | South = 4, 18 | 19 | // Tile outside corners (one corner raised by half a cell) 20 | CornerNW = 5, 21 | CornerNE = 6, 22 | CornerSE = 7, 23 | CornerSW = 8, 24 | 25 | // Tile inside corners (three corners raised by half a cell) 26 | MidNW = 9, 27 | MidNE = 10, 28 | MidSE = 11, 29 | MidSW = 12, 30 | 31 | // Full tile sloped (mid corners raised by half cell, far corner by full cell) 32 | SteepSE = 13, 33 | SteepSW = 14, 34 | SteepNW = 15, 35 | SteepNE = 16, 36 | 37 | // Double ramps (two corners raised, alternating) 38 | DoubleUpSWNE = 17, 39 | DoubleDownSWNE = 18, 40 | DoubleUpNWSE = 19, 41 | DoubleDownNWSE = 20 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/ArtOverrides.ini: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/BaseMap.ini: -------------------------------------------------------------------------------- 1 | ; C&C World-Altering Editor (WAE) 2 | ; https://github.com/CnCNet/WorldAlteringEditor 3 | 4 | ; This file provides a standard template for every new map created in the map editor. 5 | 6 | [Basic] 7 | NextScenario= 8 | AltNextScenario= 9 | Name=No name 10 | Author=Unknown Author 11 | GameMode=Custom Map 12 | NewINIFormat=4 13 | CarryOverCap=0 14 | EndOfGame=no 15 | SkipScore=no 16 | OneTimeOnly=yes 17 | SkipMapSelect=yes 18 | Official=yes 19 | IgnoreGlobalAITriggers=no 20 | TruckCrate=no 21 | TrainCrate=no 22 | Percent=0 23 | CarryOverMoney=0.000000 24 | HomeCell=98 25 | AltHomeCell=99 26 | MultiplayerOnly=0 27 | TiberiumGrowthEnabled=yes 28 | VeinGrowthEnabled=no 29 | IceGrowthEnabled=no 30 | TiberiumDeathToVisceroid=yes 31 | FreeRadar=no 32 | InitTime=10000 33 | 34 | [Lighting] 35 | Ambient=0.950 36 | Red=1.000 37 | Green=1.000 38 | Blue=1.000 39 | Ground=0.000 40 | Level=0.032 41 | IonAmbient=0.500 42 | IonRed=1.500 43 | IonGreen=1.000 44 | IonBlue=0.700 45 | IonGround=0.000 46 | IonLevel=0.032 47 | 48 | [SpecialFlags] 49 | TiberiumGrows=yes 50 | TiberiumSpreads=yes 51 | TiberiumExplosive=no 52 | DestroyableBridges=yes 53 | MCVDeploy=no 54 | InitialVeteran=no 55 | FixedAlliance=no 56 | HarvesterImmune=no 57 | FogOfWar=no 58 | Inert=no 59 | IonStorms=no 60 | Meteorites=no 61 | Visceroids=yes 62 | 63 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/Bridges.ini: -------------------------------------------------------------------------------- 1 | ; C&C World-Altering Editor (WAE) 2 | ; https://github.com/CnCNet/WorldAlteringEditor 3 | 4 | ; Specifies the bridges available in the bridge drawing tool. 5 | 6 | 7 | [Bridges] 8 | 0=Low Bridge 9 | ;1=High Bridge 10 | ;2=Railroad Bridge 11 | 12 | [Low Bridge] 13 | Kind=Low 14 | BridgeStart.EW=LOBRDG21 15 | BridgeEnd.EW=LOBRDG19 16 | BridgePieces.EW=LOBRDG01,LOBRDG02,LOBRDG03,LOBRDG04 17 | BridgeStart.NS=LOBRDG23 18 | BridgeEnd.NS=LOBRDG25 19 | BridgePieces.NS=LOBRDG10,LOBRDG11,LOBRDG12,LOBRDG13 20 | 21 | [High Bridge] 22 | Kind=High 23 | BridgePieces.EW=BRIDGE1 24 | BridgePieces.NS=BRIDGE2 25 | TileSet=19 26 | 27 | [Railroad Bridge] 28 | Kind=High 29 | BridgePieces.EW=RAILBRDG1 30 | BridgePieces.NS=RAILBRDG2 31 | TileSet=37 -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/BrushSizes.ini: -------------------------------------------------------------------------------- 1 | ; C&C World-Altering Editor (WAE) 2 | ; https://github.com/CnCNet/WorldAlteringEditor 3 | 4 | ; Specifies the brush sizes available in the map editor. 5 | 6 | [BrushSizes] 7 | 0=1x1 8 | 1=2x2 9 | 2=3x3 10 | 3=4x4 11 | 4=5x5 12 | 5=10x10 13 | 6=1x2 14 | 7=1x3 15 | 8=2x1 16 | 9=3x1 17 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/FileManagerConfig.ini: -------------------------------------------------------------------------------- 1 | ; C&C World-Altering Editor (WAE) 2 | ; https://github.com/CnCNet/WorldAlteringEditor 3 | 4 | ; Specifies directories that the file manager will load MIX files from. 5 | [SearchDirectories] 6 | 0=MIX 7 | 1=Map Editor 8 | 9 | ; Specifies the MIX files loaded by the editor. 10 | ; The files are loaded in the order they are listed in. Files found in earlier MIX files are used. 11 | ; A second optional comma-separated boolean value can be provided to mark whether a MIX file is "required". 12 | ; The editor will refuse to start if a mix file marked as "required" is not found. 13 | ; Special values are supported to load additional MIX files. These are always optional. 14 | ; The valid options are $TSECACHE, $RA2ECACHE, $TSELOCAL, $RA2ELOCAL, $EXPAND, $EXPANDMD. 15 | [MIXFiles] 16 | 0=RampaCache.mix,0 17 | 1=$TSECACHE 18 | 2=Conquer.mix,1 19 | 3=Local.mix,1 20 | 4=Cache.mix,1 21 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/TeamTypeFlags.ini: -------------------------------------------------------------------------------- 1 | ; C&C World-Altering Editor (WAE) 2 | ; https://github.com/CnCNet/WorldAlteringEditor 3 | 4 | ; Specifies boolean flags that can be toggled for TeamTypes. 5 | 6 | ; = 7 | [TeamTypeFlags] 8 | Full=false 9 | Whiner=false 10 | Droppod=false 11 | Suicide=false 12 | Loadable=false 13 | Prebuild=false 14 | Annoyance=false 15 | IonImmune=false 16 | Recruiter=false 17 | Reinforce=false 18 | Aggressive=false 19 | Autocreate=false 20 | GuardSlower=false 21 | OnTransOnly=false 22 | AvoidThreats=false 23 | LooseRecruit=false 24 | IsBaseDefense=false 25 | OnlyTargetHouseEnemy=false 26 | TransportsReturnOnUnload=false 27 | AreTeamMembersRecruitable=false 28 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/Theaters.ini: -------------------------------------------------------------------------------- 1 | ; C&C World-Altering Editor (WAE) 2 | ; https://github.com/CnCNet/WorldAlteringEditor 3 | 4 | ; Specifies the theaters supported by the map editor. 5 | 6 | 7 | [Theaters] 8 | 0=Temperate 9 | 1=Desert 10 | 11 | [Temperate] 12 | ConfigINIPath=INI/Temperat.ini 13 | ContentMIXName=IsoTemp.mix 14 | OptionalContentMIXName=Temperat.mix 15 | TerrainPaletteName=isotem.pal 16 | UnitPaletteName=unittem.pal 17 | ;TiberiumPaletteName= 18 | FileExtension=.tem 19 | NewTheaterBuildingLetter=A 20 | 21 | [Desert] 22 | ConfigINIPath=INI/Desert.ini 23 | ContentMIXName=IsoDes.mix 24 | OptionalContentMIXName=Desert.mix 25 | TerrainPaletteName=isodes.pal 26 | UnitPaletteName=unitdes.pal 27 | FileExtension=.des 28 | NewTheaterBuildingLetter=T 29 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/Tiberiums.ini: -------------------------------------------------------------------------------- 1 | ; C&C World-Altering Editor (WAE) 2 | ; https://github.com/CnCNet/WorldAlteringEditor 3 | 4 | ; A list of overlays used by each Tiberium type. 5 | 6 | [Tiberiums] 7 | Riparius=RTIB01,RTIB02,RTIB03,RTIB04,RTIB05,RTIB06,RTIB07,RTIB08,RTIB09,RTIB10,RTIB11,RTIB12 8 | Gems=MIXGEM01,MIXGEM02,MIXGEM03,MIXGEM04 9 | Vinifera=QTIB01,QTIB02,QTIB03,QTIB04,QTIB05,QTIB06,QTIB07,QTIB08,QTIB09,QTIB10,QTIB11,QTIB12 10 | Ore=ZORE01,ZORE02,ZORE03,ZORE04 11 | Scrap=SCRAP01,SCRAP02,SCRAP03,SCRAP04 12 | GreenGems=GRNGEM01,GRNGEM02,GRNGEM03,GRNGEM04 13 | BlueGems=BLUGEM01,BLUGEM02,BLUGEM03,BLUGEM04 14 | SnowyRiparius=TIB1S_01,TIB1S_02,TIB1S_03,TIB1S_04,TIB1S_05,TIB1S_06,TIB1S_07,TIB1S_08,TIB1S_09,TIB1S_10,TIB1S_11,TIB1S_12 15 | SnowyVinifera=TIB2S_01,TIB2S_02,TIB2S_03,TIB2S_04,TIB2S_05,TIB2S_06,TIB2S_07,TIB2S_08,TIB2S_09,TIB2S_10,TIB2S_11,TIB2S_12 16 | SnowyOre=ORESNO01,ORESNO02,ORESNO03,ORESNO04 17 | SnowyGems=GEMSRA01,GEMSRA02,GEMSRA03,GEMSRA04 18 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/UIConstants.ini: -------------------------------------------------------------------------------- 1 | ; C&C World-Altering Editor (WAE) 2 | ; https://github.com/CnCNet/WorldAlteringEditor 3 | 4 | ; This file defines various user-interface related constants used in the editor. 5 | 6 | [UI] 7 | UITreeViewLineHeight=20 8 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/ApplyINICodeWindow.ini: -------------------------------------------------------------------------------- 1 | [ApplyINICodeWindow] 2 | $Width=600 3 | $CC00=lblHeader:XNALabel 4 | $CC01=lbINIFiles:EditorListBox 5 | $CC02=btnApplyFile:EditorButton 6 | $Height=getBottom(btnApplyFile) + EMPTY_SPACE_BOTTOM 7 | HasCloseButton=true 8 | 9 | [lblHeader] 10 | FontIndex=1 11 | Text=Apply INI Code 12 | $Y=EMPTY_SPACE_TOP 13 | $X=horizontalCenterOnParent() 14 | 15 | [lbINIFiles] 16 | $X=EMPTY_SPACE_SIDES 17 | $Y=getBottom(lblHeader) + EMPTY_SPACE_TOP 18 | $Width=getWidth(ApplyINICodeWindow) - (EMPTY_SPACE_SIDES * 2) 19 | $Height=400 20 | 21 | [btnApplyFile] 22 | Text=Apply INI File 23 | $Width=150 24 | $Y=getBottom(lbINIFiles) + EMPTY_SPACE_TOP 25 | $X=horizontalCenterOnParent() 26 | 27 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/AutoApplyImpassableOverlayWindow.ini: -------------------------------------------------------------------------------- 1 | [AutoApplyImpassableOverlayWindow] 2 | $CC0=lblDescription:XNALabel 3 | $Width=getRight(lblDescription) + EMPTY_SPACE_SIDES 4 | $CC1=chkRemoveExistingImpassableOverlay:XNACheckBox 5 | $CC2=chkOverrideExistingOverlay:XNACheckBox 6 | $CC3=btnApply:EditorButton 7 | $Height=getBottom(btnApply) + VERTICAL_SPACING 8 | HasCloseButton=true 9 | ImpassableOverlayTypeName=IMOV 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | Text=$$$TextBlockBegin$$$ 15 | This tool will automatically apply impassable overlay under large, 16 | indestructible terrain objects that should be specifically marked impassable. 17 | 18 | Do you wish to continue? No un-do is available! 19 | $$$TextBlockEnd$$$ 20 | 21 | [chkRemoveExistingImpassableOverlay] 22 | $X=EMPTY_SPACE_SIDES 23 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 24 | Text=Remove existing impassable overlay from the entire map 25 | 26 | [chkOverrideExistingOverlay] 27 | $X=EMPTY_SPACE_SIDES 28 | $Y=getBottom(chkRemoveExistingImpassableOverlay) + VERTICAL_SPACING 29 | Text=Override existing overlay under terrain objects 30 | 31 | [btnApply] 32 | $Width=100 33 | $X=horizontalCenterOnParent() 34 | $Y=getBottom(chkOverrideExistingOverlay) + EMPTY_SPACE_TOP 35 | Text=Apply 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/ChangeHeightWindow.ini: -------------------------------------------------------------------------------- 1 | [ChangeHeightWindow] 2 | $CC0=lblDescription:XNALabel 3 | $Width=getRight(lblDescription) + 20 + EMPTY_SPACE_SIDES 4 | $CC1=ddHeightLevel:XNADropDown 5 | $CC2=btnApply:EditorButton 6 | $Height=getBottom(btnApply) + EMPTY_SPACE_BOTTOM 7 | HasCloseButton=yes 8 | 9 | [lblDescription] 10 | $X=EMPTY_SPACE_SIDES 11 | $Y=EMPTY_SPACE_TOP 12 | Text=$$$TextBlockBegin$$$ 13 | Increase the height of all cells on the map by the specified value. 14 | 15 | No un-do is available, make sure you save your map first! 16 | $$$TextBlockEnd$$$ 17 | 18 | [ddHeightLevel] 19 | $X=EMPTY_SPACE_SIDES 20 | $Y=getBottom(lblDescription) + VERTICAL_SPACING 21 | $Width=getWidth(ChangeHeightWindow) - getX(ddHeightLevel) - EMPTY_SPACE_SIDES 22 | Option00=-14 23 | Option01=-13 24 | Option02=-12 25 | Option03=-11 26 | Option04=-10 27 | Option05=-9 28 | Option06=-8 29 | Option07=-7 30 | Option08=-6 31 | Option09=-5 32 | Option10=-4 33 | Option11=-3 34 | Option12=-2 35 | Option13=-1 36 | Option14=0 37 | Option15=+1 38 | Option16=+2 39 | Option17=+3 40 | Option18=+4 41 | Option19=+5 42 | Option20=+6 43 | Option21=+7 44 | Option22=+8 45 | Option23=+9 46 | Option24=+10 47 | Option25=+11 48 | Option26=+12 49 | Option27=+13 50 | Option28=+14 51 | 52 | [btnApply] 53 | $Width=100 54 | $X=horizontalCenterOnParent() 55 | $Y=getBottom(ddHeightLevel) + EMPTY_SPACE_TOP 56 | Text=Apply 57 | 58 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/ConfigureAlliesWindow.ini: -------------------------------------------------------------------------------- 1 | [ConfigureAlliesWindow] 2 | $CC0=lblDescription:XNALabel 3 | $Width=getRight(lblDescription) + 40 4 | $CC1=panelCheckBoxes:XNAPanel 5 | $CC2=btnApply:EditorButton 6 | HasCloseButton=yes 7 | 8 | [lblDescription] 9 | $X=EMPTY_SPACE_SIDES 10 | $Y=EMPTY_SPACE_TOP 11 | Text=Select which houses this house is allied to. 12 | 13 | [panelCheckBoxes] 14 | $X=EMPTY_SPACE_SIDES 15 | $Y=getBottom(lblDescription) + VERTICAL_SPACING 16 | $Width=getWidth(ConfigureAlliesWindow) - (EMPTY_SPACE_SIDES * 2) 17 | $Height=0 ; placeholder, dynamically generated 18 | DrawBorders=no 19 | 20 | [btnApply] 21 | $Width=100 22 | $X=horizontalCenterOnParent() 23 | $Y=0 ; placeholder, dynamically generated 24 | Text=Apply 25 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/CopiedEntryTypesWindow.ini: -------------------------------------------------------------------------------- 1 | [CopiedEntryTypesWindow] 2 | $CC0=lblDescription:XNALabel 3 | $Width=getRight(lblDescription) + EMPTY_SPACE_SIDES 4 | $CC1=chkTerrainTiles:XNACheckBox 5 | $CC2=chkOverlay:XNACheckBox 6 | $CC3=chkSmudges:XNACheckBox 7 | $CC4=chkTerrainObjects:XNACheckBox 8 | $CC5=chkStructures:XNACheckBox 9 | $CC6=chkVehicles:XNACheckBox 10 | $CC7=chkInfantry:XNACheckBox 11 | $CC8=btnClose:EditorButton 12 | $Height=getBottom(btnClose) + EMPTY_SPACE_BOTTOM 13 | 14 | 15 | [lblDescription] 16 | $X=EMPTY_SPACE_SIDES 17 | $Y=EMPTY_SPACE_TOP 18 | Text=Select object types to copy when copying map data. 19 | 20 | [chkTerrainTiles] 21 | $X=EMPTY_SPACE_SIDES 22 | $Y=getBottom(lblDescription) + (VERTICAL_SPACING * 2) 23 | Text=Terrain Tiles 24 | Checked=true 25 | 26 | [chkOverlay] 27 | $X=EMPTY_SPACE_SIDES 28 | $Y=getBottom(chkTerrainTiles) + VERTICAL_SPACING 29 | Text=Overlay 30 | 31 | [chkSmudges] 32 | $X=EMPTY_SPACE_SIDES 33 | $Y=getBottom(chkOverlay) + VERTICAL_SPACING 34 | Text=Smudges 35 | 36 | [chkTerrainObjects] 37 | $X=EMPTY_SPACE_SIDES 38 | $Y=getBottom(chkSmudges) + VERTICAL_SPACING 39 | Text=Terrain Objects 40 | 41 | [chkStructures] 42 | $X=EMPTY_SPACE_SIDES 43 | $Y=getBottom(chkTerrainObjects) + VERTICAL_SPACING 44 | Text=Structures 45 | 46 | [chkVehicles] 47 | $X=EMPTY_SPACE_SIDES 48 | $Y=getBottom(chkStructures) + VERTICAL_SPACING 49 | Text=Vehicles 50 | 51 | [chkInfantry] 52 | $X=EMPTY_SPACE_SIDES 53 | $Y=getBottom(chkVehicles) + VERTICAL_SPACING 54 | Text=Infantry 55 | 56 | [btnClose] 57 | $Width=100 58 | $X=horizontalCenterOnParent() 59 | $Y=getBottom(chkInfantry) + EMPTY_SPACE_TOP 60 | Text=Close 61 | $LeftClickAction=Disable 62 | 63 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/DeleteTerrainGeneratorPresetWindow.ini: -------------------------------------------------------------------------------- 1 | [DeleteTerrainGeneratorPresetWindow] 2 | $Height=RESOLUTION_HEIGHT - 100 3 | $CC0=lblDescription:XNALabel 4 | $Width=getRight(lblDescription) + EMPTY_SPACE_SIDES 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select terrain generator configuration to delete. 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(DeleteTerrainGeneratorPresetWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Generator Configuration... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(DeleteTerrainGeneratorPresetWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(DeleteTerrainGeneratorPresetWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Delete 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/DeletionModeConfigurationWindow.ini: -------------------------------------------------------------------------------- 1 | [DeletionModeConfigurationWindow] 2 | $CC0=lblDescription:XNALabel 3 | $Width=getRight(lblDescription) + EMPTY_SPACE_SIDES 4 | $CC1=chkCellTags:XNACheckBox 5 | $CC2=chkWaypoints:XNACheckBox 6 | $CC3=chkAircraft:XNACheckBox 7 | $CC4=chkInfantry:XNACheckBox 8 | $CC5=chkVehicles:XNACheckBox 9 | $CC6=chkStructures:XNACheckBox 10 | $CC7=chkTerrainObjects:XNACheckBox 11 | $CC8=btnApply:EditorButton 12 | $Height=getBottom(btnApply) + EMPTY_SPACE_BOTTOM 13 | 14 | 15 | [lblDescription] 16 | $X=EMPTY_SPACE_SIDES 17 | $Y=EMPTY_SPACE_TOP 18 | Text=Select object types to erase when deleting objects from the map. 19 | 20 | [chkCellTags] 21 | $X=EMPTY_SPACE_SIDES 22 | $Y=getBottom(lblDescription) + (VERTICAL_SPACING * 2) 23 | Text=CellTags 24 | 25 | [chkWaypoints] 26 | $X=EMPTY_SPACE_SIDES 27 | $Y=getBottom(chkCellTags) + VERTICAL_SPACING 28 | Text=Waypoints 29 | 30 | [chkAircraft] 31 | $X=EMPTY_SPACE_SIDES 32 | $Y=getBottom(chkWaypoints) + VERTICAL_SPACING 33 | Text=Aircraft 34 | 35 | [chkInfantry] 36 | $X=EMPTY_SPACE_SIDES 37 | $Y=getBottom(chkAircraft) + VERTICAL_SPACING 38 | Text=Infantry 39 | 40 | [chkVehicles] 41 | $X=EMPTY_SPACE_SIDES 42 | $Y=getBottom(chkInfantry) + VERTICAL_SPACING 43 | Text=Vehicles 44 | 45 | [chkStructures] 46 | $X=EMPTY_SPACE_SIDES 47 | $Y=getBottom(chkVehicles) + VERTICAL_SPACING 48 | Text=Structures 49 | 50 | [chkTerrainObjects] 51 | $X=EMPTY_SPACE_SIDES 52 | $Y=getBottom(chkStructures) + VERTICAL_SPACING 53 | Text=Terrain Objects 54 | 55 | [btnApply] 56 | $Width=100 57 | $X=horizontalCenterOnParent() 58 | $Y=getBottom(chkTerrainObjects) + EMPTY_SPACE_TOP 59 | Text=Apply 60 | 61 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/FindWaypointWindow.ini: -------------------------------------------------------------------------------- 1 | [FindWaypointWindow] 2 | $Width=300 3 | $CC0=lblHeader:XNALabel 4 | $CC1=lblWaypoint:XNALabel 5 | $CC2=tbWaypoint:EditorNumberTextBox 6 | $CC3=btnFind:EditorButton 7 | HasCloseButton=yes 8 | $Height=getBottom(btnFind) + EMPTY_SPACE_BOTTOM 9 | 10 | [lblHeader] 11 | Text=Find Waypoint 12 | FontIndex=1 13 | $X=horizontalCenterOnParent() 14 | $Y=EMPTY_SPACE_TOP 15 | 16 | [lblWaypoint] 17 | $X=EMPTY_SPACE_SIDES 18 | $Y=getBottom(lblHeader) + EMPTY_SPACE_TOP + 1 19 | Text=Waypoint: 20 | 21 | [tbWaypoint] 22 | $X=getRight(lblWaypoint) + HORIZONTAL_SPACING 23 | $Width=getWidth(FindWaypointWindow) - getX(tbWaypoint) - EMPTY_SPACE_SIDES 24 | $Y=getY(lblWaypoint) - 1 25 | 26 | [btnFind] 27 | $Width=100 28 | $X=horizontalCenterOnParent() 29 | $Y=getBottom(tbWaypoint) + EMPTY_SPACE_TOP 30 | Text=Find 31 | 32 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/GenerateStandardHousesWindow.ini: -------------------------------------------------------------------------------- 1 | [GenerateStandardHousesWindow] 2 | $CC0=lblDescription:XNALabel 3 | $Width=getRight(lblDescription) + EMPTY_SPACE_SIDES 4 | $CC1=btnSingleplayer:EditorButton 5 | $CC2=btnMultiplayer:EditorButton 6 | $CC3=btnCoOp:EditorButton 7 | $CC4=lblCountriesNotice:XNALabel 8 | $CC5=btnCancel:EditorButton 9 | $Height=getBottom(btnCancel) + EMPTY_SPACE_BOTTOM 10 | 11 | 12 | [lblDescription] 13 | $X=EMPTY_SPACE_SIDES 14 | $Y=EMPTY_SPACE_TOP 15 | Text=Select the configuration to generate the standard houses for: 16 | 17 | [btnSingleplayer] 18 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 19 | $Width=100 20 | $X=horizontalCenterOnParent() 21 | Text=Singleplayer 22 | 23 | [btnMultiplayer] 24 | $Y=getBottom(btnSingleplayer) + (VERTICAL_SPACING * 2) 25 | $Width=100 26 | $X=horizontalCenterOnParent() 27 | Text=Multiplayer 28 | $Enabled=1 - IS_RA2YR 29 | 30 | [btnCoOp] 31 | $Y=getBottom(btnMultiplayer) + (VERTICAL_SPACING * 2) 32 | $Width=100 33 | $X=horizontalCenterOnParent() 34 | Text=Co-Op 35 | $Enabled=1 - IS_RA2YR 36 | 37 | [lblCountriesNotice] 38 | $Y=getY(btnMultiplayer) 39 | $X=EMPTY_SPACE_SIDES 40 | Text=Yuri's Revenge does not benefit from houses in multiplayer. 41 | $Enabled=IS_RA2YR 42 | 43 | [btnCancel] 44 | $Y=getBottom(btnCoOp) + (VERTICAL_SPACING * 2) 45 | $Width=100 46 | $X=horizontalCenterOnParent() 47 | Text=Cancel 48 | 49 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/HistoryWindow.ini: -------------------------------------------------------------------------------- 1 | [HistoryWindow] 2 | Width=800 3 | $CC0=lblRedoHistory:XNALabel 4 | $CC1=lbRedoHistory:XNAListBox 5 | $CC2=lblUndoHistory:XNALabel 6 | $CC3=lbUndoHistory:XNAListBox 7 | $CC4=btnRedoUpToSelected:EditorButton 8 | $CC5=btnUndoUpToSelected:EditorButton 9 | $Height=getBottom(lbUndoHistory) + EMPTY_SPACE_BOTTOM 10 | HasCloseButton=yes 11 | 12 | [lblRedoHistory] 13 | $X=EMPTY_SPACE_SIDES 14 | $Y=EMPTY_SPACE_TOP 15 | Text=History of actions that have been undone and can be re-done: 16 | 17 | [lbRedoHistory] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblRedoHistory) + VERTICAL_SPACING 20 | $Width=600 21 | $Height=150 22 | 23 | [lblUndoHistory] 24 | $X=EMPTY_SPACE_SIDES 25 | $Y=getBottom(lbRedoHistory) + (VERTICAL_SPACING * 2) 26 | Text=History of actions that have been performed on the map and can be undone: 27 | 28 | [lbUndoHistory] 29 | $X=EMPTY_SPACE_SIDES 30 | $Y=getBottom(lblUndoHistory) + VERTICAL_SPACING 31 | $Width=getWidth(lbRedoHistory) 32 | $Height=500 33 | 34 | [btnRedoUpToSelected] 35 | $X=getRight(lbRedoHistory) + (HORIZONTAL_SPACING * 2) 36 | $Y=getY(lbRedoHistory) 37 | $Width=getWidth(HistoryWindow) - getX(btnRedoUpToSelected) - EMPTY_SPACE_SIDES 38 | Text=Redo Up To Selected 39 | 40 | [btnUndoUpToSelected] 41 | $X=getX(btnRedoUpToSelected) 42 | $Y=getY(lbUndoHistory) 43 | $Width=getWidth(btnRedoUpToSelected) 44 | Text=Undo Up To Selected 45 | 46 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/InputTerrainGeneratorPresetNameWindow.ini: -------------------------------------------------------------------------------- 1 | [InputTerrainGeneratorPresetNameWindow] 2 | $CC0=lblDescription:XNALabel 3 | $Width=getRight(lblDescription) + EMPTY_SPACE_SIDES 4 | $CC1=tbPresetName:EditorSuggestionTextBox 5 | $CC2=btnOK:EditorButton 6 | $CC3=btnCancel:EditorButton 7 | $Height=getBottom(btnCancel) + EMPTY_SPACE_BOTTOM 8 | 9 | [lblDescription] 10 | $X=EMPTY_SPACE_SIDES 11 | $Y=EMPTY_SPACE_TOP 12 | FontIndex=0 13 | Text=Please enter a name for your terrain generator preset: 14 | 15 | [tbPresetName] 16 | $X=EMPTY_SPACE_SIDES 17 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 18 | $Width=getWidth(InputTerrainGeneratorPresetNameWindow) - (EMPTY_SPACE_SIDES * 2) 19 | Suggestion=Type name... 20 | 21 | [btnOK] 22 | $Width=75 23 | $X=(getWidth(InputTerrainGeneratorPresetNameWindow) - ((getWidth(btnOK) * 2) + HORIZONTAL_SPACING)) / 2 24 | $Y=getBottom(tbPresetName) + EMPTY_SPACE_TOP 25 | Text=OK 26 | 27 | [btnCancel] 28 | $Width=getWidth(btnOK) 29 | $X=getRight(btnOK) + HORIZONTAL_SPACING 30 | $Y=getY(btnOK) 31 | Text=Cancel 32 | 33 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/MegamapGenerationOptionsWindow.ini: -------------------------------------------------------------------------------- 1 | [MegamapGenerationOptionsWindow] 2 | $CC0=lblDescription:XNALabel 3 | $Width=300 4 | $CC01=chkEmphasizeResources:XNACheckBox 5 | $CC02=chkIncludeOnlyVisibleArea:XNACheckBox 6 | $CC03=chkMarkPlayerSpots:XNACheckBox 7 | $CC04=lblRenderedObjectsNote:XNALabel 8 | $CC05=btnGenerate:EditorButton 9 | $Height=getBottom(btnGenerate) + EMPTY_SPACE_BOTTOM 10 | HasCloseButton=yes 11 | 12 | [lblDescription] 13 | $X=EMPTY_SPACE_SIDES 14 | $Y=EMPTY_SPACE_TOP 15 | Text=Preview generation options: 16 | 17 | [chkEmphasizeResources] 18 | $X=EMPTY_SPACE_BOTTOM 19 | $Y=getBottom(lblDescription) + (VERTICAL_SPACING * 2) 20 | Text=Emphasize resources 21 | 22 | [chkIncludeOnlyVisibleArea] 23 | $X=EMPTY_SPACE_SIDES 24 | $Y=getBottom(chkEmphasizeResources) + VERTICAL_SPACING 25 | Text=Include only visible part of map (LocalSize) 26 | 27 | [chkMarkPlayerSpots] 28 | $X=EMPTY_SPACE_SIDES 29 | $Y=getBottom(chkIncludeOnlyVisibleArea) + VERTICAL_SPACING 30 | Text=Mark player spots on waypoints 0-7 31 | 32 | [lblRenderedObjectsNote] 33 | $X=EMPTY_SPACE_SIDES 34 | $Y=getBottom(chkMarkPlayerSpots) + (VERTICAL_SPACING * 2) 35 | Text=Note that your options for rendered objects@(View -> Configure Rendered Objects...) also@impact the generated preview. 36 | 37 | [btnGenerate] 38 | $Width=150 39 | $X=horizontalCenterOnParent() 40 | $Y=getBottom(lblRenderedObjectsNote) + (VERTICAL_SPACING * 2) 41 | Text=Generate 42 | 43 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/NewHouseWindow.ini: -------------------------------------------------------------------------------- 1 | [NewHouseWindow] 2 | $Width=300 3 | $CCHeader=lblHeader:XNALabel 4 | $CC00=tbHouseName:EditorTextBox 5 | $CC01=lblHouseName:XNALabel 6 | $CC02=lblCountryNotice:XNALabel 7 | $CC03=ddParentCountry:XNADropDown 8 | $CC04=lblParentCountry:XNALabel 9 | $CC05=btnAdd:EditorButton 10 | $Height=getBottom(btnAdd) + EMPTY_SPACE_BOTTOM 11 | HasCloseButton=yes 12 | 13 | 14 | [lblHeader] 15 | FontIndex=1 16 | Text=Add New House 17 | $Y=EMPTY_SPACE_TOP 18 | $X=horizontalCenterOnParent() 19 | 20 | [tbHouseName] 21 | $X=getWidth(NewHouseWindow) / 2 22 | $Y=getBottom(lblHeader) + EMPTY_SPACE_TOP 23 | $Width=getWidth(NewHouseWindow) - getX(tbHouseName) - EMPTY_SPACE_SIDES 24 | 25 | [lblHouseName] 26 | $X=EMPTY_SPACE_SIDES 27 | $Y=getY(tbHouseName) + 1 28 | Text=House Name: 29 | 30 | [lblCountryNotice] 31 | $X=EMPTY_SPACE_SIDES 32 | $Y=getBottom(tbHouseName) + VERTICAL_SPACING 33 | Text=A new Country will also be created for the House. 34 | 35 | [ddParentCountry] 36 | $X=getX(tbHouseName) 37 | $Y=getBottom(lblCountryNotice) + VERTICAL_SPACING 38 | $Width=getWidth(tbHouseName) 39 | 40 | [lblParentCountry] 41 | $X=getX(lblHouseName) 42 | $Y=getY(ddParentCountry) + 1 43 | Text=Parent Country: 44 | 45 | [btnAdd] 46 | $Width=100 47 | $X=horizontalCenterOnParent() 48 | $Y=getBottom(ddParentCountry) + EMPTY_SPACE_TOP 49 | Text=Add 50 | 51 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/PlaceWaypointWindow.ini: -------------------------------------------------------------------------------- 1 | [PlaceWaypointWindow] 2 | $Width=215 3 | $CC0=lblDescription:XNALabel 4 | $CC1=tbWaypointNumber:EditorNumberTextBox 5 | $CC2=lblWaypointColor:XNALabel 6 | $CC3=ddWaypointColor:XNADropDown 7 | $CC4=btnPlace:EditorButton 8 | $Height=getBottom(btnPlace) + EMPTY_SPACE_BOTTOM 9 | HasCloseButton=yes 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | Text=Input waypoint number: 15 | 16 | [tbWaypointNumber] 17 | $X=EMPTY_SPACE_SIDES 18 | $Y=getBottom(lblDescription) + VERTICAL_SPACING 19 | $Width=getWidth(PlaceWaypointWindow) - (EMPTY_SPACE_SIDES * 2) 20 | 21 | [lblWaypointColor] 22 | $X=getX(tbWaypointNumber) 23 | $Y=getBottom(tbWaypointNumber) + VERTICAL_SPACING + 1 24 | Text=Color: 25 | 26 | [ddWaypointColor] 27 | $X=getRight(lblWaypointColor) + HORIZONTAL_SPACING 28 | $Y=getY(lblWaypointColor) - 1 29 | $Width=getRight(tbWaypointNumber) - getX(ddWaypointColor) 30 | 31 | [btnPlace] 32 | $Width=80 33 | $X=(getWidth(PlaceWaypointWindow) - getWidth(btnPlace)) / 2 34 | $Y=getBottom(ddWaypointColor) + EMPTY_SPACE_TOP 35 | Text=Place 36 | 37 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/RunScriptWindow.ini: -------------------------------------------------------------------------------- 1 | [RunScriptWindow] 2 | $Width=500 3 | $CC00=lblHeader:XNALabel 4 | $CC01=lblDescription:XNALabel 5 | $CC02=lbScriptFiles:EditorListBox 6 | $CC03=btnRunScript:EditorButton 7 | $Height=getBottom(btnRunScript) + EMPTY_SPACE_BOTTOM 8 | HasCloseButton=true 9 | 10 | [lblHeader] 11 | FontIndex=1 12 | Text=Run Script 13 | $Y=EMPTY_SPACE_TOP 14 | $X=horizontalCenterOnParent() 15 | 16 | [lblDescription] 17 | $Y=getBottom(lblHeader) + EMPTY_SPACE_TOP 18 | $X=EMPTY_SPACE_SIDES 19 | Text=$$$TextBlockBegin$$$ 20 | Run custom scripts that allow you to modify the map in powerful ways. 21 | 22 | NOTE: Scripts are C# programs and can contain malicious code! 23 | Only run scripts from authors whom you trust! 24 | $$$TextBlockEnd$$$ 25 | 26 | [lbScriptFiles] 27 | $X=EMPTY_SPACE_SIDES 28 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 29 | $Width=getWidth(RunScriptWindow) - (EMPTY_SPACE_SIDES * 2) 30 | $Height=400 31 | 32 | [btnRunScript] 33 | Text=Run Selected Script 34 | $Width=150 35 | $Y=getBottom(lbScriptFiles) + EMPTY_SPACE_TOP 36 | $X=horizontalCenterOnParent() 37 | 38 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectActionWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectActionWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Action: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectActionWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Action... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectActionWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectActionWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectAnimationWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectAnimationWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | 9 | 10 | [lblDescription] 11 | $X=EMPTY_SPACE_SIDES 12 | $Y=EMPTY_SPACE_TOP 13 | FontIndex=1 14 | Text=Select Animation: 15 | 16 | [tbSearch] 17 | $X=EMPTY_SPACE_SIDES 18 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 19 | $Width=getWidth(SelectAnimationWindow) - (EMPTY_SPACE_SIDES * 2) 20 | Suggestion=Search Animation... 21 | 22 | [btnSelect] 23 | $Width=100 24 | $X=(getWidth(SelectAnimationWindow) - getWidth(btnSelect)) / 2 25 | $Y=getHeight(SelectAnimationWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 26 | Text=Select 27 | 28 | [lbObjectList] 29 | $X=EMPTY_SPACE_SIDES 30 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 31 | $Width=getWidth(tbSearch) 32 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 33 | 34 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectBridgeWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectBridgeWindow] 2 | $Width=250 3 | $Height=200 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Bridge: 16 | 17 | [tbSearch] 18 | Visible=false 19 | 20 | [btnSelect] 21 | $Width=100 22 | $X=(getWidth(SelectBridgeWindow) - getWidth(btnSelect)) / 2 23 | $Y=getHeight(SelectBridgeWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 24 | Text=Draw 25 | 26 | [lbObjectList] 27 | $X=EMPTY_SPACE_SIDES 28 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 29 | $Width=getWidth(SelectBridgeWindow) - (EMPTY_SPACE_SIDES * 2) 30 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectBuildingTargetWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectBuildingTargetWindow] 2 | $Width=350 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=ddTarget:XNADropDown 6 | $CC2=btnSelect:EditorButton 7 | $CC3=tbSearch:EditorSuggestionTextBox 8 | $CC4=lbObjectList:EditorListBox 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select target: 16 | 17 | [ddTarget] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectBuildingTargetWindow) - (EMPTY_SPACE_SIDES * 2) 21 | 22 | [tbSearch] 23 | $X=EMPTY_SPACE_SIDES 24 | $Y=getBottom(ddTarget) + VERTICAL_SPACING 25 | $Width=getWidth(ddTarget) 26 | Suggestion=Search target... 27 | 28 | [btnSelect] 29 | $Width=100 30 | $X=(getWidth(SelectBuildingTargetWindow) - getWidth(btnSelect)) / 2 31 | $Y=getHeight(SelectBuildingTargetWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 32 | Text=Select 33 | 34 | [lbObjectList] 35 | $X=EMPTY_SPACE_SIDES 36 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 37 | $Width=getWidth(ddTarget) 38 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 39 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectBuildingTypeWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectBuildingTypeWindow] 2 | $Width=350 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | 9 | 10 | [lblDescription] 11 | $X=EMPTY_SPACE_SIDES 12 | $Y=EMPTY_SPACE_TOP 13 | FontIndex=1 14 | Text=Select BuildingType: 15 | 16 | [tbSearch] 17 | $X=EMPTY_SPACE_SIDES 18 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 19 | $Width=getWidth(SelectBuildingTypeWindow) - (EMPTY_SPACE_SIDES * 2) 20 | Suggestion=Search BuildingType... 21 | 22 | [btnSelect] 23 | $Width=100 24 | $X=(getWidth(SelectBuildingTypeWindow) - getWidth(btnSelect)) / 2 25 | $Y=getHeight(SelectBuildingTypeWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 26 | Text=Select 27 | 28 | [lbObjectList] 29 | $X=EMPTY_SPACE_SIDES 30 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 31 | $Width=getWidth(tbSearch) 32 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 33 | 34 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectConnectedTileWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectConnectedTileWindow] 2 | $Width=250 3 | $Height=400 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Connected Tile: 16 | 17 | [tbSearch] 18 | Visible=false 19 | 20 | [btnSelect] 21 | $Width=100 22 | $X=(getWidth(SelectConnectedTileWindow) - getWidth(btnSelect)) / 2 23 | $Y=getHeight(SelectConnectedTileWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 24 | Text=Draw 25 | 26 | [lbObjectList] 27 | $X=EMPTY_SPACE_SIDES 28 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 29 | $Width=getWidth(SelectConnectedTileWindow) - (EMPTY_SPACE_SIDES * 2) 30 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectEventWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectEventWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Event: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectEventWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Event... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectEventWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectEventWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectGlobalVariableWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectGlobalVariableWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Global Variable: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectGlobalVariableWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Global Variable... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectGlobalVariableWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectGlobalVariableWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectHouseTypeWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectHouseTypeWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select HouseType: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectHouseTypeWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search HouseType... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectHouseTypeWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectHouseTypeWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectHouseWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectHouseWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select House: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectHouseWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search House... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectHouseWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectHouseWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectLocalVariableWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectLocalVariableWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Local Variable: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectLocalVariableWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Local Variable... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectLocalVariableWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectLocalVariableWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectParticleSystemTypeWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectParticleSystemTypeWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Particle System: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectParticleSystemTypeWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Particle System... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectParticleSystemTypeWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectParticleSystemTypeWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectScriptActionWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectScriptActionWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | 9 | 10 | [lblDescription] 11 | $X=EMPTY_SPACE_SIDES 12 | $Y=EMPTY_SPACE_TOP 13 | FontIndex=1 14 | Text=Select script action: 15 | 16 | [tbSearch] 17 | $X=EMPTY_SPACE_SIDES 18 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 19 | $Width=getWidth(SelectScriptActionWindow) - (EMPTY_SPACE_SIDES * 2) 20 | Suggestion=Search action... 21 | 22 | [btnSelect] 23 | $Width=100 24 | $X=(getWidth(SelectScriptActionWindow) - getWidth(btnSelect)) / 2 25 | $Y=getHeight(SelectScriptActionWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 26 | Text=Select 27 | 28 | [lbObjectList] 29 | $X=EMPTY_SPACE_SIDES 30 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 31 | $Width=getWidth(tbSearch) 32 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 33 | 34 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectScriptWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectScriptWindow] 2 | $Width=300 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Script: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectScriptWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Scripts... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectScriptWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectScriptWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectSoundWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectSoundWindow] 2 | $Width=300 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | 9 | 10 | [lblDescription] 11 | $X=EMPTY_SPACE_SIDES 12 | $Y=EMPTY_SPACE_TOP 13 | FontIndex=1 14 | Text=Select Sound: 15 | 16 | [tbSearch] 17 | $X=EMPTY_SPACE_SIDES 18 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 19 | $Width=getWidth(SelectSoundWindow) - (EMPTY_SPACE_SIDES * 2) 20 | Suggestion=Search Sound... 21 | 22 | [btnSelect] 23 | $Width=100 24 | $X=(getWidth(SelectSoundWindow) - getWidth(btnSelect)) / 2 25 | $Y=getHeight(SelectSoundWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 26 | Text=Select 27 | 28 | [lbObjectList] 29 | $X=EMPTY_SPACE_SIDES 30 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 31 | $Width=getWidth(tbSearch) 32 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 33 | 34 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectSpeechWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectSpeechWindow] 2 | $Width=600 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | 9 | 10 | [lblDescription] 11 | $X=EMPTY_SPACE_SIDES 12 | $Y=EMPTY_SPACE_TOP 13 | FontIndex=1 14 | Text=Select Speech: 15 | 16 | [tbSearch] 17 | $X=EMPTY_SPACE_SIDES 18 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 19 | $Width=getWidth(SelectSpeechWindow) - (EMPTY_SPACE_SIDES * 2) 20 | Suggestion=Search Speech... 21 | 22 | [btnSelect] 23 | $Width=100 24 | $X=(getWidth(SelectSpeechWindow) - getWidth(btnSelect)) / 2 25 | $Y=getHeight(SelectSpeechWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 26 | Text=Select 27 | 28 | [lbObjectList] 29 | $X=EMPTY_SPACE_SIDES 30 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 31 | $Width=getWidth(tbSearch) 32 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 33 | 34 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectStringWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectStringWindow] 2 | $Width=400 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | $CC4=panelContent:EditorDescriptionPanel 9 | HasCloseButton=true 10 | 11 | 12 | [lblDescription] 13 | $X=EMPTY_SPACE_SIDES 14 | $Y=EMPTY_SPACE_TOP 15 | FontIndex=1 16 | Text=Select String: 17 | 18 | [tbSearch] 19 | $X=EMPTY_SPACE_SIDES 20 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 21 | $Width=getWidth(SelectStringWindow) - (EMPTY_SPACE_SIDES * 2) 22 | Suggestion=Search String... 23 | 24 | [btnSelect] 25 | $Width=100 26 | $X=(getWidth(SelectStringWindow) - getWidth(btnSelect)) / 2 27 | $Y=getHeight(SelectStringWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 28 | Text=Select 29 | 30 | [lbObjectList] 31 | $X=EMPTY_SPACE_SIDES 32 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 33 | $Width=getWidth(tbSearch) 34 | $Height=(((getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP - VERTICAL_SPACING) * 3) / 5) 35 | 36 | [panelContent] 37 | $X=EMPTY_SPACE_SIDES 38 | $Y=getBottom(lbObjectList) + VERTICAL_SPACING 39 | $Width=getWidth(tbSearch) 40 | $Height=getY(btnSelect) - getY(panelContent) - EMPTY_SPACE_TOP 41 | ControlDrawMode=UniqueRenderTarget ; prevents text from going over the bottom border 42 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectTagWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectTagWindow] 2 | $Width=300 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | 9 | 10 | [lblDescription] 11 | $X=EMPTY_SPACE_SIDES 12 | $Y=EMPTY_SPACE_TOP 13 | FontIndex=1 14 | Text=Select Tag: 15 | 16 | [tbSearch] 17 | $X=EMPTY_SPACE_SIDES 18 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 19 | $Width=getWidth(SelectTagWindow) - (EMPTY_SPACE_SIDES * 2) 20 | Suggestion=Search Tag... 21 | 22 | [btnSelect] 23 | $Width=100 24 | $X=(getWidth(SelectTagWindow) - getWidth(btnSelect)) / 2 25 | $Y=getHeight(SelectTagWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 26 | Text=Select 27 | 28 | [lbObjectList] 29 | $X=EMPTY_SPACE_SIDES 30 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 31 | $Width=getWidth(tbSearch) 32 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 33 | 34 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectTaskForceWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectTaskForceWindow] 2 | $Width=300 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select TaskForce: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectTaskForceWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search TaskForce... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectTaskForceWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectTaskForceWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectTeamTypeWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectTeamTypeWindow] 2 | $Width=300 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select TeamType: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectTeamTypeWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search TeamType... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectTeamTypeWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectTeamTypeWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectTechnoTypeWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectTechnoTypeWindow] 2 | $Width=350 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Techno Type: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectTechnoTypeWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Techno Type... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectTechnoTypeWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectTechnoTypeWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectThemeWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectThemeWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Theme: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectThemeWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Theme... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectThemeWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectThemeWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectTileSetWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectTileSetWindow] 2 | $Width=250 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select TileSet: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectTileSetWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search TileSet... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectTileSetWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectTileSetWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectTriggerWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectTriggerWindow] 2 | $Width=350 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Trigger: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectTriggerWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Trigger... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectTriggerWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectTriggerWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Default/UI/Windows/SelectTutorialLineWindow.ini: -------------------------------------------------------------------------------- 1 | [SelectTutorialLineWindow] 2 | $Width=800 3 | $Height=RESOLUTION_HEIGHT - 100 4 | $CC0=lblDescription:XNALabel 5 | $CC1=tbSearch:EditorSuggestionTextBox 6 | $CC2=btnSelect:EditorButton 7 | $CC3=lbObjectList:EditorListBox 8 | HasCloseButton=true 9 | 10 | 11 | [lblDescription] 12 | $X=EMPTY_SPACE_SIDES 13 | $Y=EMPTY_SPACE_TOP 14 | FontIndex=1 15 | Text=Select Text Line: 16 | 17 | [tbSearch] 18 | $X=EMPTY_SPACE_SIDES 19 | $Y=getBottom(lblDescription) + EMPTY_SPACE_TOP 20 | $Width=getWidth(SelectTutorialLineWindow) - (EMPTY_SPACE_SIDES * 2) 21 | Suggestion=Search Text... 22 | 23 | [btnSelect] 24 | $Width=100 25 | $X=(getWidth(SelectTutorialLineWindow) - getWidth(btnSelect)) / 2 26 | $Y=getHeight(SelectTutorialLineWindow) - EMPTY_SPACE_BOTTOM - getHeight(btnSelect) 27 | Text=Select 28 | 29 | [lbObjectList] 30 | $X=EMPTY_SPACE_SIDES 31 | $Y=getBottom(tbSearch) + VERTICAL_SPACING 32 | $Width=getWidth(tbSearch) 33 | $Height=getY(btnSelect) - getY(lbObjectList) - EMPTY_SPACE_TOP 34 | 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Add Reveal Map Trigger.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will add a trigger that reveals the whole map. Continue? 3 | Success=The "Reveal" trigger has been added to the map. 4 | 5 | [Events] 6 | Reveal=1,8,0,0 7 | 8 | [Actions] 9 | Reveal=1,16,0,0,0,0,0,0,A 10 | 11 | [Tags] 12 | RevealTag=0,Reveal 1,Reveal 13 | 14 | [Triggers] 15 | Reveal=Neutral,,Reveal,0,1,1,1,0 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Enable Blue Tiberium Spreader Lighting.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will enable blue lighting for blue tiberium spreaders. Continue? 3 | Success=Code for enabling blue tiberium spreader lighting has been added to the map. 4 | 5 | [TIBSPRDV] 6 | LightRedTint=0.0 7 | LightBlueTint=0.3 8 | LightGreenTint=0.0 9 | LightIntensity=0.003 10 | LightVisibility=1500 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Enable Green Tiberium Spreader Lighting.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will enable green lighting for green tiberium spreaders. Continue? 3 | Success=Code for enabling green tiberium spreader lighting has been added to the map. 4 | 5 | [TIBSPRDR] 6 | LightRedTint=0.0 7 | LightBlueTint=0.0 8 | LightGreenTint=0.35 9 | LightIntensity=0.003 10 | LightVisibility=1500 11 | 12 | [TIBSPRDRL] 13 | LightRedTint=0.0 14 | LightBlueTint=0.0 15 | LightGreenTint=0.35 16 | LightIntensity=0.003 17 | LightVisibility=1500 18 | 19 | [TIBSPRDRH] 20 | LightRedTint=0.0 21 | LightBlueTint=0.0 22 | LightGreenTint=0.35 23 | LightIntensity=0.003 24 | LightVisibility=1500 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Enable Ore Spreader Lighting.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will enable yellow lighting for ore spreaders. Continue? 3 | Success=Code for enabling ore spreader lighting has been added to the map. 4 | 5 | [TIBSPRDA] 6 | LightRedTint=0.3 7 | LightBlueTint=0.0 8 | LightGreenTint=0.3 9 | LightIntensity=0.003 10 | LightVisibility=1500 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Enable Spreading Ore.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will enable spreading ore for the map. Do not use this maps that have scrap debris placed on them. Continue? 3 | Success=Code for enabling spreading ore has been added to the map. 4 | 5 | [Tiberiums] 6 | 0=Riparius 7 | 1=Cruentus 8 | 2=Vinifera 9 | 3=Aboreus 10 | 11 | [Aboreus] 12 | Name=Ore 13 | Image=4 14 | Value=25 15 | Growth=1000 16 | GrowthPercentage=10 17 | Spread=1000 18 | SpreadPercentage=2 19 | Power=1 20 | Color=DarkGold 21 | Debris=VINCRYS1,VINCRYS2,VINCRYS3,VINCRYS4 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Mixed Gems Only Use Blue-Green Colors.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will change the colors of the mixed gems to green/blue (note: the effects won't be visible in the map editor before you restart it or re-load the map). Continue? 3 | Success=Code for changing the image of the mixed gems has been added to the map. 4 | 5 | [GEMMIX01] 6 | Image=GEMGB01 7 | 8 | [GEMMIX02] 9 | Image=GEMGB02 10 | 11 | [GEMMIX03] 12 | Image=GEMGB03 13 | 14 | [GEMMIX04] 15 | Image=GEMGB04 16 | 17 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Replace Tiberium With Ore.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will change the appearance of green tiberium to ore (note: the effects won't be visible in the map editor until you reload the map). Continue? 3 | Success=Code for changing the image of green tiberium has been added to the map. 4 | 5 | [Tiberiums] 6 | 0=Riparius 7 | 1=Cruentus 8 | 2=Vinifera 9 | 3=Aboreus 10 | 11 | [Riparius] 12 | Name=Ore 13 | Power=0 14 | 15 | [OREMINE] 16 | TiberiumToSpawn=0 17 | 18 | ;[OREMINEA] 19 | ;TiberiumToSpawn=0 20 | 21 | [OREMINE2] 22 | TiberiumToSpawn=0 23 | 24 | [OREMINE3] 25 | TiberiumToSpawn=0 26 | 27 | [TIBSPRDA] 28 | Image=TIBSPRDR3 29 | 30 | [RTIB01] 31 | Image=ZORE01 32 | 33 | [RTIB02] 34 | Image=ZORE02 35 | 36 | [RTIB03] 37 | Image=ZORE03 38 | 39 | [RTIB04] 40 | Image=ZORE04 41 | 42 | [RTIB05] 43 | Image=ZORE01 44 | 45 | [RTIB06] 46 | Image=ZORE02 47 | 48 | [RTIB07] 49 | Image=ZORE03 50 | 51 | [RTIB08] 52 | Image=ZORE04 53 | 54 | [RTIB09] 55 | Image=ZORE01 56 | 57 | [RTIB10] 58 | Image=ZORE02 59 | 60 | [RTIB11] 61 | Image=ZORE03 62 | 63 | [RTIB12] 64 | Image=ZORE04 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Replace Tiberium With Snowy Ore.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will change the appearance of green tiberium to snowy ore (note: the effects won't be visible in the map editor until you reload the map). Continue? 3 | Success=Code for changing the image of green tiberium has been added to the map. 4 | 5 | [Tiberiums] 6 | 0=Riparius 7 | 1=Cruentus 8 | 2=Vinifera 9 | 3=Aboreus 10 | 11 | [Riparius] 12 | Name=Ore 13 | Power=0 14 | 15 | [OREMINEA] 16 | TiberiumToSpawn=0 17 | 18 | [TIBSPRDA] 19 | Image=TIBSPRDR3 20 | 21 | [RTIB01] 22 | Image=ZORESNO01 23 | 24 | [RTIB02] 25 | Image=ZORESNO02 26 | 27 | [RTIB03] 28 | Image=ZORESNO03 29 | 30 | [RTIB04] 31 | Image=ZORESNO04 32 | 33 | [RTIB05] 34 | Image=ZORESNO01 35 | 36 | [RTIB06] 37 | Image=ZORESNO02 38 | 39 | [RTIB07] 40 | Image=ZORESNO03 41 | 42 | [RTIB08] 43 | Image=ZORESNO04 44 | 45 | [RTIB09] 46 | Image=ZORESNO01 47 | 48 | [RTIB10] 49 | Image=ZORESNO02 50 | 51 | [RTIB11] 52 | Image=ZORESNO03 53 | 54 | [RTIB12] 55 | Image=ZORESNO04 56 | 57 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Snowy Mixed Gems.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This script will change the appearance of the mixed gems to a snowy version (note: the effects won't be visible in the map editor until you reload the map). Continue? 3 | Success=Code for changing the image of the gems has been added to the map. 4 | 5 | [MIXGEM01] 6 | Image=GEMSRA01 7 | 8 | [MIXGEM02] 9 | Image=GEMSRA02 10 | 11 | [MIXGEM03] 12 | Image=GEMSRA03 13 | 14 | [MIXGEM04] 15 | Image=GEMSRA04 16 | 17 | [GRNGEM01] 18 | Image=GEMSRA01 19 | 20 | [GRNGEM02] 21 | Image=GEMSRA02 22 | 23 | [GRNGEM03] 24 | Image=GEMSRA03 25 | 26 | [GRNGEM04] 27 | Image=GEMSRA04 28 | 29 | [BLUGEM01] 30 | Image=GEMSRA01 31 | 32 | [BLUGEM02] 33 | Image=GEMSRA02 34 | 35 | [BLUGEM03] 36 | Image=GEMSRA03 37 | 38 | [BLUGEM04] 39 | Image=GEMSRA04 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Snowy Ore.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This INI file will change the appearance of ore to a snowy version (note: the effects won't be visible in the map editor before you restart it or re-load the map). Continue? 3 | Success=Code for changing the image of ore has been added to the map. 4 | 5 | [ZORE01] 6 | Image=ZORESNO01 7 | 8 | [ZORE02] 9 | Image=ZORESNO02 10 | 11 | [ZORE03] 12 | Image=ZORESNO03 13 | 14 | [ZORE04] 15 | Image=ZORESNO04 16 | 17 | [ZORE05] 18 | Image=ZORESNO01 19 | 20 | [ZORE06] 21 | Image=ZORESNO02 22 | 23 | [ZORE07] 24 | Image=ZORESNO03 25 | 26 | [ZORE08] 27 | Image=ZORESNO04 28 | 29 | [ZORE09] 30 | Image=ZORESNO01 31 | 32 | [ZORE10] 33 | Image=ZORESNO02 34 | 35 | [ZORE11] 36 | Image=ZORESNO03 37 | 38 | [ZORE12] 39 | Image=ZORESNO04 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/MapCode/Snowy Tiberium.ini: -------------------------------------------------------------------------------- 1 | [$Editor] 2 | Confirmation=This INI file will change the appearance of tiberium to a snowy version (note: the effects won't be visible in the map editor before you restart it or re-load the map). Continue? 3 | Success=Code for changing the image of tiberium has been added to the map. 4 | 5 | [RTIB01] 6 | Image=TIB1S_01 7 | 8 | [RTIB02] 9 | Image=TIB1S_02 10 | 11 | [RTIB03] 12 | Image=TIB1S_03 13 | 14 | [RTIB04] 15 | Image=TIB1S_04 16 | 17 | [RTIB05] 18 | Image=TIB1S_05 19 | 20 | [RTIB06] 21 | Image=TIB1S_06 22 | 23 | [RTIB07] 24 | Image=TIB1S_07 25 | 26 | [RTIB08] 27 | Image=TIB1S_08 28 | 29 | [RTIB09] 30 | Image=TIB1S_09 31 | 32 | [RTIB10] 33 | Image=TIB1S_10 34 | 35 | [RTIB11] 36 | Image=TIB1S_11 37 | 38 | [RTIB12] 39 | Image=TIB1S_12 40 | 41 | [QTIB01] 42 | Image=TIB2S_01 43 | 44 | [QTIB02] 45 | Image=TIB2S_02 46 | 47 | [QTIB03] 48 | Image=TIB2S_03 49 | 50 | [QTIB04] 51 | Image=TIB2S_04 52 | 53 | [QTIB05] 54 | Image=TIB2S_05 55 | 56 | [QTIB06] 57 | Image=TIB2S_06 58 | 59 | [QTIB07] 60 | Image=TIB2S_07 61 | 62 | [QTIB08] 63 | Image=TIB2S_08 64 | 65 | [QTIB09] 66 | Image=TIB2S_09 67 | 68 | [QTIB10] 69 | Image=TIB2S_10 70 | 71 | [QTIB11] 72 | Image=TIB2S_11 73 | 74 | [QTIB12] 75 | Image=TIB2S_12 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/TSMapEditor/Config/Scripts/Remove All Terrain Objects.cs: -------------------------------------------------------------------------------- 1 | // Using clauses. 2 | // Unless you know what's in the WAE code-base, you want to always include 3 | // these "standard usings". 4 | using System; 5 | using TSMapEditor; 6 | using TSMapEditor.Models; 7 | using TSMapEditor.CCEngine; 8 | using TSMapEditor.Rendering; 9 | using TSMapEditor.GameMath; 10 | 11 | namespace WAEScript 12 | { 13 | public class RemoveAllTerrainObjectsScript 14 | { 15 | /// 16 | /// Returns the description of this script. 17 | /// All scripts must contain this function. 18 | /// 19 | public string GetDescription() => "This script remove all terrain objects (trees etc.) from the map. Continue?"; 20 | 21 | /// 22 | /// Returns the message that is presented to the user if running this script succeeded. 23 | /// All scripts must contain this function. 24 | /// 25 | public string GetSuccessMessage() 26 | { 27 | return "Successfully removed all terrain objects from the map."; 28 | } 29 | 30 | /// 31 | /// The function that actually does the magic. 32 | /// 33 | /// Map argument that allows us to access map data. 34 | public void Perform(Map map) 35 | { 36 | // Query all terrain objects on the map and run an action on them. 37 | map.DoForAllTerrainObjects(terrainObject => 38 | { 39 | // Delete the terrain object from the map. 40 | map.RemoveTerrainObject(terrainObject); 41 | }); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/TSMapEditor/Content/Content.mgcb: -------------------------------------------------------------------------------- 1 | 2 | #----------------------------- Global Properties ----------------------------# 3 | 4 | /outputDir:bin/$(Platform) 5 | /intermediateDir:obj/$(Platform) 6 | /platform:Windows 7 | /config: 8 | /profile:HiDef 9 | /compress:False 10 | 11 | #-------------------------------- References --------------------------------# 12 | 13 | 14 | #---------------------------------- Content ---------------------------------# 15 | 16 | #begin Shaders/AlphaImageToAlphaMap.fx 17 | /importer:EffectImporter 18 | /processor:EffectProcessor 19 | /processorParam:DebugMode=Debug 20 | /build:Shaders/AlphaImageToAlphaMap.fx 21 | 22 | #begin Shaders/AlphaMapApply.fx 23 | /importer:EffectImporter 24 | /processor:EffectProcessor 25 | /processorParam:DebugMode=Debug 26 | /build:Shaders/AlphaMapApply.fx 27 | 28 | #begin Shaders/ColorDraw.fx 29 | /importer:EffectImporter 30 | /processor:EffectProcessor 31 | /processorParam:DebugMode=Auto 32 | /build:Shaders/ColorDraw.fx 33 | 34 | #begin Shaders/CombineWithDepth.fx 35 | /importer:EffectImporter 36 | /processor:EffectProcessor 37 | /processorParam:DebugMode=Auto 38 | /build:Shaders/CombineWithDepth.fx 39 | 40 | #begin Shaders/DepthApply.fx 41 | /importer:EffectImporter 42 | /processor:EffectProcessor 43 | /processorParam:DebugMode=Auto 44 | /build:Shaders/DepthApply.fx 45 | 46 | #begin Shaders/PalettedColorDraw.fx 47 | /importer:EffectImporter 48 | /processor:EffectProcessor 49 | /processorParam:DebugMode=Auto 50 | /build:Shaders/PalettedColorDraw.fx 51 | 52 | #begin Shaders/PalettedDrawNoDepth.fx 53 | /importer:EffectImporter 54 | /processor:EffectProcessor 55 | /processorParam:DebugMode=Auto 56 | /build:Shaders/PalettedDrawNoDepth.fx 57 | 58 | -------------------------------------------------------------------------------- /src/TSMapEditor/Content/Shaders/AlphaImageToAlphaMap.fx: -------------------------------------------------------------------------------- 1 | #pragma enable_d3d11_debug_symbols 2 | 3 | #if OPENGL 4 | #define SV_POSITION POSITION 5 | #define VS_SHADERMODEL vs_3_0 6 | #define PS_SHADERMODEL ps_3_0 7 | #else 8 | #define VS_SHADERMODEL vs_4_0 9 | #define PS_SHADERMODEL ps_4_0 10 | #endif 11 | 12 | // Shader for rendering Tiberian Sun alpha images to an alpha map. 13 | 14 | Texture2D SpriteTexture; 15 | sampler2D SpriteTextureSampler : register(s0) 16 | { 17 | Texture = ; // this is set by spritebatch 18 | AddressU = clamp; 19 | AddressV = clamp; 20 | MipFilter = Point; 21 | MinFilter = Point; 22 | MagFilter = Point; 23 | }; 24 | 25 | struct VertexShaderOutput 26 | { 27 | float4 Position : SV_POSITION; 28 | float4 Color : COLOR0; 29 | float2 TextureCoordinates : TEXCOORD0; 30 | }; 31 | 32 | float4 MainPS(VertexShaderOutput input) : COLOR 33 | { 34 | // We need to read from the main texture first, 35 | // otherwise the output will be black! 36 | float alphaTex = tex2D(SpriteTextureSampler, input.TextureCoordinates).a; 37 | 38 | return float4(alphaTex - 0.5, 0, 0, 0.0); 39 | } 40 | 41 | technique SpriteDrawing 42 | { 43 | pass P0 44 | { 45 | PixelShader = compile PS_SHADERMODEL MainPS(); 46 | } 47 | }; -------------------------------------------------------------------------------- /src/TSMapEditor/Content/Shaders/AlphaMapApply.fx: -------------------------------------------------------------------------------- 1 | #pragma enable_d3d11_debug_symbols 2 | 3 | #if OPENGL 4 | #define SV_POSITION POSITION 5 | #define VS_SHADERMODEL vs_3_0 6 | #define PS_SHADERMODEL ps_3_0 7 | #else 8 | #define VS_SHADERMODEL vs_4_0 9 | #define PS_SHADERMODEL ps_4_0 10 | #endif 11 | 12 | // Shader for rendering an alpha light map on a full map texture. 13 | 14 | Texture2D SpriteTexture; 15 | sampler2D SpriteTextureSampler : register(s0) 16 | { 17 | Texture = ; // this is set by spritebatch 18 | AddressU = clamp; 19 | AddressV = clamp; 20 | MipFilter = Point; 21 | MinFilter = Point; 22 | MagFilter = Point; 23 | }; 24 | 25 | Texture2D RenderSurface; 26 | sampler2D RenderSurfaceTextureSampler 27 | { 28 | Texture = ; 29 | AddressU = clamp; 30 | AddressV = clamp; 31 | MipFilter = Point; 32 | MinFilter = Point; 33 | MagFilter = Point; 34 | }; 35 | 36 | struct VertexShaderOutput 37 | { 38 | float4 Position : SV_POSITION; 39 | float4 Color : COLOR0; 40 | float2 TextureCoordinates : TEXCOORD0; 41 | }; 42 | 43 | float4 MainPS(VertexShaderOutput input) : COLOR 44 | { 45 | // We need to read from the main texture first, 46 | // otherwise the output will be black! 47 | float alphaTex = tex2D(SpriteTextureSampler, input.TextureCoordinates).r; 48 | float4 surfaceColor = tex2D(RenderSurfaceTextureSampler, input.TextureCoordinates); 49 | return surfaceColor * (alphaTex * 2.0); 50 | } 51 | 52 | technique SpriteDrawing 53 | { 54 | pass P0 55 | { 56 | AlphaBlendEnable = FALSE; 57 | PixelShader = compile PS_SHADERMODEL MainPS(); 58 | } 59 | }; -------------------------------------------------------------------------------- /src/TSMapEditor/Content/Shaders/PalettedDrawNoDepth.fx: -------------------------------------------------------------------------------- 1 | #pragma enable_d3d11_debug_symbols 2 | 3 | #if OPENGL 4 | #define SV_POSITION POSITION 5 | #define VS_SHADERMODEL vs_3_0 6 | #define PS_SHADERMODEL ps_3_0 7 | #else 8 | #define VS_SHADERMODEL vs_4_0 9 | #define PS_SHADERMODEL ps_4_0 10 | #endif 11 | 12 | float4 Lighting; 13 | 14 | sampler2D SpriteTextureSampler : register(s0) 15 | { 16 | Texture = (SpriteTexture); // this is set by spritebatch 17 | MipFilter = Point; 18 | MinFilter = Point; 19 | MagFilter = Point; 20 | }; 21 | 22 | Texture2D PaletteTexture; 23 | sampler2D PaletteTextureSampler 24 | { 25 | Texture = ; // passed in 26 | AddressU = wrap; 27 | AddressV = wrap; 28 | MipFilter = Point; 29 | MinFilter = Point; 30 | MagFilter = Point; 31 | }; 32 | 33 | struct VertexShaderOutput 34 | { 35 | float4 Position : SV_POSITION; 36 | float4 Color : COLOR0; 37 | float2 TextureCoordinates : TEXCOORD0; 38 | }; 39 | 40 | float4 MainPS(VertexShaderOutput input) : COLOR 41 | { 42 | float4 tex = tex2D(SpriteTextureSampler, input.TextureCoordinates); 43 | 44 | // Get color from palette 45 | float4 paletteColor = tex2D(PaletteTextureSampler, float2(tex.a, 0.5)); 46 | 47 | return paletteColor * Lighting; 48 | } 49 | 50 | technique SpriteDrawing 51 | { 52 | pass P0 53 | { 54 | PixelShader = compile PS_SHADERMODEL MainPS(); 55 | } 56 | }; -------------------------------------------------------------------------------- /src/TSMapEditor/Content/SpriteFont0.xnb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/SpriteFont0.xnb -------------------------------------------------------------------------------- /src/TSMapEditor/Content/SpriteFont1.xnb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/SpriteFont1.xnb -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/2dmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/2dmode.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/deletionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/deletionmode.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/drawconnectedtiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/drawconnectedtiles.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/flattenground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/flattenground.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/frameworkmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/frameworkmode.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/generateterrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/generateterrain.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/lowercells.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/lowercells.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/lowerground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/lowerground.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/lowerground_steep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/lowerground_steep.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/placewaypoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/placewaypoint.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/raisecells.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/raisecells.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/raiseground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/raiseground.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/raiseground_steep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/raiseground_steep.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/ToolIcons/terraingeneratoroptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/ToolIcons/terraingeneratoroptions.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/celltag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/celltag.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/checkBoxChecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/checkBoxChecked.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/checkBoxCheckedD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/checkBoxCheckedD.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/checkBoxCheckedRed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/checkBoxCheckedRed.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/checkBoxClear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/checkBoxClear.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/checkBoxClearD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/checkBoxClearD.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/checkBoxClearRed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/checkBoxClearRed.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/comboBoxArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/comboBoxArrow.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/cursor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/cursor.cur -------------------------------------------------------------------------------- /src/TSMapEditor/Content/generictile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/generictile.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/generictilewithborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/generictilewithborder.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/icehighlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/icehighlight.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/impassablehighlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/impassablehighlight.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/openedComboBoxArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/openedComboBoxArrow.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/rangeindicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/rangeindicator.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/sbBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/sbBackground.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/sbDownArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/sbDownArrow.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/sbMiddle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/sbMiddle.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/sbThumbBottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/sbThumbBottom.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/sbThumbTop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/sbThumbTop.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/sbUpArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/sbUpArrow.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/sortbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/sortbutton.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/star.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/tileborder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/tileborder.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/trackbarBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/trackbarBackground.png -------------------------------------------------------------------------------- /src/TSMapEditor/Content/trackbarButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/Content/trackbarButton.png -------------------------------------------------------------------------------- /src/TSMapEditor/GameMath/Direction.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.GameMath 2 | { 3 | /// 4 | /// Enumeration for "visual direction", iow. directions in the way 5 | /// the player perceives them. This is slightly rotated compared to the 6 | /// internal game compass where "north" actually points visually towards 7 | /// the northeast. 8 | /// 9 | public enum Direction 10 | { 11 | NE = 0, 12 | E = 1, 13 | SE = 2, 14 | S = 3, 15 | SW = 4, 16 | W = 5, 17 | NW = 6, 18 | N = 7, 19 | 20 | Count = 8 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/TSMapEditor/GameMath/Randomizer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TSMapEditor.GameMath 4 | { 5 | /// 6 | /// A random number generator. 7 | /// 8 | public class Randomizer 9 | { 10 | public Randomizer() 11 | { 12 | random = new Random(); 13 | } 14 | 15 | private Random random; 16 | 17 | public void Init(int? seed) 18 | { 19 | if (seed == null) 20 | random = new Random(); 21 | else 22 | random = new Random(seed.Value); 23 | } 24 | 25 | public int GetRandomNumber() 26 | { 27 | return random.Next(); 28 | } 29 | 30 | public int GetRandomNumber(int min, int max) => random.Next(min, max + 1); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/TSMapEditor/INIExtension.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | using Rampastring.Tools; 3 | using System; 4 | 5 | namespace TSMapEditor 6 | { 7 | public static class INIExtension 8 | { 9 | /// 10 | /// Performs an action for every value of an INI section. 11 | /// 12 | public static void DoForEveryValueInSection(this IniFile iniFile, string sectionName, Action action) 13 | { 14 | var section = iniFile.GetSection(sectionName); 15 | if (section == null) 16 | return; 17 | 18 | foreach (var kvp in section.Keys) 19 | { 20 | if (string.IsNullOrWhiteSpace(kvp.Value)) 21 | continue; 22 | 23 | action(kvp.Value); 24 | } 25 | } 26 | 27 | public static Color GetColorValue(this IniSection iniSection, string keyName, Color defaultValue, bool includeAlpha = false) 28 | { 29 | return Helpers.ColorFromString(iniSection.GetStringValue(keyName, Helpers.ColorToString(defaultValue, includeAlpha))); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/TSMapEditor/Initialization/IInitializer.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | using TSMapEditor.Models; 3 | 4 | namespace TSMapEditor.Initialization 5 | { 6 | public interface IInitializer 7 | { 8 | void ReadObjectTypePropertiesFromINI(T obj, IniFile iniFile) where T : INIDefineable, INIDefined; 9 | void ReadObjectTypeArtPropertiesFromINI(T obj, IniFile iniFile) where T : AbstractObject, INIDefined; 10 | void ReadObjectTypeArtPropertiesFromINI(T obj, IniFile iniFile, string sectionName) where T : AbstractObject, INIDefined; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/TSMapEditor/MapEditorSettings.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | GameDirectory= 3 | LastScenarioPath= 4 | UpscaleUI=false 5 | Theme=Default 6 | UseBoldFont=false 7 | 8 | [MapView] 9 | ScrollRate=15 10 | MapWideOverlayOpacity=50 11 | RefreshSize=1 12 | 13 | [Display] 14 | TargetFPS=144 15 | Borderless=false 16 | FullscreenWindowed=false 17 | 18 | ; Key:Modifiers 19 | ; Modifiers: Shift=1, Ctrl=2, Alt=4. If you want a combination, simply sum the numbers. 20 | [Keybinds] 21 | Undo=Z:2 22 | Redo=Y:2 23 | NextTile=M:0 24 | PreviousTile=N:0 25 | NextTileSet=J:0 26 | PreviousTileSet=H:0 27 | NextSidebarNode=P:0 28 | PreviousSidebarNode=O:0 29 | MarbleMadness=F:1 30 | NextBrushSize=OemPlus:0 31 | PreviousBrushSize=D0:0 32 | DeleteObject=Delete:0 33 | ToggleAutoLAT=L:2 34 | RotateUnit=A:0 35 | AircraftMenu=D1:0 36 | BuildingMenu=D2:0 37 | VehicleMenu=D3:0 38 | InfantryMenu=D4:0 39 | TerrainObjectMenu=D5:0 40 | OverlayMenu=D6:0 41 | FillTerrain=None:2 42 | ViewMegamap=F12:0 43 | 44 | -------------------------------------------------------------------------------- /src/TSMapEditor/Misc/DeletionMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TSMapEditor.Misc 4 | { 5 | /// 6 | /// Enum for specifying which object types should be erased when an object 7 | /// is erased from the map with a deletion tool. 8 | /// 9 | [Flags] 10 | public enum DeletionMode 11 | { 12 | None = 0, 13 | CellTags = 1, 14 | Waypoints = 2, 15 | Aircraft = 4, 16 | Infantry = 8, 17 | Vehicles = 16, 18 | Structures = 32, 19 | TerrainObjects = 64, 20 | All = CellTags + Waypoints + Aircraft + Infantry + Vehicles + Structures + TerrainObjects 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/TSMapEditor/Misc/INIConfigException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TSMapEditor 4 | { 5 | /// 6 | /// The exception that is thrown when INI data is invalid. 7 | /// 8 | public class INIConfigException : Exception 9 | { 10 | public INIConfigException(string message) : base(message) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/TSMapEditor/Misc/ListExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace TSMapEditor.Misc 5 | { 6 | public static class ListExtensions 7 | { 8 | /// 9 | /// Swaps two list items. 10 | /// 11 | public static void Swap(this List list, int index1, int index2) 12 | { 13 | (list[index1], list[index2]) = (list[index2], list[index1]); 14 | } 15 | 16 | /// 17 | /// Fetches an element at the given index. 18 | /// If the element is out of bounds, returns null. 19 | /// 20 | public static T GetElementIfInRange(this IList list, int index) 21 | { 22 | if (index < 0 || index >= list.Count) 23 | return default; 24 | 25 | return list[index]; 26 | } 27 | 28 | /// 29 | /// Fetches a random element from the list using the provided Random instance. 30 | /// 31 | public static int GetRandomElementIndex(this List list, Random random, int disallowedIndex) 32 | { 33 | int randomIndex = random.Next(0, list.Count); 34 | if (randomIndex == disallowedIndex) 35 | randomIndex = (randomIndex + 1) % list.Count; 36 | 37 | return randomIndex; 38 | } 39 | } 40 | 41 | public static class ArrayExtensions 42 | { 43 | public static void Swap(this T[] array, int index1, int index2) 44 | { 45 | (array[index1], array[index2]) = (array[index2], array[index1]); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/TSMapEditor/Misc/NamedColors.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | 3 | namespace TSMapEditor.Misc 4 | { 5 | public static class NamedColors 6 | { 7 | public static NamedColor[] GenericSupportedNamedColors = new NamedColor[] 8 | { 9 | new NamedColor("Teal", new Color(0, 196, 196)), 10 | new NamedColor("Green", new Color(0, 255, 0)), 11 | new NamedColor("Dark Green", Color.Green), 12 | new NamedColor("Lime Green", Color.LimeGreen), 13 | new NamedColor("Yellow", Color.Yellow), 14 | new NamedColor("Orange", Color.Orange), 15 | new NamedColor("Red", Color.Red), 16 | new NamedColor("Blood Red", Color.DarkRed), 17 | new NamedColor("Pink", Color.HotPink), 18 | new NamedColor("Cherry", Color.Pink), 19 | new NamedColor("Purple", Color.MediumPurple), 20 | new NamedColor("Sky Blue", Color.SkyBlue), 21 | new NamedColor("Blue", new Color(40, 40, 255)), 22 | new NamedColor("Brown", Color.Brown), 23 | new NamedColor("Metalic", new Color(160, 160, 200)), 24 | }; 25 | } 26 | 27 | public struct NamedColor 28 | { 29 | public string Name; 30 | public Color Value; 31 | 32 | public NamedColor(string name, Color value) 33 | { 34 | Name = name; 35 | Value = value; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/AbstractObject.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public abstract class AbstractObject : INIDefineable 4 | { 5 | public abstract RTTIType WhatAmI(); 6 | 7 | public bool IsTechno() 8 | { 9 | RTTIType rtti = WhatAmI(); 10 | 11 | return rtti == RTTIType.Aircraft || 12 | rtti == RTTIType.Infantry || 13 | rtti == RTTIType.Unit || 14 | rtti == RTTIType.Building; 15 | } 16 | 17 | public bool IsTechnoType() 18 | { 19 | RTTIType rtti = WhatAmI(); 20 | 21 | return rtti == RTTIType.AircraftType || 22 | rtti == RTTIType.InfantryType || 23 | rtti == RTTIType.UnitType || 24 | rtti == RTTIType.BuildingType; 25 | } 26 | 27 | public bool IsFoot() 28 | { 29 | RTTIType rtti = WhatAmI(); 30 | 31 | return rtti == RTTIType.Aircraft || 32 | rtti == RTTIType.Infantry || 33 | rtti == RTTIType.Unit; 34 | } 35 | 36 | public virtual AbstractObject Clone() 37 | { 38 | return (AbstractObject)MemberwiseClone(); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Aircraft.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class Aircraft : Foot 4 | { 5 | public Aircraft(AircraftType objectType) : base(objectType) 6 | { 7 | } 8 | 9 | public AircraftType AircraftType => ObjectType; 10 | 11 | // [Aircraft] 12 | // INDEX=OWNER,ID,HEALTH,X,Y,FACING,MISSION,TAG,VETERANCY,GROUP,AUTOCREATE_NO_RECRUITABLE,AUTOCREATE_YES_RECRUITABLE 13 | 14 | public override RTTIType WhatAmI() => RTTIType.Aircraft; 15 | 16 | public override bool Remapable() => ObjectType.ArtConfig.Remapable; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/AircraftType.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models.ArtConfig; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | public class AircraftType : TechnoType, IArtConfigContainer 6 | { 7 | public AircraftType(string iniName) : base(iniName) 8 | { 9 | } 10 | 11 | public AircraftArtConfig ArtConfig { get; private set; } = new AircraftArtConfig(); 12 | public IArtConfig GetArtConfig() => ArtConfig; 13 | 14 | public override RTTIType WhatAmI() => RTTIType.AircraftType; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/AnimType.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models.ArtConfig; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | public class AnimType : GameObjectType, IArtConfigContainer 6 | { 7 | public AnimType(string iniName) : base(iniName) { } 8 | 9 | public override RTTIType WhatAmI() => RTTIType.AnimType; 10 | 11 | public AnimArtConfig ArtConfig { get; set; } = new AnimArtConfig(); 12 | public IArtConfig GetArtConfig() => ArtConfig; 13 | 14 | public bool RenderInEditor { get; set; } = true; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/ArtConfig/AircraftArtConfig.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | 3 | namespace TSMapEditor.Models.ArtConfig 4 | { 5 | public class AircraftArtConfig : IArtConfig 6 | { 7 | public bool Remapable => true; 8 | public int Facings { get; set; } = 8; 9 | 10 | /// 11 | /// Palette override introduced in Red Alert 2. 12 | /// 13 | public string Palette { get; set; } 14 | 15 | public void ReadFromIniSection(IniSection iniSection) 16 | { 17 | if (iniSection == null) 18 | return; 19 | 20 | Facings = iniSection.GetIntValue(nameof(Facings), Facings); 21 | Palette = iniSection.GetStringValue(nameof(Palette), Palette); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/TSMapEditor/Models/ArtConfig/IArtConfig.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | 3 | namespace TSMapEditor.Models.ArtConfig 4 | { 5 | public interface IArtConfig 6 | { 7 | void ReadFromIniSection(IniSection iniSection); 8 | bool Remapable { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/ArtConfig/IArtConfigContainer.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models.ArtConfig 2 | { 3 | public interface IArtConfigContainer 4 | { 5 | IArtConfig GetArtConfig(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/ArtConfig/InfantryArtConfig.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | 3 | namespace TSMapEditor.Models.ArtConfig 4 | { 5 | public class InfantryArtConfig : IArtConfig 6 | { 7 | public string SequenceName { get; private set; } 8 | public InfantrySequence Sequence { get; set; } 9 | public string Image { get; set; } 10 | public bool Remapable => true; 11 | 12 | /// 13 | /// Palette override introduced in Red Alert 2. 14 | /// 15 | public string Palette { get; set; } 16 | 17 | public void ReadFromIniSection(IniSection iniSection) 18 | { 19 | SequenceName = iniSection.GetStringValue("Sequence", SequenceName); 20 | Image = iniSection.GetStringValue(nameof(Image), Image); 21 | Palette = iniSection.GetStringValue(nameof(Palette), Palette); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/ArtConfig/OverlayArtConfig.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | 3 | namespace TSMapEditor.Models.ArtConfig 4 | { 5 | public class OverlayArtConfig : IArtConfig 6 | { 7 | public bool Theater { get; set; } 8 | public bool NewTheater { get; set; } 9 | public bool Remapable => false; 10 | public string Image { get; set; } 11 | 12 | /// 13 | /// Palette override for wall overlays in Phobos 14 | /// 15 | public string Palette { get; set; } 16 | 17 | public void ReadFromIniSection(IniSection iniSection) 18 | { 19 | Theater = iniSection.GetBooleanValue(nameof(Theater), Theater); 20 | NewTheater = iniSection.GetBooleanValue(nameof(NewTheater), NewTheater); 21 | Image = iniSection.GetStringValue(nameof(Image), Image); 22 | Palette = iniSection.GetStringValue(nameof(Palette), Palette); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/CellTag.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | /// 6 | /// Attaches a to a . 7 | /// 8 | public class CellTag : AbstractObject, IMovable 9 | { 10 | public CellTag() 11 | { 12 | } 13 | 14 | public CellTag(Point2D position, Tag tag) 15 | { 16 | Position = position; 17 | Tag = tag; 18 | } 19 | 20 | public bool IsOnBridge() => false; 21 | 22 | public Point2D Position { get; set; } 23 | public Tag Tag { get; set; } 24 | 25 | public override RTTIType WhatAmI() => RTTIType.CellTag; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/CsfString.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class CsfString 4 | { 5 | public string ID { get; } 6 | public string Value { get; } 7 | 8 | public CsfString(string id, string value) 9 | { 10 | ID = id; 11 | Value = value; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/AITriggerConditionType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public enum AITriggerConditionType 4 | { 5 | None = -1, 6 | EnemyOwns = 0, 7 | OwnerOwns = 1, 8 | EnemyOnYellowPower = 2, 9 | EnemyOnRedPower = 3, 10 | EnemyHasCredits = 4, 11 | 12 | // The following are RA2/YR only 13 | OwnerHasIronCurtainReady = 5, 14 | OwnerHasChronosphereReady = 6, 15 | NeutralHouseOwns = 7 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/Difficulty.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public enum Difficulty 4 | { 5 | Easy, 6 | Medium, 7 | Hard 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/LandType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models.Enums 2 | { 3 | public enum LandType 4 | { 5 | Clear, 6 | Ice, 7 | Beach, 8 | Rough, 9 | Road, 10 | Railroad, 11 | Tiberium, 12 | Rock, 13 | Weeds, 14 | Tunnel, 15 | Water 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/LightingPreviewMode.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models.Enums 2 | { 3 | public enum LightingPreviewMode 4 | { 5 | NoLighting = 0, 6 | Normal = 1, 7 | IonStorm = 2, 8 | Dominator = 3, 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/RTTIType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public enum RTTIType 4 | { 5 | // Note that these do not currently follow 6 | // the order of the game's own RTTIType enum. 7 | 8 | // The order of the enum values in the game 9 | // itself is not entirely known at this time. 10 | 11 | // In addition, I took the liberty of making 12 | // the names of the values more fitting for C# conventions. 13 | None, 14 | OverlayType, 15 | Overlay, 16 | Unit, 17 | Aircraft, 18 | AircraftType, 19 | Building, 20 | BuildingType, 21 | Anim, 22 | AnimType, 23 | Bullet, 24 | Cell, 25 | Factory, 26 | House, 27 | HouseType, 28 | Infantry, 29 | InfantryType, 30 | IsoTileType, 31 | Side, 32 | Smudge, 33 | Terrain, 34 | TerrainType, 35 | UnitType, 36 | Event, 37 | TaskForce, 38 | ScriptType, 39 | TeamType, 40 | Waypoint, 41 | CellTag, 42 | SuperWeaponType, 43 | ParticleSystemType 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/SpotlightType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public enum SpotlightType 4 | { 5 | /// 6 | /// No spotlight. 7 | /// 8 | None = 0, 9 | 10 | /// 11 | /// A spotlight that repeats its movement in reverse after completing an arc. 12 | /// 13 | Reciprocating = 1, 14 | 15 | /// 16 | /// A spotlight that moves in a circular loop. 17 | /// 18 | Loop = 2 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/TerrainOccupation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TSMapEditor.Models.Enums 4 | { 5 | [Flags] 6 | public enum TerrainOccupation 7 | { 8 | None = 0, 9 | East = 1, 10 | West = 2, 11 | South = 4 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/TheaterType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models.Enums 2 | { 3 | public enum TheaterType 4 | { 5 | Temperate, 6 | Snow 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Enums/TriggerParamType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models.Enums 2 | { 3 | public enum TriggerParamType 4 | { 5 | Unused, 6 | Unknown, 7 | Number, 8 | Float, 9 | Cell, 10 | LocalVariable, 11 | TeamType, 12 | Techno, 13 | Building, 14 | BuildingName, 15 | BuildingWithProperty, 16 | Aircraft, 17 | Infantry, 18 | Unit, 19 | Movie, 20 | Text, 21 | Tag, 22 | Trigger, 23 | Boolean, 24 | Sound, 25 | Theme, 26 | Speech, 27 | SuperWeapon, 28 | Animation, 29 | ParticleSystem, 30 | Waypoint, 31 | WaypointZZ, 32 | String, 33 | GlobalVariable, 34 | HouseType, 35 | House, 36 | Quarry, 37 | Weapon, 38 | SpotlightBehaviour, 39 | RadarEvent, 40 | VoxelAnim, 41 | StringTableEntry 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Foot.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | /// 4 | /// A base class for mobile objects. 5 | /// 6 | public abstract class Foot : Techno where T : TechnoType 7 | { 8 | public const int VeterancyNone = 0; 9 | public const int VeterancyVeteran = 100; 10 | public const int VeterancyElite = 200; 11 | 12 | public Foot(T objectType) : base(objectType) { } 13 | 14 | 15 | public string Mission { get; set; } = "Guard"; 16 | public bool High { get; set; } 17 | public int Veterancy { get; set; } 18 | public int Group { get; set; } = -1; 19 | 20 | /// 21 | /// Is this unit available for recruitment for TeamTypes that have Autocreate=no? 22 | /// 23 | public bool AutocreateNoRecruitable { get; set; } 24 | 25 | /// 26 | /// Is this unit available for recruitment for TeamTypes that have Autocreate=yes? 27 | /// 28 | public bool AutocreateYesRecruitable { get; set; } 29 | 30 | public override bool IsOnBridge() => High; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/GameObject.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | using TSMapEditor.GameMath; 3 | 4 | namespace TSMapEditor.Models 5 | { 6 | public interface IMovable : IPositioned 7 | { 8 | RTTIType WhatAmI(); 9 | 10 | bool IsTechno(); 11 | } 12 | 13 | /// 14 | /// A base class for game objects. 15 | /// Represents ObjectClass in the original game's class hierarchy. 16 | /// 17 | public abstract class GameObject : AbstractObject, IMovable 18 | { 19 | public virtual Point2D Position { get; set; } 20 | 21 | public ulong LastRefreshIndex; 22 | 23 | public abstract GameObjectType GetObjectType(); 24 | 25 | public virtual int GetYDrawOffset() 26 | { 27 | return 0; 28 | } 29 | 30 | public virtual int GetXDrawOffset() 31 | { 32 | return 0; 33 | } 34 | 35 | public virtual int GetFrameIndex(int frameCount) 36 | { 37 | return 0; 38 | } 39 | 40 | public virtual int GetShadowFrameIndex(int frameCount) 41 | { 42 | return frameCount / 2; 43 | } 44 | 45 | public override int GetHashCode() 46 | { 47 | return (int)WhatAmI() * 10000000 + Position.Y * 512 + Position.X; 48 | } 49 | 50 | public virtual bool Remapable() => false; 51 | 52 | public virtual bool IsInvisibleInGame() => false; 53 | 54 | public virtual bool HasShadow() => false; 55 | 56 | public virtual bool IsOnBridge() => false; 57 | 58 | public virtual Color GetRemapColor() => Color.White; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/GlobalVariable.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class GlobalVariable 4 | { 5 | public GlobalVariable(int index, string name) 6 | { 7 | Index = index; 8 | Name = name; 9 | } 10 | 11 | public int Index { get; } 12 | public string Name { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/IHintable.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public interface IHintable 4 | { 5 | string GetHeaderText(); 6 | string GetHintText(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/IIDContainer.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public interface IIDContainer 4 | { 5 | string GetInternalID(); 6 | void SetInternalID(string internalID); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/INIDefined.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public interface INIDefined 4 | { 5 | string ININame { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/IPositioned.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | public interface IPositioned 6 | { 7 | Point2D Position { get; set; } 8 | 9 | bool IsOnBridge(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Infantry.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class Infantry : Foot 4 | { 5 | public Infantry(InfantryType objectType) : base(objectType) 6 | { 7 | } 8 | 9 | // [Infantry] 10 | // INDEX=OWNER,ID,HEALTH,X,Y,SUB_CELL,MISSION,FACING,TAG,VETERANCY,GROUP,HIGH,AUTOCREATE_NO_RECRUITABLE,AUTOCREATE_YES_RECRUITABLE 11 | 12 | public override RTTIType WhatAmI() => RTTIType.Infantry; 13 | 14 | public SubCell SubCell { get; set; } 15 | 16 | public override int GetFrameIndex(int frameCount) 17 | { 18 | if (ObjectType.ArtConfig.Sequence == null) 19 | return 0; 20 | 21 | var readySequence = ObjectType.ArtConfig.Sequence.Ready; 22 | 23 | // Infantry have their facing frames reversed 24 | return readySequence.StartFrame + (((255 - Facing) / 32) * readySequence.FacingMultiplier * readySequence.FrameCount); 25 | } 26 | 27 | public override int GetShadowFrameIndex(int frameCount) 28 | { 29 | return GetFrameIndex(frameCount) + (frameCount / 2); 30 | } 31 | 32 | public override bool HasShadow() => !ObjectType.NoShadow; 33 | 34 | public override bool Remapable() => ObjectType.ArtConfig.Remapable; 35 | 36 | public override int GetHashCode() 37 | { 38 | return ((int)WhatAmI() * 10000000) + (Position.Y * 512) + (Position.X * 10) + (int)SubCell; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/InfantryType.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models.ArtConfig; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | public class InfantryType : TechnoType, IArtConfigContainer 6 | { 7 | public InfantryType(string iniName) : base(iniName) 8 | { 9 | } 10 | 11 | public InfantryArtConfig ArtConfig { get; } = new InfantryArtConfig(); 12 | public IArtConfig GetArtConfig() => ArtConfig; 13 | 14 | public override RTTIType WhatAmI() => RTTIType.InfantryType; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/LocalVariable.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class LocalVariable 4 | { 5 | public LocalVariable(int index) 6 | { 7 | Index = index; 8 | } 9 | 10 | public int Index { get; } 11 | public string Name { get; set; } 12 | public int InitialState { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/MapFormat/IsoMapPack5Tile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TSMapEditor.Models.MapFormat 4 | { 5 | /// 6 | /// Low-level cell class. 7 | /// 8 | public class IsoMapPack5Tile 9 | { 10 | public const int Size = 11; 11 | 12 | public IsoMapPack5Tile() { } 13 | 14 | public IsoMapPack5Tile(byte[] data) 15 | { 16 | X = BitConverter.ToInt16(data, 0); 17 | Y = BitConverter.ToInt16(data, 2); 18 | TileIndex = BitConverter.ToInt32(data, 4); 19 | SubTileIndex = data[8]; 20 | Level = data[9]; 21 | IceGrowth = data[10]; 22 | } 23 | 24 | public short X { get; set; } 25 | public short Y { get; set; } 26 | public int TileIndex { get; set; } 27 | public byte SubTileIndex { get; set; } 28 | public byte Level { get; set; } 29 | public byte IceGrowth { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/MapFormat/MemoryFile.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace CNCMaps.FileFormats.VirtualFileSystem 4 | { 5 | 6 | /// Virtual file from a memory buffer. 7 | public class MemoryFile : VirtualFile 8 | { 9 | 10 | public MemoryFile(byte[] buffer, bool isBuffered = true) : 11 | base(new MemoryStream(buffer), "MemoryFile", 0, buffer.Length, isBuffered) 12 | { } 13 | } 14 | } -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Mission.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class Mission 4 | { 5 | public string Name { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Overlay.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models.Enums; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | public class Overlay : GameObject 6 | { 7 | public override GameObjectType GetObjectType() => OverlayType; 8 | 9 | public override RTTIType WhatAmI() => RTTIType.Overlay; 10 | 11 | public OverlayType OverlayType { get; set; } 12 | public int FrameIndex { get; set; } 13 | 14 | 15 | public override int GetFrameIndex(int frameCount) 16 | { 17 | return FrameIndex; 18 | } 19 | 20 | public override int GetShadowFrameIndex(int frameCount) 21 | { 22 | return frameCount / 2 + FrameIndex; 23 | } 24 | 25 | public override bool HasShadow() => true; 26 | 27 | public override bool IsInvisibleInGame() => OverlayType.InvisibleInGame; 28 | 29 | public override int GetYDrawOffset() 30 | { 31 | // Vanilla draws Veinhole monsters separately, not as overlays, and with an offset I can't make sense of. 32 | if (OverlayType.IsVeinholeMonster) 33 | return Constants.IsRA2YR ? -58 : -49; 34 | 35 | int offset = 0; 36 | 37 | // These are hardcoded and the same between TS and YR, so seemingly unrelated to the cell size. 38 | if (OverlayType.Tiberium || OverlayType.Wall || OverlayType.IsVeins || OverlayType.Crate) 39 | offset -= 12; 40 | 41 | if (OverlayType.Land == LandType.Railroad) 42 | offset -= 1; 43 | 44 | if (OverlayType.IsVeins) 45 | offset -= 1; 46 | 47 | return offset; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/OverlayType.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models.ArtConfig; 2 | using TSMapEditor.Models.Enums; 3 | 4 | namespace TSMapEditor.Models 5 | { 6 | public class OverlayType : GameObjectType, IArtConfigContainer 7 | { 8 | public OverlayType(string iniName) : base(iniName) 9 | { 10 | } 11 | 12 | public override RTTIType WhatAmI() => RTTIType.OverlayType; 13 | 14 | // We might not need all of these properties at least immediately, 15 | // but I listed them all for possible future convenience 16 | 17 | public LandType Land { get; set; } 18 | public string Image { get; set; } 19 | public OverlayArtConfig ArtConfig { get; } = new OverlayArtConfig(); 20 | public IArtConfig GetArtConfig() => ArtConfig; 21 | public bool Crate { get; set; } 22 | public bool WaterBound { get; set; } 23 | public bool Wall { get; set; } 24 | public bool RadarInvisible { get; set; } 25 | public bool Crushable { get; set; } 26 | public bool DrawFlat { get; set; } = true; 27 | public bool NoUseTileLandType { get; set; } 28 | public bool IsARock { get; set; } 29 | public bool Tiberium { get; set; } 30 | public bool IsVeins { get; set; } 31 | public bool IsVeinholeMonster { get; set; } 32 | public TiberiumType TiberiumType { get; set; } 33 | 34 | [INI(false)] 35 | public BridgeDirection HighBridgeDirection { get; set; } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/ParticleSystemType.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | public class ParticleSystemType : AbstractObject, INIDefined 6 | { 7 | public ParticleSystemType(string iniName) 8 | { 9 | ININame = iniName; 10 | } 11 | 12 | [INI(false)] 13 | public string ININame { get; } 14 | 15 | [INI(false)] 16 | public int Index { get; set; } 17 | 18 | public string GetDisplayString() => $"{Index.ToString(CultureInfo.InvariantCulture)} {GetDisplayStringWithoutIndex()}"; 19 | 20 | public string GetDisplayStringWithoutIndex() => ININame; 21 | 22 | public override RTTIType WhatAmI() => RTTIType.ParticleSystemType; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Smudge.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class Smudge : GameObject 4 | { 5 | public override RTTIType WhatAmI() => RTTIType.Smudge; 6 | 7 | public override GameObjectType GetObjectType() => SmudgeType; 8 | 9 | public SmudgeType SmudgeType { get; set; } 10 | 11 | public override int GetYDrawOffset() 12 | { 13 | return Constants.CellSizeY / -2; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/SmudgeType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class SmudgeType : GameObjectType 4 | { 5 | public SmudgeType(string iniName) : base(iniName) 6 | { 7 | } 8 | 9 | public override RTTIType WhatAmI() => RTTIType.Smudge; 10 | 11 | 12 | /// 13 | /// Defined in Art.ini. If set to true, 14 | /// the art for this smudge type is theater-specific; 15 | /// if false, the art is a generic .SHP used for every theater. 16 | /// 17 | public bool Theater { get; set; } 18 | 19 | public int Width { get; set; } = 1; 20 | public int Height { get; set; } = 1; 21 | 22 | public bool Crater { get; set; } 23 | public bool Burn { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Sounds.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.Immutable; 3 | using TSMapEditor.Extensions; 4 | using TSMapEditor.Misc; 5 | 6 | namespace TSMapEditor.Models 7 | { 8 | public class Sound 9 | { 10 | public Sound(int index, string name) 11 | { 12 | Index = index; 13 | Name = name; 14 | } 15 | 16 | public override string ToString() 17 | { 18 | return $"{Index} {Name}"; 19 | } 20 | 21 | public int Index { get; } 22 | public string Name { get; } 23 | } 24 | 25 | public class Sounds 26 | { 27 | public Sounds(IniFileEx soundIni) 28 | { 29 | Initialize(soundIni); 30 | } 31 | 32 | public ImmutableList List { get; private set; } 33 | 34 | public Sound Get(int index) 35 | { 36 | return List.GetElementIfInRange(index); 37 | } 38 | 39 | public Sound Get(string name) 40 | { 41 | return List.Find(sound => sound.Name == name); 42 | } 43 | 44 | private void Initialize(IniFileEx evaIni) 45 | { 46 | var sounds = new List(); 47 | 48 | const string speechSectionName = "SoundList"; 49 | 50 | evaIni.DoForEveryValueInSection(speechSectionName, name => 51 | { 52 | if (string.IsNullOrEmpty(name)) 53 | return; 54 | 55 | sounds.Add(new Sound(sounds.Count, name)); 56 | }); 57 | 58 | List = ImmutableList.Create(sounds.ToArray()); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /src/TSMapEditor/Models/StringTable.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using TSMapEditor.CCEngine; 3 | 4 | namespace TSMapEditor.Models 5 | { 6 | public class StringTable 7 | { 8 | /// 9 | /// Map of all CSF label/string pairs that have been parsed. 10 | /// 11 | private Dictionary map = new(); 12 | 13 | public StringTable(List csfFiles) 14 | { 15 | foreach (var csfFile in csfFiles) 16 | { 17 | foreach (var csfString in csfFile.Strings) 18 | map[csfString.ID] = csfString; 19 | } 20 | } 21 | 22 | public IEnumerable GetStringEnumerator() 23 | { 24 | return map.Values; 25 | } 26 | 27 | public string LookUpValue(string label) 28 | { 29 | return map.TryGetValue(label, out var result) ? result.Value : null; 30 | } 31 | 32 | public CsfString LookUpString(string label) 33 | { 34 | return map.TryGetValue(label, out var result) ? result : null; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/SubCell.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public enum SubCell 4 | { 5 | None = -1, 6 | Center = 0, 7 | Top = 1, 8 | Right = 2, 9 | Left = 3, 10 | Bottom = 4, 11 | Count 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/SuperWeaponType.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | public class SuperWeaponType : AbstractObject, INIDefined 6 | { 7 | public SuperWeaponType(string iniName) 8 | { 9 | ININame = iniName; 10 | } 11 | 12 | [INI(false)] 13 | public string ININame { get; } 14 | 15 | [INI(false)] 16 | public int Index { get; set; } 17 | 18 | public string Name { get; set; } 19 | 20 | public string GetDisplayString() => $"{Index.ToString(CultureInfo.InvariantCulture)} {GetDisplayStringWithoutIndex()}"; 21 | 22 | public string GetDisplayStringWithoutIndex() => $"{Name} ({ININame})"; 23 | 24 | public override RTTIType WhatAmI() => RTTIType.SuperWeaponType; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Tag.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | /// 6 | /// A trigger tag. Tags are responsible for activating map triggers. 7 | /// 8 | public class Tag : IIDContainer 9 | { 10 | public const int REPEAT_TYPE_MAX = 2; 11 | 12 | public string GetInternalID() => ID; 13 | public void SetInternalID(string id) => ID = id; 14 | 15 | public string ID { get; set; } 16 | public int Repeating { get; set; } 17 | public string Name { get; set; } 18 | public Trigger Trigger { get; set; } 19 | 20 | public void WriteToIniSection(IniSection iniSection) 21 | { 22 | iniSection.SetStringValue(ID, $"{Repeating},{Name},{Trigger.ID}"); 23 | } 24 | 25 | public string GetDisplayString() => Name + " (" + ID + ")"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/TeamTypeFlag.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class TeamTypeFlag 4 | { 5 | public TeamTypeFlag(string name, bool defaultValue) 6 | { 7 | Name = name; 8 | DefaultValue = defaultValue; 9 | } 10 | 11 | public string Name { get; } 12 | public bool DefaultValue { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/TechnoType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | public abstract class TechnoType : GameObjectType 6 | { 7 | public TechnoType(string iniName) : base(iniName) 8 | { 9 | } 10 | 11 | public string Image { get; set; } 12 | public string Owner { get; set; } 13 | public bool NoShadow { get; set; } 14 | 15 | public int Cost { get; set; } 16 | 17 | public Weapon Primary { get; set; } 18 | public Weapon Secondary { get; set; } 19 | public Weapon ElitePrimary { get; set; } 20 | public Weapon EliteSecondary { get; set; } 21 | public int WeaponCount { get; set; } 22 | 23 | public double GuardRange { get; set; } 24 | 25 | public bool GapGenerator { get; set; } 26 | public int GapRadiusInCells { get; set; } 27 | 28 | public double GetWeaponRange() 29 | { 30 | double primaryRange = Primary?.Range ?? 0.0; 31 | double secondaryRange = Secondary?.Range ?? 0.0; 32 | 33 | return Math.Max(primaryRange, secondaryRange); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/TerrainObject.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | 3 | namespace TSMapEditor.Models 4 | { 5 | /// 6 | /// A terrain object. For example, a tree. 7 | /// 8 | public class TerrainObject : GameObject 9 | { 10 | public TerrainObject(TerrainType terrainType) 11 | { 12 | TerrainType = terrainType; 13 | } 14 | 15 | public TerrainObject(TerrainType terrainType, Point2D position) : this(terrainType) 16 | { 17 | Position = position; 18 | } 19 | 20 | public override GameObjectType GetObjectType() => TerrainType; 21 | 22 | public override RTTIType WhatAmI() => RTTIType.Terrain; 23 | 24 | public TerrainType TerrainType { get; private set; } 25 | 26 | public override bool IsInvisibleInGame() => TerrainType.InvisibleInGame; 27 | 28 | public override int GetYDrawOffset() 29 | { 30 | if (TerrainType.SpawnsTiberium) 31 | return Constants.CellSizeY / -2; 32 | 33 | return TerrainType.YDrawFudge; 34 | } 35 | 36 | public override bool HasShadow() => true; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/TerrainType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using TSMapEditor.GameMath; 3 | using TSMapEditor.Models.Enums; 4 | 5 | namespace TSMapEditor.Models 6 | { 7 | public class TerrainType : GameObjectType 8 | { 9 | public TerrainType(string iniName) : base(iniName) 10 | { 11 | } 12 | 13 | public override RTTIType WhatAmI() => RTTIType.TerrainType; 14 | 15 | public TerrainOccupation TemperateOccupationBits { get; set; } 16 | public TerrainOccupation SnowOccupationBits { get; set; } 17 | 18 | /// 19 | /// If set, this terrain type should be drawn 12 pixels above the 20 | /// usual drawing point and it should use the unit palette instead 21 | /// of the terrain palette. 22 | /// 23 | public bool SpawnsTiberium { get; set; } 24 | 25 | public int YDrawFudge { get; set; } 26 | 27 | /// 28 | /// Defined in Art.ini. If set to true, 29 | /// the art for this terrain type is theater-specific; 30 | /// if false, the art is a generic .SHP used for every theater. 31 | /// 32 | public bool Theater { get; set; } 33 | 34 | public string Image { get; set; } 35 | 36 | /// 37 | /// Impassable cell data for automatically placing impassable overlay 38 | /// under terrain objects. 39 | /// 40 | public List ImpassableCells { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/TiberiumType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Microsoft.Xna.Framework; 3 | 4 | namespace TSMapEditor.Models 5 | { 6 | public class TiberiumType : INIDefineable, INIDefined 7 | { 8 | public TiberiumType(string iniName) 9 | { 10 | ININame = iniName; 11 | } 12 | 13 | public string ININame { get; } 14 | public int Index { get; set; } 15 | public string Name { get; set; } 16 | public int Value { get; set; } 17 | public int Power { get; set; } 18 | public int Image { get; set; } 19 | public int Growth { get; set; } 20 | public double GrowthPercentage { get; set; } 21 | public int Spread { get; set; } 22 | public int SpreadPercentage { get; set; } 23 | public string Color { get; set; } = string.Empty; 24 | 25 | [INI(false)] 26 | public Color XNAColor { get; set; } 27 | 28 | [INI(false)] 29 | public List Overlays { get; set; } = new List(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/TSMapEditor/Models/Weapon.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Models 2 | { 3 | public class Weapon : INIDefineable, INIDefined 4 | { 5 | public Weapon(string iniName) 6 | { 7 | ININame = iniName; 8 | } 9 | 10 | public string ININame { get; } 11 | 12 | public int Index { get; set; } 13 | 14 | public double Range { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/ChangeAttachedTagMutation.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models; 2 | using TSMapEditor.UI; 3 | 4 | namespace TSMapEditor.Mutations.Classes 5 | { 6 | /// 7 | /// A mutation that allows changing a Techno's 8 | /// (building/vehicle/infantry/aircraft) attached trigger tag. 9 | /// 10 | public class ChangeAttachedTagMutation : Mutation 11 | { 12 | public ChangeAttachedTagMutation(IMutationTarget mutationTarget, TechnoBase techno, Tag tag) : base(mutationTarget) 13 | { 14 | this.techno = techno; 15 | this.tag = tag; 16 | } 17 | 18 | private readonly TechnoBase techno; 19 | private readonly Tag tag; 20 | 21 | private Tag oldAttachedTag; 22 | 23 | public override string GetDisplayString() 24 | { 25 | return $"Change attached tag of '{techno.GetObjectType().GetEditorDisplayName()}' at {techno.Position} to '{tag.Name}'"; 26 | } 27 | 28 | public override void Perform() 29 | { 30 | oldAttachedTag = techno.AttachedTag; 31 | techno.AttachedTag = tag; 32 | } 33 | 34 | public override void Undo() 35 | { 36 | techno.AttachedTag = oldAttachedTag; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/ChangeTechnoOwnerMutation.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models; 2 | using TSMapEditor.UI; 3 | 4 | namespace TSMapEditor.Mutations.Classes 5 | { 6 | /// 7 | /// A mutation that changes the owner of an object. 8 | /// 9 | public class ChangeTechnoOwnerMutation : Mutation 10 | { 11 | public ChangeTechnoOwnerMutation(TechnoBase techno, House newOwner, IMutationTarget mutationTarget) : base(mutationTarget) 12 | { 13 | this.techno = techno; 14 | this.oldOwner = techno.Owner; 15 | this.newOwner = newOwner; 16 | } 17 | 18 | private readonly TechnoBase techno; 19 | private readonly House oldOwner; 20 | private readonly House newOwner; 21 | 22 | public override string GetDisplayString() 23 | { 24 | return $"Change owner of {techno.GetObjectType().GetEditorDisplayName()} at {techno.Position} to {newOwner.ININame}"; 25 | } 26 | 27 | public override void Perform() 28 | { 29 | techno.Owner = newOwner; 30 | MutationTarget.AddRefreshPoint(techno.Position); 31 | } 32 | 33 | public override void Undo() 34 | { 35 | techno.Owner = oldOwner; 36 | MutationTarget.AddRefreshPoint(techno.Position); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/HeightMutations/AlterGroundElevationUndoData.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | 3 | namespace TSMapEditor.Mutations.Classes.HeightMutations 4 | { 5 | /// 6 | /// Struct for the undo data of mutations based on this class. 7 | /// 8 | public struct AlterGroundElevationUndoData 9 | { 10 | public Point2D CellCoords; 11 | public int TileIndex; 12 | public int SubTileIndex; 13 | public int HeightLevel; 14 | 15 | public AlterGroundElevationUndoData(Point2D cellCoords, int tileIndex, int subTileIndex, int heightLevel) 16 | { 17 | CellCoords = cellCoords; 18 | TileIndex = tileIndex; 19 | SubTileIndex = subTileIndex; 20 | HeightLevel = heightLevel; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/HeightMutations/HeightComparisonType.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Mutations.Classes.HeightMutations 2 | { 3 | /// 4 | /// Defines what kind of comparison to use when comparing the height of a cell 5 | /// to the height of another cell. 6 | /// 7 | public enum HeightComparisonType 8 | { 9 | /// 10 | /// The height of the other cell is irrelevant for the resulting ramp type. 11 | /// 12 | Irrelevant, 13 | 14 | /// 15 | /// The other cell must be higher by 1 level. 16 | /// 17 | Higher, 18 | 19 | /// 20 | /// The other cell must be higher by 2 or more levels. 21 | /// 22 | MuchHigher, 23 | 24 | /// 25 | /// The other cell must be higher (by 1 level) or equal. 26 | /// 27 | HigherOrEqual, 28 | 29 | /// 30 | /// The other cell must be lower by 1 level. 31 | /// 32 | Lower, 33 | 34 | /// 35 | /// The other cell must be lower by 2 or more levels. 36 | /// 37 | MuchLower, 38 | 39 | /// 40 | /// The other cell must be lower or equal. 41 | /// 42 | LowerOrEqual, 43 | 44 | /// 45 | /// The other cell must be equal. 46 | /// 47 | Equal 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/OriginalCellTerrainData.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | 3 | namespace TSMapEditor.Mutations.Classes 4 | { 5 | struct OriginalCellTerrainData 6 | { 7 | public Point2D CellCoords; 8 | public int TileIndex; 9 | public byte SubTileIndex; 10 | public byte HeightLevel; 11 | 12 | public OriginalCellTerrainData(Point2D cellCoords, int tileIndex, byte subTileIndex, byte heightLevel) 13 | { 14 | CellCoords = cellCoords; 15 | TileIndex = tileIndex; 16 | SubTileIndex = subTileIndex; 17 | HeightLevel = heightLevel; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/OriginalOverlayInfo.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | 3 | namespace TSMapEditor.Mutations.Classes 4 | { 5 | /// 6 | /// Struct for un-do data of mutations that change overlay of cells. 7 | /// 8 | struct OriginalOverlayInfo 9 | { 10 | public int OverlayTypeIndex; 11 | public int FrameIndex; 12 | public Point2D CellCoords; 13 | 14 | public OriginalOverlayInfo(int overlayTypeIndex, int frameIndex, Point2D cellCoords) 15 | { 16 | OverlayTypeIndex = overlayTypeIndex; 17 | FrameIndex = frameIndex; 18 | CellCoords = cellCoords; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/OriginalSmudgeInfo.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | 3 | namespace TSMapEditor.Mutations.Classes 4 | { 5 | /// 6 | /// Struct for un-do data of mutations that change smudges of cells. 7 | /// 8 | struct OriginalSmudgeInfo 9 | { 10 | public int SmudgeTypeIndex; 11 | public Point2D CellCoords; 12 | 13 | public OriginalSmudgeInfo(int smudgeTypeIndex, Point2D cellCoords) 14 | { 15 | SmudgeTypeIndex = smudgeTypeIndex; 16 | CellCoords = cellCoords; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/OriginalTerrainData.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | 3 | namespace TSMapEditor.Mutations.Classes 4 | { 5 | public struct OriginalTerrainData 6 | { 7 | public OriginalTerrainData(int tileIndex, byte subTileIndex, byte level, Point2D cellCoords) 8 | { 9 | TileIndex = tileIndex; 10 | SubTileIndex = subTileIndex; 11 | Level = level; 12 | CellCoords = cellCoords; 13 | } 14 | 15 | public int TileIndex; 16 | public byte SubTileIndex; 17 | public byte Level; 18 | public Point2D CellCoords; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/PlaceCellTagMutation.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Models; 3 | using TSMapEditor.UI; 4 | 5 | namespace TSMapEditor.Mutations.Classes 6 | { 7 | /// 8 | /// A mutation that allows placing a CellTag on the map. 9 | /// 10 | public class PlaceCellTagMutation : Mutation 11 | { 12 | public PlaceCellTagMutation(IMutationTarget mutationTarget, Point2D cellCoords, Tag tag) : base(mutationTarget) 13 | { 14 | this.cellCoords = cellCoords; 15 | this.tag = tag; 16 | } 17 | 18 | private readonly Point2D cellCoords; 19 | private readonly Tag tag; 20 | 21 | public override string GetDisplayString() 22 | { 23 | return $"Place CellTag for '{tag.Name}' at {cellCoords}"; 24 | } 25 | 26 | public override void Perform() 27 | { 28 | MutationTarget.Map.AddCellTag(new CellTag(cellCoords, tag)); 29 | MutationTarget.AddRefreshPoint(cellCoords, 1); 30 | } 31 | 32 | public override void Undo() 33 | { 34 | MutationTarget.Map.RemoveCellTagFrom(cellCoords); 35 | MutationTarget.AddRefreshPoint(cellCoords, 1); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/PlaceTerrainObjectMutation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TSMapEditor.GameMath; 3 | using TSMapEditor.Models; 4 | using TSMapEditor.UI; 5 | 6 | namespace TSMapEditor.Mutations.Classes 7 | { 8 | /// 9 | /// A mutation that allows placing terrain objects on the map. 10 | /// 11 | public class PlaceTerrainObjectMutation : Mutation 12 | { 13 | public PlaceTerrainObjectMutation(IMutationTarget mutationTarget, TerrainType terrainType, Point2D cellCoords) : base(mutationTarget) 14 | { 15 | this.terrainType = terrainType; 16 | this.cellCoords = cellCoords; 17 | } 18 | 19 | private readonly TerrainType terrainType; 20 | private readonly Point2D cellCoords; 21 | 22 | public override string GetDisplayString() 23 | { 24 | return $"Place terrain object '{terrainType.GetEditorDisplayName()}' at {cellCoords}"; 25 | } 26 | 27 | public override void Perform() 28 | { 29 | var tile = MutationTarget.Map.GetTile(cellCoords); 30 | if (tile.TerrainObject != null) 31 | throw new InvalidOperationException("Cannot place a terrain object on a tile that already has a terrain object!"); 32 | 33 | var terrainObject = new TerrainObject(terrainType, cellCoords); 34 | MutationTarget.Map.AddTerrainObject(terrainObject); 35 | MutationTarget.InvalidateMap(); 36 | } 37 | 38 | public override void Undo() 39 | { 40 | MutationTarget.Map.RemoveTerrainObject(cellCoords); 41 | MutationTarget.InvalidateMap(); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/PlaceTubeMutation.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models; 2 | using TSMapEditor.Rendering; 3 | using TSMapEditor.UI; 4 | 5 | namespace TSMapEditor.Mutations.Classes 6 | { 7 | public class PlaceTubeMutation : Mutation 8 | { 9 | public PlaceTubeMutation(IMutationTarget mutationTarget, Tube tube) : base(mutationTarget) 10 | { 11 | this.tube = tube; 12 | } 13 | 14 | private readonly Tube tube; 15 | 16 | public override string GetDisplayString() 17 | { 18 | return $"Place tunnel tube of length {tube.Directions.Count} at {tube.EntryPoint}"; 19 | } 20 | 21 | public override void Perform() 22 | { 23 | MutationTarget.Map.Tubes.Add(tube); 24 | TubeRefreshHelper.MapViewRefreshTube(tube, MutationTarget); 25 | } 26 | 27 | public override void Undo() 28 | { 29 | MutationTarget.Map.Tubes.Remove(tube); 30 | TubeRefreshHelper.MapViewRefreshTube(tube, MutationTarget); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/PlaceVehicleMutation.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Models; 3 | using TSMapEditor.UI; 4 | 5 | namespace TSMapEditor.Mutations.Classes 6 | { 7 | /// 8 | /// A mutation that allows placing a vehicle on the map. 9 | /// 10 | public class PlaceVehicleMutation : Mutation 11 | { 12 | public PlaceVehicleMutation(IMutationTarget mutationTarget, UnitType unitType, Point2D cellCoords) : base(mutationTarget) 13 | { 14 | this.unitType = unitType; 15 | this.cellCoords = cellCoords; 16 | } 17 | 18 | private readonly UnitType unitType; 19 | private readonly Point2D cellCoords; 20 | private Unit unit; 21 | 22 | public override string GetDisplayString() 23 | { 24 | return $"Place '{unitType.GetEditorDisplayName()}' at {cellCoords}"; 25 | } 26 | 27 | public override void Perform() 28 | { 29 | var cell = MutationTarget.Map.GetTileOrFail(cellCoords); 30 | 31 | unit = new Unit(unitType); 32 | unit.Owner = MutationTarget.ObjectOwner; 33 | unit.Position = cellCoords; 34 | MutationTarget.Map.PlaceUnit(unit); 35 | MutationTarget.AddRefreshPoint(cellCoords); 36 | } 37 | 38 | public override void Undo() 39 | { 40 | var cell = MutationTarget.Map.GetTile(cellCoords); 41 | MutationTarget.Map.RemoveUnit(unit); 42 | MutationTarget.AddRefreshPoint(cellCoords); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/PlaceWaypointMutation.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Models; 3 | using TSMapEditor.UI; 4 | 5 | namespace TSMapEditor.Mutations.Classes 6 | { 7 | /// 8 | /// A mutation that allows placing a waypoint on the map. 9 | /// 10 | public class PlaceWaypointMutation : Mutation 11 | { 12 | public PlaceWaypointMutation(IMutationTarget mutationTarget, Point2D cellCoords, int waypointNumber, string waypointColor = null) : base(mutationTarget) 13 | { 14 | this.cellCoords = cellCoords; 15 | this.waypointNumber = waypointNumber; 16 | this.waypointColor = waypointColor; 17 | } 18 | 19 | private readonly Point2D cellCoords; 20 | private readonly int waypointNumber; 21 | private readonly string waypointColor; 22 | private Waypoint waypoint; 23 | 24 | public override string GetDisplayString() 25 | { 26 | return $"Place waypoint {waypointNumber} at {cellCoords}"; 27 | } 28 | 29 | public override void Perform() 30 | { 31 | waypoint = new Waypoint() { Identifier = waypointNumber, Position = cellCoords }; 32 | waypoint.EditorColor = waypointColor; 33 | MutationTarget.Map.AddWaypoint(waypoint); 34 | MutationTarget.AddRefreshPoint(cellCoords, 1); 35 | } 36 | 37 | public override void Undo() 38 | { 39 | MutationTarget.Map.RemoveWaypoint(waypoint); 40 | MutationTarget.AddRefreshPoint(cellCoords, 1); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/TSMapEditor/Mutations/Classes/SetFollowerMutation.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models; 2 | using TSMapEditor.UI; 3 | 4 | namespace TSMapEditor.Mutations.Classes 5 | { 6 | public class SetFollowerMutation : Mutation 7 | { 8 | public SetFollowerMutation(IMutationTarget mutationTarget, Unit followedUnit, Unit followerUnit) : base(mutationTarget) 9 | { 10 | this.followedUnit = followedUnit; 11 | this.followerUnit = followerUnit; 12 | } 13 | 14 | private Unit followedUnit; 15 | private Unit followerUnit; 16 | private Unit oldFollowerUnit; 17 | 18 | public override string GetDisplayString() 19 | { 20 | return $"Set follower of vehicle {followedUnit.ObjectType.GetEditorDisplayName()} at {followedUnit.Position} " + 21 | $"to {followerUnit.ObjectType.GetEditorDisplayName()} at {followerUnit.Position}"; 22 | } 23 | 24 | public override void Perform() 25 | { 26 | oldFollowerUnit = followedUnit.FollowerUnit; 27 | followedUnit.FollowerUnit = followerUnit; 28 | } 29 | 30 | public override void Undo() 31 | { 32 | followedUnit.FollowerUnit = oldFollowerUnit; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/TSMapEditor/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace TSMapEditor 5 | { 6 | public static class NativeMethods 7 | { 8 | [DllImport("gdi32.dll")] 9 | private static extern int GetDeviceCaps(IntPtr hdc, int nIndex); 10 | 11 | [DllImport("user32.dll")] 12 | private static extern IntPtr GetDC(IntPtr hWnd); 13 | 14 | /// 15 | /// Logical pixels inch in X 16 | /// 17 | private const int LOGPIXELSX = 88; 18 | 19 | /// 20 | /// Logical pixels inch in Y 21 | /// 22 | private const int LOGPIXELSY = 90; 23 | 24 | 25 | [DllImport("kernel32.dll", SetLastError = true)] 26 | [return: MarshalAs(UnmanagedType.Bool)] 27 | private static extern bool AllocConsole(); 28 | 29 | [DllImport("kernel32.dll", SetLastError = true)] 30 | [return: MarshalAs(UnmanagedType.Bool)] 31 | private static extern bool FreeConsole(); 32 | 33 | 34 | public static int GetScreenDPI() 35 | { 36 | // This function currently only works on Windows 37 | IntPtr hdc = GetDC(IntPtr.Zero); 38 | return GetDeviceCaps(hdc, LOGPIXELSX); 39 | } 40 | 41 | public static void CreateConsole() 42 | { 43 | AllocConsole(); 44 | } 45 | 46 | public static void DisableConsole() 47 | { 48 | FreeConsole(); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/TSMapEditor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | using System.Runtime.Versioning; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("World-Altering Editor (WAE)")] 9 | [assembly: AssemblyDescription("Map editor for DTA, Tiberian Sun and Red Alert 2")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Rampastring")] 12 | [assembly: AssemblyProduct("World-Altering Editor (WAE)")] 13 | [assembly: AssemblyCopyright("Copyright © Rami 'Rampastring' Pasanen 2021-2025")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7f1101de-6849-404c-9141-0df6a6bf12e7")] 24 | 25 | [assembly: SupportedOSPlatform("windows10.0.14393.0")] 26 | 27 | // Version information for an assembly consists of the following four values: 28 | // 29 | // Major Version 30 | // Minor Version 31 | // Build Number 32 | // Revision 33 | // 34 | // You can specify all the values or you can default the Build and Revision Numbers 35 | // by using the '*' as shown below: 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | [assembly: AssemblyVersion("1.5.*")] 38 | -------------------------------------------------------------------------------- /src/TSMapEditor/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TSMapEditor.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/TSMapEditor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/AlphaImageRenderStruct.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Models; 3 | 4 | namespace TSMapEditor.Rendering 5 | { 6 | internal struct AlphaImageRenderStruct 7 | { 8 | public Point2D Point; 9 | public ShapeImage AlphaImage; 10 | public GameObject OwnerObject; 11 | 12 | public AlphaImageRenderStruct(Point2D point, ShapeImage alphaImage, GameObject ownerObject) 13 | { 14 | Point = point; 15 | AlphaImage = alphaImage; 16 | OwnerObject = ownerObject; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/GraphicalBaseNode.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.Models; 2 | 3 | namespace TSMapEditor.Rendering 4 | { 5 | public class GraphicalBaseNode 6 | { 7 | public GraphicalBaseNode(BaseNode baseNode, BuildingType buildingType, House owner) 8 | { 9 | BaseNode = baseNode; 10 | BuildingType = buildingType; 11 | Owner = owner; 12 | } 13 | 14 | public BaseNode BaseNode { get; } 15 | public BuildingType BuildingType { get; set; } 16 | // public Structure Structure { get; set; } 17 | public House Owner { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/MegamapRenderOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TSMapEditor.Rendering 4 | { 5 | [Flags] 6 | public enum MegamapRenderOptions 7 | { 8 | None = 0, 9 | IncludeOnlyVisibleArea = 1, 10 | EmphasizeResources = 2, 11 | MarkPlayerSpots = 4, 12 | All = IncludeOnlyVisibleArea + EmphasizeResources + MarkPlayerSpots, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/ObjectRenderers/AircraftRenderer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | using TSMapEditor.CCEngine; 3 | using TSMapEditor.GameMath; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.Rendering.ObjectRenderers 7 | { 8 | internal class AircraftRenderer : ObjectRenderer 9 | { 10 | public AircraftRenderer(RenderDependencies renderDependencies) : base(renderDependencies) 11 | { 12 | } 13 | 14 | protected override Color ReplacementColor => Color.HotPink; 15 | 16 | protected override CommonDrawParams GetDrawParams(Aircraft gameObject) 17 | { 18 | return new CommonDrawParams() 19 | { 20 | IniName = gameObject.ObjectType.ININame, 21 | MainVoxel = TheaterGraphics.AircraftModels[gameObject.ObjectType.Index] 22 | }; 23 | } 24 | 25 | protected override float GetDepthAddition(Aircraft gameObject) 26 | { 27 | return Constants.DepthEpsilon * ObjectDepthAdjustments.Aircraft; 28 | } 29 | 30 | protected override double GetExtraLight(Aircraft gameObject) => Map.Rules.ExtraAircraftLight; 31 | 32 | protected override void Render(Aircraft gameObject, Point2D drawPoint, in CommonDrawParams drawParams) 33 | { 34 | DrawVoxelModel(gameObject, drawParams.MainVoxel, 35 | gameObject.Facing, RampType.None, Color.White, true, gameObject.GetRemapColor(), 36 | Constants.VoxelsAffectedByLighting, drawPoint, 0f, true); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/ObjectRenderers/CommonDrawParams.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Rendering.ObjectRenderers 2 | { 3 | public readonly ref struct CommonDrawParams 4 | { 5 | public string IniName { get; init; } 6 | public ShapeImage ShapeImage { get; init; } 7 | public VoxelModel MainVoxel { get; init; } 8 | public VoxelModel TurretVoxel { get; init; } 9 | public VoxelModel BarrelVoxel { get; init; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/ObjectRenderers/ObjectDepthAdjustments.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Rendering.ObjectRenderers 2 | { 3 | public static class ObjectDepthAdjustments 4 | { 5 | public const int Aircraft = 2; 6 | public const int Animation = 0; 7 | public const int Building = 2; 8 | public const int BuildingFoundationLines = 2; 9 | public const int Infantry = 2; 10 | public const int Overlay = 1; 11 | public const int Terrain = 2; 12 | public const int Vehicle = 1; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/ObjectRenderers/RenderDependencies.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework.Graphics; 2 | using System; 3 | using TSMapEditor.Models; 4 | 5 | namespace TSMapEditor.Rendering.ObjectRenderers 6 | { 7 | public struct RenderDependencies 8 | { 9 | public readonly Map Map; 10 | public readonly TheaterGraphics TheaterGraphics; 11 | public readonly EditorState EditorState; 12 | public readonly GraphicsDevice GraphicsDevice; 13 | public readonly ObjectSpriteRecord ObjectSpriteRecord; 14 | public readonly Effect PalettedColorDrawEffect; 15 | public readonly Camera Camera; 16 | public readonly Func GetCameraRightXCoord; 17 | public readonly Func GetCameraBottomYCoord; 18 | 19 | 20 | public RenderDependencies(Map map, 21 | TheaterGraphics theaterGraphics, 22 | EditorState editorState, 23 | GraphicsDevice graphicsDevice, 24 | ObjectSpriteRecord objectSpriteRecord, 25 | Effect palettedColorDrawEffect, 26 | Camera camera, 27 | Func getCameraRightXCoord, 28 | Func getCameraBottomYCoord) 29 | { 30 | Map = map; 31 | TheaterGraphics = theaterGraphics; 32 | EditorState = editorState; 33 | GraphicsDevice = graphicsDevice; 34 | ObjectSpriteRecord = objectSpriteRecord; 35 | PalettedColorDrawEffect = palettedColorDrawEffect; 36 | Camera = camera; 37 | GetCameraRightXCoord = getCameraRightXCoord; 38 | GetCameraBottomYCoord = getCameraBottomYCoord; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/RenderObjectFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TSMapEditor.Rendering 4 | { 5 | [Flags] 6 | public enum RenderObjectFlags 7 | { 8 | None = 0, 9 | Terrain = 1, 10 | Smudges = 2, 11 | Overlay = 4, 12 | Aircraft = 8, 13 | Infantry = 16, 14 | Vehicles = 32, 15 | Structures = 64, 16 | TerrainObjects = 128, 17 | CellTags = 256, 18 | Waypoints = 512, 19 | BaseNodes = 1024, 20 | AlphaLights = 2048, 21 | TunnelTubes = 4096, 22 | All = Terrain + Smudges + Overlay + Aircraft + Infantry + Vehicles + Structures + TerrainObjects + CellTags + Waypoints + BaseNodes + AlphaLights + TunnelTubes, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/RendererExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | using Rampastring.XNAUI; 3 | using System; 4 | 5 | namespace TSMapEditor.Rendering 6 | { 7 | public static class RendererExtensions 8 | { 9 | public static void DrawArrow( 10 | Vector2 start, 11 | Vector2 end, 12 | Color color, 13 | float angleDiff, 14 | float sideLineLength, 15 | int thickness = 1) 16 | { 17 | Vector2 line = end - start; 18 | float angle = Helpers.AngleFromVector(line) - (float)Math.PI; 19 | Renderer.DrawLine(start, 20 | end, color, thickness); 21 | Renderer.DrawLine(end, end + Helpers.VectorFromLengthAndAngle(sideLineLength, angle + angleDiff), 22 | color, thickness); 23 | Renderer.DrawLine(end, end + Helpers.VectorFromLengthAndAngle(sideLineLength, angle - angleDiff), 24 | color, thickness); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/TSMapEditor/Rendering/TubeRefreshHelper.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Models; 3 | using TSMapEditor.UI; 4 | 5 | namespace TSMapEditor.Rendering 6 | { 7 | public static class TubeRefreshHelper 8 | { 9 | public static void MapViewRefreshTube(Tube tube, IMutationTarget mutationTarget) 10 | { 11 | Point2D point = tube.EntryPoint; 12 | mutationTarget.AddRefreshPoint(point, 1); 13 | tube.Directions.ForEach(td => 14 | { 15 | point = point.NextPointFromTubeDirection(td); 16 | 17 | int refreshSize = 0; 18 | 19 | switch (td) 20 | { 21 | case TubeDirection.NorthEast: 22 | case TubeDirection.NorthWest: 23 | case TubeDirection.SouthEast: 24 | case TubeDirection.SouthWest: 25 | refreshSize = 0; 26 | break; 27 | case TubeDirection.North: 28 | case TubeDirection.East: 29 | case TubeDirection.South: 30 | case TubeDirection.West: 31 | refreshSize = 1; 32 | break; 33 | } 34 | 35 | mutationTarget.AddRefreshPoint(point, refreshSize); 36 | }); 37 | mutationTarget.AddRefreshPoint(tube.ExitPoint, 1); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/TSMapEditor/Settings/BoolSetting.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | 3 | namespace TSMapEditor.Settings 4 | { 5 | public class BoolSetting : SettingBase 6 | { 7 | public BoolSetting(string section, string key, bool defaultValue) : base(section, key, defaultValue) 8 | { 9 | } 10 | 11 | protected override bool GetValueFromString(string iniValue) 12 | { 13 | return Conversions.BooleanFromString(iniValue, DefaultValue); 14 | } 15 | 16 | protected override string GetValueString(bool value) 17 | { 18 | return Conversions.BooleanToString(value, BooleanStringStyle.TRUEFALSE_LOWERCASE); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/TSMapEditor/Settings/DoubleSetting.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | using System.Globalization; 3 | 4 | namespace TSMapEditor.Settings 5 | { 6 | public class DoubleSetting : SettingBase 7 | { 8 | public DoubleSetting(string section, string key, double defaultValue) : base(section, key, defaultValue) 9 | { 10 | } 11 | 12 | protected override double GetValueFromString(string iniValue) 13 | { 14 | return Conversions.DoubleFromString(iniValue, DefaultValue); 15 | } 16 | 17 | protected override string GetValueString(double value) 18 | { 19 | return value.ToString(CultureInfo.InvariantCulture); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/TSMapEditor/Settings/IntSetting.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | using System.Globalization; 3 | 4 | namespace TSMapEditor.Settings 5 | { 6 | public class IntSetting : SettingBase 7 | { 8 | public IntSetting(string section, string key, int defaultValue) : base(section, key, defaultValue) 9 | { 10 | } 11 | 12 | protected override int GetValueFromString(string iniValue) 13 | { 14 | return Conversions.IntFromString(iniValue, DefaultValue); 15 | } 16 | 17 | protected override string GetValueString(int value) 18 | { 19 | return value.ToString(CultureInfo.InvariantCulture); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/TSMapEditor/Settings/StringSetting.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.Settings 2 | { 3 | public class StringSetting : SettingBase 4 | { 5 | public StringSetting(string section, string key, string defaultValue) : base(section, key, defaultValue) 6 | { 7 | } 8 | 9 | protected override string GetValueFromString(string iniValue) => iniValue; 10 | 11 | protected override string GetValueString(string value) => value; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/BrushSize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TSMapEditor.GameMath; 3 | 4 | namespace TSMapEditor.UI 5 | { 6 | public class BrushSize 7 | { 8 | public BrushSize(int width, int height) 9 | { 10 | Width = width; 11 | Height = height; 12 | } 13 | 14 | public int Width { get; } 15 | public int Height { get; } 16 | 17 | public void DoForBrushSize(Action action) 18 | { 19 | DoForArea(0, 0, Height, Width, action); 20 | } 21 | 22 | public void DoForBrushSizeAndSurroundings(Action action) 23 | { 24 | DoForArea(-1, -1, Height + 1, Width + 1, action); 25 | } 26 | 27 | private void DoForArea(int initY, int initX, int height, int width, Action action) 28 | { 29 | for (int y = initY; y < height; y++) 30 | { 31 | for (int x = initX; x < width; x++) 32 | { 33 | action(new Point2D(x, y)); 34 | } 35 | } 36 | } 37 | 38 | public override string ToString() 39 | { 40 | return Width + "x" + Height; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Controls/EditorDescriptionPanel.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | using Rampastring.XNAUI.XNAControls; 3 | using System; 4 | 5 | namespace TSMapEditor.UI.Controls 6 | { 7 | public class EditorDescriptionPanel : EditorPanel 8 | { 9 | public EditorDescriptionPanel(WindowManager windowManager) : base(windowManager) 10 | { 11 | } 12 | 13 | private XNALabel lblDescription; 14 | 15 | public override string Text 16 | { 17 | get => lblDescription.Text; 18 | set => lblDescription.Text = string.Join(Environment.NewLine, Renderer.GetFixedTextLines(value, lblDescription.FontIndex, Width - (Constants.UIEmptySideSpace * 2), true, true)); 19 | } 20 | 21 | public override void Initialize() 22 | { 23 | lblDescription = new XNALabel(WindowManager); 24 | lblDescription.Name = Name + "." + nameof(lblDescription); 25 | lblDescription.X = Constants.UIEmptySideSpace; 26 | lblDescription.Y = Constants.UIEmptyTopSpace; 27 | lblDescription.Text = string.Empty; 28 | AddChild(lblDescription); 29 | 30 | base.Initialize(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Controls/EditorGUICreator.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | 3 | namespace TSMapEditor.UI.Controls 4 | { 5 | public class EditorGUICreator : GUICreator 6 | { 7 | private EditorGUICreator() 8 | { 9 | AddControl(typeof(EditorPanel)); 10 | AddControl(typeof(EditorButton)); 11 | AddControl(typeof(MenuButton)); 12 | AddControl(typeof(EditorDescriptionPanel)); 13 | AddControl(typeof(EditorListBox)); 14 | AddControl(typeof(EditorTextBox)); 15 | AddControl(typeof(EditorNumberTextBox)); 16 | AddControl(typeof(EditorSuggestionTextBox)); 17 | AddControl(typeof(EditorPopUpSelector)); 18 | AddControl(typeof(EditorLinkLabel)); 19 | AddControl(typeof(SortButton)); 20 | } 21 | 22 | private static EditorGUICreator _instance; 23 | public static EditorGUICreator Instance 24 | { 25 | get 26 | { 27 | if (_instance == null) 28 | _instance = new EditorGUICreator(); 29 | 30 | return _instance; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Controls/EditorListBox.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | using Rampastring.XNAUI.XNAControls; 3 | 4 | namespace TSMapEditor.UI.Controls 5 | { 6 | public class EditorListBox : XNAListBox 7 | { 8 | public EditorListBox(WindowManager windowManager) : base(windowManager) 9 | { 10 | } 11 | 12 | public override void Initialize() 13 | { 14 | base.Initialize(); 15 | 16 | if (BackgroundTexture == null) 17 | { 18 | var color = ((CustomUISettings)UISettings.ActiveSettings).ListBoxBackgroundColor; 19 | BackgroundTexture = AssetLoader.CreateTexture(color, 2, 2); 20 | PanelBackgroundDrawMode = PanelBackgroundImageDrawMode.STRETCHED; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Controls/EditorSuggestionTextBox.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | using Rampastring.XNAUI.XNAControls; 3 | 4 | namespace TSMapEditor.UI.Controls 5 | { 6 | public class EditorSuggestionTextBox : XNASuggestionTextBox 7 | { 8 | public EditorSuggestionTextBox(WindowManager windowManager) : base(windowManager) 9 | { 10 | Height = Constants.UITextBoxHeight; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Controls/EditorTextBox.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | using Rampastring.XNAUI; 3 | using Rampastring.XNAUI.XNAControls; 4 | 5 | namespace TSMapEditor.UI.Controls 6 | { 7 | public class EditorTextBox : XNATextBox 8 | { 9 | public EditorTextBox(WindowManager windowManager) : base(windowManager) 10 | { 11 | Height = Constants.UITextBoxHeight; 12 | } 13 | 14 | public bool AllowComma { get; set; } = true; 15 | public bool AllowSemicolon { get; set; } = false; 16 | 17 | protected override bool AllowCharacterInput(char character) 18 | { 19 | if (character == ',') 20 | return AllowComma; 21 | 22 | if (character == ';') 23 | return AllowSemicolon; 24 | 25 | return base.AllowCharacterInput(character); 26 | } 27 | 28 | protected override void ParseControlINIAttribute(IniFile iniFile, string key, string value) 29 | { 30 | if (key == nameof(AllowComma)) 31 | { 32 | AllowComma = Conversions.BooleanFromString(value, AllowComma); 33 | } 34 | else if (key == nameof(AllowSemicolon)) 35 | { 36 | AllowSemicolon = Conversions.BooleanFromString(value, AllowSemicolon); 37 | } 38 | 39 | base.ParseControlINIAttribute(iniFile, key, value); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Controls/SortButton.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | 3 | namespace TSMapEditor.UI.Controls 4 | { 5 | public class SortButton : EditorButton 6 | { 7 | public SortButton(WindowManager windowManager) : base(windowManager) 8 | { 9 | Width = Constants.UIButtonHeight; 10 | } 11 | 12 | public override void Initialize() 13 | { 14 | ExtraTexture = AssetLoader.LoadTexture("sortbutton.png"); 15 | base.Initialize(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/CursorActions/HeightActions/FSLowerGroundCursorAction.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Mutations.Classes.HeightMutations; 3 | 4 | namespace TSMapEditor.UI.CursorActions.HeightActions 5 | { 6 | /// 7 | /// Non-steep, "FinalSun-like" ground lowering cursor action. 8 | /// 9 | internal class FSLowerGroundCursorAction : CursorAction 10 | { 11 | public FSLowerGroundCursorAction(ICursorActionTarget cursorActionTarget) : base(cursorActionTarget) 12 | { 13 | } 14 | 15 | public override string GetName() => "Lower Ground (Non-Steep Ramps)"; 16 | 17 | public override void OnActionEnter() 18 | { 19 | CursorActionTarget.BrushSize = Map.EditorConfig.BrushSizes.Find(bs => bs.Width == 2 && bs.Height == 2) ?? Map.EditorConfig.BrushSizes[0]; 20 | } 21 | 22 | public override bool DrawCellCursor => true; 23 | 24 | public override void LeftClick(Point2D cellCoords) 25 | { 26 | base.LeftClick(cellCoords); 27 | 28 | var mutation = new FSLowerGroundMutation(CursorActionTarget.MutationTarget, cellCoords, CursorActionTarget.BrushSize); 29 | CursorActionTarget.MutationManager.PerformMutation(mutation); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/CursorActions/HeightActions/FSRaiseGroundCursorAction.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Mutations.Classes.HeightMutations; 3 | 4 | namespace TSMapEditor.UI.CursorActions.HeightActions 5 | { 6 | /// 7 | /// Non-steep, "FinalSun-like" ground raising cursor action. 8 | /// 9 | public class FSRaiseGroundCursorAction : CursorAction 10 | { 11 | public FSRaiseGroundCursorAction(ICursorActionTarget cursorActionTarget) : base(cursorActionTarget) 12 | { 13 | } 14 | 15 | public override string GetName() => "Raise Ground (Non-Steep Ramps)"; 16 | 17 | public override void OnActionEnter() 18 | { 19 | CursorActionTarget.BrushSize = Map.EditorConfig.BrushSizes.Find(bs => bs.Width == 3 && bs.Height == 3) ?? Map.EditorConfig.BrushSizes[0]; 20 | } 21 | 22 | public override bool DrawCellCursor => true; 23 | 24 | public override void LeftClick(Point2D cellCoords) 25 | { 26 | base.LeftClick(cellCoords); 27 | 28 | var mutation = new FSRaiseGroundMutation(CursorActionTarget.MutationTarget, cellCoords, CursorActionTarget.BrushSize); 29 | CursorActionTarget.MutationManager.PerformMutation(mutation); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/CursorActions/HeightActions/LowerCellsCursorAction.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Mutations.Classes.HeightMutations; 3 | 4 | namespace TSMapEditor.UI.CursorActions.HeightActions 5 | { 6 | internal class LowerCellsCursorAction : CursorAction 7 | { 8 | public LowerCellsCursorAction(ICursorActionTarget cursorActionTarget) : base(cursorActionTarget) 9 | { 10 | } 11 | 12 | public override string GetName() => "Lower Cells"; 13 | 14 | public override bool DrawCellCursor => true; 15 | 16 | public override void LeftClick(Point2D cellCoords) 17 | { 18 | base.LeftClick(cellCoords); 19 | 20 | Point2D targetCellCoords = cellCoords - new Point2D(CursorActionTarget.BrushSize.Width / 2, CursorActionTarget.BrushSize.Height / 2); 21 | bool applyOnArea = KeyboardCommands.Instance.FillTerrain.AreKeysOrModifiersDown(CursorActionTarget.WindowManager.Keyboard); 22 | 23 | var mutation = new LowerCellsMutation(CursorActionTarget.MutationTarget, targetCellCoords, CursorActionTarget.BrushSize, applyOnArea); 24 | CursorActionTarget.MutationManager.PerformMutation(mutation); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/CursorActions/HeightActions/LowerGroundCursorAction.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Mutations.Classes.HeightMutations; 3 | 4 | namespace TSMapEditor.UI.CursorActions.HeightActions 5 | { 6 | internal class LowerGroundCursorAction : CursorAction 7 | { 8 | public LowerGroundCursorAction(ICursorActionTarget cursorActionTarget) : base(cursorActionTarget) 9 | { 10 | } 11 | 12 | public override string GetName() => "Lower Ground (Steep Ramps)"; 13 | 14 | public override void OnActionEnter() 15 | { 16 | CursorActionTarget.BrushSize = Map.EditorConfig.BrushSizes.Find(bs => bs.Width == 2 && bs.Height == 2) ?? Map.EditorConfig.BrushSizes[0]; 17 | } 18 | 19 | public override bool DrawCellCursor => true; 20 | 21 | public override void LeftClick(Point2D cellCoords) 22 | { 23 | base.LeftClick(cellCoords); 24 | 25 | var mutation = new LowerGroundMutation(CursorActionTarget.MutationTarget, cellCoords, CursorActionTarget.BrushSize); 26 | CursorActionTarget.MutationManager.PerformMutation(mutation); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/CursorActions/HeightActions/RaiseCellsCursorAction.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Mutations.Classes.HeightMutations; 3 | 4 | namespace TSMapEditor.UI.CursorActions.HeightActions 5 | { 6 | internal class RaiseCellsCursorAction : CursorAction 7 | { 8 | public RaiseCellsCursorAction(ICursorActionTarget cursorActionTarget) : base(cursorActionTarget) 9 | { 10 | } 11 | 12 | public override string GetName() => "Raise Cells"; 13 | 14 | public override bool DrawCellCursor => true; 15 | 16 | public override void LeftClick(Point2D cellCoords) 17 | { 18 | base.LeftClick(cellCoords); 19 | 20 | Point2D targetCellCoords = cellCoords - new Point2D(CursorActionTarget.BrushSize.Width / 2, CursorActionTarget.BrushSize.Height / 2); 21 | bool applyOnArea = KeyboardCommands.Instance.FillTerrain.AreKeysOrModifiersDown(CursorActionTarget.WindowManager.Keyboard); 22 | 23 | var mutation = new RaiseCellsMutation(CursorActionTarget.MutationTarget, targetCellCoords, CursorActionTarget.BrushSize, applyOnArea); 24 | CursorActionTarget.MutationManager.PerformMutation(mutation); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/CursorActions/HeightActions/RaiseGroundCursorAction.cs: -------------------------------------------------------------------------------- 1 | using TSMapEditor.GameMath; 2 | using TSMapEditor.Mutations.Classes.HeightMutations; 3 | 4 | namespace TSMapEditor.UI.CursorActions.HeightActions 5 | { 6 | public class RaiseGroundCursorAction : CursorAction 7 | { 8 | public RaiseGroundCursorAction(ICursorActionTarget cursorActionTarget) : base(cursorActionTarget) 9 | { 10 | } 11 | 12 | public override string GetName() => "Raise Ground (Steep Ramps)"; 13 | 14 | public override void OnActionEnter() 15 | { 16 | CursorActionTarget.BrushSize = Map.EditorConfig.BrushSizes.Find(bs => bs.Width == 3 && bs.Height == 3) ?? Map.EditorConfig.BrushSizes[0]; 17 | } 18 | 19 | public override bool DrawCellCursor => true; 20 | 21 | public override void LeftClick(Point2D cellCoords) 22 | { 23 | base.LeftClick(cellCoords); 24 | 25 | var mutation = new RaiseGroundMutation(CursorActionTarget.MutationTarget, cellCoords, CursorActionTarget.BrushSize); 26 | CursorActionTarget.MutationManager.PerformMutation(mutation); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/CursorActions/SelectCellCursorAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TSMapEditor.GameMath; 3 | 4 | namespace TSMapEditor.UI.CursorActions 5 | { 6 | /// 7 | /// A cursor action that allows the user to select a cell. 8 | /// 9 | public class SelectCellCursorAction : CursorAction 10 | { 11 | public SelectCellCursorAction(ICursorActionTarget cursorActionTarget) : base(cursorActionTarget) 12 | { 13 | } 14 | 15 | public override string GetName() => "Select Cell"; 16 | 17 | public override bool DrawCellCursor => true; 18 | 19 | public event EventHandler CellSelected; 20 | 21 | public override void LeftClick(Point2D cellCoords) 22 | { 23 | CellSelected?.Invoke(this, cellCoords); 24 | ExitAction(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/EditorContextMenu.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Xna.Framework; 2 | using Rampastring.XNAUI; 3 | using Rampastring.XNAUI.XNAControls; 4 | 5 | namespace TSMapEditor.UI 6 | { 7 | class EditorContextMenu : XNAContextMenu 8 | { 9 | public EditorContextMenu(WindowManager windowManager) : base(windowManager) 10 | { 11 | Width = 250; 12 | TextHorizontalPadding = Constants.UIEmptySideSpace; 13 | FontIndex = Constants.UIBoldFont; 14 | ItemHeight = 25; 15 | } 16 | 17 | public void AddEmptyLine() 18 | { 19 | AddItem(string.Empty, null, () => false, null, null); 20 | } 21 | 22 | public override void Draw(GameTime gameTime) 23 | { 24 | FillRectangle(new Rectangle(0, 0, Width, Height), BackColor); 25 | DrawRectangle(new Rectangle(0, 0, Width, Height), BorderColor); 26 | 27 | int y = BORDER_WIDTH; 28 | 29 | for (int i = 0; i < Items.Count; i++) 30 | { 31 | if (Items[i].Visible) 32 | y += DrawItem(i, new Point(BORDER_WIDTH, y)); 33 | } 34 | 35 | DrawChildren(gameTime); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/ObjectTypeCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace TSMapEditor.UI 5 | { 6 | public abstract class ObjectTypeCollection 7 | { 8 | public string Name { get; set; } 9 | 10 | public List AllowedTheaters { get; set; } 11 | 12 | public bool IsValidForTheater(string theaterName) 13 | { 14 | if (AllowedTheaters == null || AllowedTheaters.Count == 0) 15 | return true; 16 | 17 | return AllowedTheaters.Exists(t => t.Equals(theaterName, StringComparison.OrdinalIgnoreCase)); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Sidebar/ISearchBoxContainer.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI.XNAControls; 2 | 3 | namespace TSMapEditor.UI.Sidebar 4 | { 5 | interface ISearchBoxContainer 6 | { 7 | XNASuggestionTextBox SearchBox { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Sidebar/InfantryListPanel.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | using TSMapEditor.Models; 3 | using TSMapEditor.Rendering; 4 | using TSMapEditor.UI.CursorActions; 5 | 6 | namespace TSMapEditor.UI.Sidebar 7 | { 8 | /// 9 | /// A sidebar panel for listing infantry. 10 | /// 11 | public class InfantryListPanel : ObjectListPanel 12 | { 13 | public InfantryListPanel(WindowManager windowManager, EditorState editorState, 14 | Map map, TheaterGraphics theaterGraphics, ICursorActionTarget cursorActionTarget) 15 | : base(windowManager, editorState, map, theaterGraphics) 16 | { 17 | infantryPlacementAction = new InfantryPlacementAction(cursorActionTarget); 18 | infantryPlacementAction.ActionExited += InfantryPlacementAction_ActionExited; 19 | } 20 | 21 | private void InfantryPlacementAction_ActionExited(object sender, System.EventArgs e) 22 | { 23 | ObjectTreeView.SelectedNode = null; 24 | } 25 | 26 | private readonly InfantryPlacementAction infantryPlacementAction; 27 | 28 | protected override void InitObjects() 29 | { 30 | InitObjectsBase(Map.Rules.InfantryTypes, TheaterGraphics.InfantryTextures); 31 | } 32 | 33 | protected override void ObjectSelected() 34 | { 35 | if (ObjectTreeView.SelectedNode == null) 36 | return; 37 | 38 | infantryPlacementAction.InfantryType = (InfantryType)ObjectTreeView.SelectedNode.Tag; 39 | EditorState.CursorAction = infantryPlacementAction; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Sidebar/SidebarMode.cs: -------------------------------------------------------------------------------- 1 | namespace TSMapEditor.UI.Sidebar 2 | { 3 | /// 4 | /// Lists the sidebar modes of the editor. 5 | /// 6 | public enum SidebarMode 7 | { 8 | Buildings, 9 | Infantry, 10 | Vehicles, 11 | Aircraft, 12 | Naval, 13 | TerrainObjects, 14 | Overlay, 15 | Smudges, 16 | SidebarModeCount 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/TagEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TSMapEditor.Models; 3 | 4 | namespace TSMapEditor.UI 5 | { 6 | public class TagEventArgs : EventArgs 7 | { 8 | public TagEventArgs(Tag tag) 9 | { 10 | Tag = tag; 11 | } 12 | 13 | public Tag Tag { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/UIHelpers.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI.XNAControls; 2 | using TSMapEditor.UI.Controls; 3 | 4 | namespace TSMapEditor.UI 5 | { 6 | public static class UIHelpers 7 | { 8 | public static void AddSearchTipsBoxToControl(XNAControl control) 9 | { 10 | var lblSearchTips = new XNALabel(control.WindowManager); 11 | lblSearchTips.Name = nameof(lblSearchTips); 12 | lblSearchTips.Text = "?"; 13 | lblSearchTips.X = control.Width - Constants.UIEmptySideSpace - lblSearchTips.Width; 14 | lblSearchTips.Y = (control.Height - lblSearchTips.Height) / 2; 15 | control.AddChild(lblSearchTips); 16 | var tooltip = new ToolTip(control.WindowManager, lblSearchTips); 17 | tooltip.Text = "Search Tips\r\n\r\nWith the text box activated:\r\n- Press ENTER to move to next match in list\r\n- Press ESC to clear search query"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/AboutWindow.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | using Rampastring.XNAUI.XNAControls; 3 | using System.Reflection; 4 | using TSMapEditor.UI.Controls; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class AboutWindow : INItializableWindow 9 | { 10 | public AboutWindow(WindowManager windowManager) : base(windowManager) 11 | { 12 | } 13 | 14 | public override void Initialize() 15 | { 16 | Name = nameof(AboutWindow); 17 | base.Initialize(); 18 | 19 | var lblVersion = FindChild("lblVersion"); 20 | lblVersion.Text = "Version " + Constants.ReleaseVersion + ", Build " + Assembly.GetExecutingAssembly().GetName().Version.ToString(); 21 | } 22 | 23 | public void Open() => Show(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/ChangeHeightWindow.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.Tools; 2 | using Rampastring.XNAUI; 3 | using Rampastring.XNAUI.XNAControls; 4 | using System; 5 | using TSMapEditor.Models; 6 | using TSMapEditor.UI.Controls; 7 | 8 | namespace TSMapEditor.UI.Windows 9 | { 10 | public class ChangeHeightWindow : INItializableWindow 11 | { 12 | public ChangeHeightWindow(WindowManager windowManager, Map map) : base(windowManager) 13 | { 14 | this.map = map; 15 | } 16 | 17 | private readonly Map map; 18 | 19 | private XNADropDown ddHeightLevel; 20 | 21 | public override void Initialize() 22 | { 23 | Name = nameof(ChangeHeightWindow); 24 | base.Initialize(); 25 | 26 | ddHeightLevel = FindChild(nameof(ddHeightLevel)); 27 | FindChild("btnApply").LeftClick += ChangeHeightWindow_LeftClick; 28 | } 29 | 30 | private void ChangeHeightWindow_LeftClick(object sender, EventArgs e) 31 | { 32 | map.ChangeHeight(Conversions.IntFromString(ddHeightLevel.SelectedItem.Text, 0)); 33 | Hide(); 34 | } 35 | 36 | public void Open() 37 | { 38 | ddHeightLevel.SelectedIndex = ddHeightLevel.Items.FindIndex(ddi => ddi.Text == "0"); 39 | Show(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectAnimationWindow.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI.XNAControls; 2 | using Rampastring.XNAUI; 3 | using System; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class SelectAnimationWindow : SelectObjectWindow 9 | { 10 | public SelectAnimationWindow(WindowManager windowManager, Map map) : base(windowManager) 11 | { 12 | this.map = map; 13 | } 14 | 15 | private readonly Map map; 16 | 17 | public override void Initialize() 18 | { 19 | Name = nameof(SelectAnimationWindow); 20 | base.Initialize(); 21 | } 22 | 23 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 24 | { 25 | if (lbObjectList.SelectedItem == null) 26 | { 27 | SelectedObject = null; 28 | return; 29 | } 30 | 31 | SelectedObject = (AnimType)lbObjectList.SelectedItem.Tag; 32 | } 33 | 34 | protected override void ListObjects() 35 | { 36 | lbObjectList.Clear(); 37 | 38 | lbObjectList.AddItem(new XNAListBoxItem() { Text = "None" }); 39 | 40 | foreach (AnimType animType in map.Rules.AnimTypes) 41 | { 42 | lbObjectList.AddItem(new XNAListBoxItem() { Text = $"{animType.Index} {animType.ININame}", Tag = animType }); 43 | if (animType == SelectedObject) 44 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectBridgeWindow.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | using Rampastring.XNAUI.XNAControls; 3 | using System; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class SelectBridgeWindow : SelectObjectWindow 9 | { 10 | public SelectBridgeWindow(WindowManager windowManager, Map map) : base(windowManager) 11 | { 12 | this.map = map; 13 | } 14 | 15 | private readonly Map map; 16 | 17 | public override void Initialize() 18 | { 19 | Name = nameof(SelectBridgeWindow); 20 | base.Initialize(); 21 | } 22 | 23 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 24 | { 25 | if (lbObjectList.SelectedItem == null) 26 | { 27 | SelectedObject = null; 28 | return; 29 | } 30 | 31 | SelectedObject = (BridgeType)lbObjectList.SelectedItem.Tag; 32 | } 33 | 34 | public void Open() 35 | { 36 | Open(null); 37 | } 38 | 39 | protected override void ListObjects() 40 | { 41 | lbObjectList.Clear(); 42 | 43 | foreach (BridgeType bridge in map.EditorConfig.Bridges) 44 | { 45 | lbObjectList.AddItem(new XNAListBoxItem() { Text = bridge.Name, Tag = bridge }); 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectGlobalVariableWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rampastring.XNAUI; 3 | using Rampastring.XNAUI.XNAControls; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class SelectGlobalVariableWindow : SelectObjectWindow 9 | { 10 | public SelectGlobalVariableWindow(WindowManager windowManager, Map map) : base(windowManager) 11 | { 12 | this.map = map; 13 | } 14 | 15 | private readonly Map map; 16 | 17 | public override void Initialize() 18 | { 19 | Name = nameof(SelectGlobalVariableWindow); 20 | base.Initialize(); 21 | } 22 | 23 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 24 | { 25 | if (lbObjectList.SelectedItem == null) 26 | { 27 | SelectedObject = null; 28 | return; 29 | } 30 | 31 | SelectedObject = (GlobalVariable)lbObjectList.SelectedItem.Tag; 32 | } 33 | 34 | protected override void ListObjects() 35 | { 36 | lbObjectList.Clear(); 37 | 38 | foreach (GlobalVariable globalVariable in map.Rules.GlobalVariables) 39 | { 40 | lbObjectList.AddItem(new XNAListBoxItem() { Text = $"{globalVariable.Index} {globalVariable.Name}", Tag = globalVariable }); 41 | if (globalVariable == SelectedObject) 42 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectHouseWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rampastring.XNAUI; 3 | using Rampastring.XNAUI.XNAControls; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class SelectHouseWindow : SelectObjectWindow 9 | { 10 | public SelectHouseWindow(WindowManager windowManager, Map map) : base(windowManager) 11 | { 12 | this.map = map; 13 | } 14 | 15 | private readonly Map map; 16 | 17 | public override void Initialize() 18 | { 19 | Name = nameof(SelectHouseWindow); 20 | base.Initialize(); 21 | } 22 | 23 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 24 | { 25 | if (lbObjectList.SelectedItem == null) 26 | { 27 | SelectedObject = null; 28 | return; 29 | } 30 | 31 | SelectedObject = (House)lbObjectList.SelectedItem.Tag; 32 | } 33 | 34 | protected override void ListObjects() 35 | { 36 | lbObjectList.Clear(); 37 | 38 | for (int i = 0; i < map.GetHouses().Count; i++) 39 | { 40 | House house = map.GetHouses()[i]; 41 | 42 | lbObjectList.AddItem(new XNAListBoxItem() { Text = $"{i} {house.ININame}", TextColor = house.XNAColor, Tag = house }); 43 | if (house == SelectedObject) 44 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectLocalVariableWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rampastring.XNAUI; 3 | using Rampastring.XNAUI.XNAControls; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class SelectLocalVariableWindow : SelectObjectWindow 9 | { 10 | public SelectLocalVariableWindow(WindowManager windowManager, Map map) : base(windowManager) 11 | { 12 | this.map = map; 13 | } 14 | 15 | private readonly Map map; 16 | 17 | public override void Initialize() 18 | { 19 | Name = nameof(SelectLocalVariableWindow); 20 | base.Initialize(); 21 | } 22 | 23 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 24 | { 25 | if (lbObjectList.SelectedItem == null) 26 | { 27 | SelectedObject = null; 28 | return; 29 | } 30 | 31 | SelectedObject = (LocalVariable)lbObjectList.SelectedItem.Tag; 32 | } 33 | 34 | protected override void ListObjects() 35 | { 36 | lbObjectList.Clear(); 37 | 38 | foreach (LocalVariable localVariable in map.LocalVariables) 39 | { 40 | lbObjectList.AddItem(new XNAListBoxItem() { Text = $"{localVariable.Index} {localVariable.Name}", Tag = localVariable }); 41 | if (localVariable == SelectedObject) 42 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectParticleSystemTypeWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rampastring.XNAUI; 3 | using Rampastring.XNAUI.XNAControls; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class SelectParticleSystemTypeWindow : SelectObjectWindow 9 | { 10 | public SelectParticleSystemTypeWindow(WindowManager windowManager, Map map) : base(windowManager) 11 | { 12 | this.map = map; 13 | } 14 | 15 | private readonly Map map; 16 | 17 | public override void Initialize() 18 | { 19 | Name = nameof(SelectParticleSystemTypeWindow); 20 | base.Initialize(); 21 | } 22 | 23 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 24 | { 25 | if (lbObjectList.SelectedItem == null) 26 | { 27 | SelectedObject = null; 28 | return; 29 | } 30 | 31 | SelectedObject = (ParticleSystemType)lbObjectList.SelectedItem.Tag; 32 | } 33 | 34 | protected override void ListObjects() 35 | { 36 | lbObjectList.Clear(); 37 | 38 | foreach (ParticleSystemType particleSystemType in map.Rules.ParticleSystemTypes) 39 | { 40 | lbObjectList.AddItem(new XNAListBoxItem() { Text = $"{particleSystemType.Index} {particleSystemType.ININame}", Tag = particleSystemType }); 41 | if (particleSystemType == SelectedObject) 42 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectScriptActionWindow.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | using Rampastring.XNAUI.XNAControls; 3 | using System; 4 | using TSMapEditor.CCEngine; 5 | using TSMapEditor.Models; 6 | 7 | namespace TSMapEditor.UI.Windows 8 | { 9 | public class SelectScriptActionWindow : SelectObjectWindow 10 | { 11 | public SelectScriptActionWindow(WindowManager windowManager, EditorConfig editorConfig) : base(windowManager) 12 | { 13 | this.editorConfig = editorConfig; 14 | } 15 | 16 | private EditorConfig editorConfig; 17 | 18 | public override void Initialize() 19 | { 20 | Name = nameof(SelectScriptActionWindow); 21 | base.Initialize(); 22 | } 23 | 24 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 25 | { 26 | if (lbObjectList.SelectedItem == null) 27 | { 28 | SelectedObject = null; 29 | return; 30 | } 31 | 32 | SelectedObject = (ScriptAction)lbObjectList.SelectedItem.Tag; 33 | } 34 | 35 | protected override void ListObjects() 36 | { 37 | lbObjectList.Clear(); 38 | 39 | foreach (ScriptAction scriptAction in editorConfig.ScriptActions.Values) 40 | { 41 | lbObjectList.AddItem(new XNAListBoxItem() { Text = $"{scriptAction.ID} {scriptAction.Name}", Tag = scriptAction }); 42 | if (scriptAction == SelectedObject) 43 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectSoundWindow.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI.XNAControls; 2 | using Rampastring.XNAUI; 3 | using System; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class SelectSoundWindow : SelectObjectWindow 9 | { 10 | public SelectSoundWindow(WindowManager windowManager, Map map) : base(windowManager) 11 | { 12 | this.map = map; 13 | } 14 | 15 | private readonly Map map; 16 | 17 | public override void Initialize() 18 | { 19 | Name = nameof(SelectSoundWindow); 20 | base.Initialize(); 21 | } 22 | 23 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 24 | { 25 | SelectedObject = (Sound)lbObjectList.SelectedItem?.Tag; 26 | } 27 | 28 | protected override void ListObjects() 29 | { 30 | lbObjectList.Clear(); 31 | 32 | foreach (var sound in map.Rules.Sounds.List) 33 | { 34 | lbObjectList.AddItem(new XNAListBoxItem() { Text = sound.ToString(), Tag = sound }); 35 | if (sound == SelectedObject) 36 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectSpeechWindow.cs: -------------------------------------------------------------------------------- 1 | using Rampastring.XNAUI; 2 | using Rampastring.XNAUI.XNAControls; 3 | using System; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | public class SelectSpeechWindow : SelectObjectWindow 9 | { 10 | public SelectSpeechWindow(WindowManager windowManager, Map map) : base(windowManager) 11 | { 12 | this.map = map; 13 | } 14 | 15 | private readonly Map map; 16 | 17 | public override void Initialize() 18 | { 19 | Name = nameof(SelectSpeechWindow); 20 | base.Initialize(); 21 | } 22 | 23 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 24 | { 25 | SelectedObject = (EvaSpeech)lbObjectList.SelectedItem?.Tag; 26 | } 27 | 28 | protected override void ListObjects() 29 | { 30 | lbObjectList.Clear(); 31 | 32 | var speechList = Constants.IsRA2YR ? map.Rules.Speeches.List : map.EditorConfig.Speeches.List; 33 | foreach (var evaSpeech in speechList) 34 | { 35 | lbObjectList.AddItem(new XNAListBoxItem() { Text = evaSpeech.ToString(), Tag = evaSpeech }); 36 | if (evaSpeech == SelectedObject) 37 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/TSMapEditor/UI/Windows/SelectTaskForceWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rampastring.XNAUI; 3 | using Rampastring.XNAUI.XNAControls; 4 | using TSMapEditor.Models; 5 | 6 | namespace TSMapEditor.UI.Windows 7 | { 8 | /// 9 | /// A window that allows the user to select a TaskForce (for example, for a TeamType). 10 | /// 11 | public class SelectTaskForceWindow : SelectObjectWindow 12 | { 13 | public SelectTaskForceWindow(WindowManager windowManager, Map map) : base(windowManager) 14 | { 15 | this.map = map; 16 | } 17 | 18 | private readonly Map map; 19 | 20 | public override void Initialize() 21 | { 22 | Name = nameof(SelectTaskForceWindow); 23 | base.Initialize(); 24 | } 25 | 26 | protected override void LbObjectList_SelectedIndexChanged(object sender, EventArgs e) 27 | { 28 | if (lbObjectList.SelectedItem == null) 29 | { 30 | SelectedObject = null; 31 | return; 32 | } 33 | 34 | SelectedObject = (TaskForce)lbObjectList.SelectedItem.Tag; 35 | } 36 | 37 | protected override void ListObjects() 38 | { 39 | lbObjectList.Clear(); 40 | 41 | foreach (TaskForce taskForce in map.TaskForces) 42 | { 43 | lbObjectList.AddItem(new XNAListBoxItem() { Text = $"{taskForce.Name} ({taskForce.ININame})", Tag = taskForce }); 44 | if (taskForce == SelectedObject) 45 | lbObjectList.SelectedIndex = lbObjectList.Items.Count - 1; 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/TSMapEditor/editoricon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CnCNet/WorldAlteringEditor/a8d5176f1e5c43c9238065087c3daca142da06b1/src/TSMapEditor/editoricon.ico -------------------------------------------------------------------------------- /src/build_launcher.bat: -------------------------------------------------------------------------------- 1 | dotnet publish MapEditorLauncher/MapEditorLauncher.csproj -c Release -p:PublishSingleFile=true -p:PublishTrimmed=false -p:IncludeNativeLibrariesForSelfExtract=true -p:CopyOutputSymbolsToPublishDirectory=false -p:DisableWinExeOutputInference=true -r win-x64 --self-contained=false --------------------------------------------------------------------------------