diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 8643a20aaa5..c2c01afd5cb 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -13,6 +13,8 @@ var/times_used = 0 //Number of times it's been used. var/broken = 0 //Is the flash burnt out? var/last_used = 0 //last world.time it was used. + var/battery_panel = 0 //whether the flash can be modified with a cell or not + var/overcharged = 0 //if overcharged the flash will set people on fire then immediately burn out (does so even if it doesn't blind them). /obj/item/device/flash/proc/clown_check(mob/user) @@ -21,6 +23,21 @@ return 0 return 1 +/obj/item/device/flash/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/weapon/screwdriver)) + if(battery_panel) + user << "You close the battery compartment on the [src]." + battery_panel = 0 + else + user << "You open the battery compartment on the [src]." + battery_panel = 1 + if(battery_panel && !overcharged) + if(istype(W, /obj/item/weapon/stock_parts/cell)) + user << "You jam the cell into battery compartment on the [src]." + qdel(W) + overcharged = 1 + overlays += "overcharge" + /obj/item/device/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something. broken = 1 @@ -79,6 +96,10 @@ if(iscarbon(M)) flash_carbon(M, user, 5, 1) + if(overcharged) + M.adjust_fire_stacks(6) + M.IgniteMob() + burn_out() return 1 else if(issilicon(M)) diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 6d1d9eb401f..374d95f9bc1 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