Documentation page: AttackParameters.ammo_category should be ammo_categories

This subforum contains all the issues which we already resolved.
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Documentation page: AttackParameters.ammo_category should be ammo_categories

Post by ownlyme »

Since 0.18 i think, the ammo_category of all weapons is nil

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   ))
outputs:
Screenshot_2.png
Screenshot_2.png (59.74 KiB) Viewed 1137 times
also affects vehicle weapons.

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,...}
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Documentation page: AttackParameters.ammo_category should be ammo_categories

Post by posila »

Thanks for the report, and thanks @Honktown linking the change.
Fixed doc for 0.18.7
Post Reply

Return to “Resolved Problems and Bugs”