Code: Select all
game.print( i.." "..tostring(gun_inventory[i].prototype.name))
game.print( i.." "..tostring(gun_inventory[i].prototype.attack_parameters.ammo_category ))
game.print( i.." "..tostring(gun_inventory[i].prototype.attack_parameters.ammo_type ))
edit: it's now called ammo_categories but the documentation is wrong... https://lua-api.factorio.com/latest/Con ... Parameters
table format is: {[1] = ammo_category_1_name, [2] = ammo_category_2_name,...}