diff --git a/modular_doppler/modular_species/species_types/snails/modular_snail.dm b/modular_doppler/modular_species/species_types/snails/modular_snail.dm index c999e48244760..066261d77aaa0 100644 --- a/modular_doppler/modular_species/species_types/snails/modular_snail.dm +++ b/modular_doppler/modular_species/species_types/snails/modular_snail.dm @@ -89,22 +89,6 @@ . = ..() atom_storage.max_total_storage = 30 -/obj/item/storage/backpack/snail/attackby(obj/item/core, mob/user) - if(!istype(core, /obj/item/assembly/signaler/anomaly/bluespace)) - return ..() - - to_chat(user, span_notice("You insert [core] into your shell, and it starts to glow blue with expanded storage potential!")) - playsound(src, 'sound/machines/click.ogg', 50, TRUE) - add_filter("bluespace_shell", 2, list("type" = "outline", "color" = COLOR_BLUE_LIGHT, "size" = 1)) - storage_core = TRUE - qdel(core) - emptyStorage() - create_storage(max_specific_storage = WEIGHT_CLASS_GIGANTIC, max_total_storage = 35, max_slots = 30, storage_type = /datum/storage/bag_of_holding) - atom_storage.allow_big_nesting = TRUE - name = "snail shell of holding" - user.update_worn_back() - update_appearance() - /obj/item/storage/backpack/snail/build_worn_icon( default_layer = 0, default_icon_file = null, @@ -121,6 +105,32 @@ standing.add_filter("bluespace_shell", 2, list("type" = "outline", "color" = COLOR_BLUE_LIGHT, "alpha" = SHELL_TRANSPARENCY_ALPHA, "size" = 1)) return standing +/obj/item/storage/backpack/snail/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + if(!istype(tool, /obj/item/assembly/signaler/anomaly/bluespace)) + return NONE + + qdel(tool) + upgrade_to_bluespace(user) + to_chat(user, span_notice("You insert [tool] into your shell, and it starts to glow blue with expanded storage potential!")) + return ITEM_INTERACT_SUCCESS + +/// Upgrades the storage capacity of the snail shell and gives it a glowy blue outline +/obj/item/storage/backpack/snail/proc/upgrade_to_bluespace(mob/living/wearer) + add_filter("bluespace_shell", 2, list("type" = "outline", "color" = COLOR_BLUE_LIGHT, "size" = 1)) + playsound(src, 'sound/machines/click.ogg', 50, TRUE) + storage_core = TRUE + emptyStorage() + create_storage(max_specific_storage = WEIGHT_CLASS_GIGANTIC, max_total_storage = 35, max_slots = 30, storage_type = /datum/storage/bag_of_holding) + atom_storage.allow_big_nesting = TRUE + name = "snail shell of holding" + update_appearance() + + // Update the worn sprite with the blue outline too if applicable + if(isnull(wearer)) + wearer = loc + if(istype(wearer)) + wearer.update_worn_back() + /datum/species/snail/prepare_human_for_preview(mob/living/carbon/human/snail) snail.dna.features["mcolor"] = "#adaba7" snail.update_body(TRUE)