From fac6caffca426aca196c0db2cc479c0817a5585c Mon Sep 17 00:00:00 2001 From: scrubs2009 Date: Sat, 20 Jan 2018 17:12:29 -0600 Subject: [PATCH 1/2] Longer lasting candles. --- code/game/objects/items/candle.dm | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index a382ff5b5c..af9c069816 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD #define CANDLE_LUMINOSITY 2 /obj/item/candle name = "red candle" @@ -80,3 +81,87 @@ start_lit = TRUE #undef CANDLE_LUMINOSITY +======= +#define CANDLE_LUMINOSITY 2 +/obj/item/candle + name = "red candle" + desc = "In Greek myth, Prometheus stole fire from the Gods and gave it to \ + humankind. The jewelry he kept for himself." + icon = 'icons/obj/candle.dmi' + icon_state = "candle1" + item_state = "candle1" + w_class = WEIGHT_CLASS_TINY + light_color = LIGHT_COLOR_FIRE + var/wax = 1000 + var/lit = FALSE + var/infinite = FALSE + var/start_lit = FALSE + heat = 1000 + +/obj/item/candle/New() + ..() + if(start_lit) + // No visible message + light(show_message = FALSE) + +/obj/item/candle/update_icon() + var/i + if(wax>750) + i = 1 + else if(wax>400) + i = 2 + else i = 3 + icon_state = "candle[i][lit ? "_lit" : ""]" + + +/obj/item/candle/attackby(obj/item/W, mob/user, params) + ..() + var/msg = W.ignition_effect(src, user) + if(msg) + light(msg) + +/obj/item/candle/fire_act(exposed_temperature, exposed_volume) + if(!src.lit) + light() //honk + ..() + +/obj/item/candle/proc/light(show_message) + if(!src.lit) + src.lit = TRUE + //src.damtype = "fire" + if(show_message) + usr.visible_message(show_message) + set_light(CANDLE_LUMINOSITY) + START_PROCESSING(SSobj, src) + update_icon() + + +/obj/item/candle/process() + if(!lit) + return + if(!infinite) + wax-- + if(!wax) + new/obj/item/trash/candle(src.loc) + qdel(src) + update_icon() + open_flame() + +/obj/item/candle/attack_self(mob/user) + if(lit) + user.visible_message( + "[user] snuffs [src].") + lit = FALSE + update_icon() + set_light(0) + +/obj/item/candle/is_hot() + return lit * heat + + +/obj/item/candle/infinite + infinite = TRUE + start_lit = TRUE + +#undef CANDLE_LUMINOSITY +>>>>>>> e653845... Longer lasting candles. From 61c245ebefd4e6e01b5243511d9005879c3c844a Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 21 Jan 2018 23:07:11 -0600 Subject: [PATCH 2/2] Update candle.dm --- code/game/objects/items/candle.dm | 85 ------------------------------- 1 file changed, 85 deletions(-) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index af9c069816..a0ec648a1a 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -1,87 +1,3 @@ -<<<<<<< HEAD -#define CANDLE_LUMINOSITY 2 -/obj/item/candle - name = "red candle" - desc = "In Greek myth, Prometheus stole fire from the Gods and gave it to \ - humankind. The jewelry he kept for himself." - icon = 'icons/obj/candle.dmi' - icon_state = "candle1" - item_state = "candle1" - w_class = WEIGHT_CLASS_TINY - light_color = LIGHT_COLOR_FIRE - var/wax = 200 - var/lit = FALSE - var/infinite = FALSE - var/start_lit = FALSE - heat = 1000 - -/obj/item/candle/New() - ..() - if(start_lit) - // No visible message - light(show_message = FALSE) - -/obj/item/candle/update_icon() - var/i - if(wax>150) - i = 1 - else if(wax>80) - i = 2 - else i = 3 - icon_state = "candle[i][lit ? "_lit" : ""]" - - -/obj/item/candle/attackby(obj/item/W, mob/user, params) - ..() - var/msg = W.ignition_effect(src, user) - if(msg) - light(msg) - -/obj/item/candle/fire_act(exposed_temperature, exposed_volume) - if(!src.lit) - light() //honk - ..() - -/obj/item/candle/proc/light(show_message) - if(!src.lit) - src.lit = TRUE - //src.damtype = "fire" - if(show_message) - usr.visible_message(show_message) - set_light(CANDLE_LUMINOSITY) - START_PROCESSING(SSobj, src) - update_icon() - - -/obj/item/candle/process() - if(!lit) - return - if(!infinite) - wax-- - if(!wax) - new/obj/item/trash/candle(src.loc) - qdel(src) - update_icon() - open_flame() - -/obj/item/candle/attack_self(mob/user) - if(lit) - user.visible_message( - "[user] snuffs [src].") - lit = FALSE - update_icon() - set_light(0) - -/obj/item/candle/is_hot() - return lit * heat - - -/obj/item/candle/infinite - infinite = TRUE - start_lit = TRUE - -#undef CANDLE_LUMINOSITY -======= #define CANDLE_LUMINOSITY 2 /obj/item/candle name = "red candle" @@ -164,4 +80,3 @@ start_lit = TRUE #undef CANDLE_LUMINOSITY ->>>>>>> e653845... Longer lasting candles.