Code: Select all
fuel_items = game.get_filtered_item_prototypes({ {filter = "fuel"} })
Code: Select all
ammo_items = game.get_filtered_item_prototypes({ {filter = "ammo"} })
Code: Select all
local ammo_items = {}
for i_name, i_proto in pairs(game.item_prototypes) do
ammo_type = i_proto.get_ammo_type()
ammo_items[i_name] = ammo_type and ammo_type.category and i_proto
end