mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-11 01:51:51 +00:00
Cigarette Pack Functionality
Adds the ability to put cheap lighters and individual matches into cigarette packs at the cost of cigarette slots. - A cheap lighter takes up the space of 2 cigarettes - Zippos won't fit, they are too boxy. - A match takes up the space of 1 cigarette. Increases the w_class of all lighters (cheap, zippo, and special zippos) from 1 to 2 - Still fits in pockets, just can't shove as many into a box as they take up more space Adds the ability to light and put out matches on your shoes. - Good for when you lose that matchbox (or shove matches into a cig pack) and need a light. - Works on all shoes, from the humble brown shoes to the devious syndicate magboots, and even the clown shoes. Based on the suggestion from: http://nanotrasen.se/phpbb3/viewtopic.php?f=12&t=6880
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
item_state = "lighter-g"
|
||||
var/icon_on = "lighter-g-on"
|
||||
var/icon_off = "lighter-g"
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
throwforce = 4
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
@@ -158,13 +158,17 @@
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigpacket"
|
||||
item_state = "cigpacket"
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list("/obj/item/clothing/mask/cigarette")
|
||||
max_combined_w_class = 6
|
||||
can_hold = list("/obj/item/clothing/mask/cigarette",
|
||||
"/obj/item/weapon/lighter",
|
||||
"/obj/item/weapon/match")
|
||||
cant_hold = list("/obj/item/clothing/mask/cigarette/cigar",
|
||||
"/obj/item/clothing/mask/cigarette/pipe")
|
||||
"/obj/item/clothing/mask/cigarette/pipe",
|
||||
"/obj/item/weapon/lighter/zippo")
|
||||
icon_type = "cigarette"
|
||||
var/list/unlaced_cigarettes = list() // Cigarettes that haven't received reagents yet
|
||||
var/default_reagents = list("nicotine" = 15) // List of reagents to pre-generate for each cigarette
|
||||
@@ -206,15 +210,38 @@
|
||||
return
|
||||
|
||||
if(istype(M) && M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/cigarette/C = contents[contents.len]
|
||||
if(!istype(C)) return
|
||||
lace_cigarette(C)
|
||||
user.equip_to_slot_if_possible(C, slot_wear_mask)
|
||||
user << "<span class='notice'>You take a cigarette out of the pack.</span>"
|
||||
update_icon()
|
||||
var/got_cig = 0
|
||||
for(var/num=1, num <= contents.len, num++)
|
||||
var/obj/item/I = contents[num]
|
||||
if(istype(I, /obj/item/clothing/mask/cigarette))
|
||||
var/obj/item/clothing/mask/cigarette/C = I
|
||||
lace_cigarette(C)
|
||||
user.equip_to_slot_if_possible(C, slot_wear_mask)
|
||||
user << "<span class='notice'>You take \a [C.name] out of the pack.</span>"
|
||||
update_icon()
|
||||
got_cig = 1
|
||||
break
|
||||
if(!got_cig)
|
||||
user << "<span class='warning'>There are no smokables in the pack!</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/can_be_inserted(obj/item/W as obj, stop_messages = 0)
|
||||
if(istype(W, /obj/item/weapon/match))
|
||||
var/obj/item/weapon/match/M = W
|
||||
if(M.lit == 1)
|
||||
if(!stop_messages)
|
||||
usr << "<span class='notice'>Putting a lit [W] in [src] probably isn't a good idea.</span>"
|
||||
return 0
|
||||
if(istype(W, /obj/item/weapon/lighter))
|
||||
var/obj/item/weapon/lighter/L = W
|
||||
if(L.lit == 1)
|
||||
if(!stop_messages)
|
||||
usr << "<span class='notice'>Putting [W] in [src] while lit probably isn't a good idea.</span>"
|
||||
return 0
|
||||
//if we get this far, handle the insertion checks as normal
|
||||
.=..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
|
||||
Reference in New Issue
Block a user