mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 13:02:38 +00:00
[MIRROR] Mini-Nukie Update: The Bulldog is a 2-shot burst fire gun edition (and lone ops get some spare ammo for their bulldog) (#26818)
* Mini-Nukie Update: The Bulldog is a 2-shot burst fire gun edition (and lone ops get some spare ammo for their bulldog) * Update code/modules/projectiles/guns/ballistic/shotgun.dm --------- Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
This commit is contained in:
@@ -130,6 +130,12 @@
|
||||
///What is the cap on our misfire probability? Do not set this to 100.
|
||||
var/misfire_probability_cap = 25
|
||||
|
||||
/// Fire Selector Variables ///
|
||||
/// Tracks the firemode of burst weapons. TRUE means it is in burst mode.
|
||||
var/burst_fire_selection = FALSE
|
||||
/// If it has an icon for a selector switch indicating current firemode.
|
||||
var/selector_switch_icon = FALSE
|
||||
|
||||
/obj/item/gun/ballistic/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!spawn_magazine_type)
|
||||
@@ -200,6 +206,14 @@
|
||||
|
||||
/obj/item/gun/ballistic/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(selector_switch_icon)
|
||||
switch(burst_fire_selection)
|
||||
if(FALSE)
|
||||
. += "[initial(icon_state)]_semi"
|
||||
if(TRUE)
|
||||
. += "[initial(icon_state)]_burst"
|
||||
|
||||
if(show_bolt_icon)
|
||||
if (bolt_type == BOLT_TYPE_LOCKING)
|
||||
. += "[icon_state]_bolt[bolt_locked ? "_locked" : ""]"
|
||||
@@ -249,6 +263,27 @@
|
||||
if(capacity_number)
|
||||
. += "[icon_state]_mag_[capacity_number]"
|
||||
|
||||
/obj/item/gun/ballistic/ui_action_click(mob/user, actiontype)
|
||||
if(istype(actiontype, /datum/action/item_action/toggle_firemode))
|
||||
burst_select()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/gun/ballistic/proc/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
burst_fire_selection = !burst_fire_selection
|
||||
if(!burst_fire_selection)
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
balloon_alert(user, "switched to semi-automatic")
|
||||
else
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
balloon_alert(user, "switched to [burst_size]-round burst")
|
||||
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
|
||||
update_appearance()
|
||||
update_item_action_buttons()
|
||||
|
||||
/obj/item/gun/ballistic/handle_chamber(empty_chamber = TRUE, from_firing = TRUE, chamber_next_round = TRUE)
|
||||
if(!semi_auto && from_firing)
|
||||
|
||||
@@ -9,41 +9,7 @@
|
||||
fire_sound_volume = 90
|
||||
rack_sound = 'sound/weapons/gun/smg/smgrack.ogg'
|
||||
suppressed_sound = 'sound/weapons/gun/smg/shot_suppressed.ogg'
|
||||
var/select = 1 ///fire selector position. 1 = semi, 2 = burst. anything past that can vary between guns.
|
||||
var/selector_switch_icon = FALSE ///if it has an icon for a selector switch indicating current firemode.
|
||||
|
||||
/obj/item/gun/ballistic/automatic/update_overlays()
|
||||
. = ..()
|
||||
if(!selector_switch_icon)
|
||||
return
|
||||
|
||||
switch(select)
|
||||
if(0)
|
||||
. += "[initial(icon_state)]_semi"
|
||||
if(1)
|
||||
. += "[initial(icon_state)]_burst"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/ui_action_click(mob/user, actiontype)
|
||||
if(istype(actiontype, /datum/action/item_action/toggle_firemode))
|
||||
burst_select()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/proc/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
select = !select
|
||||
if(!select)
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
balloon_alert(user, "switched to semi-automatic")
|
||||
else
|
||||
burst_size = initial(burst_size)
|
||||
fire_delay = initial(fire_delay)
|
||||
balloon_alert(user, "switched to [burst_size]-round burst")
|
||||
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
|
||||
update_appearance()
|
||||
update_item_action_buttons()
|
||||
burst_fire_selection = TRUE
|
||||
|
||||
/obj/item/gun/ballistic/automatic/proto
|
||||
name = "\improper Nanotrasen Saber SMG"
|
||||
@@ -205,14 +171,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/gun/ballistic/automatic/m90/update_overlays()
|
||||
. = ..()
|
||||
switch(select)
|
||||
if(0)
|
||||
. += "[initial(icon_state)]_semi"
|
||||
if(1)
|
||||
. += "[initial(icon_state)]_burst"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/tommygun
|
||||
name = "\improper Thompson SMG"
|
||||
desc = "Based on the classic 'Chicago Typewriter'."
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
/obj/item/gun/ballistic/shotgun/bulldog
|
||||
name = "\improper Bulldog Shotgun"
|
||||
desc = "A semi-auto, mag-fed shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines. Can have a secondary magazine attached to quickly swap between ammo types, or just to keep shooting."
|
||||
desc = "A 2-round burst fire, mag-fed shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines. Can have a secondary magazine attached to quickly swap between ammo types, or just to keep shooting."
|
||||
icon_state = "bulldog"
|
||||
inhand_icon_state = "bulldog"
|
||||
worn_icon_state = "cshotgun"
|
||||
@@ -148,10 +148,11 @@
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
accepted_magazine_type = /obj/item/ammo_box/magazine/m12g
|
||||
can_suppress = FALSE
|
||||
burst_size = 1
|
||||
fire_delay = 10 //Skyrat edit - Original: 0
|
||||
burst_size = 2
|
||||
fire_delay = 10 //Skyrat edit - Original: 1
|
||||
pin = /obj/item/firing_pin/implant/pindicate
|
||||
fire_sound = 'sound/weapons/gun/shotgun/shot_alt.ogg'
|
||||
actions_types = list(/datum/action/item_action/toggle_firemode)
|
||||
mag_display = TRUE
|
||||
empty_indicator = TRUE
|
||||
empty_alarm = TRUE
|
||||
@@ -160,6 +161,7 @@
|
||||
semi_auto = TRUE
|
||||
internal_magazine = FALSE
|
||||
tac_reloads = TRUE
|
||||
burst_fire_selection = TRUE
|
||||
///the type of secondary magazine for the bulldog
|
||||
var/secondary_magazine_type
|
||||
///the secondary magazine
|
||||
|
||||
Reference in New Issue
Block a user