Feature: Setting for multiplying cargo amounts from 50% to 2000% (ST2).

This commit is contained in:
Alberth
2015-03-06 19:51:19 +01:00
parent 17d2b7434f
commit fe612e6e9f
2 changed files with 19 additions and 8 deletions

View File

@@ -283,6 +283,7 @@ function BusyBeeClass::SelectCargo()
function BusyBeeClass::CreateChallenge(comp_id)
{
local cdata = this.companies[comp_id];
local cargomp = GSController.GetSetting("cargo_mp");
for (local attempt = 0;attempt < 20; attempt += 1) {
local cargo_index = this.SelectCargo();
if (cargo_index < 0) continue;
@@ -301,7 +302,7 @@ function BusyBeeClass::CreateChallenge(comp_id)
amount = 10 * 25 + 35 * 50 + (amount - 10 - 35) * 100; // 2000..7500
}
if (cdata != null) {
cdata.AddActiveGoal(cargo, accept, amount);
cdata.AddActiveGoal(cargo, accept, amount * cargomp / 100);
local dest_name;
if ("town" in accept) {