-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
104 additions
and
10 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<loadFolders> | ||
<v1.1> | ||
<li>1.1</li> | ||
<li>Common</li> | ||
<li>/</li> | ||
</v1.1> | ||
</loadFolders> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<Defs> | ||
|
||
<DesignationCategoryDef> | ||
<defName>MapEdit</defName> | ||
<label>mapEdit</label> | ||
<order>0</order> | ||
<specialDesignatorClasses> | ||
<li>Designator_Cancel</li> | ||
<li>Designator_Deconstruct</li> | ||
<li>MapEditTools.Designator_BuildRoof</li> | ||
<li>MapEditTools.Designator_RemoveRoof</li> | ||
<li>MapEditTools.Designator_SetTerrain</li> | ||
<li>MapEditTools.Designator_SmoothSurface</li> | ||
<li>MapEditTools.Designator_AddFog</li> | ||
<li>MapEditTools.Designator_RemoveFog</li> | ||
</specialDesignatorClasses> | ||
</DesignationCategoryDef> | ||
</Defs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters