Commit Graph

756 Commits

Author SHA1 Message Date
Sam
a9e9a70687 Changed ModularComponent to allow it to be more extensible. Overhauled random modular weapon function so that there is less runtime cost to generate one. NO ASSETS 2022-05-16 15:11:11 -04:00
Sam
b048179c0a Changed Item to have ItemBase instead of ItemDef. ONLY ASSETS. 2022-05-16 15:11:11 -04:00
Sam
08b7bb781f Changed Item to have ItemBase instead of ItemDef. NO ASSETS. 2022-05-16 15:11:10 -04:00
Sam
e9885140c3 Client method added for modular weapon crafting. 2022-05-16 15:11:04 -04:00
IsseW
fb7aa07b01 site command completion 2022-05-15 23:57:21 +02:00
Marcel Märtens
efe284a673 make the client request a few more chunks to compensate for the delay in serialisation 2022-05-11 20:22:24 +02:00
Joshua Barretto
01e1cb34b0 Fixed minor LoD issues 2022-05-11 15:00:44 +01:00
Joshua Barretto
894e94bb2c Made 0 LoD distance not load anything 2022-05-11 13:07:57 +01:00
Joshua Barretto
f35c98d1a1 Added LoD distance setting 2022-05-10 12:40:06 +01:00
Joshua Barretto
1db7cc7fde LoD trees in snow are white 2022-05-10 12:38:36 +01:00
Joshua Barretto
b3126ca687 Initial implementation of LoD trees 2022-05-10 12:38:36 +01:00
Marcel Märtens
697673bcca update toolchain to nightly-2022-04-25 2022-05-03 15:22:28 +02:00
Marcel Märtens
fa49248c31 switch to upstream vek again 2022-04-28 09:10:55 +02:00
Marcel Märtens
affdf3131f update a bunch of dependencies, including clap3 2022-04-04 11:43:29 +02:00
Marcel
d05cb99007 Merge branch 'unvariant/trading_fix' into 'master'
prevent glider and sneak from triggering during trade

See merge request veloren/veloren!3264
2022-03-08 10:25:16 +00:00
ninefox
115b2875b3 prevent glider and sneak from triggering during trade 2022-03-07 20:28:38 -08:00
Imbris
e52159f638 Remove original character from game world when possessing to make persistence more robust. 2022-02-27 13:47:13 -05:00
Imbris
10803a9735 Stop using Character presence kind when possessing so that persistence doesn't get messed up. 2022-02-27 13:47:12 -05:00
Imbris
6f9ff17ce8 Properly handle cleanup of old entity controller during possession on both the client and server sides 2022-02-27 13:47:12 -05:00
Marcel
df7cd2da1a Merge branch 'isse/shared-waypoints' into 'master'
Shared and persistent waypoints

See merge request veloren/veloren!3162
2022-02-20 10:10:18 +00:00
Isidor Nielsen
a685a353cb Shared and persistent waypoints 2022-02-20 10:10:18 +00:00
Marcel Märtens
802b9e7914 Change the version number to 0.12 2022-02-18 22:36:53 +01:00
Samuel Keiffer
d89edc9357 Merge branch 'tygyh/Extract-controller-functions' into 'master'
Tygyh/extract controller functions

See merge request veloren/veloren!3151
2022-01-26 22:36:36 +00:00
Dr. Dystopia
bc0a8c7704 Create 'push_action' function 2022-01-26 19:52:19 +01:00
juliancoffee
fba89517de Move Veloren to 2021 edition 2022-01-26 16:46:40 +02:00
Joshua Barretto
043016a433 Don't try to mount unmountable entities, clippy fixes and fmt 2022-01-16 17:53:14 +00:00
Joshua Barretto
b3e2d825ed Overhauled mounting to make it more reliable 2022-01-16 17:53:13 +00:00
threadexception
3f5c9dcd13 Fix issue with chat after char selection 2022-01-16 17:22:55 +01:00
Sam
d86692c4fe Added in-memory persistence of ability sets per weapon kind pair. 2022-01-15 21:42:34 -05:00
Sam
efbc5f9b75 UI notifying player that their skillset has been invalidated. 2022-01-03 19:55:06 -05:00
Sam
27dd7b4391 Refactored skills code. 2022-01-03 19:55:01 -05:00
Imbris
e136e606a5 suppress clippy false positive, fmt 2021-12-26 14:40:50 -05:00
Imbris
b255f0ee0f put Client::tick_network function behind feature, remove unnecessary cloning of deleted entity vecs in entity sync, move prepare_send hack that avoids locking during message serialization from send_fallible to send, add job.cpu_status par mode adjustment around parallel section 2021-12-26 12:04:08 -05:00
Imbris
9788b144ec Decrease swarm movement speed 2021-12-25 19:24:12 -05:00
Imbris
6023670467 Improvements to swarm clients: space properly for the unclustered case so that regions don't overlap, advance time manually within Client::tick_network since State::tick isn't being called 2021-12-25 19:24:12 -05:00
Imbris
027f2f5719 Setup client binary that connects to the server with a group of clients positioned and moving in a few different patterns for profiling the server under network load. 2021-12-25 18:14:39 -05:00
Joshua Barretto
e3203080ed Added Calendar for temporal events based on the real-world calendar 2021-12-20 18:03:52 +00:00
Dr. Dystopia
3a52599e49 Clean up 2021-12-15 21:55:53 +01:00
Joshua Barretto
dd95d69dc4 Fixed character editing 2021-12-13 00:55:25 +00:00
Dr. Dystopia
408fe1e6b6 Begin creating character editing 2021-12-13 01:13:33 +01:00
Marcel Märtens
ef40ebe0c8 update toolchain to nightly-2021-11-24 2021-11-24 10:09:22 +01:00
Marcel Märtens
aa93b4b53c update other binaries 2021-11-20 20:19:48 +01:00
Marcel Märtens
e29ede7c97 updating dependencies,
cannot update the following dependencies:
 - vek: Sharps SIMD isnt upstream
 - tracing-subscriber: MakeWriter was adjusted and i was to lazy to fiddle with lifetimes,
 - refinery, rustsql: we have a custom refinery version which is incompatible with newer rustsql
 - equi + egui_winit + egui_wgpu_backend: i tried it in this commit but it turned out that they dependo n wgpu which we cant update
 - wgpu: cant update due new version doesnt support DX11

