mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
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:
co-authored by
Ryan
DGamerL
Luc
Burzah
parent
c7340b09b5
commit
9ef47e7935
@@ -235,39 +235,45 @@
|
||||
/obj/item/storage/fancy/cigarettes/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][length(contents)]"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M, mob/living/user)
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(istype(M) && M == user && user.zone_selected == "mouth" && length(contents) > 0 && !user.wear_mask)
|
||||
var/got_cig = 0
|
||||
for(var/num=1, num <= length(contents), num++)
|
||||
if(istype(M) && user.zone_selected == "mouth" && length(contents) > 0 && !M.wear_mask)
|
||||
var/got_cig = FALSE
|
||||
for(var/num in 1 to length(contents))
|
||||
var/obj/item/I = contents[num]
|
||||
if(istype(I, /obj/item/clothing/mask/cigarette))
|
||||
var/obj/item/clothing/mask/cigarette/C = I
|
||||
user.equip_to_slot_if_possible(C, SLOT_HUD_WEAR_MASK)
|
||||
to_chat(user, "<span class='notice'>You take \a [C.name] out of the pack.</span>")
|
||||
M.equip_to_slot_if_possible(C, SLOT_HUD_WEAR_MASK)
|
||||
if(M != user)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] takes \a [C.name] out of [src] and gives it to [M].</span>",
|
||||
"<span class='notice'>You take \a [C.name] out of [src] and give it to [M].</span>"
|
||||
)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You take \a [C.name] out of the pack.</span>")
|
||||
update_icon()
|
||||
got_cig = 1
|
||||
got_cig = TRUE
|
||||
break
|
||||
if(!got_cig)
|
||||
to_chat(user, "<span class='warning'>There are no smokables in the pack!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/can_be_inserted(obj/item/W as obj, stop_messages = 0)
|
||||
/obj/item/storage/fancy/cigarettes/can_be_inserted(obj/item/W, stop_messages = FALSE)
|
||||
if(istype(W, /obj/item/match))
|
||||
var/obj/item/match/M = W
|
||||
if(M.lit)
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='notice'>Putting a lit [W] in [src] probably isn't a good idea.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(istype(W, /obj/item/lighter))
|
||||
var/obj/item/lighter/L = W
|
||||
if(L.lit)
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='notice'>Putting [W] in [src] while lit probably isn't a good idea.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
//if we get this far, handle the insertion checks as normal
|
||||
. = ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user