Daedalus Dock - 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
load_delayDelay for loading bullets in.
load_soundSound to play when loading with a bullet.
max_ammomaximum amount of ammo in the magazine
multiple_sprite_use_baseFor sprite updating, do we use initial(icon_state) or base_icon_state?
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

after_load_roundCalled after successfully loading a round.
ammo_countCount of number of bullets in the magazine
attempt_load_roundAttempts to load a given item into this ammo box
can_loadWhether or not the box can be loaded, used in overrides
do_load_roundCalled by attempt_load_round(). Returns the number of rounds loaded.
get_ammo_descReturns a string that describes the amount of ammo in the magazine.
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
is_fullReturns TRUE if the ammo box is at max capacity. If spent_is_empty = TRUE, spent rounds are counted as not being in the box.
load_from_ammo_boxCalled by do_load_ammo() when the target is an ammo box.
top_offtop_off is used to refill the magazine to max, in case you want to increase the size of a magazine with VV then refill it at once
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

load_delay

Delay for loading bullets in.

load_sound

Sound to play when loading with a bullet.

max_ammo

maximum amount of ammo in the magazine

multiple_sprite_use_base

For sprite updating, do we use initial(icon_state) or base_icon_state?

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

after_load_round

Called after successfully loading a round.

ammo_count

Count of number of bullets in the magazine

attempt_load_round

Attempts to load a given item into this ammo box

can_load

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

do_load_round

Called by attempt_load_round(). Returns the number of rounds loaded.

get_ammo_desc

Returns a string that describes the amount of ammo in the magazine.

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

is_full

Returns TRUE if the ammo box is at max capacity. If spent_is_empty = TRUE, spent rounds are counted as not being in the box.

load_from_ammo_box

Called by do_load_ammo() when the target is an ammo box.

top_off

top_off is used to refill the magazine to max, in case you want to increase the size of a magazine with VV then refill it at once

Arguments:

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.