Skip to content

Commit

Permalink
Merge pull request #270 from Kaetram/game-content
Browse files Browse the repository at this point in the history
Kaetram v2.5.1
  • Loading branch information
Veradictus authored Apr 22, 2023
2 parents eb79253 + 5e84c39 commit 1d2d13b
Show file tree
Hide file tree
Showing 76 changed files with 2,555 additions and 2,978 deletions.
2 changes: 1 addition & 1 deletion .env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ MAX_PLAYERS=200
# Update time to parse packets in milliseconds (update every 300ms)
UPDATE_TIME=300
# Game version
GVER='alpha-2.5.0'
GVER='alpha-2.5.1'
# Used for hotfixes and minor updates that do not require a full update.
MINOR=''
# If to load regions from cache.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kaetram",
"version": "2.5.0",
"version": "2.5.1",
"private": true,
"packageManager": "[email protected]",
"author": "Veradictus",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/data/maps/map.json

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion packages/client/data/sprites.json
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@
"offsetY": -21
},
{
"id": "crystalscolpion",
"id": "crystalscorpion",
"width": 64,
"height": 72,
"animations": {
Expand Down Expand Up @@ -3295,6 +3295,19 @@
"offsetX": -4,
"offsetY": -8
},
{
"id": "oldlady2",
"width": 24,
"height": 24,
"animations": {
"idle_down": {
"length": 2,
"row": 0
}
},
"offsetX": -4,
"offsetY": -8
},
{
"id": "iceelfnpc",
"width": 24,
Expand Down Expand Up @@ -7625,6 +7638,19 @@
"offsetX": -4,
"offsetY": -8
},
{
"id": "villagegirl3",
"width": 24,
"height": 24,
"animations": {
"idle_down": {
"length": 2,
"row": 0
}
},
"offsetX": -4,
"offsetY": -8
},
{
"id": "villager",
"width": 24,
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"devDependencies": {
"@sentry/browser": "^7.45.0",
"@sentry/tracing": "^7.45.0",
"@sentry/vite-plugin": "^0.4.0",
"@sentry/vite-plugin": "^0.7.2",
"@types/dotenv-parse-variables": "^2.0.1",
"@types/html-minifier-terser": "^7.0.0",
"@types/jquery": "^3.5.16",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/interface/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file modified packages/client/public/img/sprites/items/bluebow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/sprites/items/crystalarmor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/sprites/items/greenarmor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/sprites/items/greenwingarcherarmor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/sprites/items/ratarmor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/sprites/items/redmetalsword.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/sprites/items/seed.png
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 packages/client/public/img/sprites/oldlady2.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.
Binary file modified packages/client/public/img/tilesets/tilesheet-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/tilesets/tilesheet-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/tilesets/tilesheet-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/tilesets/tilesheet-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/client/public/img/tilesets/tilesheet-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 30 additions & 37 deletions packages/client/scss/game/impl/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,10 @@
position: absolute;
}

@each $size, $i in media.$sizes {
@if $i == 3 {
$i: 3.75;
} @else {
$i: 3;
}

@each $size, $i in media.$b-sizes {
@media ($size) {
#chat-button,
#inventory-button,
#chat-button,
#profile-button,
#settings-button,
#warp-button,
Expand All @@ -52,76 +46,75 @@
.placeholder-button {
position: relative;

width: 14px * $i;
height: 15px * $i;
width: 22px * $i;
height: 25px * $i;

background: url('/img/interface/main.png') no-repeat;
background-position-y: -314px * $i;
background-size: calc(width('main.png') * $i);
background: url('/img/interface/hud_buttons.png') 0 0 no-repeat;
background-size: calc(width('hud_buttons.png') * $i);
}

#chat-button {
background-position: -196px * $i -329px * $i;
background-position: 0 -26px * $i;

&:hover {
background-position-x: -210px * $i;
background-position-x: -23px * $i;
}

&.active,
&:active {
background-position-x: -224px * $i;
background-position-x: -46px * $i;
}
}

#inventory-button {
background-position-x: -196px * $i;
background-position-x: -0;

&:hover {
background-position-x: -210px * $i;
background-position-x: -23px * $i;
}

&.active,
&:active {
background-position-x: -224px * $i;
background-position-x: -46px * $i;
}
}

#profile-button {
background-position-x: -238px * $i;
background-position-x: -71px * $i;

&:hover {
background-position-x: -252px * $i;
background-position-x: -94px * $i;
}

&.active,
&:active {
background-position-x: -266px * $i;
background-position-x: -117px * $i;
}
}

#settings-button {
background-position-x: -406px * $i;
background-position-y: -104px * $i;

&:hover {
background-position-x: -420px * $i;
background-position-x: -23px * $i;
}

&.active,
&:active {
background-position-x: -434px * $i;
background-position-x: -46px * $i;
}
}

#warp-button {
background-position-x: -322px * $i;
background-position-y: -78px * $i;

&:hover {
background-position-x: -336px * $i;
background-position-x: -23px * $i;
}

&.active,
&:active {
background-position-x: -350px * $i;
background-position-x: -46px * $i;
}
}

