Space Station 13 - Modules - TypesVar Details - Proc Details

gun

Vars

accuracyGun accuracy (without distance accuracy)
attachable_allowedList of allowed attachments, IT MUST INCLUDE THE STARTING ATTACHMENT TYPES OR THEY WILL NOT ATTACH.
attachable_offsetList of offsets to make attachment overlays not look wonky.
attachment_overlaysImage list of attachments overlays.
attachments_by_slotList of slots a gun can have.
bayonetCurrently attached bayonet.
bayonet_overlayCurrently used bayonet overlay.
bayonet_x_offsetOffsets bayonet's overlay pixel_x by this value.
bayonet_y_offsetOffsets bayonet's overlay pixel_y by this value.
can_bayonetWhether user can attach/detach bayonets to/from this gun.
current_skinThe skin choice if we had a reskin
gun_lightCurrently attached flashlight.
on_rackGuns can be placed on racks
pb_knockbackResponsible for the range of the throwing back when shooting at point blank range
skin_optionsLazy list of gun visual skins. Filled on Initialize() in proc/update_gun_skins()
starting_attachment_typesThe attachments this gun starts with on Init
unique_renameAllows renaming with a pen
unique_reskinAllows reskinning

Procs

ZoomGrantCheckProc which will be called when the gun receives the COMSIG_ITEM_EQUIPPED signal.
add_skinAdds skin in associative lazy list: skin_options[skin_name] = skin_icon_state
do_recoilanimate recoil for gun
set_bayonetSets gun's bayonet and do all the necessary updates
set_gun_lightSets gun's flashlight and do all the necessary updates

Var Details

accuracy

Gun accuracy (without distance accuracy)

attachable_allowed

List of allowed attachments, IT MUST INCLUDE THE STARTING ATTACHMENT TYPES OR THEY WILL NOT ATTACH.

attachable_offset

List of offsets to make attachment overlays not look wonky.

attachment_overlays

Image list of attachments overlays.

attachments_by_slot

List of slots a gun can have.

bayonet

Currently attached bayonet.

bayonet_overlay

Currently used bayonet overlay.

bayonet_x_offset

Offsets bayonet's overlay pixel_x by this value.

bayonet_y_offset

Offsets bayonet's overlay pixel_y by this value.

can_bayonet

Whether user can attach/detach bayonets to/from this gun.

current_skin

The skin choice if we had a reskin

gun_light

Currently attached flashlight.

on_rack

Guns can be placed on racks

pb_knockback

Responsible for the range of the throwing back when shooting at point blank range

skin_options

Lazy list of gun visual skins. Filled on Initialize() in proc/update_gun_skins()

starting_attachment_types

The attachments this gun starts with on Init

unique_rename

Allows renaming with a pen

unique_reskin

Allows reskinning

Proc Details

ZoomGrantCheck

Proc which will be called when the gun receives the COMSIG_ITEM_EQUIPPED signal.

This happens if the mob picks up the gun, or equips it to any of their slots. If the slot is anything other than either of their hands (such as the back slot), un-zoom them, and Remove the zoom action button from the mob. Otherwise, Grant the mob the zoom action button.

Arguments:

add_skin

Adds skin in associative lazy list: skin_options[skin_name] = skin_icon_state

Arguments:

do_recoil

animate recoil for gun

set_bayonet

Sets gun's bayonet and do all the necessary updates

set_gun_light

Sets gun's flashlight and do all the necessary updates