Merge pull request #3201 from Ornedan/issue-3198

Fix #3198: give player code a copy of Division.upgrades instead of the live object
This commit is contained in:
hydroflame 2022-03-20 14:11:03 -04:00 committed by GitHub
commit add2320b98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -291,7 +291,7 @@ export function NetscriptCorporation(
lastCycleExpenses: division.lastCycleExpenses, lastCycleExpenses: division.lastCycleExpenses,
thisCycleRevenue: division.thisCycleRevenue, thisCycleRevenue: division.thisCycleRevenue,
thisCycleExpenses: division.thisCycleExpenses, thisCycleExpenses: division.thisCycleExpenses,
upgrades: division.upgrades, upgrades: division.upgrades.slice(),
cities: cities, cities: cities,
products: division.products === undefined ? [] : Object.keys(division.products), products: division.products === undefined ? [] : Object.keys(division.products),
}; };