Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched to hidden Cable for Belts (with disable Setting) #825

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
3 changes: 3 additions & 0 deletions Languages/English/Keyed/AllKeyed_Settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<PRF_Settings_GeneralOptions_Header>General Options</PRF_Settings_GeneralOptions_Header>
<PRF_Settings_GeneralOptions_DSU_UseFuzzySearch_ToolTip>Toggle the use of the Fuzzy Search algorithm for the storage item view\nIf Active Fuzzy Search will be used, otherwise it will use exact matches.</PRF_Settings_GeneralOptions_DSU_UseFuzzySearch_ToolTip>
<PRF_Settings_GeneralOptions_DSU_UseFuzzySearch>Use Fuzzy-Search for the storage item view</PRF_Settings_GeneralOptions_DSU_UseFuzzySearch>

<PRF_Settings_GeneralOptions_PlaceConveyorCable_ToolTip>Toggle the automatic placement of a cable when constructing a conveyor belt.</PRF_Settings_GeneralOptions_PlaceConveyorCable_ToolTip>
<PRF_Settings_GeneralOptions_PlaceConveyorCable>Auto place cable with conveyor belt</PRF_Settings_GeneralOptions_PlaceConveyorCable>

<PRF.Common.ForbidOnPlacingDefault>Forbid items on placement</PRF.Common.ForbidOnPlacingDefault>
<PRF.Common.ForbidOnPlacingDefaultDesc>When enabled machine products will be automatically forbidden on placement.</PRF.Common.ForbidOnPlacingDefaultDesc>
Expand Down
8 changes: 4 additions & 4 deletions Source/ProjectRimFactory/Common/CompTransmitsPower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public ThingDef TransmitterDef
}
}
}
if (undergroundCable == null) undergroundCable = ThingDefOf.PowerConduit;
if (undergroundCable == null) undergroundCable = ThingDefOf.HiddenConduit;
}
return undergroundCable;
}
return p.transmitter ?? ThingDefOf.PowerConduit;
return p.transmitter ?? ThingDefOf.HiddenConduit;
}
}
public override void PostSpawnSetup(bool respawningAfterLoad)
Expand All @@ -66,7 +66,7 @@ public override void PostSpawnSetup(bool respawningAfterLoad)
break;
}
}
if (!isTransmitterHere)
if (!isTransmitterHere && Common.ProjectRimFactory_ModSettings.PRF_PlaceConveyorCable)
{
var conduit = GenSpawn.Spawn(TransmitterDef, parent.Position, parent.Map);
conduit.SetFaction(Faction.OfPlayer); // heh; don't forget
Expand Down Expand Up @@ -104,7 +104,7 @@ public CompProperties_TransmitsPower()
{
this.compClass = typeof(CompTransmitsPower);
}
public ThingDef transmitter = null; //ThingDefOf.PowerConduit;
public ThingDef transmitter = null; //ThingDefOf.HiddenConduit;
static public List<string> possibleUndergroundTransmitters;
}
}
11 changes: 11 additions & 0 deletions Source/ProjectRimFactory/Common/ProjectRimFactory_ModSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ private static void CSharpSettings(Listing_Standard list)
TooltipHandler.TipRegion(rect, "PRF_Settings_GeneralOptions_DSU_UseFuzzySearch_ToolTip".Translate());
Widgets.CheckboxLabeled(rect, "PRF_Settings_GeneralOptions_DSU_UseFuzzySearch".Translate(), ref PRF_UseFuzzySearch);
list.Gap();

rect = list.GetRect(20);
if (Mouse.IsOver(rect))
{
Widgets.DrawHighlight(rect);
}
TooltipHandler.TipRegion(rect, "PRF_Settings_GeneralOptions_PlaceConveyorCable_ToolTip".Translate());
Widgets.CheckboxLabeled(rect, "PRF_Settings_GeneralOptions_PlaceConveyorCable".Translate(), ref PRF_PlaceConveyorCable);
list.Gap();


}
Expand Down Expand Up @@ -113,6 +122,7 @@ private static ContainerRow ParseSettingRows(ModContentPack content)
private static bool PRF_LiteMode_last = false;
public static bool PRF_Patch_Reachability_CanReach = false;
public static bool PRF_UseFuzzySearch = true;
public static bool PRF_PlaceConveyorCable = true;

public override void ExposeData()
{
Expand All @@ -122,6 +132,7 @@ public override void ExposeData()
Scribe_Values.Look(ref PRF_LiteMode, "PRF_LiteMode", false);
Scribe_Values.Look(ref PRF_Patch_Reachability_CanReach, "PRF_Patch_Reachability_CanReach", false);
Scribe_Values.Look(ref PRF_UseFuzzySearch, "PRF_UseFuzzySearch", true);
Scribe_Values.Look(ref PRF_PlaceConveyorCable, "PRF_PlaceConveyorCable", true);
PRF_LiteMode_last = PRF_LiteMode;
}

Expand Down