Skip to content

Commit

Permalink
Bei Produktionen werden die Filltypes jetzt gesplittet angezeigt nach…
Browse files Browse the repository at this point in the history
… nur Eingang oder Ausgang oder beides
  • Loading branch information
Achimobil committed Dec 6, 2023
1 parent 7308e91 commit 6f7d9f0
Show file tree
Hide file tree
Showing 9 changed files with 284 additions and 215 deletions.
62 changes: 58 additions & 4 deletions InfoDisplayExtension.lua
Original file line number Diff line number Diff line change
Expand Up @@ -204,31 +204,84 @@ function InfoDisplayExtension:updateInfoProductionPoint(superFunc, infoTable)
local fillType, fillLevel, fillLevelCapacity = nil
local fillTypesDisplayed = false

table.insert(infoTable, self.infoTables.storage)
--table.insert(infoTable, self.infoTables.storage)

-- temp list of input and output filltypes to show the three types seperately
local inputOutputType = {};
local inputOutputTypeInfo = {};

local titleAdded = false;
for i = 1, #self.inputFillTypeIdsArray do
fillType = self.inputFillTypeIdsArray[i]

local isOutput = false;
for i = 1, #self.outputFillTypeIdsArray do
fillType2 = self.outputFillTypeIdsArray[i]
if fillType == fillType2 then
inputOutputType[fillType] = true
isOutput = true;
end
end

fillLevel = self:getFillLevel(fillType)
fillLevelCapacity = self:getCapacity(fillType)

if fillLevel > 1 then
fillTypesDisplayed = true
local fillType = g_fillTypeManager:getFillTypeByIndex(fillType);
if isOutput then
table.insert(inputOutputTypeInfo, {
title = fillType.title,
text = InfoDisplayExtension:formatCapacity(fillLevel, fillLevelCapacity, 0, fillType.unitShort)
})
else
if not titleAdded then
table.insert(infoTable, {
accentuate = true,
title = g_i18n:getText("ui_productions_buildingStorage") .. " - " .. g_i18n:getText("infohud_Input")
})
titleAdded = true;
end
table.insert(infoTable, {
title = fillType.title,
text = InfoDisplayExtension:formatCapacity(fillLevel, fillLevelCapacity, 0, fillType.unitShort)
})
end
end
end

titleAdded = false;
for i = 1, #inputOutputTypeInfo do
if not titleAdded then
table.insert(infoTable, {
title = fillType.title,
text = InfoDisplayExtension:formatCapacity(fillLevel, fillLevelCapacity, 0, fillType.unitShort)
accentuate = true,
title = g_i18n:getText("ui_productions_buildingStorage") .. " - " .. g_i18n:getText("infohud_both")
})
titleAdded = true;
end

inputOutputTypeInfoItem = inputOutputTypeInfo[i]
table.insert(infoTable, inputOutputTypeInfoItem)
end

titleAdded = false;
for i = 1, #self.outputFillTypeIdsArray do
fillType = self.outputFillTypeIdsArray[i]
fillLevel = self:getFillLevel(fillType)
fillLevelCapacity = self:getCapacity(fillType)

if fillLevel > 1 then
if fillLevel > 1 and inputOutputType[fillType] == nil then
fillTypesDisplayed = true
local fillType = g_fillTypeManager:getFillTypeByIndex(fillType);

if not titleAdded then
table.insert(infoTable, {
accentuate = true,
title = g_i18n:getText("ui_productions_buildingStorage") .. " - " .. g_i18n:getText("infohud_Output")
})
titleAdded = true;
end

