mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-23-10-2025
This commit is contained in:
@@ -142,6 +142,8 @@
|
||||
var/selector_switch_icon = FALSE
|
||||
/// Suppressor attached to the gun, if any
|
||||
var/obj/item/suppressor/suppressor = null
|
||||
/// Sound played when the burst mode is changed
|
||||
var/burst_select_sound = SFX_FIRE_MODE_SWITCH
|
||||
|
||||
/obj/item/gun/ballistic/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -291,7 +293,10 @@
|
||||
fire_delay = initial(fire_delay)
|
||||
balloon_alert(user, "switched to [burst_size]-round burst")
|
||||
|
||||
playsound(user, 'sound/items/weapons/empty.ogg', 100, TRUE)
|
||||
if(burst_select_sound)
|
||||
playsound(user, burst_select_sound, 50, TRUE)
|
||||
else
|
||||
playsound(user, 'sound/items/weapons/empty.ogg', 100, TRUE)
|
||||
update_appearance()
|
||||
update_item_action_buttons()
|
||||
|
||||
|
||||
@@ -471,29 +471,24 @@
|
||||
balloon_alert(user, "system reset")
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/gun/ballistic/automatic/battle_rifle/try_fire_gun(atom/target, mob/living/user, params)
|
||||
. = ..()
|
||||
if(!chambered || (chambered && !chambered.loaded_projectile))
|
||||
return
|
||||
|
||||
if(shots_before_degradation)
|
||||
shots_before_degradation --
|
||||
return
|
||||
|
||||
else if ((obj_flags & EMAGGED) && degradation_stage == degradation_stage_max && !explosion_timer)
|
||||
perform_extreme_malfunction(user)
|
||||
|
||||
else
|
||||
attempt_degradation(FALSE)
|
||||
|
||||
|
||||
/obj/item/gun/ballistic/automatic/battle_rifle/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
||||
if(chambered.loaded_projectile && prob(75) && (emp_malfunction || degradation_stage == degradation_stage_max))
|
||||
balloon_alert_to_viewers("*click*")
|
||||
playsound(src, dry_fire_sound, dry_fire_sound_volume, TRUE)
|
||||
return
|
||||
|
||||
return ..()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
else if(shots_before_degradation)
|
||||
shots_before_degradation --
|
||||
|
||||
else if ((obj_flags & EMAGGED) && degradation_stage == degradation_stage_max && !explosion_timer)
|
||||
perform_extreme_malfunction(user)
|
||||
|
||||
else
|
||||
attempt_degradation(FALSE)
|
||||
|
||||
/// Proc to handle weapon degradation. Called when attempting to fire or immediately after an EMP takes place.
|
||||
/obj/item/gun/ballistic/automatic/battle_rifle/proc/attempt_degradation(force_increment = FALSE)
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
var/charge_delay = 8
|
||||
/// The amount restored by the gun to the cell per self charge tick
|
||||
var/self_charge_amount = STANDARD_ENERGY_GUN_SELF_CHARGE_RATE
|
||||
/// sound played when fire mode select is done
|
||||
var/fire_mode_switch_sound = SFX_FIRE_MODE_SWITCH
|
||||
|
||||
/obj/item/gun/energy/fire_sounds()
|
||||
// What frequency the energy gun's sound will make
|
||||
@@ -236,6 +238,8 @@
|
||||
chambered = null
|
||||
recharge_newshot(TRUE)
|
||||
update_appearance()
|
||||
if(fire_mode_switch_sound)
|
||||
playsound(src, fire_mode_switch_sound, 50, TRUE)
|
||||
|
||||
/obj/item/gun/energy/update_icon_state()
|
||||
var/skip_inhand = initial(inhand_icon_state) //only build if we aren't using a preset inhand icon
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/list/things_to_disrupt = list(target)
|
||||
if(isliving(target))
|
||||
var/mob/living/live_target = target
|
||||
things_to_disrupt += live_target.get_all_gear()
|
||||
things_to_disrupt += live_target.get_all_gear(INCLUDE_PROSTHETICS|INCLUDE_ABSTRACT|INCLUDE_ACCESSORIES)
|
||||
|
||||
var/success = FALSE
|
||||
for(var/atom/disrupted as anything in things_to_disrupt)
|
||||
|
||||
Reference in New Issue
Block a user