The awesome fancy box update which looks super epic, immersive and cool (#9331)

rscadd: "The cookie snack now contains cookies, like the mint and gum packs. They've also been added to the rations box selection."
    rscadd: "Gum packs, mint packs and the cookie snack from the vending machines visibly open when clicked on."
    rscadd: "Gum packs, mint packs and the cookie snack can be crumpled up when empty. If you really wanted to, you still can crumple it with things inside, so long as you're in harm intent."
    rscadd: "Odd boxes, such as candle boxes, donut boxes, crayon boxes and egg boxes can be folded and unfolded from cardboard sheets."
    rscadd: "Donut boxes, egg cartons and cigarette packets visibly open when clicked on. Alt-click to close."
    rscadd: "Mints actually have a proper taste description now."
This commit is contained in:
Wowzewow (Wezzy)
2020-07-18 00:10:53 +03:00
committed by GitHub
parent 2b81cdd077
commit 89eb38177a
49 changed files with 533 additions and 386 deletions
+4 -4
View File
@@ -96,7 +96,7 @@
desc = "A line drawn in a purple chalk."
color = "#a489c2"
/obj/item/storage/fancy/crayons/chalkbox
/obj/item/storage/box/fancy/crayons/chalkbox
name = "box of drafting chalk"
desc = "A box of drafting chalk for drafting floor plans."
icon_state = "chalkbox"
@@ -105,7 +105,7 @@
/obj/item/pen/drafting
)
/obj/item/storage/fancy/crayons/chalkbox/fill()
/obj/item/storage/box/fancy/crayons/chalkbox/fill()
new /obj/item/pen/drafting/red(src)
new /obj/item/pen/drafting(src)
new /obj/item/pen/drafting/yellow(src)
@@ -114,7 +114,7 @@
new /obj/item/pen/drafting/purple(src)
update_icon()
/obj/item/storage/fancy/crayons/chalkbox/update_icon()
/obj/item/storage/box/fancy/crayons/chalkbox/update_icon()
cut_overlays()
for(var/obj/item/pen/drafting/chalk in contents)
add_overlay("[chalk.colorName]")
add_overlay("[chalk.colorName]")
+4 -4
View File
@@ -1,4 +1,4 @@
/obj/item/storage/fancy/cigarettes/pra
/obj/item/storage/box/fancy/cigarettes/pra
name = "\improper Labourer's Choice cigarette packet"
desc = "Jokingly referred to an essential part of a working class citizen's breakfast, beside state-provided provisions."
desc_fluff = "Imported from the People's Republic of Adhomai."
@@ -8,11 +8,11 @@
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
can_hold = list(/obj/item/clothing/mask/smokable/cigarette, /obj/item/flame/lighter, /obj/item/trash/cigbutt, /obj/item/tajcard)
/obj/item/storage/fancy/cigarettes/pra/fill()
/obj/item/storage/box/fancy/cigarettes/pra/fill()
..()
new /obj/item/tajcard(src)
/obj/item/storage/fancy/cigarettes/dpra
/obj/item/storage/box/fancy/cigarettes/dpra
name = "\improper Shastar List'ya cigarette packet"
desc = "Rumored to be a de-facto currency for Adhominian knuckles off-planet."
desc_fluff = "Imported from the Democratic People's Republic of Adhomai."
@@ -20,7 +20,7 @@
item_state = "Bpacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/adhomai
/obj/item/storage/fancy/cigarettes/nka
/obj/item/storage/box/fancy/cigarettes/nka
name = "\improper Gato Royales cigarette packet"
desc = "Popular with the aristocrats of the New Kingdom of Adhomai for its mild menthol flavor."
desc_fluff = "Imported from the New Kingdom of Adhomai."
+8
View File
@@ -164,6 +164,14 @@
name = "\improper Carps Ahoy! miniature cookies"
icon_state = "cookiesnack"
/obj/item/trash/admints
name = "\improper Ad-mints"
icon_state = "admint_pack"
/obj/item/trash/gum
name = "\improper Chewy Fruit flavored gum"
icon_state = "gum_pack"
/obj/item/trash/stew
name = "empty pot"
icon = 'icons/obj/food.dmi'
+11 -6
View File
@@ -162,22 +162,27 @@ obj/item/clothing/mask/chewable/Destroy()
color = reagents.get_color()
update_icon()
/obj/item/storage/box/gum
/obj/item/storage/box/fancy/gum
name = "\improper Chewy Fruit flavored gum"
desc = "A small pack of chewing gum in various flavors."
icon = 'icons/obj/food.dmi'
icon_state = "gum_pack"
item_state = "candy"
icon_type = "gum stick"
storage_type = "packaging"
slot_flags = SLOT_EARS
w_class = 1
starts_with = list(/obj/item/clothing/mask/chewable/candy/gum = 5)
can_hold = list(/obj/item/clothing/mask/chewable/candy/gum,
/obj/item/trash/spitgum)
use_sound = 'sound/items/drop/wrapper.ogg'
can_hold = list(/obj/item/clothing/mask/chewable/candy/gum, /obj/item/trash/spitgum)
max_storage_space = 5
use_sound = 'sound/items/storage/wrapper.ogg'
drop_sound = 'sound/items/drop/wrapper.ogg'
pickup_sound = 'sound/items/pickup/wrapper.ogg'
max_storage_space = 5
foldable = null
trash = /obj/item/trash/gum
closable = FALSE
icon_overlays = FALSE
/obj/item/clothing/mask/chewable/candy/lolli
name = "lollipop"
@@ -68,7 +68,7 @@
/obj/item/storage/wallet,
/obj/item/storage/photo_album,
/obj/item/storage/box/snappops,
/obj/item/storage/fancy/crayons,
/obj/item/storage/box/fancy/crayons,
/obj/item/storage/backpack/holding,
/obj/item/storage/belt/champion,
/obj/item/soap/deluxe,
@@ -164,7 +164,7 @@
/obj/item/storage/wallet,
/obj/item/storage/photo_album,
/obj/item/storage/box/snappops,
/obj/item/storage/fancy/crayons,
/obj/item/storage/box/fancy/crayons,
/obj/item/soap/deluxe,
/obj/item/pen/invisible,
/obj/item/clothing/gloves/watch,
@@ -191,7 +191,7 @@
/obj/item/bluespace_crystal,
/obj/item/flame/lighter/zippo,
/obj/item/device/taperecorder,
/obj/item/storage/fancy/cigarettes/dromedaryco,
/obj/item/storage/box/fancy/cigarettes/dromedaryco,
/obj/item/toy/bosunwhistle,
/obj/item/clothing/mask/fakemoustache,
/obj/item/clothing/mask/gas/clown_hat,
@@ -18,7 +18,6 @@
slot_l_hand_str = "backpack",
slot_r_hand_str = "backpack"
)
w_class = 4
slot_flags = SLOT_BACK
max_w_class = 3
@@ -56,11 +55,6 @@
return 0
return 1
/obj/item/storage/backpack/equipped(var/mob/user, var/slot)
if (slot == slot_back && src.use_sound)
playsound(src.loc, src.use_sound, 50, 1, -5)
..(user, slot)
/*
/obj/item/storage/backpack/dropped(mob/user as mob)
if (loc == user && src.use_sound)
@@ -118,7 +118,7 @@
/obj/item/reagent_containers/personal_inhaler_cartridge,
/obj/item/personal_inhaler,
/obj/item/flame/lighter/zippo,
/obj/item/storage/fancy/cigarettes,
/obj/item/storage/box/fancy/cigarettes,
/obj/item/storage/pill_bottle,
/obj/item/stack/medical,
/obj/item/device/flashlight/pen,
@@ -327,7 +327,7 @@
/obj/item/shovel,
/obj/item/stack/material/animalhide,
/obj/item/flame/lighter,
/obj/item/storage/fancy/cigarettes,
/obj/item/storage/box/fancy/cigarettes,
/obj/item/reagent_containers/food/drinks/bottle,
/obj/item/stack/medical,
/obj/item/reagent_containers/hypospray,
@@ -13,7 +13,7 @@
* Donkpocket and monkeycube boxes,
* ID and security PDA cart boxes,
* Handcuff, mousetrap, and pillbottle boxes,
* Snap-pops and matchboxes,
* Snap-pops,
* Replacement light boxes.
* Kitchen utensil box
* Random preserved snack box
@@ -28,6 +28,7 @@
item_state = "box"
center_of_mass = list("x" = 13,"y" = 10)
var/foldable = /obj/item/stack/material/cardboard // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
var/trash = null // if set, can be crushed into a trash item when empty
var/maxHealth = 20 //health is already defined
use_sound = 'sound/items/storage/box.ogg'
drop_sound = 'sound/items/drop/cardboardbox.ogg'
@@ -37,6 +38,10 @@
/obj/item/storage/box/Initialize()
. = ..()
health = maxHealth
if(foldable)
desc_info += "You can fold this into a sheet. "
if(ispath(src.trash))
desc_info += "This can be crumpled up into a trash item when empty, or forcibly crumpled on harm intent. "
/obj/item/storage/box/proc/damage(var/severity)
health -= severity
@@ -49,7 +54,7 @@
/obj/item/storage/box/attack_generic(var/mob/user)
if(!chewable)
return
if (istype(user, /mob/living))
if(istype(user, /mob/living))
var/mob/living/L = user
if (istype(L, /mob/living/carbon/alien/diona) || istype(L, /mob/living/simple_animal) || istype(L, /mob/living/carbon/human))//Monkey-like things do attack_generic, not crew
@@ -86,33 +91,36 @@
// BubbleWrap - A box can be folded up to make card
/obj/item/storage/box/attack_self(mob/user as mob)
if(..()) return
//try to fold it.
if ( contents.len )
if(..())
return
if ( !ispath(src.foldable) )
return
var/found = 0
// Close any open UI windows first
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
if ( M == user )
found = 1
if ( !found ) // User is too far away
return
// Now make the cardboard
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
playsound(src.loc, 'sound/items/storage/boxfold.ogg', 30, 1)
new src.foldable(get_turf(src))
qdel(src)
/obj/item/storage/backpack/attackby(obj/item/W as obj, mob/user as mob)
if (src.use_sound)
playsound(src.loc, src.use_sound, 50, 1, -5)
..()
if(ispath(src.foldable) || ispath(src.trash))
var/found = 0
for(var/mob/M in range(1))
if(M.s_active == src)
src.close(M) // Close any open UI windows first
if(M == user)
found = 1
if(!found) // User is too far away
return
if(ispath(src.foldable))
if(contents.len)
return
to_chat(user, SPAN_NOTICE("You fold \the [src] flat.")) //make cardboard
playsound(src.loc, 'sound/items/storage/boxfold.ogg', 30, 1)
var/obj/item/foldable = new src.foldable()
qdel(src)
user.put_in_hands(foldable) //try to put it inhands if possible
if(ispath(src.trash))
if(contents.len && user.a_intent == I_HURT) // only crumple with things inside on harmintent.
user.visible_message(SPAN_DANGER("You crush \the [src], spilling its contents everywhere!"), SPAN_DANGER("[user] crushes \the [src], spilling its contents everywhere!"))
spill()
else
to_chat(user, SPAN_NOTICE("You crumple up \the [src].")) //make trash
playsound(src.loc, 'sound/items/pickup/wrapper.ogg', 30, 1)
var/obj/item/trash = new src.trash()
qdel(src)
user.put_in_hands(trash)
/obj/item/storage/box/survival
name = "emergency survival box"
@@ -490,30 +498,6 @@
desc_antag = "These snap pops have an extra compound added that will deploy a tiny smokescreen when snapped."
starts_with = list(/obj/item/toy/snappop/syndi = 8)
/obj/item/storage/box/matches
name = "safety match box"
desc = "A small box of 'Space-Proof' premium safety matches." //can't strike these anywhere other than matchboxes, so they're safety matches
icon = 'icons/obj/cigs_lighters.dmi'
icon_state = "matchbox"
item_state = "box"
w_class = ITEMSIZE_TINY
drop_sound = 'sound/items/drop/matchbox.ogg'
pickup_sound = 'sound/items/pickup/matchbox.ogg'
slot_flags = SLOT_BELT
can_hold = list(/obj/item/flame/match)
starts_with = list(/obj/item/flame/match = 10)
/obj/item/storage/box/matches/attackby(obj/item/flame/match/W, mob/user)
if(istype(W) && !W.lit)
if(prob(25))
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_lit.ogg', 25, 0, -1)
user.visible_message("<b>[user]</b> manages to light \the [W] by striking it on \the [src].", range = 3)
W.light()
else
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_hit.ogg', 25, 0, -1)
W.update_icon()
return
/obj/item/storage/box/autoinjectors
name = "box of empty injectors"
desc = "Contains empty autoinjectors."
@@ -663,6 +647,7 @@
var/list/snacks = list(
/obj/item/reagent_containers/food/snacks/koisbar_clean,
/obj/item/reagent_containers/food/snacks/candy,
/obj/item/reagent_containers/food/snacks/candy/koko,
/obj/item/reagent_containers/food/snacks/candy_corn,
/obj/item/reagent_containers/food/snacks/chips,
/obj/item/reagent_containers/food/snacks/chocolatebar,
@@ -683,7 +668,10 @@
/obj/item/reagent_containers/food/snacks/maps,
/obj/item/reagent_containers/food/snacks/nathisnack,
/obj/item/reagent_containers/food/snacks/adhomian_can,
/obj/item/reagent_containers/food/snacks/tuna
/obj/item/reagent_containers/food/snacks/tuna,
/obj/item/storage/box/fancy/gum,
/obj/item/storage/box/fancy/cookiesnack,
/obj/item/storage/box/fancy/admints
)
for (var/i = 0,i<7,i++)
var/type = pick(snacks)
+143 -67
View File
@@ -3,50 +3,69 @@
* .. Sorry for the shitty path name, I couldnt think of a better one.
*
* WARNING: var/icon_type is used for both examine text and sprite name. Please look at the procs below and adjust your sprite names accordingly
* TODO: Cigarette boxes should be ported to this standard
*
*
* Contains:
* Donut Box
* Egg Box
* Egg Carton
* Candle Box
* Crayon Box
* Cigarette Box
* Match Box
*/
/obj/item/storage/box/fancy
var/icon_type = null // what's in the box. remember to keep it singular.
var/storage_type = "box" // what type of box it is.
var/opened = FALSE // handles open/closing icons. also a failsafe.
var/closable = TRUE // if you can close the icon after opening.
var/icon_overlays = TRUE // whether the icon uses the update_icon() or a unique one.
foldable = null // most of this stuff isn't foldable by default, e.g. cig packets and vial boxes
/obj/item/storage/fancy
item_state = "box" //placeholder, many of these don't have inhands
var/icon_type = null
var/storage_type = "box"
drop_sound = 'sound/items/drop/cardboardbox.ogg'
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
use_sound = 'sound/items/storage/box.ogg'
/obj/item/storage/box/fancy/open(mob/user)
. = ..()
if(!opened)
opened = TRUE
update_icon() // the reason why this isn't a clean catch-all update_icon() for fancy boxes is because of cigarette packets and donut boxes being different.
/obj/item/storage/fancy/update_icon(var/itemremoved = 0)
var/total_contents = src.contents.len - itemremoved
src.icon_state = "[src.icon_type]box[total_contents]"
return
/obj/item/storage/box/fancy/Initialize()
. = ..()
if(closable)
desc_info += "Alt-click to open and close the box. " //aka force override icon state. for you know, style.
/obj/item/storage/fancy/examine(mob/user as mob)
if(!..(user, 1))
return
/obj/item/storage/box/fancy/AltClick(mob/user)
opened = !opened
playsound(src.loc, src.use_sound, 50, 0, -5)
if(closable && !opened)
icon_state = "[initial(icon_state)]" // closed
cut_overlays()
close(user)
return 1
update_icon()
/obj/item/storage/box/fancy/update_icon(var/itemremoved = 0)
if(opened) //use the open icon.
if(icon_overlays) //whether it uses the overlays/uses its own version.
var/total_contents = src.contents.len - itemremoved
src.icon_state = "[src.icon_type][src.storage_type][total_contents]"
else
icon_state = "[initial(icon_state)][src.opened]"
/obj/item/storage/box/fancy/examine(mob/user)
..()
if(contents.len <= 0)
to_chat(user, "There are no [src.icon_type]s left in the [src.storage_type].")
else if(contents.len == 1)
to_chat(user, "There is one [src.icon_type] left in the [src.storage_type].")
else
to_chat(user, "There are [src.contents.len] [src.icon_type]s in the [src.storage_type].")
to_chat(user, "There [src.contents.len == 1 ? "is" : "are"] <b>[src.contents.len]</b> [src.icon_type]\s left in \the [src.storage_type].")
return
/*
* Donut Box
*/
/obj/item/storage/fancy/donut
/obj/item/storage/box/fancy/donut
name = "donut box"
desc = "A box of half-a-dozen donuts."
desc = "A box of half-a-dozen donuts sponsored by GetMore Chocolate Corporation. Allegedly contentious with the psychiatrist unions for some reason."
icon = 'icons/obj/food.dmi'
icon_state = "donutbox"
icon_type = "donut"
@@ -54,31 +73,31 @@
can_hold = list(/obj/item/reagent_containers/food/snacks/donut)
starts_with = list(/obj/item/reagent_containers/food/snacks/donut/normal = 6)
storage_slots = 6
icon_overlays = FALSE
foldable = /obj/item/stack/material/cardboard
/obj/item/storage/fancy/donut/fill()
. = ..()
update_icon()
/obj/item/storage/box/fancy/donut/update_icon() // One of the few unique update_icon()s, due to having to store both regular and sprinkled donuts.
.=..()
if(opened)
cut_overlays()
var/i = 0
for(var/obj/item/reagent_containers/food/snacks/donut/D in contents)
add_overlay("[i][D.overlay_state]")
i++
/obj/item/storage/fancy/donut/update_icon()
cut_overlays()
var/i = 0
for(var/obj/item/reagent_containers/food/snacks/donut/D in contents)
add_overlay("[i][D.overlay_state]")
i++
/obj/item/storage/fancy/donut/empty
/obj/item/storage/box/fancy/donut/empty
starts_with = null
max_storage_space = 12
/*
* Egg Box
*/
/obj/item/storage/fancy/egg_box
/obj/item/storage/box/fancy/egg_box
name = "egg carton"
desc = "A carton of eggs."
icon = 'icons/obj/food.dmi'
icon_state = "eggbox"
icon_state = "eggcarton"
icon_type = "egg"
storage_type = "carton"
center_of_mass = list("x" = 16,"y" = 7)
@@ -88,36 +107,46 @@
/obj/item/reagent_containers/food/snacks/boiledegg
)
starts_with = list(/obj/item/reagent_containers/food/snacks/egg = 12)
foldable = /obj/item/stack/material/cardboard
/*
* Candle Box
*/
/obj/item/storage/fancy/candle_box
/obj/item/storage/box/fancy/candle_box
name = "candle pack"
desc = "A pack of red candles."
icon = 'icons/obj/candle.dmi'
icon_state = "candlebox5"
icon_state = "candlepack0"
item_state = "candlepack"
icon_type = "candle"
item_state = "candlebox5"
storage_type = "pack"
throwforce = 2
slot_flags = SLOT_BELT
max_storage_space = 5
storage_slots = 5
can_hold = list(/obj/item/flame/candle)
starts_with = list(/obj/item/flame/candle = 5)
opened = TRUE
closable = FALSE
foldable = /obj/item/stack/material/cardboard
/obj/item/storage/box/fancy/candle_box/empty
starts_with = null
/*
* Crayon Box
*/
/obj/item/storage/fancy/crayons
/obj/item/storage/box/fancy/crayons
name = "box of crayons"
desc = "A box of crayons for all your rune drawing needs."
icon = 'icons/obj/crayons.dmi'
icon_state = "crayonbox"
icon_type = "crayon"
w_class = ITEMSIZE_SMALL
can_hold = list(
/obj/item/pen/crayon
)
slot_flags = SLOT_BELT
storage_slots = 6
can_hold = list(/obj/item/pen/crayon)
starts_with = list(
/obj/item/pen/crayon/red = 1,
/obj/item/pen/crayon/orange = 1,
@@ -126,18 +155,20 @@
/obj/item/pen/crayon/blue = 1,
/obj/item/pen/crayon/purple = 1
)
opened = TRUE
closable = FALSE
foldable = /obj/item/stack/material/cardboard
/obj/item/storage/fancy/crayons/fill()
. = ..()
update_icon()
/obj/item/storage/box/fancy/crayons/empty
starts_with = null
/obj/item/storage/fancy/crayons/update_icon()
/obj/item/storage/box/fancy/crayons/update_icon()
cut_overlays()
add_overlay("crayonbox")
for(var/obj/item/pen/crayon/crayon in contents)
add_overlay("[crayon.colourName]")
/obj/item/storage/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/storage/box/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/pen/crayon))
switch(W:colourName)
if("mime")
@@ -148,50 +179,91 @@
return
..()
/*
* Matchbox
*/
/obj/item/storage/box/fancy/matches
name = "safety match box"
desc = "A small box of 'Space-Proof' premium safety matches." //can't strike these anywhere other than matchboxes, so they're safety matches
icon = 'icons/obj/cigs_lighters.dmi'
icon_state = "matchbox"
item_state = "box"
icon_type = "match"
w_class = ITEMSIZE_TINY
drop_sound = 'sound/items/drop/matchbox.ogg'
pickup_sound = 'sound/items/pickup/matchbox.ogg'
slot_flags = SLOT_BELT
can_hold = list(/obj/item/flame/match, /obj/item/trash/match)
starts_with = list(/obj/item/flame/match = 10)
icon_overlays = FALSE
/obj/item/storage/box/fancy/matches/attackby(obj/item/flame/match/W, mob/user)
if(istype(W) && !W.lit)
if(prob(25))
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_lit.ogg', 25, 0, -1)
user.visible_message("<b>[user]</b> manages to light \the [W] by striking it on \the [src].", range = 3)
W.light()
else
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_hit.ogg', 25, 0, -1)
W.update_icon()
return
/obj/item/storage/box/fancy/matches/update_icon()
.=..()
if(opened)
if(contents.len == 0)
icon_state = "matchbox_e"
else if(contents.len <= 3)
icon_state = "matchbox_almostempty"
else if(contents.len <= 6)
icon_state = "matchbox_almostfull"
////////////
//CIG PACK//
////////////
/obj/item/storage/fancy/cigarettes
/obj/item/storage/box/fancy/cigarettes
name = "Trans-Stellar Duty Frees cigarette packet"
desc = "A ubiquitous brand of cigarettes, found in the facilities of every major spacefaring corporation in the universe. As mild and flavorless as it gets."
desc_info = "You can put a cigarette directly in your mouth by selecting the mouth region and clicking on yourself with a cigarette packet in hand."
desc_info = "You can put a cigarette directly in your mouth by selecting the mouth region and clicking on yourself with a cigarette packet in hand. "
icon = 'icons/obj/cigs_lighters.dmi'
icon_state = "cigpacket"
item_state = "cigpacket"
icon_type = "cigarette"
storage_type = "packet"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
)
drop_sound = 'sound/items/drop/gloves.ogg'
pickup_sound = 'sound/items/pickup/gloves.ogg'
use_sound = 'sound/items/drop/wrapper.ogg'
use_sound = 'sound/items/storage/wrapper.ogg'
w_class = ITEMSIZE_TINY
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 6
var/cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette
can_hold = list(/obj/item/clothing/mask/smokable/cigarette, /obj/item/flame/lighter, /obj/item/trash/cigbutt)
var/cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette
/obj/item/storage/fancy/cigarettes/Initialize()
/obj/item/storage/box/fancy/cigarettes/Initialize()
flags |= NOREACT
create_reagents(15 * storage_slots) //so people can inject cigarettes without opening a packet, now with being able to inject the whole one
. = ..()
/obj/item/storage/fancy/cigarettes/fill()
/obj/item/storage/box/fancy/cigarettes/fill()
for(var/i = 1 to storage_slots)
new cigarette_to_spawn(src)
/obj/item/storage/fancy/cigarettes/update_icon()
/obj/item/storage/box/fancy/cigarettes/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
/obj/item/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
/obj/item/storage/box/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/clothing/mask/smokable/cigarette/C = W
if(!istype(C)) return // what
reagents.trans_to_obj(C, (reagents.total_volume/contents.len))
..()
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob,var/target_zone)
/obj/item/storage/box/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob,var/target_zone)
if(!istype(M, /mob))
return
@@ -219,48 +291,50 @@
// get it? A - AcmeCo, B - Blank, C - Cigar, D - DromedaryCo. How convenient is that? - Wezzy
/obj/item/storage/fancy/cigarettes/acmeco
/obj/item/storage/box/fancy/cigarettes/acmeco
name = "\improper AcmeCo cigarette packet"
desc = "For those who somehow want to obtain the record for the most amount of cancerous tumors."
icon_state = "Apacket"
item_state = "Apacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/acmeco
/obj/item/storage/fancy/cigarettes/blank
/obj/item/storage/box/fancy/cigarettes/blank
name = "\improper blank cigarette packet"
desc = "The healthiest cigarettes on the market! Wait, isn't this just a roll of paper?"
icon_state = "Bpacket"
item_state = "Bpacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/blank
/obj/item/storage/fancy/cigarettes/cigar
/obj/item/storage/box/fancy/cigarettes/cigar
name = "cigar case"
desc = "A luxurious tote for your fat tokes."
icon_state = "cigarcase"
item_state = "cigarcase"
icon_type = "cigar"
storage_type = "case"
drop_sound = 'sound/items/drop/weldingtool.ogg'
pickup_sound = 'sound/items/pickup/weldingtool.ogg'
use_sound = 'sound/items/storage/briefcase.ogg'
storage_slots = 8
can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar)
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/cigar
chewable = FALSE
/obj/item/storage/fancy/cigarettes/dromedaryco
/obj/item/storage/box/fancy/cigarettes/dromedaryco
name = "\improper DromedaryCo cigarette packet"
desc = "A label on the packaging reads, \"Wouldn't a slow death make a change?\""
icon_state = "Dpacket"
item_state = "Dpacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/dromedaryco
/obj/item/storage/fancy/cigarettes/nicotine
/obj/item/storage/box/fancy/cigarettes/nicotine
name = "\improper Nico-Tine cigarette packet"
desc = "An Eridani marketing triumph - the jingle still torments people to this day."
icon_state = "Epacket"
item_state = "Epacket"
cigarette_to_spawn = /obj/item/clothing/mask/smokable/cigarette/nicotine
/obj/item/storage/fancy/cigarettes/rugged
/obj/item/storage/box/fancy/cigarettes/rugged
name = "\improper Laissez-Faires cigarette packet"
desc = "Rumored to have outlived its original purpose as part of an Idris money laundering scheme."
icon_state = "Fpacket"
@@ -270,7 +344,7 @@
/*
* Vial Box
*/
/obj/item/storage/fancy/vials
/obj/item/storage/box/fancy/vials
name = "vial storage box"
desc = "A box of vials."
icon = 'icons/obj/vialbox.dmi'
@@ -282,6 +356,7 @@
storage_slots = 6
can_hold = list(/obj/item/reagent_containers/glass/beaker/vial)
starts_with = list(/obj/item/reagent_containers/glass/beaker/vial = 6)
chewable = FALSE
/obj/item/storage/lockbox/vials
name = "secure vial storage box"
@@ -317,7 +392,7 @@
..()
update_icon()
/obj/item/storage/fancy/chocolate_box
/obj/item/storage/box/fancy/chocolate_box
name = "chocolate box"
desc = "A lot like life, you never know what you're going to get."
icon = 'icons/obj/chocolate.dmi'
@@ -328,7 +403,8 @@
/obj/item/reagent_containers/food/snacks/truffle/random
)
starts_with = list(/obj/item/reagent_containers/food/snacks/truffle/random = 8)
maxHealth = 40
/obj/item/storage/fancy/chocolate_box/fill()
/obj/item/storage/box/fancy/chocolate_box/fill()
for(var/i=1; i <= storage_slots; i++)
new /obj/item/reagent_containers/food/snacks/truffle/random(src)
@@ -51,7 +51,7 @@
update_icon()
//cigarette papers
/obj/item/storage/fancy/cigpaper
/obj/item/storage/box/fancy/cigpaper
name = "\improper Gen. Eric cigarette paper"
desc = "A ubiquitous brand of cigarette paper, allegedly endorsed by 24th century war hero General Eric Osmundsun for rolling your own cigarettes. Osmundsun died in a freak kayak accident. As it ate him alive during his last campaign. It was pretty freaky."
icon = 'icons/obj/cigs_lighters.dmi'
@@ -59,7 +59,7 @@
item_state = "cigpacket"
drop_sound = 'sound/items/drop/wrapper.ogg'
pickup_sound = 'sound/items/pickup/wrapper.ogg'
use_sound = 'sound/items/drop/wrapper.ogg'
use_sound = 'sound/items/storage/wrapper.ogg'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
@@ -71,7 +71,7 @@
starts_with = list(/obj/item/paper/cig = 10)
make_exact_fit()
/obj/item/storage/fancy/cigpaper/update_icon()
/obj/item/storage/box/fancy/cigpaper/update_icon()
. = ..()
if(contents.len)
icon_state = "[initial(icon_state)]"
@@ -93,9 +93,9 @@
make_exact_fit()
drop_sound = 'sound/items/drop/gloves.ogg'
pickup_sound = 'sound/items/pickup/gloves.ogg'
use_sound = 'sound/items/drop/wrapper.ogg'
use_sound = 'sound/items/storage/wrapper.ogg'
/obj/item/storage/fancy/cigpaper/fine
/obj/item/storage/box/fancy/cigpaper/fine
name = "\improper Trident cigarette paper"
desc = "A fancy brand of Trident cigarette paper, for rolling your own cigarettes. Like a person who appreciates the finer things in life."
icon = 'icons/obj/cigs_lighters.dmi'
@@ -149,12 +149,13 @@
item_state = "Dpacket"
starts_with = list(/obj/item/clothing/mask/chewable/tobacco/fine = 6)
/obj/item/storage/fancy/chewables/tobacco/nico
/obj/item/storage/box/fancy/chewables/tobacco/nico
name = "box of Nico-Tine gum"
desc = "A Sol-approved brand of nicotine gum. Cut out the middleman for your addiction fix."
icon = 'icons/obj/cigs_lighters.dmi'
icon_state = "chew_nico"
item_state = "Epacket"
icon_type = "gum stick"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
@@ -165,7 +166,7 @@
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
use_sound = 'sound/items/storage/box.ogg'
/obj/item/storage/fancy/chewables/tobacco/update_icon()
/obj/item/storage/box/fancy/chewables/tobacco/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
//loose leaf
@@ -362,6 +362,8 @@
user.prepare_for_slotmove(W)
W.forceMove(src)
W.on_enter_storage(src)
if(use_sound)
playsound(src.loc, src.use_sound, 50, 0, -5)
if(user)
W.dropped(user)
if(!istype(W, /obj/item/forensics))
@@ -408,8 +410,8 @@
if(!istype(W))
return FALSE
if(istype(src, /obj/item/storage/fancy))
var/obj/item/storage/fancy/F = src
if(istype(src, /obj/item/storage/box/fancy))
var/obj/item/storage/box/fancy/F = src
F.update_icon(TRUE)
for(var/mob/M in range(1, get_turf(src)))
@@ -472,7 +474,7 @@
user.s_active.show_to(user)
// who knows what the fuck this does
if (istype(src, /obj/item/storage/fancy))
if (istype(src, /obj/item/storage/box/fancy))
update_icon(1)
else
update_icon()
@@ -485,7 +487,6 @@
return handle_item_insertion(W, prevent_messages)
/obj/item/storage/attackby(obj/item/W as obj, mob/user as mob)
..()
@@ -749,4 +750,4 @@
//return 2**(w_class-1) //1,2,4,8,16,...
#undef STORAGE_SPACE_CAP
#undef STORAGE_SPACE_CAP
@@ -168,24 +168,24 @@
/obj/item/storage/box/syndie_kit/cigarette/fill()
..()
var/obj/item/storage/fancy/cigarettes/pack
pack = new /obj/item/storage/fancy/cigarettes(src)
var/obj/item/storage/box/fancy/cigarettes/pack
pack = new /obj/item/storage/box/fancy/cigarettes(src)
fill_cigarre_package(pack, list(/datum/reagent/aluminum = 5, /datum/reagent/potassium = 5, /datum/reagent/sulfur = 5))
pack.desc += " 'F' has been scribbled on it."
pack = new /obj/item/storage/fancy/cigarettes(src)
pack = new /obj/item/storage/box/fancy/cigarettes(src)
fill_cigarre_package(pack, list(/datum/reagent/aluminum = 5, /datum/reagent/potassium = 5, /datum/reagent/sulfur = 5))
pack.desc += " 'F' has been scribbled on it."
pack = new /obj/item/storage/fancy/cigarettes(src)
pack = new /obj/item/storage/box/fancy/cigarettes(src)
fill_cigarre_package(pack, list(/datum/reagent/potassium = 5, /datum/reagent/sugar = 5, /datum/reagent/phosphorus = 5))
pack.desc += " 'S' has been scribbled on it."
pack = new /obj/item/storage/fancy/cigarettes(src)
pack = new /obj/item/storage/box/fancy/cigarettes(src)
fill_cigarre_package(pack, list(/datum/reagent/potassium = 5, /datum/reagent/sugar = 5, /datum/reagent/phosphorus = 5))
pack.desc += " 'S' has been scribbled on it."
pack = new /obj/item/storage/fancy/cigarettes(src)
pack = new /obj/item/storage/box/fancy/cigarettes(src)
// Dylovene. Going with 1.5 rather than 1.6666666...
fill_cigarre_package(pack, list(/datum/reagent/potassium = 1.5, /datum/reagent/ammonia = 1.5, /datum/reagent/silicon = 1.5))
// Mindbreaker
@@ -193,13 +193,13 @@
pack.desc += " 'MB' has been scribbled on it."
pack = new /obj/item/storage/fancy/cigarettes(src)
pack = new /obj/item/storage/box/fancy/cigarettes(src)
pack.reagents.add_reagent(/datum/reagent/tricordrazine, 15 * pack.storage_slots)
pack.desc += " 'T' has been scribbled on it."
new /obj/item/flame/lighter/zippo(src)
/proc/fill_cigarre_package(var/obj/item/storage/fancy/cigarettes/C, var/list/reagents)
/proc/fill_cigarre_package(var/obj/item/storage/box/fancy/cigarettes/C, var/list/reagents)
for(var/reagent in reagents)
C.reagents.add_reagent(reagent, reagents[reagent] * C.storage_slots)
@@ -236,4 +236,4 @@
/obj/item/storage/box/syndie_kit/random_weapon/Initialize()
.=..()
desc = "A sleek, sturdy box"
desc = "A sleek, sturdy box"
@@ -182,7 +182,7 @@
throw_range = 5
attack_verb = list("attacked", "hit", "bludgeoned")
/obj/item/storage/fancy/tray
/obj/item/storage/box/fancy/tray
name = "surgery tray"
desc = "A tray of surgical tools."
icon = 'icons/obj/surgery.dmi'
@@ -223,7 +223,7 @@
/obj/item/stack/medical/advanced/bruise_pack = 1,
)
/obj/item/storage/fancy/tray/update_icon()
/obj/item/storage/box/fancy/tray/update_icon()
cut_overlays()
var/list/types_and_overlays = list(
@@ -247,19 +247,19 @@
add_overlay(types_and_overlays[W.type])
types_and_overlays -= W.type
/obj/item/storage/fancy/tray/fill()
/obj/item/storage/box/fancy/tray/fill()
. = ..()
update_icon()
/obj/item/storage/fancy/tray/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/storage/box/fancy/tray/attackby(obj/item/W as obj, mob/user as mob)
..()
update_icon()
/obj/item/storage/fancy/tray/attack_hand(mob/user as mob)
/obj/item/storage/box/fancy/tray/attack_hand(mob/user as mob)
if(ishuman(user))
src.open(user)
/obj/item/storage/fancy/tray/MouseDrop(mob/user as mob)
/obj/item/storage/box/fancy/tray/MouseDrop(mob/user as mob)
if((user && (!use_check(user))) && (user.contents.Find(src) || in_range(src, user)))
if(ishuman(user) && !user.get_active_hand())
var/mob/living/carbon/human/H = user
@@ -279,12 +279,12 @@
return
/obj/item/storage/fancy/tray/attack(mob/living/M as mob, mob/user as mob, var/target_zone)
/obj/item/storage/box/fancy/tray/attack(mob/living/M as mob, mob/user as mob, var/target_zone)
if(..() && contents.len)
spill(3, get_turf(M))
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
user.visible_message(SPAN_DANGER("[user] smashes \the [src] into [M], causing it to spill its contents across the area!"))
/obj/item/storage/fancy/tray/throw_impact(atom/hit_atom)
/obj/item/storage/box/fancy/tray/throw_impact(atom/hit_atom)
..()
spill(3, src.loc)
+2 -2
View File
@@ -28,9 +28,9 @@
var/list/valid = list(
/obj/item/reagent_containers,
/obj/item/material/kitchen/utensil,
/obj/item/storage/fancy/cigarettes,
/obj/item/storage/box/fancy/cigarettes,
/obj/item/clothing/mask/smokable,
/obj/item/storage/box/matches,
/obj/item/storage/box/fancy/matches,
/obj/item/flame/match,
/obj/item/material/ashtray
)
+16 -16
View File
@@ -212,16 +212,16 @@
icon = 'icons/obj/cigs_lighters.dmi'
icon_state = "cigpacket"
problist = list(
/obj/item/storage/fancy/cigarettes = 30,
/obj/item/storage/fancy/cigarettes/blank = 5,
/obj/item/storage/fancy/cigarettes/acmeco = 2,
/obj/item/storage/fancy/cigarettes/dromedaryco = 10,
/obj/item/storage/fancy/cigarettes/cigar = 9,
/obj/item/storage/fancy/cigarettes/nicotine = 10,
/obj/item/storage/fancy/cigarettes/rugged = 10,
/obj/item/storage/fancy/cigarettes/pra = 5,
/obj/item/storage/fancy/cigarettes/dpra = 2,
/obj/item/storage/fancy/cigarettes/nka = 2
/obj/item/storage/box/fancy/cigarettes = 30,
/obj/item/storage/box/fancy/cigarettes/blank = 5,
/obj/item/storage/box/fancy/cigarettes/acmeco = 2,
/obj/item/storage/box/fancy/cigarettes/dromedaryco = 10,
/obj/item/storage/box/fancy/cigarettes/cigar = 9,
/obj/item/storage/box/fancy/cigarettes/nicotine = 10,
/obj/item/storage/box/fancy/cigarettes/rugged = 10,
/obj/item/storage/box/fancy/cigarettes/pra = 5,
/obj/item/storage/box/fancy/cigarettes/dpra = 2,
/obj/item/storage/box/fancy/cigarettes/nka = 2
)
/obj/random/energy
@@ -866,11 +866,11 @@
/obj/item/storage/box/pineapple = 0.1,
/obj/item/storage/box/smokebombs = 0.1,
/obj/item/storage/box/syringes = 0.3,
/obj/item/storage/fancy/cigarettes = 1.2,
/obj/item/storage/fancy/cigarettes/acmeco = 0.3,
/obj/item/storage/fancy/cigarettes/blank = 1,
/obj/item/storage/fancy/cigarettes/dromedaryco = 0.8,
/obj/item/storage/fancy/crayons = 0.5,
/obj/item/storage/box/fancy/cigarettes = 1.2,
/obj/item/storage/box/fancy/cigarettes/acmeco = 0.3,
/obj/item/storage/box/fancy/cigarettes/blank = 1,
/obj/item/storage/box/fancy/cigarettes/dromedaryco = 0.8,
/obj/item/storage/box/fancy/crayons = 0.5,
/obj/item/storage/wallet/random/ = 0.1,
/obj/item/trap/animal = 0.8,
/obj/random/arcade = 0.25,
@@ -1114,7 +1114,7 @@
/obj/item/toy/sword = 22,
/obj/item/gun/projectile/revolver/capgun = 11,
/obj/item/toy/crossbow = 11,
/obj/item/storage/fancy/crayons = 11,
/obj/item/storage/box/fancy/crayons = 11,
/obj/item/toy/spinningtoy = 11,
/obj/item/toy/prize/ripley = 1,
/obj/item/toy/prize/fireripley = 1,
@@ -55,7 +55,7 @@
for(var/i = 0, i < 2, i++)
new /obj/item/reagent_containers/food/drinks/soymilk(src)
for(var/i = 0, i < 2, i++)
new /obj/item/storage/fancy/egg_box(src)
new /obj/item/storage/box/fancy/egg_box(src)
/obj/structure/closet/secure_closet/freezer/money
@@ -74,4 +74,4 @@
new /obj/random/spacecash(src)
for(var/i = 0, i < rand(6,9), i++)
new /obj/random/coin(src)
new /obj/random/coin(src)
@@ -86,8 +86,8 @@
new /obj/item/clothing/suit/nun(src)
new /obj/item/clothing/head/nun_hood(src)
new /obj/item/clothing/suit/holidaypriest(src)
new /obj/item/storage/fancy/candle_box(src)
new /obj/item/storage/fancy/candle_box(src)
new /obj/item/storage/box/fancy/candle_box(src)
new /obj/item/storage/box/fancy/candle_box(src)
new /obj/item/deck/tarot(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/spirit_board(src)