zettcode-pets 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zettcode/pets/__init__.py +70 -0
- zettcode/pets/cat.py +52 -0
- zettcode/pets/chibi.py +55 -0
- zettcode/pets/dog.py +52 -0
- zettcode/pets/kangaroo.py +58 -0
- zettcode/pets/penguin.py +60 -0
- zettcode/pets/plugin.py +34 -0
- zettcode/pets/polarbear.py +50 -0
- zettcode/pets/py.typed +0 -0
- zettcode/pets/scarfy.py +61 -0
- zettcode/pets/seagull.py +63 -0
- zettcode/pets/slime.py +56 -0
- zettcode/pets/snowbear.py +55 -0
- zettcode/pets/sprout.py +64 -0
- zettcode/pets/tiger.py +52 -0
- zettcode/pets/whale.py +54 -0
- zettcode_pets-0.4.0.dist-info/METADATA +18 -0
- zettcode_pets-0.4.0.dist-info/RECORD +20 -0
- zettcode_pets-0.4.0.dist-info/WHEEL +4 -0
- zettcode_pets-0.4.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""The pets: what one is, the catalog that finds one by name, and the thirteen that ship.
|
|
2
|
+
|
|
3
|
+
The sprites live one to a module (``cat``, ``dog``, ``tiger``, ``polarbear``, ``snowbear``, ``penguin``, ``scarfy``,
|
|
4
|
+
``kangaroo``, ``seagull``, ``whale``, ``chibi``, ``slime``, ``sprout``) and are built only when asked for, so offering all of them costs a start
|
|
5
|
+
nothing; the built-in plugin registers them through ``register_pet`` exactly as another plugin would register its own.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import importlib
|
|
11
|
+
|
|
12
|
+
from zettcode.plugin_api.pets import (
|
|
13
|
+
DEFAULT_PET_NAME,
|
|
14
|
+
GLAD,
|
|
15
|
+
IDLE,
|
|
16
|
+
PET_NAME,
|
|
17
|
+
WORKING,
|
|
18
|
+
Pet,
|
|
19
|
+
PetCatalog,
|
|
20
|
+
PetSource,
|
|
21
|
+
edited,
|
|
22
|
+
mirrored,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
#: The pets that ship, in the order the ``/pet`` menu lists them.
|
|
26
|
+
BUNDLED = (
|
|
27
|
+
"cat",
|
|
28
|
+
"dog",
|
|
29
|
+
"tiger",
|
|
30
|
+
"polarbear",
|
|
31
|
+
"snowbear",
|
|
32
|
+
"penguin",
|
|
33
|
+
"scarfy",
|
|
34
|
+
"kangaroo",
|
|
35
|
+
"seagull",
|
|
36
|
+
"whale",
|
|
37
|
+
"chibi",
|
|
38
|
+
"slime",
|
|
39
|
+
"sprout",
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _module(name: str):
|
|
44
|
+
return importlib.import_module(f"{__name__}.{name}")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _source(name: str) -> PetSource:
|
|
48
|
+
"""Describe one bundled pet; its module is imported when the pet or its note is first asked for."""
|
|
49
|
+
return PetSource(name, lambda: _module(name).PET, lambda: _module(name).DESCRIPTION)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def bundled_pets() -> tuple[PetSource, ...]:
|
|
53
|
+
"""Return the pets that ship as sources: each builds its sprite when it is first asked for."""
|
|
54
|
+
return tuple(_source(name) for name in BUNDLED)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
__all__ = [
|
|
58
|
+
"BUNDLED",
|
|
59
|
+
"DEFAULT_PET_NAME",
|
|
60
|
+
"GLAD",
|
|
61
|
+
"IDLE",
|
|
62
|
+
"PET_NAME",
|
|
63
|
+
"WORKING",
|
|
64
|
+
"Pet",
|
|
65
|
+
"PetCatalog",
|
|
66
|
+
"PetSource",
|
|
67
|
+
"bundled_pets",
|
|
68
|
+
"edited",
|
|
69
|
+
"mirrored",
|
|
70
|
+
]
|
zettcode/pets/cat.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""The cat: a ginger cat sitting up, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by twelve, flat colour with no outline. Two pointed ears with pink insides, whiskers that reach past the
|
|
4
|
+
face, a cream muzzle with a pink nose, white paws and a tail curling up behind. At work it blinks; when patted it
|
|
5
|
+
narrows its eyes into a smile and opens its mouth.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a ginger cat; it blinks along while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"B": "#f4a95a",
|
|
16
|
+
"D": "#7a4a2a",
|
|
17
|
+
"S": "#fff1d6",
|
|
18
|
+
"P": "#f48fa0",
|
|
19
|
+
"E": "#2e2230",
|
|
20
|
+
"W": "#ffffff",
|
|
21
|
+
"M": "#c4475c",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_AWAKE = (
|
|
25
|
+
".B..........B.",
|
|
26
|
+
".BB........BB.",
|
|
27
|
+
".BPB......BPB.",
|
|
28
|
+
".BPPBBBBBBPPB.",
|
|
29
|
+
".BBBBBBBBBBBB.",
|
|
30
|
+
"DBBWEBBBBWEBBD",
|
|
31
|
+
".BBEEBBBBEEBB.",
|
|
32
|
+
"DBBBBSPPSBBBBD",
|
|
33
|
+
".BBBBSDDSBBBB.",
|
|
34
|
+
"..BBBBBBBBBB.D",
|
|
35
|
+
"..BSSBBBBSSBBB",
|
|
36
|
+
"..BSSBBBBSSBB.",
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
_ASLEEP = edited(_AWAKE, {5: "DBBBBBBBBBBBBD"})
|
|
40
|
+
_BLINK = edited(_AWAKE, {5: "DBBBBBBBBBBBBD"})
|
|
41
|
+
_GLAD = edited(_AWAKE, {6: ".BBEEBBBBEEBB.", 8: ".BBBBSMMSBBBB."})
|
|
42
|
+
_SMILE = edited(_AWAKE, {5: "DBBBBBBBBBBBBD", 8: ".BBBBSMMSBBBB."})
|
|
43
|
+
|
|
44
|
+
PET = Pet(
|
|
45
|
+
"cat",
|
|
46
|
+
PALETTE,
|
|
47
|
+
{
|
|
48
|
+
IDLE: (_ASLEEP,),
|
|
49
|
+
WORKING: (_AWAKE, _BLINK),
|
|
50
|
+
GLAD: (_GLAD, _SMILE),
|
|
51
|
+
},
|
|
52
|
+
)
|
zettcode/pets/chibi.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""The chibi: an original anime-style girl, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by fourteen, flat colour with no outline. A rounded bob of violet hair with a pink ribbon each side and
|
|
4
|
+
two short tails, a pale face with two big eyes lit from the same side, pink cheeks and a small mouth, and a collar
|
|
5
|
+
below. She is not drawn from any existing character. At work her eyes look about; when patted she closes them and
|
|
6
|
+
smiles.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
12
|
+
|
|
13
|
+
DESCRIPTION = "an original anime-style girl; her eyes follow the work"
|
|
14
|
+
|
|
15
|
+
PALETTE = {
|
|
16
|
+
"H": "#b79ae0",
|
|
17
|
+
"F": "#fbe3cd",
|
|
18
|
+
"E": "#3b2b3f",
|
|
19
|
+
"W": "#ffffff",
|
|
20
|
+
"P": "#f08fa6",
|
|
21
|
+
"M": "#c4475c",
|
|
22
|
+
"R": "#e8737f",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_AWAKE = (
|
|
26
|
+
"....HHHHHH....",
|
|
27
|
+
"..HHHHHHHHHH..",
|
|
28
|
+
".HHHHHHHHHHHH.",
|
|
29
|
+
"HHHHHHHHHHHHHH",
|
|
30
|
+
"HHHFFFFFFFFHHH",
|
|
31
|
+
"PHFFFFFFFFFFHP",
|
|
32
|
+
"HHFWEFFFFWEFHH",
|
|
33
|
+
"HHFEEFFFFEEFHH",
|
|
34
|
+
"HHFPFFFFFFPFHH",
|
|
35
|
+
"HHFFFFMMFFFFHH",
|
|
36
|
+
"HHHFFFFFFFFHHH",
|
|
37
|
+
".HH..FFFF..HH.",
|
|
38
|
+
".HH.RRRRRR.HH.",
|
|
39
|
+
"..H.RRRRRR.H..",
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
_ASLEEP = edited(_AWAKE, {6: "HHFFFFFFFFFFHH"})
|
|
43
|
+
_LOOKING = edited(_AWAKE, {6: "HHFFWEFFFFWEHH", 7: "HHFFEEFFFFEEHH"})
|
|
44
|
+
_GLAD = edited(_AWAKE, {6: "HHFFFFFFFFFFHH", 9: "HHFFFMMMMFFFHH"})
|
|
45
|
+
_SMILE = edited(_AWAKE, {6: "HHFFFFFFFFFFHH"})
|
|
46
|
+
|
|
47
|
+
PET = Pet(
|
|
48
|
+
"chibi",
|
|
49
|
+
PALETTE,
|
|
50
|
+
{
|
|
51
|
+
IDLE: (_ASLEEP,),
|
|
52
|
+
WORKING: (_AWAKE, _LOOKING),
|
|
53
|
+
GLAD: (_GLAD, _SMILE),
|
|
54
|
+
},
|
|
55
|
+
)
|
zettcode/pets/dog.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""The dog: a tan dog with long floppy ears, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by twelve, flat colour with no outline. Two dark ears hang from the top of the head to the cheeks, a
|
|
4
|
+
pale muzzle carries a big dark nose, and a short tail sticks out behind. At work it blinks; when patted it narrows its
|
|
5
|
+
eyes and pokes its tongue out.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a tan dog; it looks along the work and wags when patted"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"B": "#e9b97a",
|
|
16
|
+
"H": "#a8693a",
|
|
17
|
+
"S": "#fff0d4",
|
|
18
|
+
"N": "#33231a",
|
|
19
|
+
"E": "#2e2230",
|
|
20
|
+
"W": "#ffffff",
|
|
21
|
+
"T": "#f2748c",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_AWAKE = (
|
|
25
|
+
"...BBBBBBBB...",
|
|
26
|
+
"..BBBBBBBBBB..",
|
|
27
|
+
"HHBBBBBBBBBBHH",
|
|
28
|
+
"HHBBWEBBWEBBHH",
|
|
29
|
+
"HHBBEEBBEEBBHH",
|
|
30
|
+
"HHBBBSSSSBBBHH",
|
|
31
|
+
"HHBBSNNNNSBBHH",
|
|
32
|
+
"HH.BSSSSSSB.HH",
|
|
33
|
+
"...BBBBBBBB...",
|
|
34
|
+
"..BBBBBBBBBBBH",
|
|
35
|
+
"..BSSBBBBSSBBH",
|
|
36
|
+
"..BSSBBBBSSBB.",
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
_ASLEEP = edited(_AWAKE, {3: "HHBBBBBBBBBBHH"})
|
|
40
|
+
_BLINK = _ASLEEP
|
|
41
|
+
_GLAD = edited(_AWAKE, {7: "HH.BSTTTTSB.HH"})
|
|
42
|
+
_SMILE = edited(_ASLEEP, {7: "HH.BSTTTTSB.HH"})
|
|
43
|
+
|
|
44
|
+
PET = Pet(
|
|
45
|
+
"dog",
|
|
46
|
+
PALETTE,
|
|
47
|
+
{
|
|
48
|
+
IDLE: (_ASLEEP,),
|
|
49
|
+
WORKING: (_AWAKE, _BLINK),
|
|
50
|
+
GLAD: (_GLAD, _SMILE),
|
|
51
|
+
},
|
|
52
|
+
)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""The kangaroo: a russet kangaroo standing up, asleep when nothing is running and hopping at work.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by fourteen, flat colour with no outline. Two tall ears with pink insides, a pale muzzle with a dark
|
|
4
|
+
nose, a cream chest and pouch, two big hind feet and a tail behind. The picture has one blank row at the top; the hop
|
|
5
|
+
is the same drawing lifted by that row. When patted it closes its eyes and opens its mouth.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a russet kangaroo; it hops while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"B": "#b9714a",
|
|
16
|
+
"D": "#7d4a2e",
|
|
17
|
+
"S": "#ecc9a0",
|
|
18
|
+
"P": "#f0a6a0",
|
|
19
|
+
"N": "#2e2230",
|
|
20
|
+
"M": "#c4475c",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_BLANK = "." * 14
|
|
24
|
+
|
|
25
|
+
_DRAWN = (
|
|
26
|
+
"..BB......BB..",
|
|
27
|
+
"..BPB....BPB..",
|
|
28
|
+
"..BPBBBBBBPB..",
|
|
29
|
+
"...BBBBBBBB...",
|
|
30
|
+
"...BBNBBNBB...",
|
|
31
|
+
"...BBSSSSBB...",
|
|
32
|
+
"....BSNNSB....",
|
|
33
|
+
"...BBSSSSBB...",
|
|
34
|
+
"..BBSSSSSSBBD.",
|
|
35
|
+
"..BBSSSSSSBBDD",
|
|
36
|
+
"...BSSSSSSB.D.",
|
|
37
|
+
"...BBB..BBB.DD",
|
|
38
|
+
"..DDDD..DDDD..",
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
_STAND = (_BLANK, *_DRAWN)
|
|
42
|
+
_HOP = (*_DRAWN, _BLANK)
|
|
43
|
+
|
|
44
|
+
# With the blank row on top the eyes are row 5 and the mouth row 7; lifted by the hop they are rows 4 and 6.
|
|
45
|
+
_ASLEEP = edited(_STAND, {5: "...BBBBBBBB..."})
|
|
46
|
+
_HOP_SHUT = edited(_HOP, {4: "...BBBBBBBB..."})
|
|
47
|
+
_GLAD = edited(_ASLEEP, {7: "....BSMMSB...."})
|
|
48
|
+
_SMILE = edited(_HOP_SHUT, {6: "....BSMMSB...."})
|
|
49
|
+
|
|
50
|
+
PET = Pet(
|
|
51
|
+
"kangaroo",
|
|
52
|
+
PALETTE,
|
|
53
|
+
{
|
|
54
|
+
IDLE: (_ASLEEP,),
|
|
55
|
+
WORKING: (_STAND, _HOP),
|
|
56
|
+
GLAD: (_GLAD, _SMILE),
|
|
57
|
+
},
|
|
58
|
+
)
|
zettcode/pets/penguin.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""The penguin: a navy penguin with a white belly, asleep when nothing is running and flapping at work.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by twelve, flat colour with no outline. A dark round head with two white eyes and an orange beak, a
|
|
4
|
+
pale belly, flippers at the sides and two orange feet. At work the flippers go up and down; when patted it closes its
|
|
5
|
+
eyes and opens its beak.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a navy penguin; it flaps its flippers while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"B": "#3d4f6b",
|
|
16
|
+
"S": "#f6f3ea",
|
|
17
|
+
"O": "#f2a03d",
|
|
18
|
+
"E": "#1e1a24",
|
|
19
|
+
"W": "#ffffff",
|
|
20
|
+
"M": "#c4475c",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_AWAKE = (
|
|
24
|
+
"....BBBBBB....",
|
|
25
|
+
"...BBBBBBBB...",
|
|
26
|
+
"..BBBBBBBBBB..",
|
|
27
|
+
"..BBWWBBWWBB..",
|
|
28
|
+
"..BBWEBBWEBB..",
|
|
29
|
+
"..BBBOOOOBBB..",
|
|
30
|
+
".BBBSSSSSSBBB.",
|
|
31
|
+
"BBBSSSSSSSSBBB",
|
|
32
|
+
"BB.SSSSSSSS.BB",
|
|
33
|
+
"B..SSSSSSSS..B",
|
|
34
|
+
"...BSSSSSSB...",
|
|
35
|
+
"..OOO....OOO..",
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
_FLAP = edited(
|
|
39
|
+
_AWAKE,
|
|
40
|
+
{
|
|
41
|
+
6: "BBBBSSSSSSBBBB",
|
|
42
|
+
7: "B.BSSSSSSSSB.B",
|
|
43
|
+
8: "...SSSSSSSS...",
|
|
44
|
+
9: "...SSSSSSSS...",
|
|
45
|
+
},
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
_ASLEEP = edited(_AWAKE, {3: "..BBBBBBBBBB..", 4: "..BBWWBBWWBB.."})
|
|
49
|
+
_GLAD = edited(_ASLEEP, {6: ".BBBSSMMSSBBB."})
|
|
50
|
+
_SMILE = edited(_ASLEEP, {6: "BBBBSSSSSSBBBB", 7: "B.BSSSSSSSSB.B", 8: "...SSSSSSSS...", 9: "...SSSSSSSS..."})
|
|
51
|
+
|
|
52
|
+
PET = Pet(
|
|
53
|
+
"penguin",
|
|
54
|
+
PALETTE,
|
|
55
|
+
{
|
|
56
|
+
IDLE: (_ASLEEP,),
|
|
57
|
+
WORKING: (_AWAKE, _FLAP),
|
|
58
|
+
GLAD: (_GLAD, _SMILE),
|
|
59
|
+
},
|
|
60
|
+
)
|
zettcode/pets/plugin.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""The plugin that offers the pets that ship to ``/pet``.
|
|
2
|
+
|
|
3
|
+
An ordinary plugin found through the ``zettcode.terminal`` entry point. The terminal does not require it: without it
|
|
4
|
+
``/pet`` lists nothing and the companion is not drawn, and ``[plugins] disable = ["pets"]`` is how a reader gets there.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from typing import TYPE_CHECKING
|
|
10
|
+
|
|
11
|
+
from zettcode.pets import bundled_pets
|
|
12
|
+
from zettcode.plugin_api.plugin import TuiPlugin
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING: # pragma: no cover - annotations only
|
|
15
|
+
from zettcode.plugin_api import PluginContext
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class PetsPlugin(TuiPlugin):
|
|
19
|
+
"""The pets that ship with the program, offered the way any plugin offers one.
|
|
20
|
+
|
|
21
|
+
They are registered before the installed plugins', so they are listed first in the ``/pet`` menu, and a plugin
|
|
22
|
+
cannot register a name they hold. Adding a pet is adding a module beside the others and its name to ``BUNDLED``;
|
|
23
|
+
nothing here knows what a pet looks like.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
name = "pets"
|
|
27
|
+
description = "The companion pets"
|
|
28
|
+
|
|
29
|
+
def activate(self, ctx: PluginContext) -> None:
|
|
30
|
+
"""Offer each pet by name. Nothing is built until one is asked for."""
|
|
31
|
+
if ctx.tui is None:
|
|
32
|
+
return
|
|
33
|
+
for source in bundled_pets():
|
|
34
|
+
ctx.tui.register_pet(source.name, source.load, description=source.description)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""The polar bear: a white bear sitting up, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by twelve, flat colour with no outline. Two round ears with icy insides, small dark eyes, a pale muzzle
|
|
4
|
+
with a big dark nose, and blue-grey paws. At work it blinks; when patted it closes its eyes, blushes and smiles.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
10
|
+
|
|
11
|
+
DESCRIPTION = "a white polar bear; it blinks along while a request runs"
|
|
12
|
+
|
|
13
|
+
PALETTE = {
|
|
14
|
+
"B": "#f2f5f7",
|
|
15
|
+
"H": "#a9c3d6",
|
|
16
|
+
"S": "#dbe7ef",
|
|
17
|
+
"N": "#2a2a33",
|
|
18
|
+
"E": "#2e2230",
|
|
19
|
+
"P": "#f4a6b4",
|
|
20
|
+
"M": "#c4475c",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_AWAKE = (
|
|
24
|
+
".BBB......BBB.",
|
|
25
|
+
".BHBBBBBBBBHB.",
|
|
26
|
+
".BBBBBBBBBBBB.",
|
|
27
|
+
".BBEEBBBBEEBB.",
|
|
28
|
+
".BBEEBBBBEEBB.",
|
|
29
|
+
".BBBBSSSSBBBB.",
|
|
30
|
+
".BBBSSNNSSBBB.",
|
|
31
|
+
"..BBSSSSSSBB..",
|
|
32
|
+
"..BBBBBBBBBB..",
|
|
33
|
+
".BBBBBBBBBBBB.",
|
|
34
|
+
".BBHHBBBBHHBB.",
|
|
35
|
+
".BBHHBBBBHHBB.",
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
_ASLEEP = edited(_AWAKE, {3: ".BBBBBBBBBBBB."})
|
|
39
|
+
_GLAD = edited(_ASLEEP, {5: ".BBPBSSSSBPBB.", 7: "..BBSSMMSSBB.."})
|
|
40
|
+
_SMILE = edited(_ASLEEP, {5: ".BBPBSSSSBPBB."})
|
|
41
|
+
|
|
42
|
+
PET = Pet(
|
|
43
|
+
"polarbear",
|
|
44
|
+
PALETTE,
|
|
45
|
+
{
|
|
46
|
+
IDLE: (_ASLEEP,),
|
|
47
|
+
WORKING: (_AWAKE, _ASLEEP),
|
|
48
|
+
GLAD: (_GLAD, _SMILE),
|
|
49
|
+
},
|
|
50
|
+
)
|
zettcode/pets/py.typed
ADDED
|
File without changes
|
zettcode/pets/scarfy.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""Scarfy: a penguin in a red scarf, seen from the side and looking right, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Sixteen pixels by fourteen, flat colour with a dark outline, which is what keeps the pale belly on a light terminal.
|
|
4
|
+
A round head with two eyes looking ahead and an orange beak, a red scarf whose tail hangs down the chest, a white belly
|
|
5
|
+
and two orange feet. At work the scarf swings and the eyes close in a blink; when patted it squints, blushes and opens
|
|
6
|
+
its beak.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
12
|
+
|
|
13
|
+
DESCRIPTION = "a penguin in a red scarf; the scarf swings while a request runs"
|
|
14
|
+
|
|
15
|
+
PALETTE = {
|
|
16
|
+
"O": "#141a2e",
|
|
17
|
+
"B": "#2d3a5c",
|
|
18
|
+
"S": "#f6f9ff",
|
|
19
|
+
"G": "#d0dbef",
|
|
20
|
+
"R": "#e8776a",
|
|
21
|
+
"r": "#b84a42",
|
|
22
|
+
"Y": "#f0a63a",
|
|
23
|
+
"F": "#e8a03a",
|
|
24
|
+
"W": "#ffffff",
|
|
25
|
+
"E": "#0d1020",
|
|
26
|
+
"M": "#c4475c",
|
|
27
|
+
"P": "#e88aa0",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
_AWAKE = (
|
|
31
|
+
"....OOOOOOO.....",
|
|
32
|
+
"...OBBBBBBBO....",
|
|
33
|
+
"..OBBBBBBBBBO...",
|
|
34
|
+
"..OBWEBBWEBBBO..",
|
|
35
|
+
"..OBBBBBBBBYYYO.",
|
|
36
|
+
"..ORRRRRRRRRRRO.",
|
|
37
|
+
".OBRRBSSSSSSBBBO",
|
|
38
|
+
".OBRrBSSSSSSSBBO",
|
|
39
|
+
".OBBBSSSSSSGSBBO",
|
|
40
|
+
".OBBBSSSSSSGGBBO",
|
|
41
|
+
"..OBBSSSSSSGBBO.",
|
|
42
|
+
"...OBBSSSSSBBO..",
|
|
43
|
+
"....OOBBBBBOO...",
|
|
44
|
+
"..FFFFF..FFFFF..",
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
_SHUT = {3: "..OBEEBBEEBBBO.."}
|
|
48
|
+
_ASLEEP = edited(_AWAKE, _SHUT)
|
|
49
|
+
_SWAY = edited(_AWAKE, {3: "..OBEEBBEEBBBO..", 6: ".OBBRRSSSSSSBBBO", 7: ".OBBBRSSSSSSSBBO"})
|
|
50
|
+
_GLAD = edited(_ASLEEP, {4: "..OBBBBPPBBYMYO."})
|
|
51
|
+
_SMILE = edited(_SWAY, {4: "..OBBBBPPBBYMYO."})
|
|
52
|
+
|
|
53
|
+
PET = Pet(
|
|
54
|
+
"scarfy",
|
|
55
|
+
PALETTE,
|
|
56
|
+
{
|
|
57
|
+
IDLE: (_ASLEEP,),
|
|
58
|
+
WORKING: (_AWAKE, _SWAY),
|
|
59
|
+
GLAD: (_GLAD, _SMILE),
|
|
60
|
+
},
|
|
61
|
+
)
|
zettcode/pets/seagull.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""The seagull: a pale grey-blue gull with slate wings, asleep when nothing is running and flapping at work.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by twelve, flat colour with no outline. A round head with a dark eye on each side and a yellow beak, a
|
|
4
|
+
light belly between two slate wings, and two orange feet. At work the wings lift and fall; when patted it closes its
|
|
5
|
+
eyes and opens its beak.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a seagull; it flaps its wings while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"B": "#d5e0ea",
|
|
16
|
+
"G": "#7f95aa",
|
|
17
|
+
"S": "#f4f8fb",
|
|
18
|
+
"Y": "#f2c14e",
|
|
19
|
+
"O": "#ee8a3c",
|
|
20
|
+
"E": "#1f2230",
|
|
21
|
+
"M": "#c4475c",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_DOWN = (
|
|
25
|
+
"....BBBBBB....",
|
|
26
|
+
"...BBBBBBBB...",
|
|
27
|
+
"..BBBBBBBBBB..",
|
|
28
|
+
"..BBEBBBBEBB..",
|
|
29
|
+
"..BBBBYYBBBB..",
|
|
30
|
+
"...BBBYYBBB...",
|
|
31
|
+
"..GGBBBBBBGG..",
|
|
32
|
+
".GGGBBSSBBGGG.",
|
|
33
|
+
".GGGBSSSSBGGG.",
|
|
34
|
+
"..GGBSSSSBGG..",
|
|
35
|
+
"....BBBBBB....",
|
|
36
|
+
"....OO..OO....",
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
_UP = edited(
|
|
40
|
+
_DOWN,
|
|
41
|
+
{
|
|
42
|
+
5: ".GGBBBYYBBBGG.",
|
|
43
|
+
6: ".GGGBBBBBBGGG.",
|
|
44
|
+
7: "..GGBBSSBBGG..",
|
|
45
|
+
8: "...GBSSSSBG...",
|
|
46
|
+
9: "....BSSSSB....",
|
|
47
|
+
},
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
_ASLEEP = edited(_DOWN, {3: "..BBBBBBBBBB.."})
|
|
51
|
+
_ASLEEP_UP = edited(_UP, {3: "..BBBBBBBBBB.."})
|
|
52
|
+
_GLAD = edited(_ASLEEP, {5: "...BBBMMBBB..."})
|
|
53
|
+
_SMILE = edited(_ASLEEP_UP, {5: ".GGBBBMMBBBGG."})
|
|
54
|
+
|
|
55
|
+
PET = Pet(
|
|
56
|
+
"seagull",
|
|
57
|
+
PALETTE,
|
|
58
|
+
{
|
|
59
|
+
IDLE: (_ASLEEP,),
|
|
60
|
+
WORKING: (_DOWN, _UP),
|
|
61
|
+
GLAD: (_GLAD, _SMILE),
|
|
62
|
+
},
|
|
63
|
+
)
|
zettcode/pets/slime.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""The slime: a mint jelly with a shine on its head, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by twelve, flat colour with no outline. A soft dome with a bright highlight, two big eyes, pink cheeks
|
|
4
|
+
and a small mouth, sitting on a darker base. At work it hops and a shadow appears under it; when patted it opens its
|
|
5
|
+
mouth wide.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a mint jelly; it hops while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"G": "#8fdca4",
|
|
16
|
+
"D": "#5fb67c",
|
|
17
|
+
"Z": "#d8f7e0",
|
|
18
|
+
"E": "#23412e",
|
|
19
|
+
"W": "#ffffff",
|
|
20
|
+
"P": "#f08fa6",
|
|
21
|
+
"M": "#c4475c",
|
|
22
|
+
"S": "#6f9f80",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_AIR = "." * 14
|
|
26
|
+
|
|
27
|
+
_BLOCK = (
|
|
28
|
+
"......GG......",
|
|
29
|
+
"....GGGGGG....",
|
|
30
|
+
"..GZZGGGGGGG..",
|
|
31
|
+
".GGGGGGGGGGGG.",
|
|
32
|
+
"GGGWEGGGGWEGGG",
|
|
33
|
+
"GGGEEGGGGEEGGG",
|
|
34
|
+
"GGPGGGGGGGGPGG",
|
|
35
|
+
"GGGGGGMMGGGGGG",
|
|
36
|
+
"GGGGGGGGGGGGGG",
|
|
37
|
+
".DDDDDDDDDDDD.",
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
_SHADOW = "..SSSSSSSSSS.."
|
|
41
|
+
|
|
42
|
+
_REST = (_AIR, _AIR, *_BLOCK)
|
|
43
|
+
_HOP = (_AIR, *_BLOCK, _SHADOW)
|
|
44
|
+
_ASLEEP = edited(_REST, {6: "GGGGGGGGGGGGGG"})
|
|
45
|
+
_GLAD = edited(_REST, {6: "GGGGGGGGGGGGGG", 9: "GGGGGMMMMGGGGG"})
|
|
46
|
+
_SMILE = edited(_HOP, {5: "GGGGGGGGGGGGGG"})
|
|
47
|
+
|
|
48
|
+
PET = Pet(
|
|
49
|
+
"slime",
|
|
50
|
+
PALETTE,
|
|
51
|
+
{
|
|
52
|
+
IDLE: (_ASLEEP,),
|
|
53
|
+
WORKING: (_REST, _HOP),
|
|
54
|
+
GLAD: (_GLAD, _SMILE),
|
|
55
|
+
},
|
|
56
|
+
)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""The snow bear: a big white polar bear sitting side on and looking left, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Eighteen pixels by fourteen, flat colour with a slate outline, which is what keeps a white bear on a light terminal. A
|
|
4
|
+
long snout with a dark nose, two round ears with pink insides, a heavy back sloping down to the right, two front legs
|
|
5
|
+
and a haunch. At work an ear flicks and it blinks; when patted it squints, blushes and shows its tongue.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a white bear sitting side on; an ear flicks while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"O": "#44527a",
|
|
16
|
+
"W": "#f4f8ff",
|
|
17
|
+
"H": "#d4def0",
|
|
18
|
+
"P": "#eab6c0",
|
|
19
|
+
"E": "#1a1d2b",
|
|
20
|
+
"M": "#d05a6e",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_AWAKE = (
|
|
24
|
+
"....OOO..OOO......",
|
|
25
|
+
"...OWPWOOWPWO.....",
|
|
26
|
+
"..OWWWWWWWWWWO....",
|
|
27
|
+
".OWEWWWWWWWWWWO...",
|
|
28
|
+
"OEWHHWWWWWWWWWWO..",
|
|
29
|
+
".OOHHHWWWWWWWWWWO.",
|
|
30
|
+
"...OWWWWWWWWWWWWWO",
|
|
31
|
+
"..OWWWWWWWWWWWWWWO",
|
|
32
|
+
"..OWWWHWWWWWWWWWWO",
|
|
33
|
+
"..OWWWHWWWWWWHHWWO",
|
|
34
|
+
"..OWWWHWWWWWWHHWO.",
|
|
35
|
+
"..OWWWHWWWWWWWWO..",
|
|
36
|
+
".OWWWWHWWWWWWWWO..",
|
|
37
|
+
".OOOOOOOOOOOOOOO..",
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
_EAR = {0: "....OOO...OOO.....", 1: "...OWPWO.OWPWO...."}
|
|
41
|
+
_SQUINT = {3: ".OEEWWWWWWWWWWO..."}
|
|
42
|
+
_ASLEEP = edited(_AWAKE, _SQUINT)
|
|
43
|
+
_FLICK = edited(_AWAKE, {**_EAR, **_SQUINT})
|
|
44
|
+
_GLAD = edited(_ASLEEP, {4: "OEWHHPPWWWWWWWWO..", 5: ".OOMMHWWWWWWWWWWO."})
|
|
45
|
+
_SMILE = edited(_GLAD, _EAR)
|
|
46
|
+
|
|
47
|
+
PET = Pet(
|
|
48
|
+
"snowbear",
|
|
49
|
+
PALETTE,
|
|
50
|
+
{
|
|
51
|
+
IDLE: (_ASLEEP,),
|
|
52
|
+
WORKING: (_AWAKE, _FLICK),
|
|
53
|
+
GLAD: (_GLAD, _SMILE),
|
|
54
|
+
},
|
|
55
|
+
)
|
zettcode/pets/sprout.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""The sprout: a seedling in a warm pot, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by fourteen, flat colour with no outline. Two leaves on a stem above a round pot, and in the pot a face
|
|
4
|
+
with two big eyes, pink cheeks and a small mouth. The leaves lift while a request runs and droop when nothing does;
|
|
5
|
+
when patted it closes its eyes.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a seedling in a pot; its leaves lift while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"L": "#7fc46a",
|
|
16
|
+
"Z": "#b8e8a4",
|
|
17
|
+
"S": "#4f9a4a",
|
|
18
|
+
"P": "#e8a96b",
|
|
19
|
+
"Q": "#c98a50",
|
|
20
|
+
"E": "#3a2a1c",
|
|
21
|
+
"W": "#ffffff",
|
|
22
|
+
"B": "#f08fa6",
|
|
23
|
+
"M": "#b04a52",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_AWAKE = (
|
|
27
|
+
"..............",
|
|
28
|
+
"..ZZL....LLL..",
|
|
29
|
+
".ZLLLL..LLLLL.",
|
|
30
|
+
"..LLLL..LLLL..",
|
|
31
|
+
"....LLSSLL....",
|
|
32
|
+
".......S......",
|
|
33
|
+
".......S......",
|
|
34
|
+
"..QQQQQQQQQQ..",
|
|
35
|
+
".PPPPPPPPPPPP.",
|
|
36
|
+
".PPWEPPPPWEPP.",
|
|
37
|
+
".PPEEPPPPEEPP.",
|
|
38
|
+
".PBPPPMMPPPBP.",
|
|
39
|
+
"..PPPPPPPPPP..",
|
|
40
|
+
"...QQQQQQQQ...",
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
_DROOP = edited(
|
|
44
|
+
_AWAKE,
|
|
45
|
+
{
|
|
46
|
+
1: "..............",
|
|
47
|
+
2: "..............",
|
|
48
|
+
3: ".ZLL......LLL.",
|
|
49
|
+
4: "ZLLLL.S..LLLLL",
|
|
50
|
+
},
|
|
51
|
+
)
|
|
52
|
+
_ASLEEP = edited(_DROOP, {9: ".PPPPPPPPPPPP."})
|
|
53
|
+
_HAPPY = edited(_AWAKE, {9: ".PPPPPPPPPPPP.", 11: ".PBPPMMMMPPBP."})
|
|
54
|
+
_SMILE = edited(_AWAKE, {9: ".PPPPPPPPPPPP."})
|
|
55
|
+
|
|
56
|
+
PET = Pet(
|
|
57
|
+
"sprout",
|
|
58
|
+
PALETTE,
|
|
59
|
+
{
|
|
60
|
+
IDLE: (_ASLEEP,),
|
|
61
|
+
WORKING: (_DROOP, _AWAKE),
|
|
62
|
+
GLAD: (_HAPPY, _SMILE),
|
|
63
|
+
},
|
|
64
|
+
)
|
zettcode/pets/tiger.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""The tiger: an orange tiger cub with black stripes, asleep when nothing is running.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by twelve, flat colour with no outline. Small round ears, three black stripes down the forehead and two
|
|
4
|
+
on each cheek, a white muzzle with a dark nose, and a striped tail behind. At work it blinks; when patted it narrows
|
|
5
|
+
its eyes and shows its mouth.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "an orange tiger; it keeps watch while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"B": "#f2993a",
|
|
16
|
+
"K": "#2b1d17",
|
|
17
|
+
"S": "#fff3dc",
|
|
18
|
+
"N": "#3a2418",
|
|
19
|
+
"E": "#2e2230",
|
|
20
|
+
"W": "#ffffff",
|
|
21
|
+
"T": "#f2748c",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_AWAKE = (
|
|
25
|
+
".BBB......BBB.",
|
|
26
|
+
"BBBBB....BBBBB",
|
|
27
|
+
".BBBBBBBBBBBB.",
|
|
28
|
+
"BBBKBBKKBBKBBB",
|
|
29
|
+
"KKBBBBKKBBBBKK",
|
|
30
|
+
"BBBWEBBBBWEBBB",
|
|
31
|
+
"KKBEEBBBBEEBKK",
|
|
32
|
+
"BBBBSSSSSSBBBB",
|
|
33
|
+
"KKBSSSNNSSSBKK",
|
|
34
|
+
".BBBSSSSSSBBB.",
|
|
35
|
+
"..BBBBBBBBBBBK",
|
|
36
|
+
"..BSSBBBBSSBBB",
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
_ASLEEP = edited(_AWAKE, {5: "BBBBBBBBBBBBBB"})
|
|
40
|
+
_BLINK = _ASLEEP
|
|
41
|
+
_GLAD = edited(_AWAKE, {9: ".BBBSTTTTSBBB."})
|
|
42
|
+
_SMILE = edited(_ASLEEP, {9: ".BBBSTTTTSBBB."})
|
|
43
|
+
|
|
44
|
+
PET = Pet(
|
|
45
|
+
"tiger",
|
|
46
|
+
PALETTE,
|
|
47
|
+
{
|
|
48
|
+
IDLE: (_ASLEEP,),
|
|
49
|
+
WORKING: (_AWAKE, _BLINK),
|
|
50
|
+
GLAD: (_GLAD, _SMILE),
|
|
51
|
+
},
|
|
52
|
+
)
|
zettcode/pets/whale.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""The whale: a round blue whale, asleep when nothing is running and spouting at work.
|
|
2
|
+
|
|
3
|
+
Fourteen pixels by twelve, flat colour with no outline. A round body with two big eyes, pink cheeks and a pale belly,
|
|
4
|
+
a darker tail lifted at the back, and a spout above the head. The spout is the thing that moves: a low plume, then a
|
|
5
|
+
high one. When patted it closes its eyes and opens its mouth.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from zettcode.plugin_api.pets import GLAD, IDLE, WORKING, Pet, edited
|
|
11
|
+
|
|
12
|
+
DESCRIPTION = "a blue whale; it spouts while a request runs"
|
|
13
|
+
|
|
14
|
+
PALETTE = {
|
|
15
|
+
"B": "#6ba8c4",
|
|
16
|
+
"D": "#4a7a94",
|
|
17
|
+
"S": "#e3eef3",
|
|
18
|
+
"E": "#2b3a42",
|
|
19
|
+
"W": "#ffffff",
|
|
20
|
+
"P": "#f08fa6",
|
|
21
|
+
"M": "#c4475c",
|
|
22
|
+
"I": "#bfe3f2",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_BODY = (
|
|
26
|
+
"..............",
|
|
27
|
+
"..............",
|
|
28
|
+
"...........D.D",
|
|
29
|
+
"............DD",
|
|
30
|
+
"....BBBBBBBDD.",
|
|
31
|
+
"..BBBBBBBBBBB.",
|
|
32
|
+
".BBBBBBBBBBBB.",
|
|
33
|
+
".BBWEBBWEBBBB.",
|
|
34
|
+
".BBEEBBEEBBBB.",
|
|
35
|
+
".BPBBMMBBPBBB.",
|
|
36
|
+
".SSSSSSSSSSSS.",
|
|
37
|
+
"..SSSSSSSSSS..",
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
_SPOUT = edited(_BODY, {3: "......I.....DD"})
|
|
41
|
+
_HIGH = edited(_BODY, {1: "......I.......", 2: ".....I.I...D.D", 3: "......I.....DD"})
|
|
42
|
+
_OFF = edited(_BODY, {7: ".BBBBBBBBBBBB."})
|
|
43
|
+
_GLAD = edited(_BODY, {7: ".BBBBBBBBBBBB.", 9: ".BPBMMMMBPBBB."})
|
|
44
|
+
_SMILE = edited(_BODY, {7: ".BBBBBBBBBBBB."})
|
|
45
|
+
|
|
46
|
+
PET = Pet(
|
|
47
|
+
"whale",
|
|
48
|
+
PALETTE,
|
|
49
|
+
{
|
|
50
|
+
IDLE: (_OFF,),
|
|
51
|
+
WORKING: (_SPOUT, _HIGH),
|
|
52
|
+
GLAD: (_GLAD, _SMILE),
|
|
53
|
+
},
|
|
54
|
+
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: zettcode-pets
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: The pets that keep ZettCode's terminal company, offered to it as a plugin
|
|
5
|
+
Project-URL: Repository, https://github.com/Chang-LeHung/zettcode
|
|
6
|
+
Author: Chang-LeHung
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Keywords: pets,terminal,zettcode
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Requires-Dist: zettcode-plugin-api
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
zettcode/pets/__init__.py,sha256=xhkiwAS_lxaimuziWchVDflP1gfn5WDVj8jwEy6uV0g,1688
|
|
2
|
+
zettcode/pets/cat.py,sha256=Sgl95reem4ChpTIF54g1APd5zRn7OXwLRB-9ccE7X4s,1342
|
|
3
|
+
zettcode/pets/chibi.py,sha256=Jdgdo9MwUTtXAx2O44ujP9z03qA1PxZaVMjEJG8YGB4,1474
|
|
4
|
+
zettcode/pets/dog.py,sha256=GvTsv621JbPD1GZnGFfSHrnqCLgcGWpTaYHORpwwY3g,1265
|
|
5
|
+
zettcode/pets/kangaroo.py,sha256=Pxh1kMAfP2QmX_lzkRbGFqk7z4bSEwV_8WJlYlhfeqU,1560
|
|
6
|
+
zettcode/pets/penguin.py,sha256=l2yGGPTVCEJKuDEFhd5qlM6CimIWJsYIgCF3gBPZvdg,1498
|
|
7
|
+
zettcode/pets/plugin.py,sha256=bO-zLUWntJ_eG0zw36RHQVHYnhy1Qre47a_UcDLOUgg,1334
|
|
8
|
+
zettcode/pets/polarbear.py,sha256=Z5EkBvxhd06IN5uYbWMQQnSbUssF4jQxNgsI0FiJ0W4,1243
|
|
9
|
+
zettcode/pets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
zettcode/pets/scarfy.py,sha256=cwMDB4N3EcWx07Y6mHflxyDEUZQq5hyT5epCWbZ3SB0,1672
|
|
11
|
+
zettcode/pets/seagull.py,sha256=861GGYJ9GI7d7sDrtJmTUn0jrdvQRxwW2gVSdUm6jMg,1505
|
|
12
|
+
zettcode/pets/slime.py,sha256=OHuv1B5iXmK4HylfYBCT1auSsSK6vxL-5PXiwnJDNos,1322
|
|
13
|
+
zettcode/pets/snowbear.py,sha256=TACBaEuGgZCA9BvI-vFvjN1_yW58NIQB1nepx9-jpLs,1583
|
|
14
|
+
zettcode/pets/sprout.py,sha256=S5mv21O0nfhhUiDjTf-VL3Adm4VQUvmY-eiQ4a8baVQ,1517
|
|
15
|
+
zettcode/pets/tiger.py,sha256=pV8mi1wHEWcQ9q7qgUCIgUMjGUQPZQFFu8IMgZ1DdN8,1273
|
|
16
|
+
zettcode/pets/whale.py,sha256=0f9MpHD1c2OS4VntJCVa6g6-PXA5K8CDEMwwVqq7RJw,1441
|
|
17
|
+
zettcode_pets-0.4.0.dist-info/METADATA,sha256=vcUQNc-0qsgtsT1UUVSBkekWdQ1Wdyng_mZC6XTouNQ,733
|
|
18
|
+
zettcode_pets-0.4.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
19
|
+
zettcode_pets-0.4.0.dist-info/entry_points.txt,sha256=zbGFpDasc97eAbg4sBrbAfmCjaINTA9UWPAWuhZupHw,59
|
|
20
|
+
zettcode_pets-0.4.0.dist-info/RECORD,,
|