Merge pull request #6601 from Mloc/bs12-calert

donut boxes now update their icon to properly reflect their contents
This commit is contained in:
Zuhayr
2014-10-06 19:37:24 +10:30
7 changed files with 49 additions and 39 deletions

View File

@@ -852,7 +852,7 @@
req_access_txt = "1"
products = list(/obj/item/weapon/handcuffs = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5,
/obj/item/weapon/reagent_containers/food/snacks/donut/normal = 12,/obj/item/weapon/storage/box/evidence = 6)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/fancy/donut_box = 2)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/donut_box = 2)
/obj/machinery/vending/hydronutrients
name = "NutriMax"

View File

@@ -171,7 +171,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
*/
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
new/datum/stack_recipe("donut box", /obj/item/weapon/storage/fancy/donut_box/empty), \
new/datum/stack_recipe("donut box", /obj/item/weapon/storage/donut_box/empty), \
new/datum/stack_recipe("egg box", /obj/item/weapon/storage/fancy/egg_box), \
new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \
new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \

View File

@@ -37,34 +37,6 @@
return
/*
* Donut Box
*/
/obj/item/weapon/storage/fancy/donut_box
icon = 'icons/obj/food.dmi'
icon_state = "donutbox6"
icon_type = "donut"
name = "donut box"
storage_slots = 6
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut")
foldable = /obj/item/stack/sheet/cardboard
/obj/item/weapon/storage/fancy/donut_box/New()
..()
if(!istype(src,/obj/item/weapon/storage/fancy/donut_box/empty))
for(var/i=1; i <= storage_slots; i++)
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
return
/obj/item/weapon/storage/fancy/donut_box/empty
icon_state = "donutbox0"
/obj/item/weapon/storage/fancy/donut_box/empty/New()
..()
/*
* Egg Box
*/

View File

@@ -1,4 +1,3 @@
/obj/item/weapon/storage/pill_bottle/dice
name = "pack of dice"
desc = "It's a small container with dice inside."
@@ -7,3 +6,36 @@
..()
new /obj/item/weapon/dice( src )
new /obj/item/weapon/dice/d20( src )
/*
* Donut Box
*/
/obj/item/weapon/storage/donut_box
icon = 'icons/obj/food.dmi'
icon_state = "donutbox"
name = "donut box"
storage_slots = 6
var/startswith = 6
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut")
foldable = /obj/item/stack/sheet/cardboard
/obj/item/weapon/storage/donut_box/New()
..()
for(var/i=1; i <= startswith; i++)
new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src)
update_icon()
return
/obj/item/weapon/storage/donut_box/update_icon()
overlays.Cut()
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/donut/D in contents)
var/image/img = image('icons/obj/food.dmi', D.overlay_state)
img.pixel_x = i * 3
overlays += img
i++
/obj/item/weapon/storage/donut_box/empty
icon_state = "donutbox0"
startswith = 0

View File

@@ -390,6 +390,7 @@
desc = "Goes great with Robust Coffee."
icon_state = "donut1"
filling_color = "#D9C386"
var/overlay_state = "box-donut1"
/obj/item/weapon/reagent_containers/food/snacks/donut/normal
name = "donut"
@@ -402,6 +403,7 @@
src.bitesize = 3
if(prob(30))
src.icon_state = "donut2"
src.overlay_state = "box-donut2"
src.name = "frosted donut"
reagents.add_reagent("sprinkles", 2)
@@ -440,6 +442,7 @@
reagents.add_reagent("tricordrazine", 3)
if(prob(30))
src.icon_state = "donut2"
src.overlay_state = "box-donut2"
src.name = "Frosted Chaos Donut"
reagents.add_reagent("sprinkles", 2)
@@ -458,6 +461,7 @@
bitesize = 5
if(prob(30))
src.icon_state = "jdonut2"
src.overlay_state = "box-donut2"
src.name = "Frosted Jelly Donut"
reagents.add_reagent("sprinkles", 2)
@@ -475,6 +479,7 @@
bitesize = 5
if(prob(30))
src.icon_state = "jdonut2"
src.overlay_state = "box-donut2"
src.name = "Frosted Jelly Donut"
reagents.add_reagent("sprinkles", 2)
@@ -492,6 +497,7 @@
bitesize = 5
if(prob(30))
src.icon_state = "jdonut2"
src.overlay_state = "box-donut2"
src.name = "Frosted Jelly Donut"
reagents.add_reagent("sprinkles", 2)