Skip to content

Commit

Permalink
we'll go with that for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerev4r committed Sep 19, 2024
1 parent e5429a5 commit 2541f3e
Showing 1 changed file with 26 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 2541f3e

Please sign in to comment.