mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
[MDB Ignore] [IDB Ignore] Kills off /obj/item/device (#21774)
This has zero reason to exist in our code base. We have no procs or variables tied to this. I removed it to make future modifications cleaner. --------- Signed-off-by: Cody Brittain <1779662+Generalcamo@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/obj/item/device/flash
|
||||
/obj/item/flash
|
||||
name = "flash"
|
||||
desc = "A security device capable of producing a blinding, incapacitating flash at close ranges. Repeated use may result in a burnt-out bulb and/or excessive force investigations."
|
||||
icon = 'icons/obj/item/device/flash.dmi'
|
||||
icon = 'icons/obj/item/flash.dmi'
|
||||
icon_state = "flash"
|
||||
item_state = "flash"
|
||||
throwforce = 5
|
||||
@@ -17,12 +17,12 @@
|
||||
|
||||
var/last_use = 0
|
||||
|
||||
/obj/item/device/flash/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
/obj/item/flash/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
. += "Click on someone adjacent to you to attempt to blind them."
|
||||
. += "Use it in your hand with HARM intent, or on yourself, to blind everyone in a small radius (including yourself!)"
|
||||
|
||||
/obj/item/device/flash/feedback_hints(mob/user, distance, is_adjacent)
|
||||
/obj/item/flash/feedback_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
if(!broken)
|
||||
var/num_charges = max(0, max_charges - times_used)
|
||||
@@ -30,20 +30,20 @@
|
||||
else
|
||||
. += SPAN_ALERT("\The [src]'s bulb is burnt out!")
|
||||
|
||||
/obj/item/device/flash/proc/clumsy_check(mob/user)
|
||||
/obj/item/flash/proc/clumsy_check(mob/user)
|
||||
if(user && (user.is_clumsy()) && prob(50))
|
||||
to_chat(user, SPAN_WARNING("\The [src] slips out of your hand."))
|
||||
user.drop_from_inventory(src)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/flash/proc/cooldown()
|
||||
/obj/item/flash/proc/cooldown()
|
||||
if(broken || times_used >= max_charges)
|
||||
return TRUE
|
||||
|
||||
return world.time > (last_use + 1 SECOND)
|
||||
|
||||
/obj/item/device/flash/proc/burnout_check(mob/user, intensity = 1)
|
||||
/obj/item/flash/proc/burnout_check(mob/user, intensity = 1)
|
||||
if(times_used >= max_charges)
|
||||
to_chat(user, SPAN_WARNING("*click* *click*"))
|
||||
return TRUE
|
||||
@@ -52,16 +52,16 @@
|
||||
burnout(user)
|
||||
else
|
||||
times_used++
|
||||
addtimer(CALLBACK(src, /obj/item/device/flash/proc/flash_recharge), 30 SECONDS, TIMER_STOPPABLE|TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, /obj/item/flash/proc/flash_recharge), 30 SECONDS, TIMER_STOPPABLE|TIMER_UNIQUE)
|
||||
|
||||
/obj/item/device/flash/proc/burnout(mob/user)
|
||||
/obj/item/flash/proc/burnout(mob/user)
|
||||
broken = TRUE
|
||||
icon_state = "flashburnt"
|
||||
name = "burnt-out [initial(name)]"
|
||||
to_chat(user, SPAN_WARNING("The bulb has burnt out!"))
|
||||
spark(get_turf(src))
|
||||
|
||||
/obj/item/device/flash/proc/flash(mob/living/L, _intensity = FLASH_PROTECTION_MAJOR)
|
||||
/obj/item/flash/proc/flash(mob/living/L, _intensity = FLASH_PROTECTION_MAJOR)
|
||||
last_use = world.time
|
||||
|
||||
if(L.flash_act(intensity = _intensity, affect_silicon = TRUE, ignore_inherent = TRUE))
|
||||
@@ -72,14 +72,14 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/flash/proc/flash_recharge()
|
||||
/obj/item/flash/proc/flash_recharge()
|
||||
if(broken)
|
||||
return
|
||||
times_used = max(0, times_used - 1)
|
||||
if(times_used > 0)
|
||||
addtimer(CALLBACK(src, /obj/item/device/flash/proc/flash_recharge), 30 SECONDS, TIMER_STOPPABLE|TIMER_UNIQUE)
|
||||
addtimer(CALLBACK(src, /obj/item/flash/proc/flash_recharge), 30 SECONDS, TIMER_STOPPABLE|TIMER_UNIQUE)
|
||||
|
||||
/obj/item/device/flash/proc/robot_flash(mob/user)
|
||||
/obj/item/flash/proc/robot_flash(mob/user)
|
||||
if(!isrobot(user))
|
||||
return
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
QDEL_IN(animation, 5)
|
||||
|
||||
//attack_as_weapon
|
||||
/obj/item/device/flash/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
/obj/item/flash/attack(mob/living/target_mob, mob/living/user, target_zone)
|
||||
// Single-target flash
|
||||
if(!target_mob || !user || !clumsy_check(user) || !cooldown())
|
||||
return
|
||||
@@ -128,7 +128,7 @@
|
||||
else
|
||||
user.visible_message(SPAN_NOTICE("[user] fails to blind [target_mob] with \the [src]."))
|
||||
|
||||
/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
/obj/item/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
// AOE flash
|
||||
if(!user || !clumsy_check(user)|| !cooldown())
|
||||
return
|
||||
@@ -156,7 +156,7 @@
|
||||
if(flash(L, _intensity = dist_intensity) && prob(50))
|
||||
L.disable_cloaking_device()
|
||||
|
||||
/obj/item/device/flash/emp_act(severity)
|
||||
/obj/item/flash/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
var/mob/living/L = loc
|
||||
@@ -165,7 +165,7 @@
|
||||
to_chat(L, SPAN_WARNING("Your [src] goes off!"))
|
||||
flash(L)
|
||||
|
||||
/obj/item/device/flash/synthetic
|
||||
/obj/item/flash/synthetic
|
||||
name = "synthetic flash"
|
||||
desc = "A cheap, mass-produced copy of the handheld flash. The bulb inside is probably only good for one use."
|
||||
icon_state = "sflash"
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
max_charges = 1
|
||||
|
||||
/obj/item/device/flash/synthetic/burnout_check(mob/user, intensity = 1)
|
||||
/obj/item/flash/synthetic/burnout_check(mob/user, intensity = 1)
|
||||
. = broken // Single-use
|
||||
if(!broken)
|
||||
burnout(user)
|
||||
|
||||
Reference in New Issue
Block a user