diff --git a/1.7/Assemblies/BlaxZones.dll b/1.7/Assemblies/BlaxZones.dll index b152d94..46933f4 100644 Binary files a/1.7/Assemblies/BlaxZones.dll and b/1.7/Assemblies/BlaxZones.dll differ diff --git a/1.7/Assemblies/BlaxZones.pdb b/1.7/Assemblies/BlaxZones.pdb index 4654fab..103ce33 100644 Binary files a/1.7/Assemblies/BlaxZones.pdb and b/1.7/Assemblies/BlaxZones.pdb differ diff --git a/Languages/English/Keyed/BlaxZones_Tab.xml b/Languages/English/Keyed/BlaxZones_Tab.xml index a42cd81..4392cad 100644 --- a/Languages/English/Keyed/BlaxZones_Tab.xml +++ b/Languages/English/Keyed/BlaxZones_Tab.xml @@ -8,9 +8,7 @@ Deliveries try the zone with the highest priority first. Zones with the same priority go oldest first. Orbital trade lands here What you buy from orbital traders, and the silver from selling, lands here when the item filter allows it. - Also Blax Slaves payouts (ransom, buy-back, wages). - "Route orbital trade" is off in the mod settings, so nothing lands here now. - "Route orbital trade" is off in the mod settings, so orbital trade doesn't land here now. Blax Slaves payouts still do. + "Route orbital trade" is off in the mod settings, so orbital trade doesn't land here now. Caravans camp here Trader caravans and tribute collectors camp next to this zone instead of a random spot outside the colony. Visitor groups don't. "Caravans may camp at zones" is off in the mod settings, so no caravan camps here now. diff --git a/Source/BlaxZones/ITab_Delivery.cs b/Source/BlaxZones/ITab_Delivery.cs index e9f7fa6..a931d98 100644 --- a/Source/BlaxZones/ITab_Delivery.cs +++ b/Source/BlaxZones/ITab_Delivery.cs @@ -8,7 +8,7 @@ namespace BlaxZones { /// /// Package Tab. The delivery zone tab: priority dropdown (Low to Critical), source checkboxes - /// (orbital in 1.0; its tooltip adds "Also Blax Slaves payouts" while Compat.SlavesActive), the + /// (orbital in 1.0), the /// "Caravans camp here" checkbox and ThingFilterUI.DoThingFilterConfigWindow under /// DeliveryFilters.Parent. /// @@ -129,11 +129,8 @@ namespace BlaxZones public static string OrbitalTip() { string tip = "BlaxZones_AcceptOrbitalTip".Translate(); - bool slaves = Compat.SlavesActive; - if (slaves) - tip += "\n\n" + "BlaxZones_AcceptOrbitalSlavesTip".Translate(); if (!BlaxZonesMod.S.routeOrbital) - tip += "\n\n" + (slaves ? "BlaxZones_AcceptOrbitalOffSlavesTip" : "BlaxZones_AcceptOrbitalOffTip").Translate(); + tip += "\n\n" + "BlaxZones_AcceptOrbitalOffTip".Translate(); return tip; } diff --git a/Tests/BlaxZonesTests/Source/RouterTests.cs b/Tests/BlaxZonesTests/Source/RouterTests.cs index 9851f49..aa7dbac 100644 --- a/Tests/BlaxZonesTests/Source/RouterTests.cs +++ b/Tests/BlaxZonesTests/Source/RouterTests.cs @@ -60,7 +60,7 @@ namespace BlaxZonesTests T.Check(ZonesApi.TryFindDropSpot(map, steel, out cell) && zone.cells.Contains(cell), "ZonesApi refused steel with the checkbox back on"); } - [BlaxTest("router: ZonesApi ignores Route orbital trade, so Blax Slaves payouts still land in the zone")] + [BlaxTest("router: ZonesApi does not read Route orbital trade (current behaviour, owner decision open)")] public static void ApiIgnoresRouteOrbital() { Map map = Fixtures.Map; @@ -68,7 +68,7 @@ namespace BlaxZonesTests Zone_Delivery zone = Fixtures.DeliveryZone(Fixtures.TestArea(2, 2)); Fixtures.Settings.routeOrbital = false; T.Check(ZonesApi.TryFindDropSpot(map, Fixtures.Stack(ThingDefOf.Silver, 100), out IntVec3 cell) && zone.cells.Contains(cell), - "ZonesApi returned " + cell + " for silver with Route orbital trade off; the orbital tooltip says Slaves payouts still land"); + "ZonesApi returned " + cell + " for silver with Route orbital trade off; ZonesApi callers are not gated by the setting today"); } [BlaxTest("router: with overflowRadius 1 the overflow search ends and uses radius 5")] diff --git a/Tests/BlaxZonesTests/Source/TabTests.cs b/Tests/BlaxZonesTests/Source/TabTests.cs index 7e6d7d3..ab2ca93 100644 --- a/Tests/BlaxZonesTests/Source/TabTests.cs +++ b/Tests/BlaxZonesTests/Source/TabTests.cs @@ -22,8 +22,8 @@ namespace BlaxZonesTests private static readonly string[] TabKeys = { "BlaxZones_TabDelivery", "BlaxZones_PriorityTip", - "BlaxZones_AcceptOrbital", "BlaxZones_AcceptOrbitalTip", "BlaxZones_AcceptOrbitalSlavesTip", "BlaxZones_AcceptOrbitalOffTip", - "BlaxZones_AcceptOrbitalOffSlavesTip", "BlaxZones_CampHere", "BlaxZones_CampHereTip", "BlaxZones_CampHereOffTip", "BlaxZones_CampHereStandDownTip", + "BlaxZones_AcceptOrbital", "BlaxZones_AcceptOrbitalTip", "BlaxZones_AcceptOrbitalOffTip", + "BlaxZones_CampHere", "BlaxZones_CampHereTip", "BlaxZones_CampHereOffTip", "BlaxZones_CampHereStandDownTip", "BlaxZones_CopySettings", "BlaxZones_CopySettingsDesc", "BlaxZones_PasteSettings", "BlaxZones_PasteSettingsDesc", "BlaxZones_SettingsCopied", "BlaxZones_SettingsPasted", "BlaxZones_NothingCopied", }; @@ -315,26 +315,27 @@ namespace BlaxZonesTests T.Equal("BlaxZones_TabDelivery", new ITab_Delivery().labelKey, "labelKey of a new tab"); } - [BlaxTest("tab: the orbital tooltip adds the Blax Slaves line only while Slaves is active")] + [BlaxTest("tab: the orbital tooltip promises nothing about Blax Slaves, which has no payouts yet")] public static void SlavesTooltip() { - string slavesLine = "BlaxZones_AcceptOrbitalSlavesTip".Translate(); Fixtures.OnCleanup(() => Compat.SimulatedActive.Remove(Compat.BlaxSlaves)); - bool slavesReallyActive = ModLister.GetActiveModWithIdentifier(Compat.BlaxSlaves, ignorePostfix: true) != null; - if (slavesReallyActive) - T.Info("Blax Slaves is loaded in this run; the tooltip-without-Slaves check is skipped"); - else - T.Check(!ITab_Delivery.OrbitalTip().Contains(slavesLine), "Slaves line shown without Blax Slaves"); - Compat.SimulatedActive.Add(Compat.BlaxSlaves); - T.Check(ITab_Delivery.OrbitalTip().Contains(slavesLine), "Slaves line missing while Blax Slaves is active"); + foreach (bool route in new[] { true, false }) + { + Fixtures.Settings.routeOrbital = route; + Compat.SimulatedActive.Remove(Compat.BlaxSlaves); + string without = ITab_Delivery.OrbitalTip(); + Compat.SimulatedActive.Add(Compat.BlaxSlaves); + string with = ITab_Delivery.OrbitalTip(); + T.Equal(without, with, "orbital tooltip changes with Blax Slaves active (routeOrbital " + route + ")"); + T.Check(!with.Contains("Blax Slaves"), "orbital tooltip names Blax Slaves"); + } } [BlaxTest("tab: the orbital and camp tooltips say when the mod settings turn them off")] public static void SettingsOffTooltips() { BlaxZonesSettings s = Fixtures.Settings; - // With Blax Slaves loaded in this run the off note names its payouts (tested below). - string orbitalOff = (Compat.SlavesActive ? "BlaxZones_AcceptOrbitalOffSlavesTip" : "BlaxZones_AcceptOrbitalOffTip").Translate(); + string orbitalOff = "BlaxZones_AcceptOrbitalOffTip".Translate(); string campOff = "BlaxZones_CampHereOffTip".Translate(); s.routeOrbital = true; s.campAtZones = true; @@ -345,20 +346,5 @@ namespace BlaxZonesTests T.Check(ITab_Delivery.OrbitalTip().Contains(orbitalOff), "orbital off note missing while routing is off"); T.Check(ITab_Delivery.CampTip().Contains(campOff), "camp off note missing while camping is off"); } - - [BlaxTest("tab: with Blax Slaves active and orbital routing off, the tooltip says Slaves payouts still land")] - public static void SlavesOffTooltip() - { - string plainOff = "BlaxZones_AcceptOrbitalOffTip".Translate(); - string slavesOff = "BlaxZones_AcceptOrbitalOffSlavesTip".Translate(); - Fixtures.OnCleanup(() => Compat.SimulatedActive.Remove(Compat.BlaxSlaves)); - Compat.SimulatedActive.Add(Compat.BlaxSlaves); - Fixtures.Settings.routeOrbital = false; - string tip = ITab_Delivery.OrbitalTip(); - T.Check(tip.Contains(slavesOff), "the off note doesn't say Blax Slaves payouts still land"); - T.Check(!tip.Contains(plainOff), "the tooltip says nothing lands here, though Blax Slaves payouts still do"); - Fixtures.Settings.routeOrbital = true; - T.Check(!ITab_Delivery.OrbitalTip().Contains(slavesOff), "orbital off note while routing is on"); - } } }