feat: dialogue origin tracking
This commit is contained in:
parent
b95a2e2bb9
commit
2d2adbbfd6
|
@ -38,6 +38,9 @@ export default function Entities({
|
||||||
const {dialogues} = updating[id].Interlocutor;
|
const {dialogues} = updating[id].Interlocutor;
|
||||||
for (const key in dialogue) {
|
for (const key in dialogue) {
|
||||||
dialogues[key] = dialogue[key];
|
dialogues[key] = dialogue[key];
|
||||||
|
if ('track' === dialogues[key].origin) {
|
||||||
|
dialogues[key].origin = () => updating[id].Position;
|
||||||
|
}
|
||||||
dialogues[key].letters = parseLetters(dialogues[key].body);
|
dialogues[key].letters = parseLetters(dialogues[key].body);
|
||||||
setChatMessages((chatMessages) => ({
|
setChatMessages((chatMessages) => ({
|
||||||
[[id, key].join('-')]: dialogues[key].letters,
|
[[id, key].join('-')]: dialogues[key].letters,
|
||||||
|
|
|
@ -134,8 +134,8 @@ export default class Engine {
|
||||||
Interlocutor.dialogue({
|
Interlocutor.dialogue({
|
||||||
body: payload.value,
|
body: payload.value,
|
||||||
linger: 5,
|
linger: 5,
|
||||||
origin: Position.toJSON(),
|
origin: 'track',
|
||||||
position: {x: Position.x, y: Position.y - 32},
|
position: {x: Position.x, y: Position.y - 64},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user