Skip to content

Commit 64ea5da

Browse files
committed
fix typos
1 parent 63d2512 commit 64ea5da

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed

autociv_data/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AutoCiv
1+
# AutoCivP
22
This mod is an aggregation of features meant to enhance the 0 A.D. game experience. I usually implement these extra features as they come up with no general plan in mind.
33

44
## Feature list
@@ -72,7 +72,7 @@ There are three ways:
7272

7373
## Mod compatibility(s)
7474
The mod is compatible with:
75-
- 0 A.D 0.0.26
75+
- 0 A.D 0.0.26 and 0.27.0
7676
- Probable to work with the following mods
7777
- boonGUI mod
7878
- star mod

gui/lobby/lobby~autociv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ var g_autociv_hotkeys = {
5858
"autociv.lobby.focus.gameList": autociv_focus.gameList,
5959
"autociv.lobby.gameList.selected.join": () => g_LobbyHandler.lobbyPage.lobbyPage.buttons.joinButton.onPress(),
6060
"autociv.open.autociv_readme": ev => Engine.PushGuiPage("page_autociv_readme.xml"),
61-
"autociv.lobby.host": ev => g_LobbyHandler.lobbyPage.lobbyPage.buttons.hostButton.onPress(),
61+
"autociv.lobby.host": ev => g_LobbyHandler.lobbyPage.lobbyPage.buttons.hostButton.onPress(false),
6262
"summary": ev => autociv_showLastGameSummary(),
6363
/**
6464
* Can't unfocus chat input without mouse, use cancel hotkey to unfocus from it

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "autocivp",
3-
"version": "1.0.65",
3+
"version": "1.0.66",
44
"label": "autocivp",
55
"url": "https://wildfiregames.com/forum/topic/107371-autociv-add-ons-profiles-jitsi-team-call",
66
"description": "Features: game profiles",

simulation/components/GuiInterface~autociv.js

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,15 @@ GuiInterface.prototype.autociv_GetStatsOverlay = function ()
182182
"players": []
183183
};
184184

185-
186-
try {
187-
// no errors should be thrown in alpha 27 . quick fix
188-
189-
190185
const cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager);
191186
const numPlayers = cmpPlayerManager.GetNumPlayers();
192187
for (let player = 0; player < numPlayers; ++player)
193188
{
194189
const playerEnt = cmpPlayerManager.GetPlayerByID(player);
195190
const cmpPlayer = Engine.QueryInterface(playerEnt, IID_Player);
196-
const cmpIdentity = Engine.QueryInterface(playerEnt, IID_Identity);
191+
const comDiplomacy = QueryPlayerIDInterface(player, IID_Diplomacy);
192+
const cmpIdentity = Engine.QueryInterface(playerEnt, IID_Identity);
193+
197194

198195
// Work out which phase we are in.
199196
let phase = 0;
@@ -209,33 +206,26 @@ try {
209206
}
210207

211208
const cmpPlayerStatisticsTracker = QueryPlayerIDInterface(player, IID_StatisticsTracker);
212-
const classCounts = cmpTechnologyManager?.GetClassCounts();
213-
const cmpDiplomacy = Engine.QueryInterface(playerEnt, IID_Diplomacy);
209+
const classCounts = cmpTechnologyManager?.GetClassCounts()
214210

215211
ret.players.push({
216212
"name": cmpIdentity.GetName(),
217213
"popCount": cmpPlayer.GetPopulationCount(),
218214
"resourceCounts": cmpPlayer.GetResourceCounts(),
219-
"state": cmpPlayer.GetState(),
220-
"team": cmpDiplomacy.GetTeam(),
221-
"hasSharedLos": cmpDiplomacy.HasSharedLos(),
215+
"state": cmpPlayer?.GetState() ?? "",
216+
"team": comDiplomacy.GetTeam(),
217+
"hasSharedLos": comDiplomacy.HasSharedLos(),
222218
"phase": phase,
223219
"researchedTechsCount": cmpTechnologyManager?.GetResearchedTechs().size ?? 0,
224220
"classCounts_Support": classCounts?.Support ?? 0,
225221
"classCounts_Infantry": classCounts?.Infantry ?? 0,
226222
"classCounts_Cavalry": classCounts?.Cavalry ?? 0,
227223
"classCounts_Siege": (classCounts?.Siege ?? 0),
228224
"classCounts_Champion": (classCounts?.Champion ?? 0),
229-
"enemyUnitsKilledTotal": cmpPlayerStatisticsTracker?.enemyUnitsKilled.Unit ?? 0
225+
"enemyUnitsKilledTotal": cmpPlayerStatisticsTracker?.enemyUnitsKilled.total ?? 0
230226
});
231227
}
232228

233-
} catch (error) {
234-
return false
235-
236-
}
237-
238-
239229
return ret;
240230
};
241231

0 commit comments

Comments
 (0)