Files
Bubberstation/code/datums/actions/items/unzip.dm
Pinta 4d7ba6ebcb [MANUAL MIRROR] Reworks Duffel Bags (Zippers) (#22363)
* Reworks Duffel Bags (Zippers)

* Update backpack.dm

* Duiffel Spotfix

* error fixes

* Update backpack.dm

* Update code/modules/antagonists/cult/cult.dm

* Update backpack.dm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-07-20 23:12:57 -04:00

20 lines
702 B
Plaintext

/datum/action/item_action/zipper
name = "Unzip Duffel"
desc = "Unzip your equipped duffelbag so you can access its contents."
/datum/action/item_action/zipper/New(Target)
. = ..()
RegisterSignal(target, COMSIG_DUFFEL_ZIP_CHANGE, PROC_REF(on_zip_change))
var/obj/item/storage/backpack/duffelbag/duffle_target = target
on_zip_change(target, duffle_target.zipped_up)
/datum/action/item_action/zipper/proc/on_zip_change(datum/source, new_zip)
SIGNAL_HANDLER
if(new_zip)
name = "Unzip"
desc = "Unzip your equipped duffelbag so you can access its contents."
else
name = "Zip"
desc = "Zip your equipped duffelbag so you can move around faster."
build_all_button_icons(UPDATE_BUTTON_NAME)