Got quinn updated which now require some dependencies to be explicit.
2021-11-20 20:17:49 +01:00
Sam
dfcb8c8519 Addressed review feedback. 2021-11-11 18:10:22 -05:00
Sam
b678f7f46e Added some client methods for changing abilities to hook into. 2021-11-11 01:55:32 -05:00
Sam
fbd742abdb Changed crafting to only consume items after checking that the crafting would be successful instead of consuming items first and reinserting on failure. 2021-10-27 17:02:36 -04:00
Sam
e28ca15059 Salvaging now requires a salvaging station. 2021-10-27 17:02:33 -04:00
Sam
794b072d3e Simple recipes now take a vec of slots to look in for the ingredients. 2021-10-27 17:02:30 -04:00
Sam
7a17863988 Salvage works by double clicking from inventory while salvage tab in crafting is open. 2021-10-27 17:02:30 -04:00
Sam
ed5cf8ebf9 Backend stuff for salvaging. 2021-10-27 17:02:29 -04:00
Bryant Deters
b2bd43f4d3 Sneak with weapons drawn 2021-10-18 14:53:55 -05:00
Marcel Märtens
88685cc016 update crates 2021-09-20 14:39:01 +02:00
Marcel Märtens
7913e6a9ba Change the version number to 0.11 2021-09-10 20:19:17 +02:00
Sam
538cb56b87 Sprites now go through a character state to be picked up. 2021-08-31 13:36:04 -04:00
Ludvig Böklin
400734cc0a Fix gliderwield downhill run jitter 2021-08-01 11:20:46 +00:00
Monty Marz
14eb0f9aa2 Remove sceptre, add swords 2021-07-29 22:38:35 +00:00
James Melkonian
54eb97b9de Reduce number of map layers and remove unneeded alpha channel 2021-07-24 19:54:40 -07:00
Dr. Dystopia
04700982d3 Resolve unused '#[allow(clippy::option_map_unit_fn)]' error supressions 2021-07-24 20:35:13 +02:00
Dr. Dystopia
70d0840e96 Resolve unused '#[allow(clippy::unnecessary_wraps)]' error supressions 2021-07-24 20:14:26 +02:00
Marcel Märtens
468cfe84e7 clippy fixes in tests 2021-07-12 13:35:26 +02:00
Marcel Märtens
9b3b21f368 fix clippy warnings 2021-07-12 12:09:09 +02:00
Sam
04e8138b60 Fix test 2021-07-06 15:49:57 -05:00
Ben Wallis
b499cf2c58 Added egui debug UI - a 100% rust UI framework (similar to imgui) allowing for rapid development of debug interfaces to aid development. This is feature-gated behind the egui-ui feature which is enabled by default but removed for airshipper builds.
Included in the initial implementation is an entity browser which lists all entities in the client ECS, an entity component viewer which shows select components belonging to the selected entity including character state information, and a simple frame time graph.

