Shiptest 13 - Modules - TypesVar Details - Proc Details

ammo_box

Vars

ammo_typetype that the magazine will be searching for, rejects if not a subtype of
base_costcost of the materials in the magazine/box itself
bullet_costcost of all the bullets in the magazine/box
caliberString, used for checking if ammo of different types but still fits can fit inside it; generally used for magazines
instant_loadWhether or not an ammo box skips the do_after process (e.g. speedloaders)
max_ammomaximum amount of ammo in the magazine
multiloadAllows multiple bullets to be loaded in from one click of another box/magazine
multiple_spritesControls how sprites are updated for the ammo box; see defines in combat.dm: AMMO_BOX_ONE_SPRITE; AMMO_BOX_PER_BULLET; AMMO_BOX_FULL_EMPTY
start_emptyWhether the magazine should start with nothing in it
stored_ammolist containing the actual ammo within the magazine

Procs

can_loadWhether or not the box can be loaded, used in overrides
get_roundgets a round from the magazine, if keep is TRUE the round will stay in the gun
give_roundputs a round into the magazine
update_ammo_countUpdates the materials and appearance of this ammo box
update_custom_materialsUpdates the amount of material in this ammo box according to how many bullets are left in it.

Var Details

ammo_type

type that the magazine will be searching for, rejects if not a subtype of

base_cost

cost of the materials in the magazine/box itself

bullet_cost

cost of all the bullets in the magazine/box

caliber

String, used for checking if ammo of different types but still fits can fit inside it; generally used for magazines

instant_load

Whether or not an ammo box skips the do_after process (e.g. speedloaders)

max_ammo

maximum amount of ammo in the magazine

multiload

Allows multiple bullets to be loaded in from one click of another box/magazine

multiple_sprites

Controls how sprites are updated for the ammo box; see defines in combat.dm: AMMO_BOX_ONE_SPRITE; AMMO_BOX_PER_BULLET; AMMO_BOX_FULL_EMPTY

start_empty

Whether the magazine should start with nothing in it

stored_ammo

list containing the actual ammo within the magazine

Proc Details

can_load

Whether or not the box can be loaded, used in overrides

get_round

gets a round from the magazine, if keep is TRUE the round will stay in the gun

give_round

puts a round into the magazine

update_ammo_count

Updates the materials and appearance of this ammo box

update_custom_materials

Updates the amount of material in this ammo box according to how many bullets are left in it.