Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into pr/piotrszleg/332
Browse files Browse the repository at this point in the history
  • Loading branch information
tonybaloney committed Feb 9, 2023
2 parents 949d952 + 381735e commit db3549b
Show file tree
Hide file tree
Showing 26 changed files with 46 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Open the setting panel with `Ctrl+,` on Windows/Linux or `Cmd(⌘)+,` on MacOS.
Set a default color, size, pet type, position, and theme when you open a Pet Panel.

* Pet Color: black, brown, green, yellow, gray, purple, red, white
* Pet Size: nano, medium, large
* Pet Size: nano, small, medium, large
* Pet Type: cat, chicken, crab, clippy, cockatiel, dog, mod, rocky, rubber duck, snake, totoro, zappy

.. image:: _static/screenshot-2.gif
Expand Down
6 changes: 3 additions & 3 deletions l10n/bundle.l10n.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"Select the pet to remove.": "Select the pet to remove.",
"Leave blank for a random name": "Leave blank for a random name",
"Name your pet": "Name your pet",
"Cancelled Spawning Pet": "Cancelled Spawning Pet",
"A Pet Playground has been created. You can now use the \"Spawn Additional Pet\" Command to add more pets.": "A Pet Playground has been created. You can now use the \"Spawn Additional Pet\" Command to add more pets.",
"A Pet Playground has been created. You can now use the \"Remove All Pets\" Command to remove all pets.": "A Pet Playground has been created. You can now use the \"Remove All Pets\" Command to remove all pets.",
"Cancelled Spawning Pet": "Canceled spawning pet",
"A Pet Playground has been created. You can now use the \"Spawn Additional Pet\" Command to add more pets.": "A Pet Playground has been created. You may now use the \"Spawn Additional Pet\" command to add more pets.",
"A Pet Playground has been created. You can now use the \"Remove All Pets\" Command to remove all pets.": "A Pet Playground has been created. You may now use the \"Remove All Pets\" command.",
"black": "Black",
"brown": "Brown",
"lightbrown": "Light Brown",
Expand Down
4 changes: 2 additions & 2 deletions l10n/bundle.l10n.id.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"Select the pet to remove.": "Pilih hewan peliharaan yang akan dihapus.",
"Leave blank for a random name": "Biarkan kosong untuk nama acak",
"Name your pet": "Beri nama hewan peliharaan Anda",
"Cancelled Spawning Pet": "Hewan Peliharaan Pemijahan Dibatalkan",
"Cancelled Spawning Pet": "Pemanggilan Hewan Peliharaan Dibatalkan",
"A Pet Playground has been created. You can now use the \"Spawn Additional Pet\" Command to add more pets.": "Taman Bermain Hewan Peliharaan telah dibuat. Anda sekarang dapat menggunakan Perintah \"Memunculkan Hewan Peliharaan\" untuk menambahkan lebih banyak hewan peliharaan.",
"A Pet Playground has been created. You can now use the \"Remove All Pets\" Command to remove all pets.": "Taman Bermain Hewan Peliharaan telah dibuat. Sekarang Anda dapat menggunakan Perintah \"Hapus Semua Hewan Peliharaan\" untuk menghapus semua hewan peliharaan.",
"black": "Hitam",
"brown": "Cokelat",
"lightbrown": "Light Brown",
"lightbrown": "Coklat Muda",
"green": "Hijau",
"yellow": "Kuning",
"gray": "Abu-abu",
Expand Down
2 changes: 1 addition & 1 deletion l10n/bundle.l10n.it.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"white": "Bianco",
"cat": "Gatto",
"clippy": "Clippy",
"cockatiel": "Calopsitta",
"cockatiel": "Cacatua",
"crab": "Granchio",
"dog": "Cane",
"mod": "Mod (il bot .NET)",
Expand Down
4 changes: 2 additions & 2 deletions l10n/bundle.l10n.ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"A Pet Playground has been created. You can now use the \"Remove All Pets\" Command to remove all pets.": "펫이 돌아다닐 수 있는 공간이 만들어졌습니다. \"Remove All Pets\" 명령으로 모든 펫을 제거할 수 있습니다.",
"black": "검정",
"brown": "갈색",
"lightbrown": "Light Brown",
"lightbrown": "밝은 갈색",
"green": "초록",
"yellow": "노랑",
"gray": "회색",
"purple": "Purple",
"purple": "보라",
"red": "빨강",
"white": "흰색",
"cat": "고양이",
Expand Down
2 changes: 1 addition & 1 deletion l10n/bundle.l10n.tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"A Pet Playground has been created. You can now use the \"Remove All Pets\" Command to remove all pets.": "Bir Hayvan Oyunalanı oluşturuldu. Şimdi tüm hayvanlraı kaldırmak için \"Tüm Hayvanları Kaldır\" komutunu kullanabilirsiniz.",
"black": "Siyah",
"brown": "Kahverengi",
"lightbrown": "Light Brown",
"lightbrown": "Açık Kahverengi",
"green": "Yeşil",
"yellow": "Sarı",
"gray": "Gri",
Expand Down
Binary file added media/backgrounds/beach/background-dark-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/backgrounds/castle/background-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/backgrounds/castle/foreground-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions media/main-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class BasePetType {
if (size === "nano" /* PetSize.nano */) {
return 30;
}
else if (size === "small" /* PetSize.small */) {
return 40;
}
else if (size === "medium" /* PetSize.medium */) {
return 55;
}
Expand Down Expand Up @@ -344,6 +347,9 @@ function calculateBallRadius(size) {
if (size === "nano" /* PetSize.nano */) {
return 2;
}
else if (size === "small" /* PetSize.small */) {
return 3;
}
else if (size === "medium" /* PetSize.medium */) {
return 4;
}
Expand All @@ -358,6 +364,8 @@ function calculateFloor(size, theme) {
switch (theme) {
case "forest" /* Theme.forest */:
switch (size) {
case "small" /* PetSize.small */:
return 30;
case "medium" /* PetSize.medium */:
return 40;
case "large" /* PetSize.large */:
Expand All @@ -368,6 +376,8 @@ function calculateFloor(size, theme) {
}
case "castle" /* Theme.castle */:
switch (size) {
case "small" /* PetSize.small */:
return 60;
case "medium" /* PetSize.medium */:
return 80;
case "large" /* PetSize.large */:
Expand All @@ -378,6 +388,8 @@ function calculateFloor(size, theme) {
}
case "beach" /* Theme.beach */:
switch (size) {
case "small" /* PetSize.small */:
return 60;
case "medium" /* PetSize.medium */:
return 80;
case "large" /* PetSize.large */:
Expand Down
6 changes: 6 additions & 0 deletions media/pets.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ img.pet {
font-size: 9px;
}

.bubble-small {
font-size: 10px;
}

.bubble-medium {
font-size: 12px;
}
Expand All @@ -169,6 +173,7 @@ img.pet {
}

.bubble-nano:before,
.bubble-small:before,
.bubble-medium:before,
.bubble-large:before {
left: 10px;
Expand All @@ -178,6 +183,7 @@ img.pet {
}

.bubble-nano:after,
.bubble-small:after,
.bubble-medium:after,
.bubble-large:after {
left: 12px;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"type": "string",
"enum": [
"nano",
"small",
"medium",
"large"
],
Expand Down
8 changes: 7 additions & 1 deletion src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const enum PetSpeed {

export const enum PetSize {
nano = 'nano',
small = 'small',
medium = 'medium',
large = 'large',
}
Expand Down Expand Up @@ -100,5 +101,10 @@ export const ALL_COLORS = [
PetColor.white,
PetColor.null,
];
export const ALL_SCALES = [PetSize.nano, PetSize.medium, PetSize.large];
export const ALL_SCALES = [
PetSize.nano,
PetSize.small,
PetSize.medium,
PetSize.large,
];
export const ALL_THEMES = [Theme.none, Theme.forest, Theme.castle, Theme.beach];
2 changes: 2 additions & 0 deletions src/panel/basepettype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export abstract class BasePetType implements IPetType {
calculateSpriteWidth(size: PetSize): number {
if (size === PetSize.nano) {
return 30;
} else if (size === PetSize.small) {
return 40;
} else if (size === PetSize.medium) {
return 55;
} else if (size === PetSize.large) {
Expand Down
8 changes: 8 additions & 0 deletions src/panel/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ var petCounter: number;
function calculateBallRadius(size: PetSize): number {
if (size === PetSize.nano) {
return 2;
} else if (size === PetSize.small) {
return 3;
} else if (size === PetSize.medium) {
return 4;
} else if (size === PetSize.large) {
Expand All @@ -48,6 +50,8 @@ function calculateFloor(size: PetSize, theme: Theme): number {
switch (theme) {
case Theme.forest:
switch (size) {
case PetSize.small:
return 30;
case PetSize.medium:
return 40;
case PetSize.large:
Expand All @@ -58,6 +62,8 @@ function calculateFloor(size: PetSize, theme: Theme): number {
}
case Theme.castle:
switch (size) {
case PetSize.small:
return 60;
case PetSize.medium:
return 80;
case PetSize.large:
Expand All @@ -68,6 +74,8 @@ function calculateFloor(size: PetSize, theme: Theme): number {
}
case Theme.beach:
switch (size) {
case PetSize.small:
return 60;
case PetSize.medium:
return 80;
case PetSize.large:
Expand Down

0 comments on commit db3549b

Please sign in to comment.