Skip to content

Commit

Permalink
Update eLoS score view related:
Browse files Browse the repository at this point in the history
* Update eLoS setting enums
  * Setting toggled among Cn1 to Cn4
    * Cn2 added, Total Sum removed (Sum can be found in another tip)
  * Default value changed to new Cn1
    * Note:old default value point to Cn2 now
* Update eLoS icons
* Add map id to Fleet Manager fleets name on viewing history
* Fix equip page default sorter for heavy bomber type
* Update TL pointer
  • Loading branch information
sinsinpub committed Feb 25, 2021
1 parent 3bb06e5 commit 9a5625c
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 12 deletions.
Binary file modified files/icons/los33.xcf
Binary file not shown.
Binary file added src/assets/img/stats/los0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/stats/los1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/stats/los2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/stats/los3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/stats/los4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/stats/ls_f33.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/stats_p2/los0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/stats_p2/los1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/img/stats_p2/los2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/data/lang
4 changes: 2 additions & 2 deletions src/data/settings.json
Expand Up @@ -332,8 +332,8 @@
"type" : "radio",
"options" : {
"choices" : [
[ 1, "SettingsELosSum" ],
[ 2, "SettingsELosF33" ],
[ 1, "SettingsELosF33" ],
[ 2, "SettingsELosF33x2" ],
[ 3, "SettingsELosF33x3" ],
[ 4, "SettingsELosF33x4" ]
]
Expand Down
2 changes: 1 addition & 1 deletion src/library/managers/ConfigManager.js
Expand Up @@ -18,7 +18,7 @@ Retrieves when needed to apply on components
version : 8,
language : this.detectBrowserLanguage(),
hqInfoPage : 1,
elosFormula : 2,
elosFormula : 1,
aaFormation : 1,
imaginaryEnemyType : 0,
imaginaryEnemyArmor : 0,
Expand Down
4 changes: 2 additions & 2 deletions src/library/objects/Fleet.js
Expand Up @@ -998,7 +998,8 @@ Contains summary information about a fleet and its ships
------------------------------------*/
KC3Fleet.prototype.eLoS = function(){
switch(ConfigManager.elosFormula){
case 1: return this.eLos1();
case 0: return this.eLos1();
case 2: return this.eLos4(2);
case 3: return this.eLos4(3);
case 4: return this.eLos4(4);
default: return this.eLos4();
Expand Down Expand Up @@ -1128,7 +1129,6 @@ Contains summary information about a fleet and its ships
availableShips.forEach(ship => {
// According tests, visible LoS bonus from equipment should be added to ship part,
// except these pieces for now: SG Radar (Initial Model)
// Untested yet: Swordfish Mk.III Kai (Seaplane Model / Skilled)
// https://wikiwiki.jp/kancolle/%E3%83%AB%E3%83%BC%E3%83%88%E5%88%86%E5%B2%90#equipment_bonus
const losOnShipBonus = ship.equipmentTotalStats("saku", true, true, true, null, null, null, [315]) || 0;
// sum ship's naked LoS
Expand Down
1 change: 0 additions & 1 deletion src/pages/devtools/themes/moonlight/moonlight.js
Expand Up @@ -2285,7 +2285,6 @@
$(".summary-eqlos .summary_textf332").text( "x2: {1}".format(f33Cn) );
$(".summary-eqlos .summary_textf333").text( "x3: {2}".format(f33Cn) );
$(".summary-eqlos .summary_textf334").text( "x4: {3}".format(f33Cn) );
// No reference values for combined fleet yet, only show computed values
} else if(selectedFleet === 5){
const mainFleet = PlayerManager.fleets[0],
escortFleet = PlayerManager.fleets[1],
Expand Down
3 changes: 1 addition & 2 deletions src/pages/devtools/themes/natsuiro/natsuiro.js
Expand Up @@ -2144,7 +2144,7 @@
.attr("title", KC3Meta.term("PanelFleetAATip"))
.lazyInitTooltip();
$(".summary-speed .summary_text").text(FleetSummary.speed);
if(ConfigManager.elosFormula > 1){
if(ConfigManager.elosFormula > 0){
// F33 different factors for Phase 1: 6-2(F,H)/6-3(H):x3, 3-5(G)/6-1(E,F):x4
if(selectedFleet < 5){
const f33Cn = Array.numbers(1, 4)
Expand All @@ -2153,7 +2153,6 @@
"x1={0}\nx2={1}\nx3={2}\nx4={3}"
.format(f33Cn)
).lazyInitTooltip();
// No reference values for combined fleet yet, only show computed values
} else if(selectedFleet === 5){
const mainFleet = PlayerManager.fleets[0],
escortFleet = PlayerManager.fleets[1],
Expand Down
14 changes: 11 additions & 3 deletions src/pages/strategy/tabs/fleet/fleet.js
Expand Up @@ -10,6 +10,7 @@
viewType: "",
currentFleetsObj: null,
suggestedName: "",
sortiedMap: "",

/*
"fleets" object format:
Expand Down Expand Up @@ -285,6 +286,7 @@
$("#fleet_description").text("Current Fleets");
this.currentFleetsObj = this.getCurrentFleetsObj();
this.suggestedName = "Fleets (" + new Date().format("yyyy-mm-dd HH:MM:ss") + ")";
this.sortiedMap = "";
},

showSavedFleets: function(name) {
Expand All @@ -306,6 +308,7 @@
$("#fleet_description").text("Saved Fleets '" + name + "'");
this.currentFleetsObj = fleetsObj;
this.suggestedName = name;
this.sortiedMap = "";
},

showFleetFromSortieId: function(sortieId) {
Expand All @@ -329,9 +332,14 @@
});

self.currentFleetsObj = fleetsObj;
self.suggestedName = "Sortie #" + sortieId;
self.sortiedMap = [sortieData.world, sortieData.mapnum].join("");
self.suggestedName = "Sortie #{0} {1}{2}-{3}".format(
sortieId, KC3Meta.isEventWorld(sortieData.world) ? "E" : "W", sortieData.world, sortieData.mapnum
);
self.showAllKCFleets( kcFleets );
$("#fleet_description").text("Sortie #" + sortieId + " Fleets");
$("#fleet_description").text("{0}{1} Fleets".format(
self.suggestedName, sortieData.combined ? " Combined" : ""
));
});
},

Expand Down Expand Up @@ -391,7 +399,7 @@
));
$(".detail_los .detail_icon img", fleetBox).attr("src", "/assets/img/stats/los"+ConfigManager.elosFormula+".png" );
$(".detail_los .detail_value", fleetBox).text( Math.qckInt("floor", kcFleet.eLoS(), 1) );
if(ConfigManager.elosFormula > 1) {
if(ConfigManager.elosFormula > 0) {
const f33CnHq4 = Array.numbers(1, 5).map(cn =>
Math.qckInt("floor", kcFleet.eLos4(cn), 1).toLocaleString(undefined, KC3Meta.formatDecimalOptions(1, false)
));
Expand Down
2 changes: 2 additions & 0 deletions src/pages/strategy/tabs/gears/gears.js
Expand Up @@ -102,6 +102,8 @@
"t46": "tp",
// ASW land base bomber
"t47": "as",
// land base heavy bomber
"t49": "dv",
// all types
"tall": "type",
},
Expand Down

0 comments on commit 9a5625c

Please sign in to comment.