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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cm2py-0.3.10.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.10.tar.gz
Algorithm Hash digest
SHA256 a0b353d9638fcf23c4935902c6c6da258eb0898f0ad08460bb74fd996f8c5198
MD5 7b7c1b50f838ec5d7efd552616d9fd5a
BLAKE2b-256 fffcb44c7ce992626240109decd4cc1e907c12c8f6c1bb676dcec37abe023281

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: cm2py-0.3.10-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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c67ccbd3546fe49159f8c45aacdbbed6bf88896463105b85527cf81bf24210dc
MD5 01d57a70ce2a8e516d5b09511d5bc6e3
BLAKE2b-256 a0cfddbe4df714cf85e45daca7016948b730e62e619117c1dcf327a3233c3cf5

See more details on using hashes here.

Provenance

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