This MR also includes an extraction of the animation hot reloading code which has been reused for egui to allow for hot-reloading of the egui interface to allow rapid development of the UI with realtime feedback upon save as is the case with aninmations. This is feature-gated behind the `hot-egui` feature which is not enabled by default due to the extra startup time that it adds.
2021-07-04 09:47:18 +00:00
Avi Weinstock
c2106e158f Use approximate byte count for the terrain recv graph. 2021-07-02 12:43:34 -04:00
Avi Weinstock
6ba512efc8 Add some tracy plots about network usage to the client. 2021-07-02 12:40:52 -04:00
Jonathan Berglin
85285f9b8e Tygyh/bot main refactor 2021-07-01 15:59:05 +00:00
Imbris
315ab872f5 add prof_span to hud elements 2021-06-19 04:27:51 -04:00
Imbris
659b42e813 Remove tracy features that are no longer needed now that macros have been fixed 2021-06-19 04:27:50 -04:00
Imbris
044b2316a6 Eliminate strange wait time of ~1 ms during message handling on the
client where nothing seemed to be occuring
2021-06-19 04:27:50 -04:00
Imbris
2bb91e8d7d Fix span macros by putting cfgs outside the macro (they are evaluated in the crate where the macro is used), add shorthand for common case of prof_span macro, add some spans to the client code and spiff bits of it 2021-06-19 04:27:50 -04:00
Joshua Barretto
96cbf60c3f Made commands a distinct ClientMsg to avoid possible sanitisation problems for clients 2021-06-17 19:55:21 +01:00
Joshua Barretto
b8749dc219 Added more cow noises, prepare for merge 2021-06-16 17:23:54 +01:00
Marcel Märtens
4167621f5d Change the version number to 0.10 2021-06-12 10:14:07 +02: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 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
Imbris
0b92c72096 Make handling of shortcut keywords for commands clearer and revise a TODO related to how chat messages are stored and renamed with alias changes 2021-06-06 23:45:51 -04:00
Marcel
f988584337 Merge branch 'revert-c6e200a3' into 'master'
Add a configuration Option to opt-in Quic backend

See merge request veloren/veloren!2318
2021-06-02 14:27:13 +00:00
hqurve
854930bc1a Item pickups are shown in separate window and "inventory-full" messages are shown above the item attempted to be picked up 2021-05-22 20:47:08 +00:00
Marcel Märtens
cf3188b412 remove Protocol from Quic, cleanup code, fix some log spam 2021-05-21 10:41:19 +02:00
Marcel
99304ffddd Revert "Merge branch 'sharp/revert-quinn' into 'master'"
This reverts merge request !2315
2021-05-21 10:41:16 +02:00
Ludvig Böklin
fe186fb44d Code quality 2021-05-20 10:46:39 +02:00
Joshua Yanovski
3679cb75bc Revert "Merge branch 'xMAC94x/quic_enablement' into 'master'"
This reverts commit 04d8ddf25e, reversing
changes made to 9dcf7a9d26.
2021-05-17 08:32:12 -07:00
Marcel
04d8ddf25e Merge branch 'xMAC94x/quic_enablement' into 'master'
Add a configuration Option to opt-in Quic backend

See merge request veloren/veloren!2268
2021-05-17 12:02:55 +00:00
James Melkonian
f76b61ac17 Make merchants /tell instead of /say 2021-05-11 17:26:22 +00:00
Marcel Märtens
9e357dfa0c remove ViewDistance from Client::new() and fix tests 2021-05-10 12:59:49 +02:00
Marcel Märtens
2ea5fd876b cleanup error codes 2021-05-10 12:59:44 +02:00
Marcel Märtens
b443e4dd31 Add Quin support, as this is not yet very much tested it needs to be activated in the settings of SERVER and CLIENT.
Server:
 provide a certificate file and key file via the settings. When provided it will then listen on TCP and QUIC, if not provided it will be TCP only.
 The certificate must be known by the client, so you might get problems with self-signed certificates.
 ```ron
 quic_files: Some((
     cert: "/home/user/veloren_cert.pem",
     key: "/home/user/veloren_key.key",
 )),
 ```

Client:
 activate the voxygen settin `use_quic: true` to try to connect to the quic backend of a server.
2021-05-10 12:59:13 +02:00
Joshua Yanovski
e7587c4d9d Added non-admin moderators and timed bans.
The security model has been updated to reflect this change (for example,
moderators cannot revert a ban by an administrator).  Ban history is
also now recorded in the ban file, and much more information about the
ban is stored (whitelists and administrators also have extra
information).

To support the new information without losing important information,
this commit also introduces a new migration path for editable settings
(both from legacy to the new format, and between versions).  Examples
of how to do this correctly, and migrate to new versions of a settings
file, are in the settings/ subdirectory.

As part of this effort, editable settings have been revamped to
guarantee atomic saves (due to the increased amount of information in
each file), some latent bugs in networking were fixed, and server-cli
has been updated to go through StructOpt for both calls through TUI
and argv, greatly simplifying parsing logic.
2021-05-09 21:19:16 -07:00
Marcel Märtens
68d326c817 revert Client drop to be correct again and also stop network properly, reduce timeout to 10s 2021-05-04 22:34:19 +02:00
Marcel
3c16966721 Merge branch 'xMAC94x/quic' into 'master'
Cleanup network, remove some unwraps, add experimental (disabled) Quic support

See merge request veloren/veloren!2221
2021-05-04 00:16:05 +00:00
Illia Denysenko
f04a4f907a Add possibility to translate buff outcomes 2021-05-03 23:02:59 +00:00
Avi Weinstock
be39054767 Make terrain compression a checkbox instead of a bandwidth (throughput?) heuristic. 2021-05-03 00:09:44 -04:00
Avi Weinstock
f81539cb00 Get PngPngPngJpeg terrain working in the actual game. 2021-05-03 00:09:24 -04:00
James Melkonian
f553700e8c Add map markers for lakes and mountains 2021-05-03 02:00:23 +00:00
Marcel Märtens
760c382ed9 protocoladdr change for listen and connect
(remove a loop in quic protocol which wasnt a actual loop)
2021-04-29 15:58:34 +02:00
Ben Wallis
c16bf51ab2 Merge branch 'xvar/reduce-timeofday-sync-frequency' into 'master'
Reduced frequency of TimeOfDay message being sent to clients

