Prototype/AmmoItem: Difference between revisions
Jump to navigation
Jump to search
(Set prototype parent) |
(Converted to SMW format) |
||
Line 1: | Line 1: | ||
{{Prototype parent|Prototype/Item}} | {{Prototype parent|Prototype/Item}} | ||
Ammo used for a gun. | |||
{{Prototype TOC|ammo}} | |||
Prototype | |||
== Mandatory properties == | == Mandatory properties == | ||
Inherits all properties from [[Prototype/Item]]. | Inherits all properties from [[Prototype/Item]]. | ||
{{Prototype property|ammo_type|[[Types/table|table]] of [[Types/AmmoType|AmmoType]] or [[Types/AmmoType|AmmoType]]}} | |||
When using a vector of AmmoType, the AmmoType has an extra property: | When using a vector of AmmoType, the AmmoType has an extra property: | ||
* source_type - [[Types/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. | ||
When using a plain [[Types/AmmoType]], the ammo type applies to everything ("default"). | When using a plain [[Types/AmmoType|AmmoType]], the ammo type applies to everything ("default"). | ||
== Optional properties == | == Optional properties == | ||
{{Prototype property|magazine_size|[[Types/float|float]]|1|optional=true}} | |||
Number of shots before ammo item is consumed. Must be >= 1. | Number of shots before ammo item is consumed. Must be >= 1. | ||
{{Prototype property|reload_time|[[Types/float|float]]|0|optional=true}} | |||
Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine. Must be >= 0. | Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine. Must be >= 0. |
Revision as of 15:16, 26 July 2019
Template:Prototype parent Ammo used for a gun.
Mandatory properties
Inherits all properties from Prototype/Item.
Template:Prototype property When using a vector 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
Template:Prototype property Number of shots before ammo item is consumed. Must be >= 1.
Template:Prototype property Amount of extra time (in ticks) it takes to reload the weapon after depleting the magazine. Must be >= 0.