Prototype/AmmoItem: Difference between revisions
Jump to navigation
Jump to search
(Converted to SMW format) |
m (→Mandatory properties: typo) |
||
Line 8: | Line 8: | ||
{{Prototype property|ammo_type|[[Types/table|table]] of [[Types/AmmoType|AmmoType]] or [[Types/AmmoType|AmmoType]]}} | {{Prototype property|ammo_type|[[Types/table|table]] of [[Types/AmmoType|AmmoType]] or [[Types/AmmoType|AmmoType]]}} | ||
When using | When using an array of AmmoType, the AmmoType has an extra property: | ||
* source_type - [[Types/AmmoSourceType|AmmoSourceType]] - Mandatory. - Defines for which kind of entity this ammo type applies. Each entity kind can only be used once per array. | * source_type - [[Types/AmmoSourceType|AmmoSourceType]] - Mandatory. - Defines for which kind of entity this ammo type applies. Each entity kind can only be used once per array. | ||
Latest revision as of 19:05, 9 October 2019
Prototype definitions » PrototypeBase » Prototype/Item » Prototype/AmmoItem
Ammo used for a gun.
Mandatory properties
Inherits all properties from Prototype/Item.
ammo_type
Type: table of AmmoType or AmmoType
When using an array of AmmoType, the AmmoType has an extra property:
- source_type - AmmoSourceType - Mandatory. - Defines for which kind of entity this ammo type applies. Each entity kind can only be used once per array.
When using a plain AmmoType, the ammo type applies to everything ("default").
Optional properties
magazine_size
Type: float
Default: 1
Number of shots before ammo item is consumed. Must be >= 1.
reload_time
Type: float
Default: 0
Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine. Must be >= 0.