gh-pages
peshomir 2024-02-28 07:21:14 +00:00
parent cf01f0bbd1
commit afb2558e45
2 changed files with 17 additions and 9 deletions

View File

@ -1,5 +1,5 @@
const fx_version = '0.6.1.5'; // FX Client Version
const fx_update = 'Feb 25'; // FX Client Last Updated
const fx_version = '0.6.1.6'; // FX Client Version
const fx_update = 'Feb 28'; // FX Client Last Updated
if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) {
var wins_counter = 0;
@ -88,15 +88,17 @@ var settings = {
"useFullscreenMode": false,
"hideAllLinks": false,
"realisticNames": false,
"densityDisplayStyle": "percentage",
//"customMapFileBtn": true
"customBackgroundUrl": "",
"attackPercentageKeybinds": [],
};
let makeMainMenuTransparent = false;
var settingsManager = new (function() {
var inputFields = {
var inputFields = { // (includes select menus)
fontName: document.getElementById("settings_fontname"),
customBackgroundUrl: document.getElementById("settings_custombackgroundurl")
customBackgroundUrl: document.getElementById("settings_custombackgroundurl"),
densityDisplayStyle: document.getElementById("settings_densityDisplayStyle")
};
var checkboxFields = {
//showBotDonations: document.getElementById("settings_donations_bots"),
@ -251,7 +253,8 @@ function displayDonationsHistory(playerID, playerNames, isSingleplayer) {
var utils = new (function() {
this.getMaxTroops = function(playerTerritories, playerID) { return (playerTerritories[playerID]*150).toString(); };
this.getDensity = function(playerBalances, playerTerritories, playerID) {
return (Math.floor((playerBalances[playerID] / ((playerTerritories[playerID] === 0 ? 1 : playerTerritories[playerID]) * 150)) * 100) + "%");
if (settings.densityDisplayStyle === "percentage") return (Math.floor((playerBalances[playerID] / ((playerTerritories[playerID] === 0 ? 1 : playerTerritories[playerID]) * 150)) * 100) + "%");
else return (playerBalances[playerID] / (playerTerritories[playerID] === 0 ? 1 : playerTerritories[playerID])).toFixed(0);
};
});

View File

@ -34,7 +34,7 @@
<meta itemprop="image" content="https://mohsenemx.github.io/FXclient/assets/logo.png">
<!-- FX Client CSS -->
<link rel="stylesheet" href="main.css?1709038687044">
<link rel="stylesheet" href="main.css?1709104873903">
<!-- Game CSS -->
<style>
html,
@ -83,6 +83,11 @@
Realistic Bot Names
<input type="checkbox" id="settings_realisticnames"><span class="checkmark"></span>
</label><br>
<label title="Controls how the territorial density value should be rendered">
Density value display style: <select id="settings_densityDisplayStyle">
<option value="percentage">Percentage</option>
<option value="absoluteQuotient">Value from 0 to 150 (BetterTT style)</option>
</select></label><br><br>
<label title="A custom image to be shown in the main menu background instead of the currently selected map.">
Custom main menu background: <input id="settings_custombackgroundurl" placeholder="Enter an image URL here"></label>
<!--<input type="file" id="customBackgroundFileInput" style="display:none;">
@ -106,8 +111,8 @@
<p id="donationhistory_note">Note: donations from bots are not shown here</p>
<p id="donationhistory_text"></p>
</div>
<script src="variables.js?1709038687044"></script>
<script src="fx_core.js?1709038687044"></script>
<script src="game.js?1709038687044"></script>
<script src="variables.js?1709104873903"></script>
<script src="fx_core.js?1709104873903"></script>
<script src="game.js?1709104873903"></script>
</body>
</html>