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

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_mutant.Sprite):
        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, *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, run build.sh, but it can take a while. This requires oxipng and one of ImageMagick, Inkscape, or rendersvg.

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

Uploaded Source

Built Distribution

ppb_mutant-0.9.0-py3-none-any.whl (14.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ppb-mutant-0.9.0.tar.gz
  • Upload date:
  • Size: 10.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.6

File hashes

Hashes for ppb-mutant-0.9.0.tar.gz
Algorithm Hash digest
SHA256 6b90b0bd6c201a641f904e230a761f4c9801e5f126bac49a7046b2d0bd80125b
MD5 fd2382c10a7fbbc7bd5666bb878d8d97
BLAKE2b-256 e1b7d4e6edf9599f54ab99ce6a56b8bf98844867d0ff0871a76613e3bf39d779

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ppb_mutant-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.6

File hashes

Hashes for ppb_mutant-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 162bfb907217a97260f770f6d1cf69dc947c1210710534be4c598b432fae07d4
MD5 d260469f084c70fb8f5d53eff73d273d
BLAKE2b-256 51777030c7c319bf84752e2268b4ab52e2422304256a357290b131422b43ee09

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