ballistic
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 | |
alternative_ammo_misfires | If only our alternative ammuntion misfires and not our main ammunition, we set this to TRUE |
---|---|
alternative_caliber | our alternative ammo type. |
alternative_fire_sound | our alternative fire sound, in case we want our gun to be louder or quieter or whatever |
bolt | The bolt type controls how the gun functions, and what iconstates you'll need to represent those functions. /datum/gun_bolt - The Slide doesn't lock back. Clicking on it will only cycle the bolt. Only 1 sprite. /datum/gun_bolt/open - Same as standard, but it fires directly from the magazine - No need to rack. Doesn't hold the bullet when you drop the mag. /datum/gun_bolt/locking - This is most handguns and bolt action rifles. The bolt will lock back when it's empty. You need yourgun_bolt and yourgun_bolt_locked icon states. /datum/gun_bolt/no_bolt - This is shotguns and revolvers. clicking will dump out all the bullets in the gun, spent or not. |
bolt_drop_sound | sound of dropping the bolt or releasing a slide |
bolt_drop_sound_volume | volume of bolt drop/slide release |
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 |
can_misfire | Misfire Variables /// Whether our ammo misfires now or when it's set by the wrench_act. TRUE means it misfires. |
can_modify_ammo | Can we modify our ammo type in this gun's internal magazine? |
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. |
hidden_chambered | pixel offset for the suppressor overlay on the y axis. Check if you are able to see if a weapon has a bullet loaded in or not. |
initial_caliber | our initial ammo type. Should match initial caliber, but a bit of redundency doesn't hurt. |
initial_fire_sound | our initial fire sound. same reasons for initial caliber |
internal_magazine | Whether the gun has an internal magazine or a detatchable one. Overridden by /datum/gun_bolt/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 |
misfire_percentage_increment | How much does shooting the gun increment the misfire probability? |
misfire_probability | How likely is our gun to misfire? |
misfire_probability_cap | What is the cap on our misfire probability? Do not set this to 100. |
one_hand_rack | Can you rack this weapon with one hand? |
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 | Hides the bolt icon. Whether the gun has to be racked each shot or not. |
show_caliber_on_examine | If TRUE, will show the caliber name on examine. Set to false for things with fake calibers like bows and the tentacle "gun". |
spawnwithmagazine | Whether the gun will spawn loaded with a magazine |
special_mags | Whether the gun supports multiple special mag types |
suppressor_y_offset | pixel offset for the suppressor overlay on the x axis. |
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 |
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, |
unload | Removes the magazine from the weapon, or ejects all of it's ammo, based on the bolt type. |
Var Details
alternative_ammo_misfires
If only our alternative ammuntion misfires and not our main ammunition, we set this to TRUE
alternative_caliber
our alternative ammo type.
alternative_fire_sound
our alternative fire sound, in case we want our gun to be louder or quieter or whatever
bolt
The bolt type controls how the gun functions, and what iconstates you'll need to represent those functions. /datum/gun_bolt - The Slide doesn't lock back. Clicking on it will only cycle the bolt. Only 1 sprite. /datum/gun_bolt/open - Same as standard, but it fires directly from the magazine - No need to rack. Doesn't hold the bullet when you drop the mag. /datum/gun_bolt/locking - This is most handguns and bolt action rifles. The bolt will lock back when it's empty. You need yourgun_bolt and yourgun_bolt_locked icon states. /datum/gun_bolt/no_bolt - This is shotguns and revolvers. clicking will dump out all the bullets in the gun, spent or not.
bolt_drop_sound
sound of dropping the bolt or releasing a slide
bolt_drop_sound_volume
volume of bolt drop/slide release
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
can_misfire
Misfire Variables /// Whether our ammo misfires now or when it's set by the wrench_act. TRUE means it misfires.
can_modify_ammo
Can we modify our ammo type in this gun's internal magazine?
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.
hidden_chambered
pixel offset for the suppressor overlay on the y axis. Check if you are able to see if a weapon has a bullet loaded in or not.
initial_caliber
our initial ammo type. Should match initial caliber, but a bit of redundency doesn't hurt.
initial_fire_sound
our initial fire sound. same reasons for initial caliber
internal_magazine
Whether the gun has an internal magazine or a detatchable one. Overridden by /datum/gun_bolt/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
misfire_percentage_increment
How much does shooting the gun increment the misfire probability?
misfire_probability
How likely is our gun to misfire?
misfire_probability_cap
What is the cap on our misfire probability? Do not set this to 100.
one_hand_rack
Can you rack this weapon with one hand?
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
Hides the bolt icon. Whether the gun has to be racked each shot or not.
show_caliber_on_examine
If TRUE, will show the caliber name on examine. Set to false for things with fake calibers like bows and the tentacle "gun".
spawnwithmagazine
Whether the gun will spawn loaded with a magazine
special_mags
Whether the gun supports multiple special mag types
suppressor_y_offset
pixel offset for the suppressor overlay on the x axis.
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
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,
unload
Removes the magazine from the weapon, or ejects all of it's ammo, based on the bolt type.