mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +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
@@ -994,3 +994,36 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
|
||||
/obj/item/proc/should_stack_with(obj/item/other)
|
||||
return type == other.type && name == other.name
|
||||
|
||||
/**
|
||||
* Handles the bulk of cigarette lighting interactions. You must call `light()` to actually light the cigarette.
|
||||
*
|
||||
* Returns: the target's cigarette (or the cigarette itself if attacked directly) if all checks are passed.
|
||||
* If the cigarette is already lit, or is a fancy smokable being lit by anything other than a zippo or match, will return `FALSE`.
|
||||
* Otherwise it will return `null`.
|
||||
* Arguments:
|
||||
* * user - The mob trying to light the cigarette.
|
||||
* * target - The mob with the cigarette.
|
||||
* * direct_attackby_item - Used if the cigarette item is clicked on directly with a lighter instead of a mob wearing a cigarette.
|
||||
*/
|
||||
/obj/item/proc/cigarette_lighter_act(mob/living/user, mob/living/target, obj/item/direct_attackby_item)
|
||||
if(!user || !target)
|
||||
return null
|
||||
|
||||
var/obj/item/clothing/mask/cigarette/cig = direct_attackby_item ? direct_attackby_item : target.wear_mask
|
||||
if(!istype(cig))
|
||||
return null
|
||||
|
||||
if(user.zone_selected != "mouth" || !user.a_intent == INTENT_HELP)
|
||||
return null
|
||||
|
||||
if(cig.lit)
|
||||
to_chat(user, "<span class='warning'>[cig] is already lit!</span>")
|
||||
return FALSE
|
||||
|
||||
// Only matches and cigars can light fancy smokables.
|
||||
if(cig.fancy && !istype(src, /obj/item/match) && !istype(src, /obj/item/lighter/zippo))
|
||||
to_chat(user, "<span class='danger'>[cig] straight out REFUSES to be lit by such uncivilized means!</span>")
|
||||
return FALSE
|
||||
|
||||
return cig
|
||||
|
||||
Reference in New Issue
Block a user