hadean-old/content/core/actions/CoreActions.ts

36 lines
932 B
TypeScript
Raw Normal View History

2021-06-23 01:28:06 -04:00
import { registerAction } from '@actions';
import { Game } from '@game';
import { ItemState } from '@items';
import { TaskState } from '@tasks';
import { FLINT_NORMAL } from '../items/CoreItems.js';
import { GATHER_FLINT, MAKE_ARROWHEAD } from '../tasks/CoreTasks.js';
// registerAction('Gather Flint', (qty) => {
// Game.current.board.addTask({
// taskId: 'core:gather-flint',
// options: {}
// })
// });
// registerAction('Gather Slate', (qty) => {
// Game.current.board.addTask({
// taskId: 'core:gather-slate',
// options: {}
// })
// });
2021-06-23 01:28:06 -04:00
registerAction('Gather Flint', (qty) => {
const taskState = new TaskState(GATHER_FLINT);
Game.current.board.addTask(taskState);
2021-06-23 01:28:06 -04:00
});
registerAction('Create Arrowhead', (qty) => {
const rock = new ItemState(FLINT_NORMAL, 1, null);
const task = new TaskState(MAKE_ARROWHEAD).setData({
baseMaterial: rock
});
Game.current.board.addTask(task);
2021-06-23 01:28:06 -04:00
});
2021-06-23 18:53:49 -04:00