diff --git a/1.1/Assemblies/Quarry.dll b/1.1/Assemblies/Quarry.dll index 7fde844..beae2b5 100644 Binary files a/1.1/Assemblies/Quarry.dll and b/1.1/Assemblies/Quarry.dll differ diff --git a/1.1/Source/Quarry/Buildings/Building_Quarry.cs b/1.1/Source/Quarry/Buildings/Building_Quarry.cs index 3e4cd53..62b7b58 100644 --- a/1.1/Source/Quarry/Buildings/Building_Quarry.cs +++ b/1.1/Source/Quarry/Buildings/Building_Quarry.cs @@ -38,7 +38,7 @@ public class Building_Quarry : Building private List rockTypesUnder = new List(); private List blocksUnder = new List(); private List chunksUnder = new List(); - private List owners = new List(); + private List owners => compAssignable.AssignedPawnsForReading; #endregion Fields #region Public Properties @@ -54,7 +54,21 @@ public IEnumerable AssigningCandidates { return Enumerable.Empty(); } - return Map.mapPawns.FreeColonists; + return Map.mapPawns.FreeColonists.Where(x=> !x.WorkTagIsDisabled(WorkTags.Mining) && !x.WorkTypeIsDisabled(WorkTypeDefOf.Mining)); + } + } + public CompAssignableToPawn compAssignable + { + get + { + return this.TryGetComp(); + } + } + public CompForbiddable forbiddable + { + get + { + return this.TryGetComp(); } } @@ -199,7 +213,6 @@ public override void ExposeData() Scribe_Values.Look(ref quarryPercent, "QRY_quarryPercent", 1f); Scribe_Values.Look(ref jobsCompleted, "QRY_jobsCompleted", 0); Scribe_Collections.Look(ref rockTypesUnder, "QRY_rockTypesUnder", LookMode.Value); - Scribe_Collections.Look(ref owners, "owners", LookMode.Reference); if (Scribe.mode == LoadSaveMode.PostLoadInit) { @@ -538,14 +551,50 @@ public override IEnumerable GetGizmos() }, hotKey = KeyBindingDefOf.Misc3 }; - + /* if (base.GetGizmos() != null) { + Log.Message("do base.GetGizmos()"); foreach (Command c in base.GetGizmos()) { + Log.Message(string.Format("base.GetGizmos() {0}",c)); yield return c; } } + */ + + IEnumerator enumerator = null; + if (((this.def.BuildableByPlayer && this.def.passability != Traversability.Impassable && !this.def.IsDoor) || this.def.building.forceShowRoomStats) && Gizmo_RoomStats.GetRoomToShowStatsFor(this) != null && Find.Selector.SingleSelectedObject == this) + { + yield return new Gizmo_RoomStats(this); + } + if (this.def.Minifiable && base.Faction == Faction.OfPlayer) + { + yield return InstallationDesignatorDatabase.DesignatorFor(this.def); + } + Command command = BuildCopyCommandUtility.BuildCopyCommand(this.def, base.Stuff); + if (command != null) + { + yield return command; + } + if (base.Faction == Faction.OfPlayer) + { + foreach (Command command2 in BuildFacilityCommandUtility.BuildFacilityCommands(this.def)) + { + yield return command2; + } + IEnumerator enumerator2 = null; + } + if (forbiddable!=null) + { + foreach (Gizmo item in forbiddable.CompGetGizmosExtra()) + { + yield return item; + } + ; + } + yield break; + Log.Message("post base.GetGizmos()"); } diff --git a/_PublisherPlus.xml b/_PublisherPlus.xml new file mode 100644 index 0000000..f9676f8 --- /dev/null +++ b/_PublisherPlus.xml @@ -0,0 +1,8 @@ + + + + C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\Quarry\.git + C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\Quarry\1.1\Source + C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\Quarry\Source + + \ No newline at end of file