table.insert(infoTable, {
title = fillType.title,
text = InfoDisplayExtension:formatCapacity(fillLevel, fillLevelCapacity, 0, fillType.unitShort)
Expand All @@ -237,6 +290,7 @@ function InfoDisplayExtension:updateInfoProductionPoint(superFunc, infoTable)
end

if not fillTypesDisplayed then
table.insert(infoTable, self.infoTables.storage)
table.insert(infoTable, self.infoTables.storageEmpty)
end

Expand Down
3 changes: 2 additions & 1 deletion modDesc.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="79">
<author>Achimobil</author>
<version>1.7.0.1</version>
<version>1.7.0.2</version>
<title>
<de>Info Display Erweiterung</de>
<en>Info Display Extension</en>
Expand Down Expand Up @@ -30,6 +30,7 @@ Das Verändern oder erneutes hochladen, ob ganz oder in Teilen, ist nicht gestat
Fehler und Anregungen gerne auf <a href="https://github.com/Achimobil/FS22_InfoDisplayExtension">GitHub</a>
Changelog
1.7.0.2 - Bei Produktionen werden die Filltypes jetzt gesplittet angezeigt nach nur Eingang oder Ausgang oder beides
1.7.0.1 - Übersetzungen PL verbessert. Jetzt auch übersetzt in BR und FR, danke an die Übersetzer
1.7.0.0
Expand Down
62 changes: 32 additions & 30 deletions translations/translation_br.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,38 @@
<l10n>
<translationContributors>Myiamoto86</translationContributors>
<texts>
<text name="infoDisplayExtension_TOTAL_CAPACITY_TITLE" text="Info de capacidade" />
<text name="infoDisplayExtension_USED_CAPACITY" text="Capacidade utilizada" />
<text name="infoDisplayExtension_TOTAL_CAPACITY" text="Capacidade total" />
<text name="infoDisplayExtension_MORE_ITEMS" text="Mais" />
<text name="infoDisplayExtension_MANURE_HEAP_CONNECTED" text="Conectado a:" />
<text name="Revamp_Store" text="Armazenado" />
<text name="Revamp_Spawn" text="Desova" />
<text name="infohud_diameter" text="Diâmetro" />
<text name="infohud_growthState" text="Estágio de crescimento" />
<text name="infohud_ageInHours" text="A época" />
<text name="infohud_fullGrown" text="Totalmente crescido" />
<text name="infohud_missing" text="Faltando" />
<text name="infohud_remaingTime" text="Tempo restante" />
<text name="infoDisplayExtension_currentPower" text="Potência:" />

<text name="infoDisplayExtension_TOTAL_CAPACITY_TITLE" text="Info de capacidade"/>
<text name="infoDisplayExtension_USED_CAPACITY" text="Capacidade utilizada"/>
<text name="infoDisplayExtension_TOTAL_CAPACITY" text="Capacidade total"/>
<text name="infoDisplayExtension_MORE_ITEMS" text="Mais"/>
<text name="infoDisplayExtension_MANURE_HEAP_CONNECTED" text="Conectado a:"/>
<text name="Revamp_Store" text="Armazenado"/>
<text name="Revamp_Spawn" text="Desova"/>
<text name="infohud_diameter" text="Diâmetro"/>
<text name="infohud_growthState" text="Estágio de crescimento"/>
<text name="infohud_ageInHours" text="A época"/>
<text name="infohud_fullGrown" text="Totalmente crescido"/>
<text name="infohud_missing" text="Faltando"/>
<text name="infohud_remaingTime" text="Tempo restante"/>
<text name="infoDisplayExtension_currentPower" text="Potência:"/>
<text name="infohud_Input" text="Input"/>
<text name="infohud_both" text="Input and Output"/>
<text name="infohud_Output" text="Output"/>
<!-- Animal Texts -->
<text name="infoDisplayExtension_animals_health" text="Saúde" />
<text name="infoDisplayExtension_animals_healthRange" text="Saúde" />
<text name="infoDisplayExtension_animals_duration" text="Tempo de reprodução" />
<text name="infoDisplayExtension_animals_durationRange" text="Tempo de reprodução" />
<text name="infoDisplayExtension_animals_reproduction" text="Taxa de reprodução" />
<text name="infoDisplayExtension_animals_reproductionRange" text="Taxa de reprodução" />
<text name="infoDisplayExtension_animals_beforeReproduction" text="Maturidade sexual" />
<text name="infoDisplayExtension_animals_beforeReproductionRange" text="Maturidade sexual" />
<text name="infoDisplayExtension_animals_nextBirthIn" text="Filhotes em" />
<text name="infoDisplayExtension_animals_dirt" text="Limpeza" />
<text name="infoDisplayExtension_animals_dirtRange" text="Limpeza" />
<text name="infoDisplayExtension_animals_riding" text="Cavalgado" />
<text name="infoDisplayExtension_animals_ridingRange" text="Cavalgado" />
<text name="infoDisplayExtension_animals_fitness" text="Fitness" />
<text name="infoDisplayExtension_animals_fitnessRange" text="Fitness" />
<text name="infoDisplayExtension_animals_health" text="Saúde"/>
<text name="infoDisplayExtension_animals_healthRange" text="Saúde"/>
<text name="infoDisplayExtension_animals_duration" text="Tempo de reprodução"/>
<text name="infoDisplayExtension_animals_durationRange" text="Tempo de reprodução"/>
<text name="infoDisplayExtension_animals_reproduction" text="Taxa de reprodução"/>
<text name="infoDisplayExtension_animals_reproductionRange" text="Taxa de reprodução"/>
<text name="infoDisplayExtension_animals_beforeReproduction" text="Maturidade sexual"/>
<text name="infoDisplayExtension_animals_beforeReproductionRange" text="Maturidade sexual"/>
<text name="infoDisplayExtension_animals_nextBirthIn" text="Filhotes em"/>
<text name="infoDisplayExtension_animals_dirt" text="Limpeza"/>
<text name="infoDisplayExtension_animals_dirtRange" text="Limpeza"/>
<text name="infoDisplayExtension_animals_riding" text="Cavalgado"/>
<text name="infoDisplayExtension_animals_ridingRange" text="Cavalgado"/>
<text name="infoDisplayExtension_animals_fitness" text="Fitness"/>
<text name="infoDisplayExtension_animals_fitnessRange" text="Fitness"/>
</texts>
</l10n>
62 changes: 32 additions & 30 deletions translations/translation_de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,38 @@
<l10n>
<translationContributors>Achimobil</translationContributors>
<texts>
<text name="infoDisplayExtension_TOTAL_CAPACITY_TITLE" text="Lagerkapazität" />
<text name="infoDisplayExtension_USED_CAPACITY" text="Benutzte Kapazität" />
<text name="infoDisplayExtension_TOTAL_CAPACITY" text="Gesamtkapazität" />
<text name="infoDisplayExtension_MORE_ITEMS" text="weitere" />
<text name="infoDisplayExtension_MANURE_HEAP_CONNECTED" text="Verbunden mit" />
<text name="Revamp_Store" text="Einlagern" />
<text name="Revamp_Spawn" text="Auslagern" />
<text name="infohud_diameter" text="Durchmesser" />
<text name="infohud_growthState" text="Wachstumsphase" />
<text name="infohud_ageInHours" text="Alter" />
<text name="infohud_fullGrown" text="Ausgewachsen" />
<text name="infohud_missing" text="fehlt" />
<text name="infohud_remaingTime" text="Restzeit" />
<text name="infoDisplayExtension_currentPower" text="Leistung" />

<text name="infoDisplayExtension_TOTAL_CAPACITY_TITLE" text="Lagerkapazität"/>
<text name="infoDisplayExtension_USED_CAPACITY" text="Benutzte Kapazität"/>
<text name="infoDisplayExtension_TOTAL_CAPACITY" text="Gesamtkapazität"/>
<text name="infoDisplayExtension_MORE_ITEMS" text="weitere"/>
<text name="infoDisplayExtension_MANURE_HEAP_CONNECTED" text="Verbunden mit"/>
<text name="Revamp_Store" text="Einlagern"/>
<text name="Revamp_Spawn" text="Auslagern"/>
<text name="infohud_diameter" text="Durchmesser"/>
<text name="infohud_growthState" text="Wachstumsphase"/>
<text name="infohud_ageInHours" text="Alter"/>
<text name="infohud_fullGrown" text="Ausgewachsen"/>
<text name="infohud_missing" text="fehlt"/>
<text name="infohud_remaingTime" text="Restzeit"/>
<text name="infoDisplayExtension_currentPower" text="Leistung"/>
<text name="infohud_Input" text="Eingang"/>
<text name="infohud_both" text="Eingang und Ausgang"/>
<text name="infohud_Output" text="Ausgang"/>
<!-- Animal Texts -->
<text name="infoDisplayExtension_animals_health" text="Gesundheit" />
<text name="infoDisplayExtension_animals_healthRange" text="Gesundheit" />
<text name="infoDisplayExtension_animals_duration" text="Reproduktionzeit" />
<text name="infoDisplayExtension_animals_durationRange" text="Reproduktionzeit" />
<text name="infoDisplayExtension_animals_reproduction" text="Reproduktionsrate" />
<text name="infoDisplayExtension_animals_reproductionRange" text="Reproduktionsrate" />
<text name="infoDisplayExtension_animals_beforeReproduction" text="Geschlechtsreife" />
<text name="infoDisplayExtension_animals_beforeReproductionRange" text="Geschlechtsreife" />
<text name="infoDisplayExtension_animals_nextBirthIn" text="Nachwuchs in" />
<text name="infoDisplayExtension_animals_dirt" text="Sauberkeit" />
<text name="infoDisplayExtension_animals_dirtRange" text="Sauberkeit" />
<text name="infoDisplayExtension_animals_riding" text="Reiten" />
<text name="infoDisplayExtension_animals_ridingRange" text="Reiten" />
<text name="infoDisplayExtension_animals_fitness" text="Fitness" />
<text name="infoDisplayExtension_animals_fitnessRange" text="Fitness" />
<text name="infoDisplayExtension_animals_health" text="Gesundheit"/>
<text name="infoDisplayExtension_animals_healthRange" text="Gesundheit"/>
<text name="infoDisplayExtension_animals_duration" text="Reproduktionzeit"/>
<text name="infoDisplayExtension_animals_durationRange" text="Reproduktionzeit"/>
<text name="infoDisplayExtension_animals_reproduction" text="Reproduktionsrate"/>
<text name="infoDisplayExtension_animals_reproductionRange" text="Reproduktionsrate"/>
<text name="infoDisplayExtension_animals_beforeReproduction" text="Geschlechtsreife"/>
<text name="infoDisplayExtension_animals_beforeReproductionRange" text="Geschlechtsreife"/>
<text name="infoDisplayExtension_animals_nextBirthIn" text="Nachwuchs in"/>
<text name="infoDisplayExtension_animals_dirt" text="Sauberkeit"/>
<text name="infoDisplayExtension_animals_dirtRange" text="Sauberkeit"/>
<text name="infoDisplayExtension_animals_riding" text="Reiten"/>
<text name="infoDisplayExtension_animals_ridingRange" text="Reiten"/>
<text name="infoDisplayExtension_animals_fitness" text="Fitness"/>
<text name="infoDisplayExtension_animals_fitnessRange" text="Fitness"/>
</texts>
</l10n>
62 changes: 32 additions & 30 deletions translations/translation_en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,38 @@
<l10n>
<translationContributors>Achimobil</translationContributors>
<texts>
<text name="infoDisplayExtension_TOTAL_CAPACITY_TITLE" text="Capacity Info" />
<text name="infoDisplayExtension_USED_CAPACITY" text="Used Capacity" />
<text name="infoDisplayExtension_TOTAL_CAPACITY" text="Total Capacity" />
<text name="infoDisplayExtension_MORE_ITEMS" text="more" />
<text name="infoDisplayExtension_MANURE_HEAP_CONNECTED" text="Connected to" />
<text name="Revamp_Store" text="Store" />
<text name="Revamp_Spawn" text="Spawn" />
<text name="infohud_diameter" text="Diameter" />
<text name="infohud_growthState" text="Growth Stage" />
<text name="infohud_ageInHours" text="Age" />
<text name="infohud_fullGrown" text="Fully Grown" />
<text name="infohud_missing" text="missing" />
<text name="infohud_remaingTime" text="Remaining Time" />
<text name="infoDisplayExtension_currentPower" text="Power" />

<text name="infoDisplayExtension_TOTAL_CAPACITY_TITLE" text="Capacity Info"/>
<text name="infoDisplayExtension_USED_CAPACITY" text="Used Capacity"/>
<text name="infoDisplayExtension_TOTAL_CAPACITY" text="Total Capacity"/>
<text name="infoDisplayExtension_MORE_ITEMS" text="more"/>
<text name="infoDisplayExtension_MANURE_HEAP_CONNECTED" text="Connected to"/>
<text name="Revamp_Store" text="Store"/>
<text name="Revamp_Spawn" text="Spawn"/>
<text name="infohud_diameter" text="Diameter"/>
<text name="infohud_growthState" text="Growth Stage"/>
<text name="infohud_ageInHours" text="Age"/>
<text name="infohud_fullGrown" text="Fully Grown"/>
<text name="infohud_missing" text="missing"/>
<text name="infohud_remaingTime" text="Remaining Time"/>
<text name="infoDisplayExtension_currentPower" text="Power"/>
<text name="infohud_Input" text="Input"/>
<text name="infohud_both" text="Input and Output"/>
<text name="infohud_Output" text="Output"/>
<!-- Animal Texts -->
<text name="infoDisplayExtension_animals_health" text="Health" />
<text name="infoDisplayExtension_animals_healthRange" text="Health" />
<text name="infoDisplayExtension_animals_duration" text="Reproduction Time" />
<text name="infoDisplayExtension_animals_durationRange" text="Reproduction Time" />
<text name="infoDisplayExtension_animals_reproduction" text="Reproduction Rate" />
<text name="infoDisplayExtension_animals_reproductionRange" text="Reproduction Rate" />
<text name="infoDisplayExtension_animals_beforeReproduction" text="Sexual Maturity" />
<text name="infoDisplayExtension_animals_beforeReproductionRange" text="Sexual Maturity" />
<text name="infoDisplayExtension_animals_nextBirthIn" text="Offspring in" />
<text name="infoDisplayExtension_animals_dirt" text="Cleanliness" />
<text name="infoDisplayExtension_animals_dirtRange" text="Cleanliness" />
<text name="infoDisplayExtension_animals_riding" text="Riding" />
<text name="infoDisplayExtension_animals_ridingRange" text="Riding" />
<text name="infoDisplayExtension_animals_fitness" text="Fitness" />
<text name="infoDisplayExtension_animals_fitnessRange" text="Fitness" />
<text name="infoDisplayExtension_animals_health" text="Health"/>
<text name="infoDisplayExtension_animals_healthRange" text="Health"/>
<text name="infoDisplayExtension_animals_duration" text="Reproduction Time"/>
<text name="infoDisplayExtension_animals_durationRange" text="Reproduction Time"/>
<text name="infoDisplayExtension_animals_reproduction" text="Reproduction Rate"/>
<text name="infoDisplayExtension_animals_reproductionRange" text="Reproduction Rate"/>
<text name="infoDisplayExtension_animals_beforeReproduction" text="Sexual Maturity"/>
<text name="infoDisplayExtension_animals_beforeReproductionRange" text="Sexual Maturity"/>
<text name="infoDisplayExtension_animals_nextBirthIn" text="Offspring in"/>
<text name="infoDisplayExtension_animals_dirt" text="Cleanliness"/>
<text name="infoDisplayExtension_animals_dirtRange" text="Cleanliness"/>
<text name="infoDisplayExtension_animals_riding" text="Riding"/>
<text name="infoDisplayExtension_animals_ridingRange" text="Riding"/>
<text name="infoDisplayExtension_animals_fitness" text="Fitness"/>
<text name="infoDisplayExtension_animals_fitnessRange" text="Fitness"/>
</texts>
</l10n>
Loading

0 comments on commit 6f7d9f0

Please sign in to comment.