mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
RPE fixes/upgrades (#890)
The RPED now functions properly in more cases, including the destructive analyzer. It can also now intake beakers for rapid exchange on machines that use them.
This commit is contained in:
@@ -418,7 +418,7 @@
|
||||
icon_state = "RPED"
|
||||
item_state = "RPED"
|
||||
w_class = 5
|
||||
can_hold = list(/obj/item/weapon/stock_parts)
|
||||
can_hold = list(/obj/item/weapon/stock_parts,/obj/item/weapon/reagent_containers/glass/beaker)
|
||||
storage_slots = 50
|
||||
use_to_pickup = 1
|
||||
allow_quick_gather = 1
|
||||
|
||||
@@ -309,6 +309,23 @@ Class Procs:
|
||||
if(panel_open)
|
||||
var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
|
||||
var/P
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
|
||||
for(var/D in CB.req_components)
|
||||
var/T = text2path(D)
|
||||
if(ispath(G.type, T))
|
||||
P = T
|
||||
break
|
||||
for(var/obj/item/weapon/reagent_containers/glass/B in R.contents)
|
||||
if(B.reagents && B.reagents.total_volume > 0) continue
|
||||
if(istype(B, P) && istype(G, P))
|
||||
if(B.volume > G.volume)
|
||||
R.remove_from_storage(B, src)
|
||||
R.handle_item_insertion(G, 1)
|
||||
component_parts -= G
|
||||
component_parts += B
|
||||
B.loc = src
|
||||
user << "<span class='notice'>[G.name] replaced with [B.name].</span>"
|
||||
break
|
||||
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
||||
for(var/D in CB.req_components)
|
||||
var/T = text2path(D)
|
||||
@@ -322,11 +339,11 @@ Class Procs:
|
||||
R.handle_item_insertion(A, 1)
|
||||
component_parts -= A
|
||||
component_parts += B
|
||||
B.loc = null
|
||||
B.loc = src
|
||||
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
|
||||
break
|
||||
update_icon()
|
||||
RefreshParts()
|
||||
update_icon()
|
||||
RefreshParts()
|
||||
else
|
||||
user << "<span class='notice'>Following parts detected in the machine:</span>"
|
||||
for(var/var/obj/item/C in component_parts)
|
||||
@@ -344,4 +361,4 @@ Class Procs:
|
||||
I.crit_fail = 1
|
||||
I.loc = loc
|
||||
qdel(src)
|
||||
return 1
|
||||
return 1
|
||||
@@ -43,7 +43,8 @@
|
||||
/obj/machinery/smartfridge/,
|
||||
/obj/machinery/biogenerator,
|
||||
/obj/machinery/constructable_frame,
|
||||
/obj/machinery/radiocarbon_spectrometer
|
||||
/obj/machinery/radiocarbon_spectrometer,
|
||||
/obj/item/weapon/storage/part_replacer
|
||||
)
|
||||
|
||||
New()
|
||||
@@ -92,6 +93,9 @@
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/storage/part_replacer))
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return ..()
|
||||
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen))
|
||||
var/tmp_label = sanitizeSafe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN)
|
||||
if(length(tmp_label) > 10)
|
||||
|
||||
@@ -29,7 +29,7 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/RefreshParts()
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/stock_parts/S in src)
|
||||
for(var/obj/item/weapon/stock_parts/S in component_parts)
|
||||
T += S.rating
|
||||
decon_mod = T * 0.1
|
||||
min_reliability = 93 - T
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Your name.
|
||||
author: Nadrew
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "The Rapid Part Exchanger didn't properly update the Destructive Analyzer when used."
|
||||
- rscadd: "The Rapid Part Exchanger can now utilize beakers."
|
||||
Reference in New Issue
Block a user