Extended Mindustry logic and its compiler
Project description
MlogExtended
Mindustry logic with more instructions. Compiling to vanilla Mindustry logic IS supported. NOT A MOD.
Features
- Tag support
- Conditional jump to tags using
xjump
instructions - Compile to vanilla Mindustry logic
Usage
mlog_extended/BasicCompiler.py
Tag
Looks like :Tag1
, :snake_case
, :我能吞下玻璃而不伤身体
, etc.
- A unicode string on a SEPARATED line, starting with colon
:
, can contain leading whitespaces before:
- Points to next instruction
- has a name. e.g. The name of
:named_tag_1
isnamed_tag_1
- Tag name should not contain whitespaces
- Multiple tags can point to one instruction
set x 0
:Tag1
:Tag2
op add x x 1
:Tag3
xjump
- Similar to vanilla
jump
instruction - But
xjump
jump to tags
set i 0
:DoWhileLoop
op add i i 1
xjump DoWhileLoop lessThan i 10
print i
xjump NotTooFar lessThanEq @thisx 10000
print ". Oops, I am too far away!"
:NotTooFar
printflush message1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mlog_extended-0.0.1.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for mlog_extended-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 892c9b5fa5ce144ae6aa3bdce4c39d9e1bc1959f989ee8d7faafade38501e6ac |
|
MD5 | 9d55f3e278301bad2694bc70e0f6e34b |
|
BLAKE2b-256 | 13d5e6dc2b7402bda6a5ec8bdcf7ce28009726e54249e6617b592117587d736c |