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
- 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, run build.sh
, but it can take a while. This requires
oxipng and one of ImageMagick,
Inkscape, or rendersvg.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ppb_mutant-0.7.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37a740e51042d78d0f3e98ea5dcfc6e4f3ab9d6d657de8885537b961ca3aa7a0 |
|
MD5 | a948fbc8b9c324c7b0e3ab36fbd0d907 |
|
BLAKE2b-256 | 2f4a1f4bbb42e98a0f9880c369704c3d5ccd85e5e482f75f87141247953ccd3b |