MineMaarten / PneumaticCraft

PneumaticCraft source
Other
84 stars 50 forks source link

(Feature Idea) Conditions for Drones #168

Closed eschoenawa closed 9 years ago

eschoenawa commented 10 years ago

To allow more advanced programming I would suggest a condition block for Drones. It for example has one "in" to accept previous blocks/the start block (just like all other blocks) but has to "out"s, one for condition ture and one for false. Then it also has space for a condition block, that can accept areas and text to specify location and the condition itself. Based on that you could trigger a drones action only at certain times (if sb is nearby or a redstone signal is applied somewhere). If that would get to complicated you could also add an Advanced programming station that allows those features but allows people who like it easy to keep it easy ;)

eschoenawa

MineMaarten commented 10 years ago

Yup, I already had exactly this in mind :P. I was also planning on increasing the programming size with dragging/scrollbar, because with especially with conditionals you could go quite.. spacious :P.

eschoenawa commented 10 years ago

Sounds great :D And one thing I came across: You may make those Condition blocks dynamic in size or at least resizeable to allow more of them below the condition. And some way of "merging" the two paths after the condition has to be added, too in order to allow more not conditioned code below the statement.

MineMaarten commented 10 years ago

I was thinking of 'Jump' and 'Label' commands ;). So if condition, jump to "dig" else jump to "idle". And you'd have a piece with the label "dig" and label "idle". At the end of their routines you could make them both jump to the main branch :)

eschoenawa commented 10 years ago

That would work, too and allow even more functionality. With If-Statements and GOTO commands you're close to an actual programming language. Looking forward to see where this mod is going ;)