Merge branch 'master' into xvar/add-analyze-build-stage

This commit is contained in:
Ben Wallis
2021-04-25 10:38:19 +01:00
207 changed files with 5258 additions and 1699 deletions

View File

@ -1,5 +1,6 @@
stages:
- check
- build-nightly
- build
- publish
- analyze

View File

@ -74,6 +74,22 @@ macos:
- .tmacos
- .release
# build on schedule quickfix till airshipper 0.5
air-linux:
extends:
- .tlinux
- .release-nightly-tmp-fix-airshipper
air-windows:
extends:
- .twindows
- .release-nightly-tmp-fix-airshipper
air-macos:
extends:
- .tmacos
- .release-nightly-tmp-fix-airshipper
# if NOT release or master, allow optional builds
opt-linux:
extends:

View File

@ -5,7 +5,16 @@
tags:
- veloren-docker
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
when: always
- when: never
.publish-nightly:
stage: publish
tags:
- veloren-docker
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
- when: never
@ -20,7 +29,20 @@ docker:
- ls "$CI_PROJECT_DIR/server-cli/"
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/server-cli/Dockerfile --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-server"
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/server-cli/Dockerfile --destination "${CI_REGISTRY_IMAGE}/server-cli:${CI_COMMIT_REF_NAME}"
docker-nightly:
extends: .publish-nightly
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
dependencies:
- linux
before_script:
- ls "$CI_PROJECT_DIR/server-cli/"
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/server-cli/Dockerfile --destination "${CI_REGISTRY_IMAGE}/server-cli:nightly"
pages:
extends: .publish
@ -31,4 +53,4 @@ pages:
- rm -rf public
- mkdir -p public
- cargo doc --no-deps --document-private-items
- mv target/doc/* public
- mv target/doc/* public

View File

@ -9,12 +9,22 @@
- when: manual
allow_failure: true
# Template to only run if pushes to master or a tag happened and it being triggered by a schedule
# Template to only run if pushes to master or a tag happened
.release:
stage: build
tags:
- veloren-docker
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ( $CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/ )
- if: $CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/
when: always
- when: never
# Template to only run if pushes to master or a tag happened
.release-nightly-tmp-fix-airshipper:
stage: build-nightly
tags:
- veloren-docker
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ($CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/)
when: always
- when: never

View File

@ -43,6 +43,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Entities now have density
- Buoyancy is calculated from the difference in density between an entity and surrounding fluid
- Drag is now calculated based on physical properties
- Terrain chunks are now deflate-compressed when sent over the network.
- Missing translations can be displayed in English.
- New large birds npcs
- Day period dependant wildlife spawns
### Changed
@ -74,6 +78,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Jump has been decreased in height but extended in length as a result of the new gravity
- Fall damage has been adjusted with the new gravity in mind
- Projectiles now generally have a different arc because they no longer have their own gravity modifier
- Increased agent system target search efficiency speeding up the server
- Added more parallelization to terrain serialization and removed extra cloning speeding up the server
### Removed
@ -92,6 +98,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Minimap icons are now displayed in both map modes
- Server now denies any running trades when a user exits to the character selection screen.
- Sfx volume changes now also change the ambient sounds volume
- Staff fire shockwave ability no longer has an unlimited vertical range
- Skillbar buttons correctly account for skill points when checking if player has enough stamina for the ability.
## [0.9.0] - 2021-03-20

25
Cargo.lock generated
View File

@ -1308,6 +1308,15 @@ dependencies = [
"byteorder",
]
[[package]]
name = "deflate"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f95bf05dffba6e6cce8dfbb30def788154949ccd9aed761b472119c21e01c70"
dependencies = [
"adler32",
]
[[package]]
name = "derivative"
version = "2.2.0"
@ -3765,7 +3774,7 @@ checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6"
dependencies = [
"bitflags",
"crc32fast",
"deflate",
"deflate 0.8.6",
"miniz_oxide 0.3.7",
]
@ -5443,7 +5452,7 @@ dependencies = [
"veloren-common-frontend",
"veloren-common-net",
"veloren-common-state",
"veloren-common-sys",
"veloren-common-systems",
"veloren-network",
]
@ -5524,6 +5533,8 @@ dependencies = [
name = "veloren-common-net"
version = "0.9.0"
dependencies = [
"bincode",
"flate2",
"hashbrown",
"serde",
"specs",
@ -5557,7 +5568,7 @@ dependencies = [
]
[[package]]
name = "veloren-common-sys"
name = "veloren-common-systems"
version = "0.9.0"
dependencies = [
"hashbrown",
@ -5682,7 +5693,7 @@ dependencies = [
"veloren-common-ecs",
"veloren-common-net",
"veloren-common-state",
"veloren-common-sys",
"veloren-common-systems",
"veloren-network",
"veloren-plugin-api",
"veloren-world",
@ -5770,7 +5781,7 @@ dependencies = [
"veloren-common-frontend",
"veloren-common-net",
"veloren-common-state",
"veloren-common-sys",
"veloren-common-systems",
"veloren-server",
"veloren-voxygen-anim",
"veloren-world",
@ -5809,12 +5820,15 @@ dependencies = [
"bincode",
"bitvec",
"criterion",
"deflate 0.9.1",
"enum-iterator",
"flate2",
"fxhash",
"hashbrown",
"image",
"itertools 0.10.0",
"lazy_static",
"lz-fear",
"minifb",
"noise",
"num 0.4.0",
@ -5831,6 +5845,7 @@ dependencies = [
"tracing-subscriber",
"vek",
"veloren-common",
"veloren-common-frontend",
"veloren-common-net",
]

View File

@ -7,7 +7,7 @@ members = [
"common/ecs",
"common/net",
"common/state",
"common/sys",
"common/systems",
"common/frontend",
"client",
"plugin/api",

View File

@ -0,0 +1,17 @@
BasicRanged(
energy_cost: 0,
buildup_duration: 0.5,
recover_duration: 0.35,
projectile: Fireball(
damage: 100.0,
radius: 5.0,
energy_regen: 50,
),
projectile_body: Object(BoltFire),
/*projectile_light: Some(LightEmitter {
col: (1.0, 0.75, 0.11).into(),
..Default::default()
}),*/
projectile_gravity: Some(Gravity(0.15)),
projectile_speed: 60.0,
)

View File

@ -0,0 +1,14 @@
BasicBeam(
buildup_duration: 0.4,
recover_duration: 0.25,
beam_duration: 0.5,
damage: 50,
tick_rate: 3.0,
range: 15.0,
max_angle: 22.5,
damage_effect: None,
energy_regen: 0,
energy_drain: 0,
orientation_behavior: Normal,
specifier: Flamethrower,
)

View File

@ -0,0 +1,53 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
damage_increase: 0,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 5.0,
range: 4.5,
angle: 30.0,
base_buildup_duration: 0.4,
base_swing_duration: 0.1,
base_recover_duration: 0.3,
forward_movement: 2.0,
),
(
stage: 2,
base_damage: 80,
damage_increase: 0,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 0.4,
base_swing_duration: 0.1,
base_recover_duration: 0.3,
forward_movement: 1.5,
),
(
stage: 3,
base_damage: 130,
damage_increase: 0,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 0.65,
base_swing_duration: 0.1,
base_recover_duration: 0.3,
forward_movement: 1.5,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
is_interruptible: false,
)

View File

@ -0,0 +1,17 @@
BasicRanged(
energy_cost: 0,
buildup_duration: 0.5,
recover_duration: 0.35,
projectile: Fireball(
damage: 100.0,
radius: 5.0,
energy_regen: 50,
),
projectile_body: Object(BoltFire),
/*projectile_light: Some(LightEmitter {
col: (1.0, 0.75, 0.11).into(),
..Default::default()
}),*/
projectile_gravity: Some(Gravity(0.15)),
projectile_speed: 60.0,
)

View File

@ -0,0 +1,15 @@
Shockwave(
energy_cost: 600,
buildup_duration: 0.7,
swing_duration: 0.1,
recover_duration: 0.2,
damage: 200,
poise_damage: 0,
knockback: ( strength: 25.0, direction: Away),
shockwave_angle: 360.0,
shockwave_vertical_angle: 90.0,
shockwave_speed: 20.0,
shockwave_duration: 0.5,
requires_ground: false,
move_efficiency: 0.1,
)

View File

@ -0,0 +1,14 @@
BasicBeam(
buildup_duration: 0.4,
recover_duration: 0.25,
beam_duration: 0.5,
damage: 50,
tick_rate: 3.0,
range: 15.0,
max_angle: 22.5,
damage_effect: None,
energy_regen: 0,
energy_drain: 0,
orientation_behavior: Normal,
specifier: Flamethrower,
)

View File

@ -0,0 +1,53 @@
ComboMelee(
stage_data: [
(
stage: 1,
base_damage: 100,
damage_increase: 0,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 5.0,
range: 4.5,
angle: 30.0,
base_buildup_duration: 0.4,
base_swing_duration: 0.1,
base_recover_duration: 0.3,
forward_movement: 2.0,
),
(
stage: 2,
base_damage: 80,
damage_increase: 0,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 5.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 0.4,
base_swing_duration: 0.1,
base_recover_duration: 0.3,
forward_movement: 1.5,
),
(
stage: 3,
base_damage: 130,
damage_increase: 0,
base_poise_damage: 0,
poise_damage_increase: 0,
knockback: 10.0,
range: 3.5,
angle: 30.0,
base_buildup_duration: 0.65,
base_swing_duration: 0.1,
base_recover_duration: 0.3,
forward_movement: 1.5,
),
],
initial_energy_gain: 0,
max_energy_gain: 0,
energy_increase: 0,
speed_increase: 0.0,
max_speed_increase: 0.0,
scales_from_combo: 0,
is_interruptible: false,
)

