Commit Graph

9232 Commits

Author SHA1 Message Date
juliancoffee
171c66d53d docs 2021-06-09 15:37:04 +03:00
juliancoffee
f5bf991eb0 Start to load EntityInfo from assets in dungeons
* All enemies in dungeons are now specify loadout_config, name and
main_tool in assets
* Add more variance to the enemies names
2021-06-09 15:37:04 +03:00
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
juliancoffee
aad65c6159 Move traveler loadout declaration to asset
* New loadout/world/traveler.ron file to specify traveler loadout
* LoadoutBuilder::with_asset_expect now can use passed rng to choose
items
2021-06-09 15:37:03 +03:00
juliancoffee
e153cbe20e Rename LoadoutBuilder::apply_asset_expect
to LoadoutBuilder::with_asset_expect
2021-06-09 15:37:03 +03:00
juliancoffee
102f6d3338 EntityInfo assetization
* Rename skillset_config to skillset_preset
* Rename loadout_config to loadout_preset
* Add skillset_config for asset_specifier of skillset
* Add loadout_config for asset_specifier of loadout
2021-06-09 15:37:03 +03:00
juliancoffee
e832fa86f1 Add entity template and make 'loadouts' singular 2021-06-09 15:37:03 +03:00
Dr. Dystopia
cead9a019b Extract 'create_new_text' function from 'update' 2021-06-09 13:35:41 +02:00
Dr. Dystopia
e31cb062a2 Extract 'get_duration_image' function from 'update' 2021-06-09 13:09:31 +02:00
Marcel
875b26a93a Merge branch 'aweinstock/recipe-graphviz' into 'master'
Add graphviz diagram generator for crafting recipes.

See merge request veloren/veloren!2401
2021-06-09 09:14:13 +00:00
Marcel
ee5d55f773 Merge branch 'swilliams/collision-balance' into 'master'
NPC Hitbox Adjustments

See merge request veloren/veloren!2403
2021-06-09 08:08:44 +00:00
Scott Williams
2a161abd0a NPC Hitbox Adjustments 2021-06-09 08:08:41 +00:00
Marcel
8a599a37d8 Merge branch 'slipped/smallfixes' into 'master'
small tweaks

See merge request veloren/veloren!2405
2021-06-09 07:39:01 +00:00
jshipsey
7cb5323eb6 small tweaks
t
2021-06-09 01:58:08 -04:00
Forest Anderson
e6493fbb2f Merge branch 'sam/minotaur-anim-fix' into 'master'
Minotaur Anim Fix

See merge request veloren/veloren!2404
2021-06-09 01:59:54 +00:00
Sam
a5aef59ac5 Fix 2021-06-08 20:12:42 -05:00
Marcel
d16fcbc410 Merge branch 'juliancoffee/asset_tweak_fix' into 'master'
serialize AssetTweakWrapper<T>, not just T

See merge request veloren/veloren!2402
2021-06-08 22:39:55 +00:00
juliancoffee
44e4fd874f add asset_tweaks to unittests on CI 2021-06-08 23:00:59 +03:00
juliancoffee
1dd621a56f serialize AssetTweakWrapper<T>, not just T
asset_tweak::tweak_expect_or_create works by writing default data to
file and then read it as asset.
the problem is that it was writing T, and read AssetTweakWrapper<T>
which are different types.

Tests didn't handle case when you will load data back so bug was hidden.
2021-06-08 22:39:51 +03:00
Avi Weinstock
b5ae6227c0 Run clippy for graphviz target in CI and add instructions on how to consume the output. 2021-06-08 15:08:14 -04:00
Avi Weinstock
b5b7de9532 Add graphviz diagram generator for crafting recipes. 2021-06-08 14:42:51 -04:00
Marcel
08862a1ebd Merge branch 'xMAC94x/todo' into 'master'
add todo for clippy exception

See merge request veloren/veloren!2400
2021-06-08 14:24:41 +00:00
Marcel Märtens
37c508d05d add todo for clippy exception 2021-06-08 15:45:46 +02:00
Marcel
dc4bd0de75 Merge branch 'juliancoffee/asset_tweak' into 'master'
tweak_expect function to tweak values from .ron

