Lazy commit: processing stations

This commit is contained in:
Van
2026-06-03 21:46:40 +03:00
parent 3854410041
commit 592bbf9c58
16 changed files with 266 additions and 185 deletions

View File

@@ -48,7 +48,7 @@ function ImmersiveCraft:new(name, def)
instance.stagesByName = stagesByName
-- Subscribe to an event that will determine that the player has completed the crafting stage.
Events.subscribe('craft_system:next_immersive_stage:'..name,
Events:subscribe('craft_system:next_immersive_stage:'..name,
---@param eventName string
---@param stage CraftSystem.ImmersiveCraftStage
---@param pos MapVector

View File

@@ -59,7 +59,7 @@ local tappingNode = ImmersiveCraftNode:new({
---@param luaEntity CraftSystem.ImmersiveCraftNode.LuaTappingNode
on_punch = function(luaEntity, puncher, time_from_last_punch, tool_capabilities, dir, damage)
-- We simply trigger the event that the player hits the crafting node, bound to the work station with coordinates.
Events.call(('craft_system:punch_tapping_node:%s:%s'):format(
Events:call(('craft_system:punch_tapping_node:%s:%s'):format(
luaEntity._craft_name, luaEntity._stage_name), luaEntity._work_station_pos, puncher, luaEntity)
return false

View File

@@ -104,7 +104,7 @@ function TappingStage:new(def)
entity:remove()
Events.call('craft_system:next_immersive_stage:'..tappingStage.craftName, tappingStage, pos, player)
Events:call('craft_system:next_immersive_stage:'..tappingStage.craftName, tappingStage, pos, player)
end
-- Registering the aborting the crafting process handler.
@@ -147,7 +147,7 @@ function TappingStage:new(def)
end
-- Subscribe to an event that means the player hit the entity.
Events.subscribe(('craft_system:punch_tapping_node:%s:%s'):format(instance.craftName, instance.name),
Events:subscribe(('craft_system:punch_tapping_node:%s:%s'):format(instance.craftName, instance.name),
---@param craftNode LuaEntity
---@param player Player
function(eventName, pos, player, craftNode)