diff --git a/code/__DEFINES/tools.dm b/code/__DEFINES/tools.dm index b0812746cb8..794c56691a6 100644 --- a/code/__DEFINES/tools.dm +++ b/code/__DEFINES/tools.dm @@ -40,6 +40,13 @@ /// Combination flag for any item interaction that blocks the rest of the attack chain #define ITEM_INTERACT_ANY_BLOCKER (ITEM_INTERACT_SUCCESS | ITEM_INTERACT_BLOCKING) +/// How many seconds between each fuel depletion tick ("use" proc) +#define TOOL_FUEL_BURN_INTERVAL 5 + +///This is a number I got by quickly searching up the temperature to melt iron/glass, though not really realistic. +///This is used for places where lighters should not be hot enough to be used as a welding tool on. +#define HIGH_TEMPERATURE_REQUIRED 1500 + /** * A helper for checking if an item interaction should be skipped. * This is only used explicitly because some interactions may not want to ever be skipped. diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 97c7937f674..9294a3ff35e 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1167,13 +1167,13 @@ return TRUE /// Called before [obj/item/proc/use_tool] if there is a delay, or by [obj/item/proc/use_tool] if there isn't. Only ever used by welding tools and stacks, so it's not added on any other [obj/item/proc/use_tool] checks. -/obj/item/proc/tool_start_check(mob/living/user, amount=0) - . = tool_use_check(user, amount) +/obj/item/proc/tool_start_check(mob/living/user, amount=0, heat_required=0) + . = tool_use_check(user, amount, heat_required) if(.) SEND_SIGNAL(src, COMSIG_TOOL_START_USE, user) /// A check called by [/obj/item/proc/tool_start_check] once, and by use_tool on every tick of delay. -/obj/item/proc/tool_use_check(mob/living/user, amount) +/obj/item/proc/tool_use_check(mob/living/user, amount, heat_required) return !amount /// Generic use proc. Depending on the item, it uses up fuel, charges, sheets, etc. Returns TRUE on success, FALSE on failure. diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigarettes.dm similarity index 76% rename from code/game/objects/items/cigs_lighters.dm rename to code/game/objects/items/cigarettes.dm index 35f14640278..76be69b0375 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigarettes.dm @@ -6,8 +6,6 @@ MATCHES CIGARETTES CIGARS SMOKING PIPES -CHEAP LIGHTERS -ZIPPO CIGARETTE PACKETS ARE IN FANCY.DM */ @@ -820,319 +818,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM inhand_icon_on = null inhand_icon_off = null -///////// -//ZIPPO// -///////// -/obj/item/lighter - name = "\improper Zippo lighter" - desc = "The zippo." - icon = 'icons/obj/cigarettes.dmi' - icon_state = "zippo" - inhand_icon_state = "zippo" - worn_icon_state = "lighter" - w_class = WEIGHT_CLASS_TINY - obj_flags = CONDUCTS_ELECTRICITY - slot_flags = ITEM_SLOT_BELT - heat = 1500 - resistance_flags = FIRE_PROOF - grind_results = list(/datum/reagent/iron = 1, /datum/reagent/fuel = 5, /datum/reagent/fuel/oil = 5) - custom_price = PAYCHECK_CREW * 1.1 - light_system = OVERLAY_LIGHT - light_range = 2 - light_power = 1.3 - light_color = LIGHT_COLOR_FIRE - light_on = FALSE - /// Whether the lighter is lit. - var/lit = FALSE - /// Whether the lighter is fancy. Fancy lighters have fancier flavortext and won't burn thumbs. - var/fancy = TRUE - /// The engraving overlay used by this lighter. - var/overlay_state - /// A list of possible engraving overlays. - var/overlay_list = list( - "plain", - "dame", - "thirteen", - "snake" - ) - -/obj/item/lighter/Initialize(mapload) - . = ..() - if(!overlay_state) - overlay_state = pick(overlay_list) - AddComponent(\ - /datum/component/bullet_intercepting,\ - block_chance = 0.5,\ - active_slots = ITEM_SLOT_SUITSTORE,\ - on_intercepted = CALLBACK(src, PROC_REF(on_intercepted_bullet)),\ - ) - update_appearance() - -/// Destroy the lighter when it's shot by a bullet -/obj/item/lighter/proc/on_intercepted_bullet(mob/living/victim, obj/projectile/bullet) - victim.visible_message(span_warning("\The [bullet] shatters on [victim]'s lighter!")) - playsound(victim, SFX_RICOCHET, 100, TRUE) - new /obj/effect/decal/cleanable/oil(get_turf(src)) - do_sparks(1, TRUE, src) - victim.dropItemToGround(src, force = TRUE, silent = TRUE) - qdel(src) - -/obj/item/lighter/cyborg_unequip(mob/user) - if(!lit) - return - set_lit(FALSE) - -/obj/item/lighter/suicide_act(mob/living/carbon/user) - if (lit) - user.visible_message(span_suicide("[user] begins holding \the [src]'s flame up to [user.p_their()] face! It looks like [user.p_theyre()] trying to commit suicide!")) - playsound(src, 'sound/items/welder.ogg', 50, TRUE) - return FIRELOSS - else - user.visible_message(span_suicide("[user] begins whacking [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!")) - return BRUTELOSS - -/obj/item/lighter/update_icon_state() - icon_state = "[initial(icon_state)][lit ? "-on" : ""]" - return ..() - -/obj/item/lighter/update_overlays() - . = ..() - . += create_lighter_overlay() - -/// Generates an overlay used by this lighter. -/obj/item/lighter/proc/create_lighter_overlay() - return mutable_appearance(icon, "lighter_overlay_[overlay_state][lit ? "-on" : ""]") - -/obj/item/lighter/ignition_effect(atom/A, mob/user) - if(get_temperature()) - . = span_infoplain(span_rose("With a single flick of [user.p_their()] wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool.")) - -/obj/item/lighter/proc/set_lit(new_lit) - if(lit == new_lit) - return - - lit = new_lit - if(lit) - force = 5 - damtype = BURN - hitsound = 'sound/items/welder.ogg' - attack_verb_continuous = string_list(list("burns", "singes")) - attack_verb_simple = string_list(list("burn", "singe")) - START_PROCESSING(SSobj, src) - if(isliving(loc)) - var/mob/living/male_model = loc - if(male_model.fire_stacks && !(male_model.on_fire)) - male_model.ignite_mob() - else - hitsound = SFX_SWING_HIT - force = 0 - attack_verb_continuous = null //human_defense.dm takes care of it - attack_verb_simple = null - STOP_PROCESSING(SSobj, src) - set_light_on(lit) - update_appearance() - -/obj/item/lighter/extinguish() - . = ..() - set_lit(FALSE) - -/obj/item/lighter/attack_self(mob/living/user) - if(!user.is_holding(src)) - return ..() - if(lit) - set_lit(FALSE) - if(fancy) - user.visible_message( - span_notice("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow."), - span_notice("You quietly shut off [src] without even looking at what you're doing. Wow.") - ) - playsound(src.loc , 'sound/items/zippo_off.ogg', 100, 1) - else - user.visible_message( - span_notice("[user] quietly shuts off [src]."), - span_notice("You quietly shut off [src].") - ) - playsound(src.loc , 'sound/items/lighter_off.ogg', 100, 1) - return - - set_lit(TRUE) - if(fancy) - user.visible_message( - span_notice("Without even breaking stride, [user] flips open and lights [src] in one smooth movement."), - span_notice("Without even breaking stride, you flip open and light [src] in one smooth movement.") - ) - playsound(src.loc , 'sound/items/zippo_on.ogg', 100, 1) - return - else - playsound(src.loc, 'sound/items/lighter_on.ogg', 100, 1) - - var/hand_protected = FALSE - var/mob/living/carbon/human/human_user = user - if(!istype(human_user) || HAS_TRAIT(human_user, TRAIT_RESISTHEAT) || HAS_TRAIT(human_user, TRAIT_RESISTHEATHANDS)) - hand_protected = TRUE - else if(!istype(human_user.gloves, /obj/item/clothing/gloves)) - hand_protected = FALSE - else - var/obj/item/clothing/gloves/gloves = human_user.gloves - if(gloves.max_heat_protection_temperature) - hand_protected = (gloves.max_heat_protection_temperature > 360) - - if(hand_protected || prob(75)) - user.visible_message( - span_notice("After a few attempts, [user] manages to light [src]."), - span_notice("After a few attempts, you manage to light [src].") - ) - return - - var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND - user.apply_damage(5, BURN, hitzone) - user.visible_message( - span_warning("After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn[user.p_s()] [user.p_their()] finger in the process."), - span_warning("You burn yourself while lighting the lighter!") - ) - user.add_mood_event("burnt_thumb", /datum/mood_event/burnt_thumb) - - -/obj/item/lighter/attack(mob/living/carbon/M, mob/living/carbon/user) - if(lit && M.ignite_mob()) - message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(M)] on fire with [src] at [AREACOORD(user)]") - log_game("[key_name(user)] set [key_name(M)] on fire with [src] at [AREACOORD(user)]") - var/obj/item/cigarette/cig = help_light_cig(M) - if(!lit || !cig || user.combat_mode) - ..() - return - - if(cig.lit) - to_chat(user, span_warning("The [cig.name] is already lit!")) - if(M == user) - cig.attackby(src, user) - return - - if(fancy) - cig.light(span_rose("[user] whips the [name] out and holds it for [M]. [user.p_Their()] arm is as steady as the unflickering flame [user.p_they()] light[user.p_s()] \the [cig] with.")) - else - cig.light(span_notice("[user] holds the [name] out for [M], and lights [M.p_their()] [cig.name].")) - - -/obj/item/lighter/process() - open_flame(heat) - -/obj/item/lighter/get_temperature() - return lit * heat - - -/obj/item/lighter/greyscale - name = "cheap lighter" - desc = "A cheap lighter." - icon_state = "lighter" - fancy = FALSE - overlay_list = list( - "transp", - "tall", - "matte", - "zoppo" //u cant stoppo th zoppo - ) - - /// The color of the lighter. - var/lighter_color - /// The set of colors this lighter can be autoset as on init. - var/list/color_list = list( //Same 16 color selection as electronic assemblies - COLOR_ASSEMBLY_BLACK, - COLOR_FLOORTILE_GRAY, - COLOR_ASSEMBLY_BGRAY, - COLOR_ASSEMBLY_WHITE, - COLOR_ASSEMBLY_RED, - COLOR_ASSEMBLY_ORANGE, - COLOR_ASSEMBLY_BEIGE, - COLOR_ASSEMBLY_BROWN, - COLOR_ASSEMBLY_GOLD, - COLOR_ASSEMBLY_YELLOW, - COLOR_ASSEMBLY_GURKHA, - COLOR_ASSEMBLY_LGREEN, - COLOR_ASSEMBLY_GREEN, - COLOR_ASSEMBLY_LBLUE, - COLOR_ASSEMBLY_BLUE, - COLOR_ASSEMBLY_PURPLE - ) - -/obj/item/lighter/greyscale/Initialize(mapload) - . = ..() - if(!lighter_color) - lighter_color = pick(color_list) - update_appearance() - -/obj/item/lighter/greyscale/create_lighter_overlay() - var/mutable_appearance/lighter_overlay = ..() - lighter_overlay.color = lighter_color - return lighter_overlay - -/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user) - if(get_temperature()) - . = span_notice("After some fiddling, [user] manages to light [A] with [src].") - - -/obj/item/lighter/slime - name = "slime zippo" - desc = "A specialty zippo made from slimes and industry. Has a much hotter flame than normal." - icon_state = "slighter" - heat = 3000 //Blue flame! - light_color = LIGHT_COLOR_CYAN - overlay_state = "slime" - grind_results = list(/datum/reagent/iron = 1, /datum/reagent/fuel = 5, /datum/reagent/medicine/pyroxadone = 5) - -/obj/item/lighter/skull - name = "badass zippo" - desc = "An absolutely badass zippo lighter. Just look at that skull!" - overlay_state = "skull" - -/obj/item/lighter/mime - name = "pale zippo" - desc = "In lieu of fuel, performative spirit can be used to light cigarettes." - icon_state = "mlighter" //These ones don't show a flame. - light_color = LIGHT_COLOR_HALOGEN - heat = 0 //I swear it's a real lighter dude you just can't see the flame dude I promise - overlay_state = "mime" - grind_results = list(/datum/reagent/iron = 1, /datum/reagent/toxin/mutetoxin = 5, /datum/reagent/consumable/nothing = 10) - light_range = 0 - light_power = 0 - fancy = FALSE - -/obj/item/lighter/mime/ignition_effect(atom/A, mob/user) - . = span_infoplain("[user] lifts the [name] to the [A], which miraculously lights!") - -/obj/item/lighter/bright - name = "illuminative zippo" - desc = "Sustains an incredibly bright chemical reaction when you spark it. Avoid looking directly at the igniter when lit." - icon_state = "slighter" - light_color = LIGHT_COLOR_ELECTRIC_CYAN - overlay_state = "bright" - grind_results = list(/datum/reagent/iron = 1, /datum/reagent/flash_powder = 10) - light_range = 8 - light_power = 3 //Irritatingly bright and large enough to cover a small room. - fancy = FALSE - -/obj/item/lighter/bright/examine(mob/user) - . = ..() - - if(lit && isliving(user)) - var/mob/living/current_viewer = user - current_viewer.flash_act(4) - -/obj/item/lighter/bright/ignition_effect(atom/A, mob/user) - if(get_temperature()) - . = span_infoplain(span_rose("[user] lifts the [src] to the [A], igniting it with a brilliant flash of light!")) - var/mob/living/current_viewer = user - current_viewer.flash_act(4) - -/obj/effect/spawner/random/special_lighter - name = "special lighter spawner" - icon_state = "lighter" - loot = list( - /obj/item/lighter/skull, - /obj/item/lighter/mime, - /obj/item/lighter/bright, - ) - /////////// //ROLLING// /////////// diff --git a/code/game/objects/items/lighter.dm b/code/game/objects/items/lighter.dm new file mode 100644 index 00000000000..a0613450b28 --- /dev/null +++ b/code/game/objects/items/lighter.dm @@ -0,0 +1,362 @@ +/obj/item/lighter + name = "\improper Zippo lighter" + desc = "The zippo." + icon = 'icons/obj/cigarettes.dmi' + icon_state = "zippo" + inhand_icon_state = "zippo" + worn_icon_state = "lighter" + w_class = WEIGHT_CLASS_TINY + obj_flags = CONDUCTS_ELECTRICITY + slot_flags = ITEM_SLOT_BELT + resistance_flags = FIRE_PROOF + grind_results = list(/datum/reagent/iron = 1, /datum/reagent/fuel = 5, /datum/reagent/fuel/oil = 5) + custom_price = PAYCHECK_CREW * 1.1 + light_system = OVERLAY_LIGHT + light_range = 2 + light_power = 1.3 + light_color = LIGHT_COLOR_FIRE + light_on = FALSE + toolspeed = 1.5 + tool_behaviour = TOOL_WELDER + ///The amount of heat a lighter has while it's on. We're using the define to ensure lighters can't do things we don't want them to. + var/heat_while_on = HIGH_TEMPERATURE_REQUIRED - 100 + ///The amount of time the lighter has been on for, for fuel consumption. + var/burned_fuel_for = 0 + ///The max amount of fuel the lighter can hold. + var/maximum_fuel = 6 + /// Whether the lighter is lit. + var/lit = FALSE + /// Whether the lighter is fancy. Fancy lighters have fancier flavortext and won't burn thumbs. + var/fancy = TRUE + /// The engraving overlay used by this lighter. + var/overlay_state + /// A list of possible engraving overlays. + var/list/overlay_list = list( + "plain", + "dame", + "thirteen", + "snake", + ) + +/obj/item/lighter/Initialize(mapload) + . = ..() + create_reagents(maximum_fuel, REFILLABLE | DRAINABLE) + reagents.add_reagent(/datum/reagent/fuel, maximum_fuel) + if(!overlay_state) + overlay_state = pick(overlay_list) + AddComponent(\ + /datum/component/bullet_intercepting,\ + block_chance = 0.5,\ + active_slots = ITEM_SLOT_SUITSTORE,\ + on_intercepted = CALLBACK(src, PROC_REF(on_intercepted_bullet)),\ + ) + update_appearance() + +/// Destroy the lighter when it's shot by a bullet +/obj/item/lighter/proc/on_intercepted_bullet(mob/living/victim, obj/projectile/bullet) + victim.visible_message(span_warning("\The [bullet] shatters on [victim]'s lighter!")) + playsound(victim, SFX_RICOCHET, 100, TRUE) + new /obj/effect/decal/cleanable/oil(get_turf(src)) + do_sparks(1, TRUE, src) + victim.dropItemToGround(src, force = TRUE, silent = TRUE) + qdel(src) + +/obj/item/lighter/cyborg_unequip(mob/user) + if(!lit) + return + set_lit(FALSE) + +/obj/item/lighter/suicide_act(mob/living/carbon/user) + if (lit) + user.visible_message(span_suicide("[user] begins holding \the [src]'s flame up to [user.p_their()] face! It looks like [user.p_theyre()] trying to commit suicide!")) + playsound(src, 'sound/items/welder.ogg', 50, TRUE) + return FIRELOSS + else + user.visible_message(span_suicide("[user] begins whacking [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!")) + return BRUTELOSS + +/obj/item/lighter/update_icon_state() + icon_state = "[initial(icon_state)][lit ? "-on" : ""]" + return ..() + +/obj/item/lighter/update_overlays() + . = ..() + . += create_lighter_overlay() + +/// Generates an overlay used by this lighter. +/obj/item/lighter/proc/create_lighter_overlay() + return mutable_appearance(icon, "lighter_overlay_[overlay_state][lit ? "-on" : ""]") + +/obj/item/lighter/ignition_effect(atom/A, mob/user) + if(get_temperature()) + . = span_infoplain(span_rose("With a single flick of [user.p_their()] wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool.")) + +/obj/item/lighter/proc/set_lit(new_lit) + if(lit == new_lit) + return + + lit = new_lit + if(lit) + force = 5 + damtype = BURN + hitsound = 'sound/items/welder.ogg' + attack_verb_continuous = string_list(list("burns", "singes")) + attack_verb_simple = string_list(list("burn", "singe")) + heat = heat_while_on + START_PROCESSING(SSobj, src) + if(fancy) + playsound(src.loc , 'sound/items/zippo_on.ogg', 100, 1) + else + playsound(src.loc, 'sound/items/lighter_on.ogg', 100, 1) + if(isliving(loc)) + var/mob/living/male_model = loc + if(male_model.fire_stacks && !(male_model.on_fire)) + male_model.ignite_mob() + else + hitsound = SFX_SWING_HIT + force = 0 + heat = 0 + attack_verb_continuous = null //human_defense.dm takes care of it + attack_verb_simple = null + STOP_PROCESSING(SSobj, src) + if(fancy) + playsound(src.loc , 'sound/items/zippo_off.ogg', 100, 1) + else + playsound(src.loc , 'sound/items/lighter_off.ogg', 100, 1) + set_light_on(lit) + update_appearance() + +/obj/item/lighter/extinguish() + . = ..() + set_lit(FALSE) + +/obj/item/lighter/attack_self(mob/living/user) + if(!user.is_holding(src)) + return ..() + if(lit) + set_lit(FALSE) + if(fancy) + user.visible_message( + span_notice("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow."), + span_notice("You quietly shut off [src] without even looking at what you're doing. Wow.") + ) + else + user.visible_message( + span_notice("[user] quietly shuts off [src]."), + span_notice("You quietly shut off [src].") + ) + return + + if(get_fuel() <= 0) + return + + set_lit(TRUE) + + if(fancy) + user.visible_message( + span_notice("Without even breaking stride, [user] flips open and lights [src] in one smooth movement."), + span_notice("Without even breaking stride, you flip open and light [src] in one smooth movement.") + ) + return + + var/hand_protected = FALSE + var/mob/living/carbon/human/human_user = user + if(!istype(human_user) || HAS_TRAIT(human_user, TRAIT_RESISTHEAT) || HAS_TRAIT(human_user, TRAIT_RESISTHEATHANDS)) + hand_protected = TRUE + else if(!istype(human_user.gloves, /obj/item/clothing/gloves)) + hand_protected = FALSE + else + var/obj/item/clothing/gloves/gloves = human_user.gloves + if(gloves.max_heat_protection_temperature) + hand_protected = (gloves.max_heat_protection_temperature > 360) + + if(hand_protected || prob(75)) + user.visible_message( + span_notice("After a few attempts, [user] manages to light [src]."), + span_notice("After a few attempts, you manage to light [src].") + ) + return + + var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND + user.apply_damage(5, BURN, hitzone) + user.visible_message( + span_warning("After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn[user.p_s()] [user.p_their()] finger in the process."), + span_warning("You burn yourself while lighting the lighter!") + ) + user.add_mood_event("burnt_thumb", /datum/mood_event/burnt_thumb) + +/obj/item/lighter/attack(mob/living/target_mob, mob/living/user, params) + if(lit) + use(0.5) + if(target_mob.ignite_mob()) + message_admins("[ADMIN_LOOKUPFLW(user)] set [key_name_admin(target_mob)] on fire with [src] at [AREACOORD(user)]") + log_game("[key_name(user)] set [key_name(target_mob)] on fire with [src] at [AREACOORD(user)]") + var/obj/item/cigarette/cig = help_light_cig(target_mob) + if(!lit || !cig || user.combat_mode) + return ..() + + if(cig.lit) + to_chat(user, span_warning("The [cig.name] is already lit!")) + if(target_mob == user) + cig.attackby(src, user) + return + + if(fancy) + cig.light(span_rose("[user] whips the [name] out and holds it for [target_mob]. [user.p_Their()] arm is as steady as the unflickering flame [user.p_they()] light[user.p_s()] \the [cig] with.")) + else + cig.light(span_notice("[user] holds the [name] out for [target_mob], and lights [target_mob.p_their()] [cig.name].")) + +///Checks if the lighter is able to perform a welding task. +/obj/item/lighter/tool_use_check(mob/living/user, amount, heat_required) + if(!lit) + to_chat(user, span_warning("[src] has to be on to complete this task!")) + return FALSE + if(get_fuel() < amount) + to_chat(user, span_warning("You need more welding fuel to complete this task!")) + return FALSE + if(heat < heat_required) + return FALSE + return TRUE + +/obj/item/lighter/process(seconds_per_tick) + if(lit) + burned_fuel_for += seconds_per_tick + if(burned_fuel_for >= TOOL_FUEL_BURN_INTERVAL) + use(used = 0.25) + + open_flame(heat) + +/obj/item/lighter/get_temperature() + return lit * heat + +/// Uses fuel from the lighter. +/obj/item/lighter/use(used = 0) + if(!lit) + return FALSE + + if(used > 0) + burned_fuel_for = 0 + + if(get_fuel() >= used) + reagents.remove_reagent(/datum/reagent/fuel, used) + if(get_fuel() <= 0) + set_lit(FALSE) + return TRUE + return FALSE + +///Returns the amount of fuel +/obj/item/lighter/proc/get_fuel() + return reagents.get_reagent_amount(/datum/reagent/fuel) + +/obj/item/lighter/greyscale + name = "cheap lighter" + desc = "A cheap lighter." + icon_state = "lighter" + maximum_fuel = 3 + fancy = FALSE + overlay_list = list( + "transp", + "tall", + "matte", + "zoppo", //u cant stoppo th zoppo + ) + + /// The color of the lighter. + var/lighter_color + /// The set of colors this lighter can be autoset as on init. + var/static/list/color_list = list( //Same 16 color selection as electronic assemblies + COLOR_ASSEMBLY_BLACK, + COLOR_FLOORTILE_GRAY, + COLOR_ASSEMBLY_BGRAY, + COLOR_ASSEMBLY_WHITE, + COLOR_ASSEMBLY_RED, + COLOR_ASSEMBLY_ORANGE, + COLOR_ASSEMBLY_BEIGE, + COLOR_ASSEMBLY_BROWN, + COLOR_ASSEMBLY_GOLD, + COLOR_ASSEMBLY_YELLOW, + COLOR_ASSEMBLY_GURKHA, + COLOR_ASSEMBLY_LGREEN, + COLOR_ASSEMBLY_GREEN, + COLOR_ASSEMBLY_LBLUE, + COLOR_ASSEMBLY_BLUE, + COLOR_ASSEMBLY_PURPLE + ) + +/obj/item/lighter/greyscale/Initialize(mapload) + . = ..() + if(!lighter_color) + lighter_color = pick(color_list) + update_appearance() + +/obj/item/lighter/greyscale/create_lighter_overlay() + var/mutable_appearance/lighter_overlay = ..() + lighter_overlay.color = lighter_color + return lighter_overlay + +/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user) + if(get_temperature()) + . = span_notice("After some fiddling, [user] manages to light [A] with [src].") + + +/obj/item/lighter/slime + name = "slime zippo" + desc = "A specialty zippo made from slimes and industry. Has a much hotter flame than normal." + icon_state = "slighter" + heat_while_on = parent_type::heat_while_on + 1000 //Blue flame is hotter, this means this does act as a welding tool. + light_color = LIGHT_COLOR_CYAN + overlay_state = "slime" + grind_results = list(/datum/reagent/iron = 1, /datum/reagent/fuel = 5, /datum/reagent/medicine/pyroxadone = 5) + +/obj/item/lighter/skull + name = "badass zippo" + desc = "An absolutely badass zippo lighter. Just look at that skull!" + overlay_state = "skull" + +/obj/item/lighter/mime + name = "pale zippo" + desc = "In lieu of fuel, performative spirit can be used to light cigarettes." + icon_state = "mlighter" //These ones don't show a flame. + light_color = LIGHT_COLOR_HALOGEN + heat_while_on = 0 //I swear it's a real lighter dude you just can't see the flame dude I promise + overlay_state = "mime" + grind_results = list(/datum/reagent/iron = 1, /datum/reagent/toxin/mutetoxin = 5, /datum/reagent/consumable/nothing = 10) + light_range = 0 + light_power = 0 + fancy = FALSE + +/obj/item/lighter/mime/ignition_effect(atom/A, mob/user) + . = span_infoplain("[user] lifts the [name] to the [A], which miraculously lights!") + +/obj/item/lighter/bright + name = "illuminative zippo" + desc = "Sustains an incredibly bright chemical reaction when you spark it. Avoid looking directly at the igniter when lit." + icon_state = "slighter" + light_color = LIGHT_COLOR_ELECTRIC_CYAN + overlay_state = "bright" + grind_results = list(/datum/reagent/iron = 1, /datum/reagent/flash_powder = 10) + light_range = 8 + light_power = 3 //Irritatingly bright and large enough to cover a small room. + fancy = FALSE + +/obj/item/lighter/bright/examine(mob/user) + . = ..() + + if(lit && isliving(user)) + var/mob/living/current_viewer = user + current_viewer.flash_act(4) + +/obj/item/lighter/bright/ignition_effect(atom/A, mob/user) + if(get_temperature()) + . = span_infoplain(span_rose("[user] lifts the [src] to the [A], igniting it with a brilliant flash of light!")) + var/mob/living/current_viewer = user + current_viewer.flash_act(4) + +/obj/effect/spawner/random/special_lighter + name = "special lighter spawner" + icon_state = "lighter" + loot = list( + /obj/item/lighter/skull, + /obj/item/lighter/mime, + /obj/item/lighter/bright, + ) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 60986c0efea..e2a8e10c4df 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -546,7 +546,7 @@ update_weight() return TRUE -/obj/item/stack/tool_use_check(mob/living/user, amount) +/obj/item/stack/tool_use_check(mob/living/user, amount, heat_required) if(get_amount() < amount) // general balloon alert that says they don't have enough user.balloon_alert(user, "not enough material!") diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 143b8eab174..dfc40643720 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -1,5 +1,3 @@ -/// How many seconds between each fuel depletion tick ("use" proc) -#define WELDER_FUEL_BURN_INTERVAL 5 /obj/item/weldingtool name = "welding tool" desc = "A standard edition welder provided by Nanotrasen." @@ -89,7 +87,7 @@ force = 15 damtype = BURN burned_fuel_for += seconds_per_tick - if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) + if(burned_fuel_for >= TOOL_FUEL_BURN_INTERVAL) use(TRUE) update_appearance() @@ -276,16 +274,17 @@ return welding /// If welding tool ran out of fuel during a construction task, construction fails. -/obj/item/weldingtool/tool_use_check(mob/living/user, amount) +/obj/item/weldingtool/tool_use_check(mob/living/user, amount, heat_required) if(!isOn() || !check_fuel()) to_chat(user, span_warning("[src] has to be on to complete this task!")) return FALSE - - if(get_fuel() >= amount) - return TRUE - else + if(get_fuel() < amount) to_chat(user, span_warning("You need more welding fuel to complete this task!")) return FALSE + if(heat < heat_required) + to_chat(user, span_warning("[src] is not hot enough to complete this task!")) + return FALSE + return TRUE /// Ran when the welder is attacked by a screwdriver. /obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/tool, mob/user) @@ -410,5 +409,3 @@ if(get_fuel() < max_fuel && nextrefueltick < world.time) nextrefueltick = world.time + 10 reagents.add_reagent(/datum/reagent/fuel, 1) - -#undef WELDER_FUEL_BURN_INTERVAL diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 0f20f87e0b5..389e8dcbd74 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -500,7 +500,7 @@ /obj/structure/girder/bronze/attackby(obj/item/W, mob/living/user, params) add_fingerprint(user) if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount = 0)) + if(!W.tool_start_check(user, amount = 0, heat_required = HIGH_TEMPERATURE_REQUIRED)) return balloon_alert(user, "slicing apart...") if(W.use_tool(src, user, 40, volume=50)) diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 0cc73b9adef..57e30d58ef2 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -34,7 +34,7 @@ return CONTEXTUAL_SCREENTIP_SET /obj/structure/kitchenspike_frame/welder_act(mob/living/user, obj/item/tool) - if(!tool.tool_start_check(user, amount = 0)) + if(!tool.tool_start_check(user, amount = 0, heat_required = HIGH_TEMPERATURE_REQUIRED)) return FALSE to_chat(user, span_notice("You begin cutting \the [src] apart...")) if(!tool.use_tool(src, user, 5 SECONDS, volume = 50)) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index f2a90d98dc5..fdb5193035c 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -505,7 +505,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0) switch(state) if(RWINDOW_SECURE) if(tool.tool_behaviour == TOOL_WELDER) - if(tool.tool_start_check(user)) + if(tool.tool_start_check(user, heat_required = HIGH_TEMPERATURE_REQUIRED)) user.visible_message(span_notice("[user] holds \the [tool] to the security screws on \the [src]..."), span_notice("You begin heating the security screws on \the [src]...")) if(tool.use_tool(src, user, 15 SECONDS, volume = 100)) diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm index 8ddae94231d..52372448616 100644 --- a/code/game/shuttle_engines.dm +++ b/code/game/shuttle_engines.dm @@ -113,7 +113,7 @@ if(ENGINE_UNWRENCHED) to_chat(user, span_warning("The [src.name] needs to be wrenched to the floor!")) if(ENGINE_WRENCHED) - if(!tool.tool_start_check(user, amount=round(ENGINE_WELDTIME / 5))) + if(!tool.tool_start_check(user, amount=round(ENGINE_WELDTIME / 5), heat_required = HIGH_TEMPERATURE_REQUIRED)) return TRUE user.visible_message(span_notice("[user.name] starts to weld the [name] to the floor."), \ @@ -126,7 +126,7 @@ alter_engine_power(engine_power) if(ENGINE_WELDED) - if(!tool.tool_start_check(user, amount=round(ENGINE_WELDTIME / 5))) + if(!tool.tool_start_check(user, amount=round(ENGINE_WELDTIME / 5), heat_required = HIGH_TEMPERATURE_REQUIRED)) return TRUE user.visible_message(span_notice("[user.name] starts to cut the [name] free from the floor."), \ diff --git a/code/game/turfs/closed/wall/reinf_walls.dm b/code/game/turfs/closed/wall/reinf_walls.dm index e94a31eeafe..739ee5aeae0 100644 --- a/code/game/turfs/closed/wall/reinf_walls.dm +++ b/code/game/turfs/closed/wall/reinf_walls.dm @@ -76,7 +76,7 @@ if(COVER) if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=2)) + if(!W.tool_start_check(user, amount=2, heat_required = HIGH_TEMPERATURE_REQUIRED)) return to_chat(user, span_notice("You begin slicing through the metal cover...")) if(W.use_tool(src, user, 60, volume=100)) @@ -109,7 +109,7 @@ return TRUE if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=2)) + if(!W.tool_start_check(user, amount=2, heat_required = HIGH_TEMPERATURE_REQUIRED)) return to_chat(user, span_notice("You begin welding the metal cover back to the frame...")) if(W.use_tool(src, user, 60, volume=100)) @@ -143,7 +143,7 @@ if(SUPPORT_RODS) if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=2)) + if(!W.tool_start_check(user, amount=2, heat_required = HIGH_TEMPERATURE_REQUIRED)) return to_chat(user, span_notice("You begin slicing through the support rods...")) if(W.use_tool(src, user, 100, volume=100)) @@ -176,7 +176,7 @@ return TRUE if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=0, heat_required = HIGH_TEMPERATURE_REQUIRED)) return to_chat(user, span_notice("You begin welding the support rods back together...")) if(W.use_tool(src, user, 100, volume=100)) diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm index a78579d713e..e1d91242e84 100644 --- a/code/game/turfs/closed/walls.dm +++ b/code/game/turfs/closed/walls.dm @@ -290,7 +290,7 @@ /turf/closed/wall/proc/try_decon(obj/item/I, mob/user) if(I.tool_behaviour == TOOL_WELDER) - if(!I.tool_start_check(user, amount=round(slicing_duration / 50))) + if(!I.tool_start_check(user, amount=round(slicing_duration / 50), heat_required = HIGH_TEMPERATURE_REQUIRED)) return FALSE to_chat(user, span_notice("You begin slicing through the outer plating...")) diff --git a/code/modules/art/statues.dm b/code/modules/art/statues.dm index fd64d212f3e..da4a47dd843 100644 --- a/code/modules/art/statues.dm +++ b/code/modules/art/statues.dm @@ -36,7 +36,7 @@ /obj/structure/statue/attackby(obj/item/W, mob/living/user, params) add_fingerprint(user) if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=1)) + if(!W.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return FALSE user.balloon_alert(user, "slicing apart...") if(W.use_tool(src, user, 40, volume=50)) diff --git a/code/modules/atmospherics/machinery/components/tank.dm b/code/modules/atmospherics/machinery/components/tank.dm index ee1e61428d1..f76f3dc470f 100644 --- a/code/modules/atmospherics/machinery/components/tank.dm +++ b/code/modules/atmospherics/machinery/components/tank.dm @@ -304,7 +304,7 @@ . = TRUE if(atom_integrity >= max_integrity) return - if(!tool.tool_start_check(user, amount = 0)) + if(!tool.tool_start_check(user, amount = 0, heat_required = HIGH_TEMPERATURE_REQUIRED)) return to_chat(user, span_notice("You begin to repair the cracks in the gas tank...")) var/repair_amount = max_integrity / 10 @@ -562,7 +562,7 @@ if(!anchored) to_chat(user, span_notice("You need to wrench [src] to the floor before finishing.")) return - if(!tool.tool_start_check(user, amount = 0)) + if(!tool.tool_start_check(user, amount = 0, heat_required = HIGH_TEMPERATURE_REQUIRED)) return to_chat(user, span_notice("You begin sealing the outer plating with the welder...")) if(!tool.use_tool(src, user, 2 SECONDS, volume = 60)) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index a5a03c3ba12..e6c60140f3a 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -397,7 +397,7 @@ return ITEM_INTERACT_SUCCESS /obj/machinery/portable_atmospherics/canister/welder_act_secondary(mob/living/user, obj/item/I) - if(!I.tool_start_check(user, amount=1)) + if(!I.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return ITEM_INTERACT_BLOCKING var/pressure = air_contents.return_pressure() diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index 210eb9b0d9e..11983bda883 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -95,7 +95,7 @@ /obj/machinery/portable_atmospherics/welder_act(mob/living/user, obj/item/tool) if(user.combat_mode) return ITEM_INTERACT_SKIP_TO_ATTACK - if(atom_integrity >= max_integrity || (machine_stat & BROKEN) || !tool.tool_start_check(user, amount = 1)) + if(atom_integrity >= max_integrity || (machine_stat & BROKEN) || !tool.tool_start_check(user, amount = 1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return ITEM_INTERACT_BLOCKING balloon_alert(user, "repairing...") while(tool.use_tool(src, user, 2.5 SECONDS, volume=40)) diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 16da8d89783..3ab7b25f826 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -287,7 +287,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real if (!getBruteLoss()) to_chat(user, span_warning("[src] is already in good condition!")) return - if (!tool.tool_start_check(user, amount=1)) //The welder has 1u of fuel consumed by its afterattack, so we don't need to worry about taking any away. + if (!tool.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) //The welder has 1u of fuel consumed by its afterattack, so we don't need to worry about taking any away. return if(src == user) to_chat(user, span_notice("You start fixing yourself...")) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index d06a36056d1..244e68e8b03 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -141,7 +141,7 @@ // Can we weld? Plasma cutter does not use charge continuously. // Amount cannot be defaulted to 1: most of the code specifies 0 in the call. -/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount) +/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount, heat_required) if(QDELETED(cell)) balloon_alert(user, "no cell inserted!") return FALSE @@ -151,6 +151,9 @@ if(amount ? cell.charge < PLASMA_CUTTER_CHARGE_WELD * amount : cell.charge < PLASMA_CUTTER_CHARGE_WELD) balloon_alert(user, "not enough charge!") return FALSE + if(heat < heat_required) + to_chat(user, span_warning("[src] is not hot enough to complete this task!")) + return FALSE return TRUE diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index f9cf10e1068..fa768e67695 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -81,14 +81,14 @@ if(tank_volume && (damage_flag == BULLET || damage_flag == LASER)) boom() -/obj/structure/reagent_dispensers/attackby(obj/item/W, mob/user, params) - if(W.is_refillable()) +/obj/structure/reagent_dispensers/attackby(obj/item/attacking_item, mob/user, params) + if(attacking_item.is_refillable()) return FALSE //so we can refill them via their afterattack. - if(istype(W, /obj/item/assembly_holder) && accepts_rig) + if(istype(attacking_item, /obj/item/assembly_holder) && accepts_rig) if(rig) balloon_alert(user, "another device is in the way!") return ..() - var/obj/item/assembly_holder/holder = W + var/obj/item/assembly_holder/holder = attacking_item if(!(locate(/obj/item/assembly/igniter) in holder.assemblies)) return ..() @@ -109,8 +109,8 @@ user.balloon_alert_to_viewers("attached rig") return - if(istype(W, /obj/item/stack/sheet/iron) && can_be_tanked) - var/obj/item/stack/sheet/iron/metal_stack = W + if(istype(attacking_item, /obj/item/stack/sheet/iron) && can_be_tanked) + var/obj/item/stack/sheet/iron/metal_stack = attacking_item metal_stack.use(1) var/obj/structure/reagent_dispensers/plumbed/storage/new_tank = new /obj/structure/reagent_dispensers/plumbed/storage(drop_location()) new_tank.reagents.maximum_volume = reagents.maximum_volume @@ -293,27 +293,39 @@ // if this sucks, feel free to change it, but make sure the damn thing will log. thanks. return ..() -/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/living/user, params) - if(I.tool_behaviour == TOOL_WELDER) - if(!reagents.has_reagent(/datum/reagent/fuel)) - to_chat(user, span_warning("[src] is out of fuel!")) +/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/attacking_item, mob/user, params) + if(attacking_item.tool_behaviour != TOOL_WELDER) + return ..() + + var/obj/item/weldingtool/refilling_welder = attacking_item + if(istype(refilling_welder) && !refilling_welder.welding) + if(refilling_welder.reagents.has_reagent(/datum/reagent/fuel, refilling_welder.max_fuel)) + to_chat(user, span_warning("Your [refilling_welder.name] is already full!")) return - var/obj/item/weldingtool/W = I - if(istype(W) && !W.welding) - if(W.reagents.has_reagent(/datum/reagent/fuel, W.max_fuel)) - to_chat(user, span_warning("Your [W.name] is already full!")) - return - reagents.trans_to(W, W.max_fuel, transferred_by = user) - user.visible_message(span_notice("[user] refills [user.p_their()] [W.name]."), span_notice("You refill [W].")) - playsound(src, 'sound/effects/refill.ogg', 50, TRUE) - W.update_appearance() - else - user.visible_message(span_danger("[user] catastrophically fails at refilling [user.p_their()] [I.name]!"), span_userdanger("That was stupid of you.")) - log_bomber(user, "detonated a", src, "via welding tool") - boom() + reagents.trans_to(refilling_welder, refilling_welder.max_fuel, transferred_by = user) + user.visible_message(span_notice("[user] refills [user.p_their()] [refilling_welder.name]."), span_notice("You refill [refilling_welder].")) + playsound(src, 'sound/effects/refill.ogg', 50, TRUE) + refilling_welder.update_appearance() return - return ..() + var/obj/item/lighter/refilling_lighter = attacking_item + if(istype(refilling_lighter) && !refilling_lighter.lit) + if(refilling_lighter.reagents.has_reagent(/datum/reagent/fuel, refilling_lighter.maximum_fuel)) + to_chat(user, span_warning("Your [refilling_lighter.name] is already full!")) + return + reagents.trans_to(refilling_lighter, refilling_lighter.maximum_fuel, transferred_by = user) + user.visible_message(span_notice("[user] refills [user.p_their()] [refilling_lighter.name]."), span_notice("You refill [refilling_lighter].")) + playsound(src, 'sound/effects/refill.ogg', 25, TRUE) + return + + if(!reagents.has_reagent(/datum/reagent/fuel)) + to_chat(user, span_warning("[src] is out of fuel!")) + return + user.visible_message( + span_danger("[user] catastrophically fails at refilling [user.p_their()] [attacking_item.name]!"), + span_userdanger("That was stupid of you.")) + log_bomber(user, "detonated a", src, "via [attacking_item.name]") + boom() /obj/structure/reagent_dispensers/fueltank/large name = "high capacity fuel tank" diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index dbcabfab196..6fdf97f69f0 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -120,7 +120,7 @@ to_chat(user, span_notice("You [panel_open ? "remove":"attach"] the screws around the power connection.")) return else if(I.tool_behaviour == TOOL_WELDER && panel_open) - if(!I.tool_start_check(user, amount=1)) + if(!I.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return to_chat(user, span_notice("You start slicing the floorweld off \the [src]...")) diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index 13f43b1f4a4..8e0f4dad6f4 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -152,7 +152,7 @@ to_chat(user, span_warning("A disposals machine already exists here!")) return TRUE - if(!I.tool_start_check(user, amount=1)) + if(!I.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return TRUE to_chat(user, span_notice("You start welding the [pipename] in place...")) diff --git a/code/modules/recycling/disposal/outlet.dm b/code/modules/recycling/disposal/outlet.dm index 6773e574d35..63c3c83edd1 100644 --- a/code/modules/recycling/disposal/outlet.dm +++ b/code/modules/recycling/disposal/outlet.dm @@ -83,7 +83,7 @@ /obj/structure/disposaloutlet/welder_act(mob/living/user, obj/item/I) ..() - if(!I.tool_start_check(user, amount=1)) + if(!I.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return TRUE playsound(src, 'sound/items/welder2.ogg', 100, TRUE) diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm index 9a1ad786e72..b08323e66e4 100644 --- a/code/modules/recycling/disposal/pipe.dm +++ b/code/modules/recycling/disposal/pipe.dm @@ -156,7 +156,7 @@ if(!can_be_deconstructed(user)) return TRUE - if(!I.tool_start_check(user, amount=1)) + if(!I.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return TRUE to_chat(user, span_notice("You start slicing [src]...")) diff --git a/code/modules/transport/tram/tram_floors.dm b/code/modules/transport/tram/tram_floors.dm index f267ccf5cdc..ca3d018b48f 100644 --- a/code/modules/transport/tram/tram_floors.dm +++ b/code/modules/transport/tram/tram_floors.dm @@ -266,7 +266,7 @@ if(atom_integrity >= max_integrity) to_chat(user, span_warning("[src] is already in good condition!")) return ITEM_INTERACT_SUCCESS - if(!tool.tool_start_check(user, amount = 0)) + if(!tool.tool_start_check(user, amount = 0, heat_required = HIGH_TEMPERATURE_REQUIRED)) return FALSE to_chat(user, span_notice("You begin repairing [src]...")) var/integrity_to_repair = max_integrity - atom_integrity diff --git a/code/modules/transport/tram/tram_structures.dm b/code/modules/transport/tram/tram_structures.dm index 368223d1165..1eed69c84ff 100644 --- a/code/modules/transport/tram/tram_structures.dm +++ b/code/modules/transport/tram/tram_structures.dm @@ -155,7 +155,7 @@ if(atom_integrity >= max_integrity) to_chat(user, span_warning("[src] is already in good condition!")) return ITEM_INTERACT_SUCCESS - if(!tool.tool_start_check(user, amount = 0)) + if(!tool.tool_start_check(user, amount = 0, heat_required = HIGH_TEMPERATURE_REQUIRED)) return FALSE to_chat(user, span_notice("You begin repairing [src]...")) if(tool.use_tool(src, user, 4 SECONDS, volume = 50)) @@ -579,7 +579,7 @@ return FALSE /obj/structure/tram/spoiler/welder_act(mob/living/user, obj/item/tool) - if(!tool.tool_start_check(user, amount = 1)) + if(!tool.tool_start_check(user, amount = 1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return FALSE if(atom_integrity >= max_integrity) diff --git a/code/modules/vehicles/atv.dm b/code/modules/vehicles/atv.dm index aa9a963a101..4aa28d6fe5a 100644 --- a/code/modules/vehicles/atv.dm +++ b/code/modules/vehicles/atv.dm @@ -82,7 +82,7 @@ if(atom_integrity >= max_integrity) balloon_alert(user, "it's not damaged!") return - if(!W.tool_start_check(user, amount=1)) + if(!W.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return user.balloon_alert_to_viewers("started welding [src]", "started repairing [src]") audible_message(span_hear("You hear welding.")) diff --git a/code/modules/vehicles/bicycle.dm b/code/modules/vehicles/bicycle.dm index cc0643be026..cc40b7d80ef 100644 --- a/code/modules/vehicles/bicycle.dm +++ b/code/modules/vehicles/bicycle.dm @@ -33,7 +33,7 @@ if(atom_integrity >= max_integrity) balloon_alert(user, "it's not damaged!") return - if(!W.tool_start_check(user, amount=1)) + if(!W.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return user.balloon_alert_to_viewers("started welding [src]", "started repairing [src]") audible_message(span_hear("You hear welding.")) diff --git a/code/modules/vehicles/cars/vim.dm b/code/modules/vehicles/cars/vim.dm index dfcd604ef14..56e1da7528d 100644 --- a/code/modules/vehicles/cars/vim.dm +++ b/code/modules/vehicles/cars/vim.dm @@ -68,7 +68,7 @@ if(atom_integrity >= max_integrity) balloon_alert(user, "it's not damaged!") return - if(!W.tool_start_check(user, amount=1)) + if(!W.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return user.balloon_alert_to_viewers("started welding [src]", "started repairing [src]") audible_message(span_hear("You hear welding.")) diff --git a/code/modules/vehicles/mecha/mecha_defense.dm b/code/modules/vehicles/mecha/mecha_defense.dm index 1237c931b33..8634ff88591 100644 --- a/code/modules/vehicles/mecha/mecha_defense.dm +++ b/code/modules/vehicles/mecha/mecha_defense.dm @@ -406,7 +406,7 @@ if(atom_integrity >= max_integrity) balloon_alert(user, "it's not damaged!") return - if(!W.tool_start_check(user, amount=1)) + if(!W.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return user.balloon_alert_to_viewers("started welding [src]", "started repairing [src]") audible_message(span_hear("You hear welding.")) diff --git a/code/modules/vehicles/secway.dm b/code/modules/vehicles/secway.dm index c8cab1a7dc1..6726fb02ef1 100644 --- a/code/modules/vehicles/secway.dm +++ b/code/modules/vehicles/secway.dm @@ -44,7 +44,7 @@ if(atom_integrity >= max_integrity) balloon_alert(user, "it's not damaged!") return - if(!W.tool_start_check(user, amount=1)) + if(!W.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED)) return user.balloon_alert_to_viewers("started welding [src]", "started repairing [src]") audible_message(span_hear("You hear welding.")) diff --git a/tgstation.dme b/tgstation.dme index b45a777c2d4..dbc982fe032 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2331,7 +2331,7 @@ #include "code\game\objects\items\charter.dm" #include "code\game\objects\items\choice_beacon.dm" #include "code\game\objects\items\chromosome.dm" -#include "code\game\objects\items\cigs_lighters.dm" +#include "code\game\objects\items\cigarettes.dm" #include "code\game\objects\items\climbingrope.dm" #include "code\game\objects\items\clown_items.dm" #include "code\game\objects\items\control_wand.dm" @@ -2371,6 +2371,7 @@ #include "code\game\objects\items\kitchen.dm" #include "code\game\objects\items\knives.dm" #include "code\game\objects\items\latexballoon.dm" +#include "code\game\objects\items\lighter.dm" #include "code\game\objects\items\machine_wand.dm" #include "code\game\objects\items\mail.dm" #include "code\game\objects\items\maintenance_loot.dm"