1
0
mirror of https://github.com/teoxoy/factorio-blueprint-editor.git synced 2025-01-18 02:58:31 +02:00

fixed bug where you could add more modules than the machine supported

This commit is contained in:
Teoxoy 2018-03-30 15:39:47 +02:00
parent 37344bb1fa
commit 0fbb02f05d

View File

@ -109,9 +109,11 @@ export class EditEntityContainer extends PIXI.Container {
if (e.data.button === 0) {
G.inventoryContainer.toggle(entity.acceptedModules, name => {
G.openedGUIWindow = this
if (modules && modules[i] !== name) {
modules[modules.length] = name
entity.modulesList = modules
if (modules) {
if (modules[i] !== name) {
modules[modules[i] ? i : modules.length] = name
entity.modulesList = modules
}
} else {
entity.modulesList = [name]
}