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. |
| autoburst_delay | when autobursting, this is the total amount of time before the weapon fires again. If no amount is specified, defaults to fire_delay + extra_delay |
| burst_amount | How many shots can the weapon shoot in burst? Anything less than 2 and you cannot toggle burst. |
| burst_delay | The delay in between shots. Lower = less delay = faster. |
| damage_mod | Damage modifier for projectile |
| dual_wield | If this gun is in inactive hands and shooting in akimbo |
| extra_delay | When burst-firing, this number is extra time before the weapon can fire again. Depends on number of rounds fired. |
| fire_cd | Firing cooldown, true if this gun shouldn't be allowed to manually fire |
| gun_crosshair | Crosshair icon of the gun |
| gun_firemode | Current selected firemode of the gun. |
| gun_firemode_list | List of allowed firemodes. |
| gun_light | Currently attached flashlight. |
| gun_user | The mob holding the gun |
| last_fired | World.time of last gun firing. |
| on_rack | Guns can be placed on racks |
| pb_cooldown_duration | Point blank shot cooldown |
| pb_knockback | Responsible for the range of the throwing back when shooting at point blank range |
| shots_counter | Shots counter |
| shots_fired | How many bullets the gun fired while bursting/auto firing |
| stamina_mod | Stamina modifier for projectile |
| starting_attachment_types | The attachments this gun starts with on Init |
| target | The atom targeted by the user |
| unique_rename | Allows renaming with a pen |
| windup_autofire | windup autofire vars Whether the delay between shots increases over time, simulating a spooling weapon |
| windup_autofire_cap | How high of a reduction that current_windup_reduction can reach |
| windup_autofire_reduction_multiplier | the percentage of autfire_shot_delay that is added to current_windup_reduction |
| windup_spindown | How long it takes for weapons that have spooled-up to reset back to the original firing speed |
Procs | |
| ZoomGrantCheck | Proc which will be called when the gun receives the COMSIG_ITEM_EQUIPPED signal. |
| change_target | Update the target if you draged your mouse |
| clean_gun_user | Null out gun user to prevent hard del |
| clean_target | Set the target to it's turf, so we keep shooting even when it was qdeled |
| do_recoil | animate recoil for gun |
| do_semiauto_fire | Single-shot fire path, runs process_fire and resets state on success. |
| gun_on_cooldown | Checks if the gun is on cooldown |
| reset_fire | Clean all references |
| set_bursting | Inform the gun if he is currently bursting, to prevent reloading |
| set_gun_light | Sets gun's flashlight and do all the necessary updates |
| set_gun_user | Set the user in argument as gun_user |
| set_target | Set the target and take care of hard delete |
| setup_bullet_accuracy | Sets the projectile accuracy and scatter |
| start_fire | Check if the gun can fire and add it to bucket auto_fire system if needed, or just fire the gun if not |
| stop_fire | Reset variables used in firing and remove the gun from the autofire system |
| update_mouse_pointer | Updates the current mouse pointer to use the gun crosshair or not |
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.
autoburst_delay 
when autobursting, this is the total amount of time before the weapon fires again. If no amount is specified, defaults to fire_delay + extra_delay
burst_amount 
How many shots can the weapon shoot in burst? Anything less than 2 and you cannot toggle burst.
burst_delay 
The delay in between shots. Lower = less delay = faster.
damage_mod 
Damage modifier for projectile
dual_wield 
If this gun is in inactive hands and shooting in akimbo
extra_delay 
When burst-firing, this number is extra time before the weapon can fire again. Depends on number of rounds fired.
fire_cd 
Firing cooldown, true if this gun shouldn't be allowed to manually fire
gun_crosshair 
Crosshair icon of the gun
gun_firemode 
Current selected firemode of the gun.
gun_firemode_list 
List of allowed firemodes.
gun_light 
Currently attached flashlight.
gun_user 
The mob holding the gun
last_fired 
World.time of last gun firing.
on_rack 
Guns can be placed on racks
pb_cooldown_duration 
Point blank shot cooldown
pb_knockback 
Responsible for the range of the throwing back when shooting at point blank range
shots_counter 
Shots counter
shots_fired 
How many bullets the gun fired while bursting/auto firing
stamina_mod 
Stamina modifier for projectile
starting_attachment_types 
The attachments this gun starts with on Init
target 
The atom targeted by the user
unique_rename 
Allows renaming with a pen
windup_autofire 
windup autofire vars Whether the delay between shots increases over time, simulating a spooling weapon
windup_autofire_cap 
How high of a reduction that current_windup_reduction can reach
windup_autofire_reduction_multiplier 
the percentage of autfire_shot_delay that is added to current_windup_reduction
windup_spindown 
How long it takes for weapons that have spooled-up to reset back to the original firing speed
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.
change_target
Update the target if you draged your mouse
clean_gun_user
Null out gun user to prevent hard del
clean_target
Set the target to it's turf, so we keep shooting even when it was qdeled
do_recoil
animate recoil for gun
do_semiauto_fire
Single-shot fire path, runs process_fire and resets state on success.
gun_on_cooldown
Checks if the gun is on cooldown
reset_fire
Clean all references
set_bursting
Inform the gun if he is currently bursting, to prevent reloading
set_gun_light
Sets gun's flashlight and do all the necessary updates
set_gun_user
Set the user in argument as gun_user
set_target
Set the target and take care of hard delete
setup_bullet_accuracy
Sets the projectile accuracy and scatter
start_fire
Check if the gun can fire and add it to bucket auto_fire system if needed, or just fire the gun if not
stop_fire
Reset variables used in firing and remove the gun from the autofire system
update_mouse_pointer
Updates the current mouse pointer to use the gun crosshair or not