Expand All @@ -139,41 +132,41 @@
}

#achievements-button {
background-position-x: -42px * $i;
background-position: -71px * $i -104px * $i;

&:hover {
background-position-x: -56px * $i;
background-position-x: -94px * $i;
}

&.active,
&:active {
background-position-x: -70px * $i;
background-position-x: -117px * $i;
}
}

#quests-button {
background-position-x: -280px * $i;
background-position: -71px * $i -26px * $i;

&:hover {
background-position-x: -294px * $i;
background-position-x: -94px * $i;
}

&.active,
&:active {
background-position-x: -308px * $i;
background-position-x: -117px * $i;
}
}

#friends-button {
background-position-x: -364px * $i;
background-position: -71px * $i -78px * $i;

&:hover {
background-position-x: -378px * $i;
background-position-x: -94px * $i;
}

&.active,
&:active {
background-position-x: -392px * $i;
background-position-x: -117px * $i;
}
}

Expand Down
9 changes: 5 additions & 4 deletions packages/client/scss/game/impl/_friends.scss
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,15 @@
@media (--lg) {
#friends-container {
right: 0;
right: 20px;
bottom: 56px;
right: 52px;
bottom: 68px;
}
}

@media (--md) {
#friends-container {
right: 32px;
right: 36px;
bottom: 48px;
}

#popup-friend-input {
Expand All @@ -198,7 +199,7 @@

@media (--sm) {
#friends-container {
right: 80px;
right: 84px;
bottom: 99px;
transform: scale(1.5);
}
Expand Down
8 changes: 7 additions & 1 deletion packages/client/scss/game/impl/_inventory.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

position: absolute;
right: 10px;
bottom: 56px;
bottom: 80px;

display: none;

Expand Down Expand Up @@ -84,3 +84,9 @@
}
}
}

@media (--sm) {
#inventory {
bottom: 56px;
}
}
10 changes: 5 additions & 5 deletions packages/client/scss/game/impl/_profile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,8 @@

@media (--lg) {
#profile-dialog {
right: 72px;
bottom: 56px;
right: 118px;
bottom: 68px;
}

.profile-item-info {
Expand All @@ -822,8 +822,8 @@

@media (--md) {
#profile-dialog {
right: 70px;
bottom: 45px;
right: 78px;
bottom: 48px;
}

.profile-item-info {
Expand All @@ -838,7 +838,7 @@

@media (--sm) {
#profile-dialog {
right: 122px;
right: 128px;
bottom: 99px;
transform: scale(1.5);
}
Expand Down
10 changes: 8 additions & 2 deletions packages/client/scss/game/impl/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,19 @@

@media (--lg) {
#settings-page {
bottom: 56px;
bottom: 68px;
}
}

@media (--md) {
#settings-page {
bottom: 48px;
}
}

@media (--sm) {
#settings-page {
right: 31px;
right: 38px;
bottom: 99px;
transform: scale(1.5);
}
Expand Down
13 changes: 5 additions & 8 deletions packages/client/scss/game/impl/_zoom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@
flex-direction: row;

button {
width: 24px;
height: 24px;
width: 21px;
height: 21px;

opacity: 0.5;
background-color: transparent;
background-image: url('/img/interface/main.png');
background-position-x: 338px;
background-position-y: -336px;
border: none;

&:hover {
opacity: 0.75;
background-position-x: 314px;
background-position-x: -22px;
}

&:active {
opacity: 0.75;
background-position-x: 290px;
background-position-x: -44px;
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions packages/client/src/entity/character/character.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,12 @@ export default class Character extends Entity {
/**
* Return an entity to the base idle state.
* @param o Optional parameter if we want to update the orientation.
* @param force Whether or not we force the idle animation.
*/

public override idle(o?: Modules.Orientation): void {
public override idle(o?: Modules.Orientation, force = false): void {
// Prevents the idle animation from affecting the walking animation.
if (this.hasPath()) return;
if (this.hasPath() && !force) return;

let orientation = o || this.orientation;

Expand Down
3 changes: 3 additions & 0 deletions packages/client/src/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ export default class Game {

path = this.pathfinder.find(this.map.grid, character.gridX, character.gridY, x, y, ignores);

// Stop if there is no path.
if (path.length === 0) return path;

// Special case for fishing where we remove the last path if it is colliding.
if (cursor === 'fishing') {
let last = path[path.length - 2];
Expand Down
Loading

0 comments on commit 1d2d13b

Please sign in to comment.