View File

@ -1,8 +1,8 @@
Shockwave(
energy_cost: 0,
buildup_duration: 1.5,
swing_duration: 0.15,
recover_duration: 1.8,
buildup_duration: 0.6,
swing_duration: 0.12,
recover_duration: 1.2,
damage: 500,
poise_damage: 50,
knockback: (strength: 40.0, direction: TowardsUp),

View File

@ -207,6 +207,20 @@
(None, "common.abilities.unique.mindflayer.summonminions"),
],
),
Unique(BirdLargeBreathe): (
primary: "common.abilities.unique.birdlargebreathe.firebomb",
secondary: "common.abilities.unique.birdlargebreathe.triplestrike",
abilities: [
(None, "common.abilities.unique.birdlargebreathe.flamethrower"),
],
),
Unique(BirdLargeFire): (
primary: "common.abilities.unique.birdlargefire.firebomb",
secondary: "common.abilities.unique.birdlargefire.triplestrike",
abilities: [
(None, "common.abilities.unique.birdlargefire.fireshockwave"),
],
),
Debug: (
primary: "common.abilities.debug.forwardboost",
secondary: "common.abilities.debug.upboost",

View File

@ -3,12 +3,12 @@ ItemDef(
description: "Illuminates even the darkest dungeon\nA great monster was slain for this item",
kind: Lantern(
(
kind: "Blue0",
kind: "Green0",
color: (r: 128, g: 26, b: 255),
strength_thousandths: 8500,
flicker_thousandths: 300,
),
),
quality: High,
quality: Epic,
tags: [Utility],
)

View File

@ -0,0 +1,18 @@
ItemDef(
name: "Bird Large Breathe",
description: "testing123",
kind: Tool((
kind: Unique(BirdLargeBreathe),
hands: Two,
stats: Direct((
equip_time_secs: 0.01,
power: 1.0,
poise_strength: 1.0,
speed: 1.0,
crit_chance: 0.0625,
crit_mult: 1.9142857,
)),
)),
quality: Low,
tags: [],
)

View File

@ -0,0 +1,18 @@
ItemDef(
name: "Bird Large Fire",
description: "testing123",
kind: Tool((
kind: Unique(BirdLargeFire),
hands: Two,
stats: Direct((
equip_time_secs: 0.01,
power: 1.0,
poise_strength: 1.0,
speed: 1.0,
crit_chance: 0.0625,
crit_mult: 1.9142857,
)),
)),
quality: Low,
tags: [],
)

View File

@ -804,10 +804,6 @@
keyword: "parrot",
generic: "Parrot"
),
cockatrice: (
keyword: "cockatrice",
generic: "Cockatrice"
)
)
),
biped_large: (
@ -1068,12 +1064,23 @@
)
)
),
bird_small: (
bird_large: (
body: (
keyword: "bird_small",
names_0: []
keyword: "bird_large",
names_0: [
"Aitvaras"
]
),
species: ()
species: (
phoenix: (
keyword: "phoenix",
generic: "Phoenix"
),
cockatrice: (
keyword: "cockatrice",
generic: "Cockatrice"
),
)
),
quadruped_low: (
body: (

View File

@ -229,7 +229,7 @@
"npc.speech.villager_enemy_killed": [
"I have destroyed my enemy!",
"Finally at peace!",
"... now what I was doing?",
"... now what was I doing?",
]
}
)

View File

@ -24,6 +24,7 @@
"char_selection.eyeshape": "Eye Details",
"char_selection.accessories": "Accessories",
"char_selection.create_info_name": "Your Character needs a name!",
"char_selection.version_mismatch": "WARNING! This server is running a different, possibly incompatible game version. Please update your game."
},
vector_map: {

View File

@ -101,6 +101,8 @@
"hud.settings.audio_device": "Audio Device",
"hud.settings.reset_sound": "Reset to Defaults",
"hud.settings.english_fallback": "Display English for missing translations",
"hud.settings.awaitingkey": "Press a key...",
"hud.settings.unbound": "None",
"hud.settings.reset_keybinds": "Reset to Defaults",

View File

@ -50,7 +50,7 @@ https://veloren.net/account/."#,
"main.login.timeout": "Timeout: Server did not respond in time. (Overloaded or network issues).",
"main.login.server_shut_down": "Server shut down",
"main.login.network_error": "Network error",
"main.login.network_wrong_version": "The server is running a different version than you are. Check your version and update your game.",
"main.login.network_wrong_version": "Mismatched server and client version, please update your game client.",
"main.login.failed_sending_request": "Request to Auth server failed",
"main.login.invalid_character": "The selected character is invalid",
"main.login.client_crashed": "Client crashed",
@ -58,7 +58,8 @@ https://veloren.net/account/."#,
"main.login.banned": "You have been banned with the following reason",
"main.login.kicked": "You have been kicked with the following reason",
"main.login.select_language": "Select a language",
"main.login.client_version": "Client Version",
"main.login.server_version": "Server Version",
"main.servers.select_server": "Select a server",
/// End Main screen section
},

View File

@ -62,6 +62,8 @@
"gameinput.sneak": "Furtividade",
"gameinput.swimdown": "Mergulhar",
"gameinput.swimup": "Emergir",
"gameinput.mapzoomin": "Aumentar zoom do mapa",
"gameinput.mapzoomout": "Reduzir zoom do mapa",
},

View File

@ -33,6 +33,9 @@
"hud.bag.combat_rating_desc": "Calculado por seu\nequipamento e vida.",
"hud.bag.protection_desc": "Redução de dano por armadura",
"hud.bag.stun_res_desc": "Resistência à paralisia provocada por golpes consecutivos.\nRegenera como Stamina.",
"hud.bag.sort_by_name": "Ordenar por Nome",
"hud.bag.sort_by_quality": "Ordenar por Qualidade",
"hud.bag.sort_by_category": "Ordenar por Categoria",
},

View File

@ -8,7 +8,12 @@
"hud.crafting.ingredients": "Ingredientes:",
"hud.crafting.craft": "Criar",
"hud.crafting.tool_cata": "Requer:",
// Crafting Stations (Estações de Criação)
"hud.crafting.req_crafting_station": "Requer:",
"hud.crafting.anvil": "Bigorna",
"hud.crafting.cauldron": "Caldeirão",
"hud.crafting.cooking_pot": "Panela",
"hud.crafting.crafting_bench": "Bancada de Criação",
// Tabs (Abas)
"hud.crafting.tabs.all": "Tudo",
"hud.crafting.tabs.armor": "Armadura",

View File

@ -36,7 +36,7 @@
"hud.settings.background_transparency": "Transparência de Fundo",
"hud.settings.chat_character_name": "Nomes de Personagem no chat",
"hud.settings.loading_tips": "Dicas na Tela de Carregamento",
"hud.settings.reset_interface": "Voltar para o padrão",
"hud.settings.reset_interface": "Restaurar Padrões",
"hud.settings.pan_sensitivity": "Sensibilidade de Rotação",
"hud.settings.zoom_sensitivity": "Sensibilidade do Zoom",
@ -51,7 +51,7 @@
"hud.settings.player_physics_behavior": "Física do Jogador (experimental)",
"hud.settings.stop_auto_walk_on_input": "Parar caminhar automático em caso de movimento",
"hud.settings.auto_camera": "Câmera automática",
"hud.settings.reset_gameplay": "Voltar para o padrão",
"hud.settings.reset_gameplay": "Restaurar Padrões",
"hud.settings.view_distance": "Alcance de Visão",
"hud.settings.sprites_view_distance": "Distância de visão dos Sprites",
@ -91,17 +91,19 @@
"hud.settings.shadow_rendering_mode.map.resolution": "Resolução",
"hud.settings.lod_detail": "Detalhes",
"hud.settings.save_window_size": "Salvar Dimensões da Janela",
"hud.settings.reset_graphics": "Voltar para o padrão",
"hud.settings.reset_graphics": "Restaurar Padrões",
"hud.settings.master_volume": "Volume Principal",
"hud.settings.inactive_master_volume": "Volume Principal (janela inativa)",
"hud.settings.music_volume": "Volume da Música",
"hud.settings.sound_effect_volume": "Volume dos Efeitos",
"hud.settings.audio_device": "Dispositivo de Áudio",
"hud.settings.reset_sound": "Voltar para o padrão",
"hud.settings.reset_sound": "Restaurar Padrões",
"hud.settings.awaitingkey": "Pressione uma tecla...",
"hud.settings.unbound": "Nenhum",
"hud.settings.reset_keybinds": "Voltar para o padrão",
"hud.settings.reset_keybinds": "Restaurar Padrões",
},

View File