See merge request veloren/veloren!2391
2021-06-08 11:37:01 +00:00
juliancoffee
cb7a41c72d put serde behind feature gate 2021-06-08 14:03:15 +03:00
juliancoffee
df2c3a4950 Fix find_root() search in case if .git isn't dir 2021-06-08 13:34:46 +03:00
juliancoffee
8f86f474e8 place asset_tweak behind a feature 2021-06-08 13:34:41 +03:00
juliancoffee
3c34301947 More tests, support only assets/tweak directory
- Use `serial_test` because tests can't run in parallel as both of them
are accessing fs.
- Take only filename, use hardcoded `assets/tweak` to keep it simple and
support .gitignore
2021-06-08 13:31:27 +03:00
juliancoffee
832a7d89f4 add assets/tweak directory to .gitignore 2021-06-08 13:31:27 +03:00
juliancoffee
7533f4d17b add asset_tweak_or_create that will create file 2021-06-08 13:31:27 +03:00
juliancoffee
8a157b8410 New tweak_expect fn to tweak values from .ron
- Function to tweak values via temporary hot-reloaded .ron files
2021-06-08 13:31:27 +03:00
Marcel
39ea9d3aa3 Merge branch 'xMAC94x/ci_bin_features' into 'master'
Add bot tests to CI

See merge request veloren/veloren!2326
2021-06-08 10:04:17 +00:00
Marcel
eecb561838 Merge branch 'slipped/meatfollowup' into 'master'
various fixes to items

See merge request veloren/veloren!2399
2021-06-08 09:57:31 +00:00
Christof Petig
b3956517fc suppress recipes with no cost 2021-06-08 09:17:04 +02:00
jshipsey
fe1cbec37c various fixes to items 2021-06-07 21:21:12 -04:00
Marcel
d9f3789079 Merge branch 'aweinstock/unghost-ships' into 'master'
Restore collision data for airships, and add the test that would have caught this.

See merge request veloren/veloren!2397
2021-06-07 23:25:19 +00:00
Marcel
3077e539eb Merge branch 'christof/spinning_flax' into 'master'
Enable spinning flax (recipe got overwritten by linen from linen items)

See merge request veloren/veloren!2396
2021-06-07 22:43:17 +00:00
Avi Weinstock
3cbf84ddb1 Restore collision data for airships, and add the test that would have caught this. 2021-06-07 18:09:09 -04:00
Christof Petig
c0f952030c Enable spinning flax (recipe got overwritten by linen from linen items) 2021-06-07 23:40:25 +02:00
Marcel
4147665cbb Merge branch 'imbris/fix-dockerfile' into 'master'
Require all commands to succeed in server-cli Dockerfile

See merge request veloren/veloren!2394
2021-06-07 21:05:09 +00:00
Imbris
df16c20eb4 Require all commands to succeed in server-cli Dockerfile 2021-06-07 13:31:01 -04:00
Marcel
7e8bebdfa1 Merge branch 'xMAC94x/hashbrown' into 'master'
switch to hashbrown 0.11 and specs 0.16.2

See merge request veloren/veloren!2390
2021-06-07 14:31:58 +00:00
Marcel
32336be160 Merge branch 'fix' into 'master'
mig fix

See merge request veloren/veloren!2393
2021-06-07 13:59:57 +00:00
Marcel
a02f4bea18 Merge branch 'pfau/icon_shading' into 'master'
better icon shading

See merge request veloren/veloren!2392
2021-06-07 12:56:49 +00:00
jshipsey
acf9111141 mig fix 2021-06-07 08:32:59 -04:00
Monty
dd0368eed4 3d icon shading 2021-06-07 14:27:49 +02:00
Marcel Märtens
7185dcee68 switch to hashbrown 0.11 and specs 0.16.2 2021-06-07 13:01:01 +02:00
Marcel Märtens
846df3a18a --all-targets does not run targets that needs some features which are not provided. --all-features is NOT possible as we have some features which are conflicting.
The only possibility is to manually add the features we need to check in CI to the clippy query
2021-06-07 12:29:08 +02:00
Marcel
f2eedf81f4 Merge branch 'imbris/648-cleanup' into 'master'
Make handling of shortcut keywords for commands clearer and revise a TODO...

Closes #648

See merge request veloren/veloren!2387
2021-06-07 10:27:54 +00:00
Marcel
19c1ba47ad Merge branch 'xMAC94x/fix_swedish' into 'master'
fix swedish ron files

See merge request veloren/veloren!2389
2021-06-07 10:06:16 +00:00