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.4.0 and Mutant Standard v0.3.0.

Setup

  1. Install the ppb-mutant package through your preferred package management system. (pip, requirements.txt, pipenv, poetry, etc)
  2. Run python -m ppb_mutant.download in your project to download the Mutant Standard assets (specifically, the 64px versions)

Usage

Demo

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

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)

Copyright Notice

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

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

Uploaded Source

Built Distribution

ppb_mutant-0.4.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ppb-mutant-0.4.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6

File hashes

Hashes for ppb-mutant-0.4.1.tar.gz
Algorithm Hash digest
SHA256 ecf6696ea26bfa5bc68362fbb7b2c24eebf7cf40d82ff6947067b4b8f6581785
MD5 14c90951f1a7851fc1d26f539bf7f7c3
BLAKE2b-256 fee9bc716195535fc50d48e36c95bd0eca09f69ee709302a7f28eeee75c6b2b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ppb_mutant-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6

File hashes

Hashes for ppb_mutant-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 692d5a64176335944c7721ff31edcd1de992cf9d30aedcffe2c7d1ddd51f3caa
MD5 2dc4ff9518c376e9c6ae3c47da6d7e94
BLAKE2b-256 1b63ca6f20c5f1e588933091f878fded98c1f591651ecb57f253c74177bbc98c

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