Adding Ammunition Types

As a learning experiment I’m attempting to add a ammunition type and weapons to use it.

Both work as intended, but when examined in-game the ‘ammunition type’ is listed as XXX for both.

What is required to make the ammunition type display properly?

Bullets:

"type" : "AMMO", "id" : "8mm_caseless", "rarity" : 10, "price" : 500, "name" : "8x40mm caseless", "symbol" : "=", "color" : "light_red", "description" : "8x40mm caseless rounds. Proprietary ammunition for Rivtech firearms.", "material" : "steel", "volume" : 2, "weight" : 7, "bashing" : 1, "cutting" : 0, "to_hit" : 0, "ammo_type" : "8x40mm", "damage" : 36, "pierce" : 12, "range" : 42, "dispersion" : 6, "recoil" : 20, "count" : 50, "effects" : ["COOKOFF"]

Rifle:

"id": "rm51_assault_rifle", "type": "GUN", "symbol": "(", "color": "red", "name": "RM51 Assault Rifle", "description": "Barely making it past the prototype stage before the world ended, the Rivtech RM51 assault rifle was designed for durability and power in a small package.", "rarity": 1, "price": 5000, "material": ["steel", "plastic"], "skill": "rifle", "ammo": "8x40mm", "weight": 25, "volume": 16, "bashing": 12, "cutting": 0, "to_hit": 1, "ranged_damage": 5, "range": 0, "dispersion": 2, "recoil": 0, "durability": 9, "burst": 0, "clip_size": 20, "reload": 600

Oops, there’s a method, ammo_name() in itypedef.cpp that does this mapping, just another thing that needs to be pushed out to JSON.

Thank you very much!

I’d looked through a pile of files trying to see where it was linked but still hadn’t managed to track it down. You just saved me a lot of trouble!