mirror of
https://github.com/teoxoy/factorio-blueprint-editor.git
synced 2025-03-27 21:39:03 +02:00
fix duplicate wires on same entity
Bug that was fixed: connecting the input to the output of a decider/arithmetic combinator produced a different wire than connecting the output to the input.
This commit is contained in:
parent
fd197792d8
commit
83343e6a6c
@ -27,7 +27,7 @@ export class WireConnections extends EventEmitter {
|
||||
}
|
||||
|
||||
private static hash(conn: IConnection): string {
|
||||
const cps = conn.cps.sort((cp1,cp2) => cp1.entityNumber - cp2.entityNumber)
|
||||
const cps = conn.cps.sort((cp1,cp2) => cp1.entityNumber-cp2.entityNumber || cp1.entitySide-cp2.entitySide)
|
||||
const [firstE, secondE] = cps.map(cp => cp.entityNumber)
|
||||
const [firstS, secondS] = cps.map(cp => cp.entitySide)
|
||||
return `${conn.color}-${firstE}-${secondE}-${firstS}-${secondS}`
|
||||
|
Loading…
x
Reference in New Issue
Block a user