Documentation page: AttackParameters.ammo_category should be ammo_categories

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
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 849 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,...}
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance


posila
Factorio Staff
Factorio Staff
Posts: 5201
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”