spacechem-community-developers / SpaceChem-Community-Edition

Release repository of the SpaceChem Community Edition
39 stars 1 forks source link

[Bug] Duplicate start member in solution string gets loaded as valid and does weird things #72

Closed zig1000 closed 3 years ago

zig1000 commented 3 years ago

image Sample:

SOLUTION:Of Pancakes and Spaceships,Zig,116-1-6
COMPONENT:'empty-research-reactor',2,0,''
MEMBER:'instr-start',0,0,128,0,1,0,0
MEMBER:'instr-start',0,0,128,0,2,0,0
MEMBER:'instr-start',180,0,32,1,6,0,0
MEMBER:'instr-output',-1,0,128,6,1,0,0
MEMBER:'instr-arrow',0,0,64,1,1,0,0
MEMBER:'instr-grab',-1,1,128,2,1,0,0
MEMBER:'instr-grab',-1,2,128,7,1,0,0
MEMBER:'instr-input',-1,0,128,1,1,0,0
MEMBER:'instr-arrow',180,0,64,7,1,0,0
PIPE:0,4,1
PIPE:1,4,2

Same runtime behaviour occurs when this is loaded into the default solution and vanilla SC is switched to

csaboka commented 3 years ago

This should be an easy fix. The game is already checking for two start instructions and strips out the rest, but it doesn't check for one start instruction per color. In your example, it strips out the blue start and keeps the two red starts.

csaboka commented 3 years ago

This will be fixed in the next release.