Refactors the Attackby Proc of 40 Machines (Mostly Concerning the RPED) and RPED Afterattack (#26257)

* Refactor wooo!

* Apply suggestions from code review

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

---------

Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
CRUNCH
2024-07-26 14:30:05 +00:00
committed by GitHub
co-authored by Ryan
parent 5cb15f6247
commit a8c9e14c9a
42 changed files with 264 additions and 250 deletions
+9 -6
View File
@@ -181,8 +181,9 @@
// Interactions
/obj/machinery/mineral/ore_redemption/attackby(obj/item/I, mob/user, params)
if(exchange_parts(user, I))
return
if(istype(I, /obj/item/storage/part_replacer))
return ..()
if(!has_power())
return ..()
@@ -202,18 +203,20 @@
add_fingerprint(usr)
return
else if(istype(I, /obj/item/disk/design_disk))
if(istype(I, /obj/item/disk/design_disk))
if(!user.drop_item())
return
I.forceMove(src)
inserted_disk = I
SStgui.update_uis(src)
interact(user)
user.visible_message("<span class='notice'>[user] inserts [I] into [src].</span>",
"<span class='notice'>You insert [I] into [src].</span>")
user.visible_message(
"<span class='notice'>[user] inserts [I] into [src].</span>",
"<span class='notice'>You insert [I] into [src].</span>"
)
return
else if(istype(I, /obj/item/gripper))
if(istype(I, /obj/item/gripper))
if(!try_refill_storage(user))
to_chat(user, "<span class='notice'>You fail to retrieve any sheets from [src].</span>")
return