mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'make-merchants-send-trade-on-iteraction' into 'master'
Make merchants send the player a trade request when interacted with Closes #1368 See merge request veloren/veloren!2914
This commit is contained in:
commit
4bae3a4b62
@ -1081,10 +1081,21 @@ impl<'a> AgentData<'a> {
|
|||||||
};
|
};
|
||||||
self.chat_general(msg, event_emitter);
|
self.chat_general(msg, event_emitter);
|
||||||
} else if agent.behavior.can_trade() {
|
} else if agent.behavior.can_trade() {
|
||||||
self.chat_general(
|
if !agent.behavior.is(BehaviorState::TRADING) {
|
||||||
"npc.speech.merchant_advertisement",
|
controller.events.push(ControlEvent::InitiateInvite(
|
||||||
event_emitter,
|
by,
|
||||||
);
|
InviteKind::Trade,
|
||||||
|
));
|
||||||
|
self.chat_general(
|
||||||
|
"npc.speech.merchant_advertisement",
|
||||||
|
event_emitter,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
self.chat_general(
|
||||||
|
"npc.speech.merchant_busy",
|
||||||
|
event_emitter,
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
self.chat_general("npc.speech.villager", event_emitter);
|
self.chat_general("npc.speech.villager", event_emitter);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user