mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
Add torches (#10838)
This commit is contained in:
@@ -55,4 +55,69 @@
|
||||
user.visible_message(SPAN_NOTICE("\The [user] activates the flare."), SPAN_NOTICE("You pull the cord on the flare, activating it!"))
|
||||
src.force = on_damage
|
||||
src.damtype = "fire"
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/device/flashlight/flare/torch
|
||||
name = "torch"
|
||||
desc = "A rustic source of light."
|
||||
w_class = ITEMSIZE_LARGE
|
||||
brightness_on = 2
|
||||
light_power = 3
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
icon_state = "torch"
|
||||
item_state = "torch"
|
||||
uv_intensity = 40
|
||||
produce_heat = 1000
|
||||
on_damage = 10
|
||||
|
||||
drop_sound = 'sound/items/drop/woodweapon.ogg'
|
||||
pickup_sound = 'sound/items/pickup/woodweapon.ogg'
|
||||
|
||||
/obj/item/device/flashlight/flare/torch/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/device/flashlight/flare/torch/update_icon()
|
||||
..()
|
||||
item_state = icon_state
|
||||
if(ismob(src.loc))
|
||||
var/mob/H = src.loc
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
|
||||
/obj/item/device/flashlight/flare/torch/proc/light(mob/user)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] lights \the [src]."), SPAN_NOTICE("You light \the [src]."))
|
||||
force = on_damage
|
||||
damtype = "fire"
|
||||
on = TRUE
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/flare/torch/attackby(var/obj/item/W, mob/user)
|
||||
if(W.isFlameSource() && !on && fuel)
|
||||
light(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/torch
|
||||
name = "torch handle"
|
||||
desc = "A torch handle without its head."
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
icon_state = "torch-empty"
|
||||
item_state = "torch-empty"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_lighting.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_lighting.dmi',
|
||||
)
|
||||
|
||||
drop_sound = 'sound/items/drop/woodweapon.ogg'
|
||||
pickup_sound = 'sound/items/pickup/woodweapon.ogg'
|
||||
|
||||
/obj/item/torch/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/reagent_containers/glass/rag))
|
||||
to_chat(user, SPAN_NOTICE("You add \the [I] to \the [src]."))
|
||||
var/obj/item/device/flashlight/flare/torch/T = new()
|
||||
qdel(I)
|
||||
user.put_in_hands(T)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user