Super Factory Manager ( SFM )

Super Factory Manager ( SFM )

16M Downloads

Add support for slots in conditionals

StvnWthrsp opened this issue ยท 2 comments

commented

I would like to be able to use slots in conditionals. For example, I was trying something like this, wanting to clear out a machine when the inputs have ran out. I received an error on the token SLOTS expecting the tokens THEN, AND, OR, ':'

EVERY 20 TICKS DO
    IF
        NOT source HAS EQ 1 some_item SLOTS 0 then
        INPUT * FROM source
        OUTPUT * TO dest
    END
END
commented

Try "IF NOT source SLOTS 0 HAS..." I think it might already be supported, can't remember

commented

Yes that works actually, appreciate the quick reply!

In that case I recommend adding an example, perhaps just an addition to the "conditional move" example. The syntax does make sense now that you've pointed it out, but not super obvious.