mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
custom slices (#12312)
This commit is contained in:
@@ -92,9 +92,26 @@
|
||||
name = "cake"
|
||||
desc = "A popular band."
|
||||
icon_state = "cakecustom"
|
||||
slices_num = 5
|
||||
slice_path = /obj/item/reagent_containers/food/snacks/variable/cakeslice
|
||||
size = 40
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/variable/cakeslice
|
||||
name = "cake slice"
|
||||
desc = "A slice of cake"
|
||||
icon_state = "cakeslicecustom"
|
||||
trash = /obj/item/trash/plate
|
||||
w_class = ITEMSIZE_SMALL
|
||||
size = 8
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/variable/cakeslice/update_icon()
|
||||
. = ..()
|
||||
//Filling overlay
|
||||
var/image/I = image(icon, "[icon_state]_filling")
|
||||
I.color = filling_color
|
||||
overlays += I
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/variable/pocket
|
||||
name = "hot pocket"
|
||||
desc = "You wanna put a bangin- oh, nevermind."
|
||||
|
||||
@@ -252,8 +252,10 @@
|
||||
|
||||
var/reagents_per_slice = reagents.total_volume/slices_num
|
||||
for(var/i=1 to (slices_num-slices_lost))
|
||||
var/obj/slice = new slice_path (src.loc)
|
||||
var/obj/item/reagent_containers/food/slice = new slice_path (src.loc)
|
||||
reagents.trans_to_obj(slice, reagents_per_slice)
|
||||
slice.filling_color = filling_color
|
||||
slice.update_icon()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user