Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream 19.05.2024 #270

Merged
merged 160 commits into from
May 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
ba9cb64
Tgui: More common components in ts (#83098)
jlsnow301 May 11, 2024
b535d22
Automatic changelog compile [ci skip]
actions-user May 12, 2024
c3622c3
Enables right click, alt click, ctrl click for alt-click item window …
Metekillot May 12, 2024
67a8912
Automatic changelog for PR #83179 [ci skip]
comfyorange May 12, 2024
6606fa4
Bitrunner job figurine (#83173)
Rhials May 12, 2024
400ba8e
Automatic changelog for PR #83173 [ci skip]
comfyorange May 12, 2024
1b09d8d
Rat Kings can no longer create grime and miasma while ventcrawling (#…
PapaMichae1 May 12, 2024
de25d43
Automatic changelog for PR #83176 [ci skip]
comfyorange May 12, 2024
45b403f
Fix the RMB action on the cigarettes pack and add a new QoL (#83170)
paganiy May 12, 2024
f20a080
Automatic changelog for PR #83170 [ci skip]
comfyorange May 12, 2024
2083960
Adds a period to the end of the wendigo deathrattle (#83185)
nikothedude May 12, 2024
72c92f3
Automatic changelog for PR #83185 [ci skip]
comfyorange May 12, 2024
a838d0b
Replace cigarette smoke with particles, add a big puff when taking ci…
MrMelbert May 13, 2024
4524b70
Automatic changelog for PR #83101 [ci skip]
comfyorange May 13, 2024
951f24d
Automatic changelog compile [ci skip]
actions-user May 13, 2024
547ca8f
Node Bootstrap: Cast OS version to int so compat code works (#83190)
MrsTonedOne May 13, 2024
c12af14
Fixes sabre alt-click (#83162)
jlsnow301 May 13, 2024
30675c9
Automatic changelog for PR #83162 [ci skip]
comfyorange May 13, 2024
d70aa8b
Fix the size of the projectile of the accelerator laser cannon (#83144)
paganiy May 13, 2024
1e2df8b
Automatic changelog for PR #83144 [ci skip]
comfyorange May 13, 2024
bca5685
tgui: Strings.ts (#83096)
jlsnow301 May 13, 2024
28791c0
Bodybuilders can see each others' power levels. (#83088)
Jacquerel May 13, 2024
671c47f
Automatic changelog for PR #83088 [ci skip]
comfyorange May 13, 2024
013e40b
Fixes brain deletion not being lethal (#83203)
Time-Green May 13, 2024
6e794ef
Automatic changelog for PR #83203 [ci skip]
comfyorange May 13, 2024
6933307
Fixes tram malfuction event not ending properly (#83200)
ShizCalev May 13, 2024
5d81ba7
Makes Health Sensor assemblies a bit nicer to use (#83183)
May 13, 2024
8895e8d
Automatic changelog for PR #83183 [ci skip]
comfyorange May 13, 2024
2dc73fb
Automatic changelog compile [ci skip]
actions-user May 14, 2024
65fd769
Fixes arcade spawners in Interdyne Spinward Research Base (#83171)
DaCoolBoss May 14, 2024
8d81e19
Automatic changelog for PR #83171 [ci skip]
comfyorange May 14, 2024
e1ac6e4
Makes it so cargo security doesnt get stuck in mining station. (#83209)
KingkumaArt May 14, 2024
3e1889d
Automatic changelog for PR #83209 [ci skip]
comfyorange May 14, 2024
1184365
Allows status effects with alerts to display their duration (on the a…
MrMelbert May 14, 2024
6e1d6e7
Automatic changelog for PR #83211 [ci skip]
comfyorange May 14, 2024
db782b6
Fixes random decal in space on Tramstation (#83178)
iwishforducks May 14, 2024
348d69c
Automatic changelog for PR #83178 [ci skip]
comfyorange May 14, 2024
a8dda64
Moves as many db related date/time operations to the db side to avoid…
MrsTonedOne May 14, 2024
d7aef14
Fixes cultist blood rites runtime (#83220)
Lufferly May 15, 2024
55d77b5
Automatic changelog for PR #83220 [ci skip]
comfyorange May 15, 2024
40c2bca
Fixes a reversion to the greyscale plate armor (#83214)
necromanceranne May 15, 2024
268cf9a
Automatic changelog for PR #83214 [ci skip]
comfyorange May 15, 2024
16be085
Fixes energy lost as heat for some machines (#83205)
SyncIt21 May 15, 2024
ca92ca4
Fixes destroyed solar panels dropping overlays (#83224)
Lufferly May 15, 2024
bfa1582
Automatic changelog compile [ci skip]
actions-user May 15, 2024
2860887
Automatic changelog for PR #83205 [ci skip]
comfyorange May 15, 2024
b825ac4
Automatic changelog for PR #83224 [ci skip]
comfyorange May 15, 2024
9affd58
Fixes kinetic accelerator fire sound div 0 runtime (#83177)
ShizCalev May 15, 2024
8b8934c
Portals now make sounds (#83166)
Sadboysuss May 15, 2024
db33f07
[NO GBP] Fixes the knife offsets of pipeguns (#83155)
necromanceranne May 15, 2024
1d1a264
Confirm Order button now active when cargo shuttle is at Central (#83…
Shadow-Quill May 15, 2024
a35e1e4
Automatic changelog for PR #83166 [ci skip]
comfyorange May 15, 2024
1f7bb38
Automatic changelog for PR #83155 [ci skip]
comfyorange May 15, 2024
7e4886c
Automatic changelog for PR #83152 [ci skip]
comfyorange May 15, 2024
3f73d00
allows the SC/FISHER to shoot floor lights (#83182)
Hatterhat May 15, 2024
183bd6b
Fixes minor runtime when borgs get qdeleted (#83221)
ShizCalev May 15, 2024
a0a51c5
Ensures kinetic accelerators always get their mods added to the modki…
ShizCalev May 15, 2024
4a1cb19
Automatic changelog for PR #83182 [ci skip]
comfyorange May 15, 2024
7017305
Automatic changelog for PR #83222 [ci skip]
comfyorange May 15, 2024
fce5209
Fixes some bitrunning related issues [no gbp] (#83184)
jlsnow301 May 15, 2024
9748ccd
Automatic changelog for PR #83184 [ci skip]
comfyorange May 15, 2024
261548f
Staff of Shrinking for the wizard (#83115)
PKPenguin321 May 15, 2024
d942da7
Blood Brothers admin tooling (#83130)
Jacquerel May 15, 2024
ca8dcc2
Automatic changelog for PR #83115 [ci skip]
comfyorange May 15, 2024
df3d409
Automatic changelog for PR #83130 [ci skip]
comfyorange May 15, 2024
4b174e4
Adds a new neutral lawset, the Y.E.S.M.A.N. lawset, to the AI lawset …
Iamgoofball May 15, 2024
7499b84
Protects space spawned humans from radiation nebula (#83202)
Time-Green May 15, 2024
db6ce47
Adds -y to upgrade in the docker files to prevent breakage (#83198)
DaxDupont May 15, 2024
1ea3cfc
The Shovellening: Coroner and Miner Coats can now hold Shovels (#83139)
DrAmazing343 May 15, 2024
0ab70e4
Automatic changelog for PR #83202 [ci skip]
comfyorange May 15, 2024
f0e8ee6
Adds more box types to cardboard crafting (#83135)
Derpguy3 May 15, 2024
45dfe7d
Automatic changelog for PR #83198 [ci skip]
comfyorange May 15, 2024
6712682
Automatic changelog for PR #83139 [ci skip]
comfyorange May 15, 2024
25eae99
Automatic changelog for PR #83135 [ci skip]
comfyorange May 15, 2024
d06d92b
General maintenance for smoke machine (#83158)
SyncIt21 May 15, 2024
737f571
Blade creation ritual returns lost blades (#82592)
Xackii May 15, 2024
95b3cfa
Automatic changelog for PR #83158 [ci skip]
comfyorange May 15, 2024
066815a
The armoury contraband locker guns have a chance to be rigged. (#83167)
Pickle-Coding May 15, 2024
32ff8d1
Automatic changelog for PR #83167 [ci skip]
comfyorange May 15, 2024
e143e52
Moves the departmental delivery area check to a unit test so it stops…
Majkl-J May 15, 2024
1133e90
Shift-clicking an offer for an item will examine the item (#83180)
MrMelbert May 15, 2024
e12e3df
Automatic changelog for PR #83180 [ci skip]
comfyorange May 15, 2024
b5f6b04
parrots try to immitate voices (#82773)
Ben10Omintrix May 15, 2024
1946ba1
Automatic changelog for PR #82773 [ci skip]
comfyorange May 15, 2024
53518e0
Circuit editor QoL and new circuit components (#82969)
tmyqlfpir May 15, 2024
84472cb
[no gbp] Fixes uniform alt click while resting (#83231)
jlsnow301 May 15, 2024
ae64cae
Automatic changelog for PR #82969 [ci skip]
comfyorange May 15, 2024
b832885
Automatic changelog for PR #83231 [ci skip]
comfyorange May 15, 2024
428c594
Automatic changelog compile [ci skip]
actions-user May 16, 2024
926f819
Remove sleeper protocol objective + Remove the upper limit to sabotag…
Xander3359 May 16, 2024
150418d
Automatic changelog for PR #83206 [ci skip]
comfyorange May 16, 2024
2d5f448
Assorted minor alt-click reskinning fixes, primarily context-based (#…
00-Steven May 16, 2024
e55f24b
Automatic changelog for PR #83105 [ci skip]
comfyorange May 16, 2024
ec41cba
Fixes wings working in space (#83239)
Lufferly May 16, 2024
fb7e9fc
Automatic changelog for PR #83239 [ci skip]
comfyorange May 16, 2024
125d637
Fixes some atoms conduct electricity flag (#83230)
RengaN02 May 16, 2024
40ca497
Automatic changelog for PR #83230 [ci skip]
comfyorange May 16, 2024
1904409
Neckties can be worn below suits and accessories (#83131)
siliconOpossum May 16, 2024
a8fc20d
Automatic changelog for PR #83131 [ci skip]
comfyorange May 16, 2024
091e3af
Restores Balance to the Candle Economy (#83240)
Thunder12345 May 16, 2024
501c8c7
Automatic changelog for PR #83240 [ci skip]
comfyorange May 16, 2024
650492a
Fixes Spess Knife's cutter tool having an invisible sprite (#83246)
May 16, 2024
e364c3e
Automatic changelog for PR #83246 [ci skip]
comfyorange May 16, 2024
f70350c
Fixes simplebot ui [no gbp] (#83235)
jlsnow301 May 16, 2024
6f9f3cf
Automatic changelog for PR #83235 [ci skip]
comfyorange May 16, 2024
77e739a
Cargo goodies section typo fix (#83245)
May 16, 2024
959477c
Atoms that are on the border of a tile will now only trigger landmine…
ShizCalev May 16, 2024
e8b834c
Automatic changelog for PR #83245 [ci skip]
comfyorange May 16, 2024
c0e5e32
Automatic changelog for PR #83156 [ci skip]
comfyorange May 16, 2024
03db803
Parse_zone audit + minor misc cleanup (#83154)
nikothedude May 16, 2024
ffd227c
Automatic changelog for PR #83154 [ci skip]
comfyorange May 16, 2024
74f52a7
Fixes cyborg omnitool combat behaviour. (#83243)
Pickle-Coding May 16, 2024
5a3d67a
Automatic changelog for PR #83243 [ci skip]
comfyorange May 16, 2024
d93d19c
mobile defibrillator mount (#83000)
mc-oofert May 16, 2024
1faa23b
Automatic changelog for PR #83000 [ci skip]
comfyorange May 16, 2024
4264919
Fix radiation not causing mutations or making you bald (3 year old bu…
MrMelbert May 16, 2024
0e12079
Automatic changelog for PR #83251 [ci skip]
comfyorange May 16, 2024
1548372
Rust Heretic rework: THE PUKENING. (#83006)
EnterTheJake May 16, 2024
6e36398
Automatic changelog for PR #83006 [ci skip]
comfyorange May 16, 2024
5dc5ccd
Fixes missing scrubber pipes on metastation (#83232)
improvedname May 16, 2024
a051994
Automatic changelog for PR #83232 [ci skip]
comfyorange May 16, 2024
a3940a4
Updates to orbit ui [READY] (#83186)
jlsnow301 May 16, 2024
a50e2cd
Automatic changelog for PR #83186 [ci skip]
comfyorange May 16, 2024
f1a22b3
Changes how lube crawling works and fixes a bug with snails (#83238)
JohnFulpWillard May 16, 2024
10b2af4
Automatic changelog for PR #83238 [ci skip]
comfyorange May 16, 2024
2edb3af
Automatic changelog compile [ci skip]
actions-user May 17, 2024
761b14e
lavaland raptors (#82537)
Ben10Omintrix May 17, 2024
0e63413
Automatic changelog for PR #82537 [ci skip]
comfyorange May 17, 2024
c79cedc
Fixes Space Phase softlock (#83241)
Absolucy May 17, 2024
4c79bd5
Automatic changelog for PR #83241 [ci skip]
comfyorange May 17, 2024
74efdd3
Adds Minecarts (#83175)
MrMelbert May 17, 2024
ee0d5f3
Automatic changelog for PR #83175 [ci skip]
comfyorange May 17, 2024
225562b
Cancel CI on new commit (#83255)
jlsnow301 May 17, 2024
55f4249
fixes runtime when trying to remove a nonexistent source ID via Remov…
ShizCalev May 17, 2024
f70ea21
Fixes a bunch of hearts becoming errors when being eaten (#83259)
Echriser May 17, 2024
31c13fd
Automatic changelog for PR #83259 [ci skip]
comfyorange May 17, 2024
eb5ac96
Upgrades nukies ordnance by adding more gasses and better stock parts…
improvedname May 17, 2024
83d0154
Automatic changelog for PR #83233 [ci skip]
comfyorange May 17, 2024
f0f026d
Standardises name of The Lizard's Gas (Lava) (#83250)
DaCoolBoss May 17, 2024
868c85c
Fixes Malf AI not being able to override/overload turrets that have c…
ShizCalev May 17, 2024
df6939f
Automatic changelog for PR #83250 [ci skip]
comfyorange May 17, 2024
7684168
Automatic changelog for PR #83252 [ci skip]
comfyorange May 17, 2024
cd9e9dc
Tgui: Events & Colors in typescript (#83218)
jlsnow301 May 17, 2024
14e27ec
adds the Ansem/SC, the logical conclusion to the John Splintercell se…
Hatterhat May 17, 2024
0612a49
Automatic changelog for PR #83228 [ci skip]
comfyorange May 17, 2024
e81a94d
Malf AI overload blacklists (#83226)
Sadboysuss May 17, 2024
715d61f
Automatic changelog for PR #83226 [ci skip]
comfyorange May 17, 2024
d83bf4f
Suit sensors can now be quick-maxed by ctrl clicking (#83265)
Sadboysuss May 17, 2024
8ebef95
Automatic changelog for PR #83265 [ci skip]
comfyorange May 17, 2024
de11d2b
[Icebox] Retvrn: Brings Bar Back to Base (level) (#83163)
MrMelbert May 17, 2024
d6d8103
Automatic changelog for PR #83163 [ci skip]
comfyorange May 17, 2024
d37779e
Micro-optimizes _SendSignal a bit (#83244)
Watermelon914 May 17, 2024
0ae4675
Mobs spawners won't spawn more mobs than they are supposed to (#83266)
Jacquerel May 17, 2024
3291b81
Automatic changelog for PR #83266 [ci skip]
comfyorange May 17, 2024
2a31a79
Automatic changelog compile [ci skip]
actions-user May 18, 2024
357a14e
Resprites the Blade Heretic knives. (#83207)
EnterTheJake May 18, 2024
511b9fd
Removes a bunch of unused families huds (#82916)
Rex9001 May 18, 2024
2a29dd3
[no gbp] removes signpost from icebox (#83272)
Ben10Omintrix May 18, 2024
87dbd5c
Merge remote-tracking branch 'off/master' into merge-upstream
Gaxeer May 19, 2024
0d0c0cd
refactor: adjust to `string.js` refactor to `string.ts`
Gaxeer May 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace cigarette smoke with particles, add a big puff when taking ci…
…garettes out of your mouth (tgstation#83101)

## About The Pull Request

- Cigarette particles are now particles rather than baked in 
- Taking a cigarette out of your mouth release a big puff of smoke


https://github.com/tgstation/tgstation/assets/51863163/183b39e7-3367-43a1-b750-99e66838d60f

## Why It's Good For The Game

Looks better

## Changelog

:cl: Melbert
add: Cigarette smoke is now more smokey. 
add: Taking a cigarette out of your mouth will let out a big puff of
smoke.
/:cl:

---------

Co-authored-by: san7890 <the@san7890.com>
MrMelbert and san7890 authored May 13, 2024
commit a838d0b01124b93b24f9831424d6897dfa7078cf
7 changes: 3 additions & 4 deletions code/game/objects/effects/particle_holder.dm
Original file line number Diff line number Diff line change
@@ -64,7 +64,6 @@
var/mob/particle_mob = attached.loc
particle_mob.vis_contents += src

/// Sets the particles position to the passed coordinate list (X, Y, Z)
/// See [https://www.byond.com/docs/ref/#/{notes}/particles] for position documentation
/obj/effect/abstract/particle_holder/proc/set_particle_position(list/pos)
particles.position = pos
/// Sets the particles position to the passed coordinates
/obj/effect/abstract/particle_holder/proc/set_particle_position(x = 0, y = 0, z = 0)
particles.position = list(x, y, z)
25 changes: 25 additions & 0 deletions code/game/objects/effects/particles/smoke.dm
Original file line number Diff line number Diff line change
@@ -37,6 +37,31 @@
spawning = 2
velocity = list(0, 0.25, 0)

/particles/smoke/cig
icon_state = list("steam_1" = 2, "steam_2" = 1, "steam_3" = 1)
count = 1
spawning = 0.05 // used to pace it out roughly in time with breath ticks
position = list(-6, -2, 0)
gravity = list(0, 0.75, 0)
lifespan = 0.75 SECONDS
fade = 0.75 SECONDS
velocity = list(0, 0.2, 0)
scale = 0.5
grow = 0.01
friction = 0.5
color = "#d0d0d09d"

/particles/smoke/cig/big
icon_state = list("steam_1" = 1, "steam_2" = 2, "steam_3" = 2)
gravity = list(0, 0.5, 0)
velocity = list(0, 0.1, 0)
lifespan = 1 SECONDS
fade = 1 SECONDS
grow = 0.1
scale = 0.75
spawning = 1
friction = 0.75

/particles/smoke/ash
icon_state = list("ash_1" = 2, "ash_2" = 2, "ash_3" = 1, "smoke_1" = 3, "smoke_2" = 2)
count = 500
129 changes: 97 additions & 32 deletions code/game/objects/items/cigs_lighters.dm
Original file line number Diff line number Diff line change
@@ -137,7 +137,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
heat = 1000
throw_verb = "flick"
/// Whether this cigarette has been lit.
var/lit = FALSE
VAR_FINAL/lit = FALSE
/// Whether this cigarette should start lit.
var/starts_lit = FALSE
// Note - these are in masks.dmi not in cigarette.dmi
@@ -169,6 +169,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/choke_forever = FALSE
/// When choking, what is the maximum amount of time we COULD choke for
var/choke_time_max = 30 SECONDS // I am mean
/// The particle effect of the smoke rising out of the cigarette when lit
VAR_PRIVATE/obj/effect/abstract/particle_holder/cig_smoke
/// The particle effect of the smoke rising out of the mob when...smoked
VAR_PRIVATE/obj/effect/abstract/particle_holder/mob_smoke
/// How long the current mob has been smoking this cigarette
VAR_FINAL/how_long_have_we_been_smokin = 0 SECONDS

/obj/item/clothing/mask/cigarette/Initialize(mapload)
. = ..()
@@ -184,23 +190,59 @@ CIGARETTE PACKETS ARE IN FANCY.DM

/obj/item/clothing/mask/cigarette/Destroy()
STOP_PROCESSING(SSobj, src)
QDEL_NULL(mob_smoke)
QDEL_NULL(cig_smoke)
return ..()

/obj/item/clothing/mask/cigarette/equipped(mob/equipee, slot)
. = ..()
if(!(slot & ITEM_SLOT_MASK))
UnregisterSignal(equipee, COMSIG_HUMAN_FORCESAY)
UnregisterSignal(equipee, list(COMSIG_HUMAN_FORCESAY, COMSIG_ATOM_DIR_CHANGE))
return
RegisterSignal(equipee, COMSIG_HUMAN_FORCESAY, PROC_REF(on_forcesay))
RegisterSignal(equipee, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_mob_dir_change))

if(lit && iscarbon(loc))
make_mob_smoke(loc)

/obj/item/clothing/mask/cigarette/dropped(mob/dropee)
/obj/item/clothing/mask/cigarette/dropped(mob/dropee, silent)
. = ..()
UnregisterSignal(dropee, COMSIG_HUMAN_FORCESAY)
// Moving the cigarette from mask to hands (or pocket I guess) will emit a larger puff of smoke
if(!QDELETED(src) && !QDELETED(dropee) && how_long_have_we_been_smokin >= 4 SECONDS && iscarbon(dropee) && iscarbon(loc))
var/mob/living/carbon/smoker = dropee
// This relies on the fact that dropped is called before slot is nulled
if(src == smoker.wear_mask && !smoker.incapacitated())
long_exhale(smoker)

UnregisterSignal(dropee, list(COMSIG_HUMAN_FORCESAY, COMSIG_ATOM_DIR_CHANGE))
QDEL_NULL(mob_smoke)
how_long_have_we_been_smokin = 0 SECONDS

/obj/item/clothing/mask/cigarette/proc/on_forcesay(mob/living/source)
SIGNAL_HANDLER
source.apply_status_effect(/datum/status_effect/choke, src, lit, choke_forever ? -1 : rand(25 SECONDS, choke_time_max))

/obj/item/clothing/mask/cigarette/proc/on_mob_dir_change(mob/living/source, old_dir, new_dir)
SIGNAL_HANDLER
if(isnull(mob_smoke))
return
update_particle_position(mob_smoke, new_dir)

/obj/item/clothing/mask/cigarette/proc/update_particle_position(obj/effect/abstract/particle_holder/to_edit, new_dir = loc.dir)
var/new_x = 0
var/new_layer = initial(to_edit.layer)
if(new_dir & NORTH)
new_x = 4
new_layer = BELOW_MOB_LAYER
else if(new_dir & SOUTH)
new_x = -4
else if(new_dir & EAST)
new_x = 8
else if(new_dir & WEST)
new_x = -8
to_edit.set_particle_position(new_x, 8, 0)
to_edit.layer = new_layer

/obj/item/clothing/mask/cigarette/suicide_act(mob/living/user)
user.visible_message(span_suicide("[user] is huffing [src] as quickly as [user.p_they()] can! It looks like [user.p_theyre()] trying to give [user.p_them()]self cancer."))
return (TOXLOSS|OXYLOSS)
@@ -266,9 +308,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
return

lit = TRUE

make_cig_smoke()
if(!(flags_1 & INITIALIZED_1))
update_icon()
update_appearance(UPDATE_ICON)
return

attack_verb_continuous = string_list(list("burns", "singes"))
@@ -291,17 +333,16 @@ CIGARETTE PACKETS ARE IN FANCY.DM
// allowing reagents to react after being lit
reagents.flags &= ~(NO_REACT)
reagents.handle_reactions()
update_icon()
update_appearance(UPDATE_ICON)
if(flavor_text)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
START_PROCESSING(SSobj, src)

//can't think of any other way to update the overlays :<
if(ismob(loc))
var/mob/M = loc
M.update_worn_mask()
M.update_held_items()
if(iscarbon(loc))
var/mob/living/carbon/smoker = loc
if(src == smoker.wear_mask)
make_mob_smoke(smoker)

/obj/item/clothing/mask/cigarette/extinguish()
. = ..()
@@ -315,16 +356,26 @@ CIGARETTE PACKETS ARE IN FANCY.DM
STOP_PROCESSING(SSobj, src)
reagents.flags |= NO_REACT
lit = FALSE
update_icon()

update_appearance(UPDATE_ICON)
if(ismob(loc))
var/mob/living/M = loc
to_chat(M, span_notice("Your [name] goes out."))
M.update_worn_mask()
M.update_held_items()
to_chat(loc, span_notice("Your [name] goes out."))
QDEL_NULL(cig_smoke)
QDEL_NULL(mob_smoke)

/obj/item/clothing/mask/cigarette/proc/long_exhale(mob/living/carbon/smoker)
smoker.visible_message(
span_notice("[smoker] exhales a large cloud of smoke from [src]."),
span_notice("You exhale a large cloud of smoke from [src]."),
)
if(!isturf(smoker.loc))
return

var/obj/effect/abstract/particle_holder/big_smoke = new(smoker.loc, /particles/smoke/cig/big)
update_particle_position(big_smoke, smoker.dir)
QDEL_IN(big_smoke, big_smoke.particles.lifespan)

/// Handles processing the reagents in the cigarette.
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
/obj/item/clothing/mask/cigarette/proc/handle_reagents(seconds_per_tick)
if(!reagents.total_volume)
return
reagents.expose_temperature(heat, 0.05)
@@ -351,6 +402,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.remove_all(to_smoke)
return

how_long_have_we_been_smokin += seconds_per_tick * (1 SECONDS)
reagents.expose(smoker, INGEST, min(to_smoke / reagents.total_volume, 1))
var/obj/item/organ/internal/lungs/lungs = smoker.get_organ_slot(ORGAN_SLOT_LUNGS)
if(lungs && IS_ORGANIC_ORGAN(lungs))
@@ -375,7 +427,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
open_flame(heat)
if((reagents?.total_volume) && COOLDOWN_FINISHED(src, drag_cooldown))
COOLDOWN_START(src, drag_cooldown, dragtime)
handle_reagents()
handle_reagents(seconds_per_tick)

/obj/item/clothing/mask/cigarette/attack_self(mob/user)
if(lit)
@@ -384,11 +436,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM

/obj/item/clothing/mask/cigarette/proc/put_out(mob/user, done_early = FALSE)
var/atom/location = drop_location()
if(done_early)
user.visible_message(span_notice("[user] calmly drops and treads on \the [src], putting it out instantly."))
new /obj/effect/decal/cleanable/ash(location)
else if(user)
to_chat(user, span_notice("Your [name] goes out."))
if(!isnull(user))
if(done_early)
if(isfloorturf(location) && location.has_gravity())
user.visible_message(span_notice("[user] calmly drops and treads on [src], putting it out instantly."))
new /obj/effect/decal/cleanable/ash(location)
long_exhale(user)
else
user.visible_message(span_notice("[user] pinches out [src]."))
how_long_have_we_been_smokin = 0 SECONDS
else
to_chat(user, span_notice("Your [name] goes out."))
new type_butt(location)
qdel(src)

@@ -415,6 +473,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/get_temperature()
return lit * heat

/obj/item/clothing/mask/cigarette/proc/make_mob_smoke(mob/living/smoker)
mob_smoke = new(smoker, /particles/smoke/cig)
update_particle_position(mob_smoke, smoker.dir)
return mob_smoke

/obj/item/clothing/mask/cigarette/proc/make_cig_smoke()
cig_smoke = new(src, /particles/smoke/cig)
cig_smoke.particles.scale *= 1.5
return cig_smoke

// Cigarette brands.
/obj/item/clothing/mask/cigarette/space_cigarette
@@ -634,7 +701,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
name = "smoking pipe"
desc = "A pipe, for smoking. Probably made of meerschaum or something."
icon_state = "pipeoff"
icon_on = "pipeon" //Note - these are in masks.dmi
icon_on = "pipeff" //Note - these are in masks.dmi
icon_off = "pipeoff"
inhand_icon_state = null
inhand_icon_on = null
@@ -649,7 +716,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM

/obj/item/clothing/mask/cigarette/pipe/Initialize(mapload)
. = ..()
update_name()
update_appearance(UPDATE_NAME)

/obj/item/clothing/mask/cigarette/pipe/update_name()
. = ..()
@@ -664,11 +731,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(user)
to_chat(user, span_notice("Your [name] goes out."))
packeditem = null
update_icon()

inhand_icon_state = icon_off
user?.update_worn_mask()
update_appearance(UPDATE_ICON)
STOP_PROCESSING(SSobj, src)
QDEL_NULL(cig_smoke)

/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/thing, mob/user, params)
if(!istype(thing, /obj/item/food/grown))
@@ -707,7 +772,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters. Can be loaded with objects."
icon_state = "cobpipeoff"
icon_on = "cobpipeon" //Note - these are in masks.dmi
icon_on = "cobpipeff" //Note - these are in masks.dmi
icon_off = "cobpipeoff"
inhand_icon_on = null
inhand_icon_off = null
2 changes: 1 addition & 1 deletion code/modules/food_and_drinks/machinery/stove_component.dm
Original file line number Diff line number Diff line change
@@ -257,7 +257,7 @@
return
// this gets badly murdered by sidemap
soup_smoke = new(parent, particle_type)
soup_smoke.set_particle_position(list(container_x, round(world.icon_size * 0.66), 0))
soup_smoke.set_particle_position(container_x, round(world.icon_size * 0.66), 0)
return

QDEL_NULL(soup_smoke)
Binary file modified icons/mob/clothing/mask.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/masks.dmi
Binary file not shown.