diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index 321790e6343f..61b2e55b8d38 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -99,6 +99,13 @@ LIGHTERS ARE IN LIGHTERS.DM if(L.lit) light("After some fiddling, [user] manages to light [user.p_their()] [name] with [L].") + else if(istype(I, /obj/item/match/unathi)) + var/obj/item/match/unathi/U = I + if(U.lit) + playsound(user.loc, 'sound/effects/unathiignite.ogg', 40, FALSE) + light("[user] spits fire at [user.p_their()] [name], igniting it.") + U.matchburnout() + else if(istype(I, /obj/item/match)) var/obj/item/match/M = I if(M.lit) diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm index 70a1ca7b42f5..a33b38bb763b 100644 --- a/code/game/objects/items/weapons/lighters.dm +++ b/code/game/objects/items/weapons/lighters.dm @@ -275,7 +275,19 @@ if(M == user) cig.attackby(src, user) else - cig.light("[user] holds [src] out for [M], and lights [cig].") + if(istype(src, /obj/item/match/unathi)) + if(prob(50)) + cig.light("[user] spits fire at [M], lighting [cig] and nearly burning [user.p_their()] face!") + matchburnout() + else + cig.light("[user] spits fire at [M], burning [user.p_their()] face and lighting [cig] in the process.") + var/obj/item/organ/external/head/affecting = M.get_organ("head") + affecting.receive_damage(0, 5) + M.UpdateDamageIcon() + playsound(user.loc, 'sound/effects/unathiignite.ogg', 40, FALSE) + + else + cig.light("[user] holds [src] out for [M], and lights [cig].") playsound(src, 'sound/items/lighter/light.ogg', 25, TRUE) else ..() @@ -300,3 +312,28 @@ /obj/item/match/firebrand/New() ..() matchignite() + +/obj/item/match/unathi + name = "small blaze" + desc = "A little flame of your own, currently located dangerously in your mouth." + icon_state = "match_unathi" + attack_verb = null + force = 0 + flags = DROPDEL | ABSTRACT + origin_tech = null + lit = TRUE + w_class = WEIGHT_CLASS_BULKY //to prevent it going to pockets + +/obj/item/match/unathi/Initialize(mapload) + . = ..() + START_PROCESSING(SSobj, src) + +/obj/item/match/unathi/matchburnout() + if(!lit) + return + lit = FALSE //to avoid a qdel loop + qdel(src) + +/obj/item/match/unathi/Destroy() + . = ..() + STOP_PROCESSING(SSobj, src) diff --git a/code/modules/mob/living/carbon/human/species/unathi.dm b/code/modules/mob/living/carbon/human/species/unathi.dm index d6e74977fe05..b2740ef26d3e 100644 --- a/code/modules/mob/living/carbon/human/species/unathi.dm +++ b/code/modules/mob/living/carbon/human/species/unathi.dm @@ -57,49 +57,46 @@ "is twisting their own neck!", "is holding their breath!") - /datum/species/unathi/on_species_gain(mob/living/carbon/human/H) ..() - var/datum/action/innate/tail_lash/lash = new() - lash.Grant(H) + var/datum/action/innate/ignite/fire = new() + fire.Grant(H) /datum/species/unathi/on_species_loss(mob/living/carbon/human/H) ..() - for(var/datum/action/innate/tail_lash/lash in H.actions) - lash.Remove(H) - -/datum/action/innate/tail_lash - name = "Tail lash" - icon_icon = 'icons/effects/effects.dmi' - button_icon_state = "tail" - check_flags = AB_CHECK_LYING | AB_CHECK_CONSCIOUS | AB_CHECK_STUNNED - -/datum/action/innate/tail_lash/Activate() + for(var/datum/action/innate/ignite/fire in H.actions) + fire.Remove(H) + +/datum/action/innate/ignite + name = "Ignite" + desc = "A fire forms in your mouth, fierce enough to... light a cigarette. Requires you to drink welding fuel beforehand." + icon_icon = 'icons/obj/cigarettes.dmi' + button_icon_state = "match_unathi" + var/cooldown = 0 + var/cooldown_duration = 20 SECONDS + var/welding_fuel_used = 3 //one sip, with less strict timing + check_flags = AB_CHECK_HANDS_BLOCKED + +/datum/action/innate/ignite/Activate() var/mob/living/carbon/human/user = owner - if((user.restrained() && user.pulledby) || user.buckled) - to_chat(user, "You need freedom of movement to tail lash!") + if(world.time <= cooldown) + to_chat(user, "Your throat hurts too much to do it right now. Wait [round((cooldown - world.time) / 10)] seconds and try again.") return - if(user.getStaminaLoss() >= 50) - to_chat(user, "Rest before tail lashing again!") - return - for(var/mob/living/carbon/human/C in orange(1)) - var/obj/item/organ/external/E = C.get_organ(pick("l_leg", "r_leg", "l_foot", "r_foot", "groin")) - if(E) - user.changeNext_move(CLICK_CD_MELEE) - user.visible_message("[user] smacks [C] in [E] with their tail! ", "You hit [C] in [E] with your tail!") - user.adjustStaminaLoss(15) - C.apply_damage(5, BRUTE, E) - user.spin(20, 1) - playsound(user.loc, 'sound/weapons/slash.ogg', 50, 0) - add_attack_logs(user, C, "tail whipped") - if(user.restrained()) - if(prob(50)) - user.Weaken(10 SECONDS) - user.visible_message("[user] loses [user.p_their()] balance!", "You lose your balance!") - return - if(user.getStaminaLoss() >= 60) //Bit higher as you don't need to start, just would need to keep going with the tail lash. - to_chat(user, "You run out of momentum!") - return + if(!welding_fuel_used || user.reagents.has_reagent("fuel", welding_fuel_used)) + if((user.head?.flags_cover & HEADCOVERSMOUTH) || (user.wear_mask?.flags_cover & MASKCOVERSMOUTH) && !user.wear_mask?.up) + to_chat(user, "Your mouth is covered.") + return + var/obj/item/match/unathi/fire = new(user.loc, src) + if(user.put_in_hands(fire)) + to_chat(user, "You ignite a small flame in your mouth.") + user.reagents.remove_reagent("fuel", 50) //slightly high, but I'd rather avoid it being TOO spammable. + cooldown = world.time + cooldown_duration + else + qdel(fire) + to_chat(user, "You don't have any free hands.") + else + to_chat(user, "You need to drink welding fuel first.") + /datum/species/unathi/handle_death(gibbed, mob/living/carbon/human/H) H.stop_tail_wagging() @@ -128,3 +125,17 @@ "appendix" = /obj/item/organ/internal/appendix, "eyes" = /obj/item/organ/internal/eyes/unathi ) + +/datum/species/unathi/ashwalker/on_species_gain(mob/living/carbon/human/H) + var/datum/action/innate/ignite/ash_walker/fire = new() + fire.Grant(H) + +/datum/species/unathi/ashwalker/on_species_loss(mob/living/carbon/human/H) + ..() + for(var/datum/action/innate/ignite/ash_walker/fire in H.actions) + fire.Remove(H) + +/datum/action/innate/ignite/ash_walker + desc = "You form a fire in your mouth, fierce enough to... light a cigarette." + cooldown_duration = 3 MINUTES + welding_fuel_used = 0 // Ash walkers dont need welding fuel to use ignite diff --git a/icons/obj/cigarettes.dmi b/icons/obj/cigarettes.dmi index 11277d5e01dc..8447324f71f8 100644 Binary files a/icons/obj/cigarettes.dmi and b/icons/obj/cigarettes.dmi differ diff --git a/sound/effects/unathiignite.ogg b/sound/effects/unathiignite.ogg new file mode 100644 index 000000000000..f60278f47827 Binary files /dev/null and b/sound/effects/unathiignite.ogg differ