diff --git a/modular_nova/modules/primitive_cooking_additions/code/plant_bag.dm b/modular_nova/modules/primitive_cooking_additions/code/plant_bag.dm new file mode 100644 index 00000000000..f38ef680e83 --- /dev/null +++ b/modular_nova/modules/primitive_cooking_additions/code/plant_bag.dm @@ -0,0 +1,69 @@ +#define RESKIN_LINEN "Linen" + +/obj/item/storage/bag/plants + uses_advanced_reskins = TRUE + unique_reskin = list( + "Original" = list( + RESKIN_ICON = 'icons/obj/service/hydroponics/equipment.dmi', + RESKIN_ICON_STATE = "plantbag", + RESKIN_WORN_ICON = 'icons/mob/clothing/belt.dmi', + RESKIN_WORN_ICON_STATE = "plantbag", + ), + RESKIN_LINEN = list( + RESKIN_ICON = 'modular_nova/modules/primitive_cooking_additions/icons/plant_bag.dmi', + RESKIN_ICON_STATE = "plantbag_primitive", + RESKIN_WORN_ICON = 'modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn.dmi', + RESKIN_WORN_ICON_STATE = "plantbag_primitive", + ), + ) + + +// This is so the linen reskin shows properly in the suit storage. +/obj/item/storage/bag/plants/build_worn_icon(default_layer, default_icon_file, isinhands, female_uniform, override_state, override_file, use_height_offset, mutant_styles) + if(default_layer == SUIT_STORE_LAYER && current_skin == RESKIN_LINEN) + override_file = 'modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn_mirror.dmi' + + return ..() + + +/// Simple helper to reskin this item into its primitive variant. +/obj/item/storage/bag/plants/proc/make_primitive() + current_skin = RESKIN_LINEN + + icon = unique_reskin[current_skin][RESKIN_ICON] + icon_state = unique_reskin[current_skin][RESKIN_ICON_STATE] + worn_icon = unique_reskin[current_skin][RESKIN_WORN_ICON] + worn_icon_state = unique_reskin[current_skin][RESKIN_WORN_ICON_STATE] + + update_appearance() + + +/// A helper for the primitive variant, for mappers. +/obj/item/storage/bag/plants/primitive + current_skin = RESKIN_LINEN // Just so it displays properly when in suit storage + uses_advanced_reskins = FALSE + unique_reskin = null + icon = 'modular_nova/modules/primitive_cooking_additions/icons/plant_bag.dmi' + icon_state = "plantbag_primitive" + worn_icon = 'modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn.dmi' + worn_icon_state = "plantbag_primitive" + + +/obj/item/stack/sheet/cloth/on_item_crafted(mob/builder, atom/created) + if(!istype(created, /obj/item/storage/bag/plants)) + return + + if(!isprimitivedemihuman(builder) && !isashwalker(builder)) + return + + var/obj/item/storage/bag/plants/bag = created + + bag.make_primitive() + + +/obj/item/storage/bag/plants/portaseeder + uses_advanced_reskins = FALSE + unique_reskin = null + + +#undef RESKIN_LINEN diff --git a/modular_nova/modules/primitive_cooking_additions/icons/plant_bag.dmi b/modular_nova/modules/primitive_cooking_additions/icons/plant_bag.dmi new file mode 100644 index 00000000000..aa949961a41 Binary files /dev/null and b/modular_nova/modules/primitive_cooking_additions/icons/plant_bag.dmi differ diff --git a/modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn.dmi b/modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn.dmi new file mode 100644 index 00000000000..5dc6e5fae29 Binary files /dev/null and b/modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn.dmi differ diff --git a/modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn_mirror.dmi b/modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn_mirror.dmi new file mode 100644 index 00000000000..5e3b03c8fe3 Binary files /dev/null and b/modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn_mirror.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 92a9016dbd0..a7ef69e4222 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7937,6 +7937,7 @@ #include "modular_nova\modules\primitive_cooking_additions\code\cookware.dm" #include "modular_nova\modules\primitive_cooking_additions\code\cutting_board.dm" #include "modular_nova\modules\primitive_cooking_additions\code\millstone.dm" +#include "modular_nova\modules\primitive_cooking_additions\code\plant_bag.dm" #include "modular_nova\modules\primitive_cooking_additions\code\stone_griddle.dm" #include "modular_nova\modules\primitive_cooking_additions\code\stone_oven.dm" #include "modular_nova\modules\primitive_cooking_additions\code\stone_stove.dm"