mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Fixes speed potions behaving super inconsistently on magboots, duffelbags and laptops (#91415)
## About The Pull Request The issue was threefold, first speed potions sent the comsig before actually applying which could be abused to make items not have a slowdown without spending it or coloring them by using it on them in a state when they don't have a slowdown (i.e. disabled magboots). Magboots ``initial()``'d their slowdown which could break them if they somehow got it negative, but I believe that didn't happen in actual gameplay. And I've made duffelbags and laptops have their open slowdown set to 0 similarly to magboots when a speed potion is applied to them. Last one may be a balance change, depending on the original intent, but I'm going off their pre-rework behavior here (and it generally feels weird to be the case when they get unslowdowned and then it gets reapplied when you close and open them) - Closes #91381 ## Changelog 🆑 fix: Fixed speed potions behaving super inconsistently on magboots, duffelbags and laptops /🆑
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
/obj/item/storage/backpack/duffelbag/Initialize(mapload)
|
||||
. = ..()
|
||||
set_zipper(TRUE)
|
||||
RegisterSignal(src, COMSIG_SPEED_POTION_APPLIED, PROC_REF(on_speed_potioned))
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/update_desc(updates)
|
||||
. = ..()
|
||||
@@ -87,11 +88,11 @@
|
||||
zipped_up = new_zip
|
||||
SEND_SIGNAL(src, COMSIG_DUFFEL_ZIP_CHANGE, new_zip)
|
||||
if(zipped_up)
|
||||
slowdown = initial(slowdown)
|
||||
slowdown -= zip_slowdown
|
||||
atom_storage.set_locked(STORAGE_SOFT_LOCKED)
|
||||
atom_storage.display_contents = FALSE
|
||||
else
|
||||
slowdown = zip_slowdown
|
||||
slowdown += zip_slowdown
|
||||
atom_storage.set_locked(STORAGE_NOT_LOCKED)
|
||||
atom_storage.display_contents = TRUE
|
||||
|
||||
@@ -99,6 +100,12 @@
|
||||
var/mob/living/wearer = loc
|
||||
wearer.update_equipment_speed_mods()
|
||||
|
||||
/// Signal handler for [COMSIG_SPEED_POTION_APPLIED]. Speed potion removes the unzipped slowdown
|
||||
/obj/item/storage/backpack/duffelbag/proc/on_speed_potioned(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
// Don't need to touch the actual slowdown here, since the speed potion does it for us
|
||||
zip_slowdown = 0
|
||||
|
||||
/obj/item/storage/backpack/duffelbag/cursed
|
||||
name = "living duffel bag"
|
||||
desc = "A cursed clown duffel bag that hungers for food of any kind. A warning label suggests that it eats food inside. \
|
||||
|
||||
Reference in New Issue
Block a user