From 36303f5a1a8b0be984055ef42b119a8b619d3acd Mon Sep 17 00:00:00 2001 From: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Date: Thu, 7 Mar 2024 15:12:30 -0500 Subject: [PATCH] Linen Plant Bags! - Adds a primitive reskin of the plant bag, makes it the default when crafted by Icewalkers (#1156) * Adds a primitive reskin of the plant bag, makes it the default when icewalkers craft plant bags * Ashwalkers get it too Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --------- Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- .../code/plant_bag.dm | 69 ++++++++++++++++++ .../icons/plant_bag.dmi | Bin 0 -> 417 bytes .../icons/plant_bag_worn.dmi | Bin 0 -> 432 bytes .../icons/plant_bag_worn_mirror.dmi | Bin 0 -> 435 bytes tgstation.dme | 1 + 5 files changed, 70 insertions(+) create mode 100644 modular_nova/modules/primitive_cooking_additions/code/plant_bag.dm create mode 100644 modular_nova/modules/primitive_cooking_additions/icons/plant_bag.dmi create mode 100644 modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn.dmi create mode 100644 modular_nova/modules/primitive_cooking_additions/icons/plant_bag_worn_mirror.dmi 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 0000000000000000000000000000000000000000..aa949961a41da659466acbd00b0f607c07277d52 GIT binary patch literal 417 zcmV;S0bc%zP)V=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+ z(=$pSoZ^zil2jm5sURmYuOulkJ-(nQGdHs&vn*AKi!&v&s2C_|$itvYZc4s!V2K|bdb)r>hO76Pw}5MAe)UF&TTl62~VvfG`jM>+CBQ?ZvCL5k)NY z3lecP3mzd^^!r}jOfwT=SvPHuRoB8v&hxQjfq4{zx_A=vNS1;!#EX$%yl9~Z1H0;7 zM!gKy@y5a@1)wH&{w;u-o!;o>1VXI)>U-P*K_8E`WPpMI0068>L_t(oh3%HH4g(N*(eB2JDz@I0VOWoL>;*o{zviCq~l62yD!W9txPtWvV5k zfW(oW3J9oes;z>6C{R~GKyOoRJ+1?o4;ofG`jM>+CBQ?ZvCL5k)NY z3lecP3mzd^^!r}jOfwT=SvPHuRoB8v&hxQjfq4{zx_A=vNS1;!#EX$%yl9~Z1H0;7 zM!gKy@y5a@1)wH&{w;u-o!;o>1VXI)>U-P*K_8E`WPpMI006H^L_t(oh3%Hh62l+} zMFZN{AW8oJZ>vnYs*ud2oo?<~3ZC(?;7$_&0Q?Lhr@+_tbIQpnobG*eI44gq7wagq zCwO+4Qg#H3Scfd0pmvyO{0dA}tV3#e59M`y2R(m-w_$t&^?v8GQ+2$4RR9100DO^c zi>hw=Fl_FZNWjkMKd`yKOC)g8%Ry~}zr+GdA3<1>PAF)ki)m|wQcEA}ojI@V1ov`+ dmp;H>c>yrm1A6m*V(