See merge request veloren/veloren!2218
2021-04-29 13:50:08 +00:00
Ben Wallis
3c20e8ed4e Reduced sync of TimeOfDay to once per 100 ticks 2021-04-29 12:34:27 +01:00
DaforLynx
2e0272ce28 Town music 2021-04-28 05:07:59 +00:00
Ludvig Böklin
34660462e9 Glider physics 2021-04-27 14:41:48 +00:00
Ben Wallis
c6205875ee Merge branch 'xvar/server-version-check' into 'master'
Added client/server version mismatch warnings

See merge request veloren/veloren!2184
2021-04-24 09:05:45 +00:00
Ben Wallis
2e08c2f76f Added client/server version mismatch message when a network error is encountered during client init.
Added warning banner on character select when successfully connected to a server with a mismatched version.
2021-04-24 09:08:30 +01:00
Imbris
1af4a04231 Revert "Merge branch 'revert-b10718c5' into 'master'"
This reverts merge request !2172
2021-04-21 17:10:13 +00:00
Imbris
fd672980c4 Revert "Merge branch 'imbris/agent-opt' into 'master'"
This reverts merge request !2024
2021-04-21 14:10:06 +00:00
Avi Weinstock
308ad4d81e Cleanup errors introduced in rebase. 2021-04-20 23:34:17 -04:00
Avi Weinstock
15e32e5655 Move terrain compression code to common_net and disable redundant LZ4 compression on the terrain stream. 2021-04-20 23:24:24 -04:00
Avi Weinstock
6d9de520f3 Compress terrain chunks with deflate. Includes a benchmark showing that this makes them around 70% smaller, and is the same speed as LZ4. 2021-04-20 23:23:53 -04:00
Imbris
e17477979f Remove extra chunk cloning and parallelize serialization in the server terrain sys 2021-04-20 15:25:05 -04:00
Imbris
26222a0a2d Rename common-sys to common-systems and rearrange common-state slightly 2021-04-20 15:25:04 -04:00
Joshua Barretto
36e95e0c03 Cleaned up client-side recipe handling 2021-04-20 12:33:22 +01:00
Monty Marz
abacdfc719 clippy 2021-04-20 02:48:17 +02:00
Monty
a1fe7c12c3 fmt, add sprites 2021-04-20 02:46:04 +02:00
Joshua Barretto
5598d07944 Added crafting stations 2021-04-20 02:45:59 +02:00
Marcel Märtens
7348e399e0 only have 1 Fn passed to tick fn 2021-04-20 01:49:45 +02:00
Marcel Märtens
5862920f32 seperate sys/state 2021-04-20 01:30:17 +02:00
Ben Wallis
a4cdb89987 Implemented inventory sorting 2021-04-17 22:04:08 +01:00
Avi Weinstock
50d0314a75 Add a toggle to negotiate the use of server-authoritative physics. 2021-04-15 08:50:17 -04:00
Joshua Yanovski
af94753ad9 Remove panics and unwraps, part 1.
Also fixes various other miscellaneous bugs.
2021-04-10 10:03:21 +02:00
James Melkonian
16871208f2 Add topographic option to map 2021-04-06 09:16:17 -07:00
James Melkonian
f2ebbb7f7f Map icon scaling 2021-04-06 08:42:09 -07:00
James Melkonian
8ee1fc4a0f Add layers to minimap 2021-04-06 08:42:08 -07:00
James Melkonian
bacda06dba Added map layers 2021-04-06 08:42:07 -07:00
James Melkonian
70ede7f34d Topographic map 2021-04-06 08:42:06 -07:00
1b15
f8009e5d1c fixed auth server URL 2021-04-05 14:15:57 +00:00
Marcel Märtens
ccb78eeb5c move tracing code to own crate 2021-03-30 16:35:36 +02:00
Joshua Barretto
b0acbda236 Improved archery with feedback sfx and particles 2021-03-29 21:52:04 +01:00
Joshua Barretto
5bf17779ec Updated changelog, fmt 2021-03-28 18:07:01 +01:00
Joshua Barretto
d53042c852 Client-side time of day interpolation 2021-03-28 17:01:53 +01:00
Sam
f117a57083 Switched to using ForceUpdate to forcefully update the client position after a blink 2021-03-27 21:33:45 -04:00
Sam
30da614e89 Added dimensional door ability for mindflayer 2021-03-27 21:05:05 -04:00
Marcel
da5c73c84b Merge branch 'refactor-login' into 'master'
refactor handling of duplicate login #1015

Closes #1015

