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

Uploaded Source

Built Distribution

cm2py-0.3.9-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file cm2py-0.3.9.tar.gz.

File metadata

  • Download URL: cm2py-0.3.9.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

Hashes for cm2py-0.3.9.tar.gz
Algorithm Hash digest
SHA256 adfa45a162d00ca372f0ed6f5e59e487a7673bbf0405207b6b2138bd7e68ce9d
MD5 420b43d230a404db96bd2082cf18e637
BLAKE2b-256 4d66340d95907b96a87de9ab5efb2f217637b97743de3e3bc67f4e285b08b2a2

See more details on using hashes here.

File details

Details for the file cm2py-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: cm2py-0.3.9-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

Hashes for cm2py-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 fb134a2cc7072a0906b9b8300aec7d68e346d3cca32abe9fd9638e43cd7836e1
MD5 e4e4b3c6f3670ec3feb44a173c21eda9
BLAKE2b-256 5975d394d4cd74579f4bceab5f59addfe532c4b22a9025233b0e4b02ef17e62a

See more details on using hashes here.

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