@ -101,8 +101,6 @@
"hud.skill.st_fireball" : "Brinque de perseguir seus inimigos",
"hud.skill.st_damage_title" : "Dano",
"hud.skill.st_damage" : "Aumenta o dano em 20%{SP}",
"hud.skill.st_explosion_title" : "Explosão",
"hud.skill.st_explosion" : "Quando apenas fogo não é o bastante{SP}",
// Arco
"hud.skill.bow_projectile_speed_title" : "Velocidade do Projétil",
"hud.skill.bow_projectile_speed" : "Permite atirar mais flechas, com velocidade aumentada em 30%{SP}",
@ -191,8 +189,8 @@
"hud.skill.sw_dash_cost": "Reduz custo inicial da investida em 25%{SP}",
"hud.skill.sw_dash_speed_title": "Velocidade de Investida",
"hud.skill.sw_dash_speed": "Aumenta a velocidade durante a investida em 15%{SP}",
"hud.skill.sw_dash_inf_title": "Investida do Infinito",
"hud.skill.sw_dash_inf": "Você consegue investir contanto que possua energia para tal{SP}",
"hud.skill.sw_dash_charge_through_title": "Intestida Trespassada",
"hud.skill.sw_dash_charge_through": "Permite que você atravésse os primeiros inimigos que você atinge{SP}",
"hud.skill.sw_dash_scale_title": "Investida Acumulada",
"hud.skill.sw_dash_scale": "Aumenta o acumulo de dano da investida em 20%{SP}",
"hud.skill.sw_spin_title": "Liberar Rodopio",

View File