See merge request veloren/veloren!1992
2021-03-27 13:49:09 +00:00
aljazerzen
0ea102dc9c refactor handling of duplicate login 2021-03-25 12:33:56 +01:00
Avi Weinstock
8d90548331 Get SitePricing information to clients, and use it to display coin-denominated prices in voxygen on tooltips during a trade. Also boost merchant spawn rate slightly. 2021-03-25 02:11:58 -04:00
heydabop
0e3f7625a9 Fix #962 - kick old client and add new client on duplicate login 2021-03-22 19:15:24 -05:00
Marcel Märtens
6b23101fac update toolchain to nightly-2021-03-22 2021-03-22 16:41:04 +01:00
Joshua Barretto
347e1022a0 Initial implementation of pickaxe 2021-03-21 16:09:16 +00:00
Marcel Märtens
2733ba2e27 Change the version number to 0.9 2021-03-20 13:07:09 +01:00
Avi Weinstock
0ef42e3854 Address MR 1945 review comments. 2021-03-19 19:53:17 -04:00
Avi Weinstock
03d0748d40 Set PlayerEntity in Client::clean_state. This fixes several issues where interpolation would kick in after changing characters, causing the player to be locked in place or shoot into the sky on respawn or teleport. 2021-03-19 19:02:39 -04:00
Marcel Märtens
b534282dcc fix ci 2021-03-16 23:31:40 +01:00
Marcel Märtens
d7f400f682 bots: add option to join the world via ingame cmd 2021-03-16 18:45:42 +01:00
James Melkonian
6ea43cfd75 Various RtSim and Agent Interaction Fixes 2021-03-16 01:30:35 +00:00
Marcel
5b21ee7200 Merge branch 'aweinstock/airship-mvp-rebased' into 'master'
Airships

See merge request veloren/veloren!1888
2021-03-15 11:37:12 +00:00
Forest Anderson
0049976da9 Merge branch 'aweinstock/tradefixes-20210314' into 'master'
Client-side trade fixes: update recipe cache and always put client on the same...

See merge request veloren/veloren!1904
2021-03-15 04:52:09 +00:00
Avi Weinstock
546ee48073 Fix interpolation for possession, and make the mount point of airships above their deck. 2021-03-14 23:21:45 -04:00
Avi Weinstock
dad0012973 Get linear interpolation working for {Pos,Vel,Ori} with client-side timestamps. 2021-03-14 23:20:48 -04:00
Avi Weinstock
95992ead4d Client-side trade fixes: update recipe cache and always put client on the same side of the screen as their inventory. 2021-03-14 21:41:47 -04:00
Marcel
5570b57282 Merge branch 'sam/yeet-inputs' into 'master'
Reworked Controller Inputs to use Control Actions

See merge request veloren/veloren!1900
2021-03-15 01:32:02 +00:00
Sam
21e6f4797c Primary ability fully functional. 2021-03-14 17:26:53 -04:00
Sam
19c81f1528 Support for canceling an input. Boost state hooked up to system. 2021-03-14 17:26:52 -04:00
Sam
c6d8daaae3 Primary input now activated from control actions.
Moved a lot of key_state to a HashSet so that it is handled automatically.
2021-03-14 17:26:51 -04:00
Imbris
de14e5bc5e to squash 2021-03-14 17:13:00 +00:00
Imbris
93e33eed25 Keep connection alive while waiting for initial sync 2021-03-14 17:11:44 +00:00
Christof Petig
15b11d9154 Implement /price_list (work in progress), stub for /buy and /sell
remove outdated economic simulation code

remove old values, document

add natural resources to economy

Remove NaturalResources from Place (now in Economy)

find closest site to each chunk

implement natural resources (the distance scale is wrong)

cargo fmt

working distance calculation

this collection of natural resources seem to make sense, too much Wheat though

use natural resources and controlled area to replenish goods

increase the amount of chunks controlled by one guard to 50

add new professions and goods to the list

implement multiple products per worker

remove the old code and rename the new code to the previous name

correctly determine which goods guards will give you access to

correctly estimate the amount of natural resources controlled

adapt to new server API

instrument tooltips

Now I just need to figure out how to store a (reference to) a closure

closures for tooltip content generation

pass site/cave id to the client

Add economic information to the client structure
(not yet exchanged with the server)

Send SiteId to the client, prepare messages for economy request
Make client::sites a HashMap

Specialize the Crafter into Brewer,Bladesmith and Blacksmith

working server request for economic info from within tooltip

fully operational economic tooltips
I need to fix the id clash between caves and towns though

fix overlapping ids between caves and sites

display stock amount

correctly handle invalid (cave) ids in the request

some initial balancing, turn off most info logging

less intrusive way of implementing the dynamic tool tips in map

further tooltip cleanup

further cleanup, dynamic tooltip not fully working as intended

correctly working tooltip visibility logic

cleanup, display labor value

separate economy info request in a separate translation unit

display values as well

nicer display format for economy

add last_exports and coin to the new economy

do not allocate natural resources to Dungeons (making town so much larger)

balancing attempt

print town size statistics

cargo fmt (dead code)

resource tweaks, csv debugging

output a more interesting town (and then all sites)

