Skip to content

Commit

Permalink
click_empty() update, comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Nov 19, 2023
1 parent 4fe2f73 commit c082cf9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions code/modules/vehicles/hardpoints/hardpoint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
for(var/type in buff_multipliers)
vehicle.misc_multipliers[type] *= LAZYACCESS(buff_multipliers, type)
buff_applied = TRUE
vehicle.on_modifiers_change() //check if I need to do this? currently only "accuracy" and "cooldown" need it
vehicle.on_modifiers_change()

/// Removing passive buffs like damage type resistance, speed, accuracy, cooldowns.
/obj/item/hardpoint/proc/remove_buff(obj/vehicle/multitile/vehicle)
Expand All @@ -230,7 +230,7 @@
for(var/type in buff_multipliers)
vehicle.misc_multipliers[type] *= 1 / LAZYACCESS(buff_multipliers, type)
buff_applied = FALSE
vehicle.on_modifiers_change() //check if I need to do this? currently only "accuracy" and "cooldown" need it
vehicle.on_modifiers_change()

/// Recalculates hardpoint values based on vehicle modifiers.
/obj/item/hardpoint/proc/recalculate_hardpoint_bonuses()
Expand Down Expand Up @@ -601,7 +601,7 @@
return NONE

if(ammo && ammo.current_rounds <= 0)
click_empty()
click_empty(user)
return NONE

if(!in_firing_arc(target))
Expand Down Expand Up @@ -670,11 +670,9 @@

/// Plays 'click' noise and announced to chat. Usually called when weapon empty.
/obj/item/hardpoint/proc/click_empty(mob/user)
playsound(src, 'sound/weapons/gun_empty.ogg', 25, 1, 5)
if(user)
to_chat(user, SPAN_WARNING("<b>*click*</b>"))
playsound(user, 'sound/weapons/gun_empty.ogg', 25, 1, 5) //5 tile range
else
playsound(src, 'sound/weapons/gun_empty.ogg', 25, 1, 5)

/// Selects and plays a firing sound from the list.
/obj/item/hardpoint/proc/play_firing_sounds()
Expand Down

0 comments on commit c082cf9

Please sign in to comment.