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.8 and Mutant Standard v2020.04.

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.

Emoji

You can replace the use of image with an Emoji asset:

class SlimeSprite(ppb.Sprite):
    image = ppb_mutant.Emoji('slime')

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

class PunchRightSprite(ppb.Sprite):
    image = ppb_mutant.Emoji('fist_facing_right_{morph}_{skin}', morph='clw', tone='r2')

See the modifier guide for details on these.

Alternatively, most customizable emoji also have aliases defined:

class PunchRightSprite(ppb.Sprite):
    image = ppb_mutant.Emoji('fist_facing_right', morph='clw', tone='r2')

MorphToneGroup

If you want to change the morph/tone of a bunch of emoji as a group, use the MorphToneGroup:

player_emoji = ppb_mutant.MorphToneGroup(morph='paw', tone='g1')


class HandSprite(ppb.Sprite):
    image = player_emoji('hand')


class ProfileSprite(ppb.Sprite):
    image = player_emoji('adult')

SelectScene

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

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

    class BackSprite(Region, ppb.Sprite):
        image = Emoji('tick')
        def on_button_pressed(self, mouse, signal):
            if self.contains(mouse.position) and mouse.button is ppb.buttons.Primary:
                signal(ppb.events.StopScene())

    def __init__(self, **props):
        super().__init__(**props)
        self.add(self.BackSprite(position=(-4, 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 image assets are not stored in git.

You can download a copy from the mutant standard website by running build.sh.

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.11.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

ppb_mutant-0.11.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ppb-mutant-0.11.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.8.2

File hashes

Hashes for ppb-mutant-0.11.0.tar.gz
Algorithm Hash digest
SHA256 e2bedb2daa4ad77eba9c9a7be3ed8dac4391b77759f6653f480add5cf756cef1
MD5 7d5b86ce9c2f4cd4f4705b93607b94ff
BLAKE2b-256 3c0f921daabda435441b1669f289fd35e316500d761d52f2c0524c684d0a0dc8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ppb_mutant-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.8.2

File hashes

Hashes for ppb_mutant-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 613d6ecfa46949e369ec74fc5f02f8b1faf9142fb9062846a01286bb6fc3d1fc
MD5 ee529e0a6d9980b3ad5a13d88ac9f228
BLAKE2b-256 8ac2582eaa81f71d4ba9a825261f2215e12fa635975e2a0bf08fb0e0f57ea2e0

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