@ -180,11 +180,11 @@
"npc.speech.merchant_trade_successful": [
"Було приємно мати з вами справу!",
"Заходьте ще!",
"Дякую!",
"Дякую що обрали нас!",
],
"npc.speech.merchant_trade_declined": [
"Не підійшло? Можливо в інший раз!",
"Доброго дня, до побачення!",
"Все одно, на все добре!",
],
"npc.speech.villager_cultist_alarm": [
"Увага! Культист крадеться!",

View File

@ -67,7 +67,7 @@
"common.weapons.staff": "Посох",
"common.weapons.bow": "Лук",
"common.weapons.hammer": "Молот",
"common.weapons.sceptre": "Цілющий Скіпетр",
"common.weapons.sceptre": "Скіпетр",
"common.weapons.shield": "Щит",
"common.weapons.spear": "Спис",
"common.weapons.general": "Бій (загальне)",

View File

@ -4,7 +4,7 @@
(
string_map: {
"gameinput.primary": "Базова атака",
"gameinput.secondary": "Другорядна атака/Блок/Приціл",
"gameinput.secondary": "Додаткова атака",
"gameinput.slot1": "Слот швидкого доступу 1",
"gameinput.slot2": "Слот швидкого доступу 2",
"gameinput.slot3": "Слот швидкого доступу 3",
@ -40,6 +40,7 @@
"gameinput.escape": "Вихід",
"gameinput.map": "Мапа",
"gameinput.bag": "Інвентар",
"gameinput.trade": "Торгувати",
"gameinput.social": "Інші гравці",
"gameinput.sit": "Сісти",
"gameinput.spellbook": "Чари",
@ -49,7 +50,7 @@
"gameinput.togglewield": "Дістати зброю",
"gameinput.interact": "Взаємодіяти",
"gameinput.freelook": "Вільний огляд",
"gameinput.autowalk": "Авто-хода",
"gameinput.autowalk": "Авто Рух/Політ",
"gameinput.dance": "Танцювати",
"gameinput.select": "Обрати",
"gameinput.acceptgroupinvite": "Прийняти запрошення в групу",
@ -61,7 +62,8 @@
"gameinput.swimup": "Випливати",
"gameinput.cameraclamp": "Закріпити камеру",
"gameinput.cyclecamera": "Крутити камеру",
"gameinput.trade": "Торгувати",
"gameinput.mapzoomin": "Приблизити мапу",
"gameinput.mapzoomout": "Віддалити мапу",
},

View File

@ -9,6 +9,13 @@
"hud.crafting.craft": "Виготовити",
"hud.crafting.tool_cata": "Необхідно:",
// Crafting Stations
"hud.crafting.req_crafting_station": "Необхідне Приладдя:",
"hud.crafting.anvil": "Ковадло",
"hud.crafting.cauldron": "Казан",
"hud.crafting.cooking_pot": "Кастрюля",
"hud.crafting.crafting_bench": "Верстак",
// Tabs
"hud.crafting.tabs.all": "Усе",
"hud.crafting.tabs.armor": "Броня",

View File

@ -18,14 +18,14 @@
"hud.settings.transparency": "Прозорість",
"hud.settings.hotbar": "Панель швидкого доступу",
"hud.settings.toggle_shortcuts": "Гарячі клавіші",
"hud.settings.buffs_skillbar": "Бафи на панелі навичок",
"hud.settings.buffs_mmap": "Бафи на мінімапі",
"hud.settings.buffs_skillbar": "Бафи біля Панелі Швидкого Доступу",
"hud.settings.buffs_mmap": "Бафи біля Мінімапи",
"hud.settings.toggle_bar_experience": "Панель досвіду",
"hud.settings.scrolling_combat_text": "Текст під час бою",
"hud.settings.single_damage_number": "Заподіяні ушкодження (одиничні)",
"hud.settings.cumulated_damage": "Заподіяні ушкодження (кумулятивні)",
"hud.settings.incoming_damage": "Отримані ушкодження (одиничні)",
"hud.settings.cumulated_incoming_damage": "Отримані ушкодження (кумулятивні)",
"hud.settings.scrolling_combat_text": "Відображення Пошкоджень/Зцілень",
"hud.settings.single_damage_number": "Роздільно нанесені Гравцем",
"hud.settings.cumulated_damage": "Сумарно нанесені Гравцем",
"hud.settings.incoming_damage": "Роздільно отримані Гравцем",
"hud.settings.cumulated_incoming_damage": "Сумарно отримані Гравцем",
"hud.settings.speech_bubble": "Діалоги",
"hud.settings.speech_bubble_dark_mode": "Темний режим",
"hud.settings.speech_bubble_icon": "Піктограма",
@ -60,11 +60,11 @@
"hud.settings.gamma": "Гамма",
"hud.settings.exposure": "Експозиція",
"hud.settings.ambiance": "Заповнююча яскравість",
"hud.settings.antialiasing_mode": "Режим анти-аліасингу",
"hud.settings.upscale_factor": "Коефіцієнт збільшення",
"hud.settings.cloud_rendering_mode": "Режим відображення хмар",
"hud.settings.fluid_rendering_mode": "Режим відображення рідин",
"hud.settings.fluid_rendering_mode.cheap": "Простий",
"hud.settings.antialiasing_mode": "Режим Анти-Аліасингу",
"hud.settings.upscale_factor": "Внутрішня Роздільна Здатність",
"hud.settings.cloud_rendering_mode": "Режим відображення Хмар",
"hud.settings.fluid_rendering_mode": "Режим відображення Рідин",
"hud.settings.fluid_rendering_mode.cheap": "Дешевий",
"hud.settings.fluid_rendering_mode.shiny": "Блискучий",
"hud.settings.cloud_rendering_mode.minimal": "Мінімальний",
"hud.settings.cloud_rendering_mode.low": "Низький",
@ -76,23 +76,25 @@
"hud.settings.fullscreen_mode.exclusive": "Ексклюзивний",
"hud.settings.fullscreen_mode.borderless": "Вікно без рамок",
"hud.settings.particles": "Частинки",
"hud.settings.resolution": "Розширення",
"hud.settings.resolution": "Роздільна здатність",
"hud.settings.bit_depth": "Глибина кольору",
"hud.settings.refresh_rate": "Частота оновлення",
"hud.settings.lighting_rendering_mode": "Режим освітлення",
"hud.settings.lighting_rendering_mode": "Режим Освітлення",
"hud.settings.lighting_rendering_mode.ashikhmin": "Тип A - Високий",
"hud.settings.lighting_rendering_mode.blinnphong": "Тип B - Середній",
"hud.settings.lighting_rendering_mode.lambertian": "Тип L - Простий",
"hud.settings.shadow_rendering_mode": "Режим відображення тіней",
"hud.settings.lighting_rendering_mode.lambertian": "Тип L - Дешевий",
"hud.settings.shadow_rendering_mode": "Режим відображення Тіней",
"hud.settings.shadow_rendering_mode.none": "Без тіней",
"hud.settings.shadow_rendering_mode.cheap": "Простий",
"hud.settings.shadow_rendering_mode.cheap": "Дешевий",
"hud.settings.shadow_rendering_mode.map": "Карта тіней",
"hud.settings.shadow_rendering_mode.map.resolution": "Роздільна здатність",
"hud.settings.lod_detail": "Рівень деталізації",
"hud.settings.save_window_size": "Зберегти розмір вікна",
"hud.settings.music_volume": "Гучність музики",
"hud.settings.sound_effect_volume": "Гучність звукових ефектів",
"hud.settings.master_volume": "Гучність",
"hud.settings.inactive_master_volume": "Гучність (якщо вікно неактивне)",
"hud.settings.music_volume": "Гучність Музики",
"hud.settings.sound_effect_volume": "Гучність Звукових Eфектів",
"hud.settings.audio_device": "Звуковий пристрій",
"hud.settings.awaitingkey": "Натисніть клавішу...",

View File

@ -42,7 +42,7 @@
"hud.diary": "Щоденник",
"hud.free_look_indicator": "Вільний огляд активовано. Натисніть {key}, щоб вимкнути.",
"hud.auto_walk_indicator": "Авто-хода активована",
"hud.auto_walk_indicator": "Авто Рух/Політ активовано",
"hud.camera_clamp_indicator": "Камера вертикально закріплена. Натисніть {key} щоб відімкнути",
},

View File

@ -25,8 +25,8 @@
"hud.skill.unlck_staff": "Відкриває дерево навичок володіння посохом{SP}",
"hud.skill.unlck_sceptre_title": "Цілющий скіпетр",
"hud.skill.unlck_sceptre": "Відкриває дерево навичок володіння цілющим скіпетром{SP}",
"hud.skill.dodge_title": "Перекид",
"hud.skill.dodge": "Перекид дозволяє ухилятись від ближніх атак{SP}",
"hud.skill.dodge_title": "Ухил",
"hud.skill.dodge": "Станьте невразливим до ближніх атак під час перекиду{SP}",
"hud.skill.roll_stamina_title": "Енергоспоживання перекиду",
"hud.skill.roll_stamina": "Перекид споживає на 10% менше енергії{SP}",
"hud.skill.roll_speed_title": "Швидкість перекиду",
@ -96,7 +96,7 @@
"hud.skill.st_flamethrower_range" : "Збільшує дальність дії вогнемету 25%{SP}",
"hud.skill.st_energy_drain_title" : "Енергоспоживання вогнемету",
"hud.skill.st_energy_drain" : "Зменшує швидкість споживання енергії вогнеметом на 20%{SP}",
"hud.skill.st_fireball": "Не хотів би я бути воротарем",
"hud.skill.st_fireball": "Запускає вогняні кулі, що вибухають вражаючи ціль",
"hud.skill.st_fireball_title": "Вогнений м'яч",
"hud.skill.st_explosion_radius_title" : "Радіус вибуху",
"hud.skill.st_explosion_radius" : "Більше - краще, збільшує радіус вибуху снарядів на 15%{SP}",
@ -194,8 +194,8 @@
"hud.skill.sw_dash_cost": "Зменшує початкову енергетичну ціну випаду на 25%{SP}",
"hud.skill.sw_dash_speed_title": "Швидкість випаду",
"hud.skill.sw_dash_speed": "Збільшує швидкість руху під час випаду 15%{SP}",
"hud.skill.sw_dash_inf_title": "Необмежений випад",
"hud.skill.sw_dash_inf": "Дозволяє нестись в випаді доки не закінчиться енергія{SP}",
"hud.skill.sw_dash_charge_through_title": "Ривок Наскрізь",
"hud.skill.sw_dash_charge_through": "Дозволяє прорватись наскрізь першого ворога{SP}",
"hud.skill.sw_dash_scale_title": "Приріст ушкодження випадом",
"hud.skill.sw_dash_scale": "Збільшує приріст ушкодження випадом на 20%{SP}",
"hud.skill.sw_spin_title": "Кружляння",
@ -234,13 +234,13 @@
"hud.skill.axe_spin_speed_title": "Швидкість кружляння",
"hud.skill.axe_spin_speed": "Збільшує швидкість кружляння на 25%{SP}",
"hud.skill.axe_spin_cost_title": "Енергоспоживання кружляння",
"hud.skill.axe_spin_cost": "Зменшує споживання енергії в кружлянні на 25%",
"hud.skill.axe_spin_cost": "Зменшує споживання енергії в кружлянні на 25%{SP}",
"hud.skill.axe_unlock_leap_title": "Атака в стрибку",
"hud.skill.axe_unlock_leap": "Відкриває атаку в стрибку{SP}",
"hud.skill.axe_leap_damage_title": "Ушкодження атакою в стрибку",
"hud.skill.axe_leap_damage": "Збільшує ушкодження від атаки в стрибку на 35%{SP}",
"hud.skill.axe_leap_knockback_title": "Відкидання атакою в стрибку",
"hud.skill.axe_leap_knockback": "Збільшує відстань відкидання від атаки в стрибку на 40%",
"hud.skill.axe_leap_knockback": "Збільшує відстань відкидання від атаки в стрибку на 40%{SP}",
"hud.skill.axe_leap_cost_title": "Енергоспоживання атаки в стрибку",
"hud.skill.axe_leap_cost": "Зменшує споживання енергії атакою в стрибку на 25%{SP}",
"hud.skill.axe_leap_distance_title": "Дальність стрибка",

View File

@ -184,7 +184,8 @@ float lights_at(vec3 wpos, vec3 wnorm, vec3 /*cam_to_frag*/view_dir, vec3 mu, ve
#if (LIGHTING_TYPE & LIGHTING_TYPE_TRANSMISSION) != 0
is_direct = true;
#endif
vec3 direct_light = PI * color * strength * square_factor * light_reflection_factor(/*direct_norm_dir*/wnorm, /*cam_to_frag*/view_dir, direct_light_dir, k_d, k_s, alpha, voxel_norm, voxel_lighting);
vec3 lrf = light_reflection_factor(/*direct_norm_dir*/wnorm, /*cam_to_frag*/view_dir, direct_light_dir, k_d, k_s, alpha, voxel_norm, voxel_lighting);
vec3 direct_light = PI * color * strength * square_factor * pow(lrf, vec3(0.5)); // TODO: Don't use ^0.5, it's non-physical but helps with hill climbing
float computed_shadow = ShadowCalculationPoint(i, -difference, wnorm, wpos/*, light_distance*/);
// directed_light += is_direct ? max(computed_shadow, /*LIGHT_AMBIANCE*/0.0) * direct_light * square_factor : vec3(0.0);
#ifdef FIGURE_SHADER

View File

@ -107,7 +107,7 @@ void main() {
// mat4 invfoo = foo * inverse(foo * all_mat);
// vec3 old_coord = all_mat * vec4(f_pos.xyz, 1.0);
// vec4 new_f_pos = invfoo * (old_coord);//vec4(f_pos, 1.0);
vec3 f_col_raw = mix(lod_col(f_pos.xy), vec3(0), clamp(pull_down / 10, 0, 1));
vec3 f_col_raw = mix(lod_col(f_pos.xy), vec3(0), clamp(pull_down / 30, 0, 1));
// tgt_color = vec4(f_col, 1.0);
// return;
// vec3 f_col = srgb_to_linear(vec3(1.0));

View File

@ -49,7 +49,8 @@ void main() {
// f_shadow = textureBicubic(t_horizon, pos_to_tex(f_pos.xy));
pull_down = 1.0 / pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0);
float dist = distance(focus_pos.xy, f_pos.xy);
pull_down = 0.2 / pow(dist / (view_distance.x * 0.9), 20.0);
f_pos.z -= pull_down;
// f_pos.z -= 100.0 * pow(1.0 + 0.01 / view_distance.x, -pow(distance(focus_pos.xy, f_pos.xy), 2.0));
@ -98,6 +99,8 @@ void main() {
view_mat * */
all_mat *
vec4(f_pos/*newRay*/, 1);
// Pull up the depth to avoid drawing over voxels (biased according to VD)
gl_Position.z += 0.1 * clamp((view_distance.x * 1.0 - dist) * 0.01, 0, 1);
// gl_Position.z = -gl_Position.z / gl_Position.w;
// gl_Position.z = -gl_Position.z / gl_Position.w;
// gl_Position.z = -gl_Position.z * gl_Position.w;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,106 @@
({
(Phoenix, Male): (
head: (
offset: (-4.0, -4.0, 0.0),
central: ("npc.phoenix.male.head"),
),
beak: (
offset: (-2.0, 0.0, -3.0),
central: ("npc.phoenix.male.beak"),
),
neck: (
offset: (-4.0, 0.0, 0.0),
central: ("npc.phoenix.male.neck"),
),
chest: (
offset: (-6.0, -9.5, -7.5),
central: ("npc.phoenix.male.chest"),
),
tail_front: (
offset: (-10.0, -14.0, -3.0),
central: ("npc.phoenix.male.tail_front"),
),
tail_rear: (
offset: (-9.0, -30.0, -2.0),
central: ("npc.phoenix.male.tail_rear"),
)
),
(Phoenix, Female): (
head: (
offset: (-4.0, -4.0, 0.0),
central: ("npc.phoenix.male.head"),
),
beak: (
offset: (-2.0, 0.0, -3.0),
central: ("npc.phoenix.male.beak"),
),
neck: (
offset: (-4.0, 0.0, 0.0),
central: ("npc.phoenix.male.neck"),
),
chest: (
offset: (-6.0, -9.5, -7.5),
central: ("npc.phoenix.male.chest"),
),
tail_front: (
offset: (-10.0, -14.0, -3.0),
central: ("npc.phoenix.male.tail_front"),
),
tail_rear: (
offset: (-9.0, -30.0, -2.0),
central: ("npc.phoenix.male.tail_rear"),
)
),
(Cockatrice, Male): (
head: (
offset: (-4.5, -6.0, -3.5),
central: ("npc.cockatrice.male.head"),
),
beak: (
offset: (-1.5, 0.0, -1.5),
central: ("npc.cockatrice.male.beak"),
),
neck: (
offset: (-3.5, 0.0, -6.0),
central: ("npc.cockatrice.male.neck"),
),
chest: (
offset: (-5.5, -10.0, -9.5),
central: ("npc.cockatrice.male.chest"),
),
tail_front: (
offset: (-2.5, -9.0, -6.0),
central: ("npc.cockatrice.male.tail_front"),
),
tail_rear: (
offset: (-2.5, -13.0, -3.0),
central: ("npc.cockatrice.male.tail_rear"),
)
),
(Cockatrice, Female): (
head: (
offset: (-4.5, -6.0, -3.5),
central: ("npc.cockatrice.male.head"),
),
beak: (
offset: (-1.5, 0.0, -1.5),
central: ("npc.cockatrice.male.beak"),
),
neck: (
offset: (-3.5, 0.0, -6.0),
central: ("npc.cockatrice.male.neck"),
),
chest: (
offset: (-5.5, -10.0, -9.5),
central: ("npc.cockatrice.male.chest"),
),
tail_front: (
offset: (-2.5, -9.0, -6.0),
central: ("npc.cockatrice.male.tail_front"),
),
tail_rear: (
offset: (-2.5, -13.0, -3.0),
central: ("npc.cockatrice.male.tail_rear"),
)
),
})

View File

@ -0,0 +1,170 @@
({
(Phoenix, Male): (
wing_in_l: (
offset: (-10.0, -12.0, -1.5),
lateral: ("npc.phoenix.male.wing_in_r"),
),
wing_in_r: (
offset: (0.0, -12.0, -1.5),
lateral: ("npc.phoenix.male.wing_in_r"),
),
wing_mid_l: (
offset: (-7.0, -15.0, -0.5),
lateral: ("npc.phoenix.male.wing_mid_r"),
),
wing_mid_r: (
offset: (0.0, -15.0, -0.5),
lateral: ("npc.phoenix.male.wing_mid_r"),
),
wing_out_l: (
offset: (-18.0, -18.0, -2.0),
lateral: ("npc.phoenix.male.wing_out_r"),
),
wing_out_r: (
offset: (0.0, -18.0, -2.0),
lateral: ("npc.phoenix.male.wing_out_r"),
),
leg_l: (
offset: (-4.0, -5.0, -4.5),
lateral: ("npc.phoenix.male.leg_r"),
),
leg_r: (
offset: (-4.0, -5.0, -4.5),
lateral: ("npc.phoenix.male.leg_r"),
),
foot_l: (
offset: (-3.5, -4.5, -9.0),
lateral: ("npc.phoenix.male.foot_r"),
),
foot_r: (
offset: (-3.5, -4.5, -9.0),
lateral: ("npc.phoenix.male.foot_r"),
)
),
(Phoenix, Female): (
wing_in_l: (
offset: (-10.0, -12.0, -1.5),
lateral: ("npc.phoenix.male.wing_in_r"),
),
wing_in_r: (
offset: (0.0, -12.0, -1.5),
lateral: ("npc.phoenix.male.wing_in_r"),
),
wing_mid_l: (
offset: (-7.0, -15.0, -0.5),
lateral: ("npc.phoenix.male.wing_mid_r"),
),
wing_mid_r: (
offset: (0.0, -15.0, -0.5),
lateral: ("npc.phoenix.male.wing_mid_r"),
),
wing_out_l: (
offset: (-18.0, -18.0, -2.0),
lateral: ("npc.phoenix.male.wing_out_r"),
),
wing_out_r: (
offset: (0.0, -18.0, -2.0),
lateral: ("npc.phoenix.male.wing_out_r"),
),
leg_l: (
offset: (-4.0, -5.0, -4.5),
lateral: ("npc.phoenix.male.leg_r"),
),
leg_r: (
offset: (-4.0, -5.0, -4.5),
lateral: ("npc.phoenix.male.leg_r"),
),
foot_l: (
offset: (-3.5, -4.5, -9.0),
lateral: ("npc.phoenix.male.foot_r"),
),
foot_r: (
offset: (-3.5, -4.5, -9.0),
lateral: ("npc.phoenix.male.foot_r"),
)
),
(Cockatrice, Male): (
wing_in_l: (
offset: (-7.0, -8.0, -2.0),
lateral: ("npc.cockatrice.male.wing_in_r"),
),
wing_in_r: (
offset: (0.0, -8.0, -2.0),
lateral: ("npc.cockatrice.male.wing_in_r"),
),
wing_mid_l: (
offset: (-5.0, -9.0, -2.0),
lateral: ("npc.cockatrice.male.wing_mid_r"),
),
wing_mid_r: (
offset: (0.0, -9.0, -2.0),
lateral: ("npc.cockatrice.male.wing_mid_r"),
),
wing_out_l: (
offset: (-10.0, -11.0, -2.0),
lateral: ("npc.cockatrice.male.wing_out_r"),
),
wing_out_r: (
offset: (0.0, -11.0, -2.0),
lateral: ("npc.cockatrice.male.wing_out_r"),
),
leg_l: (
offset: (-3.0, -4.5, -4.0),
lateral: ("npc.cockatrice.male.leg_r"),
),
leg_r: (
offset: (-3.0, -4.5, -4.0),
lateral: ("npc.cockatrice.male.leg_r"),
),
foot_l: (
offset: (-3.5, -5.5, -10.0),
lateral: ("npc.cockatrice.male.foot_r"),
),
foot_r: (
offset: (-3.5, -5.5, -10.0),
lateral: ("npc.cockatrice.male.foot_r"),
)
),
(Cockatrice, Female): (
wing_in_l: (
offset: (-7.0, -8.0, -2.0),
lateral: ("npc.cockatrice.male.wing_in_r"),
),
wing_in_r: (
offset: (0.0, -8.0, -2.0),
lateral: ("npc.cockatrice.male.wing_in_r"),
),
wing_mid_l: (
offset: (-5.0, -9.0, -2.0),
lateral: ("npc.cockatrice.male.wing_mid_r"),
),
wing_mid_r: (
offset: (0.0, -9.0, -2.0),
lateral: ("npc.cockatrice.male.wing_mid_r"),
),
wing_out_l: (
offset: (-10.0, -11.0, -2.0),
lateral: ("npc.cockatrice.male.wing_out_r"),
),
wing_out_r: (
offset: (0.0, -11.0, -2.0),
lateral: ("npc.cockatrice.male.wing_out_r"),
),
leg_l: (
offset: (-3.0, -4.5, -4.0),
lateral: ("npc.cockatrice.male.leg_r"),
),
leg_r: (
offset: (-3.0, -4.5, -4.0),
lateral: ("npc.cockatrice.male.leg_r"),
),
foot_l: (
offset: (-3.5, -5.5, -10.0),
lateral: ("npc.cockatrice.male.foot_r"),
),
foot_r: (
offset: (-3.5, -5.5, -10.0),
lateral: ("npc.cockatrice.male.foot_r"),
)
),
})

View File

@ -195,32 +195,4 @@
central: ("npc.parrot.male.tail"),
)
),
(Cockatrice, Male): (
head: (
offset: (-2.5, 0.0, -8.0),
central: ("npc.cockatrice.male.head"),
),
torso: (
offset: (-3.5, -6.5, -7.5),
central: ("npc.cockatrice.male.torso"),
),
tail: (
offset: (-1.5, -3.5, -4.0),
central: ("npc.cockatrice.male.tail"),
)
),
(Cockatrice, Female): (
head: (
offset: (-2.5, 0.0, -8.0),
central: ("npc.cockatrice.male.head"),
),
torso: (
offset: (-3.5, -6.5, -7.5),
central: ("npc.cockatrice.male.torso"),
),
tail: (
offset: (-1.5, -3.5, -4.0),
central: ("npc.cockatrice.male.tail"),
)
),
})

