Skip to content

Commit

Permalink
feat: simplify biomes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceat committed Nov 16, 2024
1 parent e63518b commit c288d6a
Show file tree
Hide file tree
Showing 11 changed files with 440 additions and 422 deletions.
469 changes: 310 additions & 159 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
},
"dependencies": {
"@aresrpg/aresrpg-engine": "2.6.1",
"@aresrpg/aresrpg-protocol": "5.1.1",
"@aresrpg/aresrpg-protocol": "5.1.2",
"@aresrpg/aresrpg-sdk": "4.4.1",
"@aresrpg/aresrpg-world": "file:../aresrpg-world",
"@aresrpg/aresrpg-world": "1.5.1",
"@bufbuild/buf": "1.46.0",
"@bufbuild/protobuf": "2.2.2",
"@bufbuild/protoc-gen-es": "2.2.2",
Expand Down
9 changes: 9 additions & 0 deletions src/components/cards/item-inventory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ const delete_context = {
},
};
const use_context = {
label: t('APP_ITEM_USE'),
onClick: () => {
if (selected_item.value.item_category === 'CONSUMABLE') {
// TODO: Implement use consumable
}
},
};
async function delete_item() {
const tx = toast.tx(t('APP_ITEM_DELETING'), selected_item.value.name);
try {
Expand Down
2 changes: 1 addition & 1 deletion src/core/modules/game_camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { is_hovering_mob_group } from './player_entities_interract.js'

const CAMERA_MIN_DISTANCE = 0.001
const CAMERA_DISTANCE_STEP = 1
const CAMERA_MAX_DISTANCE = 2000
const CAMERA_MAX_DISTANCE = 50

/** @type {Type.Module} */
export default function () {
Expand Down
2 changes: 1 addition & 1 deletion src/core/modules/player_movement.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { sea_level } from '../utils/terrain/world_settings.js'

import { play_step_sound } from './game_audio.js'

const SPEED = 50
const SPEED = 10
const WALK_SPEED = 6
const SWIM_SPEED = 10
const WATER_GRAVITY = 3
Expand Down
94 changes: 87 additions & 7 deletions src/core/utils/terrain/biomes/temperate.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,110 @@
import { BlockType } from '@aresrpg/aresrpg-world/biomes'

import { SCHEMATICS_COLLECTIONS } from '../schematics_collections.js'
import { BLOCKS } from '../blocks.js'

export default {
deep_ocean: {
x: 0,
y: 0,
type: BlockType.WATER,
subtype: BlockType.ROCK,
subtype: BlockType.NONE,
fadeIn: 0,
fadeOut: 2,
},
ocean_cliff_bottom: { x: 0.12, y: 0.1 },
ocean_cliff_top: { x: 0.15, y: 0.13 },
beach: {
x: 0.1,
y: 0.12,
x: 0.2,
y: 0.26,
type: BlockType.SAND,
subtype: BLOCKS.WET_SAND,
fadeIn: 5,
fadeOut: 5,
flora: {
'trees/palmtree_big_1': 1,
'trees/palmtree_big_2': 5,
'trees/palmtree_big_3': 5,
'rocks/boulder_small_1': 1,
'rocks/boulder_small_2': 1,
'rocks/boulder_small_3': 1,
void: 40,
},
},
beach_land: {
x: 0.25,
y: 0.33,
type: BLOCKS.GOLDEN_SAND,
subtype: BLOCKS.WET_SAND,
fadeIn: 5,
fadeOut: 5,
flora: {
'trees/palmtree_1': 1,
'trees/palmtree_2': 1,
'trees/palmtree_3': 1,
'trees/palmtree_4': 1,
'trees/palmtree_5': 1,
'trees/palmtree_6': 1,
'trees/palmtree_7': 1,
'trees/palmtree_8': 1,
'trees/palmtree_9': 1,
void: 20,
},
},
cliff: {
x: 0.3,
y: 0.34,
type: BlockType.ROCK,
subtype: BlockType.ROCK,
fadeIn: 1,
fadeOut: 1,
},
valley: {
x: 0.32,
y: 0.41,
type: BlockType.GRASS,
subtype: BlockType.MUD,
fadeIn: 0,
fadeOut: 0,
},
hill: {
x: 0.62,
y: 0.5,
type: BlockType.GRASS,
subtype: BlockType.ROCK,
fadeIn: 2,
fadeOut: 2,
flora: { ...SCHEMATICS_COLLECTIONS.beach_house },
},
valley: {
mountain: {
x: 0.7,
y: 0.7,
type: BlockType.GRASS,
type: BLOCKS.LUSH_GRASS,
subtype: BLOCKS.GRANIT,
fadeIn: 10,
fadeOut: 5,
},
plateau: {
x: 0.82,
y: 0.64,
type: BLOCKS.VIBRANT_GRASS,
subtype: BLOCKS.MOSSY_GRASS,
fadeIn: 2,
fadeOut: 2,
},
high_mountain: {
x: 0.88,
y: 0.85,
type: BLOCKS.BASALT,
subtype: BlockType.ROCK,
fadeIn: 0,
fadeOut: 0,
},
high_plateau: {
x: 0.95,
y: 0.98,
type: BLOCKS.VIBRANT_GRASS,
subtype: BLOCKS.BASALT,
fadeIn: 0,
fadeOut: 2,
},
}

Expand Down
206 changes: 0 additions & 206 deletions src/core/utils/terrain/biomes_landscapes.default.js.old

This file was deleted.

Loading

0 comments on commit c288d6a

Please sign in to comment.