diff --git a/README.md b/README.md index 8e2a2044..7b386679 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,8 @@ The horse animations were adapted by [Chris Kent](https://github.com/thechrisken [Kennet Shin](https://github.com/WoofWoof0) created the snail media assets. +The frog animations were created by [seethingswarm](https://seethingswarm.itch.io/frogpack). + ## Thank you Thanks to all the [contributors](https://github.com/tonybaloney/vscode-pets/graphs/contributors) to this project. diff --git a/media/frog/blue_idle_8fps.gif b/media/frog/blue_idle_8fps.gif new file mode 100644 index 00000000..86dd354f Binary files /dev/null and b/media/frog/blue_idle_8fps.gif differ diff --git a/media/frog/blue_run_8fps.gif b/media/frog/blue_run_8fps.gif new file mode 100644 index 00000000..3dcd901e Binary files /dev/null and b/media/frog/blue_run_8fps.gif differ diff --git a/media/frog/blue_swipe_8fps.gif b/media/frog/blue_swipe_8fps.gif new file mode 100644 index 00000000..4c4438f2 Binary files /dev/null and b/media/frog/blue_swipe_8fps.gif differ diff --git a/media/frog/blue_walk_8fps.gif b/media/frog/blue_walk_8fps.gif new file mode 100644 index 00000000..3dcd901e Binary files /dev/null and b/media/frog/blue_walk_8fps.gif differ diff --git a/media/frog/blue_walk_fast_8fps.gif b/media/frog/blue_walk_fast_8fps.gif new file mode 100644 index 00000000..3dcd901e Binary files /dev/null and b/media/frog/blue_walk_fast_8fps.gif differ diff --git a/media/frog/blue_with_ball_8fps.gif b/media/frog/blue_with_ball_8fps.gif new file mode 100644 index 00000000..42f767a8 Binary files /dev/null and b/media/frog/blue_with_ball_8fps.gif differ diff --git a/media/frog/green_idle_8fps.gif b/media/frog/green_idle_8fps.gif new file mode 100644 index 00000000..49b1ed7d Binary files /dev/null and b/media/frog/green_idle_8fps.gif differ diff --git a/media/frog/green_run_8fps.gif b/media/frog/green_run_8fps.gif new file mode 100644 index 00000000..00c538fe Binary files /dev/null and b/media/frog/green_run_8fps.gif differ diff --git a/media/frog/green_swipe_8fps.gif b/media/frog/green_swipe_8fps.gif new file mode 100644 index 00000000..6c8090b2 Binary files /dev/null and b/media/frog/green_swipe_8fps.gif differ diff --git a/media/frog/green_walk_8fps.gif b/media/frog/green_walk_8fps.gif new file mode 100644 index 00000000..00c538fe Binary files /dev/null and b/media/frog/green_walk_8fps.gif differ diff --git a/media/frog/green_walk_fast_8fps.gif b/media/frog/green_walk_fast_8fps.gif new file mode 100644 index 00000000..00c538fe Binary files /dev/null and b/media/frog/green_walk_fast_8fps.gif differ diff --git a/media/frog/green_with_ball_8fps.gif b/media/frog/green_with_ball_8fps.gif new file mode 100644 index 00000000..5b60b210 Binary files /dev/null and b/media/frog/green_with_ball_8fps.gif differ diff --git a/media/frog/red_idle_8fps.gif b/media/frog/red_idle_8fps.gif new file mode 100644 index 00000000..d089d3ef Binary files /dev/null and b/media/frog/red_idle_8fps.gif differ diff --git a/media/frog/red_run_8fps.gif b/media/frog/red_run_8fps.gif new file mode 100644 index 00000000..34c37861 Binary files /dev/null and b/media/frog/red_run_8fps.gif differ diff --git a/media/frog/red_swipe_8fps.gif b/media/frog/red_swipe_8fps.gif new file mode 100644 index 00000000..f82afd46 Binary files /dev/null and b/media/frog/red_swipe_8fps.gif differ diff --git a/media/frog/red_walk_8fps.gif b/media/frog/red_walk_8fps.gif new file mode 100644 index 00000000..34c37861 Binary files /dev/null and b/media/frog/red_walk_8fps.gif differ diff --git a/media/frog/red_walk_fast_8fps.gif b/media/frog/red_walk_fast_8fps.gif new file mode 100644 index 00000000..34c37861 Binary files /dev/null and b/media/frog/red_walk_fast_8fps.gif differ diff --git a/media/frog/red_with_ball_8fps.gif b/media/frog/red_with_ball_8fps.gif new file mode 100644 index 00000000..41daa559 Binary files /dev/null and b/media/frog/red_with_ball_8fps.gif differ diff --git a/package.json b/package.json index 973c23bf..fc15add4 100644 --- a/package.json +++ b/package.json @@ -186,6 +186,7 @@ "cockatiel", "dog", "fox", + "frog", "horse", "mod", "rat", diff --git a/src/common/names.ts b/src/common/names.ts index 35aaa32d..329676f6 100644 --- a/src/common/names.ts +++ b/src/common/names.ts @@ -6,6 +6,7 @@ import { CRAB_NAMES } from '../panel/pets/crab'; import { DENO_NAMES } from '../panel/pets/deno'; import { DOG_NAMES } from '../panel/pets/dog'; import { FOX_NAMES } from '../panel/pets/fox'; +import { FROG_NAMES } from '../panel/pets/frog'; import { MOD_NAMES } from '../panel/pets/mod'; import { ROCKY_NAMES } from '../panel/pets/rocky'; import { DUCK_NAMES } from '../panel/pets/rubberduck'; @@ -26,6 +27,7 @@ export function randomName(type: PetType): string { [PetType.chicken]: CHICKEN_NAMES, [PetType.dog]: DOG_NAMES, [PetType.fox]: FOX_NAMES, + [PetType.frog]: FROG_NAMES, [PetType.crab]: CRAB_NAMES, [PetType.clippy]: CLIPPY_NAMES, [PetType.deno]: DENO_NAMES, diff --git a/src/common/types.ts b/src/common/types.ts index c223afdd..c7408b85 100644 --- a/src/common/types.ts +++ b/src/common/types.ts @@ -3,6 +3,7 @@ export const enum PetColor { lightbrown = 'lightbrown', black = 'black', green = 'green', + blue = 'blue', yellow = 'yellow', gray = 'gray', purple = 'purple', @@ -30,6 +31,7 @@ export const enum PetType { dog = 'dog', deno = 'deno', fox = 'fox', + frog = 'frog', horse = 'horse', mod = 'mod', rat = 'rat', @@ -96,6 +98,7 @@ export const ALL_PETS = [ PetType.dog, PetType.deno, PetType.fox, + PetType.frog, PetType.horse, PetType.mod, PetType.rat, diff --git a/src/panel/pets.ts b/src/panel/pets.ts index c32e9f7c..86615090 100644 --- a/src/panel/pets.ts +++ b/src/panel/pets.ts @@ -7,6 +7,7 @@ import { Crab } from './pets/crab'; import { Deno } from './pets/deno'; import { Dog } from './pets/dog'; import { Fox } from './pets/fox'; +import { Frog } from './pets/frog'; import { Horse } from './pets/horse'; import { Mod } from './pets/mod'; import { Rat } from './pets/rat'; @@ -187,6 +188,8 @@ export function createPet( return new Dog(...standardPetArguments, PetSpeed.normal); case PetType.fox: return new Fox(...standardPetArguments, PetSpeed.fast); + case PetType.frog: + return new Frog(...standardPetArguments, PetSpeed.normal); case PetType.crab: return new Crab(...standardPetArguments, PetSpeed.slow); case PetType.clippy: @@ -230,6 +233,8 @@ export function availableColors(petType: PetType): PetColor[] { return Deno.possibleColors; case PetType.fox: return Fox.possibleColors; + case PetType.frog: + return Frog.possibleColors; case PetType.crab: return Crab.possibleColors; case PetType.clippy: diff --git a/src/panel/pets/frog.ts b/src/panel/pets/frog.ts new file mode 100644 index 00000000..f7077181 --- /dev/null +++ b/src/panel/pets/frog.ts @@ -0,0 +1,84 @@ +import { PetColor } from '../../common/types'; +import { BasePetType } from '../basepettype'; +import { States } from '../states'; + +export class Frog extends BasePetType { + label = 'frog'; + static possibleColors = [PetColor.red, PetColor.green, PetColor.blue]; + sequence = { + startingState: States.sitIdle, + sequenceStates: [ + { + state: States.sitIdle, + possibleNextStates: [States.walkRight, States.runRight], + }, + { + state: States.walkRight, + possibleNextStates: [States.walkLeft, States.runLeft], + }, + { + state: States.runRight, + possibleNextStates: [States.walkLeft, States.runLeft], + }, + { + state: States.walkLeft, + possibleNextStates: [States.sitIdle], + }, + { + state: States.runLeft, + possibleNextStates: [States.sitIdle], + }, + { + state: States.chase, + possibleNextStates: [States.idleWithBall], + }, + { + state: States.idleWithBall, + possibleNextStates: [ + States.walkRight, + States.walkLeft, + States.runLeft, + States.runRight, + ], + }, + ], + }; + get emoji(): string { + return '🐸'; + } + get hello(): string { + return Math.random() > 0.5 ? `croak...` : `ribbit!`; + } +} + +export const FROG_NAMES: ReadonlyArray = [ + 'Blinky', + 'Bubbles', + 'Drift', + 'Frogger', + 'Freddy', + 'Hopper', + 'Jumpy', + 'Kermit', + 'Lily', + 'Leapster', + 'Marsh', + 'Misty', + 'Moss', + 'Pebbles', + 'Pip', + 'Pondy', + 'Quagmire', + 'Rango', + 'Razor', + 'Slick', + 'Swamper', + 'Swampy', + 'Sprout', + 'Thistle', + 'Tad', + 'Toady', + 'Warty', + 'Willow', + 'Wiggle', +]; diff --git a/src/test/gifs.ts b/src/test/gifs.ts index f3321759..f4a5b054 100644 --- a/src/test/gifs.ts +++ b/src/test/gifs.ts @@ -52,6 +52,10 @@ const pets: { [key: string]: { colors: string[]; states: string[] } } = { colors: ['red', 'white'], states: ['idle', 'run', 'swipe', 'walk', 'walk_fast', 'with_ball'], }, + frog: { + colors: ['green'], + states: ['idle', 'run', 'swipe', 'walk', 'walk_fast', 'with_ball'], + }, mod: { colors: ['purple'], states: ['idle', 'run', 'swipe', 'walk', 'walk_fast', 'with_ball'],