Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
update mod to 2.6.2
Browse files Browse the repository at this point in the history
fix the production queue
  • Loading branch information
LangLangBart committed Sep 27, 2022
1 parent 97ef486 commit f49391d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion gui/pregame/ProjectInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var g_ProjectInformation = {
"caption": getBuildString()
},
"productDescription": {
"caption": setStringTags(translate("Alpha XXV: Yaunā"), { "font": "sans-bold-18" }) + "\n" +
"caption": setStringTags(translate("Alpha XXVI: Zhuangzi"), { "font": "sans-bold-18" }) + "\n" +
setStringTags(translate("boonGUI" + " " + Engine.GetEngineInfo().mods.find(obj => obj.name == "boonGUI").version), { "font": "sans-16" })
}
};
Expand Down
2 changes: 1 addition & 1 deletion gui/session/stats/BoonGUIStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class BoonGUIStats
this.mapCache = new MapCache();
this.shortGameInfoLabel.caption = Engine.IsAtlasRunning() ? "" : sprintf("%(icon_alpha)s %(AlphaText)s %(icon_map)s %(mapName)s%(mapSize)s%(biome)s %(icon_pop)s %(pop)s%(duration)s%(rating)s", {
"icon_alpha": '[icon="icon_alpha" displace="1 5"]',
"AlphaText": "Alpha XXV",
"AlphaText": "Alpha XXVI",
"icon_map": '[icon="icon_map" displace="2 6"]',
"mapName": this.mapCache.translateMapName(this.mapCache.getTranslatableMapName(g_InitAttributes.mapType, g_InitAttributes.map)),
"mapSize": g_InitAttributes.mapType == "random" ? " - " + g_MapSizes.Name[g_MapSizes.Tiles.indexOf(g_InitAttributes.settings.Size)] : "",
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boonGUI",
"version": "2.6.1",
"version": "2.6.2",
"label": "boonGUI",
"description": "Enhance the observer's experience with an additional stats overlay.",
"ignoreInCompatibilityChecks": true,
Expand Down
31 changes: 13 additions & 18 deletions simulation/components/GuiInterface~boongui.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,34 +362,29 @@ GuiInterface.prototype.boongui_GetOverlay = function(_, { g_IsObserver, g_Viewed
}

}

if (cmpProductionQueue)
{
for (const queue of cmpProductionQueue.queue)
{

const cmpTrainer = Engine.QueryInterface(queue.producer, IID_Trainer);
const cmpResearcher = Engine.QueryInterface(queue.producer, IID_Researcher);
const mode = "production";
if (!queue.started || queue.paused) continue;
// TODO: where is timeRemaining ?
const { timeRemaining, timeTotal } = queue;
const progress = 1;
if (queue.originalItem)
if (queue.entity)
{
const template = queue.originalItem.templateName;
const mode = "production";
const { count, progress, "unitTemplate": template } = cmpTrainer.GetBatch(queue.entity);
const templateType = "unit";
const count = queue.originalItem.count;
cached.queue.add({ mode, templateType, entity, template, count, progress });
}

// TODO: where is tech template ?
// if (queue.technology)
// {
// const mode = "production";
// const templateType = "technology";
// const template = queue.technologyTemplate;
// const count = 1;
// cached.queue.add({ mode, templateType, entity, template, count, progress });
// }

if (queue.technology)
{
const { progress, "templateName": template } = cmpResearcher.GetResearchingTechnology(queue.technology);
const templateType = "technology";
const count = 1;
cached.queue.add({ mode, templateType, entity, template, count, progress });
}
}
}

Expand Down

0 comments on commit f49391d

Please sign in to comment.