diff --git a/code/datums/elements/ignites_matches.dm b/code/datums/elements/ignites_matches.dm new file mode 100644 index 00000000000..7579b809244 --- /dev/null +++ b/code/datums/elements/ignites_matches.dm @@ -0,0 +1,39 @@ +/// Ignites matches swiped over it. +/datum/element/ignites_matches + +/datum/element/ignites_matches/Attach(datum/target) + . = ..() + RegisterSignal(target, COMSIG_ATOM_ITEM_INTERACTION, PROC_REF(on_interact)) + +/datum/element/ignites_matches/Detach(datum/source) + UnregisterSignal(source, COMSIG_ATOM_ITEM_INTERACTION) + return ..() + +/datum/element/ignites_matches/proc/on_interact(atom/source, mob/living/user, obj/item/match/match, ...) + SIGNAL_HANDLER + if(!istype(match) || match.lit || match.burnt || match.broken) + return NONE + if(SHOULD_SKIP_INTERACTION(source, match, user)) + return NONE + var/over_what_tp = source.loc == user ? "[user.p_their()] [source.name]" : source + var/over_what_fp = source.loc == user ? "your [source.name]" : source + if(prob(10)) + user.visible_message( + span_warning("[user] swipes [match] over [over_what_tp], but nothing happens."), + span_warning("You swipe [match] over [over_what_fp], but it fails to ignite."), + ) + return ITEM_INTERACT_SUCCESS + if(prob((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_HULK)) ? 33 : 2)) + user.visible_message( + span_warning("[user] swipes [match] over [over_what_tp], accidentally snapping it."), + span_warning("You swipe [match] over [over_what_fp] too fast, snapping it in half."), + ) + match.snap() + return ITEM_INTERACT_SUCCESS + + user.visible_message( + span_rose("[user] swipes [match] over [over_what_tp], igniting it."), + span_rose("You swipe [match] over [over_what_fp], igniting it."), + ) + match.matchignite() + return ITEM_INTERACT_SUCCESS diff --git a/code/game/objects/items/cigarettes.dm b/code/game/objects/items/cigarettes.dm index 51b38d032c0..f7e841c22ea 100644 --- a/code/game/objects/items/cigarettes.dm +++ b/code/game/objects/items/cigarettes.dm @@ -18,6 +18,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM desc = "A simple match stick, used for lighting fine smokables." icon = 'icons/obj/cigarettes.dmi' icon_state = "match_unlit" + inhand_icon_state = "cigoff" + base_icon_state = "match" w_class = WEIGHT_CLASS_TINY heat = 1000 grind_results = list(/datum/reagent/phosphorus = 2) @@ -27,6 +29,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/burnt = FALSE /// How long the match lasts in seconds var/smoketime = 10 SECONDS + /// If the match is broken + var/broken = FALSE /obj/item/match/process(seconds_per_tick) smoketime -= seconds_per_tick * (1 SECONDS) @@ -36,21 +40,66 @@ CIGARETTE PACKETS ARE IN FANCY.DM open_flame(heat) /obj/item/match/fire_act(exposed_temperature, exposed_volume) + . = ..() matchignite() +/obj/item/match/update_name(updates) + . = ..() + if(lit) + name = "lit [initial(name)]" + else if(burnt) + name = "burnt [initial(name)]" + else if(broken) + name = "broken [initial(name)]" + else + name = "[initial(name)]" + +/obj/item/match/update_desc(updates) + . = ..() + if(lit) + desc = "[initial(desc)]. This one is lit." + else if(burnt) + desc = "[initial(desc)]. This one has seen better days." + else if(broken) + desc = "[initial(desc)]. This one is broken." + else + desc = initial(desc) + +/obj/item/match/update_icon_state() + . = ..() + inhand_icon_state = "cigoff" + if(lit) + icon_state = "[base_icon_state]_lit" + inhand_icon_state = "cigon" + else if(burnt) + icon_state = "[base_icon_state]_burnt" + else if(broken) + icon_state = "[base_icon_state]_broken" + else + icon_state = "[base_icon_state]_unlit" + +/obj/item/match/proc/snap() + if(broken) + return + if(lit) + matchburnout() + + playsound(src, 'sound/effects/snap.ogg', 15, TRUE) + broken = TRUE + attack_verb_continuous = string_list(list("flicks")) + attack_verb_simple = string_list(list("flick")) + STOP_PROCESSING(SSobj, src) + update_appearance() + /obj/item/match/proc/matchignite() - if(lit || burnt) + if(lit || burnt || broken) return playsound(src, 'sound/items/match_strike.ogg', 15, TRUE) lit = TRUE - icon_state = "match_lit" damtype = BURN force = 3 hitsound = 'sound/items/tools/welder.ogg' - inhand_icon_state = "cigon" - name = "lit [initial(name)]" - desc = "A [initial(name)]. This one is lit." attack_verb_continuous = string_list(list("burns", "singes")) attack_verb_simple = string_list(list("burn", "singe")) if(isliving(loc)) @@ -68,13 +117,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM burnt = TRUE damtype = BRUTE force = initial(force) - icon_state = "match_burnt" - inhand_icon_state = "cigoff" - name = "burnt [initial(name)]" - desc = "A [initial(name)]. This one has seen better days." attack_verb_continuous = string_list(list("flicks")) attack_verb_simple = string_list(list("flick")) STOP_PROCESSING(SSobj, src) + update_appearance() /obj/item/match/extinguish() . = ..() diff --git a/code/game/objects/items/dualsaber.dm b/code/game/objects/items/dualsaber.dm index dd5ef68f0d3..07450877a89 100644 --- a/code/game/objects/items/dualsaber.dm +++ b/code/game/objects/items/dualsaber.dm @@ -188,7 +188,7 @@ var/mob/living/carbon/C = user if(C.wear_mask) in_mouth = ", barely missing [user.p_their()] nose" - . = span_warning("[user] swings [user.p_their()] [name][in_mouth]. [user.p_They()] light[user.p_s()] [A.loc == user ? "[user.p_their()] [A.name]" : A] in the process.") + . = span_rose("[user] swings [user.p_their()] [name][in_mouth]. [user.p_They()] light[user.p_s()] [A.loc == user ? "[user.p_their()] [A.name]" : A] in the process.") playsound(loc, hitsound, get_clamped_volume(), TRUE, -1) add_fingerprint(user) // Light your candles while spinning around the room diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 361fc05ec64..2a3e13b6c05 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -88,7 +88,7 @@ var/mob/living/carbon/carbon_user = user if(carbon_user.wear_mask) in_mouth = ", barely missing [carbon_user.p_their()] nose" - . = span_warning("[user] swings [user.p_their()] [name][in_mouth]. [user.p_They()] light[user.p_s()] [user.p_their()] [atom.name] in the process.") + . = span_rose("[user] swings [user.p_their()] [name][in_mouth]. [user.p_They()] light[user.p_s()] [user.p_their()] [atom.name] in the process.") playsound(loc, hitsound, get_clamped_volume(), TRUE, -1) add_fingerprint(user) diff --git a/code/game/objects/items/storage/boxes/service_boxes.dm b/code/game/objects/items/storage/boxes/service_boxes.dm index f50629818ec..6d4aedf4bfc 100644 --- a/code/game/objects/items/storage/boxes/service_boxes.dm +++ b/code/game/objects/items/storage/boxes/service_boxes.dm @@ -91,13 +91,7 @@ . = ..() atom_storage.max_slots = 10 atom_storage.set_holdable(/obj/item/match) - -/obj/item/storage/box/matches/tool_act(mob/living/user, obj/item/tool, list/modifiers) - if(istype(tool, /obj/item/match)) - var/obj/item/match/match = tool - match.matchignite() - return ITEM_INTERACT_SUCCESS - return ..() + AddElement(/datum/element/ignites_matches) /obj/item/storage/box/matches/PopulateContents() for(var/i in 1 to 10) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 829de059493..813abcc86aa 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -317,7 +317,7 @@ /obj/item/weldingtool/ignition_effect(atom/ignitable_atom, mob/user) if(use_tool(ignitable_atom, user, 0)) - return span_notice("[user] casually lights [ignitable_atom] with [src], what a badass.") + return span_rose("[user] casually lights [ignitable_atom] with [src], what a badass.") else return "" diff --git a/code/modules/antagonists/heretic/magic/mansus_grasp.dm b/code/modules/antagonists/heretic/magic/mansus_grasp.dm index 67df0f2be04..1079d60d79e 100644 --- a/code/modules/antagonists/heretic/magic/mansus_grasp.dm +++ b/code/modules/antagonists/heretic/magic/mansus_grasp.dm @@ -107,7 +107,7 @@ remove_hand_with_no_refund(user) /obj/item/melee/touch_attack/mansus_fist/ignition_effect(atom/to_light, mob/user) - . = span_notice("[user] effortlessly snaps [user.p_their()] fingers near [to_light], igniting it with eldritch energies. Fucking badass!") + . = span_rose("[user] effortlessly snaps [user.p_their()] fingers near [to_light], igniting it with eldritch energies. Fucking badass!") remove_hand_with_no_refund(user) /obj/item/melee/touch_attack/mansus_fist/suicide_act(mob/living/user) diff --git a/code/modules/antagonists/heretic/magic/star_touch.dm b/code/modules/antagonists/heretic/magic/star_touch.dm index e8e824cc718..5b6b9c27522 100644 --- a/code/modules/antagonists/heretic/magic/star_touch.dm +++ b/code/modules/antagonists/heretic/magic/star_touch.dm @@ -92,7 +92,7 @@ remove_hand_with_no_refund(user) /obj/item/melee/touch_attack/star_touch/ignition_effect(atom/to_light, mob/user) - . = span_notice("[user] effortlessly snaps [user.p_their()] fingers near [to_light], igniting it with cosmic energies. Fucking badass!") + . = span_rose("[user] effortlessly snaps [user.p_their()] fingers near [to_light], igniting it with cosmic energies. Fucking badass!") remove_hand_with_no_refund(user) /obj/item/melee/touch_attack/star_touch/attack_self(mob/living/user) diff --git a/code/modules/clothing/shoes/boots.dm b/code/modules/clothing/shoes/boots.dm index 2dba6ed24fc..bc1bee98f38 100644 --- a/code/modules/clothing/shoes/boots.dm +++ b/code/modules/clothing/shoes/boots.dm @@ -22,8 +22,8 @@ /obj/item/clothing/shoes/combat/Initialize(mapload) . = ..() - create_storage(storage_type = /datum/storage/pockets/shoes) + AddElement(/datum/element/ignites_matches) /obj/item/clothing/shoes/combat/swat //overpowered boots for death squads name = "\improper SWAT boots" @@ -59,8 +59,8 @@ /obj/item/clothing/shoes/jackboots/Initialize(mapload) . = ..() - create_storage(storage_type = /datum/storage/pockets/shoes) + AddElement(/datum/element/ignites_matches) /obj/item/clothing/shoes/jackboots/fast slowdown = -1 @@ -97,8 +97,8 @@ /obj/item/clothing/shoes/winterboots/Initialize(mapload) . = ..() - create_storage(storage_type = /datum/storage/pockets/shoes) + AddElement(/datum/element/ignites_matches) /obj/item/clothing/shoes/winterboots/ice_boots name = "ice hiking boots" @@ -145,8 +145,8 @@ /obj/item/clothing/shoes/workboots/Initialize(mapload) . = ..() - create_storage(storage_type = /datum/storage/pockets/shoes) + AddElement(/datum/element/ignites_matches) /obj/item/clothing/shoes/workboots/mining name = "mining boots" @@ -164,8 +164,8 @@ /obj/item/clothing/shoes/russian/Initialize(mapload) . = ..() - create_storage(storage_type = /datum/storage/pockets/shoes) + AddElement(/datum/element/ignites_matches) /obj/item/clothing/shoes/discoshoes name = "green lizardskin shoes" diff --git a/code/modules/clothing/shoes/clown.dm b/code/modules/clothing/shoes/clown.dm index c999a242a19..22b13cd1018 100644 --- a/code/modules/clothing/shoes/clown.dm +++ b/code/modules/clothing/shoes/clown.dm @@ -16,6 +16,7 @@ LoadComponent(/datum/component/squeak, squeak_sound, 50, falloff_exponent = 20) //die off quick please AddElement(/datum/element/swabable, CELL_LINE_TABLE_CLOWN, CELL_VIRUS_TABLE_GENERIC, rand(2,3), 0) AddComponent(/datum/component/adjust_fishing_difficulty, 3) //Goofy + AddElement(/datum/element/ignites_matches) /obj/item/clothing/shoes/clown_shoes/equipped(mob/living/user, slot) . = ..() diff --git a/code/modules/clothing/shoes/cowboy.dm b/code/modules/clothing/shoes/cowboy.dm index ab8ef30c99b..8a07da1d034 100644 --- a/code/modules/clothing/shoes/cowboy.dm +++ b/code/modules/clothing/shoes/cowboy.dm @@ -18,16 +18,12 @@ /obj/item/clothing/shoes/cowboy/Initialize(mapload) . = ..() - create_storage(storage_type = /datum/storage/pockets/shoes) - - if(prob(2)) - //There's a snake in my boot + if(prob(2)) //There's a snake in my boot new /mob/living/basic/snake(src) - if(has_spurs) LoadComponent(/datum/component/squeak, spur_sound, 50, falloff_exponent = 20) - + AddElement(/datum/element/ignites_matches) /obj/item/clothing/shoes/cowboy/equipped(mob/living/carbon/user, slot) . = ..() diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 6fe97628fb0..5f74051b9b1 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -103,7 +103,7 @@ /obj/item/gun/ballistic/revolver/ignition_effect(atom/A, mob/user) if(last_fire && last_fire + 15 SECONDS > world.time) - . = span_notice("[user] touches the end of [src] to \the [A], using the residual heat to ignite it in a puff of smoke. What a badass.") + return span_rose("[user] touches the end of [src] to \the [A], using the residual heat to ignite it in a puff of smoke. What a badass.") /obj/item/gun/ballistic/revolver/c38 name = "\improper .38 revolver" diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index b4cd8fa4904..6dbcf155d7a 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -336,7 +336,7 @@ playsound(user, E.fire_sound, 50, TRUE) playsound(user, loaded_projectile.hitsound, 50, TRUE) cell.use(E.e_cost) - . = span_danger("[user] casually lights [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src]. Damn.") + . = span_rose("[user] casually lights [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src]. Damn.") /obj/item/gun/energy/proc/instant_recharge() SIGNAL_HANDLER diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 04fa06dcfaa..4a64335f8e6 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -85,7 +85,7 @@ return surgical_tray_overlay /obj/item/cautery/ignition_effect(atom/ignitable_atom, mob/user) - . = span_notice("[user] touches the end of [src] to \the [ignitable_atom], igniting it with a puff of smoke.") + return span_rose("[user] touches the end of [src] to \the [ignitable_atom], igniting it with a puff of smoke.") /obj/item/cautery/augment desc = "A heated element that cauterizes wounds." diff --git a/icons/obj/cigarettes.dmi b/icons/obj/cigarettes.dmi index c9e9186b7a8..85b8dfa1a02 100644 Binary files a/icons/obj/cigarettes.dmi and b/icons/obj/cigarettes.dmi differ diff --git a/strings/sillytips.txt b/strings/sillytips.txt index 5aa7af7ba00..b652523bad0 100644 --- a/strings/sillytips.txt +++ b/strings/sillytips.txt @@ -2,6 +2,7 @@ As an Engineer, the Supermatter shard is an extremely dangerous piece of equipme As the Captain, you can use a whetstone to sharpen your fancy fountain pen for extra robustness. As the Lawyer, you are the last bastion of roleplay-focused jobs. Even the curator got a whip to go fight people with, that sellout! Ask and you shall receive. +Bitrunning is a crime. Blobs are weak to fire! Use a flame thrower for maximum damage! Cleanbot. Completing your objectives is good practice, but the best antagonists will strive to do more than the bare minimum to really leave an impression. @@ -35,6 +36,7 @@ This game is older than most of the people playing it. This is a game that is constantly being developed for. Expect things to be added, removed, fixed, and broken on a daily basis. To defeat the slaughter demon, shoot at it until it dies. When a round ends nearly everything about it is lost forever, leave your salt behind with it. +You can light a match with the heel of your boot. ...What's that? Friction matches went out of style in the 19th century? That's nonsense! You can win a pulse rifle from the arcade machine. Honest. Your sprite represents your hitbox, so that afro makes you easier to kill. The sacrifices we make for style. Gorillas can be killed by land mines placed along forest paths. diff --git a/strings/tips.txt b/strings/tips.txt index e6fc672c5c4..d6697557ac7 100644 --- a/strings/tips.txt +++ b/strings/tips.txt @@ -291,7 +291,6 @@ Modular computers are compatible with integrated circuits, but most of the progr You don't need to destroy a Spacecoin machine to make your funds stop draining. Swiping your ID on it will stop the withdrawal. As a Bitrunner, upgrading your quantum server will increase rewards and reduce downtime. As a Bitrunner, your avatar has a domain info ability which will give you clues to help complete virtual domains. -Bitrunning is a crime. You can right click someone with wire cutters, jaws of life, and box cutters to instantly snap cablecuffs or zipties. The jaws can even instantly break handcuffs! You can alt-click tank transfer valves to remove a tank from them. You can use a multitool in your hand to track the area's local APC. diff --git a/tgstation.dme b/tgstation.dme index 993c4b27d8c..bf52bf176d0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1513,6 +1513,7 @@ #include "code\datums\elements\honkspam.dm" #include "code\datums\elements\hostile_machine.dm" #include "code\datums\elements\human_biter.dm" +#include "code\datums\elements\ignites_matches.dm" #include "code\datums\elements\immerse.dm" #include "code\datums\elements\inverted_movement.dm" #include "code\datums\elements\item_fov.dm"