Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ rimpy-custom: Fix for Russian translation
InsanityPrelude: Add AllWork tag to Managing WorkTypeDef (#181)

<size=24>Version</size>
This is version 4.33.649, for RimWorld 1.2.2753.
This is version 4.33.649, for RimWorld 1.3.3069.

</description>
<supportedVersions>
<li>1.2</li>
<li>1.3</li>
</supportedVersions>
<packageId>fluffy.colonymanager</packageId>
<modDependencies>
Expand Down
Binary file modified Assemblies/Fluffy_ColonyManager.dll
Binary file not shown.
30 changes: 15 additions & 15 deletions Source/Helpers/Mining/Dialog_MiningDebugOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,91 +23,91 @@ protected override void DoListingItems()
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Mineable>() )
Messages.Message( job.IsValidMiningTarget( thing ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false );


DebugToolMap( "IsValidDeconstructionTarget", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( job.IsValidDeconstructionTarget( thing ).ToString(),
MessageTypeDefOf.SilentInput );
} );
}, false );

DebugToolMap( "Faction", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( thing.Faction.ToStringSafe(), MessageTypeDefOf.SilentInput );
} );
}, false );

DebugToolMap( "AllowedBuilding", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( job.AllowedBuilding( thing.def ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false);


DebugToolMap( "AllowedMineral", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Mineable>() )
Messages.Message( job.AllowedMineral( thing.def ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false);


DebugToolMap( "IsRelevantDeconstructionTarget", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( job.IsRelevantDeconstructionTarget( thing ).ToString(),
MessageTypeDefOf.SilentInput );
} );
}, false);

DebugToolMap( "IsRelevantMiningTarget", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Mineable>() )
Messages.Message( job.IsRelevantMiningTarget( thing ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false);

DebugToolMap( "IsInAllowedArea", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( job.IsInAllowedArea( thing ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false);

DebugToolMap( "IsReachable", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( job.IsReachable( thing ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false);

DebugToolMap( "IsRoomDivider", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( job.IsARoomDivider( thing ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false);

DebugToolMap( "IsRoofSupport: basic", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( job.IsARoofSupport_Basic( thing ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false); ;

DebugToolMap( "IsRoofSupport: advanced", delegate
{
foreach ( var thing in Find.CurrentMap.thingGrid.ThingsAt( UI.MouseCell() ).OfType<Building>() )
Messages.Message( job.IsARoofSupport_Advanced( thing ).ToString(), MessageTypeDefOf.SilentInput );
} );
}, false);

DebugAction( "DrawSupportGrid", delegate
{
foreach ( var cell in job.manager.map.AllCells )
if ( job.IsARoofSupport_Basic( cell ) )
job.manager.map.debugDrawer.FlashCell( cell, DebugSolidColorMats.MaterialOf( Color.green ) );
} );
}, false);

DebugAction( "GetBaseCenter", delegate
{
var cell = Utilities.GetBaseCenter( job.manager );
job.manager.map.debugDrawer.FlashCell( cell, DebugSolidColorMats.MaterialOf( Color.blue ) );
} );
}, false);

DebugToolMap( "DrawPath", delegate
{
Expand All @@ -118,7 +118,7 @@ protected override void DoListingItems()
TraverseMode.PassDoors, Danger.Some ) );
path.DrawPath( null );
path.ReleaseToPool();
}
}, false
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Helpers/UI/UIThingFilterSearchable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void DoThingFilterConfigWindow( Rect canvas, ref Vector2 scrollPosition,

// main listing
var listingRect = new Rect( 0f, curY, viewRect.width, 9999f );
var listingTreeThingFilter = new Listing_TreeThingFilter( filter, parentFilter, null, null, null );
var listingTreeThingFilter = new Listing_TreeThingFilter( filter, parentFilter, null, null, null, new RimWorld.QuickSearchFilter() );
listingTreeThingFilter.Begin( listingRect );
var node = ThingCategoryNodeDatabase.RootNode;
if ( parentFilter != null )
Expand All @@ -91,7 +91,7 @@ public void DoThingFilterConfigWindow( Rect canvas, ref Vector2 scrollPosition,
}

// draw the actual thing
listingTreeThingFilter.DoCategoryChildren( node, 0, openMask, Find.CurrentMap, true );
listingTreeThingFilter.ListCategoryChildren(node, openMask, Find.CurrentMap, new Rect(0f, curY+2f, viewRect.width-2f, 9999f));//DoCategoryChildren( node, 0, openMask, Find.CurrentMap, true );
listingTreeThingFilter.End();

// update height.
Expand Down
2 changes: 1 addition & 1 deletion Source/ManagerJobs/ManagerJob_Mining.cs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public bool IsARoomDivider( Thing target )
.ToArray();

// check if there are more than two rooms in the surrounding cells.
var rooms = adjacent.Select( c => c.GetRoom( manager.map, RegionType.Normal ) )
var rooms = adjacent.Select( c => c.GetRoom( manager.map) )
.Where( r => r != null )
.Distinct()
.ToList();
Expand Down
6 changes: 3 additions & 3 deletions Source/Triggers/Trigger_Threshold.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@ public override void DrawTriggerConfig( ref Vector2 cur, float width, float entr
{
var option = string.Empty;
Action onClick = () => Find.WindowStack.TryRemove( typeof( MainTabWindow_Manager ), false );
Action onHover = null;
Action<UnityEngine.Rect> onHover = null;
if ( designation.target.HasThing )
{
var thing = designation.target.Thing;
option = designationLabelGetter?.Invoke( designation ) ?? thing.LabelCap;
onClick += () => CameraJumper.TryJumpAndSelect( thing );
onHover += () => CameraJumper.TryJump( thing );
onHover += (c) => CameraJumper.TryJump( thing );
}
else
{
Expand All @@ -271,7 +271,7 @@ public override void DrawTriggerConfig( ref Vector2 cur, float width, float entr
// so I suppose it doesn't matter -- Fluffy.
option = designationLabelGetter?.Invoke( designation ) ?? cell.GetTerrain( map ).LabelCap;
onClick += () => CameraJumper.TryJump( cell, map );
onHover += () => CameraJumper.TryJump( cell, map );
onHover += (c) => CameraJumper.TryJump( cell, map );
}

options.Add( new FloatMenuOption( option, onClick, MenuOptionPriority.Default, onHover ) );
Expand Down
2 changes: 1 addition & 1 deletion Source/Windows/Window_TriggerThresholdDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ public override void PreOpen()
Input = Trigger.TargetCount.ToString();
}
}
}
}
4 changes: 2 additions & 2 deletions Source/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<packages>
<package id="Lib.Harmony" version="2.0.0.6" targetFramework="net472" />
</packages>
<package id="Lib.Harmony" version="2.1.0" targetFramework="net472" />
</packages>