fix the labor value logic (now we have meaningful prices)

load professions from ron (WIP)

use assets manager in economy

loading professions works

use professions from ron file

fix Labor debug logic

count chunks per type separately
(preparing for better resource control)

better structured resource data

traders, more professions (WIP)

fix exception when starting the simulation

fix replenish function
TODO:
- use area_ratio for resource usage (chunks should be added to stock, ratio on usage?)
- fix trading

documentation clean up

fix merge artifact

Revise trader mechanic

start Coin with a reasonable default

remove the outdated economy code

preserve documentation from removed old structure

output neighboring sites (preparation)

pass list of neighbors to economy

add trade structures

trading stub

Description of purpose by zesterer on Discord

remember prices (needed for planning)

avoid growing the order vector unboundedly

into_iter doesn't clear the Vec, so clear it manually

use drain to process Vecs, avoid clone

fix the test server

implement a test stub (I need to get it faster than 30 seconds to be more useful)

enable info output in test

debug missing and extra goods

use the same logging extension as water, activate feature

update dependencies

determine good prices, good exchange goods

a working set of revisions

a cozy world which economy tests in 2s

first order planning version

fun with package version

buy according to value/priority, not missing amount

introduce min price constant, fix order priority

in depth debugging

with a correct sign the trading plans start to make sense

move the trade planning to a separate function

rename new function

reorganize code into subroutines (much cleaner)

each trading step now has its own function

cut down the number of debugging output

introduce RoadSecurity and Transportation

transport capacity bookkeeping

only plan to pay with valuable goods, you can no longer stockpile unused options
(which interestingly shows a huge impact, to be investigated)

Coin is now listed as a payment (although not used)

proper transportation estimation (although 0)

remove more left overs uncovered by viewing the code in a merge request

