Machine Upgrade Update

- Partial port of tgstation/-tg-station#9813
This commit is contained in:
DZD
2015-08-20 21:03:19 -04:00
parent 639478ace5
commit 5ce49bb3b3
26 changed files with 443 additions and 58 deletions
@@ -85,6 +85,19 @@
..()
charge = 0
/obj/item/weapon/stock_parts/cell/bluespace
name = "bluespace power cell"
origin_tech = "powerstorage=7"
icon_state = "bscell"
maxcharge = 40000
g_amt = 80
rating = 6
construction_cost = list("metal"=800,"gold"=300,"silver"=300,"glass"=160,"diamond"=160)
/obj/item/weapon/stock_parts/cell/bluespace/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/infinite
name = "infinite-capacity power cell!"
icon_state = "icell"
+76 -1
View File
@@ -16,10 +16,40 @@
display_contents_with_number = 1
max_w_class = 3
max_combined_w_class = 100
var/works_from_distance = 0
var/primary_sound = 'sound/items/rped.ogg'
var/alt_sound = null
/obj/item/weapon/storage/part_replacer/afterattack(obj/machinery/T as obj, mob/living/carbon/human/user as mob, flag, params)
if(flag)
return
else
if(works_from_distance)
if(istype(T))
if(T.component_parts)
T.exchange_parts(user, src)
user.Beam(T,icon_state="rped_upgrade",icon='icons/effects/effects.dmi',time=5)
return
/obj/item/weapon/storage/part_replacer/bluespace
name = "bluespace rapid part exchange device"
desc = "A version of the RPED that allows for replacement of parts and scanning from a distance, along with higher capacity for parts."
icon_state = "BS_RPED"
item_state = "BS_RPED"
w_class = 3
storage_slots = 400
max_w_class = 3
max_combined_w_class = 800
works_from_distance = 1
primary_sound = 'sound/items/PSHOOM.ogg'
alt_sound = 'sound/items/PSHOOM_2.ogg'
/obj/item/weapon/storage/part_replacer/proc/play_rped_sound()
//Plays the sound for RPED exchanging or installing parts.
playsound(src, 'sound/items/rped.ogg', 40, 1)
if(alt_sound && prob(30))
playsound(src, alt_sound, 40, 1)
else
playsound(src, primary_sound, 40, 1)
//Sorts stock parts inside an RPED by their rating.
//Only use /obj/item/weapon/stock_parts/ with this sort proc!
@@ -174,6 +204,51 @@
rating = 3
m_amt = 80
//Rating 4
/obj/item/weapon/stock_parts/capacitor/quadratic
name = "quadratic capacitor"
desc = "An capacity capacitor used in the construction of a variety of devices."
icon_state = "quadratic_capacitor"
origin_tech = "powerstorage=6;materials=5"
rating = 4
m_amt = 50
g_amt = 50
/obj/item/weapon/stock_parts/scanning_module/triphasic
name = "triphasic scanning module"
desc = "A compact, ultra resolution triphasic scanning module used in the construction of certain devices."
icon_state = "triphasic_scan_module"
origin_tech = "magnets=6"
rating = 4
m_amt = 50
g_amt = 20
/obj/item/weapon/stock_parts/manipulator/femto
name = "femto-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
icon_state = "femto_mani"
origin_tech = "materials=6;programming=3"
rating = 4
m_amt = 30
/obj/item/weapon/stock_parts/micro_laser/quadultra
name = "quad-ultra micro-laser"
icon_state = "quadultra_micro_laser"
desc = "A tiny laser used in certain devices."
origin_tech = "magnets=6"
rating = 4
m_amt = 10
g_amt = 20
/obj/item/weapon/stock_parts/matter_bin/bluespace
name = "bluespace matter bin"
desc = "A container for hold compressed matter awaiting re-construction."
icon_state = "bluespace_matter_bin"
origin_tech = "materials=6"
rating = 4
m_amt = 80
// Subspace stock parts
/obj/item/weapon/stock_parts/subspace/ansible