Skip to content

Commit

Permalink
cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien committed Aug 4, 2023
1 parent 10e0ecc commit f799ef5
Showing 1 changed file with 25 additions and 34 deletions.
59 changes: 25 additions & 34 deletions code/game/objects/items/storage/fancy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* Crayon Box
* Cigarette Box
* Cigar Box
* Match Box
* Vial Box
*/

/obj/item/storage/fancy
Expand All @@ -30,19 +32,24 @@
update_icon()


/obj/item/storage/fancy/get_examine_text(mob/user)
/obj/item/storage/fancy/get_examine_text(obj/item/test, mob/user)
. = ..()
if(length(contents) <= 0)
. += "There are no [src.icon_type]s left in the box."
else if(length(contents) == 1)
. += "There is one [src.icon_type] left in the box."
if(istype(test, /obj/item/storage/fancy/cigar/matchbook))
if(!length(contents))
. += "There are no [src.icon_type]es left in the box."
else if(length(contents) == 1)
. += "There is one [src.icon_type] left in the box."
else
. += "There are [length(src.contents)] [src.icon_type]es in the box."
else
. += "There are [length(src.contents)] [src.icon_type]s in the box."

if(!length(contents))
. += "There are no [src.icon_type]s left in the box."
else if(length(contents) == 1)
. += "There is one [src.icon_type] left in the box."
else
. += "There are [length(src.contents)] [src.icon_type]s in the box."

/*
* Egg Box
*/
// EGG BOX

/obj/item/storage/fancy/egg_box
icon = 'icons/obj/items/food.dmi'
Expand All @@ -59,9 +66,7 @@
new /obj/item/reagent_container/food/snacks/egg(src)
return

/*
* Candle Box
*/
// CANDLE BOX

/obj/item/storage/fancy/candle_box
name = "candle pack"
Expand All @@ -80,9 +85,7 @@
new /obj/item/tool/candle(src)
return

/*
* Crayon Box
*/
// CRAYON BOX

/obj/item/storage/fancy/crayons
name = "box of crayons"
Expand Down Expand Up @@ -120,9 +123,8 @@
return
..()

////////////
//CIG PACK//
////////////
// CIGARETTES BOX

/obj/item/storage/fancy/cigarettes
icon = 'icons/obj/items/cigarettes.dmi'
icon_state = "cigpacket"
Expand Down Expand Up @@ -223,9 +225,7 @@
default_cig_type = /obj/item/clothing/mask/cigarette/ucigarette
storage_slots = 4

/////////////
//CIGAR BOX//
/////////////
// CIGAR BOX

/obj/item/storage/fancy/cigar
name = "cigar case"
Expand Down Expand Up @@ -286,6 +286,8 @@
storage_slots = 1
default_cigar_type = /obj/item/clothing/mask/cigarette/cigar/tarbacks

// MATCH BOX

/obj/item/storage/fancy/cigar/matchbook
name = "\improper Lucky Strikes matchbook"
desc = "A small book of cheap paper matches. Good luck getting them to light. Made by Lucky Strikes, but you'll be anything but lucky when you burn your hand trying to light a match on this."
Expand All @@ -299,15 +301,6 @@
var/light_chance = 70 //how likely you are to light the match on the book
var/burn_chance = 20 //how likely you are to burn yourself once you light it

/obj/item/storage/fancy/cigar/matchbook/get_examine_text(mob/user)
. = ..()
if(!length(contents))
. += "There are no [src.icon_type]es left in the box."
else if(length(contents) == 1)
. += "There is one [src.icon_type] left in the box."
else
. += "There are [length(src.contents)] [src.icon_type]es in the box."

/obj/item/storage/fancy/cigar/matchbook/attackby(obj/item/tool/match/W as obj, mob/living/carbon/human/user as mob)
if(!istype(user))
return
Expand Down Expand Up @@ -349,9 +342,7 @@
light_chance = 60
burn_chance = 40

/*
* Vial Box
*/
// VIAL BOX

/obj/item/storage/fancy/vials
icon = 'icons/obj/items/vialbox.dmi'
Expand Down

0 comments on commit f799ef5

Please sign in to comment.