use the old default values, handle non-pileable stocks directly before increasing it
(as economy is based on last year's products)

don't order the missing good multiple times
also it uses coin to buy things!

fix warnings and use the transportation from stock again

cargo fmt

prepare evaluation of trade

don't count transportation multiple times

fix merge artifact

operational trade planning
trade itself is still misleading

make clippy happy

clean up

correct labor ratio of merchants (no need to multiply with amount produced)

incomplete merchant labor_value computation

correct last commit

make economy of scale more explicit

make clippy happy (and code cleaner)

more merchant tweaks (more pop=better)

beginning of real trading code

revert the update of dependencies

remove stale comments/unused code

trading implementation complete (but untested)

something is still strange ...

fix sign in trading

another sign fix

some bugfixes and plenty of debugging code

another bug fixed, more to go

fix another invariant (rounding will lead to very small negative value)

introduce Terrain and Territory

fix merge mistakes
2021-03-14 03:18:32 +00:00
Imbris
0127832172 Fix tracy not working in certain areas, add span to chunk gen, missing fmt, remove extra span, make voxygen use INFO level instead of TRACE in tracy mode 2021-03-13 13:30:20 -05:00
Marcel Märtens
c1d6b1ac75 handle ticks in a seperate thread that tui on botclient 2021-03-12 11:08:24 +01:00
Marcel Märtens
e001b2cac2 move botclient to client/src/bin/bot
start it with:
 - (cd client && RUST_BACKTRACE=full RUST_LOG=trace VELOREN_USERDATA_STRATEGY=executable cargo run --bin bot --features="bin_bot")
2021-03-12 09:28:24 +01:00
Avi Weinstock
7301182695 Draft of botclient. 2021-03-12 09:28:21 +01:00
Marcel Märtens
728bff610b Allow HTTP auth servers again.
only `localhost` are allowed in a release build.
 when debug assertions are on, others are also allowed.

This change undoes the changes to the settings, so compared to master, there is no effect
2021-03-11 17:24:52 +01:00
Marcel Märtens
a98e72c391 Auth requests are now done async, the register system is fetching it, via a PendingLogin component
The auth server no longer allows the protocol to be specified. we enforce `https` for the auth server, so DO NOT provide a auth url with `https://` but without.
correct is now `auth.veloren.net`
incorrect is: `https://auth.veloren.net`
2021-03-11 17:05:02 +01:00
Marcel Märtens
f8b7d96066 git push -fTransport ChunkRequests and Chunkupdates in a own stream. ChunkUpdates are very big and having them in a own stream, helps slow clients to keep up with entity syncs and
lagging a bit behind on terrain. Which is fine. Block Places and Block Pickup are not handled in this stream, as they go through the standart route of event handling.
2021-03-11 14:50:46 +01:00
Marcel Märtens
b151a246c3 update specs to get rid of old deps 2021-03-10 13:22:17 +01:00
Marcel Märtens
d7df741671 update dependencies, including removal of some tracy deps as they are get through common/tracy 2021-03-09 20:17:29 +01:00
Marcel Märtens
4ebfbdde0f Move Specs code to own common_ecs create, put tracy and macros into common_base 2021-03-09 00:54:01 +01:00
Joshua Yanovski
2dd7089e52 Bring vek up to date so we can bump rustc (hopefully). 2021-03-04 05:46:59 +01:00
Marcel Märtens
9028578bc8 Change the way Network is dropped.
Instead of keeping Runtime and manually spawn a task on `drop` this task is spawned at start and will wait to be triggered.
The `drop` methods then wait for completion, UNLESS they are in a async context, then they MUST NOT BLOCK (deadlock potential), so they defer it to the Runtime and HOPE for the runtime to exist long enough.
This get rid of the weird `block_in_place` which is only accessable with `rt-multi-threaded` and has some disadvantages.
We also wont requiere the runtime to be active all the time. Though its needed for a clean shutdown
2021-03-03 11:28:40 +01:00
ccgauche
7f4411ba1f Merge branch 'master' into 'ccgauche/plugin-player-join-event'
# Conflicts:
#   CHANGELOG.md
2021-03-02 09:45:15 +00:00
Sam
d02c61ad8a Item use is now goes through a control action rather than a control event. 2021-03-01 20:51:08 -05:00
Jesus Bracho
c0573cca44 Implement stacking and splitting 2021-03-02 00:08:46 +00:00
ccgauche
9628dfaf99 Fixed comments 2021-03-01 21:29:18 +01:00
ccgauche
dbd4d70b79 Lots of improvement in pointer management (switched from i32 to u64) + New event implemented 2021-03-01 19:00:44 +01:00
Sam
50c47ce84d Made changes to fix torvus 2021-02-27 22:42:11 -05:00
Avi Weinstock
78014d7d3b Put material stats in their own manifest, and multiply a form's stats by the weighted average of the material multipliers. 2021-02-23 15:49:34 -05:00
Marcel Märtens
e3ef4422b6 cleanup ClientConnArgs 2021-02-22 21:07:20 +01:00
Marcel Märtens
3f5c64bec0 Client::new can now resolve DNS requests, better networking error messages 2021-02-22 17:35:19 +01:00
Marcel Märtens
514d5db038 Update Network Protocol
- now last digit version is compatible 0.6.0 will connect to 0.6.1
 - the TCP DATA Frames no longer contain START field, as it's not needed
 - the TCP OPENSTREAM Frames will now contain the BANDWIDTH field
 - MID is not Protocol internal

Update network
 - update API with Bandwidth

Update veloren
 - introduce better runtime and `async` things that are IO bound.
 - Remove `uvth` and instead use `tokio::runtime::Runtime::spawn_blocking`
 - remove futures_execute from client and server use tokio::runtime::Runtime instead
 - give threads a Name
2021-02-22 17:34:55 +01:00
Sam
d5ccc33abc Factored out duplicate code into closures, consolidated ability handling logic to a single function. 2021-02-19 18:45:48 -05:00
Marcel Märtens
03af9937cf Stabelize Network again:
- completly switch to Bytes, even in api. speed up TCP by fak 2
 - improve benchmarks
 - speed up mpsc metrics
 - gracefully handle shutdown by interpreting Ok(0) as tokio::tcpstream closed now.
 - fix hotloop in participants by adding `Some(n)` to fix endless handing.
 - fix closing bug by closing streams after `recv_mgr` is shutdown even if now shutdown is triggered locally.
 - fix prometheus
 - no longer throw when a `Stream` is dropped while participant still receives a msg for it.
 - fix the bandwith handling, TCP network send speed is up to 1.5GiB/s while recv is 150MiB/s
 - add documentation
 - tmp require rt-multi-threaded in client for tokio, to not fail cargo check

this is prob stable, i tested over 1 hour.
after that some optimisations in priomgr.
and impl. propper bandwith.
Speed is up to 2GB/s write and 150MB/s recv on a single core

sync add documentation
2021-02-17 19:37:48 +01:00
Marcel Märtens
ea8ab1ce7a Great improvements to the codebase:
- better logging in network
 - we now notify the send of what happened in recv in participant.
 - works with veloren master servers
 - works in singleplayer, using a actual mid.
 - add `mpsc` in whole stack incl tests
 - speed up internal read/write with `Bytes` crate
 - use `prometheus-hyper` for metrics
 - use a metrics cache
2021-02-17 16:15:00 +01:00
Marcel Märtens
9884019963 COMPLETE REDESIGN of network crate
- Implementing a async non-io protocol crate
    a) no tokio / no channels
    b) I/O is based on abstraction Sink/Drain
    c) different Protocols can have a different Drain Type
       This allow MPSC to send its content without splitting up messages at all!
       It allows UDP to have internal extra frames to care for security
       It allows better abstraction for tests
       Allows benchmarks on the mpsc variant
       Custom Handshakes to allow sth like Quic protocol easily
 - reduce the participant managers to 4: channel creations, send, recv and shutdown.
   keeping the `mut data` in one manager removes the need for all RwLocks.
   reducing complexity and parallel access problems
 - more strategic participant shutdown. first send. then wait for remote side to notice recv stop, then remote side will stop send, then local side can stop recv.
 - metrics are internally abstracted to fit protocol and network layer
 - in this commit network/protocol tests work and network tests work someway, veloren compiles but does not work
 - handshake compatible to async_std
