Skip to content

Commit 9e44ebf

Browse files
authored
Fix not being able to use hypernob crystals and such on clothes with storage (#6255)
## About The Pull Request Fixes #5466 Currently, you're unable to use things like hypernob crystals, xenobio potions, or durathread reinforcement on things like jackboots, because trying to use an item on them always blocks afterattack, regardless of if the item fits or not. This makes those items not try to insert into storage on attackby if you're in combat mode - allowing you to apply those items to things that'd normally just try to put them into storage instead. This was fixed upstream when they nuked afterattack, but sadly that's prolly a long ways from being ported here, so this is the best we got. ## Why It's Good For The Game bugfix good ## Changelog :cl: fix: You can now use hypernob crystals, durathread reinforcement, and fire/lava/pressure-proofing potions on clothing with storage, i.e jackboots, by clicking on it while in combat mode. /:cl:
1 parent a59ef8e commit 9e44ebf

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer_items.dm

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
icon_state = "hypernoblium_crystal"
66
var/uses = 1
77

8+
// monkestation start: allow using on storage items via right clicking or combat mode
9+
/obj/item/hypernoblium_crystal/attackby_storage_insert(datum/storage, atom/storage_holder, mob/living/user)
10+
return !(user?.istate & (ISTATE_HARM | ISTATE_SECONDARY))
11+
// monkestation end
12+
813
/obj/item/hypernoblium_crystal/afterattack(obj/target_object, mob/user, proximity)
914
. = ..()
1015
if(!proximity)
@@ -25,7 +30,7 @@
2530
if(istype(worn_item, /obj/item/clothing/suit/space))
2631
to_chat(user, span_warning("The [worn_item] is already pressure-resistant!"))
2732
return
28-
if(worn_item.min_cold_protection_temperature == SPACE_SUIT_MIN_TEMP_PROTECT && worn_item.clothing_flags & STOPSPRESSUREDAMAGE)
33+
if(worn_item.min_cold_protection_temperature == SPACE_SUIT_MIN_TEMP_PROTECT && (worn_item.clothing_flags & STOPSPRESSUREDAMAGE))
2934
to_chat(user, span_warning("[worn_item] is already pressure-resistant!"))
3035
return
3136
to_chat(user, span_notice("You see how the [worn_item] changes color, it's now pressure proof."))

code/modules/research/xenobiology/crossbreeding/_potions.dm

+10
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ Slimecrossing Potions
107107
icon_state = "potblue"
108108
var/uses = 2
109109

110+
// monkestation start: allow using on storage items via right clicking or combat mode
111+
/obj/item/slimepotion/spaceproof/attackby_storage_insert(datum/storage, atom/storage_holder, mob/living/user)
112+
return !(user?.istate & (ISTATE_HARM | ISTATE_SECONDARY))
113+
// monkestation end
114+
110115
/obj/item/slimepotion/spaceproof/afterattack(obj/item/clothing/C, mob/user, proximity)
111116
. = ..()
112117
if(!uses)
@@ -151,6 +156,11 @@ Slimecrossing Potions
151156
resistance_flags = LAVA_PROOF | FIRE_PROOF
152157
var/uses = 2
153158

159+
// monkestation start: allow using on storage items via right clicking or combat mode
160+
/obj/item/slimepotion/lavaproof/attackby_storage_insert(datum/storage, atom/storage_holder, mob/living/user)
161+
return !(user?.istate & (ISTATE_HARM | ISTATE_SECONDARY))
162+
// monkestation end
163+
154164
/obj/item/slimepotion/lavaproof/afterattack(obj/item/C, mob/user, proximity)
155165
. = ..()
156166
if(!uses)

code/modules/research/xenobiology/xenobiology.dm

+5
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,11 @@
908908
resistance_flags = FIRE_PROOF
909909
var/uses = 3
910910

911+
// monkestation start: allow using on storage items via right clicking or combat mode
912+
/obj/item/slimepotion/fireproof/attackby_storage_insert(datum/storage, atom/storage_holder, mob/living/user)
913+
return !(user?.istate & (ISTATE_HARM | ISTATE_SECONDARY))
914+
// monkestation end
915+
911916
/obj/item/slimepotion/fireproof/afterattack(obj/item/clothing/clothing, mob/user, proximity)
912917
. = ..()
913918
if(!proximity)

monkestation/code/modules/clothing/durathread_weave.dm

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ GLOBAL_LIST_INIT(durathread_weave_blacklist, typecacheof(list(
2929
. = ..()
3030
. += span_info("You can click on a piece of clothing, with an active welder in your offhand, in order to reinforce it!")
3131

32+
/obj/item/stack/sheet/durathread/attackby_storage_insert(datum/storage, atom/storage_holder, mob/user)
33+
return !isclothing(storage_holder) || !(user?.istate & (ISTATE_HARM | ISTATE_SECONDARY))
34+
3235
/obj/item/stack/sheet/durathread/afterattack(obj/item/clothing/clothing, mob/living/user, proximity)
3336
. = ..()
3437
if(. || !isliving(user) || !proximity)

0 commit comments

Comments
 (0)