Enhances the Smoking Experience - Adds Many New Item Interactions for Cigarettes and Items Interacting With Them (#25571)

* Refactoring and other stuff.

* moar

* More smoking

* Update energy_melee_weapons.dm

* Update code/game/objects/items/robot/cyborg_gripper.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Update cigs.dm

* Update cigs.dm

* Update cigs.dm

* Update code/game/objects/items/weapons/lighters.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* eee

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* sigh

* Update cigs.dm

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* hell

* Update cigs.dm

* aa

* cool

* Fixing some minor typos for cyborg upgrade flavour text

Throws in some missing apostrophes, capitalisation, and the letter "s."

* Briefcase Full of Cash buff

Increases the amount of cash in the Syndicate Briefcase Full of Cash from 600 Cr to 1000 Cr

* Reverts double-feature PR

* Reverts a broken revert

* Reverting again because Ebba told me to

* And reverting yet again

* Update robot_upgrades.dm

* aa

* aaa

* suffering

* Soon

* Is it done!? Am I finally free!?

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Update

* Update

* No longer assume the cig is in a mouth

* Update tools.dm

* Update pronouns.dm

* Fixing some minor typos for cyborg upgrade flavour text

Throws in some missing apostrophes, capitalisation, and the letter "s."

* Briefcase Full of Cash buff

Increases the amount of cash in the Syndicate Briefcase Full of Cash from 600 Cr to 1000 Cr

* Reverts double-feature PR

* Reverts a broken revert

* Reverting again because Ebba told me to

* And reverting yet again

* Update robot_upgrades.dm

* Fixing some minor typos for cyborg upgrade flavour text

Throws in some missing apostrophes, capitalisation, and the letter "s."

* Briefcase Full of Cash buff

Increases the amount of cash in the Syndicate Briefcase Full of Cash from 600 Cr to 1000 Cr

* Reverts double-feature PR

* Reverts a broken revert

* Reverting again because Ebba told me to

* And reverting yet again

* Update robot_upgrades.dm

* update

* Attack animations for sword lighting!

* Update

* indentation

* Update cigs.dm

* minor refactor

* Update items.dm

* Update items.dm

* Update welder.dm

* Update energy_melee_weapons.dm

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* refactor

* Update items.dm

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Fixing some minor typos for cyborg upgrade flavour text

Throws in some missing apostrophes, capitalisation, and the letter "s."

* Briefcase Full of Cash buff

Increases the amount of cash in the Syndicate Briefcase Full of Cash from 600 Cr to 1000 Cr

* Reverts double-feature PR

* Reverts a broken revert

* Reverting again because Ebba told me to

* And reverting yet again

* Update robot_upgrades.dm

* Update flamethrower.dm

* clipping

* Update legion_loot.dm

* anti attack check

* Fixes a zippo runtime

* Fixes evil runtime and stops unnecessary violence.

* Apply suggestions from code review

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Update based on review

* Update cigs.dm

* Update energy_melee_weapons.dm

* Apply suggestions from code review

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

* Update toys.dm

* Update energy_melee_weapons.dm

* Update legion_loot.dm

* Update code/game/objects/items/weapons/melee/energy_melee_weapons.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

---------

Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
CRUNCH
2024-09-03 14:02:13 +01:00
committed by GitHub
parent c7340b09b5
commit 9ef47e7935
18 changed files with 929 additions and 389 deletions
@@ -273,6 +273,28 @@
. = ..()
banned_turfs = typecacheof(list(/turf/space/transit, /turf/simulated/wall, /turf/simulated/mineral))
/obj/item/lava_staff/attack(mob/target, mob/living/user)
if(!cigarette_lighter_act(user, target))
return ..()
/obj/item/lava_staff/cigarette_lighter_act(mob/living/user, mob/living/target, obj/item/direct_attackby_item)
var/obj/item/clothing/mask/cigarette/cig = ..()
if(!cig)
return !isnull(cig)
if(target == user)
user.visible_message(
"<span class='notice'>[user] holds the tip of [src] near [user.p_their()] [cig.name] until it is suddenly set alight.</span>",
"<span class='notice'>You hold the tip of [src] near [cig] until it is suddenly set alight.</span>",
)
else
user.visible_message(
"<span class='notice'>[user] points [src] at [target] until [target.p_their()] [cig.name] is suddenly set alight.</span>",
"<span class='notice'>You point [src] at [target] until [target.p_their()] [cig] is suddenly set alight.</span>",
)
cig.light(user, target)
return TRUE
/obj/item/lava_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
..()
if(timer > world.time)
@@ -30,6 +30,38 @@
. += "<span class='notice'>Use it on targets to summon thunderbolts from the sky.</span>"
. += "<span class='notice'>The thunderbolts are boosted if in an area with weather effects.</span>"
/obj/item/storm_staff/attack(mob/living/target, mob/living/user)
if(cigarette_lighter_act(user, target))
return TRUE
return ..()
/obj/item/storm_staff/cigarette_lighter_act(mob/living/user, mob/living/target, obj/item/direct_attackby_item)
var/obj/item/clothing/mask/cigarette/cig = ..()
if(!cig)
return !isnull(cig)
if(!thunder_charges)
to_chat(user, "<span class='warning'>[src] needs to recharge!</span>")
return TRUE
if(target == user)
user.visible_message(
"<span class='warning'>[user] holds [src] up to [user.p_their()] [cig.name] and shoots a tiny bolt of lightning that sets it alight!</span>",
"<span class='warning'>You hold [src] up to [cig] and shoot a tiny bolt of lightning that sets it alight!</span>",
"<span class='danger'>A thundercrack fills the air!</span>"
)
else
user.visible_message(
"<span class='warning'>[user] points [src] at [target] and shoots a tiny bolt of lightning that sets [target.p_their()] [cig.name] alight!</span>",
"<span class='warning'>You point [src] at [target] and shoot a tiny bolt of lightning that sets [target.p_their()] [cig.name] alight!</span>",
"<span class='danger'>A thundercrack fills the air!</span>"
)
cig.light(user, target)
playsound(target, 'sound/magic/lightningbolt.ogg', 50, TRUE)
thunder_charges--
return TRUE
/obj/item/storm_staff/attack_self(mob/user)
var/area/user_area = get_area(user)
var/turf/user_turf = get_turf(user)
@@ -48,9 +80,11 @@
if(A.stage == WEATHER_WIND_DOWN_STAGE)
to_chat(user, "<span class='warning'>The storm is already ending! It would be a waste to use the staff now.</span>")
return
user.visible_message("<span class='warning'>[user] holds [src] skywards as an orange beam travels into the sky!</span>", \
"<span class='notice'>You hold [src] skyward, dispelling the storm!</span>")
playsound(user, 'sound/magic/staff_change.ogg', 200, 0)
user.visible_message(
"<span class='warning'>[user] holds [src] skywards as an orange beam travels into the sky!</span>",
"<span class='notice'>You hold [src] skyward, dispelling the storm!</span>"
)
playsound(user, 'sound/magic/staff_change.ogg', 200, FALSE)
A.wind_down()
var/old_color = user.color
user.color = list(340/255, 240/255, 0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
@@ -59,6 +93,13 @@
animate(user, color = old_color, transform = old_transform, time = 1 SECONDS)
/obj/item/storm_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
// This early return stops the staff from shooting lightning at someone when being used as a lighter.
if(iscarbon(target))
var/mob/living/carbon/cig_haver = target
var/mask_item = cig_haver.get_item_by_slot(SLOT_HUD_WEAR_MASK)
if(istype(mask_item, /obj/item/clothing/mask/cigarette) && user.zone_selected == "mouth" && user.a_intent == INTENT_HELP)
return
. = ..()
if(!thunder_charges)
to_chat(user, "<span class='warning'>The staff needs to recharge.</span>")
@@ -120,7 +161,10 @@
for(var/obj/hit_thing in T)
hit_thing.take_damage(20, BURN, ENERGY, FALSE)
playsound(target, 'sound/magic/lightningbolt.ogg', 100, TRUE)
target.visible_message("<span class='danger'>A thunderbolt strikes [target]!</span>")
target.visible_message(
"<span class='danger'>A thunderbolt strikes [target]!</span>",
"<span class='danger'>A thundercrack fills the air!</span>"
)
explosion(target, -1, -1, light_impact_range = (boosted ? 1 : 0), flame_range = (boosted ? 2 : 1), silent = TRUE)