View File

@ -251,40 +251,4 @@
lateral: ("npc.parrot.male.leg_r"),
)
),
(Cockatrice, Male): (
wing_l: (
offset: (-2.0, -3.0, -9.0),
lateral: ("npc.cockatrice.male.wing_r"),
),
wing_r: (
offset: (-2.0, -3.0, -9.0),
lateral: ("npc.cockatrice.male.wing_r"),
),
foot_l: (
offset: (-2.5, 0.0, -12.0),
lateral: ("npc.cockatrice.male.leg_r"),
),
foot_r: (
offset: (-2.5, 0.0, -12.0),
lateral: ("npc.cockatrice.male.leg_r"),
)
),
(Cockatrice, Female): (
wing_l: (
offset: (-2.0, -3.0, -9.0),
lateral: ("npc.cockatrice.male.wing_r"),
),
wing_r: (
offset: (-2.0, -3.0, -9.0),
lateral: ("npc.cockatrice.male.wing_r"),
),
foot_l: (
offset: (-2.5, 0.0, -12.0),
lateral: ("npc.cockatrice.male.leg_r"),
),
foot_r: (
offset: (-2.5, 0.0, -12.0),
lateral: ("npc.cockatrice.male.leg_r"),
)
),
})

View File

@ -5,23 +5,23 @@
),
map: {
"Green0": (
vox_spec: ("armor.misc.lantern.green-0", (-2.0, -2.0, -7.0)),
vox_spec: ("lantern.green-0", (-2.0, -2.0, -7.0)),
color: None
),
"Black0": (
vox_spec: ("armor.misc.lantern.black-0", (-2.0, -2.0, -7.0)),
vox_spec: ("lantern.black-0", (-2.0, -2.0, -8.5)),
color: None
),
"Red0": (
vox_spec: ("armor.misc.lantern.red-0", (-2.0, -2.0, -7.0)),
vox_spec: ("lantern.red-0", (-2.0, -2.0, -7.0)),
color: None
),
"Blue0": (
vox_spec: ("armor.misc.lantern.blue-0", (-2.0, -2.0, -7.0)),
vox_spec: ("lantern.blue-0", (-2.0, -2.0, -7.0)),
color: None
),
"GeodePurp": (
vox_spec: ("lantern.geode_purp", (-3.0, -3.0, -7.0)),
vox_spec: ("lantern.geode_purp", (-2.5, -2.5, -9.5)),
color: None
),
},

