Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Quitch committed Jan 21, 2024
2 parents 4db5eb3 + fc711be commit a6c97bd
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 71 deletions.
Empty file removed .prettierrc.json
Empty file.
2 changes: 1 addition & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-prettier"],
"extends": ["stylelint-config-standard"],
"rules": {
"selector-class-pattern": "^([a-z][a-z0-9]*)((_|-)[a-z0-9]+)*$"
}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v1.2.2 - 2024-01-21

- Corrected forum link

## v1.2.1 - 2022-08-08

- Fixed mod icon
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ ALL2 displays army metal in place of army count. Army metal counts all units and

You should download and install this mod via the Planetary Annihilation TITANS in-game Community Mod Manager. You will need to [enable Community Mods](https://steamcommunity.com/sharedfiles/filedetails/?id=1417396826).

## Translations

Please help [translate All-In-One Spectator Tab](https://poeditor.com/join/project/juanyAfxIm) to your local language.

## FAQ

**Why didn't you include total unit count?**
Expand All @@ -31,10 +27,6 @@ Because I wanted to avoid having the ALL tab be any wider than the other tabs. I

I've tried to ensure this is very unlikely to happen, but because the columns are narrower it _could_ happen. Things will get more cramped though. You can switch to the other tabs still if things get ugly.

**Do you support translations?**

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.

## Thanks

- mikeyh, who once again covered for my total inability to inject Javascript and HTML
8 changes: 4 additions & 4 deletions modinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"display_name": "All-In-One Spectator Tab",
"description": "Adds a tab called ALL to the spectator panel, which contains both economy and army information.",
"author": "Quitch",
"version": "1.2.1",
"build": "115872",
"date": "2022/08/08",
"version": "1.2.2",
"build": "116982",
"date": "2024/01/21",
"signature": " ",
"forum": "https://steamcommunity.com/app/386070/discussions/0/1694914736008697542/",
"forum": "https://steamcommunity.com/app/386070/discussions/0/2656452469269054878/",
"icon": "https://raw.githubusercontent.com/Quitch/All-In-One-Spectator-Tab/develop/images/icon.png",
"category": ["ui", "classic", "titans"],
"priority": 100,
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sonar.projectKey=Quitch_All-In-One-Spectator-Tab
sonar.organization=quitch
sonar.projectVersion=1.2.1
sonar.projectVersion=1.2.2
6 changes: 0 additions & 6 deletions ui/mods/com.quitch.qallinonetab/all2_buttons.html

This file was deleted.

6 changes: 0 additions & 6 deletions ui/mods/com.quitch.qallinonetab/all_buttons.html

This file was deleted.

45 changes: 20 additions & 25 deletions ui/mods/com.quitch.qallinonetab/all_tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,32 @@ if (!allInOneSpectatorTabLoaded) {

function allInOneSpectatorTab() {
try {
$("div.div_spectator_panel_buttons").append(
loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_buttons.html")
var appendHtml = function (htmlClass, file) {
var path = "coui://ui/mods/com.quitch.qallinonetab/";
$(htmlClass).append(loadHtml(path + file));
};

appendHtml("div.div_spectator_panel_buttons", "army_count_buttons.html");
appendHtml(
"table.tbl_spectator_stats tr:first",
"army_count_headers.html"
);

$("table.tbl_spectator_stats tr:first").append(
loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_headers.html")
);

$("table.tbl_spectator_stats tr:last").append(
loadHtml("coui://ui/mods/com.quitch.qallinonetab/all_values.html")
);
$("div.div_spectator_panel_buttons").append(
loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_buttons.html")
);

$("table.tbl_spectator_stats tr:first").append(
loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_headers.html")
);

$("table.tbl_spectator_stats tr:last").append(
loadHtml("coui://ui/mods/com.quitch.qallinonetab/all2_values.html")
appendHtml("table.tbl_spectator_stats tr:last", "army_count_values.html");
appendHtml("div.div_spectator_panel_buttons", "army_metal_buttons.html");
appendHtml(
"table.tbl_spectator_stats tr:first",
"army_metal_headers.html"
);
appendHtml("table.tbl_spectator_stats tr:last", "army_metal_values.html");

model.showAllData = ko.computed(function () {
return model.spectatorPanelMode() === "all";
model.showArmyCount = ko.computed(function () {
return model.spectatorPanelMode() === "armyCount";
});
model.showAllData2 = ko.computed(function () {
return model.spectatorPanelMode() === "all2";
model.showArmyMetal = ko.computed(function () {
return model.spectatorPanelMode() === "armyMetal";
});

model.spectatorPanelMode("all");
model.spectatorPanelMode("armyCount");
model.pinSpectatorPanel(true);
} catch (e) {
console.error(e);
Expand Down
6 changes: 6 additions & 0 deletions ui/mods/com.quitch.qallinonetab/army_count_buttons.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div
class="div_spectator_panel_button"
data-bind="click: function () { spectatorPanelMode('armyCount') }, css: { div_spectator_panel_button_active: showArmyCount } "
>
<loc>ALL</loc>
</div>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- ko if: showAllData -->
<!-- ko if: showArmyCount -->
<th class="div_spectator_headers div_metal_header">
<img src="img/status_bar/icon-status-metal.png" style="height: 12px;" />
<img src="img/status_bar/icon-status-metal.png" style="height: 12px" />
</th>
<th class="div_spectator_headers div_energy_header">
<img src="img/status_bar/icon-status-energy.png" style="height: 13px;" />
<img src="img/status_bar/icon-status-energy.png" style="height: 13px" />
</th>
<th class="div_spectator_headers div_build_efficiency_header_quitch">
<loc>Eff</loc>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<!-- ko if: $parent.showAllData -->
<!-- ko if: $parent.showArmyCount -->
<td
class="div_metal_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span
data-bind="text: metalProductionStr, css: $parent.metalTextColorCSS($index())"
></span>
</td>
<td
class="div_energy_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span
data-bind="text: energyProductionStr, css: $parent.energyTextColorCSS($index())"
></span>
</td>
<td
class="div_build_efficiency_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span
data-bind="text: buildEfficiencyStr, css: $parent.efficiencyTextColorCSS($index())"
></span>
</td>
<td
class="div_army_mobile_value_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span data-bind="text: mobileCount"></span>
</td>
<td
class="div_army_fabber_value_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span data-bind="text: fabberCount"></span>
</td>
<td
class="div_army_factory_value_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span data-bind="text: factoryCount"></span>
</td>
Expand Down
6 changes: 6 additions & 0 deletions ui/mods/com.quitch.qallinonetab/army_metal_buttons.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div
class="div_spectator_panel_button"
data-bind="click: function () { spectatorPanelMode('armyMetal') }, css: { div_spectator_panel_button_active: showArmyMetal } "
>
<loc>ALL2</loc>
</div>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- ko if: showAllData2 -->
<!-- ko if: showArmyMetal -->
<th class="div_spectator_headers div_metal_header">
<img src="img/status_bar/icon-status-metal.png" style="height: 12px;" />
<img src="img/status_bar/icon-status-metal.png" style="height: 12px" />
</th>
<th class="div_spectator_headers div_energy_header">
<img src="img/status_bar/icon-status-energy.png" style="height: 13px;" />
<img src="img/status_bar/icon-status-energy.png" style="height: 13px" />
</th>
<th class="div_spectator_headers div_build_efficiency_header_quitch">
<loc>Eff</loc>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<!-- ko if: $parent.showAllData2 -->
<!-- ko if: $parent.showArmyMetal -->
<td
class="div_metal_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span
data-bind="text: metalProductionStr, css: $parent.metalTextColorCSS($index())"
></span>
</td>
<td
class="div_energy_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span
data-bind="text: energyProductionStr, css: $parent.energyTextColorCSS($index())"
></span>
</td>
<td
class="div_build_efficiency_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span
data-bind="text: buildEfficiencyStr, css: $parent.efficiencyTextColorCSS($index())"
></span>
</td>
<td
class="div_army_metal_value_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span data-bind="text: armyMetal"></span>
</td>
<td
class="div_army_fabber_value_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span data-bind="text: fabberCount"></span>
</td>
<td
class="div_army_factory_value_header_quitch div_spectator_player_info"
style="padding-top: 5px;"
style="padding-top: 5px"
>
<span data-bind="text: factoryCount"></span>
</td>
Expand Down

0 comments on commit a6c97bd

Please sign in to comment.