2021-02-17 12:39:47 +01:00
Marcel Märtens
5aa1940ef8 get rid of async_std::channel
switch to `tokio` and `async_channel` crate.
I wanted to do tokio first, but it doesnt feature Sender::close(), thus i included async_channel
Got rid of `futures` and only need `futures_core` and `futures_util`.

Tokio does not support `Stream` and `StreamExt` so for now i need to use `tokio-stream`, i think this will go in `std` in the future

Created `b2b_close_stream_opened_sender_r` as the shutdown procedure does not need a copy of a Sender, it just need to stop it.

Various adjustments, e.g. for `select!` which now requieres a `&mut` for oneshots.

Future things to do:
 - Use some better signalling than oneshot<()> in some cases.
 - Use a Watch for the Prio propergation (impl. it ofc)
 - Use Bounded Channels in order to improve performance
 - adjust tests coding

bring tests to work
2021-02-17 12:38:53 +01:00
Marcel Märtens
1b77b6dc41 Initial switch to tokio for network, minimum working example. 2021-02-17 12:37:59 +01:00
Caelan
dda4931f46 Clean and update dependencies
* Remove tweak feature
 * Remove const-tweaker
 * Update tiny_http
 * Update bitvec to 0.21.0
 * Downgrade euc to avoid conflict with vek 0.12.0
 * Require exactly vek 0.12.0
 * Update all other dependencies automatically based on these changes
 * Update gilrs to latest at the request of Ada Lovegirls
 * Update meshing benchmarks to new criterion API
2021-02-17 01:27:06 -08:00
TheThirdSpartan
f10f88081d Small chat message formatting changes and fixed missing player alias during admin entity possession 2021-02-17 02:15:45 +00:00
Avi Weinstock
c984035976 MR 1775 review fixes.
- Separate `invite` machinery from `group_manip` into it's own thing (includes renaming `group_invite` to `invite` where applicable).
- Move some invite/trade machinery to `ControlEvent`.
- Make `TradePhase` a proper enum instead of a bunch of bools.
- Make `TradeId` a proper newtype.
- Remove trades from `Trades` on accept (previously was only on decline).
- Typo fixes/misc cleanup.
- Add bullet point for trading to the changelog.
2021-02-14 11:13:56 -05:00
Avi Weinstock
232ddb0860 Polish trading implementation and address review comments.
- Fix item swapping edge case
- Document more assumptions/edge cases
- fmt and clippy
- s/ServerGeneral::GroupInvite/ServerGeneral::Invite/
- Use `Client::current` in `Client::is_dead`
2021-02-14 11:11:35 -05:00
Avi Weinstock
f6db8bb7c4 Implement actual inventory-manipulation part of trading server side. 2021-02-12 18:43:10 -05:00
Avi Weinstock
abb5684883 Trade implementation progress.
- Accept/decline buttons that submit the proper messages
- A phase2 screen that renders the (item, quantity) pairs as text
- More checks in the trade state machine server-side.
2021-02-12 18:43:10 -05:00
Avi Weinstock
e2b55e0706 Implement enough of a trade UI that dragging & dropping items into it round-trips between clients. 2021-02-12 18:43:09 -05:00
Avi Weinstock
aeb2398fc6 Trade implementation progress.
- Server messages now bring up the trade window.
- When a trade is declined, it closes the window on both clients.
2021-02-12 18:43:09 -05:00
Avi Weinstock
ae528124fc Trade implementation progress.
- State machine for modifying trades.
- ServerGeneral/ClientGeneral messages.
2021-02-12 18:43:09 -05:00
Avi Weinstock
e9b811b62b Plumb trade requests through the group invite UI, such that they can be accepted/declined without impacting the counterparty's movement. 2021-02-12 18:43:09 -05:00
Quellus
63952875d9 Rebase !1447 Chat input color and icon reflect channel message is sent to. 2021-02-10 19:42:59 +00:00
Sam
e033fe6bee Inventory manipulations are now only for input from the client, and are no longer directly sent as a server event. Slot manipulations do that instead. 2021-02-08 13:55:50 -05:00
Sam
1c83c5ee6f Loadout manipulations now emit a separate event from client instead of hackily intercepting inventory manipulations in common. 2021-02-08 12:31:17 -05:00
Sam
6a1e583d45 Eradicated clones 2021-02-08 12:01:48 -05:00
Sam
8eebcdfcd2 Inventory changes that modify the loadout now go through a control action instead of a control event. 2021-02-08 12:01:47 -05:00
James Melkonian
23b1df3cdd Add basic NPC interaction and fix NPC chat spamming 2021-01-31 20:29:50 +00:00
DaforLynx
c6e262c4ce Small audio fixes; addresses #939 and #940 2021-01-29 11:37:10 +00:00
Marcel Märtens
ff10373cbe add unittests for api compatibility for client::Client and common::Clock
this tests the broad api of veloren and FAILS in case the interface is changed. It contains a not that those functions are commonly used by 3rd parties
and thus they need to be notified
2021-01-23 21:06:47 +01:00