Перейти к содержимому

본문으로 건너뛰기


사진

Cargo overfilling MaxRess Butten

Classic

  • 답글을 달려면 로그인하세요
이 주제에 답글이 없습니다

#1 OPTtheTI

OPTtheTI

    Гуру

  • Пользователь
  • 180 게시물

게시됨 28 March 2024 - 15:26

Max Ress Butten is this
Изображение
 

But it use wrong function this function is for the max Buttens without calculation

can see here
Изображение

 

so admins change it easy fix Remove the S at the end of the function in your php that must fix the anoing bug and you get it since start from server.

here the right one

Изображение

 

iam not sure at what class.page it is but this a a thing form 3 Minutes to fix but please do first test it on a test server.

Have fun.

Maybe add some Priors from deut to kris to met but if you do test it pls

function maxResource() {    var storCap = data.fleetroom - data.consumption;    var availableResources = {        'metal': Math.max(0, getRessource('metal') - HoldResources['metal']),        'crystal': Math.max(0, getRessource('crystal') - HoldResources['crystal']),        'deuterium': Math.max(0, getRessource('deuterium') - HoldResources['deuterium'] - data.consumption)    };    var resourceOrder = ['deuterium', 'crystal', 'metal']; // Priorisierung der Ressourcen    var totalTransported = 0;    resourceOrder.forEach(function(id) {        var thisResourceChosen = parseInt(document.getElementsByName(id)[0].value);        if (isNaN(thisResourceChosen)) thisResourceChosen = 0;        var freeCapacity = Math.max(storCap - totalTransported, 0);        var amountToAdd = Math.min(freeCapacity, availableResources[id]);        document.getElementsByName(id)[0].value = amountToAdd;        totalTransported += amountToAdd;    });    calculateTransportCapacity();    countDots();}

i need to add that´s not the 100% Calculation you have some error in your code in flotten.js 

and this funktion maybe only work for singel buttens but for MAxRess butten all ress you have no calculation


OPTtheTI님이 수정함, 28 March 2024 - 15:22.

  • 1