Go to file
juliancoffee 5f3eaddb70 Split LodoutBuilder::build_loadout
LoadoutBuilder::build_loadout is a function which has four parameters
and 3 of them are Option<>, and although fourth (body) isn't Option<>,
it's optional too because it is used only in some combinations of
another arguments.

Because these combinations produces quirky code flow, it will be better
to split it to different methods.

So we did following changes to remove it and rewrite code that was using it
to use better methods.

* Introduce LoadoutPreset as new LoadoutConfig, currently it's only used
in Summon ability, because SummonInfo uses Copy and we can't specify
String for specifying asset path for loadout.
Everything else is rewritten to use asset path to create loadouts.

* More builder methods for LoadoutBuilder.
Namely:
    - from_default which is used in server/src/cmd.rs in "/spawn" command.
    - with_default_equipment, with_default_maintool to use default
    loadout for specific body
    - with_preset to use LoadoutPreset

* Add new make_loadout field with `fn (loadout_builder, trading_info) -> loadout_builder`
to EntityInfo which allows to lazily construct loadout without
modifying LoadoutBuilder code

* Fix Merchants not having trade site
We had heuristic that if something has Merchant LoadoutConfig - it's
merchant, which can be false, especially if we create Merchant loadout
lazily
As side note, we do same check for Guards and it fails too.

Too fix it, we introduce new agent::Mark, which explicitly specifies
kind of agent for entity

* `LoadoutBuilder::build_loadout` was written in a such way that depending
on main_tool you will have different loadout. Turns out it was this
way only for Adlets though and this behaviour is reproduced by specifying
different loadouts directly in world code.
2021-06-09 15:37:04 +03:00
.cargo Suppress wgpu_core::device info logging 2021-06-02 23:59:48 -04:00
.github/workflows Remove git filter repo 2021-02-19 08:55:10 -05:00
.gitlab Merge branch 'aweinstock/recipe-graphviz' into 'master' 2021-06-09 09:14:13 +00:00
assets Split LodoutBuilder::build_loadout 2021-06-09 15:37:04 +03:00
client Merge branch 'xMAC94x/ci_bin_features' into 'master' 2021-06-08 10:04:17 +00:00
common Split LodoutBuilder::build_loadout 2021-06-09 15:37:04 +03:00
network Merge branch 'revert-c6e200a3' into 'master' 2021-06-02 14:27:13 +00:00
nix build(nix): switch to crate2nix 2021-04-27 05:18:12 +03:00
plugin Re-disable incremental just for common-systems, small fix in plugin 2021-05-31 20:44:57 -04:00
server Split LodoutBuilder::build_loadout 2021-06-09 15:37:04 +03:00
server-cli Require all commands to succeed in server-cli Dockerfile 2021-06-07 13:31:01 -04:00
voxygen small tweaks 2021-06-09 01:58:08 -04:00
world Split LodoutBuilder::build_loadout 2021-06-09 15:37:04 +03:00
.dockerignore - Load characters after login. 2020-05-09 15:41:25 +00:00
.gitattributes Added .tar to LFS extensions 2020-12-13 17:15:33 +00:00
.gitignore add assets/tweak directory to .gitignore 2021-06-08 13:31:27 +03:00
.gitlab-ci.yml Update docker cache for CI 2021-06-04 02:27:07 -04:00
.mailmap Added a .mailmap file to unify my name in commits made with my email address 2021-01-15 00:19:47 +01:00
.rustfmt.toml update toolchain to nightly-2021-03-22 2021-03-22 16:41:04 +01:00
.tokeignore Added tokeignore for Cargo.nix 2020-07-02 12:14:01 -04:00
Cargo.lock Add graphviz diagram generator for crafting recipes. 2021-06-08 14:42:51 -04:00
Cargo.toml build(nix): add new dependencies to nix build and dev env for wgpu 2021-06-04 00:08:02 +03:00
CHANGELOG.md NPC Hitbox Adjustments 2021-06-09 08:08:41 +00:00
CONTRIBUTING.md Add CONTRIBUTING 2019-05-17 01:34:07 +00:00
flake.lock chore(deps): update nix flake deps 2021-06-03 23:33:13 +03:00
flake.nix chore(deps): update nix flake deps 2021-05-04 11:57:14 +03:00
LICENSE Update Veloren license year 2020-05-22 08:05:10 -04:00
README.md DO no longer sponsors us in 2021 2021-05-10 23:29:13 +02:00
rust-toolchain Update toolchain 2021-05-31 20:44:57 -04:00

Veloren logo on a screenshot

pipeline status coverage report license discord lines of code contributor count

Welcome To Veloren!

Veloren is a multiplayer voxel RPG written in Rust. Veloren takes inspiration from games such as Cube World, Minecraft and Dwarf Fortress. The game is currently under heavy development, but is playable.

Development

Currently the communication of contributors happens mainly on our official Discord server. You can join it to keep up with the development, talk to us or contribute something yourself. Anyone who shows genuine effort to help is welcome in our team. You don't have to know how to program to contribute!

Sign Up - Here you can create an online account for Veloren. This will be needed to play on auth-enabled servers, including the official server.

The Book - A collection of all important information relating to Veloren. It includes information on how to compile Veloren and how to contribute.

Future Plans - Go here for information about Veloren's development roadmap and what we're currently working on.

Official social media and websites

Get Veloren

We provide 64-bit builds for Linux, Mac, and Windows, which can be downloaded on the official website: https://www.veloren.net

Due to rapid development stable versions become outdated fast and might be incompatible with the public server.

If you want to compile Veloren yourself, follow the instructions in our Book.

F.A.Q.

Q: How is this game licensed?

A: It's free to play, modify and distribute. Forever. Since it is a community project, we decided to license it under the GNU GPL 3.0 license which means it will always stay free and open source.

Q: What platforms are supported?

A: Veloren can run on Windows, Linux and Mac OS on all architectures (although x86_64 is our main focus). It's probably possible to compile Veloren on/for BSD, Fuchsia and others as well.

Q: Do you accept donations?

A: You can support the project on our OpenCollective Page.

Credit

Many thanks to everyone that has contributed to Veloren's development, provided ideas, crafted art, composed music, hunted bugs, created tools and supported the project.