Commit Graph

6585 Commits

Author SHA1 Message Date
Sam
dcacd82293 Stats system now uses immutable data struct 2021-02-22 14:27:34 -05:00
Sam
27fe1c20ac Aura system now uses immutable data struct 2021-02-22 14:14:10 -05:00
Sam
4c0c06ea4c Buff system now uses immutable data struct 2021-02-22 14:03:18 -05:00
Sam
605513ea56 Beam system now uses immutable data struct 2021-02-22 13:57:56 -05:00
Sam
11a0d67b35 Shockwave system now uses immutable data struct 2021-02-22 13:49:56 -05:00
Sam
b278cad807 Projectile system now uses immutable data struct 2021-02-22 13:37:42 -05:00
Sam
91e982b3ee Melee system now uses immutable data struct 2021-02-22 13:25:21 -05:00
Samuel Keiffer
3cb6a5592d Merge branch 'aweinstock/speed-floor-quickfix' into 'master'
Change the speed floor to `0.1` (avoiding a division by zero in modular...

See merge request veloren/veloren!1804
2021-02-21 02:49:57 +00:00
Samuel Keiffer
836d34066a Merge branch 'sam/food-queue' into 'master'
Food buff queues

See merge request veloren/veloren!1803
2021-02-21 01:06:50 +00:00
Avi Weinstock
3606490308 Change the speed floor to 0.1 (avoiding a division by zero in modular weapons accidentally buffed the Twitching Root). 2021-02-20 19:19:26 -05:00
Sam
f24490dc80 Added functionality for buffs queueing. Saturation now queues. 2021-02-20 17:13:17 -05:00
Sam
f5a74b4f33 Removed duplicate possess stick 2021-02-20 17:12:27 -05:00
Ben Wallis
6001934e8f Merge branch 'aweinstock/modular-weapons' into 'master'
Aweinstock/modular weapons

See merge request veloren/veloren!1795
2021-02-20 22:06:11 +00:00
Avi Weinstock
c489d095df Implement persistence for modular weapons.
This stores the components as children of the item that contains them via the DB's `parent_container_item_id` feature, and ensures that things are loaded in a good order with breadth-first search.

Squahed fixes:

- Fix some constraint violations that occurred when swapping inventory items.
- Comment out recipes for modular weapons.
- Make update_item_at_slot_using_persistence_key and is_modular more idiomatic.
- Add changelog entry.
- Document `defer_foreign_keys` usage.
2021-02-20 14:31:46 -05:00
Avi Weinstock
8bdbf4f7c9 Implement modular weapons.
- Add ItemKind::ModularComponent, Item::components.
- Add tool::StatKind::{Direct,Modular} for the modular weapons themselves.
- Move ItemConfig from ItemDesc to Item, so components' stats can be taken into account.
- Crafting stores into the components field.
- Components/recipes/placeholders are created dynamically.
- Show which components a modular weapon contains in the tooltip in voxygen.

Squashed fixes:
- `Item::duplicate` components in `Item::new_from_item_def`.
- Speed of 1.0 for now.
2021-02-20 14:30:39 -05:00
Snowram
63c72f77f1 Merge branch 'snowram/buffs-immunity' into 'master'
Allows some species to be immune to specific buffs

See merge request veloren/veloren!1800
2021-02-20 14:03:16 +00:00
Snowram
f78170704a Allows some species to be immune to specific buffs 2021-02-20 14:03:15 +00:00
Marcel
a330d4b05c Merge branch 'clangdo/fix_macos_build' into 'master'
Backdate coreaudio-sys for OSX cross toolchain compatibility

See merge request veloren/veloren!1799
2021-02-20 09:58:59 +00:00
Samuel Keiffer
479cf9fc4e Merge branch 'sam/dual-wielding' into 'master'
Dual wielding backend

See merge request veloren/veloren!1787
2021-02-20 05:12:17 +00:00
Sam
eaf3e02e39 Addressed comments
Fixed audio test
2021-02-19 19:55:23 -05:00
Sam
cfadd6da04 Added 1h swords. 2021-02-19 19:33:26 -05:00
Caelan
82c33d9ccb Backdate coreaudio-sys for OSX cross toolchain compatibility
See https://github.com/RustAudio/coreaudio-sys/issues/48
2021-02-19 15:46:36 -08: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
Joshua Barretto
c9c8bf4fd5 Merge branch 'aweinstock/trade-client-improvements' into 'master'
Client-side trade improvements.

See merge request veloren/veloren!1798
2021-02-19 23:38:30 +00:00
Sam
bbfcde5e59 Re-deleted duplicate weapons that somehow reappeared. 2021-02-19 17:30:24 -05:00
Sam
411b4083b1 Added 1h hammers.
Fixed audio tests.
2021-02-19 17:30:24 -05:00
Sam
18309fe4c6 Added AbilityInfo struct to attack states 2021-02-19 17:30:24 -05:00
Sam
50cbe42b07 Added one-handed axes. 2021-02-19 17:30:23 -05:00
Sam
12545dd372 Added handedness to weapon tooltips. 2021-02-19 17:30:23 -05:00
Sam
8f0cca074d Dual wielding now uses skillbar abilities from multiple weapons. 2021-02-19 17:30:22 -05:00
Sam
6f6a37faf2 Wielding a 1 handed weapon now correctly uses abilities when the second weapon is not also a 1 handed weapon. 2021-02-19 17:30:22 -05:00
Sam
f50fa25467 ItemConfig now stores AbilitySet directly instead of each individual ability. 2021-02-19 17:30:21 -05:00
Sam
fc01e9ea68 Handedness of weapons affects power and speed. 2021-02-19 17:30:21 -05:00
Sam
582c3f8459 Check for prerequisite skill in using an ability is no longer hardcoded. 2021-02-19 17:30:21 -05:00
Sam
341affdae2 Added hands field to all ron files of weapons.
Removed weapons that were duplicated in weapons and npc_weapons from npc_weapons.
Added migration to convert npc_weapons that ended up in anyone's inventory to weapon version.
Consolidated debug boost and possess sticks into one debug_stick, and renamed the admin sword (with name cultist_purp_2h_boss-0) to admin_sword
2021-02-19 17:30:20 -05:00
Sam
d4f509b3d0 Added hands field onto weapons. 2021-02-19 17:30:20 -05:00
Avi Weinstock
559ad7b7f5 Client-side trade improvements.
- Add item tooltips in trade.
- More localization support.
- Fix bindings (R for trade, B for bag).
2021-02-19 15:20:27 -05:00
Forest Anderson
b4adc5369a Merge branch 'angel/fix-mirror-actions' into 'master'
Remove git filter repo

See merge request veloren/veloren!1797
2021-02-19 18:01:42 +00:00
Forest Anderson
5773e7c8a0 Remove git filter repo 2021-02-19 08:55:10 -05:00
Marcel
3f571b3b4e Merge branch 'xMAC94x/quick_net_fix' into 'master'
fix main thread blocking which was a bad combination of

See merge request veloren/veloren!1793
2021-02-18 19:26:43 +00:00
Marcel Märtens
5a48bffcb0 fix main thread blocking which was a bad combination of
- a channel was stale and wasn't shut down propertly AS WELL AS
 - the msg ingoing pipe was bounded, so it could fill up

To mitigate this we
 a) unbounded the pipe
 b) stoped spam the log in no channel case
 c) instead of ever reaching "no channel" state we actually shutdown participant
 d) when send_mgr is closed it will no longer be able to SEND on streams
2021-02-18 20:00:07 +01:00
Marcel
c6d69d1196 Merge branch 'xMAC94x/network_tokio' into 'master'
xMAC94x/network_tokio switch from `async_std` to `tokio`

See merge request veloren/veloren!1789
2021-02-17 22:47:11 +00:00
Samuel Keiffer
95fdd0fcc3 Merge branch 'cherry-pick-2ef5fb90' into 'master'
Fix missing controller actions

See merge request veloren/veloren!1786
2021-02-17 21:10:14 +00:00
Ada Lovegirls
96b8a582fe Fixed missing controller actions
(cherry picked from commit 2ef5fb90e89bf3f8f0acc84e269f6948c696c196)
2021-02-17 21:10:14 +00: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
3f85506761 fix most unittests (not all) by a) dropping network/participant BEFORE runtime and by transfering a expect into a warn! in the protocol 2021-02-17 12:38:58 +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