2022-11-11 16:52:57 -06:00
|
|
|
export class Action {
|
|
|
|
constructor(name, scene) {
|
|
|
|
this.name = name;
|
|
|
|
this.scene = scene;
|
|
|
|
}
|
|
|
|
|
2023-01-05 14:21:45 -06:00
|
|
|
async log(src, dest, msg, obj, symbol = '->>') {
|
2023-01-26 11:36:39 -06:00
|
|
|
if (this.scene.sequence) {
|
|
|
|
await this.scene.sequence.log(
|
|
|
|
`${src.name} ${symbol} ${dest.name} : ${this.name} ${msg ?? ''} ${
|
2023-01-30 12:25:08 -06:00
|
|
|
JSON.stringify(obj) ?? ''
|
2023-01-26 11:36:39 -06:00
|
|
|
}`,
|
|
|
|
);
|
|
|
|
}
|
2022-11-11 16:52:57 -06:00
|
|
|
}
|
|
|
|
}
|