BIN
assets/voxygen/voxel/lantern/black-0.vox (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/voxel/lantern/blue-0.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/lantern/green-0.vox (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/voxel/lantern/red-0.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/beak.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/foot_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/neck.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_in_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_mid_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/cockatrice/male/wing_out_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/beak.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/foot_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/head.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/leg_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/neck.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/wing_in_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/wing_mid_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/phoenix/male/wing_out_r.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

View File

@ -5,7 +5,7 @@ authors = ["Joshua Barretto <joshua.s.barretto@gmail.com>"]
edition = "2018"
[features]
tracy = ["common/tracy", "common-base/tracy", "common-sys/tracy", "common-net/tracy", "common-frontend/tracy"]
tracy = ["common/tracy", "common-base/tracy", "common-state/tracy", "common-systems/tracy", "common-net/tracy", "common-frontend/tracy"]
simd = ["vek/platform_intrinsics"]
plugins = ["common-state/plugins"]
bin_bot = ["common-ecs", "serde", "ron", "clap", "rustyline", "common-frontend", "async-channel"]
@ -16,7 +16,7 @@ default = ["simd"]
common = { package = "veloren-common", path = "../common", features = ["no-assets"] }
common-base = { package = "veloren-common-base", path = "../common/base" }
common-state = { package = "veloren-common-state", path = "../common/state", default-features = false }
common-sys = { package = "veloren-common-sys", path = "../common/sys", default-features = false }
common-systems = { package = "veloren-common-systems", path = "../common/systems", default-features = false }
common-net = { package = "veloren-common-net", path = "../common/net" }
network = { package = "veloren-network", path = "../network", features = ["compression"], default-features = false }
@ -32,6 +32,7 @@ vek = { version = "=0.14.1", features = ["serde"] }
hashbrown = { version = "0.9", features = ["rayon", "serde", "nightly"] }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "fb3dcbc4962b367253f8f2f92760ef44d2679c9a" }
#TODO: put bot in a different crate
#bot only
async-channel = { version = "1.6", optional = true }
common-ecs = { package = "veloren-common-ecs", path = "../common/ecs", optional = true }

View File

@ -52,7 +52,7 @@ fn main() {
let addr = ConnectionArgs::resolve(&server_addr, false)
.await
.expect("dns resolve failed");
Client::new(addr, None, runtime2).await
Client::new(addr, None, runtime2, &mut None).await
})
.expect("Failed to create client instance");

View File

@ -59,7 +59,7 @@ pub fn make_client(runtime: &Arc<Runtime>, server: &str) -> Client {
let connection_args = ConnectionArgs::resolve(server, false)
.await
.expect("DNS resolution failed");
Client::new(connection_args, view_distance, runtime2)
Client::new(connection_args, view_distance, runtime2, &mut None)
.await
.expect("Failed to connect to server")
})

View File

