Skip to content

Commit

Permalink
Hide on construction screen open
Browse files Browse the repository at this point in the history
This is ugly, and not really in the right place.  But I haven't found a better hook yet.
  • Loading branch information
jtsage committed Feb 20, 2022
1 parent a63b6f8 commit 92efa42
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Binary file modified FS22_ProductionInspector.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions src/ProductionInspector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ function ProductionInspector:updateProductions()
self.display_data = {unpack(new_data_table)}
end

function ProductionInspector:openConstructionScreen()
-- hack for construction screen showing blank box.
g_productionInspector.inspectBox:setVisible(false)
end

function ProductionInspector:draw()
if not self.isClient then
return
Expand Down
1 change: 1 addition & 0 deletions src/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ local function load(mission)
if mission:getIsClient() then
addModEventListener(modEnvironment)
FSBaseMission.registerActionEvents = Utils.appendedFunction(FSBaseMission.registerActionEvents, ProductionInspector.registerActionEvents);
FSBaseMission.onToggleConstructionScreen = Utils.prependedFunction(FSBaseMission.onToggleConstructionScreen, ProductionInspector.openConstructionScreen)
end
end

Expand Down
4 changes: 3 additions & 1 deletion src/modDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ v1.0.0.2
v1.0.0.3
- Separate percentage and fill level for input and output, add options for each
- Save config when using the visibility toggle key
v1.0.0.4
- Add optional indicators for output product destination (selling, storing, or distributing)
- Save config when using the visibility toggle key
- Hide on construction screen
]]></en>
<de><![CDATA[Production Inspector zeigt Ihre laufenden Produktionen auf einen Blick
Expand All @@ -53,6 +54,7 @@ v1.0.0.3
v1.0.0.4
- Fügen Sie optionale Indikatoren für den Bestimmungsort des Ausgangsprodukts (Verkauf, Lagerung oder Verteilung) hinzu.
- Speichern der Konfiguration bei Verwendung der Sichtbarkeitsumschalttaste
- Auf dem Konstruktionsbildschirm ausblenden
]]></de>
</description>
<author>JTSage</author>
Expand Down

0 comments on commit 92efa42

Please sign in to comment.