Circuit Maker 2 save generation and manipulation package
Project description
cm2py
cm2py is a Python package for generating and manipulating save strings for the roblox game Circuit Maker 2.
Installation
Use the package manager pip to install cm2py from pypi.
pip install cm2py
Usage
Basic program to generate a line of 8 looping OR gates:
import cm2py as cm2
LENGTH = 8
save = cm2.Save()
blocks = []
for i in range(LENGTH):
blocks.append(save.addBlock(cm2.OR, (i, 0, 0)))
### Commented out for clarity.
### You should store connections in a list if you want to modify them later.
# connections = []
for i in range(LENGTH):
# connections.append(save.addConnection(blocks[i-1], blocks[i]))
save.addConnection(blocks[i - 1], blocks[i]) # Directly add the connections to the save object
saveString = save.exportSave()
print(saveString)
(from the loop.py example)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
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
cm2py-0.3.8.tar.gz
(9.7 kB
view details)
Built Distribution
cm2py-0.3.8-py3-none-any.whl
(8.8 kB
view details)
File details
Details for the file cm2py-0.3.8.tar.gz
.
File metadata
- Download URL: cm2py-0.3.8.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2931078d7237703ce0f9f334c2702a7bf29389bd5f09d32895ffcc2e33397331 |
|
MD5 | 08ea11cfe58670ebe097b40a5525e3fc |
|
BLAKE2b-256 | 895c8ad6fad8c1ac6ada635dbd229df05de54627f4106c333c356e2696f5c8d2 |
File details
Details for the file cm2py-0.3.8-py3-none-any.whl
.
File metadata
- Download URL: cm2py-0.3.8-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71d57c52bdc5f0c487348704147297322faa8f5c2f98506dd9e40e62cb3241e8 |
|
MD5 | 6dd63defd62e4a2d964680926b01c78e |
|
BLAKE2b-256 | 05e8e12ca9690bc4dac9d8accc28a0a780d5ec25d4971c5e7f3dde89d68c5bc8 |