Skip to main content

Mutant Standard for PursuedPyBear

Project description

ppb-mutant

This library provides convenient support for the Mutant Standard emoji for games using the PursuedPyBear engine.

This version is for PursuedPyBear v0.5 and Mutant Standard v0.4.0.

Setup

  1. Install the ppb-mutant package through your preferred package management system. (pip, requirements.txt, pipenv, poetry, etc)

Usage

Demo

A demo showing all emoji can be found by running python -m ppb_mutant.index.

MutantSprite

You can replace the use of image in your sprites with emoji like so:

class SlimeSprite(ppb_mutant.MutantSprite):
    emoji = 'people_animals/creatures/other/slime'

In addition, the formatting syntax with the variables morph and skin may be used for Mutant's customization features:

class PunchRightSprite(ppb_mutant.MutantSprite):
    emoji = 'fist_facing_right_{morph}_{skin}'
    morph = 'clw'
    tone = 'r2'  # "colour"

See the modifier guide for details on these.

Alternatively, most customizable emoji also have aliases defined:

class PunchRightSprite(ppb_mutant.MutantSprite):
    emoji = 'fist_facing_right'
    morph = 'clw'
    tone = 'r2'  # "colour"

SelectScene

SelectScene is a base for allowing you to handle mutant morph and tone (color) customization. It can be used like:

class CustomizeScene(SelectScene):
    class Sprite(SelectScene.Sprite): pass

    class BackSprite(Region, Sprite):
        emoji = 'tick'
        def on_button_pressed(self, mouse, signal):
            if self.contains(mouse.position) and mouse.button is ppb.buttons.Primary:
                mouse.scene.running = False

    def __init__(self, *p, **kw):
        super().__init__(*p, **kw)
        left = self.main_camera.frame_left
        self.add(self.BackSprite(pos=(left + 2.5, -1.5)))

    def do_update_morphtone(self):
        print(self.morph, self.tone)

For a demo, run python -m ppb_mutant.picker.

Copyright Notice

This library uses Mutant Standard emoji, which are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Development

The compiled assets are not part of git.

If you just want a copy, pull them out of one of the PyPI packages and copy into ppb_mutant/_assets

To compile them fresh:

  1. Run ./download_mutant.py
  2. Run ./compile_mutant.py (Takes a long time)
  3. Run ./mutant_json.py
  4. Run ./download_zips.py

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

ppb-mutant-0.7.1.tar.gz (15.7 MB view details)

Uploaded Source

Built Distribution

ppb_mutant-0.7.1-py3-none-any.whl (22.7 MB view details)

Uploaded Python 3

File details

Details for the file ppb-mutant-0.7.1.tar.gz.

File metadata

  • Download URL: ppb-mutant-0.7.1.tar.gz
  • Upload date:
  • Size: 15.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.3rc1

File hashes

Hashes for ppb-mutant-0.7.1.tar.gz
Algorithm Hash digest
SHA256 2802f73d64517b9b92d469e86470c2d9a6c9b9360a7e3125cdc30953d72d5d62
MD5 a380d76d9be807ab1792f490399394c4
BLAKE2b-256 eab2297d6be51ee9a43a5202b2103fd8b35dd8a4e3970d5a717340704a308376

See more details on using hashes here.

File details

Details for the file ppb_mutant-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: ppb_mutant-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 22.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.3rc1

File hashes

Hashes for ppb_mutant-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d99545223ea395947c6db80878e9f6544314cd7a7c38cb24e5fd22310c2ec557
MD5 26072ad2663386ef6f881451ba3ecae6
BLAKE2b-256 9bd06c43391004458396b2e5201dfd9bd15c7a44a6099a8a99cf2e8a8e215f21

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