Updating PR

This commit is contained in:
Regen
2014-06-13 02:56:58 +02:00
5 changed files with 12242 additions and 11914 deletions
+16
View File
@@ -579,6 +579,22 @@
///////////////////////////////////////Stock Parts /////////////////////////////////
/obj/item/weapon/storage/part_replacer
name = "Rapid Part Exchange Device"
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
icon_state = "RPED"
item_state = "RPED"
w_class = 5
can_hold = list(/obj/item/weapon/stock_parts)
storage_slots = 14
use_to_pickup = 1
allow_quick_gather = 1
allow_quick_empty = 1
collection_mode = 1
max_w_class = 3
max_combined_w_class = 28
/obj/item/weapon/stock_parts
name = "stock part"
desc = "What?"
+27
View File
@@ -304,3 +304,30 @@ Class Procs:
state(text, "blue")
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
/obj/machinery/proc/exchange_parts(mob/user, obj/item/weapon/storage/part_replacer/W)
if(istype(W) && component_parts)
if(panel_open)
var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
var/P
for(var/obj/item/weapon/stock_parts/A in component_parts)
for(var/D in CB.req_components)
if(ispath(A.type, text2path(D)))
P = text2path(D)
break
for(var/obj/item/weapon/stock_parts/B in W.contents)
if(istype(B, P) && istype(A, P))
if(B.rating > A.rating)
W.remove_from_storage(B, src)
W.handle_item_insertion(A, 1)
component_parts -= A
component_parts += B
B.loc = null
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
break
RefreshParts()
else
user << "<span class='notice'>Following parts detected in the machine:</span>"
for(var/var/obj/item/C in component_parts)
user << "<span class='notice'> [C.name]</span>"
return 1
return 0
+10
View File
@@ -953,6 +953,16 @@ datum/design/tech_disk
/////////////Stock Parts////////////////
////////////////////////////////////////
datum/design/RPED
name = "Rapid Part Exchange Device"
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
id = "rped"
req_tech = list("engineering" = 3,
"materials" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 15000, "$glass" = 5000) //hardcore
build_path = /obj/item/weapon/storage/part_replacer
datum/design/basic_capacitor
name = "Basic Capacitor"
desc = "A stock part used in the construction of various devices."