[MIRROR] Enables the RPED to construct/replace beakers, igniters and bluespace crystals (#5673)

* Enables the RPED to construct/replace beakers, igniters and bluespace crystals (#35779)

* - Makes it possible to load the rped with beakers, assemblies and other such parts

* - Fixes cell ratings being not really related to desirability

* - sorry uhhh emp cells need to be slightly better than regular cells

* Enables the RPED to construct/replace beakers, igniters and bluespace crystals
This commit is contained in:
CitadelStationBot
2018-02-23 17:42:24 -06:00
committed by Poojawa
parent 3755037c28
commit 4351621e7d
8 changed files with 62 additions and 31 deletions
+3
View File
@@ -25,6 +25,9 @@
var/next_activate = 0 //When we're next allowed to activate - for spam control
/obj/item/device/assembly/get_part_rating()
return 1
/obj/item/device/assembly/proc/on_attach()
/obj/item/device/assembly/proc/on_detach()
+6 -14
View File
@@ -157,6 +157,9 @@
else
return 0
/obj/item/stock_parts/cell/get_part_rating()
return rating * maxcharge
/* Cell variants*/
/obj/item/stock_parts/cell/empty/Initialize()
. = ..()
@@ -167,7 +170,6 @@
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
maxcharge = 500
materials = list(MAT_GLASS=40)
rating = 2
/obj/item/stock_parts/cell/crap/empty/Initialize()
. = ..()
@@ -179,7 +181,6 @@
desc = "A power cell with a slightly higher capacity than normal!"
maxcharge = 2500
materials = list(MAT_GLASS=50)
rating = 2
chargerate = 1000
/obj/item/stock_parts/cell/upgraded/plus
@@ -191,7 +192,6 @@
name = "security borg rechargeable D battery"
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
materials = list(MAT_GLASS=40)
rating = 2.5
/obj/item/stock_parts/cell/secborg/empty/Initialize()
. = ..()
@@ -201,7 +201,6 @@
/obj/item/stock_parts/cell/pulse //200 pulse shots
name = "pulse rifle power cell"
maxcharge = 40000
rating = 3
chargerate = 1500
/obj/item/stock_parts/cell/pulse/carbine //25 pulse shots
@@ -217,7 +216,6 @@
icon_state = "hcell"
maxcharge = 10000
materials = list(MAT_GLASS=60)
rating = 3
chargerate = 1500
/obj/item/stock_parts/cell/high/plus
@@ -237,7 +235,6 @@
icon_state = "scell"
maxcharge = 20000
materials = list(MAT_GLASS=300)
rating = 4
chargerate = 2000
/obj/item/stock_parts/cell/super/empty/Initialize()
@@ -250,7 +247,6 @@
icon_state = "hpcell"
maxcharge = 30000
materials = list(MAT_GLASS=400)
rating = 5
chargerate = 3000
/obj/item/stock_parts/cell/hyper/empty/Initialize()
@@ -264,7 +260,6 @@
icon_state = "bscell"
maxcharge = 40000
materials = list(MAT_GLASS=600)
rating = 6
chargerate = 4000
/obj/item/stock_parts/cell/bluespace/empty/Initialize()
@@ -277,7 +272,7 @@
icon_state = "icell"
maxcharge = 30000
materials = list(MAT_GLASS=1000)
rating = 6
rating = 100
chargerate = 30000
/obj/item/stock_parts/cell/infinite/use()
@@ -289,7 +284,6 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "cell"
maxcharge = 50000
rating = 12
ratingdesc = FALSE
/obj/item/stock_parts/cell/infinite/abductor/update_icon()
@@ -304,7 +298,6 @@
charge = 100
maxcharge = 300
materials = list()
rating = 1
grown_battery = TRUE //it has the overlays for wires
/obj/item/stock_parts/cell/high/slime
@@ -313,13 +306,14 @@
icon = 'icons/mob/slimes.dmi'
icon_state = "yellow slime extract"
materials = list()
rating = 5 //self-recharge makes these desirable
self_recharge = 1 // Infused slime cores self-recharge, over time
/obj/item/stock_parts/cell/emproof
name = "\improper EMP-proof cell"
desc = "An EMP-proof cell."
maxcharge = 500
rating = 2
rating = 3
/obj/item/stock_parts/cell/emproof/empty/Initialize()
. = ..()
@@ -337,7 +331,6 @@
desc = "A high powered capacitor that can provide huge amounts of energy in an instant."
maxcharge = 50000
chargerate = 5000 //Extremely energy intensive
rating = 4
/obj/item/stock_parts/cell/beam_rifle/corrupt()
return
@@ -350,7 +343,6 @@
desc = "A tiny power cell with a very low power capacity. Used in light fixtures to power them in the event of an outage."
maxcharge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell
materials = list(MAT_GLASS = 20)
rating = 1
w_class = WEIGHT_CLASS_TINY
/obj/item/stock_parts/cell/emergency_light/Initialize()
@@ -118,6 +118,9 @@
. = ..()
update_icon()
/obj/item/reagent_containers/glass/beaker/get_part_rating()
return reagents.maximum_volume
/obj/item/reagent_containers/glass/beaker/on_reagent_change(changetype)
update_icon()
+7 -4
View File
@@ -9,7 +9,6 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_HUGE
can_hold = list(/obj/item/stock_parts)
storage_slots = 50
use_to_pickup = 1
allow_quick_gather = 1
@@ -22,6 +21,9 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
var/pshoom_or_beepboopblorpzingshadashwoosh = 'sound/items/rped.ogg'
var/alt_sound = null
/obj/item/storage/part_replacer/can_be_inserted(obj/item/W, stop_messages = 0, mob/user)
return ..() && W.get_part_rating()
/obj/item/storage/part_replacer/afterattack(obj/machinery/T, mob/living/carbon/human/user, flag, params)
if(flag)
return
@@ -72,9 +74,8 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
//Sorts stock parts inside an RPED by their rating.
//Only use /obj/item/stock_parts/ with this sort proc!
/proc/cmp_rped_sort(obj/item/stock_parts/A, obj/item/stock_parts/B)
return B.rating - A.rating
/proc/cmp_rped_sort(obj/item/A, obj/item/B)
return A.get_part_rating() - B.get_part_rating()
/obj/item/stock_parts
name = "stock part"
@@ -88,6 +89,8 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/stock_parts/get_part_rating()
return rating
//Rating 1
/obj/item/stock_parts/capacitor