Skip to content

Commit ffde75c

Browse files
committed
Merge branch 'develop' into release-1.0
2 parents 3e35386 + 3e4950c commit ffde75c

File tree

8 files changed

+76
-1123
lines changed

8 files changed

+76
-1123
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ You should download and install this mod via the Planetary Annihilation TITANS i
1919

2020
## FAQ
2121

22-
**You achieved this by cleanly appending your content to the existing files?**
23-
24-
Christ, no. I'm shadowing both HTML and JS files for live_game_players. I tried to do it properly, I really did (don't hurt me mikey!) but I don't know a damn thing about JS and couldn't get it working. You can find my content by searching for "ALL IN ONE TAB" in the files.
25-
26-
At least the CSS is done cleanly. You're welcome.
27-
2822
**Why didn't you include total unit count?**
2923

3024
Because I wanted to avoid having the ALL tab be any wider than the other tabs. I considered total unit count to be the most useless stat and so it was dropped.
@@ -35,4 +29,8 @@ I've tried to ensure this is very unlikely to happen, but because the columns ar
3529

3630
**Do you support translations?**
3731

38-
No. When you include translations in a Planetary Annihilation client mod, it breaks all other translations in the game. Until this is fixed this mod can't ship with translations.
32+
No. When you include translations in a Planetary Annihilation client mod, it breaks all other translations in the game. Until this is fixed this mod can't ship with translations.
33+
34+
## Thanks
35+
36+
- mikeyh who once again covered for my total inability to inject Javascript

modinfo.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,19 @@
1010
"signature": " ",
1111
"forum": "https://forums.planetaryannihilation.com/threads/client-all-in-one-spectator-tab.73161/",
1212
"icon": "https://i.imgur.com/oF09PFr.jpg",
13-
"category": [
13+
"category":
14+
[
1415
"ui",
1516
"classic",
1617
"titans"
1718
],
18-
"priority": 100
19+
"priority": 100,
20+
"scenes":
21+
{
22+
"live_game_players":
23+
[
24+
"coui://ui/mods/com.quitch.qallinonetab/live_game_players.css",
25+
"coui://ui/mods/com.quitch.qallinonetab/live_game_players.js"
26+
]
27+
}
1928
}

ui/main/game/live_game/live_game_players.html

Lines changed: 0 additions & 607 deletions
This file was deleted.

ui/main/game/live_game/live_game_players.js

Lines changed: 0 additions & 507 deletions
This file was deleted.
File renamed without changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
function allinonetab() {
2+
model.showAllData = ko.computed(function () {
3+
return model.spectatorPanelMode() == 'all';
4+
});
5+
6+
model.spectatorPanelMode('all');
7+
8+
$('div.div_spectator_panel_buttons').append('<div class="div_spectator_panel_button" data-bind="click: function () { spectatorPanelMode(\'all\') }, css: { div_spectator_panel_button_active: showAllData } "><loc>ALL</loc></div>');
9+
10+
$('table.tbl_spectator_stats tr:first').append(loadHtml('coui://ui/mods/com.quitch.qallinonetab/live_game_players1.html'));
11+
12+
$('table.tbl_spectator_stats tr:last').append(loadHtml('coui://ui/mods/com.quitch.qallinonetab/live_game_players2.html'));
13+
}
14+
15+
try {
16+
allinonetab();
17+
}
18+
catch (e) {
19+
console.error(e);
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- ko if: showAllData -->
2+
<th class="div_spectator_headers div_metal_header">
3+
<img src="img/status_bar/icon-status-metal.png" style="height: 12px;" />
4+
</th>
5+
<th class="div_spectator_headers div_energy_header">
6+
<img src="img/status_bar/icon-status-energy.png" style="height: 13px;" />
7+
</th>
8+
<th class="div_spectator_headers div_build_efficiency_header_quitch">
9+
<loc>Eff</loc>
10+
</th>
11+
<th class="div_spectator_headers div_army_mobile_value_header_quitch">
12+
<loc>Army</loc>
13+
</th>
14+
<th class="div_spectator_headers div_army_fabber_value_header_quitch">
15+
<loc>Fab</loc>
16+
</th>
17+
<th class="div_spectator_headers div_army_factory_value_header_quitch">
18+
<loc>Fac</loc>
19+
</th>
20+
<!-- /ko -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- ko if: $parent.showAllData -->
2+
<td class="div_metal_header_quitch div_spectator_player_info" style="padding-top: 5px;">
3+
<span data-bind="text: metalProductionStr, css: $parent.metalTextColorCSS($index())"></span>
4+
</td>
5+
<td class="div_energy_header_quitch div_spectator_player_info" style="padding-top: 5px;">
6+
<span data-bind="text: energyProductionStr, css: $parent.energyTextColorCSS($index())"></span>
7+
</td>
8+
<td class="div_build_efficiency_header_quitch div_spectator_player_info" style="padding-top: 5px;">
9+
<span data-bind="text: buildEfficiencyStr, css: $parent.efficiencyTextColorCSS($index())"></span>
10+
</td>
11+
<td class="div_army_mobile_value_header_quitch div_spectator_player_info" style="padding-top: 5px;">
12+
<span data-bind="text: mobileCount"></span>
13+
</td>
14+
<td class="div_army_fabber_value_header_quitch div_spectator_player_info" style="padding-top: 5px;">
15+
<span data-bind="text: fabberCount"></span>
16+
</td>
17+
<td class="div_army_factory_value_header_quitch div_spectator_player_info" style="padding-top: 5px;">
18+
<span data-bind="text: factoryCount"></span>
19+
</td>
20+
<!-- /ko -->

0 commit comments

Comments
 (0)