mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'crab/fix-player-trading' into 'master'
Allow trading from player to player again See merge request veloren/veloren!4554
This commit is contained in:
commit
83191551c5
@ -1133,7 +1133,7 @@ impl PlayState for SessionState {
|
||||
match interactable {
|
||||
Interactable::Block(_, _, _) => {},
|
||||
Interactable::Entity(entity) => {
|
||||
let can_trade_to = client
|
||||
let can_trade_to_alignment = client
|
||||
.state()
|
||||
.read_component_cloned::<Alignment>(*entity)
|
||||
.is_some_and(|a| match a {
|
||||
@ -1148,11 +1148,10 @@ impl PlayState for SessionState {
|
||||
_ => false,
|
||||
});
|
||||
|
||||
if can_trade_to
|
||||
&& let Some(uid) = client
|
||||
.state()
|
||||
.ecs()
|
||||
.uid_from_entity(*entity)
|
||||
if let Some(uid) =
|
||||
client.state().ecs().uid_from_entity(*entity)
|
||||
&& (can_trade_to_alignment
|
||||
|| client.player_list().contains_key(&uid))
|
||||
{
|
||||
let name = client
|
||||
.player_list()
|
||||
|
Loading…
Reference in New Issue
Block a user