diff --git a/Defs/DesignationCategories.xml b/1.0/Defs/DesignationCategories.xml similarity index 100% rename from Defs/DesignationCategories.xml rename to 1.0/Defs/DesignationCategories.xml diff --git a/About/About.xml b/About/About.xml index e987984..0edc9ca 100644 --- a/About/About.xml +++ b/About/About.xml @@ -4,7 +4,9 @@ Herigony
  • 1.0
  • +
  • 1.1
  • + Herigony.MapEditTools Adds new tools that make editing the map easier. To use, just open Architect -> MapTools Tools: diff --git a/About/LoadFolders.xml b/About/LoadFolders.xml new file mode 100644 index 0000000..4106c4e --- /dev/null +++ b/About/LoadFolders.xml @@ -0,0 +1,8 @@ + + + +
  • 1.1
  • +
  • Common
  • +
  • /
  • +
    +
    \ No newline at end of file diff --git a/Common/Defs/DesignationCategories.xml b/Common/Defs/DesignationCategories.xml new file mode 100644 index 0000000..83b5c71 --- /dev/null +++ b/Common/Defs/DesignationCategories.xml @@ -0,0 +1,19 @@ + + + + + MapEdit + + 0 + +
  • Designator_Cancel
  • +
  • Designator_Deconstruct
  • +
  • MapEditTools.Designator_BuildRoof
  • +
  • MapEditTools.Designator_RemoveRoof
  • +
  • MapEditTools.Designator_SetTerrain
  • +
  • MapEditTools.Designator_SmoothSurface
  • +
  • MapEditTools.Designator_AddFog
  • +
  • MapEditTools.Designator_RemoveFog
  • +
    +
    +
    \ No newline at end of file diff --git a/Languages/English/Keyed/MapEditTools.xml b/Languages/English/Keyed/MapEditTools.xml index 3c95ea3..95ddcf6 100644 --- a/Languages/English/Keyed/MapEditTools.xml +++ b/Languages/English/Keyed/MapEditTools.xml @@ -10,4 +10,10 @@ Set Terrain Set the terrain. + Add Fog + Add fog on the map. + + Remove Fog + Remove fog on the map. + \ No newline at end of file diff --git a/Source/FloorEdit.cs b/Source/FloorEdit.cs index c69f4bd..1211a1c 100644 --- a/Source/FloorEdit.cs +++ b/Source/FloorEdit.cs @@ -14,8 +14,8 @@ public class Designator_SetTerrain : MapEditDesignator public Designator_SetTerrain() : base() { - this.defaultLabel = "MapEditTools.DesignatorSetTerrain".Translate(); - this.defaultDesc = "MapEditTools.DesignatorSetTerrainDesc".Translate(); + this.defaultLabel = "MapEditTools.DesignatorSetTerrain".Translate().Resolve(); + this.defaultDesc = "MapEditTools.DesignatorSetTerrainDesc".Translate().Resolve(); } public override void DesignateSingleCell(IntVec3 c) diff --git a/Source/FogEdit.cs b/Source/FogEdit.cs new file mode 100644 index 0000000..265ad72 --- /dev/null +++ b/Source/FogEdit.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace MapEditTools +{ + class Designator_AddFog : MapEditDesignator + { + public Designator_AddFog() : base() + { + this.defaultLabel = "MapEditTools.DesignatorAddFog".Translate().Resolve(); + this.defaultDesc = "MapEditTools.DesignatorAddFogDesc".Translate().Resolve(); + } + + public override AcceptanceReport CanDesignateCell(IntVec3 loc) + { + return !Map.fogGrid.IsFogged(loc); + } + + public override void DesignateSingleCell(IntVec3 c) + { + Map.fogGrid.fogGrid[Map.cellIndices.CellToIndex(c)] = true; + Map.mapDrawer.MapMeshDirty(c, MapMeshFlag.FogOfWar); + } + } + + class Designator_RemoveFog : MapEditDesignator + { + public Designator_RemoveFog() : base() + { + this.defaultLabel = "MapEditTools.DesignatorRemoveFog".Translate().Resolve(); + this.defaultDesc = "MapEditTools.DesignatorRemoveFogDesc".Translate().Resolve(); + } + + public override AcceptanceReport CanDesignateCell(IntVec3 loc) + { + return Map.fogGrid.IsFogged(loc); + } + + public override void DesignateSingleCell(IntVec3 c) + { + Map.fogGrid.Unfog(c); + } + } +} diff --git a/Source/MapEditTools.csproj b/Source/MapEditTools.csproj index ef9a145..ad4d635 100644 --- a/Source/MapEditTools.csproj +++ b/Source/MapEditTools.csproj @@ -9,9 +9,10 @@ Properties MapEditTools MapEditTools - v3.5 + v4.7.2 512 false + true @@ -22,14 +23,16 @@ prompt 4 false + false none true - ..\Assemblies\ + ..\1.1\Assemblies\ TRACE prompt 4 + false @@ -46,9 +49,18 @@ ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.dll False + + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll + False + + + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.IMGUIModule.dll + False + + diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs index 1313d21..f1e267a 100644 --- a/Source/Properties/AssemblyInfo.cs +++ b/Source/Properties/AssemblyInfo.cs @@ -28,4 +28,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.1.0")] +[assembly: AssemblyVersion("1.2.0.0")] diff --git a/Source/RoofEdit.cs b/Source/RoofEdit.cs index 19e9d8b..f1e396c 100644 --- a/Source/RoofEdit.cs +++ b/Source/RoofEdit.cs @@ -30,8 +30,8 @@ public class Designator_BuildRoof : Designator_SetRoof { public Designator_BuildRoof() : base() { - this.defaultLabel = "MapEditTools.DesignatorBuildRoof".Translate(); - this.defaultDesc = "MapEditTools.DesignatorBuildRoofDesc".Translate(); + this.defaultLabel = "MapEditTools.DesignatorBuildRoof".Translate().Resolve(); + this.defaultDesc = "MapEditTools.DesignatorBuildRoofDesc".Translate().Resolve(); this.icon = ContentFinder.Get("UI/Designators/BuildRoofArea"); } @@ -63,8 +63,8 @@ public class Designator_RemoveRoof : Designator_SetRoof { public Designator_RemoveRoof() : base() { - this.defaultLabel = "MapEditTools.DesignatorRemoveRoof".Translate(); - this.defaultDesc = "MapEditTools.DesignatorRemoveRoofDesc".Translate(); + this.defaultLabel = "MapEditTools.DesignatorRemoveRoof".Translate().Resolve(); + this.defaultDesc = "MapEditTools.DesignatorRemoveRoofDesc".Translate().Resolve(); this.icon = ContentFinder.Get("UI/Designators/NoRoofArea"); this.soundSucceeded = SoundDefOf.Designate_Deconstruct; } diff --git a/Source/SmoothTool.cs b/Source/SmoothTool.cs index 8388654..7919781 100644 --- a/Source/SmoothTool.cs +++ b/Source/SmoothTool.cs @@ -15,7 +15,7 @@ public Designator_SmoothSurface() : base() { } public override AcceptanceReport CanDesignateCell(IntVec3 c) { AcceptanceReport report = base.CanDesignateCell(c); - if (report.Accepted || report.Reason == "SurfaceBeingSmoothed".Translate() || report.Reason == "TooCloseToMapEdge".Translate()) + if (report.Accepted || report.Reason == "SurfaceBeingSmoothed".Translate().Resolve() || report.Reason == "TooCloseToMapEdge".Translate().Resolve()) return true; return report; }