mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
[s] Fixes flayers borking radios sometimes (#27293)
* Fixes flayers borking radios sometimes * Typo
This commit is contained in:
@@ -82,6 +82,8 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
|
||||
var/requires_tcomms = FALSE // Does this device require tcomms to work.If TRUE it wont function at all without tcomms. If FALSE, it will work without tcomms, just slowly
|
||||
var/instant = FALSE // Should this device instantly communicate if there isnt tcomms
|
||||
|
||||
/// A timer that, when going off, will turn this radio on again
|
||||
var/radio_enable_timer
|
||||
|
||||
/obj/item/radio/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
|
||||
@@ -373,23 +373,23 @@
|
||||
/obj/item/melee/baton/flayerprod/baton_stun(mob/living/L, mob/user, skip_cooldown, ignore_shield_check = FALSE)
|
||||
if(..())
|
||||
disable_radio(L)
|
||||
L.radio_enable_timer = addtimer(CALLBACK(src, PROC_REF(enable_radio), L), radio_disable_time, TIMER_UNIQUE | TIMER_OVERRIDE | TIMER_STOPPABLE | TIMER_DELETE_ME)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/melee/baton/flayerprod/proc/disable_radio(mob/living/L)
|
||||
var/list/all_items = L.GetAllContents()
|
||||
for(var/obj/item/radio/R in all_items)
|
||||
R.radio_enable_timer = addtimer(CALLBACK(src, PROC_REF(enable_radio), R), radio_disable_time, TIMER_UNIQUE | TIMER_OVERRIDE | TIMER_STOPPABLE | TIMER_DELETE_ME)
|
||||
R.on = FALSE
|
||||
R.listening = FALSE
|
||||
R.broadcasting = FALSE
|
||||
L.visible_message("<span class='warning'>[R] buzzes loudly as it short circuits!</span>", blind_message = "<span class='notice'>You hear a loud, electronic buzzing.</span>")
|
||||
|
||||
/obj/item/melee/baton/flayerprod/proc/enable_radio(mob/living/L)
|
||||
var/list/all_items = L.GetAllContents()
|
||||
for(var/obj/item/radio/R in all_items)
|
||||
R.on = TRUE
|
||||
R.listening = TRUE
|
||||
/obj/item/melee/baton/flayerprod/proc/enable_radio(obj/item/radio/R)
|
||||
if(QDELETED(R))
|
||||
return
|
||||
R.on = TRUE
|
||||
R.listening = TRUE
|
||||
|
||||
/obj/item/melee/baton/flayerprod/deductcharge(amount)
|
||||
if(cell.charge < hitcost)
|
||||
|
||||
@@ -117,6 +117,3 @@
|
||||
var/last_taste_text
|
||||
///If a creature gets to be super special and have extra range on their chat messages
|
||||
var/extra_message_range = 0
|
||||
|
||||
/// A timer that, when going off, will enable all the mob's radios again
|
||||
var/radio_enable_timer
|
||||
|
||||
Reference in New Issue
Block a user