Fix bug where resources weren't assigned correctly after building
This commit is contained in:
parent
69b32f43b5
commit
61e8d9d9fc
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue