Commit Graph

1307 Commits

Author SHA1 Message Date
Marcel Märtens
77dea4980c get rid of a lazy_static and update agent multithreaded metrics 2021-03-09 11:52:57 +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
Marcel Märtens
f353f14703 change Name from VSystem to System 2021-03-08 13:15:00 +01:00
Marcel Märtens
989d130692 update state to system name. This will break grafana boards and thus needs an adjustment 2021-03-08 11:51:18 +01:00
Marcel Märtens
ea94ca6656 switch server to the new Registry struct, this gets rid of RegistryFn pattern and simplyfies stuff, its a result of the Prometheus-tracy crate 2021-03-08 11:51:16 +01:00
Marcel Märtens
6b88545481 restructure server metrics
- get rid of old SysTimers for each system in favour of VSystem tracking
 - move metrics generation from lib.rs to own system
 - code cleanup
 - remove time tracking in common::sys
2021-03-08 11:51:13 +01:00
Marcel Märtens
c515fece28 Implement a VSystem trait that can be implemented by Systems.
It will autodo some things, like track start and time and export those in system metrics
Add a origin and implement it for all Systems in Veloren
2021-03-08 11:51:04 +01:00
ccgauche
89774980b4 First commit 2021-03-07 22:32:52 +01:00
Avi Weinstock
c4f7c9b951 Make the probabilities data to assert that the expected value is less than 1. 2021-03-06 15:11:19 -05:00
Avi Weinstock
22fcc6417c Make fireworks recursively shoot more fireworks (95% average replication). 2021-03-06 14:05:51 -05:00
Avi Weinstock
ae37b71ab6 Increase MAX_CHASE_DIST from 20 to 250, so enemies don't ignore you if you're fireballing them from a hallway. 2021-03-06 10:50:04 -05:00
ccgauche
077659be9d Fixed tracy 2021-03-05 19:02:33 +01:00
Joshua Yanovski
2dd7089e52 Bring vek up to date so we can bump rustc (hopefully). 2021-03-04 05:46:59 +01:00
Sam
ae856edb31 Fixed debug back armor. Removed leather_3 item. 2021-03-03 15:05:51 -05:00
Marcel
ef1ee4c4fa Merge branch 'xMAC94x/mpsc' into 'master'
Change the way Network is dropped.

Closes #46

See merge request veloren/veloren!1846
2021-03-03 15:19:44 +00:00
Marcel Märtens
a55ec20c74 fix #46 🥳 2021-03-03 12:37:09 +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
James Melkonian
f9fc015680 Address comments 2021-03-02 19:55:28 -08:00
James Melkonian
8bdadc47b5 Initial behavior tree refactoring 2021-03-02 15:49:58 -08:00
Snowram
2b7b9f887b Fixes leather sets 2021-03-02 19:28:29 +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
55b980a57c Migration for missed backpacks 2021-03-01 23:27:20 -05:00
Samuel Keiffer
f16c137635 Merge branch 'sam/item-use-as-action' into 'master'
Item use is now goes through a control action rather than a control event.

Closes #979

See merge request veloren/veloren!1839
2021-03-02 03:25:55 +00:00
Sam
3a88ab5bb3 Migration to fix sturdy red backpack 2021-03-01 21:37:14 -05: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
Justin Shipsey
9ad8804b60 Merge branch 'armor-org' into 'master'
armor org

See merge request veloren/veloren!1835
2021-03-02 01:29:46 +00:00
Jesus Bracho
c0573cca44 Implement stacking and splitting 2021-03-02 00:08:46 +00:00
jshipsey
308045cfc9 final asset corrections, fix glider anim 2021-03-01 17:37:47 -05:00
ccgauche
e327b18c4a Fixed clippy warning 2021-03-01 22:44:18 +01:00
ccgauche
c28ac78e03 Separated the registration system into two files 2021-03-01 22:35:22 +01:00
ccgauche
db9991ce6d Adressed all comments 2021-03-01 22:24:02 +01:00
ccgauche
9628dfaf99 Fixed comments 2021-03-01 21:29:18 +01:00
ccgauche
4cffd2cadd Updated CI + Changelog 2021-03-01 19:28:27 +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
Samuel Keiffer
0497a437a4 Merge branch 'sam/invulnerability-buff' into 'master'
Invulnerability Buff

Closes #965

See merge request veloren/veloren!1834
2021-03-01 05:46:46 +00:00
Sam
7e34f1225f Migration for armor re-organization. 2021-03-01 00:42:35 -05:00
jshipsey
8944115f8e more asset organization 2021-02-28 22:18:43 -05:00
Samuel Keiffer
537efdd47e Merge branch 'aweinstock/trade-requestitem' into 'master'
During a trade, allow requesting items from the counterparty's inventory...

See merge request veloren/veloren!1829
2021-03-01 02:39:36 +00:00
Sam
d09baadab2 Added command: '/safezone' 2021-02-28 18:14:59 -05:00
Sam
a88ad7b971 Added invulnerability debuff. Currently tied to campfire spawned with '/campfire' command. 2021-02-28 15:02:03 -05:00
Avi Weinstock
7e458ecd40 During a trade, allow requesting items from the counterparty's inventory (prequisite for NPC trading). 2021-02-28 10:13:49 -05:00
Sam
50c47ce84d Made changes to fix torvus 2021-02-27 22:42:11 -05:00
Sam
404c7f0905 Combo melee now checks combo 2021-02-27 18:24:28 -05:00
Sam
f24433c8cf Added combo component 2021-02-27 14:55:06 -05:00
jshipsey
8d316aac8c feedback adjustments 2021-02-27 01:42:47 -05:00
jshipsey
16a44cd532 minotaur moves, added claygolem 2021-02-27 01:42:47 -05:00
jshipsey
417f4638ed balance pass 2 2021-02-27 01:42:47 -05:00
jshipsey
e06ebf3507 initial balance 2021-02-27 01:42:47 -05:00
Snowram
1b9815dc34 Adds 3 new npcs, tusk ram new design 2021-02-27 01:42:46 -05:00
Sam
53b0ba286a Ice particles for Wendigo 2021-02-27 01:42:46 -05:00
jshipsey
aa4237b019 BL improvements, various fixes 2021-02-27 01:42:45 -05:00
jshipsey
ac16a8900d bow 2021-02-27 01:42:45 -05:00
Sam
45dd36be07 Auras now apply a buff only once, instead of applying a buff every second.
Also supports for buffs persisting a period of time after leaving the aura.
Campfire regen slightly buffed.
2021-02-26 17:57:01 -05:00
Samuel Keiffer
8e07174c1d Merge branch 'aweinstock/coin-item' into 'master'
Add a coin item and make amounts visible on dropped items.

See merge request veloren/veloren!1821
2021-02-26 04:17:12 +00:00
Samuel Keiffer
6af9e58965 Merge branch 'add-gemu-models' into 'master'
Add sword and bow models from backlog

See merge request veloren/veloren!1818
2021-02-26 02:59:51 +00:00
Avi Weinstock
7d2e8f72eb Add a coin item and make amounts visible on dropped items. 2021-02-25 21:31:30 -05:00
Sam
b0b4a07b9e Bows 2021-02-24 20:37:43 -05:00
Sam
ee5c9d78ca Swords 2021-02-24 18:54:06 -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
Snowram
14c252d8b2 Merge branch 'snowram/turret' into 'master'
Object animation, beam fixes, turret implementation

See merge request veloren/veloren!1805
2021-02-23 20:16:56 +00:00
ccgauche
06aa7ab70c Retrieves added + New ECS memory layout for plugins 2021-02-22 23:59:32 +01:00
ccgauche
1597fcc79e Fixed the plugin compilation and added comments
TODO: Remove compilation errors on WASM side (while using common).
2021-02-22 23:59:25 +01:00
ccgauche
a067a20b69 added basic retreive 2021-02-22 23:59:11 +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
1a7c179bbb share tokio Runtime between Client and Server, name rayon Threadpool 2021-02-22 17:35:06 +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
Joshua Barretto
e2290783fc Merge branch 'humanoid_ai_glide_when_falling' into 'master'
FIX #956: Humanoid ai glide when falling

See merge request veloren/veloren!1772
2021-02-22 00:57:25 +00:00
Overblob
370259fe54 CI - Fix clippy errors
Fix trailing whitspace
2021-02-22 00:57:25 +00:00
Snowram
4078eeb877 Various fixes to object animation, cleanup 2021-02-21 19:56:46 +01:00
Sam
f5a74b4f33 Removed duplicate possess stick 2021-02-20 17:12:27 -05: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
Snowram
f78170704a Allows some species to be immune to specific buffs 2021-02-20 14:03:15 +00: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
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
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
Joshua Barretto
4d19308612 Merge branch 'lboklin/quat-ori' into 'master'
Redefine Ori as a quaternion

See merge request veloren/veloren!1755
2021-02-16 22:39:11 +00:00
Quellus
8b4230db61 Limit character name length 2021-02-16 21:29: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
James Melkonian
1d8496ea21 Move agent system to server 2021-02-06 06:15:25 +00:00
Ludvig Böklin
a1ff9ab83f Redefine Ori as a quaternion 2021-02-05 09:33:14 +01:00
Imbris
b9f404c6f5 fix test server 2021-02-04 00:18:46 -05:00
Sam
d13302f256 Fixed bombs panicing the server. 2021-02-03 00:41:19 -05:00
Sam
be8df9aef6 Addressed comments. 2021-02-02 16:08:09 -05:00
Sam
80954f3ba4 Made attacker entity and uid optional to remove potential for attacks to not be applied and some unwraps. 2021-02-02 13:07:07 -05:00
Sam
17d1432be0 Outcomes now correctly read if an attack had any healing components. 2021-02-02 13:07:06 -05:00