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.

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

Uploaded Source

Built Distribution

cm2py-0.2.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cm2py-0.2.5.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for cm2py-0.2.5.tar.gz
Algorithm Hash digest
SHA256 48c5f1edaa9f82909b64f39e7447743b959a6aef2760e2a8c906ad24bfa263a6
MD5 27390f944d6f9aa08d22ffaae46f8892
BLAKE2b-256 65df6682da0c2528964396f9c917b477c67bb77413b67ae6402a9b78fb1f19bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cm2py-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0e4cf7d0459dcf53a75bdceee50a86221b69fb6fb1c370f8a9ba6585050edd15
MD5 94ca215e55ded1d31fa36286e69ab347
BLAKE2b-256 bab585b565babcd38aacc4771f7eeab2a893c25303763782bd00087c9dc2dbec

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