diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 0600c2db919..369a0153b4c 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -136,4 +136,62 @@ set src in oview(1) if(!usr.stat) - attack_self(usr) \ No newline at end of file + attack_self(usr) + +// FLARES + +/obj/item/device/flashlight/flare + name = "flare" + desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'." + w_class = 2.0 + brightness_on = 7 // Pretty bright. + icon_state = "flare" + item_state = "flare" + var/fuel = 0 + var/on_damage = 7 + var/produce_heat = 1500 + +/obj/item/device/flashlight/flare/New() + fuel = rand(6000, 9000) // Last 10 to 15 minutes. + ..() + +/obj/item/device/flashlight/flare/attack(mob/living/M as mob, mob/living/user as mob) + ..(M, user, 0) + +/obj/item/device/flashlight/flare/process() + var/turf/pos = get_turf(src) + pos.hotspot_expose(produce_heat, 5) + fuel = max(fuel - 1, 0) + if(!fuel || !on) + turn_off() + if(!fuel) + src.icon_state = "[initial(icon_state)]-empty" + processing_objects -= src + +/obj/item/device/flashlight/flare/proc/turn_off() + on = 0 + src.force = initial(src.force) + src.damtype = initial(src.damtype) + if(ismob(loc)) + var/mob/U = loc + update_brightness(U) + else + update_brightness(null) + +/obj/item/device/flashlight/flare/attack_self(mob/user) + // Usual checks + if(loc != usr) + return + if(!fuel) + user << "It's out of fuel." + return + if(!on) + user.visible_message("[user] activates the flare.", "You pull the cord on the flare, activating it!") + else + return + // All good, turn it on. + on = 1 + update_brightness(user) + src.force = on_damage + src.damtype = "fire" + processing_objects += src \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index c09391151cf..6db3b4dc691 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -10,6 +10,8 @@ new /obj/item/weapon/extinguisher/mini(src) if(prob(50)) new /obj/item/device/flashlight(src) + else + new /obj/item/device/flashlight/flare(src) new /obj/item/device/radio(src) /obj/item/weapon/storage/toolbox/mechanical/New() diff --git a/html/changelog.html b/html/changelog.html index fc9a9a58f15..8e79b6567ce 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,8 @@ should be listed in the changelog upon commit tho. Thanks. -->
  • Hive Channel/Hive Absorb. Allows you to share your DNA with other changelings, very expensive chemical wise to absorb (download), not so much to channel (upload)! You cannot achieve your objective by sharing DNA.
  • Mimic Voice! You can form your voice of a name you enter. You won't look like them but when you talk, people will hear the name of who you selected. While you're mimicing, you can't regenerate chemicals.
  • Extract DNA! A power that allows you to silently sting someone and take their DNA! Meaning you do not have to absorb someone to become them. Extracting their DNA doesn't count towards completing your objectives.
  • +
  • You can now get flares from red emergency toolboxes. Has a 50% chance of a flash-light or a flare spawning.
  • +
  • Flare icon by Ausops!
  • diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index f143a1bb192..89160c62086 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/mob/items_righthand.dmi b/icons/mob/items_righthand.dmi index 9635aff3251..6826a19b69a 100644 Binary files a/icons/mob/items_righthand.dmi and b/icons/mob/items_righthand.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index e2577f62b48..3fc0b1e0c9f 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