@ -9,6 +9,7 @@ pub mod error;
// Reexports
pub use crate::error::Error;
pub use authc::AuthClientError;
pub use common_net::msg::ServerInfo;
pub use specs::{
join::Join,
saveload::{Marker, MarkerAllocator},
@ -49,13 +50,13 @@ use common_net::{
world_msg::{EconomyInfo, SiteId, SiteInfo},
ChatMsgValidationError, ClientGeneral, ClientMsg, ClientRegister, ClientType,
DisconnectReason, InviteAnswer, Notification, PingMsg, PlayerInfo, PlayerListUpdate,
PresenceKind, RegisterError, ServerGeneral, ServerInfo, ServerInit, ServerRegisterAnswer,
PresenceKind, RegisterError, ServerGeneral, ServerInit, ServerRegisterAnswer,
MAX_BYTES_CHAT_MSG,
},
sync::WorldSyncExt,
};
use common_state::State;
use common_sys::add_local_systems;
use common_systems::add_local_systems;
use comp::BuffKind;
use futures_util::FutureExt;
use hashbrown::{HashMap, HashSet};
@ -66,6 +67,7 @@ use rayon::prelude::*;
use specs::Component;
use std::{
collections::{BTreeMap, VecDeque},
mem,
sync::Arc,
time::{Duration, Instant},
};
@ -204,6 +206,8 @@ impl Client {
addr: ConnectionArgs,
view_distance: Option<u32>,
runtime: Arc<Runtime>,
// TODO: refactor to avoid needing to use this out parameter
mismatched_server_info: &mut Option<ServerInfo>,
) -> Result<Self, Error> {
let network = Network::new(Pid::new(), &runtime);
@ -235,8 +239,6 @@ impl Client {
register_stream.send(ClientType::Game)?;
let server_info: ServerInfo = register_stream.recv().await?;
// TODO: Display that versions don't match in Voxygen
if server_info.git_hash != *common::util::GIT_HASH {
warn!(
"Server is running {}[{}], you are running {}[{}], versions might be incompatible!",
@ -245,6 +247,10 @@ impl Client {
common::util::GIT_HASH.to_string(),
common::util::GIT_DATE.to_string(),
);
// Pass the server info back to the caller to ensure they can access it even
// if this function errors.
mem::swap(mismatched_server_info, &mut Some(server_info.clone()));
}
debug!("Auth Server: {:?}", server_info.auth_provider);
@ -1923,15 +1929,17 @@ impl Client {
fn handle_server_terrain_msg(&mut self, msg: ServerGeneral) -> Result<(), Error> {
match msg {
ServerGeneral::TerrainChunkUpdate { key, chunk } => {
if let Ok(chunk) = chunk {
self.state.insert_chunk(key, *chunk);
if let Some(chunk) = chunk.ok().and_then(|c| c.decompress()) {
self.state.insert_chunk(key, Arc::new(chunk));
}
self.pending_chunks.remove(&key);
},
ServerGeneral::TerrainBlockUpdates(mut blocks) => {
blocks.drain().for_each(|(pos, block)| {
self.state.set_block(pos, block);
});
ServerGeneral::TerrainBlockUpdates(blocks) => {
if let Some(mut blocks) = blocks.decompress() {
blocks.drain().for_each(|(pos, block)| {
self.state.set_block(pos, block);
});
}
},
_ => unreachable!("Not a terrain message"),
}
@ -2447,6 +2455,7 @@ mod tests {
ConnectionArgs::IpAndPort(vec![socket]),
view_distance,
runtime2,
&mut None,
));
let _ = veloren_client.map(|mut client| {

View File

@ -14,6 +14,8 @@ default = ["simd"]
common = {package = "veloren-common", path = "../../common"}
#inline_tweak = "1.0.2"
bincode = "1.3.3"
flate2 = "1.0.20"
sum_type = "0.2.0"
vek = { version = "=0.14.1", features = ["serde"] }
tracing = { version = "0.1", default-features = false }

View File

@ -15,6 +15,8 @@ pub use self::{
};
use common::character::CharacterId;
use serde::{Deserialize, Serialize};
use std::marker::PhantomData;
use tracing::trace;
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub enum PresenceKind {
@ -42,3 +44,60 @@ pub fn validate_chat_msg(msg: &str) -> Result<(), ChatMsgValidationError> {
Err(ChatMsgValidationError::TooLong)
}
}
/// Wrapper for compressed, serialized data (for stuff that doesn't use the
/// default lz4 compression)
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct CompressedData<T> {
pub data: Vec<u8>,
compressed: bool,
_phantom: PhantomData<T>,
}
impl<T: Serialize + for<'a> Deserialize<'a>> CompressedData<T> {
pub fn compress(t: &T, level: u32) -> Self {
use flate2::{write::DeflateEncoder, Compression};
use std::io::Write;
let uncompressed = bincode::serialize(t)
.expect("bincode serialization can only fail if a byte limit is set");
if uncompressed.len() >= 32 {
const EXPECT_MSG: &str =
"compression only fails for fallible Read/Write impls (which Vec<u8> is not)";
let mut encoder = DeflateEncoder::new(Vec::new(), Compression::new(level));
encoder.write_all(&*uncompressed).expect(EXPECT_MSG);
let compressed = encoder.finish().expect(EXPECT_MSG);
trace!(
"compressed {}, uncompressed {}, ratio {}",
compressed.len(),
uncompressed.len(),
compressed.len() as f32 / uncompressed.len() as f32
);
CompressedData {
data: compressed,
compressed: true,
_phantom: PhantomData,
}
} else {
CompressedData {
data: uncompressed,
compressed: false,
_phantom: PhantomData,
}
}
}
pub fn decompress(&self) -> Option<T> {
use std::io::Read;
if self.compressed {
let mut uncompressed = Vec::new();
flate2::read::DeflateDecoder::new(&*self.data)
.read_to_end(&mut uncompressed)
.ok()?;
bincode::deserialize(&*uncompressed).ok()
} else {
bincode::deserialize(&*self.data).ok()
}
}
}

View File

@ -1,4 +1,4 @@
use super::{world_msg::EconomyInfo, ClientType, EcsCompPacket, PingMsg};
use super::{world_msg::EconomyInfo, ClientType, CompressedData, EcsCompPacket, PingMsg};
use crate::sync;
use common::{
character::{self, CharacterItem},
@ -106,9 +106,9 @@ pub enum ServerGeneral {
// Ingame related AND terrain stream
TerrainChunkUpdate {
key: Vec2<i32>,
chunk: Result<Box<TerrainChunk>, ()>,
chunk: Result<CompressedData<TerrainChunk>, ()>,
},
TerrainBlockUpdates(HashMap<Vec3<i32>, Block>),
TerrainBlockUpdates(CompressedData<HashMap<Vec3<i32>, Block>>),
// Always possible
PlayerListUpdate(PlayerListUpdate),
/// A message to go into the client chat box. The client is responsible for

View File

@ -26,6 +26,7 @@ lazy_static! {
pub fn start_hot_reloading() { ASSETS.enhance_hot_reloading(); }
pub type AssetHandle<T> = assets_manager::Handle<'static, T>;
pub type AssetGuard<T> = assets_manager::AssetGuard<'static, T>;
pub type AssetDir<T> = assets_manager::DirReader<'static, T, source::FileSystem>;
/// The Asset trait, which is implemented by all structures that have their data

View File

@ -0,0 +1,21 @@
use crate::util::SpatialGrid;
/// Cached [`SpatialGrid`] for reuse within different ecs systems during a tick.
/// This is used to accelerate queries on entities within a specific area.
/// Updated within the physics system [`crate::sys::phys::Sys`] after new entity
/// positions are calculated for the tick. So any position modifications outside
/// the physics system will not be reflected here until the next tick when the
/// physics system runs.
pub struct CachedSpatialGrid(pub SpatialGrid);
impl Default for CachedSpatialGrid {
fn default() -> Self {
let lg2_cell_size = 5; // 32
let lg2_large_cell_size = 6; // 64
let radius_cutoff = 8;
let spatial_grid = SpatialGrid::new(lg2_cell_size, lg2_large_cell_size, radius_cutoff);
Self(spatial_grid)
}
}

View File

@ -38,6 +38,8 @@ pub enum Tactic {
FixedTurret,
RotatingTurret,
Mindflayer,
BirdLargeBreathe,
BirdLargeFire,
}
#[derive(Copy, Clone, Debug, PartialEq)]
@ -247,7 +249,7 @@ impl<'a> From<&'a Body> for Psyche {
},
Body::BipedSmall(_) => 0.5,
Body::BirdMedium(_) => 0.5,
Body::BirdSmall(_) => 0.4,
Body::BirdLarge(_) => 0.9,
Body::FishMedium(_) => 0.15,
Body::FishSmall(_) => 0.0,
Body::BipedLarge(_) => 1.0,

View File

@ -1,7 +1,7 @@
pub mod biped_large;
pub mod biped_small;
pub mod bird_large;
pub mod bird_medium;
pub mod bird_small;
pub mod dragon;
pub mod fish_medium;
pub mod fish_small;
@ -38,7 +38,7 @@ make_case_elim!(
BirdMedium(body: bird_medium::Body) = 3,
FishMedium(body: fish_medium::Body) = 4,
Dragon(body: dragon::Body) = 5,
BirdSmall(body: bird_small::Body) = 6,
BirdLarge(body: bird_large::Body) = 6,
FishSmall(body: fish_small::Body) = 7,
BipedLarge(body: biped_large::Body)= 8,
BipedSmall(body: biped_small::Body)= 9,
@ -73,7 +73,7 @@ pub struct AllBodies<BodyMeta, SpeciesMeta> {
pub bird_medium: BodyData<BodyMeta, bird_medium::AllSpecies<SpeciesMeta>>,
pub fish_medium: BodyData<BodyMeta, fish_medium::AllSpecies<SpeciesMeta>>,
pub dragon: BodyData<BodyMeta, dragon::AllSpecies<SpeciesMeta>>,
pub bird_small: BodyData<BodyMeta, ()>,
pub bird_large: BodyData<BodyMeta, bird_large::AllSpecies<SpeciesMeta>>,
pub fish_small: BodyData<BodyMeta, fish_small::AllSpecies<SpeciesMeta>>,
pub biped_large: BodyData<BodyMeta, biped_large::AllSpecies<SpeciesMeta>>,
pub biped_small: BodyData<BodyMeta, biped_small::AllSpecies<SpeciesMeta>>,
@ -95,6 +95,7 @@ impl<BodyMeta, SpeciesMeta> core::ops::Index<NpcKind> for AllBodies<BodyMeta, Sp
NpcKind::Pig => &self.quadruped_small.body,
NpcKind::Wolf => &self.quadruped_medium.body,
NpcKind::Duck => &self.bird_medium.body,
NpcKind::Phoenix => &self.bird_large.body,
NpcKind::Marlin => &self.fish_medium.body,
NpcKind::Clownfish => &self.fish_small.body,
NpcKind::Ogre => &self.biped_large.body,
@ -118,9 +119,9 @@ impl<'a, BodyMeta, SpeciesMeta> core::ops::Index<&'a Body> for AllBodies<BodyMet
Body::QuadrupedSmall(_) => &self.quadruped_small.body,
Body::QuadrupedMedium(_) => &self.quadruped_medium.body,
Body::BirdMedium(_) => &self.bird_medium.body,
Body::BirdLarge(_) => &self.bird_large.body,
Body::FishMedium(_) => &self.fish_medium.body,
Body::Dragon(_) => &self.dragon.body,
Body::BirdSmall(_) => &self.bird_small.body,
Body::FishSmall(_) => &self.fish_small.body,
Body::BipedLarge(_) => &self.biped_large.body,
Body::BipedSmall(_) => &self.biped_small.body,
@ -152,7 +153,7 @@ impl Body {
let d = match self {
// based on a house sparrow (Passer domesticus)
Body::BirdMedium(_) => 700.0,
Body::BirdSmall(_) => 700.0,
Body::BirdLarge(_) => 2_200.0,
// based on its mass divided by the volume of a bird scaled up to the size of the dragon
Body::Dragon(_) => 3_700.0,
@ -183,8 +184,7 @@ impl Body {
// ravens are 0.69-2 kg, crows are 0.51 kg on average
Body::BirdMedium(_) => 1.0,
// australian magpies are around 0.22-0.35 kg
Body::BirdSmall(_) => 0.3,
Body::BirdLarge(_) => 200.0,
Body::Dragon(_) => 20_000.0,
Body::FishMedium(_) => 2.5,
@ -281,11 +281,8 @@ impl Body {
_ => Vec3::new(4.6, 3.0, 6.0),
},
Body::BipedSmall(_) => Vec3::new(1.0, 0.75, 1.4),
Body::BirdMedium(body) => match body.species {
bird_medium::Species::Cockatrice => Vec3::new(2.0, 1.0, 1.8),
_ => Vec3::new(2.0, 1.0, 1.1),
},
Body::BirdSmall(_) => Vec3::new(1.2, 0.6, 1.1),
Body::BirdMedium(_) => Vec3::new(2.0, 1.0, 1.1),
Body::BirdLarge(_) => Vec3::new(2.0, 5.0, 2.4),
Body::Dragon(_) => Vec3::new(16.0, 10.0, 16.0),
Body::FishMedium(_) => Vec3::new(0.5, 2.0, 0.8),
Body::FishSmall(_) => Vec3::new(0.3, 1.2, 0.6),
@ -374,6 +371,10 @@ impl Body {
biped_large::Species::Dullahan => 4000,
_ => 3000,
},
Body::BirdLarge(body) => match body.species {
bird_large::Species::Cockatrice => 4000,
bird_large::Species::Phoenix => 6000,
},
Body::Humanoid(_) => 750,
_ => 1000,
}
@ -429,13 +430,12 @@ impl Body {
bird_medium::Species::Goose => 60,
bird_medium::Species::Parrot => 60,
bird_medium::Species::Peacock => 60,
bird_medium::Species::Cockatrice => 400,
bird_medium::Species::Eagle => 400,
_ => 100,
},
Body::FishMedium(_) => 50,
Body::Dragon(_) => 5000,
Body::BirdSmall(_) => 50,
Body::BirdLarge(_) => 3000,
Body::FishSmall(_) => 20,
Body::BipedLarge(biped_large) => match biped_large.species {
biped_large::Species::Ogre => 2500,
@ -542,13 +542,12 @@ impl Body {
bird_medium::Species::Goose => 10,
bird_medium::Species::Parrot => 10,
bird_medium::Species::Peacock => 10,
bird_medium::Species::Cockatrice => 10,
bird_medium::Species::Eagle => 10,
_ => 20,
},
Body::FishMedium(_) => 10,
Body::Dragon(_) => 500,
Body::BirdSmall(_) => 10,
Body::BirdLarge(_) => 120,
Body::FishSmall(_) => 10,
Body::BipedLarge(biped_large) => match biped_large.species {
biped_large::Species::Ogre => 70,
@ -587,7 +586,7 @@ impl Body {
pub fn flying_height(&self) -> f32 {
match self {
Body::BirdSmall(_) => 30.0,
Body::BirdLarge(_) => 50.0,
Body::BirdMedium(_) => 40.0,
Body::Dragon(_) => 60.0,
Body::Ship(ship::Body::DefaultAirship) => 60.0,

View File

@ -0,0 +1,82 @@
use crate::{make_case_elim, make_proj_elim};
use rand::{seq::SliceRandom, thread_rng};
use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct Body {
pub species: Species,
pub body_type: BodyType,
}
);
impl Body {
pub fn random() -> Self {
let mut rng = thread_rng();
let species = *(&ALL_SPECIES).choose(&mut rng).unwrap();
Self::random_with(&mut rng, &species)
}
#[inline]
pub fn random_with(rng: &mut impl rand::Rng, &species: &Species) -> Self {
let body_type = *(&ALL_BODY_TYPES).choose(rng).unwrap();
Self { species, body_type }
}
}
impl From<Body> for super::Body {
fn from(body: Body) -> Self { super::Body::BirdLarge(body) }
}
make_case_elim!(
species,
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Species {
Phoenix = 0,
Cockatrice = 1,
}
);
/// Data representing per-species generic data.
///
/// NOTE: Deliberately don't (yet?) implement serialize.
#[derive(Clone, Debug, Deserialize)]
pub struct AllSpecies<SpeciesMeta> {
pub phoenix: SpeciesMeta,
pub cockatrice: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
type Output = SpeciesMeta;
#[inline]
fn index(&self, &index: &'a Species) -> &Self::Output {
match index {
Species::Phoenix => &self.phoenix,
Species::Cockatrice => &self.cockatrice,
}
}
}
pub const ALL_SPECIES: [Species; 2] = [Species::Phoenix, Species::Cockatrice];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {
type IntoIter = std::iter::Copied<std::slice::Iter<'static, Self::Item>>;
type Item = Species;
fn into_iter(self) -> Self::IntoIter { ALL_SPECIES.iter().copied() }
}
make_case_elim!(
body_type,
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum BodyType {
Female = 0,
Male = 1,
}
);
pub const ALL_BODY_TYPES: [BodyType; 2] = [BodyType::Female, BodyType::Male];

View File

@ -41,7 +41,6 @@ make_case_elim!(
Eagle = 4,
Owl = 5,
Parrot = 6,
Cockatrice = 7,
}
);
@ -57,7 +56,6 @@ pub struct AllSpecies<SpeciesMeta> {
pub eagle: SpeciesMeta,
pub owl: SpeciesMeta,
pub parrot: SpeciesMeta,
pub cockatrice: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
@ -73,12 +71,11 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
Species::Eagle => &self.eagle,
Species::Owl => &self.owl,
Species::Parrot => &self.parrot,
Species::Cockatrice => &self.cockatrice,
}
}
}
pub const ALL_SPECIES: [Species; 8] = [
pub const ALL_SPECIES: [Species; 7] = [
Species::Duck,
Species::Chicken,
Species::Goose,
@ -86,7 +83,6 @@ pub const ALL_SPECIES: [Species; 8] = [
Species::Eagle,
Species::Owl,
Species::Parrot,
Species::Cockatrice,
];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {

View File

@ -1,66 +0,0 @@
use crate::{make_case_elim, make_proj_elim};
use rand::{seq::SliceRandom, thread_rng};
use serde::{Deserialize, Serialize};
make_proj_elim!(
body,
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct Body {
pub head: Head,
pub torso: Torso,
pub wing_l: WingL,
pub wing_r: WingR,
}
);
impl Body {
pub fn random() -> Self {
let mut rng = thread_rng();
Self {
head: *(&ALL_HEADS).choose(&mut rng).unwrap(),
torso: *(&ALL_TORSOS).choose(&mut rng).unwrap(),
wing_l: *(&ALL_WING_LS).choose(&mut rng).unwrap(),
wing_r: *(&ALL_WING_RS).choose(&mut rng).unwrap(),
}
}
}
make_case_elim!(
head,
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Head {
Default = 0,
}
);
const ALL_HEADS: [Head; 1] = [Head::Default];
make_case_elim!(
torso,
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum Torso {
Default = 0,
}
);
const ALL_TORSOS: [Torso; 1] = [Torso::Default];
make_case_elim!(
wing_l,
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum WingL {
Default = 0,
}
);
const ALL_WING_LS: [WingL; 1] = [WingL::Default];
make_case_elim!(
wing_r,
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[repr(u32)]
pub enum WingR {
Default = 0,
}
);
const ALL_WING_RS: [WingR; 1] = [WingR::Default];

View File

@ -54,12 +54,9 @@ impl Body {
pub fn mass(&self) -> Mass { Mass((self.hull_vol() + self.balloon_vol()) * self.density().0) }
}
/// Terrain is 11.0 scale relative to small-scale voxels, and all figures get
/// multiplied by 0.8 in rendering. For now, have a constant in `comp::Scale`
/// that compensates for both of these, but there might be a more elegant way
/// (e.g. using `Scale(0.8)` for everything else and not having a magic number
/// in figure rendering, and multiplying terrain models by 11.0 in animation).
pub const AIRSHIP_SCALE: f32 = 11.0 / 0.8;
/// Terrain is 11.0 scale relative to small-scale voxels,
/// airship scale is multiplied by 11 to reach terrain scale.
pub const AIRSHIP_SCALE: f32 = 11.0;
/// Duplicate of some of the things defined in `voxygen::scene::figure::load` to
/// avoid having to refactor all of that to `common` for using voxels as

View File

@ -167,6 +167,19 @@ impl CharacterState {
)
}
pub fn is_using_hands(&self) -> bool {
matches!(
self,
CharacterState::Climb(_)
| CharacterState::Equipping(_)
| CharacterState::Dance
| CharacterState::Glide
| CharacterState::GlideWield
| CharacterState::Talk
| CharacterState::Roll(_),
)
}
pub fn is_block(&self) -> bool { matches!(self, CharacterState::BasicBlock) }
pub fn is_dodge(&self) -> bool { matches!(self, CharacterState::Roll(_)) }

View File

@ -129,11 +129,11 @@ impl Body {
},
// Cross-section, zero-lift angle; exclude the wings (width * 0.2)
Body::BirdMedium(_) | Body::BirdSmall(_) | Body::Dragon(_) => {
Body::BirdMedium(_) | Body::BirdLarge(_) | Body::Dragon(_) => {
let dim = self.dimensions().map(|a| a * 0.5);
let cd = match self {
Body::BirdMedium(_) => 0.2,
Body::BirdSmall(_) => 0.4,
Body::BirdLarge(_) => 0.4,
_ => 0.7,
};
cd * std::f32::consts::PI * dim.x * 0.2 * dim.z
@ -149,6 +149,7 @@ impl Body {
// very streamlined objects
object::Body::Arrow
| object::Body::ArrowSnake
| object::Body::ArrowTurret
| object::Body::FireworkBlue
| object::Body::FireworkGreen
| object::Body::FireworkPurple

View File

@ -441,4 +441,6 @@ pub enum UniqueKind {
ObjectTurret,
WoodenSpear,
MindflayerStaff,
BirdLargeBreathe,
BirdLargeFire,
}

View File

@ -1,6 +1,6 @@
use crate::{
comp::{
biped_large, biped_small, golem,
biped_large, biped_small, bird_large, golem,
inventory::{
loadout::Loadout,
slot::{ArmorSlot, EquipSlot},
@ -333,6 +333,18 @@ impl LoadoutBuilder {
));
},
},
Body::BirdLarge(bird_large) => match (bird_large.species, bird_large.body_type) {
(bird_large::Species::Cockatrice, _) => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.birdlargebreathe",
));
},
(bird_large::Species::Phoenix, _) => {
main_tool = Some(Item::new_from_asset_expect(
"common.items.npc_weapons.unique.birdlargefire",
));
},
},
_ => {},
};
}

View File

@ -50,7 +50,7 @@ pub use self::{
aura::{Aura, AuraChange, AuraKind, Auras},
beam::{Beam, BeamSegment},
body::{
biped_large, biped_small, bird_medium, bird_small, dragon, fish_medium, fish_small, golem,
biped_large, biped_small, bird_large, bird_medium, dragon, fish_medium, fish_small, golem,
humanoid, object, quadruped_low, quadruped_medium, quadruped_small, ship, theropod,
AllBodies, Body, BodyData,
},

View File

@ -135,6 +135,7 @@ impl EntityInfo {
Some(get_npc_name(&npc_names.quadruped_medium, body.species))
},
Body::BirdMedium(body) => Some(get_npc_name(&npc_names.bird_medium, body.species)),
Body::BirdLarge(body) => Some(get_npc_name(&npc_names.bird_large, body.species)),
Body::FishSmall(body) => Some(get_npc_name(&npc_names.fish_small, body.species)),
Body::FishMedium(body) => Some(get_npc_name(&npc_names.fish_medium, body.species)),
Body::Theropod(body) => Some(get_npc_name(&npc_names.theropod, body.species)),

Some files were not shown because too many files have changed in this diff Show More