Began migrating action engine to async

To suspending actions to await user input
This commit is contained in:
ThaumRystra
2023-11-13 00:24:51 +02:00
parent 800ef3328c
commit 5a2df36e8b
17 changed files with 222 additions and 71 deletions

View File

@@ -6,6 +6,7 @@ import CreatureLogs from '/imports/api/creature/log/CreatureLogs.js';
import { assertViewPermission } from '/imports/api/creature/creatures/creaturePermissions.js';
import computeCreature from '/imports/api/engine/computeCreature.js';
import VERSION from '/imports/constants/VERSION.js';
import ActiveActions from '/imports/api/creature/actions/ActiveActions';
import { loadCreature } from '/imports/api/engine/loadCreatures.js';
let schema = new SimpleSchema({
@@ -54,6 +55,11 @@ Meteor.publish('singleCharacter', function (creatureId) {
limit: 20,
sort: { date: -1 },
}),
ActiveActions.find({
creatureId,
}, {
limit: 10,
}),
// Also publish the owner's username
Meteor.users.find(permissionCreature.owner, {
fields: {