Skip to content

Commit

Permalink
2.5.2: Minor addition
Browse files Browse the repository at this point in the history
- "Allow all" will now include only haulable items by default
- Hold Ctrl to include other things, such as buildings
  • Loading branch information
UnlimitedHugs committed Dec 26, 2016
1 parent 06bbeed commit 5c0d819
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Mods/AllowTool/About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<author>UnlimitedHugs</author>
<targetVersion>0.16.0</targetVersion>
<url>https://ludeon.com/forums/index.php?topic=17218.0</url>
<description>Version: 2.5.1
<description>Version: 2.5.2

&lt;size=20&gt;Description&lt;/size&gt;
A set of tools to make handling forbidden items easier.
Expand Down
Binary file modified Mods/AllowTool/Assemblies/$HugsLibChecker.dll
Binary file not shown.
Binary file modified Mods/AllowTool/Assemblies/AllowTool.dll
Binary file not shown.
1 change: 1 addition & 0 deletions Mods/AllowTool/Defs/ThingDesignatorDefs/Designators.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Click and drag over an area to use.</description>
<label>Unforbid everything</label>
<description>Unforbids all forbidden items on the map.
Click to activate.
Hold Ctrl to include buildings.
Hold Shift to include skeletons and non-fresh corpses.</description>
<iconTex>allowAll</iconTex>
<dragHighlightTex>allowHighlight</dragHighlightTex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<AllowAllDesignator.label>Разрешить всё</AllowAllDesignator.label>
<AllowAllDesignator.description>Снимает метку запрещения с запрещенных предметов на всей карте.
Удерживать Ctrl чтобы снять запрещение также со зданий.
Удерживать Shift чтобы снять запрещение также со скелетов и несвежих трупов.</AllowAllDesignator.description>

<MassSelectDesignator.label>Массовое выделение</MassSelectDesignator.label>
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 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("2.5.1")]
[assembly: AssemblyFileVersion("2.5.1")]
[assembly: AssemblyVersion("2.5.2")]
[assembly: AssemblyFileVersion("2.5.2")]
3 changes: 2 additions & 1 deletion Source/Designator_AllowAll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ protected override int ProcessCell(IntVec3 cell) {

private void AllowAllTheThings() {
var includeRotten = AllowToolUtility.ShiftIsHeld;
var includeNonHaulable = AllowToolUtility.ControlIsHeld;
if(Find.VisibleMap == null) return;
var things = Find.VisibleMap.listerThings.AllThings;
var tallyCount = 0;
for (var i = 0; i < things.Count; i++) {
var thing = things[i];
var comp = thing is ThingWithComps ? (thing as ThingWithComps).GetComp<CompForbiddable>() : null;
if (comp != null && comp.Forbidden) {
if (comp != null && comp.Forbidden && (includeNonHaulable || (thing.def != null && thing.def.EverHaulable))) {
CompRottable rottable;
if (includeRotten || !(thing is Corpse) || (rottable = (thing as ThingWithComps).GetComp<CompRottable>()) == null || rottable.Stage < RotStage.Rotting) {
comp.Forbidden = false;
Expand Down

0 comments on commit 5c0d819

Please sign in to comment.