Mindustry. It's like Factorio + tower defense. There is a basic campaign and sandbox mode with multiplayer as well. It has in-game visual programming (logic) with which you can do crazy things like play Chess:
https://www.youtube.com/watch?v=hoeS3S9S9Dk, and it also has a JavaScript API for mods.