Fix bug where resources weren't assigned correctly after building

This commit is contained in:
Aelita4 2024-11-22 15:44:58 +01:00
parent 69b32f43b5
commit 61e8d9d9fc
Signed by: Aelita4
GPG Key ID: E44490C2025906C1
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ export default abstract class ResourceManager {
await this.calculateCurrentAvailableResources();
for(const res of resources) {
const resource = this.resources.find(r => r.id === res.id);
if(resource) resource.amount += res.amount;
if(resource) resource.amount = res.amount;
else this.resources.push({
id: res.id,
amount: res.amount,