Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nawot/pyndustry
This is library for convenient (subjectively) convert python code to the Mindustry logic commands. This is project was created for my needs, so maybe i be improving this.
https://github.com/nawot/pyndustry
mindustry mindustry-logic python python3
Last synced: 14 days ago
JSON representation
This is library for convenient (subjectively) convert python code to the Mindustry logic commands. This is project was created for my needs, so maybe i be improving this.
- Host: GitHub
- URL: https://github.com/nawot/pyndustry
- Owner: Nawot
- Created: 2021-11-16T16:33:02.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-20T11:15:17.000Z (about 3 years ago)
- Last Synced: 2024-11-30T05:24:20.165Z (24 days ago)
- Topics: mindustry, mindustry-logic, python, python3
- Language: Python
- Homepage: https://pypi.org/project/pyndustry/
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Hey, this is lib can like this:
```python
from pyndustry.pyndustry import *storage = CommandsStorage()
Mprint('Hello world!', 'message1')
storage.convert()
```Output:
```mindustry
printflush message1
print "Hello world!"
```and like this:
```python
from pyndustry.pyndustry import *
from pyndustry.memory import *storage = CommandsStorage()
mem = MemoryStorage('cell1')
Mif(mem[0] > 10,
Function(lambda :
Mprint('Wow', 'message1'))) \
.apply()
End()
storage.convert()
```Output:
```mindustry
read memoryStorageResult__cell1 cell1 0
jump 3 greaterThan memoryStorageResult__cell1 10
jump 5 always x false
printflush message1
print "Wow"
end
```and
```python
from pyndustry.pyndustry import *
from pyndustry.graphics import *storage = CommandsStorage()
display = Display('display1')
display.bind()
display.drawGameSprite(0.5, 0.5, sprites.blocks.router, 16, byCoefficient=True)
storage.convert()
```Output:
```mindustry
drawflush display1
draw image 40.0 40.0 @router 16 0 0
```