mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
adds swapping pens in PDAs (#84437)
## About The Pull Request Added the ability to swap items in PDAs <details> <summary>Videos</summary> https://github.com/tgstation/tgstation/assets/112967882/b3c63d7b-7913-42a6-83e7-d2989cdac8b2 </details> ## Why It's Good For The Game You can quickly change items stored in the PDA slots without doing unnecessary actions (pulling the pen out of the PDA, removing it, and inserting another pen) ## Changelog 🆑 qol: you can now swap pens in pdas /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -149,14 +149,14 @@
|
||||
if(tool.w_class >= WEIGHT_CLASS_SMALL) // Anything equal to or larger than small won't work
|
||||
user.balloon_alert(user, "too big!")
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(inserted_item)
|
||||
balloon_alert(user, "no room!")
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(!user.transferItemToLoc(tool, src))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
balloon_alert(user, "inserted [tool]")
|
||||
inserted_item = tool
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
if(inserted_item)
|
||||
swap_pen(user, tool)
|
||||
else
|
||||
balloon_alert(user, "inserted [tool]")
|
||||
inserted_item = tool
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
|
||||
@@ -185,6 +185,14 @@
|
||||
update_appearance()
|
||||
playsound(src, 'sound/machines/pda_button2.ogg', 50, TRUE)
|
||||
|
||||
/obj/item/modular_computer/pda/proc/swap_pen(mob/user, obj/item/tool)
|
||||
if(inserted_item)
|
||||
balloon_alert(user, "swapped pens")
|
||||
user.put_in_hands(inserted_item)
|
||||
inserted_item = tool
|
||||
update_appearance()
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
|
||||
/obj/item/modular_computer/pda/proc/explode(mob/target, mob/bomber, from_message_menu = FALSE)
|
||||
var/turf/current_turf = get_turf(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user