mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
## About The Pull Request - null all GAGS vars for brass wirecutters as it doesn't use GAGS - Repath `mothbomb.dmi` so it actually gets deployed with the server - Generate map icons - Fix 150+ crafting material parity failures - Fix airlock lights not working - Fix certain species missing eyes ## Why It's Good For The Game Don't like red X ## Proof Of Testing If this PR is green check then you Know
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
/obj/item/cigarette/pipe/crackpipe
|
|
name = "crack pipe"
|
|
desc = "A slick glass pipe made for smoking one thing: crack."
|
|
icon = 'modular_skyrat/modules/morenarcotics/icons/crack.dmi'
|
|
worn_icon = 'modular_skyrat/modules/morenarcotics/icons/mask.dmi'
|
|
icon_state = "glass_pipeoff" //it seems like theres some unused crack pipe sprite in masks.dmi, sweet!
|
|
icon_on = "glass_pipeon"
|
|
icon_off = "glass_pipeoff"
|
|
chem_volume = 20
|
|
|
|
/obj/item/cigarette/pipe/crackpipe/process(seconds_per_tick)
|
|
smoketime -= seconds_per_tick
|
|
if(smoketime <= 0)
|
|
if(ismob(loc))
|
|
var/mob/living/smoking_mob = loc
|
|
to_chat(smoking_mob, span_notice("Your [name] goes out."))
|
|
lit = FALSE
|
|
icon_state = icon_off
|
|
inhand_icon_state = icon_off
|
|
smoking_mob.update_worn_mask()
|
|
packeditem = FALSE
|
|
name = "empty [initial(name)]"
|
|
STOP_PROCESSING(SSobj, src)
|
|
return
|
|
open_flame()
|
|
if(reagents?.total_volume) // check if it has any reagents at all
|
|
handle_reagents()
|
|
|
|
|
|
/obj/item/cigarette/pipe/crackpipe/attackby(obj/item/used_item, mob/user, params)
|
|
if(is_type_in_list(used_item, list(/obj/item/reagent_containers/crack,/obj/item/reagent_containers/blacktar)))
|
|
to_chat(user, span_notice("You stuff [used_item] into [src]."))
|
|
smoketime = 2 * 60
|
|
name = "[used_item.name]-packed [initial(name)]"
|
|
if(used_item.reagents)
|
|
used_item.reagents.trans_to(src, used_item.reagents.total_volume, transferred_by = user)
|
|
qdel(used_item)
|
|
else
|
|
var/lighting_text = used_item.ignition_effect(src,user)
|
|
if(lighting_text)
|
|
if(smoketime > 0)
|
|
light(lighting_text)
|
|
else
|
|
to_chat(user, span_warning("There is nothing to smoke!"))
|
|
else
|
|
return ..()
|