[MIRROR] Credits Put Into PDAs/Modular Computers Go Into Inserted IDs (#5872)

* Credits Put Into PDAs/Modular Computers Go Into Inserted IDs (#59180)

* Credits Put Into PDAs/Modular Computers Go Into Inserted IDs

If a PDA or Modular Computer is attacked by something, it now checks to see if it can insert the object into the inserted ID

* Commenting the code

* Added Istype Checks Based on Feedback

* Adding a return to match the style of code in the same block

* Using Iscash instead of Istype spam

Changes the ID, PDA, and Modular Computer code to use Iscash (Apparently this already existed!)

Additionally, physical currency is checked internally instead of externall

* Credits Put Into PDAs/Modular Computers Go Into Inserted IDs

Co-authored-by: Beatrice <83368538+SpaceDragon00@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-05-23 04:39:40 +01:00
committed by GitHub
co-authored by Beatrice
parent ee895a2763
commit 746d8f171d
3 changed files with 15 additions and 8 deletions
@@ -548,6 +548,12 @@
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
return
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
// Check to see if we have an ID inside, and a valid input for money
if(card_slot?.GetID() && iscash(W))
var/obj/item/card/id/id = card_slot.GetID()
id.attackby(W, user) // If we do, try and put that attacking object in
return
..()
// Used by processor to relay qdel() to machinery type.