gun 
Vars | |
| 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. |
| damage_mod | Damage modifier for projectile |
| 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 |
| shots_counter | Shots counter |
| stamina_mod | Stamina modifier for projectile |
| starting_attachment_types | The attachments this gun starts with on Init |
| unique_rename | Allows renaming with a pen |
Procs | |
| ZoomGrantCheck | Proc which will be called when the gun receives the COMSIG_ITEM_EQUIPPED signal. |
| 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 |
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.
damage_mod 
Damage modifier for projectile
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
shots_counter 
Shots counter
stamina_mod 
Stamina modifier for projectile
starting_attachment_types 
The attachments this gun starts with on Init
unique_rename 
Allows renaming with a pen
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:
- source - the gun that got equipped, which is
src. - user - the mob equipping the gun.
- slot - the slot the gun is getting equipped to.
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