Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fox Pet #343

Merged
merged 8 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ The forest theme was designed by [edermunizz](https://edermunizz.itch.io/free-pi

[Marc Duiker](https://twitter.com/marcduiker) created the Clippy, Rocky, Zappy, rubber duck, snake, cockatiel, Ferris the crab, and Mod the dotnet bot media assets.

[Elthen](https://twitter.com/pixelthen) created the fox media assets.

[Karen Rustad Tölva](https://www.aldeka.net) designed the original concept of Ferris the crab.

## Thank you
Expand Down
Binary file added media/fox/red_idle_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/red_lie_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/red_run_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/red_swipe_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/red_walk_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/red_walk_fast_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/red_with_ball_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/white_idle_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/white_lie_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/white_run_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/white_swipe_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/white_walk_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/white_walk_fast_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/fox/white_with_ball_8fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,252 changes: 2,731 additions & 2,521 deletions media/main-bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
"clippy",
"cockatiel",
"dog",
"fox",
"mod",
"rocky",
"rubber-duck",
Expand Down
2 changes: 2 additions & 0 deletions src/common/names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CLIPPY_NAMES } from '../panel/pets/clippy';
import { COCKATIEL_NAMES } from '../panel/pets/cockatiel';
import { CRAB_NAMES } from '../panel/pets/crab';
import { DOG_NAMES } from '../panel/pets/dog';
import { FOX_NAMES } from '../panel/pets/fox';
import { MOD_NAMES } from '../panel/pets/mod';
import { ROCKY_NAMES } from '../panel/pets/rocky';
import { DUCK_NAMES } from '../panel/pets/rubberduck';
Expand All @@ -19,6 +20,7 @@ export function randomName(type: PetType): string {
[PetType.cat]: CAT_NAMES,
[PetType.chicken]: CHICKEN_NAMES,
[PetType.dog]: DOG_NAMES,
[PetType.fox]: FOX_NAMES,
[PetType.crab]: CRAB_NAMES,
[PetType.clippy]: CLIPPY_NAMES,
[PetType.mod]: MOD_NAMES,
Expand Down
2 changes: 2 additions & 0 deletions src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const enum PetType {
cockatiel = 'cockatiel',
crab = 'crab',
dog = 'dog',
fox = 'fox',
mod = 'mod',
rocky = 'rocky',
rubberduck = 'rubber-duck',
Expand Down Expand Up @@ -76,6 +77,7 @@ export const ALL_PETS = [
PetType.cockatiel,
PetType.crab,
PetType.dog,
PetType.fox,
PetType.mod,
PetType.rocky,
PetType.rubberduck,
Expand Down
5 changes: 5 additions & 0 deletions src/panel/pets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Clippy } from './pets/clippy';
import { Cockatiel } from './pets/cockatiel';
import { Crab } from './pets/crab';
import { Dog } from './pets/dog';
import { Fox } from './pets/fox';
import { Mod } from './pets/mod';
import { Rocky } from './pets/rocky';
import { RubberDuck } from './pets/rubberduck';
Expand Down Expand Up @@ -177,6 +178,8 @@ export function createPet(
return new Chicken(...standardPetArguments, PetSpeed.normal);
case PetType.dog:
return new Dog(...standardPetArguments, PetSpeed.normal);
case PetType.fox:
return new Fox(...standardPetArguments, PetSpeed.veryFast);
nikelasi marked this conversation as resolved.
Show resolved Hide resolved
case PetType.crab:
return new Crab(...standardPetArguments, PetSpeed.slow);
case PetType.clippy:
Expand Down Expand Up @@ -208,6 +211,8 @@ export function availableColors(petType: PetType): PetColor[] {
return Chicken.possibleColors;
case PetType.dog:
return Dog.possibleColors;
case PetType.fox:
return Fox.possibleColors;
case PetType.crab:
return Crab.possibleColors;
case PetType.clippy:
Expand Down
191 changes: 191 additions & 0 deletions src/panel/pets/fox.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
import { PetColor } from '../../common/types';
import { BasePetType } from '../basepettype';
import { States } from '../states';

export class Fox extends BasePetType {
label = 'fox';
static possibleColors = [PetColor.red, PetColor.white];
sequence = {
startingState: States.sitIdle,
sequenceStates: [
{
state: States.sitIdle,
possibleNextStates: [
States.lie,
States.walkRight,
States.walkLeft,
States.runRight,
States.runLeft,
],
},
{
state: States.lie,
possibleNextStates: [
States.walkRight,
States.walkLeft,
States.runRight,
States.runLeft,
],
},
{
state: States.walkRight,
possibleNextStates: [
States.sitIdle,
States.walkLeft,
States.runLeft,
],
},
{
state: States.walkLeft,
possibleNextStates: [
States.sitIdle,
States.walkRight,
States.runRight,
],
},
{
state: States.runRight,
possibleNextStates: [
States.lie,
States.sitIdle,
States.walkLeft,
States.runLeft,
],
},
{
state: States.runLeft,
possibleNextStates: [
States.lie,
States.sitIdle,
States.walkRight,
States.runRight,
],
},
{
state: States.chase,
possibleNextStates: [States.idleWithBall],
},
{
state: States.idleWithBall,
possibleNextStates: [
States.lie,
States.walkRight,
States.walkLeft,
States.runRight,
States.runLeft,
],
},
],
};
get emoji(): string {
return '🦊';
}
get hello(): string {
return `fox says hello`;
}
}

export const FOX_NAMES: ReadonlyArray<string> = [
'Arizona',
'Frankie',
'Rosy',
'Cinnamon',
'Ginger',
'Todd',
'Rocky',
'Felix',
'Sandy',
'Archie',
'Flynn',
'Foxy',
'Elmo',
'Ember',
'Hunter',
'Otto',
'Sonic',
'Amber',
'Maroon',
'Spark',
'Sparky',
'Sly',
'Scout',
'Penny',
'Ash',
'Rose',
'Apollo',
'Chili',
'Blaze',
'Radish',
'Scarlett',
'Juliet',
'Goldie',
'Rooney',
'Paprika',
'Alpine',
'Rusty',
'Maple',
'Vixen',
'David',
'Apricot',
'Claire',
'Wilma',
'Copper',
'Pepper',
'Crimson',
'Ariel',
'Arvi',
'George',
'Eva',
'Fuzzy',
'Russell',
'Rufus',
'Mystic',
'Leopold',
'Scully',
'Ferris',
'Robin',
'Zorro',
'Scarlet',
'Comet',
'Rowan',
'Jake',
'Hope',
'Molly',
'Mars',
'Apple',
'Geneva',
'Redford',
'Chestnut',
'Evelyn',
'Red',
'Aurora',
'Agniya',
'Fitz',
'Crispin',
'Sunny',
'Autumn',
'Bridget',
'Ruby',
'Iris',
'Pumpkin',
'Rose',
'Rosie',
'Vesta',
'Adolf',
'Lava',
'Conan',
'Flame',
'Oswald',
'Tails',
'Chester',
'Jasper',
'Finch',
'Scarlet',
'Chewy',
'Finnick',
'Biscuit',
'Prince Harry',
'Loki',
'Pip',
'Pippin',
];