projectile gun

Subtype for any kind of ballistic gun This has a shitload of vars on it, and I'm sorry for that, but it does make making new subtypes really easy
Vars | |
bolt_drop_sound | sound of dropping the bolt or releasing a slide |
---|---|
bolt_drop_sound_volume | volume of bolt drop/slide release |
bolt_locked | Used for locking bolt and open bolt guns. Set a bit differently for the two but prevents firing when true for both. |
bolt_type | The bolt type of the gun, affects quite a bit of functionality, see combat.dm defines for bolt types: BOLT_TYPE_STANDARD; BOLT_TYPE_LOCKING; BOLT_TYPE_OPEN; BOLT_TYPE_NO_BOLT |
bolt_wording | Phrasing of the bolt in examine and notification messages; ex: bolt, slide, etc. |
can_be_sawn_off | Whether the gun can be sawn off by sawing tools |
cartridge_wording | Phrasing of the cartridge in examine and notification messages; ex: bullet, shell, dart, etc. |
casing_ejector | whether the gun ejects the chambered casing |
eject_empty_sound | sound of ejecting an empty magazine |
eject_sound | Sound of ejecting a magazine |
eject_sound_vary | whether eject sound should vary |
eject_sound_volume | volume of ejecting a magazine |
empty_alarm | Whether the gun alarms when empty or not. |
empty_alarm_sound | empty alarm sound (if enabled) |
empty_alarm_vary | whether empty alarm sound varies |
empty_alarm_volume | empty alarm volume sound |
empty_indicator | Whether the sprite has a visible indicator for being empty or not. |
internal_magazine | Whether the gun has an internal magazine or a detatchable one. Overridden by BOLT_TYPE_NO_BOLT. |
load_empty_sound | sound when inserting an empty magazine |
load_sound | sound when inserting magazine |
load_sound_vary | whether loading sound should vary |
load_sound_volume | volume of loading sound |
lock_back_sound | sound of when the bolt is locked back manually |
lock_back_sound_vary | whether lock back varies |
lock_back_sound_volume | volume of lock back |
mag_display | Whether the sprite has a visible magazine or not |
mag_display_ammo | Whether the sprite has a visible ammo display or not |
mag_type | Compatible magazines with the gun |
magazine | Actual magazine currently contained within the gun |
magazine_wording | Phrasing of the magazine in examine and notification messages; ex: magazine, box, etx |
rack_delay | length between individual racks |
rack_sound | sound of racking |
rack_sound_vary | whether racking sound should vary |
rack_sound_volume | volume of racking |
recent_rack | time of the most recent rack, used for cooldown purposes |
semi_auto | Whether the gun has to be racked each shot or not. |
spawnwithmagazine | Whether the gun will spawn loaded with a magazine |
special_mags | Whether the gun supports multiple special mag types |
tac_reloads | Whether the gun can be tacloaded by slapping a fresh magazine directly on it |
Procs | |
blow_up | used for sawing guns, causes the gun to fire without the input of the user |
chamber_round | Used to chamber a new round and eject the old one |
drop_bolt | Drops the bolt from a locked position |
eject_magazine | Handles all the logic of magazine ejection, if tac_load is set that magazine will be tacloaded in the place of the old eject |
get_ammo | Gets the number of bullets in the gun |
get_ammo_list | gets a list of every bullet in the gun |
insert_magazine | Handles all the logic needed for magazine insertion |
install_suppressor | Installs a new suppressor, assumes that the suppressor is already in the contents of src |
postfire_empty_checks | postfire empty checks for bolt locking and sound alarms |
prefire_empty_checks | Prefire empty checks for the bolt drop |
rack | updates a bunch of racking related stuff and also handles the sound effects and the like |
sawoff | Handles all the logic of sawing off guns, |
Var Details
bolt_drop_sound

sound of dropping the bolt or releasing a slide
bolt_drop_sound_volume

volume of bolt drop/slide release
bolt_locked

Used for locking bolt and open bolt guns. Set a bit differently for the two but prevents firing when true for both.
bolt_type

The bolt type of the gun, affects quite a bit of functionality, see combat.dm defines for bolt types: BOLT_TYPE_STANDARD; BOLT_TYPE_LOCKING; BOLT_TYPE_OPEN; BOLT_TYPE_NO_BOLT
bolt_wording

Phrasing of the bolt in examine and notification messages; ex: bolt, slide, etc.
can_be_sawn_off

Whether the gun can be sawn off by sawing tools
cartridge_wording

Phrasing of the cartridge in examine and notification messages; ex: bullet, shell, dart, etc.
casing_ejector

whether the gun ejects the chambered casing
eject_empty_sound

sound of ejecting an empty magazine
eject_sound

Sound of ejecting a magazine
eject_sound_vary

whether eject sound should vary
eject_sound_volume

volume of ejecting a magazine
empty_alarm

Whether the gun alarms when empty or not.
empty_alarm_sound

empty alarm sound (if enabled)
empty_alarm_vary

whether empty alarm sound varies
empty_alarm_volume

empty alarm volume sound
empty_indicator

Whether the sprite has a visible indicator for being empty or not.
internal_magazine

Whether the gun has an internal magazine or a detatchable one. Overridden by BOLT_TYPE_NO_BOLT.
load_empty_sound

sound when inserting an empty magazine
load_sound

sound when inserting magazine
load_sound_vary

whether loading sound should vary
load_sound_volume

volume of loading sound
lock_back_sound

sound of when the bolt is locked back manually
lock_back_sound_vary

whether lock back varies
lock_back_sound_volume

volume of lock back
mag_display

Whether the sprite has a visible magazine or not
mag_display_ammo

Whether the sprite has a visible ammo display or not
mag_type

Compatible magazines with the gun
magazine

Actual magazine currently contained within the gun
magazine_wording

Phrasing of the magazine in examine and notification messages; ex: magazine, box, etx
rack_delay

length between individual racks
rack_sound

sound of racking
rack_sound_vary

whether racking sound should vary
rack_sound_volume

volume of racking
recent_rack

time of the most recent rack, used for cooldown purposes
semi_auto

Whether the gun has to be racked each shot or not.
spawnwithmagazine

Whether the gun will spawn loaded with a magazine
special_mags

Whether the gun supports multiple special mag types
tac_reloads

Whether the gun can be tacloaded by slapping a fresh magazine directly on it
Proc Details
blow_up
used for sawing guns, causes the gun to fire without the input of the user
chamber_round
Used to chamber a new round and eject the old one
drop_bolt
Drops the bolt from a locked position
eject_magazine
Handles all the logic of magazine ejection, if tac_load is set that magazine will be tacloaded in the place of the old eject
get_ammo
Gets the number of bullets in the gun
get_ammo_list
gets a list of every bullet in the gun
insert_magazine
Handles all the logic needed for magazine insertion
install_suppressor
Installs a new suppressor, assumes that the suppressor is already in the contents of src
postfire_empty_checks
postfire empty checks for bolt locking and sound alarms
prefire_empty_checks
Prefire empty checks for the bolt drop
rack
updates a bunch of racking related stuff and also handles the sound effects and the like
sawoff
Handles all the logic of sawing off guns,