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
+5 -4
View File
@@ -150,7 +150,8 @@ var/list/admin_verbs_debug = list(
/client/proc/debugNatureMapGenerator,
/client/proc/check_bomb_impacts,
/client/proc/test_movable_UI,
/client/proc/test_snap_UI
/client/proc/test_snap_UI,
/proc/machine_upgrade
)
var/list/admin_verbs_possess = list(
/proc/possess,
@@ -203,7 +204,7 @@ var/list/admin_verbs_mentor = list(
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
if(holder.rights & R_MOD) verbs += admin_verbs_mod
if(holder.rights & R_MENTOR) verbs += admin_verbs_mentor
/client/proc/remove_admin_verbs()
verbs.Remove(
admin_verbs_default,
@@ -244,7 +245,7 @@ var/list/admin_verbs_mentor = list(
add_admin_verbs()
src << "<span class='interface'>All of your adminverbs are now visible.</span>"
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/admin_ghost()
set category = "Admin"
@@ -576,7 +577,7 @@ var/list/admin_verbs_mentor = list(
deadmins += ckey
src << "<span class='interface'>You are now a normal player.</span>"
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/readmin()
set name = "Re-admin self"
set category = "Admin"
+10
View File
@@ -0,0 +1,10 @@
/proc/machine_upgrade(obj/machinery/M in world)
set name = "Tweak Component Ratings"
set category = "Debug"
var/new_rating = input("Enter new rating:","Num") as num
if(new_rating && M.component_parts)
for(var/obj/item/weapon/stock_parts/P in M.component_parts)
P.rating = new_rating
M.RefreshParts()
feedback_add_details("admin_verb","MU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+36 -2
View File
@@ -16,6 +16,8 @@
var/active = 0
var/powered = 0
var/fire_delay = 100
var/maximum_fire_delay = 100
var/minimum_fire_delay = 20
var/last_shot = 0
var/shot_number = 0
var/state = 0
@@ -25,6 +27,30 @@
var/id_tag = null
var/datum/radio_frequency/radio_connection
/obj/machinery/power/emitter/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/emitter(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
RefreshParts()
/obj/machinery/power/emitter/RefreshParts()
var/max_firedelay = 120
var/firedelay = 120
var/min_firedelay = 24
var/power_usage = 350
for(var/obj/item/weapon/stock_parts/micro_laser/L in component_parts)
max_firedelay -= 20 * L.rating
min_firedelay -= 4 * L.rating
firedelay -= 20 * L.rating
maximum_fire_delay = max_firedelay
minimum_fire_delay = min_firedelay
fire_delay = firedelay
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
power_usage -= 50 * M.rating
active_power_usage = power_usage
//Radio remote control
/obj/machinery/power/emitter/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
@@ -114,7 +140,7 @@
src.active = 1
user << "You turn on the [src]."
src.shot_number = 0
src.fire_delay = 100
src.fire_delay = maximum_fire_delay
message_admins("Emitter turned on by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Emitter turned on by [key_name(user)] in ([x],[y],[z])")
investigate_log("turned <font color='green'>on</font> by [key_name(usr)]","singulo")
@@ -162,7 +188,7 @@
src.fire_delay = 2
src.shot_number ++
else
src.fire_delay = rand(20,100)
src.fire_delay = rand(minimum_fire_delay,maximum_fire_delay)
src.shot_number = 0
var/obj/item/projectile/beam/emitter/A = PoolOrNew(/obj/item/projectile/beam/emitter,src.loc)
@@ -269,6 +295,14 @@
user << "\red Access denied."
return
if(default_deconstruction_screwdriver(user, "emitter_open", "emitter", W))
return
if(exchange_parts(user, W))
return
default_deconstruction_crowbar(W)
..()
return
@@ -242,6 +242,36 @@
build_path = /obj/item/weapon/circuitboard/rdserver
category = list("Research Machinery")
/datum/design/monkey_recycler
name = "Machine Design (Monkey Recycler Board)"
desc = "The circuit board for a monkey recycler."
id = "smartfridge"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/monkey_recycler
category = list ("Misc. Machinery")
/datum/design/processor
name = "Machine Design (Processor Board)"
desc = "The circuit board for a processor."
id = "processor"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/processor
category = list ("Misc. Machinery")
/datum/design/holopad
name = "Machine Design (AI Holopad Board)"
desc = "The circuit board for a holopad."
id = "holopad"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/holopad
category = list ("Misc. Machinery")
/datum/design/arcadebattle
name = "Machine Board (Battle Arcade Machine)"
desc = "Allows for the construction of circuit boards used to build a new Arcade Machine."
@@ -48,6 +48,18 @@
build_path = /obj/item/weapon/stock_parts/cell/super
category = list("Misc","Power")
/datum/design/bluespace_cell
name = "Bluespace Power Cell"
desc = "A power cell that holds 40000 units of energy."
id = "bluespace_cell"
req_tech = list("powerstorage" = 6, "materials" = 5)
reliability_base = 70
build_type = PROTOLATHE | MECHFAB
materials = list("$metal" = 800, "$gold" = 300, "$silver" = 300, "$glass" = 160, "$diamond" = 160)
construction_time=100
build_path = /obj/item/weapon/stock_parts/cell/bluespace
category = list("Misc","Power")
/datum/design/pacman
name = "Machine Board (PACMAN-type Generator)"
desc = "The circuit board that for a PACMAN-type portable generator."
@@ -156,13 +156,78 @@
reliability_base = 75
build_path = /obj/item/weapon/stock_parts/matter_bin/super
category = list("Stock Parts")
/datum/design/quadratic_capacitor
name = "Quadratic Capacitor"
desc = "A stock part used in the construction of various devices."
id = "quadratic_capacitor"
req_tech = list("powerstorage" = 6, "materials" = 5)
build_type = PROTOLATHE
reliability_base = 71
materials = list("$metal" = 100, "$glass" = 100, "$diamond" = 40)
build_path = /obj/item/weapon/stock_parts/capacitor/quadratic
category = list("Stock Parts")
/datum/design/triphasic_scanning
name = "Triphasic Scanning Module"
desc = "A stock part used in the construction of various devices."
id = "triphasic_scanning"
req_tech = list("magnets" = 6, "materials" = 4)
build_type = PROTOLATHE
materials = list("$metal" = 100, "$glass" = 40, "$diamond" = 20)
reliability_base = 72
build_path = /obj/item/weapon/stock_parts/scanning_module/triphasic
category = list("Stock Parts")
/datum/design/femto_mani
name = "Femto Manipulator"
desc = "A stock part used in the construction of various devices."
id = "femto_mani"
req_tech = list("materials" = 6, "programming" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 60, "$diamond" = 30)
reliability_base = 73
build_path = /obj/item/weapon/stock_parts/manipulator/femto
category = list("Stock Parts")
/datum/design/quadultra_micro_laser
name = "Quad-Ultra Micro-Laser"
desc = "A stock part used in the construction of various devices."
id = "quadultra_micro_laser"
req_tech = list("magnets" = 6, "materials" = 6)
build_type = PROTOLATHE
materials = list("$metal" = 20, "$glass" = 40, "$uranium" = 20, "$diamond" = 20)
reliability_base = 70
build_path = /obj/item/weapon/stock_parts/micro_laser/quadultra
category = list("Stock Parts")
/datum/design/bluespace_matter_bin
name = "Bluespace Matter Bin"
desc = "A stock part used in the construction of various devices."
id = "bluespace_matter_bin"
req_tech = list("materials" = 6)
build_type = PROTOLATHE
materials = list("$metal" = 160, "$diamond" = 200)
reliability_base = 75
build_path = /obj/item/weapon/stock_parts/matter_bin/bluespace
category = list("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
materials = list("$metal" = 10000, "$glass" = 5000) //hardcore
build_path = /obj/item/weapon/storage/part_replacer
category = list("Stock Parts")
/datum/design/BS_RPED
name = "Bluespace RPED"
desc = "Powered by bluespace technology, this RPED variant can upgrade buildings from a distance, without needing to remove the panel first."
id = "bs_rped"
req_tech = list("engineering" = 3, "materials" = 5, "programming" = 3, "bluespace" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 15000, "$glass" = 5000, "$silver" = 2500) //hardcore
build_path = /obj/item/weapon/storage/part_replacer/bluespace
category = list("Stock Parts")