Skip to content

Commit

Permalink
Support chest ghosts
Browse files Browse the repository at this point in the history
  • Loading branch information
Quezler committed Dec 31, 2024
1 parent 1ceffdb commit edee049
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 2.0.2
Date: 2024. 12. 31
Info:
- Support chest ghosts
---------------------------------------------------------------------------------------------------
Version: 2.0.1
Date: 2024. 12. 30
Info:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ for _, prototype in pairs(prototypes) do
end
end

local function get_entity_type(entity)
return entity.type == "entity-ghost" and entity.ghost_type or entity.type
end


local function get_entity_name(entity)
return entity.type == "entity-ghost" and entity.ghost_name or entity.name
end

local function compatible(event)
return (event.source.type == "entity-ghost" and event.source.ghost_type or event.source.type) == "assembling-machine" and requester_chest_names[event.destination.name]
return get_entity_type(event.source) == "assembling-machine" and requester_chest_names[get_entity_name(event.destination)]
end

local function serialize_requests(requester_chest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Assembling machine request chest paste multiplier",
"description": "Pasting an assembling machine several times on a requester chest increases the total requested.",

"version": "2.0.1",
"version": "2.0.2",
"author": "Quezler",
"factorio_version": "2.0",

Expand Down

0 comments on commit edee049

Please sign in to comment.