diff --git a/code/game/objects/items/devices/lighting/flare.dm b/code/game/objects/items/devices/lighting/flare.dm index 25cce20b6f1..e4cdb850f1e 100644 --- a/code/game/objects/items/devices/lighting/flare.dm +++ b/code/game/objects/items/devices/lighting/flare.dm @@ -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) \ No newline at end of file + 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) diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index d10088e7f2f..be1c104c5b9 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -175,7 +175,8 @@ new /datum/stack_recipe("ore box", /obj/structure/ore_box, BUILD_AMT, time = 15, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 4, one_per_turf = 0, on_floor = 0), new /datum/stack_recipe("shaft", /obj/item/material/shaft, 10, time = 25, one_per_turf = 0, on_floor = 0), - new /datum/stack_recipe("buckler donut", /obj/item/material/woodenshield, 20, time = 25, one_per_turf = 0, on_floor = 0) + new /datum/stack_recipe("buckler donut", /obj/item/material/woodenshield, 20, time = 25, one_per_turf = 0, on_floor = 0), + new /datum/stack_recipe("torch handle", /obj/item/torch, 3, time = 5, one_per_turf = 0, on_floor = 0) )) /material/stone/generate_recipes() diff --git a/html/changelogs/alberyk-torches.yml b/html/changelogs/alberyk-torches.yml new file mode 100644 index 00000000000..3c3ac5bd6df --- /dev/null +++ b/html/changelogs/alberyk-torches.yml @@ -0,0 +1,6 @@ +author: Alberyk + +delete-after: True + +changes: + - rscadd: "Added craftable torches." diff --git a/icons/mob/items/lefthand_lighting.dmi b/icons/mob/items/lefthand_lighting.dmi index 6ede28ce08c..29442efff9c 100644 Binary files a/icons/mob/items/lefthand_lighting.dmi and b/icons/mob/items/lefthand_lighting.dmi differ diff --git a/icons/mob/items/righthand_lighting.dmi b/icons/mob/items/righthand_lighting.dmi index e8a8405973f..1604c9e26f3 100644 Binary files a/icons/mob/items/righthand_lighting.dmi and b/icons/mob/items/righthand_lighting.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index 607c9c6d278..9b54b396488 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