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 {
|
match interactable {
|
||||||
Interactable::Block(_, _, _) => {},
|
Interactable::Block(_, _, _) => {},
|
||||||
Interactable::Entity(entity) => {
|
Interactable::Entity(entity) => {
|
||||||
let can_trade_to = client
|
let can_trade_to_alignment = client
|
||||||
.state()
|
.state()
|
||||||
.read_component_cloned::<Alignment>(*entity)
|
.read_component_cloned::<Alignment>(*entity)
|
||||||
.is_some_and(|a| match a {
|
.is_some_and(|a| match a {
|
||||||
@ -1148,11 +1148,10 @@ impl PlayState for SessionState {
|
|||||||
_ => false,
|
_ => false,
|
||||||
});
|
});
|
||||||
|
|
||||||
if can_trade_to
|
if let Some(uid) =
|
||||||
&& let Some(uid) = client
|
client.state().ecs().uid_from_entity(*entity)
|
||||||
.state()
|
&& (can_trade_to_alignment
|
||||||
.ecs()
|
|| client.player_list().contains_key(&uid))
|
||||||
.uid_from_entity(*entity)
|
|
||||||
{
|
{
|
||||||
let name = client
|
let name = client
|
||||||
.player_list()
|
.player_list()
|
||||||
|
Loading…
Reference in New Issue
Block a user