gun
Vars | |
accuracy_falloff | For every turf a fired projectile travels, increase the target bodyzone inaccuracy by this much. |
---|---|
burst_size | How many shots to fire per fire sequence |
can_bayonet | if a bayonet can be added, or removed, if it already has one. |
chambered | The next round to be fired, if any. |
clumsy_check | Can this weapon be misfired? |
dual_wield_spread | Additional spread when dual wielding |
fire_delay | The cooldown (DS) before the gun can be fired again after firing |
fire_lockout | Boolean var used to control the speed a gun can be fired. See the "fire_delay" var. |
firing_burst | Boolean var used to prevent the weapon from firing again while already firing |
pb_knockback | How many tiles do we knock the poor bastard we just point-blanked back? |
pin | Required for firing, [/obj/item/firing_pin/proc/pin_auth] is called as part of firing. |
pinless | True if a gun dosen't need a pin, mostly used for abstract guns like tentacles and meathooks |
projectile_damage_multiplier | Just 'slightly' snowflakey way to modify projectile damage for projectiles fired from this gun. |
randomspread | If set to FALSE, uses a "smart spread" that changes the spread based on the amount of shots in a burst. |
recoil | Screenshake applied to the firer |
sawn_off | Is the weapon currently sawn off? |
smoking_gun | Should smoke particles be created when fired? |
spread | Default spread |
suppressed | whether or not a message is displayed when fired |
unwielded_recoil | How much recoil there is when fired with one hand |
unwielded_spread_bonus | Additional spread when fired while unwielded |
Procs | |
add_seclight_point | Handles adding the seclite mount component to the gun. If the gun shouldn't have a seclight mount, override this with a return. Or, if a child of a gun with a seclite mount has slightly different behavior or icons, extend this. |
after_chambering | Called after a successful shot and update_chamber() |
after_firing | Called after the weapon has successfully fired it's chambered round, and before update_chamber() |
before_firing | Called before the weapon is fired, before the projectile is created. |
can_fire | check if there's enough ammo/energy/whatever to shoot one time i.e if clicking would make it shoot |
clear_suppressor | Clears var and updates icon. In the case of ballistic weapons, also updates the gun's weight. |
do_chamber_update | Called after the weapon has successfully fired it's chambered round |
do_fire_gun | The proc for firing the gun. This won't perform any non-gun checks. Returns TRUE if a round was fired. |
do_fire_in_burst | Called by do_fire_gun if the rounds per burst is greater than 1. |
dry_fire_feedback | Called by shoot_with_empty_chamber(). |
play_fire_sound | Play the bang bang sound |
ready_to_fire | Called when the gun is ready to fire again |
shoot_with_empty_chamber | Apply pointblank knockback to the target Called when there was an attempt to fire the gun, but the chamber was empty. |
tk_firing | Check if the user is firing this gun with telekinesis. |
try_fire_akimbo | Called by try_fire_gun() to attempt to fire offhand guns. |
try_fire_gun | The defacto proc for "mob is trying to shoot the gun". Checks if they are able to, and a few other things. |
update_chamber | Called after the weapon has successfully fired it's chambered round. |
Var Details
accuracy_falloff
For every turf a fired projectile travels, increase the target bodyzone inaccuracy by this much.
burst_size
How many shots to fire per fire sequence
can_bayonet
if a bayonet can be added, or removed, if it already has one.
chambered
The next round to be fired, if any.
clumsy_check
Can this weapon be misfired?
dual_wield_spread
Additional spread when dual wielding
fire_delay
The cooldown (DS) before the gun can be fired again after firing
fire_lockout
Boolean var used to control the speed a gun can be fired. See the "fire_delay" var.
firing_burst
Boolean var used to prevent the weapon from firing again while already firing
pb_knockback
How many tiles do we knock the poor bastard we just point-blanked back?
pin
Required for firing, [/obj/item/firing_pin/proc/pin_auth] is called as part of firing.
pinless
True if a gun dosen't need a pin, mostly used for abstract guns like tentacles and meathooks
projectile_damage_multiplier
Just 'slightly' snowflakey way to modify projectile damage for projectiles fired from this gun.
randomspread
If set to FALSE, uses a "smart spread" that changes the spread based on the amount of shots in a burst.
recoil
Screenshake applied to the firer
sawn_off
Is the weapon currently sawn off?
smoking_gun
Should smoke particles be created when fired?
spread
Default spread
suppressed
whether or not a message is displayed when fired
unwielded_recoil
How much recoil there is when fired with one hand
unwielded_spread_bonus
Additional spread when fired while unwielded
Proc Details
add_seclight_point
Handles adding the seclite mount component to the gun. If the gun shouldn't have a seclight mount, override this with a return. Or, if a child of a gun with a seclite mount has slightly different behavior or icons, extend this.
after_chambering
Called after a successful shot and update_chamber()
after_firing
Called after the weapon has successfully fired it's chambered round, and before update_chamber()
Arguments:
- user - The mob firing the gun.
- pointblank - Is this a pointblank shot?
- pbtarget - If this is a pointblank shot, what is the target?
- message - If TRUE, will give chat feedback.
before_firing
Called before the weapon is fired, before the projectile is created.
Arguments:
- target - The thing being shot at.
- user - The mob firing the gun.
can_fire
check if there's enough ammo/energy/whatever to shoot one time i.e if clicking would make it shoot
clear_suppressor
Clears var and updates icon. In the case of ballistic weapons, also updates the gun's weight.
do_chamber_update
Called after the weapon has successfully fired it's chambered round
Arguments:
- empty_chamber - Whether or not the chamber is currently empty.
- from_firing - If this was called as apart of the gun firing.
- chamber_next_round - Whether or not the next round should be chambered.
do_fire_gun
The proc for firing the gun. This won't perform any non-gun checks. Returns TRUE if a round was fired.
Arguments:
- user - The mob firing the gun.
- pointblank - Is this a pointblank shot?
- pbtarget - If this is a pointblank shot, what is the target?
- message - If TRUE, will give chat feedback.
do_fire_in_burst
Called by do_fire_gun if the rounds per burst is greater than 1.
Arguments:
- user - The mob firing the gun.
- target - The thing being shot.
- message - Provide chat feedback
- params - ???
- zone_override - ???
- sprd - Bullet spread. This is immediately overwritten so I don't know why it's here.
- randomized_gun_spread - Calculated by do_fire_gun()
- randomized_bonus_spread - Calculated by do_fire_gun()
- rand_spr - Seriously, what the fuck?
- iteration - What step in the burst we are in.
dry_fire_feedback
Called by shoot_with_empty_chamber().
Arguments:
- user - The mob firing the gun.
play_fire_sound
Play the bang bang sound
ready_to_fire
Called when the gun is ready to fire again
shoot_with_empty_chamber
Apply pointblank knockback to the target Called when there was an attempt to fire the gun, but the chamber was empty.
Arguments:
- user - The mob firing the gun.
tk_firing
Check if the user is firing this gun with telekinesis.
try_fire_akimbo
Called by try_fire_gun() to attempt to fire offhand guns.
try_fire_gun
The defacto proc for "mob is trying to shoot the gun". Checks if they are able to, and a few other things.
Arguments:
- target - The thing being shot at.
- user - The mob firing the gun.
- proximity - TRUE if user.Adjacent(target)
- params - Click parameters.
update_chamber
Called after the weapon has successfully fired it's chambered round.
Arguments:
- empty_chamber - Whether or not the chamber is currently empty.
- from_firing - If this was called as apart of the gun firing.
- chamber_next_round - Whether or not the next round should be chambered.