Space Station 13 - Modules - TypesVar Details - Proc Details

ammobox

Vars

ammo_countPositive Integer. The amount on ammunition currently in this box. Generally, you should not modify directly. See insert_casing() and remove_casing().
ammo_maxPositive Integer. The maximum amount of ammunition this box can hold.
ammo_spentBoolean. Whether or not the box is carrying spent or unspent rounds.
ammo_typePath (Subtypes of /obj/item/ammo_casing). The ammo type this ammo box holds. Generally, you should not modify directly. See set_ammo_type()

Procs

can_insert_casingChecks if the casing can be added to the box.
insert_casingAdds ammo_casing to the ammo box's inventory. Checks can_insert_casing().
remove_casingRemoves a casing and places it in target.
set_ammo_typeSets the box's ammo_type to the given type, updating its name in the process.

Var Details

ammo_count

Positive Integer. The amount on ammunition currently in this box. Generally, you should not modify directly. See insert_casing() and remove_casing().

ammo_max

Positive Integer. The maximum amount of ammunition this box can hold.

ammo_spent

Boolean. Whether or not the box is carrying spent or unspent rounds.

ammo_type

Path (Subtypes of /obj/item/ammo_casing). The ammo type this ammo box holds. Generally, you should not modify directly. See set_ammo_type()

Proc Details

can_insert_casing

Checks if the casing can be added to the box.

Provides user feedback messages on failure.

Parameters:

Returns boolean. TRUE if the casing was successfully inserted, FALSE otherwise.

insert_casing

Adds ammo_casing to the ammo box's inventory. Checks can_insert_casing().

Parameters:

Returns boolean. TRUE if the casing was successfully inserted, FALSE otherwise.

remove_casing

Removes a casing and places it in target.

Provides user feedback messages on failure.

Parameters:

Returns the removed casing if one was created or null.

set_ammo_type

Sets the box's ammo_type to the given type, updating its name in the process.

Parameters:

Has no return value.