Skip to main content

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

MIT

Project details


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.10.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

cm2py-0.3.10-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page