mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-13 08:12:35 -06:00
migrate game.item_prototypes for 2.0
This commit is contained in:
@@ -14,7 +14,7 @@ local DEFINES_LOW_POWER = defines.entity_status.low_power
|
||||
---@param map_data MapData
|
||||
---@param item_name string
|
||||
function get_stack_size(map_data, item_name)
|
||||
return game.item_prototypes[item_name].stack_size
|
||||
return prototypes.item[item_name].stack_size
|
||||
end
|
||||
|
||||
---@param item_order table<string, int>
|
||||
@@ -756,7 +756,7 @@ function set_comb2(map_data, station)
|
||||
local signals = {}
|
||||
for item_name, count in pairs(deliveries) do
|
||||
local i = #signals + 1
|
||||
local is_fluid = game.item_prototypes[item_name] == nil--NOTE: this is expensive
|
||||
local is_fluid = prototypes.item[item_name] == nil--NOTE: this is expensive
|
||||
signals[i] = {index = i, signal = {type = is_fluid and "fluid" or "item", name = item_name}, count = sign*count}
|
||||
end
|
||||
set_combinator_output(map_data, station.entity_comb2, signals)
|
||||
|
||||
Reference in New Issue
Block a user