Index: src/game/structures.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- src/game/structures.js (revision 786c791e3cf1b1516d14bbf0157376d55a508179) +++ src/game/structures.js (revision ) @@ -1109,7 +1109,7 @@ return C.ERR_NAME_EXISTS; } - let energyStructures = options.energyStructures && _.map(options.energyStructures, 'id'); + let energyStructures = options.energyStructures && _.uniq(_.map(options.energyStructures, 'id')); if(!this.my) { return C.ERR_NOT_OWNER; Index: src/processor/intents/spawns/_charge-energy.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- src/processor/intents/spawns/_charge-energy.js (revision 786c791e3cf1b1516d14bbf0157376d55a508179) +++ src/processor/intents/spawns/_charge-energy.js (revision ) @@ -46,6 +46,8 @@ (energyStructure.type === 'spawn' || energyStructure.type === 'extension'); }); + energyStructures = _.uniq(energyStructures); + let availableEnergy = _.sum(energyStructures, id => roomObjects[id].energy); if(availableEnergy < cost) { return false;