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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cm2py-0.3.11.tar.gz
Algorithm Hash digest
SHA256 34cc96d2eba5244b3a94bc6fa3a771a8a1f38104c5f431c668b964bf1c2499ab
MD5 b25dc282766de12559da2a5755d7817a
BLAKE2b-256 ee3bec3e656d1dee51bd14e6a4cd439d39271398d663e903fc01656e21b4f61f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cm2py-0.3.11-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.2

File hashes

Hashes for cm2py-0.3.11-py3-none-any.whl
Algorithm Hash digest
SHA256 dfae14a9c7968592435ff0b85cea56952dbb2f95e14f232c26b2ec20b4bcd269
MD5 8dc5bda73eaa16f3ebca41bd5f5cdf40
BLAKE2b-256 44f673fce8337ed8bf1c638a1292319d52f53f9a0e4138d9ac52bb08ade60832

See more details on using hashes here.

Supported by

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