File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
mods_2.0/039_assembling-machine-request-chest-paste-multiplier Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
1
---------------------------------------------------------------------------------------------------
2
+ Version: 2.0.2
3
+ Date: 2024. 12. 31
4
+ Info:
5
+ - Support chest ghosts
6
+ ---------------------------------------------------------------------------------------------------
2
7
Version: 2.0.1
3
8
Date: 2024. 12. 30
4
9
Info:
Original file line number Diff line number Diff line change @@ -11,8 +11,17 @@ for _, prototype in pairs(prototypes) do
11
11
end
12
12
end
13
13
14
+ local function get_entity_type (entity )
15
+ return entity .type == " entity-ghost" and entity .ghost_type or entity .type
16
+ end
17
+
18
+
19
+ local function get_entity_name (entity )
20
+ return entity .type == " entity-ghost" and entity .ghost_name or entity .name
21
+ end
22
+
14
23
local function compatible (event )
15
- return (event .source . type == " entity-ghost " and event . source . ghost_type or event . source . type ) == " assembling-machine" and requester_chest_names [event .destination . name ]
24
+ return get_entity_type (event .source ) == " assembling-machine" and requester_chest_names [get_entity_name ( event .destination ) ]
16
25
end
17
26
18
27
local function serialize_requests (requester_chest )
Original file line number Diff line number Diff line change 3
3
"title" : " Assembling machine request chest paste multiplier" ,
4
4
"description" : " Pasting an assembling machine several times on a requester chest increases the total requested." ,
5
5
6
- "version" : " 2.0.1 " ,
6
+ "version" : " 2.0.2 " ,
7
7
"author" : " Quezler" ,
8
8
"factorio_version" : " 2.0" ,
9
9
You can’t perform that action at this time.
0 commit comments