Skip to content

Commit

Permalink
и ещё правочки
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbalaam committed Feb 3, 2025
1 parent 123ad7d commit f3a532d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions modular_bandastation/bar_hookahs/code/bar_hookahs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,20 @@
return
var/datum/reagents/these_reagents = source_hookah.reagent_container.reagents
for(var/obj/item/food/this_food in source_hookah.food_items)
if(!this_food.reagents)
qdel(this_food)
continue
if(!is_type_in_typecache(this_food, source_hookah.allowed_ingridients))
is_safe = FALSE
this_food.reagents.trans_to(these_reagents, INHALE_VOLUME / source_hookah.food_items.len)
if(!this_food.reagents.total_volume)
qdel(this_food)
if(!is_safe)
var/datum/effect_system/fluid_spread/smoke/chem/black_smoke = new
black_smoke.set_up(2, location = source_hookah.loc)
black_smoke.set_up(2, location = source_hookah.loc, carry = these_reagents)
black_smoke.start()
these_reagents.clear_reagents()
QDEL_LIST(source_hookah.food_items)
these_reagents?.clear_reagents()
to_chat(user, span_warning("Вы чувствуете резкий неприятный запах!"))
user.dropItemToGround(src)
user.emote("cough")
Expand Down Expand Up @@ -352,6 +355,10 @@
if(particle_type)
remove_shared_particles(particle_type)
QDEL_LIST(food_items)
if(this_mouthpiece)
QDEL_NULL(this_mouthpiece)
if(attachment)
QDEL_NULL(attachment)
set_light(0)
return ..()

Expand Down

0 comments on commit f3a532d

Please sign in to comment.