mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-19 06:02:06 +02:00
fix sleeve memory bug
This commit is contained in:
@@ -18,15 +18,11 @@ export const Locations: IMap<Location> = {};
|
||||
*/
|
||||
function constructLocation(p: IConstructorParams): Location {
|
||||
if (!p.name) {
|
||||
throw new Error(
|
||||
`Invalid constructor parameters for Location. No 'name' property`,
|
||||
);
|
||||
throw new Error(`Invalid constructor parameters for Location. No 'name' property`);
|
||||
}
|
||||
|
||||
if (Locations[p.name] instanceof Location) {
|
||||
console.warn(
|
||||
`Property with name ${p.name} already exists and is being overwritten`,
|
||||
);
|
||||
console.warn(`Property with name ${p.name} already exists and is being overwritten`);
|
||||
}
|
||||
|
||||
Locations[p.name] = new Location(p);
|
||||
|
||||
Reference in New Issue
Block a user