1
0
Fork
You've already forked ProjectTallow
0

Process / Action Queue API #9

Open
opened 2026年04月22日 11:35:00 +02:00 by SumianVoice · 0 comments

This would register processes for the player, like a linear statemachine. For example, when a player first joins the game, they should be asked what their profession and class is. There might also be information the server might want to say, etc. This API would queue these processes/actions according to a priority. Priority 1 would be a forced action as soon as the player joins, before they are allowed to do anything else, priority 100 would be "who cares so long as it happens eventually". You could also set a flag for persistence. You don't want to select a class every time you join so it should remember that player has already completed that action.

tal_process_queue.register_process({
	on_start = function(self, player, meta) end,
	on_end = function(self, player, meta) end,
	on_step = function(self, player, dtime, meta)
		if self.is_finished then return true end
	end,
	is_persistent = true,
})
tal_process_queue.get_process(player)
tal_process_queue.set_process(player, process_name)
tal_process_queue.skip_process(player, process_name)
tal_process_queue.is_process_finished(player, process_name)
This would register processes for the player, like a linear statemachine. For example, when a player first joins the game, they should be asked what their profession and class is. There might also be information the server might want to say, etc. This API would queue these processes/actions according to a priority. Priority 1 would be a forced action as soon as the player joins, before they are allowed to do anything else, priority 100 would be "who cares so long as it happens eventually". You could also set a flag for persistence. You don't want to select a class every time you join so it should remember that player has already completed that action. ```lua tal_process_queue.register_process({ on_start = function(self, player, meta) end, on_end = function(self, player, meta) end, on_step = function(self, player, dtime, meta) if self.is_finished then return true end end, is_persistent = true, }) tal_process_queue.get_process(player) tal_process_queue.set_process(player, process_name) tal_process_queue.skip_process(player, process_name) tal_process_queue.is_process_finished(player, process_name) ```
Sign in to join this conversation.
No Branch/Tag specified
master
experimental
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SumianVoice/ProjectTallow#9
Reference in a new issue
SumianVoice/ProjectTallow
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?