diff --git a/code/game/objects/items/weapons/ecigs.dm b/code/game/objects/items/weapons/ecigs.dm index 18e6062dbaa..5e26bd6e102 100644 --- a/code/game/objects/items/weapons/ecigs.dm +++ b/code/game/objects/items/weapons/ecigs.dm @@ -13,6 +13,7 @@ var/brightness_on = 1 chem_volume = 0 //ecig has no storage on its own but has reagent container created by parent obj item_state = "ecigoff" + is_pipe = TRUE //to avoid a runtime in examine() var/icon_off var/icon_empty var/ecig_colors = list(null, COLOR_DARK_GRAY, COLOR_RED_GRAY, COLOR_BLUE_GRAY, COLOR_GREEN_GRAY, COLOR_PURPLE_GRAY) @@ -21,6 +22,28 @@ ..() ec_cartridge = new cartridge_type(src) +/obj/item/clothing/mask/smokable/ecig/examine(mob/user) + . = ..() + + if(active) + . += "It is turned on." + else + . += "It is turned off." + if(Adjacent(user)) + if(ec_cartridge) + if(!ec_cartridge.reagents?.total_volume) + . += "Its cartridge is empty!" + else if (ec_cartridge.reagents.total_volume <= ec_cartridge.volume * 0.25) + . += "Its cartridge is almost empty!" + else if (ec_cartridge.reagents.total_volume <= ec_cartridge.volume * 0.66) + . += "Its cartridge is half full!" + else if (ec_cartridge.reagents.total_volume <= ec_cartridge.volume * 0.90) + . += "Its cartridge is almost full!" + else + . += "Its cartridge is full!" + else + . += "It has no cartridge." + /obj/item/clothing/mask/smokable/ecig/simple name = "simple electronic cigarette" desc = "A cheap Lucky 1337 electronic cigarette, styled like a traditional cigarette." @@ -56,6 +79,7 @@ var/mob/living/carbon/human/C = loc if (src == C.wear_mask && C.check_has_mouth()) // if it's in the human/monkey mouth, transfer reagents to the mob if (!active || !ec_cartridge || !ec_cartridge.reagents.total_volume)//no cartridge + to_chat(C, "[src] turns off. ") active=0//autodisable the cigarette STOP_PROCESSING(SSobj, src) update_icon()