diff --git a/Assets/ES-base.unity b/Assets/ES-base.unity index acd7f18b..56a9d989 100644 Binary files a/Assets/ES-base.unity and b/Assets/ES-base.unity differ diff --git a/Assets/code/Logic/Agent.cs b/Assets/code/Logic/Agent.cs index 094a3972..cc5486d1 100644 --- a/Assets/code/Logic/Agent.cs +++ b/Assets/code/Logic/Agent.cs @@ -189,7 +189,7 @@ public bool payWithoutRecord(Agent whom, Value howMuch, bool showMessageAboutNeg bank.giveLackingMoney(this, howMuch); bank.giveLackingMoney(this, howMuch.multiplyOutside(5)); } - whom.cash.add(howMuch); + whom.cash.add(howMuch); // rise warning if have enough money to pay (with deposits) but did't get enough from bank this.cash.subtract(howMuch); return true; } diff --git a/Assets/code/Logic/Bank.cs b/Assets/code/Logic/Bank.cs index ed44721f..adb7f99d 100644 --- a/Assets/code/Logic/Bank.cs +++ b/Assets/code/Logic/Bank.cs @@ -119,11 +119,7 @@ internal Value getReservs() /// Checks reserve limits and deposits /// internal bool canGiveMoney(Agent agent, Value loan) - { - //if there is enough money and enough reserves - //if (cash.get() - loan.get() >= getMinimalReservs().get()) - // return true; - //return false; + { return howMuchCanGive(agent).isBiggerOrEqual(loan); } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 8e162752..44cb58e9 100644 Binary files a/ProjectSettings/ProjectSettings.asset and b/ProjectSettings/ProjectSettings.asset differ diff --git a/WEBGL/Build/WEBGL.asm.code.unityweb b/WEBGL/Build/WEBGL.asm.code.unityweb index f326771a..194a0a4a 100644 Binary files a/WEBGL/Build/WEBGL.asm.code.unityweb and b/WEBGL/Build/WEBGL.asm.code.unityweb differ diff --git a/WEBGL/Build/WEBGL.asm.framework.unityweb b/WEBGL/Build/WEBGL.asm.framework.unityweb index d99cf3c9..751faff2 100644 Binary files a/WEBGL/Build/WEBGL.asm.framework.unityweb and b/WEBGL/Build/WEBGL.asm.framework.unityweb differ diff --git a/WEBGL/Build/WEBGL.data.unityweb b/WEBGL/Build/WEBGL.data.unityweb index 0a2a815e..a5a9090d 100644 Binary files a/WEBGL/Build/WEBGL.data.unityweb and b/WEBGL/Build/WEBGL.data.unityweb differ