mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
[FIX] Mining Vendor now spits ID on power_off (#21658)
* fix: Miner Vendor now spits ID on power_off https://github.com/ss220-space/Paradise/pull/1317 * review fixes * oops missed that * Update code/modules/mining/machine_vending.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -93,13 +93,18 @@
|
||||
)
|
||||
prize_list["Extra"] = list() // Used in child vendors
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/proc/remove_id()
|
||||
if(inserted_id)
|
||||
inserted_id.forceMove(get_turf(src))
|
||||
inserted_id = null
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/power_change()
|
||||
if(!..())
|
||||
return
|
||||
. = ..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(inserted_id && !(stat & NOPOWER))
|
||||
visible_message("<span class='notice'>The ID slot indicator light flickers on \the [src] as it spits out a card before powering down.</span>")
|
||||
inserted_id.forceMove(loc)
|
||||
if(. && inserted_id && (stat & NOPOWER))
|
||||
visible_message("<span class='notice'>The ID slot indicator light flickers on [src] as it spits out a card before powering down.</span>")
|
||||
remove_id()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/update_icon_state()
|
||||
if(has_power())
|
||||
@@ -203,8 +208,7 @@
|
||||
return
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(inserted_id)
|
||||
inserted_id.forceMove(loc) //Prevents deconstructing the ORM from deleting whatever ID was inside it.
|
||||
remove_id()
|
||||
default_deconstruction_crowbar(user, I)
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/mining_voucher))
|
||||
@@ -268,8 +272,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/Destroy()
|
||||
if(inserted_id)
|
||||
inserted_id.forceMove(loc)
|
||||
remove_id()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user