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
This commit is contained in:
Beatrice
2021-05-22 23:33:17 -04:00
committed by GitHub
parent 722797a506
commit 5b573931f4
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.