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

Uploaded Source

Built Distribution

cm2py-0.3.7-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cm2py-0.3.7.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for cm2py-0.3.7.tar.gz
Algorithm Hash digest
SHA256 24af71e3e270f55ae108189e827ed2c7386b1bcb32dae9c2514b2c7e59db5fd8
MD5 4347e4de40549ec19fd8cff77897a389
BLAKE2b-256 5bbcb3d946317e2172dee5d43d004cabf15ae051b8451b16fae6e2eff7230807

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cm2py-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for cm2py-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 274a3b476cf5ac834973584f0c9b8f5708a3b2f40f3a5f4a4a784214f7d46d9c
MD5 7ef007650d7d8e273b3f3bf0b4573460
BLAKE2b-256 b523e74e0d7d0b6c45c7f0b2aab1a0f1220cef030dac0871d2d86c95af8c3f8b

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