mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Merge remote-tracking branch 'bay12-upstream/master' into development
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
/*///////////////Circuit Imprinter (By Darem)////////////////////////
|
||||
Used to print new circuit boards (for computers and similar systems) and AI modules. Each circuit board pattern are stored in
|
||||
a /datum/desgin on the linked R&D console. You can then print them out in a fasion similar to a regular lathe. However, instead of
|
||||
using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
|
||||
using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
||||
*/
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter
|
||||
name = "Circuit Imprinter"
|
||||
icon_state = "circuit_imprinter"
|
||||
flags = OPENCONTAINER
|
||||
|
||||
var/g_amount = 0
|
||||
var/gold_amount = 0
|
||||
var/diamond_amount = 0
|
||||
var/uranium_amount = 0
|
||||
var/max_material_amount = 75000.0
|
||||
var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
|
||||
var/list/datum/design/queue = list()
|
||||
var/progress = 0
|
||||
|
||||
var/max_material_storage = 75000
|
||||
var/mat_efficiency = 1
|
||||
var/speed = 1
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 30
|
||||
@@ -30,60 +31,76 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/process()
|
||||
..()
|
||||
if(stat)
|
||||
update_icon()
|
||||
return
|
||||
if(queue.len == 0)
|
||||
busy = 0
|
||||
update_icon()
|
||||
return
|
||||
var/datum/design/D = queue[1]
|
||||
if(canBuild(D))
|
||||
busy = 1
|
||||
progress += speed
|
||||
if(progress >= D.time)
|
||||
build(D)
|
||||
progress = 0
|
||||
removeFromQueue(1)
|
||||
if(linked_console)
|
||||
linked_console.updateUsrDialog()
|
||||
update_icon()
|
||||
else
|
||||
if(busy)
|
||||
visible_message("<span class='notice'>\icon [src] flashes: insufficient materials: [getLackingMaterials(D)].</span>")
|
||||
busy = 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/RefreshParts()
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
|
||||
T += G.reagents.maximum_volume
|
||||
var/datum/reagents/R = new/datum/reagents(T) //Holder for the reagents used as materials.
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
T = 0
|
||||
create_reagents(T)
|
||||
max_material_storage = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
T += M.rating
|
||||
max_material_amount = T * 75000.0
|
||||
max_material_storage += M.rating * 75000
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
T += M.rating
|
||||
mat_efficiency = 1 - (T - 1) / 4
|
||||
speed = T
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "circuit_imprinter_t"
|
||||
else if(busy)
|
||||
icon_state = "circuit_imprinter_ani"
|
||||
else
|
||||
icon_state = "circuit_imprinter"
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/blob_act()
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/meteorhit()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/proc/TotalMaterials()
|
||||
return g_amount + gold_amount + diamond_amount + uranium_amount
|
||||
var/t = 0
|
||||
for(var/f in materials)
|
||||
t += materials[f]
|
||||
return t
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/dismantle()
|
||||
for(var/obj/I in component_parts)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
reagents.trans_to_obj(I, reagents.total_volume)
|
||||
if(g_amount >= 3750)
|
||||
var/obj/item/stack/material/glass/G = new /obj/item/stack/material/glass(loc)
|
||||
G.amount = round(g_amount / 3750)
|
||||
if(gold_amount >= 2000)
|
||||
var/obj/item/stack/material/gold/G = new /obj/item/stack/material/gold(loc)
|
||||
G.amount = round(gold_amount / 2000)
|
||||
if(diamond_amount >= 2000)
|
||||
var/obj/item/stack/material/diamond/G = new /obj/item/stack/material/diamond(loc)
|
||||
G.amount = round(diamond_amount / 2000)
|
||||
if(uranium_amount >= 2000)
|
||||
var/obj/item/stack/material/uranium/G = new /obj/item/stack/material/uranium(loc)
|
||||
G.amount = round(uranium_amount / 2000)
|
||||
for(var/f in materials)
|
||||
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
|
||||
var/path = getMaterialType(f)
|
||||
if(path)
|
||||
var/obj/item/stack/S = new f(loc)
|
||||
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
|
||||
..()
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(shocked)
|
||||
shock(user, 50)
|
||||
if(busy)
|
||||
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
|
||||
return 1
|
||||
if(default_deconstruction_screwdriver(user, O))
|
||||
if(linked_console)
|
||||
linked_console.linked_imprinter = null
|
||||
@@ -96,55 +113,90 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>You can't load \the [src] while it's opened.</span>"
|
||||
return 1
|
||||
if(disabled)
|
||||
user << "\The [src] appears to not be working!"
|
||||
return
|
||||
if(!linked_console)
|
||||
user << "\The [src] must be linked to an R&D console first!"
|
||||
user << "\The [src] must be linked to an R&D console first."
|
||||
return 1
|
||||
if(O.is_open_container())
|
||||
return 0
|
||||
if(!istype(O, /obj/item/stack/material))
|
||||
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
|
||||
return 1
|
||||
if(stat)
|
||||
return 1
|
||||
if(busy)
|
||||
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
|
||||
|
||||
if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage)
|
||||
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
|
||||
return 1
|
||||
|
||||
if(istype(O, /obj/item/stack/material) && O.get_material_name() in list("glass", "gold", "diamond", "uranium"))
|
||||
|
||||
var/obj/item/stack/material/stack = O
|
||||
if((TotalMaterials() + stack.perunit) > max_material_amount)
|
||||
user << "<span class='notice'>\The [src] is full. Please remove glass from \the [src] in order to insert more.</span>"
|
||||
return 1
|
||||
|
||||
var/amount = round(input("How many sheets do you want to add?") as num)
|
||||
if(amount < 0)
|
||||
amount = 0
|
||||
if(amount == 0)
|
||||
return
|
||||
if(amount > stack.amount)
|
||||
amount = min(stack.amount, round((max_material_amount - TotalMaterials()) / stack.perunit))
|
||||
|
||||
busy = 1
|
||||
var/stacktype = stack.type
|
||||
if(do_after(usr, 16) && stack.use(amount))
|
||||
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
|
||||
use_power(max(1000, (3750 * amount / 10)))
|
||||
switch(stacktype)
|
||||
if(/obj/item/stack/material/glass)
|
||||
g_amount += amount * 3750
|
||||
if(/obj/item/stack/material/gold)
|
||||
gold_amount += amount * 2000
|
||||
if(/obj/item/stack/material/diamond)
|
||||
diamond_amount += amount * 2000
|
||||
if(/obj/item/stack/material/uranium)
|
||||
uranium_amount += amount * 2000
|
||||
busy = 0
|
||||
updateUsrDialog()
|
||||
var/obj/item/stack/material/stack = O
|
||||
var/amount = round(input("How many sheets do you want to add?") as num)
|
||||
if(!O)
|
||||
return
|
||||
if(amount <= 0)//No negative numbers
|
||||
return
|
||||
if(amount > stack.get_amount())
|
||||
amount = stack.get_amount()
|
||||
if(max_material_storage - TotalMaterials() < (amount * SHEET_MATERIAL_AMOUNT)) //Can't overfill
|
||||
amount = min(stack.get_amount(), round((max_material_storage - TotalMaterials()) / SHEET_MATERIAL_AMOUNT))
|
||||
|
||||
..()
|
||||
busy = 1
|
||||
use_power(max(1000, (SHEET_MATERIAL_AMOUNT * amount / 10)))
|
||||
var/stacktype = stack.type
|
||||
var/t = getMaterialName(stacktype)
|
||||
if(t)
|
||||
if(do_after(usr, 16))
|
||||
if(stack.use(amount))
|
||||
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
|
||||
materials[t] += amount * SHEET_MATERIAL_AMOUNT
|
||||
busy = 0
|
||||
updateUsrDialog()
|
||||
|
||||
//This is to stop these machines being hackable via clicking.
|
||||
/obj/machinery/r_n_d/circuit_imprinter/attack_hand(mob/user as mob)
|
||||
return
|
||||
/obj/machinery/r_n_d/circuit_imprinter/proc/addToQueue(var/datum/design/D)
|
||||
queue += D
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/proc/removeFromQueue(var/index)
|
||||
queue.Cut(index, index + 1)
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(var/datum/design/D)
|
||||
for(var/M in D.materials)
|
||||
if(materials[M] < D.materials[M])
|
||||
return 0
|
||||
for(var/C in D.chemicals)
|
||||
if(!reagents.has_reagent(C, D.chemicals[C]))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/proc/getLackingMaterials(var/datum/design/D)
|
||||
var/ret = ""
|
||||
for(var/M in D.materials)
|
||||
if(materials[M] < D.materials[M])
|
||||
if(ret != "")
|
||||
ret += ", "
|
||||
ret += "[D.materials[M] - materials[M]] [M]"
|
||||
for(var/C in D.chemicals)
|
||||
if(!reagents.has_reagent(C, D.chemicals[C]))
|
||||
if(ret != "")
|
||||
ret += ", "
|
||||
ret += C
|
||||
return ret
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/proc/build(var/datum/design/D)
|
||||
var/power = active_power_usage
|
||||
for(var/M in D.materials)
|
||||
power += round(D.materials[M] / 5)
|
||||
power = max(active_power_usage, power)
|
||||
use_power(power)
|
||||
for(var/M in D.materials)
|
||||
materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency)
|
||||
for(var/C in D.chemicals)
|
||||
reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency)
|
||||
|
||||
if(D.build_path)
|
||||
var/obj/new_item = D.Fabricate(src, src)
|
||||
new_item.loc = loc
|
||||
if(mat_efficiency != 1) // No matter out of nowhere
|
||||
if(new_item.matter && new_item.matter.len > 0)
|
||||
for(var/i in new_item.matter)
|
||||
new_item.matter[i] = new_item.matter[i] * mat_efficiency
|
||||
|
||||
+1579
-1489
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/*
|
||||
Destructive Analyzer
|
||||
|
||||
@@ -7,12 +5,12 @@ It is used to destroy hand-held objects and advance technological research. Cont
|
||||
|
||||
Note: Must be placed within 3 tiles of the R&D Console
|
||||
*/
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer
|
||||
name = "destructive analyzer"
|
||||
icon_state = "d_analyzer"
|
||||
var/obj/item/weapon/loaded_item = null
|
||||
var/decon_mod = 1
|
||||
var/min_reliability = 90
|
||||
var/obj/item/weapon/loaded_item = null
|
||||
var/decon_mod = 0
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 30
|
||||
@@ -32,11 +30,6 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
for(var/obj/item/weapon/stock_parts/S in src)
|
||||
T += S.rating
|
||||
decon_mod = T * 0.1
|
||||
min_reliability = 93 - T
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/meteorhit()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/update_icon()
|
||||
if(panel_open)
|
||||
@@ -47,8 +40,12 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
icon_state = "d_analyzer"
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/attackby(var/obj/O as obj, var/mob/user as mob)
|
||||
if(shocked)
|
||||
shock(user, 50)
|
||||
if(busy)
|
||||
user << "<span class='notice'>\The [src] is busy right now.</span>"
|
||||
return
|
||||
if(loaded_item)
|
||||
user << "<span class='notice'>There is something already loaded into \the [src].</span>"
|
||||
return 1
|
||||
if(default_deconstruction_screwdriver(user, O))
|
||||
if(linked_console)
|
||||
linked_console.linked_destroy = null
|
||||
@@ -61,32 +58,23 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>You can't load \the [src] while it's opened.</span>"
|
||||
return 1
|
||||
if(disabled)
|
||||
return
|
||||
if(!linked_console)
|
||||
user << "<span class='notice'>\The [src] must be linked to an R&D console first!</span>"
|
||||
return
|
||||
if(busy)
|
||||
user << "<span class='notice'>\The [src] is busy right now.</span>"
|
||||
user << "<span class='notice'>\The [src] must be linked to an R&D console first.</span>"
|
||||
return
|
||||
if(istype(O, /obj/item) && !loaded_item)
|
||||
if(isrobot(user)) //Don't put your module items in there!
|
||||
return
|
||||
if(!O.origin_tech)
|
||||
user << "<span class='notice'>This doesn't seem to have a tech origin!</span>"
|
||||
user << "<span class='notice'>This doesn't seem to have a tech origin.</span>"
|
||||
return
|
||||
var/list/temp_tech = ConvertReqString2List(O.origin_tech)
|
||||
if(temp_tech.len == 0)
|
||||
user << "<span class='notice'>You cannot deconstruct this item!</span>"
|
||||
return
|
||||
if(O.reliability < min_reliability && O.crit_fail == 0)
|
||||
usr << "<span class='warning'>Item is neither reliable enough nor broken enough to learn from.</span>"
|
||||
if(O.origin_tech.len == 0)
|
||||
user << "<span class='notice'>You cannot deconstruct this item.</span>"
|
||||
return
|
||||
busy = 1
|
||||
loaded_item = O
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
user << "<span class='notice'>You add \the [O] to \the [src]!</span>"
|
||||
user << "<span class='notice'>You add \the [O] to \the [src].</span>"
|
||||
flick("d_analyzer_la", src)
|
||||
spawn(10)
|
||||
update_icon()
|
||||
|
||||
@@ -0,0 +1,609 @@
|
||||
/datum/design/item/mechfab
|
||||
build_type = MECHFAB
|
||||
category = "Misc"
|
||||
req_tech = list(TECH_MATERIAL = 1)
|
||||
|
||||
/datum/design/item/mechfab/robot
|
||||
category = "Robot"
|
||||
|
||||
//if the fabricator is a mech fab pass the manufacturer info over to the robot part constructor
|
||||
/datum/design/item/mechfab/robot/Fabricate(var/newloc, var/fabricator)
|
||||
if(istype(fabricator, /obj/machinery/mecha_part_fabricator))
|
||||
var/obj/machinery/mecha_part_fabricator/mechfab = fabricator
|
||||
return new build_path(newloc, mechfab.manufacturer)
|
||||
return ..()
|
||||
|
||||
/datum/design/item/mechfab/robot/exoskeleton
|
||||
name = "Robot exoskeleton"
|
||||
id = "robot_exoskeleton"
|
||||
build_path = /obj/item/robot_parts/robot_suit
|
||||
time = 50
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50000)
|
||||
|
||||
/datum/design/item/mechfab/robot/torso
|
||||
name = "Robot torso"
|
||||
id = "robot_torso"
|
||||
build_path = /obj/item/robot_parts/chest
|
||||
time = 35
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 40000)
|
||||
|
||||
/datum/design/item/mechfab/robot/head
|
||||
name = "Robot head"
|
||||
id = "robot_head"
|
||||
build_path = /obj/item/robot_parts/head
|
||||
time = 35
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000)
|
||||
|
||||
/datum/design/item/mechfab/robot/l_arm
|
||||
name = "Robot left arm"
|
||||
id = "robot_l_arm"
|
||||
build_path = /obj/item/robot_parts/l_arm
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 18000)
|
||||
|
||||
/datum/design/item/mechfab/robot/r_arm
|
||||
name = "Robot right arm"
|
||||
id = "robot_r_arm"
|
||||
build_path = /obj/item/robot_parts/r_arm
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 18000)
|
||||
|
||||
/datum/design/item/mechfab/robot/l_leg
|
||||
name = "Robot left leg"
|
||||
id = "robot_l_leg"
|
||||
build_path = /obj/item/robot_parts/l_leg
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 15000)
|
||||
|
||||
/datum/design/item/mechfab/robot/r_leg
|
||||
name = "Robot right leg"
|
||||
id = "robot_r_leg"
|
||||
build_path = /obj/item/robot_parts/r_leg
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 15000)
|
||||
|
||||
/datum/design/item/mechfab/robot/component
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000)
|
||||
|
||||
/datum/design/item/mechfab/robot/component/binary_communication_device
|
||||
name = "Binary communication device"
|
||||
id = "binary_communication_device"
|
||||
build_path = /obj/item/robot_parts/robot_component/binary_communication_device
|
||||
|
||||
/datum/design/item/mechfab/robot/component/radio
|
||||
name = "Radio"
|
||||
id = "radio"
|
||||
build_path = /obj/item/robot_parts/robot_component/radio
|
||||
|
||||
/datum/design/item/mechfab/robot/component/actuator
|
||||
name = "Actuator"
|
||||
id = "actuator"
|
||||
build_path = /obj/item/robot_parts/robot_component/actuator
|
||||
|
||||
/datum/design/item/mechfab/robot/component/diagnosis_unit
|
||||
name = "Diagnosis unit"
|
||||
id = "diagnosis_unit"
|
||||
build_path = /obj/item/robot_parts/robot_component/diagnosis_unit
|
||||
|
||||
/datum/design/item/mechfab/robot/component/camera
|
||||
name = "Camera"
|
||||
id = "camera"
|
||||
build_path = /obj/item/robot_parts/robot_component/camera
|
||||
|
||||
/datum/design/item/mechfab/robot/component/armour
|
||||
name = "Armour plating"
|
||||
id = "armour"
|
||||
build_path = /obj/item/robot_parts/robot_component/armour
|
||||
|
||||
/datum/design/item/mechfab/ripley
|
||||
category = "Ripley"
|
||||
|
||||
/datum/design/item/mechfab/ripley/chassis
|
||||
name = "Ripley chassis"
|
||||
id = "ripley_chassis"
|
||||
build_path = /obj/item/mecha_parts/chassis/ripley
|
||||
time = 10
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 20000)
|
||||
|
||||
/datum/design/item/mechfab/ripley/chassis/firefighter
|
||||
name = "Firefigher chassis"
|
||||
id = "firefighter_chassis"
|
||||
build_path = /obj/item/mecha_parts/chassis/firefighter
|
||||
|
||||
/datum/design/item/mechfab/ripley/torso
|
||||
name = "Ripley torso"
|
||||
id = "ripley_torso"
|
||||
build_path = /obj/item/mecha_parts/part/ripley_torso
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 40000, "glass" = 15000)
|
||||
|
||||
/datum/design/item/mechfab/ripley/left_arm
|
||||
name = "Ripley left arm"
|
||||
id = "ripley_left_arm"
|
||||
build_path = /obj/item/mecha_parts/part/ripley_left_arm
|
||||
time = 15
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000)
|
||||
|
||||
/datum/design/item/mechfab/ripley/right_arm
|
||||
name = "Ripley right arm"
|
||||
id = "ripley_right_arm"
|
||||
build_path = /obj/item/mecha_parts/part/ripley_right_arm
|
||||
time = 15
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000)
|
||||
|
||||
/datum/design/item/mechfab/ripley/left_leg
|
||||
name = "Ripley left leg"
|
||||
id = "ripley_left_leg"
|
||||
build_path = /obj/item/mecha_parts/part/ripley_left_leg
|
||||
time = 15
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000)
|
||||
|
||||
/datum/design/item/mechfab/ripley/right_leg
|
||||
name = "Ripley right leg"
|
||||
id = "ripley_right_leg"
|
||||
build_path = /obj/item/mecha_parts/part/ripley_right_leg
|
||||
time = 15
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000)
|
||||
|
||||
/datum/design/item/mechfab/odysseus
|
||||
category = "Odysseus"
|
||||
|
||||
/datum/design/item/mechfab/odysseus/chassis
|
||||
name = "Odysseus chassis"
|
||||
id = "odysseus_chassis"
|
||||
build_path = /obj/item/mecha_parts/chassis/odysseus
|
||||
time = 10
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 20000)
|
||||
|
||||
/datum/design/item/mechfab/odysseus/torso
|
||||
name = "Odysseus torso"
|
||||
id = "odysseus_torso"
|
||||
build_path = /obj/item/mecha_parts/part/odysseus_torso
|
||||
time = 18
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000)
|
||||
|
||||
/datum/design/item/mechfab/odysseus/head
|
||||
name = "Odysseus head"
|
||||
id = "odysseus_head"
|
||||
build_path = /obj/item/mecha_parts/part/odysseus_head
|
||||
time = 10
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 10000)
|
||||
|
||||
/datum/design/item/mechfab/odysseus/left_arm
|
||||
name = "Odysseus left arm"
|
||||
id = "odysseus_left_arm"
|
||||
build_path = /obj/item/mecha_parts/part/odysseus_left_arm
|
||||
time = 12
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000)
|
||||
|
||||
/datum/design/item/mechfab/odysseus/right_arm
|
||||
name = "Odysseus right arm"
|
||||
id = "odysseus_right_arm"
|
||||
build_path = /obj/item/mecha_parts/part/odysseus_right_arm
|
||||
time = 12
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000)
|
||||
|
||||
/datum/design/item/mechfab/odysseus/left_leg
|
||||
name = "Odysseus left leg"
|
||||
id = "odysseus_left_leg"
|
||||
build_path = /obj/item/mecha_parts/part/odysseus_left_leg
|
||||
time = 13
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 15000)
|
||||
|
||||
/datum/design/item/mechfab/odysseus/right_leg
|
||||
name = "Odysseus right leg"
|
||||
id = "odysseus_right_leg"
|
||||
build_path = /obj/item/mecha_parts/part/odysseus_right_leg
|
||||
time = 13
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 15000)
|
||||
|
||||
/datum/design/item/mechfab/gygax
|
||||
category = "Gygax"
|
||||
|
||||
/datum/design/item/mechfab/gygax/chassis
|
||||
name = "Gygax chassis"
|
||||
id = "gygax_chassis"
|
||||
build_path = /obj/item/mecha_parts/chassis/gygax
|
||||
time = 10
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000)
|
||||
|
||||
/datum/design/item/mechfab/gygax/torso
|
||||
name = "Gygax torso"
|
||||
id = "gygax_torso"
|
||||
build_path = /obj/item/mecha_parts/part/gygax_torso
|
||||
time = 30
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50000, "glass" = 20000)
|
||||
|
||||
/datum/design/item/mechfab/gygax/head
|
||||
name = "Gygax head"
|
||||
id = "gygax_head"
|
||||
build_path = /obj/item/mecha_parts/part/gygax_head
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 20000, "glass" = 10000)
|
||||
|
||||
/datum/design/item/mechfab/gygax/left_arm
|
||||
name = "Gygax left arm"
|
||||
id = "gygax_left_arm"
|
||||
build_path = /obj/item/mecha_parts/part/gygax_left_arm
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000)
|
||||
|
||||
/datum/design/item/mechfab/gygax/right_arm
|
||||
name = "Gygax right arm"
|
||||
id = "gygax_right_arm"
|
||||
build_path = /obj/item/mecha_parts/part/gygax_right_arm
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000)
|
||||
|
||||
/datum/design/item/mechfab/gygax/left_leg
|
||||
name = "Gygax left leg"
|
||||
id = "gygax_left_leg"
|
||||
build_path = /obj/item/mecha_parts/part/gygax_left_leg
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 35000)
|
||||
|
||||
/datum/design/item/mechfab/gygax/right_leg
|
||||
name = "Gygax right leg"
|
||||
id = "gygax_right_leg"
|
||||
build_path = /obj/item/mecha_parts/part/gygax_right_leg
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 35000)
|
||||
|
||||
/datum/design/item/mechfab/gygax/armour
|
||||
name = "Gygax armour plates"
|
||||
id = "gygax_armour"
|
||||
build_path = /obj/item/mecha_parts/part/gygax_armour
|
||||
time = 60
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50000, "diamond" = 10000)
|
||||
|
||||
/datum/design/item/mechfab/durand
|
||||
category = "Durand"
|
||||
|
||||
/datum/design/item/mechfab/durand/chassis
|
||||
name = "Durand chassis"
|
||||
id = "durand_chassis"
|
||||
build_path = /obj/item/mecha_parts/chassis/durand
|
||||
time = 10
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000)
|
||||
|
||||
/datum/design/item/mechfab/durand/torso
|
||||
name = "Durand torso"
|
||||
id = "durand_torso"
|
||||
build_path = /obj/item/mecha_parts/part/durand_torso
|
||||
time = 30
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 55000, "glass" = 20000, "silver" = 10000)
|
||||
|
||||
/datum/design/item/mechfab/durand/head
|
||||
name = "Durand head"
|
||||
id = "durand_head"
|
||||
build_path = /obj/item/mecha_parts/part/durand_head
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000, "glass" = 10000, "silver" = 3000)
|
||||
|
||||
/datum/design/item/mechfab/durand/left_arm
|
||||
name = "Durand left arm"
|
||||
id = "durand_left_arm"
|
||||
build_path = /obj/item/mecha_parts/part/durand_left_arm
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 35000, "silver" = 3000)
|
||||
|
||||
/datum/design/item/mechfab/durand/right_arm
|
||||
name = "Durand right arm"
|
||||
id = "durand_right_arm"
|
||||
build_path = /obj/item/mecha_parts/part/durand_right_arm
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 35000, "silver" = 3000)
|
||||
|
||||
/datum/design/item/mechfab/durand/left_leg
|
||||
name = "Durand left leg"
|
||||
id = "durand_left_leg"
|
||||
build_path = /obj/item/mecha_parts/part/durand_left_leg
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 40000, "silver" = 3000)
|
||||
|
||||
/datum/design/item/mechfab/durand/right_leg
|
||||
name = "Durand right leg"
|
||||
id = "durand_right_leg"
|
||||
build_path = /obj/item/mecha_parts/part/durand_right_leg
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 40000, "silver" = 3000)
|
||||
|
||||
/datum/design/item/mechfab/durand/armour
|
||||
name = "Durand armour plates"
|
||||
id = "durand_armour"
|
||||
build_path = /obj/item/mecha_parts/part/durand_armour
|
||||
time = 60
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50000, "uranium" = 10000)
|
||||
|
||||
/datum/design/item/robot_upgrade
|
||||
build_type = MECHFAB
|
||||
time = 12
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000)
|
||||
category = "Cyborg Upgrade Modules"
|
||||
|
||||
/datum/design/item/robot_upgrade/rename
|
||||
name = "Rename module"
|
||||
desc = "Used to rename a cyborg."
|
||||
id = "borg_rename_module"
|
||||
build_path = /obj/item/borg/upgrade/rename
|
||||
|
||||
/datum/design/item/robot_upgrade/reset
|
||||
name = "Reset module"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the robot."
|
||||
id = "borg_reset_module"
|
||||
build_path = /obj/item/borg/upgrade/reset
|
||||
|
||||
/datum/design/item/robot_upgrade/floodlight
|
||||
name = "Floodlight module"
|
||||
desc = "Used to boost cyborg's integrated light intensity."
|
||||
id = "borg_floodlight_module"
|
||||
build_path = /obj/item/borg/upgrade/floodlight
|
||||
|
||||
/datum/design/item/robot_upgrade/restart
|
||||
name = "Emergency restart module"
|
||||
desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online."
|
||||
id = "borg_restart_module"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 60000, "glass" = 5000)
|
||||
build_path = /obj/item/borg/upgrade/restart
|
||||
|
||||
/datum/design/item/robot_upgrade/vtec
|
||||
name = "VTEC module"
|
||||
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
|
||||
id = "borg_vtec_module"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 80000, "glass" = 6000, "gold" = 5000)
|
||||
build_path = /obj/item/borg/upgrade/vtec
|
||||
|
||||
/datum/design/item/robot_upgrade/tasercooler
|
||||
name = "Rapid taser cooling module"
|
||||
desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate."
|
||||
id = "borg_taser_module"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 80000, "glass" = 6000, "gold" = 2000, "diamond" = 500)
|
||||
build_path = /obj/item/borg/upgrade/tasercooler
|
||||
|
||||
/datum/design/item/robot_upgrade/jetpack
|
||||
name = "Jetpack module"
|
||||
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
|
||||
id = "borg_jetpack_module"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000, "phoron" = 15000, "uranium" = 20000)
|
||||
build_path = /obj/item/borg/upgrade/jetpack
|
||||
|
||||
/datum/design/item/robot_upgrade/rcd
|
||||
name = "RCD module"
|
||||
desc = "A rapid construction device module for use during construction operations."
|
||||
id = "borg_rcd_module"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000, "phoron" = 10000, "gold" = 1000, "silver" = 1000)
|
||||
build_path = /obj/item/borg/upgrade/rcd
|
||||
|
||||
/datum/design/item/robot_upgrade/syndicate
|
||||
name = "Illegal upgrade"
|
||||
desc = "Allows for the construction of lethal upgrades for cyborgs."
|
||||
id = "borg_syndicate_module"
|
||||
req_tech = list(TECH_COMBAT = 4, TECH_ILLEGAL = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000, "glass" = 15000, "diamond" = 10000)
|
||||
build_path = /obj/item/borg/upgrade/syndicate
|
||||
|
||||
/datum/design/item/mecha_tracking
|
||||
name = "Exosuit tracking beacon"
|
||||
build_type = MECHFAB
|
||||
time = 5
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 500)
|
||||
build_path = /obj/item/mecha_parts/mecha_tracking
|
||||
category = "Misc"
|
||||
|
||||
/datum/design/item/mecha
|
||||
build_type = MECHFAB
|
||||
category = "Exosuit Equipment"
|
||||
time = 10
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000)
|
||||
|
||||
/datum/design/item/mecha/AssembleDesignDesc()
|
||||
if(!desc)
|
||||
desc = "Allows for the construction of \a '[item_name]' exosuit module."
|
||||
|
||||
/datum/design/item/mecha/hydraulic_clamp
|
||||
name = "Hydraulic clamp"
|
||||
id = "hydraulic_clamp"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
|
||||
|
||||
/datum/design/item/mecha/drill
|
||||
name = "Drill"
|
||||
id = "drill"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill
|
||||
|
||||
/datum/design/item/mecha/extinguisher
|
||||
name = "Extinguisher"
|
||||
id = "extinguisher"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/extinguisher
|
||||
|
||||
/datum/design/item/mecha/cable_layer
|
||||
name = "Cable layer"
|
||||
id = "mech_cable_layer"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/cable_layer
|
||||
|
||||
/datum/design/item/mecha/sleeper
|
||||
name = "Sleeper"
|
||||
id = "mech_sleeper"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/sleeper
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 10000)
|
||||
|
||||
/datum/design/item/mecha/syringe_gun
|
||||
name = "Syringe gun"
|
||||
id = "mech_syringe_gun"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun
|
||||
time = 20
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 2000)
|
||||
|
||||
/*
|
||||
/datum/design/item/mecha/syringe_gun
|
||||
desc = "Exosuit-mounted syringe gun and chemical synthesizer."
|
||||
id = "mech_syringe_gun"
|
||||
req_tech = list(TECH_MATERIAL = 3, TECH_BIO = 4, TECH_MAGNET = 4, TECH_DATA = 3)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun
|
||||
*/
|
||||
|
||||
/datum/design/item/mecha/passenger
|
||||
name = "Passenger compartment"
|
||||
id = "mech_passenger"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/passenger
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 5000)
|
||||
|
||||
//obj/item/mecha_parts/mecha_equipment/repair_droid,
|
||||
//obj/item/mecha_parts/mecha_equipment/jetpack, //TODO MECHA JETPACK SPRITE MISSING
|
||||
|
||||
/datum/design/item/mecha/generator
|
||||
name = "Phoron generator"
|
||||
id = "mech_generator"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/generator
|
||||
|
||||
/datum/design/item/mecha/taser
|
||||
name = "PBT \"Pacifier\" mounted taser"
|
||||
id = "mech_taser"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
|
||||
|
||||
/datum/design/item/mecha/lmg
|
||||
name = "Ultra AC 2"
|
||||
id = "mech_lmg"
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||
|
||||
/datum/design/item/mecha/weapon
|
||||
req_tech = list(TECH_COMBAT = 3)
|
||||
|
||||
// *** Weapon modules
|
||||
/datum/design/item/mecha/weapon/scattershot
|
||||
name = "LBX AC 10 \"Scattershot\""
|
||||
id = "mech_scattershot"
|
||||
req_tech = list(TECH_COMBAT = 4)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
|
||||
|
||||
/datum/design/item/mecha/weapon/laser
|
||||
name = "CH-PS \"Immolator\" laser"
|
||||
id = "mech_laser"
|
||||
req_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 3)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
|
||||
/datum/design/item/mecha/weapon/laser_rigged
|
||||
name = "Jury-rigged welder-laser"
|
||||
desc = "Allows for the construction of a welder-laser assembly package for non-combat exosuits."
|
||||
id = "mech_laser_rigged"
|
||||
req_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 2)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser
|
||||
|
||||
/datum/design/item/mecha/weapon/laser_heavy
|
||||
name = "CH-LC \"Solaris\" laser cannon"
|
||||
id = "mech_laser_heavy"
|
||||
req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
|
||||
|
||||
/datum/design/item/mecha/weapon/ion
|
||||
name = "mkIV ion heavy cannon"
|
||||
id = "mech_ion"
|
||||
req_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 4)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
|
||||
|
||||
/datum/design/item/mecha/weapon/grenade_launcher
|
||||
name = "SGL-6 grenade launcher"
|
||||
id = "mech_grenade_launcher"
|
||||
req_tech = list(TECH_COMBAT = 3)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
|
||||
|
||||
/datum/design/item/mecha/weapon/clusterbang_launcher
|
||||
name = "SOP-6 grenade launcher"
|
||||
desc = "A weapon that violates the Geneva Convention at 6 rounds per minute."
|
||||
id = "clusterbang_launcher"
|
||||
req_tech = list(TECH_COMBAT= 5, TECH_MATERIAL = 5, TECH_ILLEGAL = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 20000, "gold" = 6000, "uranium" = 6000)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited
|
||||
|
||||
// *** Nonweapon modules
|
||||
/datum/design/item/mecha/wormhole_gen
|
||||
name = "Wormhole generator"
|
||||
desc = "An exosuit module that can generate small quasi-stable wormholes."
|
||||
id = "mech_wormhole_gen"
|
||||
req_tech = list(TECH_BLUESPACE = 3, TECH_MAGNET = 2)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/wormhole_generator
|
||||
|
||||
/datum/design/item/mecha/teleporter
|
||||
name = "Teleporter"
|
||||
desc = "An exosuit module that allows teleportation to any position in view."
|
||||
id = "mech_teleporter"
|
||||
req_tech = list(TECH_BLUESPACE = 10, TECH_MAGNET = 5)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/teleporter
|
||||
|
||||
/datum/design/item/mecha/rcd
|
||||
name = "RCD"
|
||||
desc = "An exosuit-mounted rapid construction device."
|
||||
id = "mech_rcd"
|
||||
time = 120
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000, "phoron" = 25000, "silver" = 20000, "gold" = 20000)
|
||||
req_tech = list(TECH_MATERIAL = 4, TECH_BLUESPACE = 3, TECH_MAGNET = 4, TECH_POWER = 4, TECH_ENGINEERING = 4)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/rcd
|
||||
|
||||
/datum/design/item/mecha/gravcatapult
|
||||
name = "Gravitational catapult"
|
||||
desc = "An exosuit-mounted gravitational catapult."
|
||||
id = "mech_gravcatapult"
|
||||
req_tech = list(TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_ENGINEERING = 3)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/gravcatapult
|
||||
|
||||
/datum/design/item/mecha/repair_droid
|
||||
name = "Repair droid"
|
||||
desc = "Automated repair droid, exosuits' best companion. BEEP BOOP"
|
||||
id = "mech_repair_droid"
|
||||
req_tech = list(TECH_MAGNET = 3, TECH_DATA = 3, TECH_ENGINEERING = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000, "gold" = 1000, "silver" = 2000, "glass" = 5000)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/repair_droid
|
||||
|
||||
/datum/design/item/mecha/phoron_generator
|
||||
desc = "Phoron reactor."
|
||||
id = "mech_phoron_generator"
|
||||
req_tech = list(TECH_PHORON = 2, TECH_POWER= 2, TECH_ENGINEERING = 2)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/generator
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000, "silver" = 500, "glass" = 1000)
|
||||
|
||||
/datum/design/item/mecha/energy_relay
|
||||
name = "Energy relay"
|
||||
id = "mech_energy_relay"
|
||||
req_tech = list(TECH_MAGNET = 4, TECH_POWER = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000, "gold" = 2000, "silver" = 3000, "glass" = 2000)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
|
||||
|
||||
/datum/design/item/mecha/ccw_armor
|
||||
name = "CCW armor booster"
|
||||
desc = "Exosuit close-combat armor booster."
|
||||
id = "mech_ccw_armor"
|
||||
req_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 20000, "silver" = 5000)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/armor_booster/anticcw_armor_booster
|
||||
|
||||
/datum/design/item/mecha/proj_armor
|
||||
desc = "Exosuit projectile armor booster."
|
||||
id = "mech_proj_armor"
|
||||
req_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 5, TECH_ENGINEERING = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 20000, "gold" = 5000)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/armor_booster/antiproj_armor_booster
|
||||
|
||||
/datum/design/item/mecha/diamond_drill
|
||||
name = "Diamond drill"
|
||||
desc = "A diamond version of the exosuit drill. It's harder, better, faster, stronger."
|
||||
id = "mech_diamond_drill"
|
||||
req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000, "diamond" = 6500)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
|
||||
/datum/design/item/mecha/generator_nuclear
|
||||
name = "Nuclear reactor"
|
||||
desc = "Exosuit-held nuclear reactor. Converts uranium and everyone's health to energy."
|
||||
id = "mech_generator_nuclear"
|
||||
req_tech = list(TECH_POWER= 3, TECH_ENGINEERING = 3, TECH_MATERIAL = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 10000, "silver" = 500, "glass" = 1000)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/generator/nuclear
|
||||
|
||||
/datum/design/item/synthetic_flash
|
||||
name = "Synthetic flash"
|
||||
id = "sflash"
|
||||
req_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 2)
|
||||
build_type = MECHFAB
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 750, "glass" = 750)
|
||||
build_path = /obj/item/device/flash/synthetic
|
||||
category = "Misc"
|
||||
@@ -108,6 +108,32 @@ var/global/list/obj/machinery/message_server/message_servers = list()
|
||||
|
||||
/obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1)
|
||||
rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth)
|
||||
var/authmsg = "[message]<br>"
|
||||
if (id_auth)
|
||||
authmsg += "[id_auth]<br>"
|
||||
if (stamp)
|
||||
authmsg += "[stamp]<br>"
|
||||
for (var/obj/machinery/requests_console/Console in allConsoles)
|
||||
if (ckey(Console.department) == ckey(recipient))
|
||||
if(Console.inoperable())
|
||||
Console.message_log += "<B>Message lost due to console failure.</B><BR>Please contact [station_name()] system adminsitrator or AI for technical assistance.<BR>"
|
||||
continue
|
||||
if(Console.newmessagepriority < priority)
|
||||
Console.newmessagepriority = priority
|
||||
Console.icon_state = "req_comp[priority]"
|
||||
switch(priority)
|
||||
if(2)
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
Console.audible_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [sender]'"),,5)
|
||||
Console.message_log += "<B><FONT color='red'>High Priority message from <A href='?src=\ref[Console];write=[sender]'>[sender]</A></FONT></B><BR>[authmsg]"
|
||||
else
|
||||
if(!Console.silent)
|
||||
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
Console.audible_message(text("\icon[Console] *The Requests Console beeps: 'Message from [sender]'"),,4)
|
||||
Console.message_log += "<B>Message from <A href='?src=\ref[Console];write=[sender]'>[sender]</A></B><BR>[authmsg]"
|
||||
Console.set_light(2)
|
||||
|
||||
|
||||
/obj/machinery/message_server/attack_hand(user as mob)
|
||||
// user << "\blue There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays."
|
||||
|
||||
+131
-102
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
Protolathe
|
||||
|
||||
Similar to an autolathe, you load glass and metal sheets (but not other objects) into it to be used as raw materials for the stuff
|
||||
it creates. All the menus and other manipulation commands are in the R&D console.
|
||||
|
||||
Note: Must be placed west/left of and R&D console to function.
|
||||
|
||||
*/
|
||||
/obj/machinery/r_n_d/protolathe
|
||||
name = "Protolathe"
|
||||
icon_state = "protolathe"
|
||||
@@ -16,16 +7,14 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
idle_power_usage = 30
|
||||
active_power_usage = 5000
|
||||
|
||||
var/max_material_storage = 100000 //All this could probably be done better with a list but meh.
|
||||
var/m_amount = 0.0
|
||||
var/g_amount = 0.0
|
||||
var/gold_amount = 0.0
|
||||
var/silver_amount = 0.0
|
||||
var/phoron_amount = 0.0
|
||||
var/uranium_amount = 0.0
|
||||
var/diamond_amount = 0.0
|
||||
var/max_material_storage = 100000
|
||||
var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
|
||||
|
||||
var/list/datum/design/queue = list()
|
||||
var/progress = 0
|
||||
|
||||
var/mat_efficiency = 1
|
||||
var/speed = 1
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/New()
|
||||
..()
|
||||
@@ -39,61 +28,76 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/process()
|
||||
..()
|
||||
if(stat)
|
||||
update_icon()
|
||||
return
|
||||
if(queue.len == 0)
|
||||
busy = 0
|
||||
update_icon()
|
||||
return
|
||||
var/datum/design/D = queue[1]
|
||||
if(canBuild(D))
|
||||
busy = 1
|
||||
progress += speed
|
||||
if(progress >= D.time)
|
||||
build(D)
|
||||
progress = 0
|
||||
removeFromQueue(1)
|
||||
if(linked_console)
|
||||
linked_console.updateUsrDialog()
|
||||
update_icon()
|
||||
else
|
||||
if(busy)
|
||||
visible_message("<span class='notice'>\icon [src] flashes: insufficient materials: [getLackingMaterials(D)].</span>")
|
||||
busy = 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/proc/TotalMaterials() //returns the total of all the stored materials. Makes code neater.
|
||||
return m_amount + g_amount + gold_amount + silver_amount + phoron_amount + uranium_amount + diamond_amount
|
||||
var/t = 0
|
||||
for(var/f in materials)
|
||||
t += materials[f]
|
||||
return t
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/RefreshParts()
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in component_parts)
|
||||
T += G.reagents.maximum_volume
|
||||
var/datum/reagents/R = new/datum/reagents(T) //Holder for the reagents used as materials.
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
T = 0
|
||||
create_reagents(T)
|
||||
max_material_storage = 0
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
T += M.rating
|
||||
max_material_storage = T * 75000
|
||||
max_material_storage += M.rating * 75000
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
T += M.rating
|
||||
mat_efficiency = 1 - (T - 2) / 8
|
||||
speed = T / 2
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/dismantle()
|
||||
for(var/obj/I in component_parts)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
reagents.trans_to_obj(I, reagents.total_volume)
|
||||
if(m_amount >= 3750)
|
||||
var/obj/item/stack/material/steel/G = new /obj/item/stack/material/steel(loc)
|
||||
G.amount = round(m_amount / G.perunit)
|
||||
if(g_amount >= 3750)
|
||||
var/obj/item/stack/material/glass/G = new /obj/item/stack/material/glass(loc)
|
||||
G.amount = round(g_amount / G.perunit)
|
||||
if(phoron_amount >= 2000)
|
||||
var/obj/item/stack/material/phoron/G = new /obj/item/stack/material/phoron(loc)
|
||||
G.amount = round(phoron_amount / G.perunit)
|
||||
if(silver_amount >= 2000)
|
||||
var/obj/item/stack/material/silver/G = new /obj/item/stack/material/silver(loc)
|
||||
G.amount = round(silver_amount / G.perunit)
|
||||
if(gold_amount >= 2000)
|
||||
var/obj/item/stack/material/gold/G = new /obj/item/stack/material/gold(loc)
|
||||
G.amount = round(gold_amount / G.perunit)
|
||||
if(uranium_amount >= 2000)
|
||||
var/obj/item/stack/material/uranium/G = new /obj/item/stack/material/uranium(loc)
|
||||
G.amount = round(uranium_amount / G.perunit)
|
||||
if(diamond_amount >= 2000)
|
||||
var/obj/item/stack/material/diamond/G = new /obj/item/stack/material/diamond(loc)
|
||||
G.amount = round(diamond_amount / G.perunit)
|
||||
for(var/f in materials)
|
||||
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
|
||||
var/path = getMaterialType(f)
|
||||
if(path)
|
||||
var/obj/item/stack/S = new f(loc)
|
||||
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
|
||||
..()
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "protolathe_t"
|
||||
else if(busy)
|
||||
icon_state = "protolathe_n"
|
||||
else
|
||||
icon_state = "protolathe"
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(shocked)
|
||||
shock(user, 50)
|
||||
if(busy)
|
||||
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
|
||||
return 1
|
||||
if(default_deconstruction_screwdriver(user, O))
|
||||
if(linked_console)
|
||||
linked_console.linked_lathe = null
|
||||
@@ -108,68 +112,93 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>You can't load \the [src] while it's opened.</span>"
|
||||
return 1
|
||||
if(disabled)
|
||||
return
|
||||
if(!linked_console)
|
||||
user << "<span class='notice'>\The [src] must be linked to an R&D console first!</span>"
|
||||
return 1
|
||||
if(busy)
|
||||
user << "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>"
|
||||
if(!istype(O, /obj/item/stack/material))
|
||||
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
|
||||
return 1
|
||||
if(stat)
|
||||
return 1
|
||||
if(istype(O,/obj/item/stack/material))
|
||||
var/obj/item/stack/material/S = O
|
||||
if(TotalMaterials() + S.perunit > max_material_storage)
|
||||
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
|
||||
return 1
|
||||
|
||||
var/obj/item/stack/material/stack = O
|
||||
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
|
||||
if(!O)
|
||||
return
|
||||
if(amount < 0)//No negative numbers
|
||||
amount = 0
|
||||
if(amount == 0)
|
||||
return
|
||||
if(amount > stack.get_amount())
|
||||
amount = stack.get_amount()
|
||||
if(max_material_storage - TotalMaterials() < (amount * stack.perunit))//Can't overfill
|
||||
amount = min(stack.amount, round((max_material_storage - TotalMaterials()) / stack.perunit))
|
||||
if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage)
|
||||
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
|
||||
return 1
|
||||
|
||||
overlays += "protolathe_[stack.name]"
|
||||
sleep(10)
|
||||
overlays -= "protolathe_[stack.name]"
|
||||
|
||||
icon_state = "protolathe"
|
||||
busy = 1
|
||||
use_power(max(1000, (3750 * amount / 10)))
|
||||
var/material/material = stack.get_material()
|
||||
if(istype(material) && do_after(user, 16) && stack.use(amount))
|
||||
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
|
||||
icon_state = "protolathe"
|
||||
|
||||
var/amount_to_add = amount * material.stack_per_sheet
|
||||
switch(material.name)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
m_amount += amount_to_add
|
||||
if("glass")
|
||||
g_amount += amount_to_add
|
||||
if("gold")
|
||||
gold_amount += amount_to_add
|
||||
if("silver")
|
||||
silver_amount += amount_to_add
|
||||
if("phoron")
|
||||
phoron_amount += amount_to_add
|
||||
if("uranium")
|
||||
uranium_amount += amount_to_add
|
||||
if("diamond")
|
||||
diamond_amount += amount_to_add
|
||||
busy = 0
|
||||
updateUsrDialog()
|
||||
var/obj/item/stack/material/stack = O
|
||||
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
|
||||
if(!O)
|
||||
return
|
||||
..()
|
||||
if(amount <= 0)//No negative numbers
|
||||
return
|
||||
if(amount > stack.get_amount())
|
||||
amount = stack.get_amount()
|
||||
if(max_material_storage - TotalMaterials() < (amount * SHEET_MATERIAL_AMOUNT)) //Can't overfill
|
||||
amount = min(stack.get_amount(), round((max_material_storage - TotalMaterials()) / SHEET_MATERIAL_AMOUNT))
|
||||
|
||||
//This is to stop these machines being hackable via clicking.
|
||||
/obj/machinery/r_n_d/protolathe/attack_hand(mob/user as mob)
|
||||
return
|
||||
var/stacktype = stack.type
|
||||
var/t = getMaterialName(stacktype)
|
||||
overlays += "protolathe_[t]"
|
||||
spawn(10)
|
||||
overlays -= "protolathe_[t]"
|
||||
|
||||
busy = 1
|
||||
use_power(max(1000, (SHEET_MATERIAL_AMOUNT * amount / 10)))
|
||||
if(t)
|
||||
if(do_after(user, 16))
|
||||
if(stack.use(amount))
|
||||
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
|
||||
materials[t] += amount * SHEET_MATERIAL_AMOUNT
|
||||
busy = 0
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/proc/addToQueue(var/datum/design/D)
|
||||
queue += D
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/proc/removeFromQueue(var/index)
|
||||
queue.Cut(index, index + 1)
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D)
|
||||
for(var/M in D.materials)
|
||||
if(materials[M] < D.materials[M])
|
||||
return 0
|
||||
for(var/C in D.chemicals)
|
||||
if(!reagents.has_reagent(C, D.chemicals[C]))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/proc/getLackingMaterials(var/datum/design/D)
|
||||
var/ret = ""
|
||||
for(var/M in D.materials)
|
||||
if(materials[M] < D.materials[M])
|
||||
if(ret != "")
|
||||
ret += ", "
|
||||
ret += "[D.materials[M] - materials[M]] [M]"
|
||||
for(var/C in D.chemicals)
|
||||
if(!reagents.has_reagent(C, D.chemicals[C]))
|
||||
if(ret != "")
|
||||
ret += ", "
|
||||
ret += C
|
||||
return ret
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/proc/build(var/datum/design/D)
|
||||
var/power = active_power_usage
|
||||
for(var/M in D.materials)
|
||||
power += round(D.materials[M] / 5)
|
||||
power = max(active_power_usage, power)
|
||||
use_power(power)
|
||||
for(var/M in D.materials)
|
||||
materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency)
|
||||
for(var/C in D.chemicals)
|
||||
reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency)
|
||||
|
||||
if(D.build_path)
|
||||
var/obj/new_item = D.Fabricate(src, src)
|
||||
new_item.loc = loc
|
||||
if(mat_efficiency != 1) // No matter out of nowhere
|
||||
if(new_item.matter && new_item.matter.len > 0)
|
||||
for(var/i in new_item.matter)
|
||||
new_item.matter[i] = new_item.matter[i] * mat_efficiency
|
||||
|
||||
@@ -3,7 +3,7 @@ Research and Development System. (Designed specifically for the /tg/station 13 (
|
||||
|
||||
///////////////Overview///////////////////
|
||||
This system is a "tech tree" research and development system designed for SS13. It allows a "researcher" job (this document assumes
|
||||
the "scientist" job is given this role) the tools necessiary to research new and better technologies. In general, the system works
|
||||
the "scientist" job is given this role) the tools necessary to research new and better technologies. In general, the system works
|
||||
by breaking existing technology and using what you learn from to advance your knowledge of SCIENCE! As your knowledge progresses,
|
||||
you can build newer (and better?) devices (which you can also, eventually, deconstruct to advance your knowledge).
|
||||
|
||||
@@ -29,211 +29,4 @@ Each tech path should have at LEAST one item at every level (levels 1 - 20). Thi
|
||||
researching. Existing tech (ie, anything you can find on the station or get from the quartermaster) shouldn't go higher then
|
||||
level 5 or 7. Everything past that should be stuff you research.
|
||||
|
||||
Below is a checklist to make sure every tree is filled. As new items get added to R&D, add them here if there is an empty slot.
|
||||
When thinking about new stuff, check here to see if there are any slots unfilled.
|
||||
|
||||
//MATERIALS
|
||||
1 | Metal
|
||||
2 | Solid Phoron
|
||||
3 | Silver
|
||||
4 | Gold, Super Capacitor
|
||||
5 | Uranium, Nuclear Gun, SUPERPACMAN
|
||||
6 | Diamond, MRSPACMAN
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
//PHORON TECH
|
||||
1 |
|
||||
2 | Solid Phoron
|
||||
3 | Pacman Generator
|
||||
4 |
|
||||
5 |
|
||||
6 |
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
//POWER TECH
|
||||
1 | Basic Capacitor, Basic Cell
|
||||
2 | High-Capacity Cell (10,000)
|
||||
3 | Super-Capacity Cell (20,000), Powersink, PACMAN
|
||||
4 | SUPERPACMAN
|
||||
5 | MRSPACMAN, Super Capacitor
|
||||
6 | Hyper-Capacity Cell (30,000)
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
//BLUE SPACE
|
||||
1 |
|
||||
2 | Teleporter Console Board
|
||||
3 | Teleport Gun, Hand Tele
|
||||
4 | Teleportation Scroll
|
||||
5 |
|
||||
6 |
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
//BIOTECH
|
||||
1 | Bruise Pack, Scalpel
|
||||
2 | PANDEMIC Board, Mass Spectrometer
|
||||
3 | AI Core, Brains (MMI)
|
||||
4 | MMI+Radio
|
||||
5 |
|
||||
6 |
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
//MAGNETS
|
||||
1 | Basic Sensor
|
||||
2 | Comm Console Board
|
||||
3 | Adv Sensor
|
||||
4 | Adv Mass Spectrometer, Chameleon Projector
|
||||
5 | Phasic Sensor
|
||||
6 |
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
//PROGRAMMING
|
||||
1 | Arcade Board
|
||||
2 | Sec Camera
|
||||
3 | Cloning Machine Console Board
|
||||
4 | AI Core, Intellicard
|
||||
5 | Pico-Manipulator, Ultra-Micro-Laser
|
||||
6 |
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
//SYNDICATE
|
||||
1 | Sleepypen
|
||||
2 | TYRANT Module, Emag
|
||||
3 | Cloaking Device, Power Sink
|
||||
4 |
|
||||
5 |
|
||||
6 |
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
//COMBAT
|
||||
1 | Flashbang, Mousetrap, Nettle
|
||||
2 | Stun Baton
|
||||
3 | Power Axe, Death Nettle, Nuclear Gun
|
||||
4 |
|
||||
5 |
|
||||
6 |
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
10 |
|
||||
11 |
|
||||
12 |
|
||||
13 |
|
||||
14 |
|
||||
15 |
|
||||
16 |
|
||||
17 |
|
||||
18 |
|
||||
19 |
|
||||
20 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
+164
-304
@@ -29,7 +29,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
/obj/machinery/computer/rdconsole
|
||||
name = "R&D control console"
|
||||
icon_state = "rdcomp"
|
||||
icon_keyboard = "rd_key"
|
||||
icon_screen = "rdcomp"
|
||||
light_color = "#a97faa"
|
||||
circuit = /obj/item/weapon/circuitboard/rdconsole
|
||||
var/datum/research/files //Stores all the collected research data.
|
||||
@@ -43,7 +44,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
var/screen = 1.0 //Which screen is currently showing.
|
||||
var/id = 0 //ID of the computer (for server restrictions).
|
||||
var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console
|
||||
var/errored = 0 //Errored during item construction.
|
||||
|
||||
req_access = list(access_research) //Data and setting manipulation requires scientist access.
|
||||
|
||||
@@ -58,43 +58,43 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
qdel(check_tech)
|
||||
check_tech = null
|
||||
break
|
||||
|
||||
return return_name
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/CallMaterialName(var/ID)
|
||||
var/return_name = ID
|
||||
switch(return_name)
|
||||
if("metal")
|
||||
return_name = "Metal"
|
||||
if("glass")
|
||||
return_name = "Glass"
|
||||
if("gold")
|
||||
return_name = "Gold"
|
||||
if("silver")
|
||||
return_name = "Silver"
|
||||
if("phoron")
|
||||
return_name = "Solid Phoron"
|
||||
if("uranium")
|
||||
return_name = "Uranium"
|
||||
if("diamond")
|
||||
return_name = "Diamond"
|
||||
return return_name
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/CallReagentName(var/ID)
|
||||
var/return_name = ID
|
||||
var/datum/reagent/temp_reagent
|
||||
var/return_name = null
|
||||
if (copytext(ID, 1, 2) == "$")
|
||||
return_name = copytext(ID, 2)
|
||||
switch(return_name)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
return_name = "Steel"
|
||||
if("glass")
|
||||
return_name = "Glass"
|
||||
if("gold")
|
||||
return_name = "Gold"
|
||||
if("silver")
|
||||
return_name = "Silver"
|
||||
if("phoron")
|
||||
return_name = "Solid Phoron"
|
||||
if("uranium")
|
||||
return_name = "Uranium"
|
||||
if("diamond")
|
||||
return_name = "Diamond"
|
||||
else
|
||||
for(var/R in typesof(/datum/reagent) - /datum/reagent)
|
||||
for(var/R in (typesof(/datum/reagent) - /datum/reagent))
|
||||
temp_reagent = null
|
||||
temp_reagent = new R()
|
||||
if(temp_reagent.id == ID)
|
||||
return_name = temp_reagent.name
|
||||
qdel(temp_reagent)
|
||||
temp_reagent = null
|
||||
temp_reagent = new R()
|
||||
if(temp_reagent.id == ID)
|
||||
return_name = temp_reagent.name
|
||||
qdel(temp_reagent)
|
||||
temp_reagent = null
|
||||
break
|
||||
break
|
||||
return return_name
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
|
||||
for(var/obj/machinery/r_n_d/D in oview(3,src))
|
||||
if(D.linked_console != null || D.disabled || D.panel_open)
|
||||
for(var/obj/machinery/r_n_d/D in range(3, src))
|
||||
if(D.linked_console != null || D.panel_open)
|
||||
continue
|
||||
if(istype(D, /obj/machinery/r_n_d/destructive_analyzer))
|
||||
if(linked_destroy == null)
|
||||
@@ -110,8 +110,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
D.linked_console = src
|
||||
return
|
||||
|
||||
//Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work --NEO
|
||||
/obj/machinery/computer/rdconsole/proc/griefProtection()
|
||||
/obj/machinery/computer/rdconsole/proc/griefProtection() //Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in machines)
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
C.files.AddTech2Known(T)
|
||||
@@ -130,11 +129,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
/obj/machinery/computer/rdconsole/initialize()
|
||||
SyncRDevices()
|
||||
|
||||
/* Instead of calling this every tick, it is only being called when needed
|
||||
/obj/machinery/computer/rdconsole/process()
|
||||
griefProtection()
|
||||
*/
|
||||
|
||||
/obj/machinery/computer/rdconsole/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
|
||||
//Loading a disk into it.
|
||||
if(istype(D, /obj/item/weapon/disk))
|
||||
@@ -142,18 +136,16 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
user << "A disk is already loaded into the machine."
|
||||
return
|
||||
|
||||
if(istype(D, /obj/item/weapon/disk/tech_disk)) t_disk = D
|
||||
else if (istype(D, /obj/item/weapon/disk/design_disk)) d_disk = D
|
||||
if(istype(D, /obj/item/weapon/disk/tech_disk))
|
||||
t_disk = D
|
||||
else if (istype(D, /obj/item/weapon/disk/design_disk))
|
||||
d_disk = D
|
||||
else
|
||||
user << "\red Machine cannot accept disks in that format."
|
||||
user << "<span class='notice'>Machine cannot accept disks in that format.</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
D.loc = src
|
||||
user << "\blue You add the disk to the machine!"
|
||||
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
user << "\blue You you disable the security protocols"
|
||||
user << "<span class='notice'>You add \the [D] to the machine.</span>"
|
||||
else
|
||||
//The construction/deconstruction of the console code.
|
||||
..()
|
||||
@@ -161,6 +153,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/rdconsole/emp_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
user << "<span class='notice'>You you disable the security protocols.</span>"
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/rdconsole/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
@@ -170,17 +169,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
usr.set_machine(src)
|
||||
if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code.
|
||||
var/temp_screen = text2num(href_list["menu"])
|
||||
if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || src.allowed(usr) || emagged) //Unless you are making something, you need access.
|
||||
if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || allowed(usr) || emagged) //Unless you are making something, you need access.
|
||||
screen = temp_screen
|
||||
else
|
||||
usr << "Unauthorized Access."
|
||||
|
||||
else if(href_list["reset"])
|
||||
warning("RnD console has errored during protolathe operation. Resetting.")
|
||||
errored = 0
|
||||
screen = 1.0
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["updt_tech"]) //Update the research holder with information from the technology disk.
|
||||
screen = 0.0
|
||||
spawn(50)
|
||||
@@ -193,7 +186,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
t_disk.stored = null
|
||||
|
||||
else if(href_list["eject_tech"]) //Eject the technology disk.
|
||||
t_disk:loc = src.loc
|
||||
t_disk.loc = loc
|
||||
t_disk = null
|
||||
screen = 1.0
|
||||
|
||||
@@ -216,7 +209,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
d_disk.blueprint = null
|
||||
|
||||
else if(href_list["eject_design"]) //Eject the design disk.
|
||||
d_disk:loc = src.loc
|
||||
d_disk.loc = loc
|
||||
d_disk = null
|
||||
screen = 1.0
|
||||
|
||||
@@ -230,7 +223,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
else if(href_list["eject_item"]) //Eject the item inside the destructive analyzer.
|
||||
if(linked_destroy)
|
||||
if(linked_destroy.busy)
|
||||
usr << "\red The destructive analyzer is busy at the moment."
|
||||
usr << "<span class='notice'>The destructive analyzer is busy at the moment.</span>"
|
||||
|
||||
else if(linked_destroy.loaded_item)
|
||||
linked_destroy.loaded_item.loc = linked_destroy.loc
|
||||
@@ -241,9 +234,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
else if(href_list["deconstruct"]) //Deconstruct the item in the destructive analyzer and update the research holder.
|
||||
if(linked_destroy)
|
||||
if(linked_destroy.busy)
|
||||
usr << "\red The destructive analyzer is busy at the moment."
|
||||
usr << "<span class='notice'>The destructive analyzer is busy at the moment.</span>"
|
||||
else
|
||||
if(alert("Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "Yes", "No") == "No" || !linked_destroy) return
|
||||
if(alert("Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", "Yes", "No") == "No" || !linked_destroy)
|
||||
return
|
||||
linked_destroy.busy = 1
|
||||
screen = 0.1
|
||||
updateUsrDialog()
|
||||
@@ -251,21 +245,19 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
spawn(24)
|
||||
if(linked_destroy)
|
||||
linked_destroy.busy = 0
|
||||
if(!linked_destroy.hacked)
|
||||
if(!linked_destroy.loaded_item)
|
||||
usr <<"\red The destructive analyzer appears to be empty."
|
||||
screen = 1.0
|
||||
return
|
||||
if(linked_destroy.loaded_item.reliability >= linked_destroy.min_reliability)
|
||||
var/list/temp_tech = ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
|
||||
for(var/T in temp_tech)
|
||||
files.UpdateTech(T, temp_tech[T])
|
||||
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
|
||||
files.UpdateDesign(linked_destroy.loaded_item.type)
|
||||
if(linked_lathe && linked_destroy.loaded_item.matter) //Also sends salvaged materials to a linked protolathe, if any.
|
||||
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter[DEFAULT_WALL_MATERIAL]*linked_destroy.decon_mod))
|
||||
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod))
|
||||
linked_destroy.loaded_item = null
|
||||
if(!linked_destroy.loaded_item)
|
||||
usr <<"<span class='notice'>The destructive analyzer appears to be empty.</span>"
|
||||
screen = 1.0
|
||||
return
|
||||
|
||||
for(var/T in linked_destroy.loaded_item.origin_tech)
|
||||
files.UpdateTech(T, linked_destroy.loaded_item.origin_tech[T])
|
||||
if(linked_lathe && linked_destroy.loaded_item.matter) // Also sends salvaged materials to a linked protolathe, if any.
|
||||
for(var/t in linked_destroy.loaded_item.matter)
|
||||
if(t in linked_lathe.materials)
|
||||
linked_lathe.materials[t] += min(linked_lathe.max_material_storage - linked_lathe.TotalMaterials(), linked_destroy.loaded_item.matter[t] * linked_destroy.decon_mod)
|
||||
|
||||
linked_destroy.loaded_item = null
|
||||
for(var/obj/I in linked_destroy.contents)
|
||||
for(var/mob/M in I.contents)
|
||||
M.death()
|
||||
@@ -281,12 +273,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(!(I in linked_destroy.component_parts))
|
||||
qdel(I)
|
||||
linked_destroy.icon_state = "d_analyzer"
|
||||
|
||||
use_power(linked_destroy.active_power_usage)
|
||||
screen = 1.0
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["lock"]) //Lock the console from use by anyone without tox access.
|
||||
if(src.allowed(usr))
|
||||
if(allowed(usr))
|
||||
screen = text2num(href_list["lock"])
|
||||
else
|
||||
usr << "Unauthorized Access."
|
||||
@@ -294,15 +287,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
else if(href_list["sync"]) //Sync the research holder with all the R&D consoles in the game that aren't sync protected.
|
||||
screen = 0.0
|
||||
if(!sync)
|
||||
usr << "\red You must connect to the network first!"
|
||||
usr << "<span class='notice'>You must connect to the network first.</span>"
|
||||
else
|
||||
griefProtection() //Putting this here because I dont trust the sync process
|
||||
spawn(30)
|
||||
if(src)
|
||||
for(var/obj/machinery/r_n_d/server/S in machines)
|
||||
var/server_processed = 0
|
||||
if(S.disabled)
|
||||
continue
|
||||
if((id in S.id_with_upload) || istype(S, /obj/machinery/r_n_d/server/centcom))
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
S.files.AddTech2Known(T)
|
||||
@@ -310,7 +301,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
S.files.AddDesign2Known(D)
|
||||
S.files.RefreshResearch()
|
||||
server_processed = 1
|
||||
if(((id in S.id_with_download) && !istype(S, /obj/machinery/r_n_d/server/centcom)) || S.hacked)
|
||||
if((id in S.id_with_download) && !istype(S, /obj/machinery/r_n_d/server/centcom))
|
||||
for(var/datum/tech/T in S.files.known_tech)
|
||||
files.AddTech2Known(T)
|
||||
for(var/datum/design/D in S.files.known_designs)
|
||||
@@ -333,57 +324,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
being_built = D
|
||||
break
|
||||
if(being_built)
|
||||
var/power = linked_lathe.active_power_usage
|
||||
for(var/M in being_built.materials)
|
||||
power += round(being_built.materials[M] / 5)
|
||||
power = max(linked_lathe.active_power_usage, power)
|
||||
screen = 0.3
|
||||
linked_lathe.busy = 1
|
||||
flick("protolathe_n",linked_lathe)
|
||||
var/key = usr.key //so we don't lose the info during the spawn delay
|
||||
spawn(16)
|
||||
use_power(power)
|
||||
spawn(16)
|
||||
errored = 1
|
||||
for(var/M in being_built.materials)
|
||||
switch(M)
|
||||
if("$metal")
|
||||
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
|
||||
if("$glass")
|
||||
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
|
||||
if("$gold")
|
||||
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
|
||||
if("$silver")
|
||||
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
|
||||
if("$phoron")
|
||||
linked_lathe.phoron_amount = max(0, (linked_lathe.phoron_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
|
||||
if("$uranium")
|
||||
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
|
||||
if("$diamond")
|
||||
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]*linked_lathe.mat_efficiency))
|
||||
else
|
||||
linked_lathe.reagents.remove_reagent(M, being_built.materials[M]*linked_lathe.mat_efficiency)
|
||||
linked_lathe.addToQueue(being_built)
|
||||
|
||||
if(being_built.build_path)
|
||||
var/obj/new_item = new being_built.build_path(src)
|
||||
if( new_item.type == /obj/item/weapon/storage/backpack/holding )
|
||||
new_item.investigate_log("built by [key]","singulo")
|
||||
new_item.reliability = being_built.reliability
|
||||
if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0)
|
||||
/*if(being_built.locked)
|
||||
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(linked_lathe.loc)
|
||||
new_item.loc = L
|
||||
L.name += " ([new_item.name])"*/
|
||||
else
|
||||
new_item.loc = linked_lathe.loc
|
||||
if(linked_lathe.mat_efficiency != 1) // No matter out of nowhere
|
||||
if(new_item.matter && new_item.matter.len > 0)
|
||||
for(var/i in new_item.matter)
|
||||
new_item.matter[i] = new_item.matter[i] * linked_lathe.mat_efficiency
|
||||
linked_lathe.busy = 0
|
||||
screen = 3.1
|
||||
errored = 0
|
||||
updateUsrDialog()
|
||||
screen = 3.1
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something.
|
||||
if(linked_imprinter)
|
||||
@@ -393,36 +337,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
being_built = D
|
||||
break
|
||||
if(being_built)
|
||||
var/power = linked_imprinter.active_power_usage
|
||||
for(var/M in being_built.materials)
|
||||
power += round(being_built.materials[M] / 5)
|
||||
power = max(linked_imprinter.active_power_usage, power)
|
||||
screen = 0.4
|
||||
linked_imprinter.busy = 1
|
||||
flick("circuit_imprinter_ani",linked_imprinter)
|
||||
spawn(16)
|
||||
errored = 1
|
||||
use_power(power)
|
||||
for(var/M in being_built.materials)
|
||||
switch(M)
|
||||
if("$glass")
|
||||
linked_imprinter.g_amount = max(0, (linked_imprinter.g_amount-being_built.materials[M]*linked_imprinter.mat_efficiency))
|
||||
if("$gold")
|
||||
linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]*linked_imprinter.mat_efficiency))
|
||||
if("$diamond")
|
||||
linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]*linked_imprinter.mat_efficiency))
|
||||
if("$uranium")
|
||||
linked_imprinter.uranium_amount = max(0, (linked_imprinter.uranium_amount-being_built.materials[M]*linked_imprinter.mat_efficiency))
|
||||
else
|
||||
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M]*linked_imprinter.mat_efficiency)
|
||||
var/obj/new_item = new being_built.build_path(src)
|
||||
new_item.reliability = being_built.reliability
|
||||
if(linked_imprinter.hacked) being_built.reliability = max((reliability / 2), 0)
|
||||
new_item.loc = linked_imprinter.loc
|
||||
linked_imprinter.busy = 0
|
||||
screen = 4.1
|
||||
errored = 0
|
||||
updateUsrDialog()
|
||||
linked_imprinter.addToQueue(being_built)
|
||||
screen = 4.1
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["disposeI"] && linked_imprinter) //Causes the circuit imprinter to dispose of a single reagent (all of it)
|
||||
linked_imprinter.reagents.del_reagent(href_list["dispose"])
|
||||
@@ -430,70 +347,45 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
else if(href_list["disposeallI"] && linked_imprinter) //Causes the circuit imprinter to dispose of all it's reagents.
|
||||
linked_imprinter.reagents.clear_reagents()
|
||||
|
||||
else if(href_list["removeI"] && linked_lathe)
|
||||
linked_imprinter.removeFromQueue(text2num(href_list["removeI"]))
|
||||
|
||||
else if(href_list["disposeP"] && linked_lathe) //Causes the protolathe to dispose of a single reagent (all of it)
|
||||
linked_lathe.reagents.del_reagent(href_list["dispose"])
|
||||
|
||||
else if(href_list["disposeallP"] && linked_lathe) //Causes the protolathe to dispose of all it's reagents.
|
||||
linked_lathe.reagents.clear_reagents()
|
||||
|
||||
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
|
||||
var/desired_num_sheets = text2num(href_list["amount"])
|
||||
var/res_amount, type
|
||||
var/material/M = get_material_by_name(href_list["lathe_ejectsheet"])
|
||||
if(istype(M))
|
||||
type = M.stack_type
|
||||
switch(M.name)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
res_amount = "m_amount"
|
||||
if("glass")
|
||||
res_amount = "g_amount"
|
||||
if("gold")
|
||||
res_amount = "gold_amount"
|
||||
if("silver")
|
||||
res_amount = "silver_amount"
|
||||
if("phoron")
|
||||
res_amount = "phoron_amount"
|
||||
if("uranium")
|
||||
res_amount = "uranium_amount"
|
||||
if("diamond")
|
||||
res_amount = "diamond_amount"
|
||||
else if(href_list["removeP"] && linked_lathe)
|
||||
linked_lathe.removeFromQueue(text2num(href_list["removeP"]))
|
||||
|
||||
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
|
||||
var/num_sheets = min(text2num(href_list["amount"]), round(linked_lathe.materials[href_list["lathe_ejectsheet"]] / SHEET_MATERIAL_AMOUNT))
|
||||
|
||||
if(num_sheets < 1)
|
||||
return
|
||||
|
||||
var/mattype = linked_lathe.getMaterialType(href_list["lathe_ejectsheet"])
|
||||
|
||||
var/obj/item/stack/material/M = new mattype(linked_lathe.loc)
|
||||
M.amount = num_sheets
|
||||
linked_lathe.materials[href_list["lathe_ejectsheet"]] -= num_sheets * SHEET_MATERIAL_AMOUNT
|
||||
|
||||
if(ispath(type) && hasvar(linked_lathe, res_amount))
|
||||
var/obj/item/stack/material/sheet = new type(linked_lathe.loc)
|
||||
var/available_num_sheets = round(linked_lathe.vars[res_amount]/sheet.perunit)
|
||||
if(available_num_sheets>0)
|
||||
sheet.amount = min(available_num_sheets, desired_num_sheets)
|
||||
linked_lathe.vars[res_amount] = max(0, (linked_lathe.vars[res_amount]-sheet.amount * sheet.perunit))
|
||||
else
|
||||
qdel(sheet)
|
||||
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material
|
||||
var/desired_num_sheets = text2num(href_list["amount"])
|
||||
var/res_amount, type
|
||||
switch(href_list["imprinter_ejectsheet"])
|
||||
if("glass")
|
||||
type = /obj/item/stack/material/glass
|
||||
res_amount = "g_amount"
|
||||
if("gold")
|
||||
type = /obj/item/stack/material/gold
|
||||
res_amount = "gold_amount"
|
||||
if("diamond")
|
||||
type = /obj/item/stack/material/diamond
|
||||
res_amount = "diamond_amount"
|
||||
if("uranium")
|
||||
type = /obj/item/stack/material/uranium
|
||||
res_amount = "uranium_amount"
|
||||
if(ispath(type) && hasvar(linked_imprinter, res_amount))
|
||||
var/obj/item/stack/material/sheet = new type(linked_imprinter.loc)
|
||||
var/available_num_sheets = round(linked_imprinter.vars[res_amount]/sheet.perunit)
|
||||
if(available_num_sheets>0)
|
||||
sheet.amount = min(available_num_sheets, desired_num_sheets)
|
||||
linked_imprinter.vars[res_amount] = max(0, (linked_imprinter.vars[res_amount]-sheet.amount * sheet.perunit))
|
||||
else
|
||||
qdel(sheet)
|
||||
var/num_sheets = min(text2num(href_list["amount"]), round(linked_imprinter.materials[href_list["imprinter_ejectsheet"]] / SHEET_MATERIAL_AMOUNT))
|
||||
|
||||
if(num_sheets < 1)
|
||||
return
|
||||
|
||||
var/mattype = linked_imprinter.getMaterialType(href_list["imprinter_ejectsheet"])
|
||||
|
||||
var/obj/item/stack/material/M = new mattype(linked_imprinter.loc)
|
||||
M.amount = num_sheets
|
||||
linked_imprinter.materials[href_list["imprinter_ejectsheet"]] -= num_sheets * SHEET_MATERIAL_AMOUNT
|
||||
|
||||
else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with.
|
||||
screen = 0.0
|
||||
spawn(20)
|
||||
spawn(10)
|
||||
SyncRDevices()
|
||||
screen = 1.7
|
||||
updateUsrDialog()
|
||||
@@ -547,6 +439,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
var/dat
|
||||
dat += "<UL>"
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
if(T.level < 1)
|
||||
continue
|
||||
dat += "<LI>"
|
||||
dat += "[T.name]"
|
||||
dat += "<UL>"
|
||||
@@ -586,17 +480,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(linked_imprinter == null)
|
||||
screen = 4.0
|
||||
|
||||
if(errored)
|
||||
dat += "An error has occured when constructing prototype. Try refreshing the console."
|
||||
dat += "<br>If problem persists submit bug report stating which item you tried to build."
|
||||
dat += "<br><A href='?src=\ref[src];reset=1'>RESET CONSOLE</A><br><br>"
|
||||
|
||||
switch(screen)
|
||||
|
||||
//////////////////////R&D CONSOLE SCREENS//////////////////
|
||||
if(0.0) dat += "Updating Database...."
|
||||
if(0.0)
|
||||
dat += "Updating Database..."
|
||||
|
||||
if(0.1) dat += "Processing and Updating Database..."
|
||||
if(0.1)
|
||||
dat += "Processing and Updating Database..."
|
||||
|
||||
if(0.2)
|
||||
dat += "SYSTEM LOCKED<BR><BR>"
|
||||
@@ -675,11 +566,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<A href='?src=\ref[src];menu=1.5'>Load Design to Disk</A> || "
|
||||
else
|
||||
dat += "Name: [d_disk.blueprint.name]<BR>"
|
||||
dat += "Level: [between(0, (d_disk.blueprint.reliability + rand(-15,15)), 100)]<BR>"
|
||||
switch(d_disk.blueprint.build_type)
|
||||
if(IMPRINTER) dat += "Lathe Type: Circuit Imprinter<BR>"
|
||||
if(PROTOLATHE) dat += "Lathe Type: Proto-lathe<BR>"
|
||||
if(AUTOLATHE) dat += "Lathe Type: Auto-lathe<BR>"
|
||||
dat += "Required Materials:<BR>"
|
||||
for(var/M in d_disk.blueprint.materials)
|
||||
if(copytext(M, 1, 2) == "$") dat += "* [copytext(M, 2)] x [d_disk.blueprint.materials[M]]<BR>"
|
||||
@@ -750,9 +639,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "Name: [linked_destroy.loaded_item.name]<BR>"
|
||||
dat += "Origin Tech:"
|
||||
dat += "<UL>"
|
||||
var/list/temp_tech = ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
|
||||
for(var/T in temp_tech)
|
||||
dat += "<LI>[CallTechName(T)] [temp_tech[T]]"
|
||||
for(var/T in linked_destroy.loaded_item.origin_tech)
|
||||
dat += "<LI>[CallTechName(T)] [linked_destroy.loaded_item.origin_tech[T]]"
|
||||
for(var/datum/tech/F in files.known_tech)
|
||||
if(F.name == CallTechName(T))
|
||||
dat += " (Current: [F.level])"
|
||||
@@ -768,6 +656,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
if(3.1)
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=3.4'>View Queue</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=3.2'>Material Storage</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=3.3'>Chemical Storage</A><HR>"
|
||||
dat += "Protolathe Menu:<BR><BR>"
|
||||
@@ -778,35 +667,16 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(!D.build_path || !(D.build_type & PROTOLATHE))
|
||||
continue
|
||||
var/temp_dat
|
||||
var/check_materials = 1
|
||||
for(var/M in D.materials)
|
||||
temp_dat += ", [D.materials[M]*linked_lathe.mat_efficiency] [CallMaterialName(M)]"
|
||||
if(copytext(M, 1, 2) == "$")
|
||||
switch(M)
|
||||
if("$glass")
|
||||
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.g_amount) check_materials = 0
|
||||
if("$metal")
|
||||
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.m_amount) check_materials = 0
|
||||
if("$gold")
|
||||
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.gold_amount) check_materials = 0
|
||||
if("$silver")
|
||||
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.silver_amount) check_materials = 0
|
||||
if("$phoron")
|
||||
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.phoron_amount) check_materials = 0
|
||||
if("$uranium")
|
||||
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.uranium_amount) check_materials = 0
|
||||
if("$diamond")
|
||||
if(D.materials[M]*linked_lathe.mat_efficiency > linked_lathe.diamond_amount) check_materials = 0
|
||||
else if (!linked_lathe.reagents.has_reagent(M, D.materials[M]*linked_lathe.mat_efficiency))
|
||||
check_materials = 0
|
||||
temp_dat += ", [D.materials[M]] [CallMaterialName(M)]"
|
||||
for(var/T in D.chemicals)
|
||||
temp_dat += ", [D.chemicals[T]*linked_imprinter.mat_efficiency] [CallReagentName(T)]"
|
||||
if(temp_dat)
|
||||
temp_dat = " \[[copytext(temp_dat,3)]\]"
|
||||
if(check_materials)
|
||||
temp_dat = " \[[copytext(temp_dat, 3)]\]"
|
||||
if(linked_lathe.canBuild(D))
|
||||
dat += "<LI><B><A href='?src=\ref[src];build=[D.id]'>[D.name]</A></B>[temp_dat]"
|
||||
else
|
||||
dat += "<LI><B>[D.name]</B>[temp_dat]"
|
||||
if(D.reliability < 100)
|
||||
dat += " (Reliability: [D.reliability])"
|
||||
dat += "</UL>"
|
||||
|
||||
if(3.2) //Protolathe Material Storage Sub-menu
|
||||
@@ -814,33 +684,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
|
||||
dat += "Material Storage<BR><HR>"
|
||||
dat += "<UL>"
|
||||
for(var/M in list(DEFAULT_WALL_MATERIAL, "glass", "gold", "silver", "phoron", "uranium", "diamond"))
|
||||
var/amount
|
||||
var/sheetsize = 2000
|
||||
switch(M)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
amount = linked_lathe.m_amount
|
||||
sheetsize = 3750
|
||||
if("glass")
|
||||
amount = linked_lathe.g_amount
|
||||
sheetsize = 3750
|
||||
if("gold")
|
||||
amount = linked_lathe.gold_amount
|
||||
if("silver")
|
||||
amount = linked_lathe.silver_amount
|
||||
if("phoron")
|
||||
amount = linked_lathe.phoron_amount
|
||||
if("uranium")
|
||||
amount = linked_lathe.uranium_amount
|
||||
if("diamond")
|
||||
amount = linked_lathe.diamond_amount
|
||||
else
|
||||
continue
|
||||
for(var/M in linked_lathe.materials)
|
||||
var/amount = linked_lathe.materials[M]
|
||||
dat += "<LI><B>[capitalize(M)]</B>: [amount] cm<sup>3</sup>"
|
||||
if(amount >= sheetsize)
|
||||
if(amount >= SHEET_MATERIAL_AMOUNT)
|
||||
dat += " || Eject "
|
||||
for (var/C in list(1,3,5,10,15,20,25,30,40))
|
||||
if(amount < C * sheetsize)
|
||||
for (var/C in list(1, 3, 5, 10, 15, 20, 25, 30, 40))
|
||||
if(amount < C * SHEET_MATERIAL_AMOUNT)
|
||||
break
|
||||
dat += "[C > 1 ? ", " : ""]<A href='?src=\ref[src];lathe_ejectsheet=[M];amount=[C]'>[C]</A> "
|
||||
|
||||
@@ -857,6 +707,24 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<A href='?src=\ref[src];disposeP=[R.id]'>(Purge)</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];disposeallP=1'><U>Disposal All Chemicals in Storage</U></A><BR>"
|
||||
|
||||
if(3.4) // Protolathe queue
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
|
||||
dat += "Queue<BR><HR>"
|
||||
if(!linked_lathe.queue.len)
|
||||
dat += "Empty"
|
||||
else
|
||||
var/tmp = 1
|
||||
for(var/datum/design/D in linked_lathe.queue)
|
||||
if(tmp == 1)
|
||||
if(linked_lathe.busy)
|
||||
dat += "<B>1: [D.name]</B><BR>"
|
||||
else
|
||||
dat += "<B>1: [D.name]</B> (Awaiting materials) <A href='?src=\ref[src];removeP=[tmp]'>(Remove)</A><BR>"
|
||||
else
|
||||
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeP=[tmp]'>(Remove)</A><BR>"
|
||||
++tmp
|
||||
|
||||
///////////////////CIRCUIT IMPRINTER SCREENS////////////////////
|
||||
if(4.0)
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||
@@ -864,6 +732,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
if(4.1)
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=4.4'>View Queue</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=4.3'>Material Storage</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=4.2'>Chemical Storage</A><HR>"
|
||||
dat += "Circuit Imprinter Menu:<BR><BR>"
|
||||
@@ -874,29 +743,16 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(!D.build_path || !(D.build_type & IMPRINTER))
|
||||
continue
|
||||
var/temp_dat
|
||||
var/check_materials = 1
|
||||
for(var/M in D.materials)
|
||||
temp_dat += ", [D.materials[M]*linked_imprinter.mat_efficiency] [CallMaterialName(M)]"
|
||||
if(copytext(M, 1, 2) == "$")
|
||||
switch(M)
|
||||
if("$glass")
|
||||
if(D.materials[M]*linked_imprinter.mat_efficiency > linked_imprinter.g_amount) check_materials = 0
|
||||
if("$gold")
|
||||
if(D.materials[M]*linked_imprinter.mat_efficiency > linked_imprinter.gold_amount) check_materials = 0
|
||||
if("$diamond")
|
||||
if(D.materials[M]*linked_imprinter.mat_efficiency > linked_imprinter.diamond_amount) check_materials = 0
|
||||
if("$uranium")
|
||||
if(D.materials[M]*linked_imprinter.mat_efficiency > linked_imprinter.uranium_amount) check_materials = 0
|
||||
else if (!linked_imprinter.reagents.has_reagent(M, D.materials[M]*linked_imprinter.mat_efficiency))
|
||||
check_materials = 0
|
||||
for(var/T in D.chemicals)
|
||||
temp_dat += ", [D.chemicals[T]*linked_imprinter.mat_efficiency] [CallReagentName(T)]"
|
||||
if(temp_dat)
|
||||
temp_dat = " \[[copytext(temp_dat,3)]\]"
|
||||
if (check_materials)
|
||||
if(linked_imprinter.canBuild(D))
|
||||
dat += "<LI><B><A href='?src=\ref[src];imprint=[D.id]'>[D.name]</A></B>[temp_dat]"
|
||||
else
|
||||
dat += "<LI><B>[D.name]</B>[temp_dat]"
|
||||
if(D.reliability < 100)
|
||||
dat += " (Reliability: [D.reliability])"
|
||||
dat += "</UL>"
|
||||
|
||||
if(4.2)
|
||||
@@ -913,24 +769,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A><HR>"
|
||||
dat += "Material Storage<BR><HR>"
|
||||
dat += "<UL>"
|
||||
for(var/M in list("glass", "gold", "diamond", "uranium"))
|
||||
var/amount
|
||||
var/sheetsize = 2000
|
||||
switch(M)
|
||||
if("glass")
|
||||
amount = linked_imprinter.g_amount
|
||||
sheetsize = 3750
|
||||
if("gold")
|
||||
amount = linked_imprinter.gold_amount
|
||||
if("diamond")
|
||||
amount = linked_imprinter.diamond_amount
|
||||
if("uranium")
|
||||
amount = linked_imprinter.uranium_amount
|
||||
for(var/M in linked_imprinter.materials)
|
||||
var/amount = linked_imprinter.materials[M]
|
||||
dat += "<LI><B>[capitalize(M)]</B>: [amount] cm<sup>3</sup>"
|
||||
if(amount >= sheetsize)
|
||||
if(amount >= SHEET_MATERIAL_AMOUNT)
|
||||
dat += " || Eject: "
|
||||
for (var/C in list(1,3,5,10,15,20,25,30,40))
|
||||
if(amount < C * sheetsize)
|
||||
for (var/C in list(1, 3, 5, 10, 15, 20, 25, 30, 40))
|
||||
if(amount < C * SHEET_MATERIAL_AMOUNT)
|
||||
break
|
||||
dat += "[C > 1 ? ", " : ""]<A href='?src=\ref[src];imprinter_ejectsheet=[M];amount=[C]'>[C]</A> "
|
||||
|
||||
@@ -938,6 +783,21 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += ""
|
||||
dat += "</UL>"
|
||||
|
||||
if(4.4)
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A><HR>"
|
||||
dat += "Queue<BR><HR>"
|
||||
if(linked_imprinter.queue.len == 0)
|
||||
dat += "Empty"
|
||||
else
|
||||
var/tmp = 1
|
||||
for(var/datum/design/D in linked_imprinter.queue)
|
||||
if(tmp == 1)
|
||||
dat += "<B>1: [D.name]</B><BR>"
|
||||
else
|
||||
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeI=[tmp]'>(Remove)</A><BR>"
|
||||
++tmp
|
||||
|
||||
///////////////////Research Information Browser////////////////////
|
||||
if(5.0)
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
//All devices that link into the R&D console fall into thise type for easy identification and some shared procs.
|
||||
|
||||
|
||||
/obj/machinery/r_n_d
|
||||
name = "R&D Device"
|
||||
icon = 'icons/obj/machines/research.dmi'
|
||||
@@ -10,83 +9,42 @@
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
var/busy = 0
|
||||
var/hacked = 0
|
||||
var/disabled = 0
|
||||
var/shocked = 0
|
||||
var/list/wires = list()
|
||||
var/hack_wire
|
||||
var/disable_wire
|
||||
var/shock_wire
|
||||
var/obj/machinery/computer/rdconsole/linked_console
|
||||
|
||||
/obj/machinery/r_n_d/New()
|
||||
..()
|
||||
wires["Red"] = 0
|
||||
wires["Blue"] = 0
|
||||
wires["Green"] = 0
|
||||
wires["Yellow"] = 0
|
||||
wires["Black"] = 0
|
||||
wires["White"] = 0
|
||||
var/list/w = list("Red","Blue","Green","Yellow","Black","White")
|
||||
src.hack_wire = pick(w)
|
||||
w -= src.hack_wire
|
||||
src.shock_wire = pick(w)
|
||||
w -= src.shock_wire
|
||||
src.disable_wire = pick(w)
|
||||
w -= src.disable_wire
|
||||
|
||||
/obj/machinery/r_n_d/attack_hand(mob/user as mob)
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
if(panel_open)
|
||||
var/dat as text
|
||||
dat += "[src.name] Wires:<BR>"
|
||||
for(var/wire in src.wires)
|
||||
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];cut=1'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];pulse=1'>Pulse</A><BR>")
|
||||
|
||||
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
|
||||
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
|
||||
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
|
||||
user << browse("<HTML><HEAD><TITLE>[src.name] Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=hack_win")
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/proc/getMaterialType(var/name)
|
||||
switch(name)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
return /obj/item/stack/material/steel
|
||||
if("glass")
|
||||
return /obj/item/stack/material/glass
|
||||
if("gold")
|
||||
return /obj/item/stack/material/gold
|
||||
if("silver")
|
||||
return /obj/item/stack/material/silver
|
||||
if("phoron")
|
||||
return /obj/item/stack/material/phoron
|
||||
if("uranium")
|
||||
return /obj/item/stack/material/uranium
|
||||
if("diamond")
|
||||
return /obj/item/stack/material/diamond
|
||||
return null
|
||||
|
||||
/obj/machinery/r_n_d/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["pulse"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
else
|
||||
if(src.wires[temp_wire])
|
||||
usr << "You can't pulse a cut wire."
|
||||
else
|
||||
if(src.hack_wire == href_list["wire"])
|
||||
src.hacked = !src.hacked
|
||||
spawn(100) src.hacked = !src.hacked
|
||||
if(src.disable_wire == href_list["wire"])
|
||||
src.disabled = !src.disabled
|
||||
src.shock(usr,50)
|
||||
spawn(100) src.disabled = !src.disabled
|
||||
if(src.shock_wire == href_list["wire"])
|
||||
src.shocked = !src.shocked
|
||||
src.shock(usr,50)
|
||||
spawn(100) src.shocked = !src.shocked
|
||||
if(href_list["cut"])
|
||||
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
|
||||
usr << "You need wirecutters!"
|
||||
else
|
||||
var/temp_wire = href_list["wire"]
|
||||
wires[temp_wire] = !wires[temp_wire]
|
||||
if(src.hack_wire == temp_wire)
|
||||
src.hacked = !src.hacked
|
||||
if(src.disable_wire == temp_wire)
|
||||
src.disabled = !src.disabled
|
||||
src.shock(usr,50)
|
||||
if(src.shock_wire == temp_wire)
|
||||
src.shocked = !src.shocked
|
||||
src.shock(usr,50)
|
||||
src.updateUsrDialog()
|
||||
/obj/machinery/r_n_d/proc/getMaterialName(var/type)
|
||||
switch(type)
|
||||
if(/obj/item/stack/material/steel)
|
||||
return DEFAULT_WALL_MATERIAL
|
||||
if(/obj/item/stack/material/glass)
|
||||
return "glass"
|
||||
if(/obj/item/stack/material/gold)
|
||||
return "gold"
|
||||
if(/obj/item/stack/material/silver)
|
||||
return "silver"
|
||||
if(/obj/item/stack/material/phoron)
|
||||
return "phoron"
|
||||
if(/obj/item/stack/material/uranium)
|
||||
return "uranium"
|
||||
if(/obj/item/stack/material/diamond)
|
||||
return "diamond"
|
||||
@@ -45,16 +45,13 @@ research holder datum.
|
||||
***************************************************************/
|
||||
|
||||
/datum/research //Holder for all the existing, archived, and known tech. Individual to console.
|
||||
|
||||
//Datum/tech go here.
|
||||
var/list/possible_tech = list() //List of all tech in the game that players have access to (barring special events).
|
||||
var/list/known_tech = list() //List of locally known tech.
|
||||
var/list/possible_designs = list() //List of all designs (at base reliability).
|
||||
var/list/known_designs = list() //List of available designs (at base reliability).
|
||||
var/list/known_tech = list() //List of locally known tech. Datum/tech go here.
|
||||
var/list/possible_designs = list() //List of all designs.
|
||||
var/list/known_designs = list() //List of available designs.
|
||||
|
||||
/datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated.
|
||||
for(var/T in typesof(/datum/tech) - /datum/tech)
|
||||
possible_tech += new T(src)
|
||||
known_tech += new T(src)
|
||||
for(var/D in typesof(/datum/design) - /datum/design)
|
||||
possible_designs += new D(src)
|
||||
RefreshResearch()
|
||||
@@ -63,59 +60,26 @@ research holder datum.
|
||||
|
||||
/datum/research/techonly/New()
|
||||
for(var/T in typesof(/datum/tech) - /datum/tech)
|
||||
possible_tech += new T(src)
|
||||
known_tech += new T(src)
|
||||
RefreshResearch()
|
||||
|
||||
|
||||
//Checks to see if tech has all the required pre-reqs.
|
||||
//Input: datum/tech; Output: 0/1 (false/true)
|
||||
/datum/research/proc/TechHasReqs(var/datum/tech/T)
|
||||
if(T.req_tech.len == 0)
|
||||
return 1
|
||||
var/matches = 0
|
||||
for(var/req in T.req_tech)
|
||||
for(var/datum/tech/known in known_tech)
|
||||
if((req == known.id) && (known.level >= T.req_tech[req]))
|
||||
matches++
|
||||
break
|
||||
if(matches == T.req_tech.len)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
//Checks to see if design has all the required pre-reqs.
|
||||
//Input: datum/design; Output: 0/1 (false/true)
|
||||
/datum/research/proc/DesignHasReqs(var/datum/design/D)
|
||||
if(D.req_tech.len == 0)
|
||||
return 1
|
||||
var/matches = 0
|
||||
|
||||
var/list/k_tech = list()
|
||||
|
||||
for(var/datum/tech/known in known_tech)
|
||||
k_tech[known.id] = known.level
|
||||
|
||||
for(var/req in D.req_tech)
|
||||
if(!isnull(k_tech[req]) && k_tech[req] >= D.req_tech[req])
|
||||
matches++
|
||||
if(matches == D.req_tech.len)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
/*
|
||||
//Checks to see if design has all the required pre-reqs.
|
||||
//Input: datum/design; Output: 0/1 (false/true)
|
||||
/datum/research/proc/DesignHasReqs(var/datum/design/D)
|
||||
if(D.req_tech.len == 0)
|
||||
return 1
|
||||
var/matches = 0
|
||||
for(var/req in D.req_tech)
|
||||
for(var/datum/tech/known in known_tech)
|
||||
if((req == known.id) && (known.level >= D.req_tech[req]))
|
||||
matches++
|
||||
break
|
||||
if(matches == D.req_tech.len)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
*/
|
||||
if(isnull(k_tech[req]) || k_tech[req] < D.req_tech[req])
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
//Adds a tech to known_tech list. Checks to make sure there aren't duplicates and updates existing tech's levels if needed.
|
||||
//Input: datum/tech; Output: Null
|
||||
/datum/research/proc/AddTech2Known(var/datum/tech/T)
|
||||
@@ -124,143 +88,107 @@ research holder datum.
|
||||
if(T.level > known.level)
|
||||
known.level = T.level
|
||||
return
|
||||
known_tech += T
|
||||
return
|
||||
|
||||
/datum/research/proc/AddDesign2Known(var/datum/design/D)
|
||||
for(var/datum/design/known in known_designs)
|
||||
if(D.id == known.id)
|
||||
if(D.reliability_mod > known.reliability_mod)
|
||||
known.reliability_mod = D.reliability_mod
|
||||
if(!known_designs.len) // Special case
|
||||
known_designs.Add(D)
|
||||
return
|
||||
for(var/i = 1 to known_designs.len)
|
||||
var/datum/design/A = known_designs[i]
|
||||
if(A.id == D.id) // We are guaranteed to reach this if the ids are the same, because sort_string will also be the same
|
||||
return
|
||||
known_designs += D
|
||||
if(A.sort_string > D.sort_string)
|
||||
known_designs.Insert(i, D)
|
||||
return
|
||||
known_designs.Add(D)
|
||||
return
|
||||
|
||||
//Refreshes known_tech and known_designs list. Then updates the reliability vars of the designs in the known_designs list.
|
||||
//Refreshes known_tech and known_designs list
|
||||
//Input/Output: n/a
|
||||
/datum/research/proc/RefreshResearch()
|
||||
for(var/datum/tech/PT in possible_tech)
|
||||
if(TechHasReqs(PT))
|
||||
AddTech2Known(PT)
|
||||
for(var/datum/design/PD in possible_designs)
|
||||
if(DesignHasReqs(PD))
|
||||
AddDesign2Known(PD)
|
||||
for(var/datum/tech/T in known_tech)
|
||||
T = between(1,T.level,20)
|
||||
for(var/datum/design/D in known_designs)
|
||||
D.CalcReliability(known_tech)
|
||||
T = between(0, T.level, 20)
|
||||
return
|
||||
|
||||
//Refreshes the levels of a given tech.
|
||||
//Input: Tech's ID and Level; Output: null
|
||||
/datum/research/proc/UpdateTech(var/ID, var/level)
|
||||
for(var/datum/tech/KT in known_tech)
|
||||
if(KT.id == ID)
|
||||
if(KT.level <= level) KT.level = max((KT.level + 1), (level - 1))
|
||||
if(KT.id == ID && KT.level <= level)
|
||||
KT.level = max(KT.level + 1, level - 1)
|
||||
return
|
||||
|
||||
/datum/research/proc/UpdateDesign(var/path)
|
||||
for(var/datum/design/KD in known_designs)
|
||||
if(KD.build_path == path)
|
||||
KD.reliability_mod += rand(1,2)
|
||||
break
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************
|
||||
** Technology Datums **
|
||||
** Includes all the various technoliges and what they make. **
|
||||
***************************************************************/
|
||||
|
||||
datum/tech //Datum of individual technologies.
|
||||
/datum/tech //Datum of individual technologies.
|
||||
var/name = "name" //Name of the technology.
|
||||
var/desc = "description" //General description of what it does and what it makes.
|
||||
var/id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols.
|
||||
var/level = 1 //A simple number scale of the research level. Level 0 = Secret tech.
|
||||
var/list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = #
|
||||
|
||||
|
||||
//Trunk Technologies (don't require any other techs and you start knowning them).
|
||||
|
||||
datum/tech/materials
|
||||
/datum/tech/materials
|
||||
name = "Materials Research"
|
||||
desc = "Development of new and improved materials."
|
||||
id = "materials"
|
||||
id = TECH_MATERIAL
|
||||
|
||||
datum/tech/engineering
|
||||
/datum/tech/engineering
|
||||
name = "Engineering Research"
|
||||
desc = "Development of new and improved engineering parts."
|
||||
id = "engineering"
|
||||
id = TECH_ENGINEERING
|
||||
|
||||
datum/tech/phorontech
|
||||
/datum/tech/phorontech
|
||||
name = "Phoron Research"
|
||||
desc = "Research into the mysterious substance colloqually known as 'phoron'."
|
||||
id = "phorontech"
|
||||
id = TECH_PHORON
|
||||
|
||||
datum/tech/powerstorage
|
||||
/datum/tech/powerstorage
|
||||
name = "Power Manipulation Technology"
|
||||
desc = "The various technologies behind the storage and generation of electicity."
|
||||
id = "powerstorage"
|
||||
id = TECH_POWER
|
||||
|
||||
datum/tech/bluespace
|
||||
/datum/tech/bluespace
|
||||
name = "'Blue-space' Research"
|
||||
desc = "Research into the sub-reality known as 'blue-space'"
|
||||
id = "bluespace"
|
||||
id = TECH_BLUESPACE
|
||||
|
||||
datum/tech/biotech
|
||||
/datum/tech/biotech
|
||||
name = "Biological Technology"
|
||||
desc = "Research into the deeper mysteries of life and organic substances."
|
||||
id = "biotech"
|
||||
id = TECH_BIO
|
||||
|
||||
datum/tech/combat
|
||||
/datum/tech/combat
|
||||
name = "Combat Systems Research"
|
||||
desc = "The development of offensive and defensive systems."
|
||||
id = "combat"
|
||||
id = TECH_COMBAT
|
||||
|
||||
datum/tech/magnets
|
||||
/datum/tech/magnets
|
||||
name = "Electromagnetic Spectrum Research"
|
||||
desc = "Research into the electromagnetic spectrum. No clue how they actually work, though."
|
||||
id = "magnets"
|
||||
id = TECH_MAGNET
|
||||
|
||||
datum/tech/programming
|
||||
/datum/tech/programming
|
||||
name = "Data Theory Research"
|
||||
desc = "The development of new computer and artificial intelligence and data storage systems."
|
||||
id = "programming"
|
||||
id = TECH_DATA
|
||||
|
||||
datum/tech/syndicate
|
||||
/datum/tech/syndicate
|
||||
name = "Illegal Technologies Research"
|
||||
desc = "The study of technologies that violate standard Nanotrasen regulations."
|
||||
id = "syndicate"
|
||||
desc = "The study of technologies that violate standard government regulations."
|
||||
id = TECH_ILLEGAL
|
||||
level = 0
|
||||
|
||||
/*
|
||||
datum/tech/arcane
|
||||
/datum/tech/arcane
|
||||
name = "Arcane Research"
|
||||
desc = "Research into the occult and arcane field for use in practical science"
|
||||
id = "arcane"
|
||||
level = 0 //It didn't become "secret" as advertised.
|
||||
|
||||
//Branch Techs
|
||||
datum/tech/explosives
|
||||
name = "Explosives Research"
|
||||
desc = "The creation and application of explosive materials."
|
||||
id = "explosives"
|
||||
req_tech = list("materials" = 3)
|
||||
|
||||
datum/tech/generators
|
||||
name = "Power Generation Technology"
|
||||
desc = "Research into more powerful and more reliable sources."
|
||||
id = "generators"
|
||||
req_tech = list("powerstorage" = 2)
|
||||
|
||||
datum/tech/robotics
|
||||
name = "Robotics Technology"
|
||||
desc = "The development of advanced automated, autonomous machines."
|
||||
id = "robotics"
|
||||
req_tech = list("materials" = 3, "programming" = 3)
|
||||
*/
|
||||
|
||||
id = TECH_ARCANE
|
||||
level = 0
|
||||
|
||||
/obj/item/weapon/disk/tech_disk
|
||||
name = "technology disk"
|
||||
@@ -273,8 +201,8 @@ datum/tech/robotics
|
||||
var/datum/tech/stored
|
||||
|
||||
/obj/item/weapon/disk/tech_disk/New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
pixel_x = rand(-5.0, 5)
|
||||
pixel_y = rand(-5.0, 5)
|
||||
|
||||
/obj/item/weapon/disk/design_disk
|
||||
name = "component design disk"
|
||||
@@ -283,9 +211,9 @@ datum/tech/robotics
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 2.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 10)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30, "glass" = 10)
|
||||
var/datum/design/blueprint
|
||||
|
||||
/obj/item/weapon/disk/design_disk/New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
pixel_x = rand(-5.0, 5)
|
||||
pixel_y = rand(-5.0, 5)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "server"
|
||||
var/datum/research/files
|
||||
var/health = 100
|
||||
var/list/id_with_upload = list() //List of R&D consoles with upload to server access.
|
||||
var/list/id_with_upload = list() //List of R&D consoles with upload to server access.
|
||||
var/list/id_with_download = list() //List of R&D consoles with download from server access.
|
||||
var/id_with_upload_string = "" //String versions for easy editing in map editor.
|
||||
var/id_with_download_string = ""
|
||||
@@ -22,7 +22,7 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
RefreshParts()
|
||||
src.initialize(); //Agouri
|
||||
initialize();
|
||||
|
||||
/obj/machinery/r_n_d/server/Destroy()
|
||||
griefProtection()
|
||||
@@ -35,7 +35,8 @@
|
||||
idle_power_usage /= max(1, tot_rating)
|
||||
|
||||
/obj/machinery/r_n_d/server/initialize()
|
||||
if(!files) files = new /datum/research(src)
|
||||
if(!files)
|
||||
files = new /datum/research(src)
|
||||
var/list/temp_list
|
||||
if(!id_with_upload.len)
|
||||
temp_list = list()
|
||||
@@ -70,27 +71,14 @@
|
||||
produce_heat()
|
||||
delay = initial(delay)
|
||||
|
||||
/obj/machinery/r_n_d/server/meteorhit(var/obj/O as obj)
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/server/emp_act(severity)
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/server/ex_act(severity)
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/server/blob_act()
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
|
||||
//Backup files to centcomm to help admins recover data after greifer attacks
|
||||
/obj/machinery/r_n_d/server/proc/griefProtection()
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in machines)
|
||||
@@ -101,10 +89,10 @@
|
||||
C.files.RefreshResearch()
|
||||
|
||||
/obj/machinery/r_n_d/server/proc/produce_heat()
|
||||
if (!produces_heat)
|
||||
if(!produces_heat)
|
||||
return
|
||||
|
||||
if (!use_power)
|
||||
if(!use_power)
|
||||
return
|
||||
|
||||
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from telecoms
|
||||
@@ -124,46 +112,15 @@
|
||||
env.merge(removed)
|
||||
|
||||
/obj/machinery/r_n_d/server/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (disabled)
|
||||
if(default_deconstruction_screwdriver(user, O))
|
||||
return
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
if (!panel_open)
|
||||
panel_open = 1
|
||||
icon_state = "server_o"
|
||||
user << "You open the maintenance hatch of [src]."
|
||||
else
|
||||
panel_open = 0
|
||||
icon_state = "server"
|
||||
user << "You close the maintenance hatch of [src]."
|
||||
if(default_deconstruction_crowbar(user, O))
|
||||
return
|
||||
if (panel_open)
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
griefProtection()
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
M.state = 2
|
||||
M.icon_state = "box_1"
|
||||
for(var/obj/I in component_parts)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/machinery/r_n_d/server/attack_hand(mob/user as mob)
|
||||
if (disabled)
|
||||
if(default_part_replacement(user, O))
|
||||
return
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/server/centcom
|
||||
name = "Centcom Central R&D Database"
|
||||
name = "Central R&D Database"
|
||||
server_id = -1
|
||||
|
||||
/obj/machinery/r_n_d/server/centcom/initialize()
|
||||
@@ -190,12 +147,12 @@
|
||||
no_id_servers -= S
|
||||
|
||||
/obj/machinery/r_n_d/server/centcom/process()
|
||||
return PROCESS_KILL //don't need process()
|
||||
|
||||
return PROCESS_KILL //don't need process()
|
||||
|
||||
/obj/machinery/computer/rdservercontrol
|
||||
name = "R&D Server Controller"
|
||||
icon_state = "rdcomp"
|
||||
icon_keyboard = "rd_key"
|
||||
icon_screen = "rdcomp"
|
||||
light_color = "#a97faa"
|
||||
circuit = /obj/item/weapon/circuitboard/rdservercontrol
|
||||
var/screen = 0
|
||||
@@ -210,8 +167,8 @@
|
||||
|
||||
add_fingerprint(usr)
|
||||
usr.set_machine(src)
|
||||
if(!src.allowed(usr) && !emagged)
|
||||
usr << "\red You do not have the required access level"
|
||||
if(!allowed(usr) && !emagged)
|
||||
usr << "<span class='warning'>You do not have the required access level</span>"
|
||||
return
|
||||
|
||||
if(href_list["main"])
|
||||
@@ -267,7 +224,6 @@
|
||||
if(choice == "Continue")
|
||||
for(var/datum/design/D in temp_server.files.known_designs)
|
||||
if(D.id == href_list["reset_design"])
|
||||
D.reliability_mod = 0
|
||||
temp_server.files.known_designs -= D
|
||||
break
|
||||
temp_server.files.RefreshResearch()
|
||||
@@ -336,14 +292,13 @@
|
||||
onclose(user, "server_control")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/rdservercontrol/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
|
||||
if(istype(D, /obj/item/weapon/card/emag) && !emagged)
|
||||
/obj/machinery/computer/rdservercontrol/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!emagged)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
user << "\blue You you disable the security protocols"
|
||||
src.updateUsrDialog()
|
||||
return ..()
|
||||
|
||||
user << "<span class='notice'>You you disable the security protocols.</span>"
|
||||
src.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/obj/machinery/r_n_d/server/robotics
|
||||
name = "Robotics R&D Server"
|
||||
@@ -351,7 +306,6 @@
|
||||
id_with_download_string = "1;2"
|
||||
server_id = 2
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/server/core
|
||||
name = "Core R&D Server"
|
||||
id_with_upload_string = "1"
|
||||
|
||||
@@ -18,44 +18,6 @@
|
||||
#define TRIGGER_CO2 11
|
||||
#define TRIGGER_NITRO 12
|
||||
#define MAX_TRIGGER 12
|
||||
/*
|
||||
//sleeping gas appears to be bugged, currently
|
||||
var/list/valid_primary_effect_types = list(\
|
||||
/datum/artifact_effect/cellcharge,\
|
||||
/datum/artifact_effect/celldrain,\
|
||||
/datum/artifact_effect/forcefield,\
|
||||
/datum/artifact_effect/gasoxy,\
|
||||
/datum/artifact_effect/gasplasma,\
|
||||
/* /datum/artifact_effect/gassleeping,\*/
|
||||
/datum/artifact_effect/heal,\
|
||||
/datum/artifact_effect/hurt,\
|
||||
/datum/artifact_effect/emp,\
|
||||
/datum/artifact_effect/teleport,\
|
||||
/datum/artifact_effect/robohurt,\
|
||||
/datum/artifact_effect/roboheal)
|
||||
|
||||
var/list/valid_secondary_effect_types = list(\
|
||||
/datum/artifact_effect/cold,\
|
||||
/datum/artifact_effect/badfeeling,\
|
||||
/datum/artifact_effect/cellcharge,\
|
||||
/datum/artifact_effect/celldrain,\
|
||||
/datum/artifact_effect/dnaswitch,\
|
||||
/datum/artifact_effect/emp,\
|
||||
/datum/artifact_effect/gasco2,\
|
||||
/datum/artifact_effect/gasnitro,\
|
||||
/datum/artifact_effect/gasoxy,\
|
||||
/datum/artifact_effect/gasphoron,\
|
||||
/* /datum/artifact_effect/gassleeping,\*/
|
||||
/datum/artifact_effect/goodfeeling,\
|
||||
/datum/artifact_effect/heal,\
|
||||
/datum/artifact_effect/hurt,\
|
||||
/datum/artifact_effect/radiate,\
|
||||
/datum/artifact_effect/roboheal,\
|
||||
/datum/artifact_effect/robohurt,\
|
||||
/datum/artifact_effect/sleepy,\
|
||||
/datum/artifact_effect/stun,\
|
||||
/datum/artifact_effect/teleport)
|
||||
*/
|
||||
|
||||
/obj/machinery/artifact
|
||||
name = "alien artifact"
|
||||
@@ -82,37 +44,34 @@ var/list/valid_secondary_effect_types = list(\
|
||||
if(prob(75))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
icon_num = rand(0,11)
|
||||
icon_num = rand(0,13)
|
||||
icon_state = "ano[icon_num]0"
|
||||
if(icon_num == 7 || icon_num == 8)
|
||||
name = "large crystal"
|
||||
name = "large alien crystal"
|
||||
desc = pick("It shines faintly as it catches the light.",\
|
||||
"It appears to have a faint inner glow.",\
|
||||
"It seems to draw you inward as you look it at.",\
|
||||
"Something twinkles faintly as you look at it.",\
|
||||
"It's mesmerizing to behold.")
|
||||
if(prob(50))
|
||||
if(prob(75))
|
||||
my_effect.trigger = TRIGGER_ENERGY
|
||||
else if(icon_num == 9)
|
||||
else if(icon_num == 1 || icon_num == 6)
|
||||
desc = "There appears to be some kind of environmental scanner on it."
|
||||
if(prob(75))
|
||||
my_effect.trigger = rand(5,8)
|
||||
else if(icon_num == 9 || icon_num == 11 || icon_num == 13)
|
||||
name = "alien computer"
|
||||
desc = "It is covered in strange markings."
|
||||
if(prob(75))
|
||||
my_effect.trigger = TRIGGER_TOUCH
|
||||
else if(icon_num == 10)
|
||||
desc = "A large alien device, there appear to be some kind of vents in the side."
|
||||
if(prob(50))
|
||||
my_effect.trigger = rand(6,12)
|
||||
else if(icon_num == 11)
|
||||
else if(icon_num == 2 || icon_num == 3 || icon_num == 4)
|
||||
desc = "A large alien device, there appear to be vents in the side."
|
||||
if(prob(75))
|
||||
my_effect.trigger = rand(7,12)
|
||||
else if(icon_num == 10 || icon_num == 12)
|
||||
name = "sealed alien pod"
|
||||
desc = "A strange alien device."
|
||||
if(prob(25))
|
||||
if(prob(75))
|
||||
my_effect.trigger = rand(1,4)
|
||||
|
||||
#define TRIGGER_PHORON 9
|
||||
#define TRIGGER_OXY 10
|
||||
#define TRIGGER_CO2 11
|
||||
#define TRIGGER_NITRO 12
|
||||
|
||||
/obj/machinery/artifact/process()
|
||||
|
||||
var/turf/L = loc
|
||||
@@ -235,7 +194,7 @@ var/list/valid_secondary_effect_types = list(\
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(my_effect.trigger == TRIGGER_TOUCH)
|
||||
user << "<b>You touch [src].<b>"
|
||||
user << "<b>You touch [src].</b>"
|
||||
my_effect.ToggleActivate()
|
||||
else
|
||||
user << "<b>You touch [src],</b> [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
|
||||
@@ -321,7 +280,7 @@ var/list/valid_secondary_effect_types = list(\
|
||||
warn = 1
|
||||
|
||||
if(warn)
|
||||
M << "<b>You accidentally touch [src].<b>"
|
||||
M << "<b>You accidentally touch [src].</b>"
|
||||
..()
|
||||
|
||||
/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P)
|
||||
|
||||
+70
-70
@@ -1,70 +1,70 @@
|
||||
|
||||
/datum/artifact_effect/badfeeling
|
||||
effecttype = "badfeeling"
|
||||
effect_type = 2
|
||||
var/list/messages = list("You feel worried.",\
|
||||
"Something doesn't feel right.",\
|
||||
"You get a strange feeling in your gut.",\
|
||||
"Your instincts are trying to warn you about something.",\
|
||||
"Someone just walked over your grave.",\
|
||||
"There's a strange feeling in the air.",\
|
||||
"There's a strange smell in the air.",\
|
||||
"The tips of your fingers feel tingly.",\
|
||||
"You feel witchy.",\
|
||||
"You have a terrible sense of foreboding.",\
|
||||
"You've got a bad feeling about this.",\
|
||||
"Your scalp prickles.",\
|
||||
"The light seems to flicker.",\
|
||||
"The shadows seem to lengthen.",\
|
||||
"The walls are getting closer.",\
|
||||
"Something is wrong")
|
||||
|
||||
var/list/drastic_messages = list("You've got to get out of here!",\
|
||||
"Someone's trying to kill you!",\
|
||||
"There's something out there!",\
|
||||
"What's happening to you?",\
|
||||
"OH GOD!",\
|
||||
"HELP ME!")
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(prob(50))
|
||||
if(prob(75))
|
||||
H << "<b><font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
else
|
||||
H << "<font color='red'>[pick(messages)]</font>"
|
||||
|
||||
if(prob(50))
|
||||
H.dizziness += rand(3,5)
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
if(prob(5))
|
||||
if(prob(75))
|
||||
H << "<font color='red'>[pick(messages)]</font>"
|
||||
else
|
||||
H << "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
|
||||
if(prob(10))
|
||||
H.dizziness += rand(3,5)
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectPulse()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
if(prob(50))
|
||||
if(prob(95))
|
||||
H << "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
else
|
||||
H << "<font color='red'>[pick(messages)]</font>"
|
||||
|
||||
if(prob(50))
|
||||
H.dizziness += rand(3,5)
|
||||
else if(prob(25))
|
||||
H.dizziness += rand(5,15)
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/badfeeling
|
||||
effecttype = "badfeeling"
|
||||
effect_type = 2
|
||||
var/list/messages = list("You feel worried.",\
|
||||
"Something doesn't feel right.",\
|
||||
"You get a strange feeling in your gut.",\
|
||||
"Your instincts are trying to warn you about something.",\
|
||||
"Someone just walked over your grave.",\
|
||||
"There's a strange feeling in the air.",\
|
||||
"There's a strange smell in the air.",\
|
||||
"The tips of your fingers feel tingly.",\
|
||||
"You feel witchy.",\
|
||||
"You have a terrible sense of foreboding.",\
|
||||
"You've got a bad feeling about this.",\
|
||||
"Your scalp prickles.",\
|
||||
"The light seems to flicker.",\
|
||||
"The shadows seem to lengthen.",\
|
||||
"The walls are getting closer.",\
|
||||
"Something is wrong")
|
||||
|
||||
var/list/drastic_messages = list("You've got to get out of here!",\
|
||||
"Someone's trying to kill you!",\
|
||||
"There's something out there!",\
|
||||
"What's happening to you?",\
|
||||
"OH GOD!",\
|
||||
"HELP ME!")
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(prob(50))
|
||||
if(prob(75))
|
||||
H << "<b><font color='red' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>"
|
||||
else
|
||||
H << "<font color='red'>[pick(messages)]</font>"
|
||||
|
||||
if(prob(50))
|
||||
H.dizziness += rand(3,5)
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
if(prob(5))
|
||||
if(prob(75))
|
||||
H << "<font color='red'>[pick(messages)]</font>"
|
||||
else
|
||||
H << "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
|
||||
if(prob(10))
|
||||
H.dizziness += rand(3,5)
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/badfeeling/DoEffectPulse()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
if(prob(50))
|
||||
if(prob(95))
|
||||
H << "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
else
|
||||
H << "<font color='red'>[pick(messages)]</font>"
|
||||
|
||||
if(prob(50))
|
||||
H.dizziness += rand(3,5)
|
||||
else if(prob(25))
|
||||
H.dizziness += rand(5,15)
|
||||
return 1
|
||||
|
||||
+68
-68
@@ -1,68 +1,68 @@
|
||||
|
||||
/datum/artifact_effect/goodfeeling
|
||||
effecttype = "goodfeeling"
|
||||
effect_type = 2
|
||||
var/list/messages = list("You feel good.",\
|
||||
"Everything seems to be going alright",\
|
||||
"You've got a good feeling about this",\
|
||||
"Your instincts tell you everything is going to be getting better.",\
|
||||
"There's a good feeling in the air.",\
|
||||
"Something smells... good.",\
|
||||
"The tips of your fingers feel tingly.",\
|
||||
"You've got a good feeling about this.",\
|
||||
"You feel happy.",\
|
||||
"You fight the urge to smile.",\
|
||||
"Your scalp prickles.",\
|
||||
"All the colours seem a bit more vibrant.",\
|
||||
"Everything seems a little lighter.",\
|
||||
"The troubles of the world seem to fade away.")
|
||||
|
||||
var/list/drastic_messages = list("You want to hug everyone you meet!",\
|
||||
"Everything is going so well!",\
|
||||
"You feel euphoric.",\
|
||||
"You feel giddy.",\
|
||||
"You're so happy suddenly, you almost want to dance and sing.",\
|
||||
"You feel like the world is out to help you.")
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(prob(50))
|
||||
if(prob(75))
|
||||
H << "<b><font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
else
|
||||
H << "<font color='blue'>[pick(messages)]</font>"
|
||||
|
||||
if(prob(50))
|
||||
H.dizziness += rand(3,5)
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
if(prob(5))
|
||||
if(prob(75))
|
||||
H << "<font color='blue'>[pick(messages)]</font>"
|
||||
else
|
||||
H << "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
|
||||
if(prob(5))
|
||||
H.dizziness += rand(3,5)
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectPulse()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
if(prob(50))
|
||||
if(prob(95))
|
||||
H << "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
else
|
||||
H << "<font color='blue'>[pick(messages)]</font>"
|
||||
|
||||
if(prob(50))
|
||||
H.dizziness += rand(3,5)
|
||||
else if(prob(25))
|
||||
H.dizziness += rand(5,15)
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/goodfeeling
|
||||
effecttype = "goodfeeling"
|
||||
effect_type = 2
|
||||
var/list/messages = list("You feel good.",\
|
||||
"Everything seems to be going alright",\
|
||||
"You've got a good feeling about this",\
|
||||
"Your instincts tell you everything is going to be getting better.",\
|
||||
"There's a good feeling in the air.",\
|
||||
"Something smells... good.",\
|
||||
"The tips of your fingers feel tingly.",\
|
||||
"You've got a good feeling about this.",\
|
||||
"You feel happy.",\
|
||||
"You fight the urge to smile.",\
|
||||
"Your scalp prickles.",\
|
||||
"All the colours seem a bit more vibrant.",\
|
||||
"Everything seems a little lighter.",\
|
||||
"The troubles of the world seem to fade away.")
|
||||
|
||||
var/list/drastic_messages = list("You want to hug everyone you meet!",\
|
||||
"Everything is going so well!",\
|
||||
"You feel euphoric.",\
|
||||
"You feel giddy.",\
|
||||
"You're so happy suddenly, you almost want to dance and sing.",\
|
||||
"You feel like the world is out to help you.")
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user)
|
||||
if(user)
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(prob(50))
|
||||
if(prob(75))
|
||||
H << "<b><font color='blue' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>"
|
||||
else
|
||||
H << "<font color='blue'>[pick(messages)]</font>"
|
||||
|
||||
if(prob(50))
|
||||
H.dizziness += rand(3,5)
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
if(prob(5))
|
||||
if(prob(75))
|
||||
H << "<font color='blue'>[pick(messages)]</font>"
|
||||
else
|
||||
H << "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
|
||||
if(prob(5))
|
||||
H.dizziness += rand(3,5)
|
||||
return 1
|
||||
|
||||
/datum/artifact_effect/goodfeeling/DoEffectPulse()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||
if(prob(50))
|
||||
if(prob(95))
|
||||
H << "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>"
|
||||
else
|
||||
H << "<font color='blue'>[pick(messages)]</font>"
|
||||
|
||||
if(prob(50))
|
||||
H.dizziness += rand(3,5)
|
||||
else if(prob(25))
|
||||
H.dizziness += rand(5,15)
|
||||
return 1
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
if(iscarbon(toucher) && prob(weakness * 100))
|
||||
var/mob/living/carbon/C = toucher
|
||||
C << "\red A painful discharge of energy strikes you!"
|
||||
C << "<span class='danger'>A painful discharge of energy strikes you!</span>"
|
||||
C.adjustOxyLoss(rand(5,25) * weakness)
|
||||
C.adjustToxLoss(rand(5,25) * weakness)
|
||||
C.adjustBruteLoss(rand(5,25) * weakness)
|
||||
C.adjustFireLoss(rand(5,25) * weakness)
|
||||
C.adjustBrainLoss(rand(5,25) * weakness)
|
||||
C.radiation += 25 * weakness
|
||||
C.apply_effect(25 * weakness, IRRADIATE)
|
||||
C.nutrition -= min(50 * weakness, C.nutrition)
|
||||
C.make_dizzy(6 * weakness)
|
||||
C.weakened += 6 * weakness
|
||||
@@ -26,7 +26,7 @@
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
if(prob(10))
|
||||
C << "\red You feel a painful force radiating from something nearby."
|
||||
C << "<span class='danger'>You feel a painful force radiating from something nearby.</span>"
|
||||
C.adjustBruteLoss(1 * weakness)
|
||||
C.adjustFireLoss(1 * weakness)
|
||||
C.adjustToxLoss(1 * weakness)
|
||||
@@ -40,7 +40,7 @@
|
||||
for (var/mob/living/carbon/C in range(effectrange, T))
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
C << "\red A wave of painful energy strikes you!"
|
||||
C << "<span class='danger'>A wave of painful energy strikes you!</span>"
|
||||
C.adjustBruteLoss(3 * weakness)
|
||||
C.adjustFireLoss(3 * weakness)
|
||||
C.adjustToxLoss(3 * weakness)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
icon_state = "strange"
|
||||
var/obj/item/weapon/inside
|
||||
var/method = 0// 0 = fire, 1 = brush, 2 = pick
|
||||
origin_tech = "materials=5"
|
||||
origin_tech = list(TECH_MATERIAL = 5)
|
||||
|
||||
/obj/item/weapon/ore/strangerock/New(loc, var/inside_item_type = 0)
|
||||
..(loc)
|
||||
|
||||
@@ -10,24 +10,3 @@
|
||||
/obj/machinery/crystal/New()
|
||||
if(prob(50))
|
||||
icon_state = "crystal2"
|
||||
|
||||
//large finds
|
||||
/*
|
||||
/obj/machinery/syndicate_beacon
|
||||
/obj/machinery/wish_granter
|
||||
if(18)
|
||||
item_type = "jagged green crystal"
|
||||
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
|
||||
icon_state = "crystal"
|
||||
apply_material_decorations = 0
|
||||
if(prob(10))
|
||||
apply_image_decorations = 1
|
||||
if(19)
|
||||
item_type = "jagged pink crystal"
|
||||
additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.")
|
||||
icon_state = "crystal2"
|
||||
apply_material_decorations = 0
|
||||
if(prob(10))
|
||||
apply_image_decorations = 1
|
||||
*/
|
||||
//machinery type artifacts?
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
playsound(src.loc, pick('sound/hallucinations/wail.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/far_noise.ogg'), 50, 1, -3)
|
||||
nearby_mobs.Add(M)
|
||||
|
||||
var/target = pick("chest","groin","head","l_arm","r_arm","r_leg","l_leg","l_hand","r_hand","l_foot","r_foot")
|
||||
var/target = pick(M.organs_by_name)
|
||||
M.apply_damage(rand(5, 10), BRUTE, target)
|
||||
M << "\red The skin on your [parse_zone(target)] feels like it's ripping apart, and a stream of blood flies out."
|
||||
var/obj/effect/decal/cleanable/blood/splatter/animated/B = new(M.loc)
|
||||
|
||||
@@ -9,13 +9,10 @@
|
||||
reagents.add_reagent("coolant",1000)
|
||||
|
||||
/obj/structure/reagent_dispensers/coolanttank/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.damage_type == BRUTE || Proj.damage_type == BURN)
|
||||
if(Proj.get_structure_damage())
|
||||
if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) )
|
||||
explode()
|
||||
|
||||
/obj/structure/reagent_dispensers/coolanttank/blob_act()
|
||||
explode()
|
||||
|
||||
/obj/structure/reagent_dispensers/coolanttank/ex_act()
|
||||
explode()
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
new /obj/item/weapon/pickaxe/hand(src)
|
||||
new /obj/item/weapon/storage/bag/fossils(src)
|
||||
new /obj/item/weapon/hand_labeler(src)
|
||||
new /obj/item/taperoll/research(src)
|
||||
return
|
||||
|
||||
//---- Isolation room air alarms
|
||||
|
||||
@@ -131,10 +131,10 @@
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
auth_card = I
|
||||
if(attempt_unlock(I))
|
||||
usr << "<span class='info'>You insert [I], the console flashes \'<i>Access granted.</a>\'</span>"
|
||||
if(attempt_unlock(I, usr))
|
||||
usr << "<span class='info'>You insert [I], the console flashes \'<i>Access granted.</i>\'</span>"
|
||||
else
|
||||
usr << "<span class='warning'>You insert [I], the console flashes \'<i>Access denied.</a>\'</span>"
|
||||
usr << "<span class='warning'>You insert [I], the console flashes \'<i>Access denied.</i>\'</span>"
|
||||
else if(href_list["ejectcard"])
|
||||
if(auth_card)
|
||||
if(ishuman(usr))
|
||||
@@ -215,25 +215,27 @@
|
||||
else if(istype(W, /obj/item/weapon/card))
|
||||
var/obj/item/weapon/card/I = W
|
||||
if(!auth_card)
|
||||
if(attempt_unlock(I))
|
||||
if(attempt_unlock(I, user))
|
||||
user << "<span class='info'>You swipe [I], the console flashes \'<i>Access granted.</i>\'</span>"
|
||||
else
|
||||
user << "<span class='warning'>You swipe [I], console flashes \'<i>Access denied.</i>\'</span>"
|
||||
else
|
||||
user << "<span class='warning'>Remove [auth_card] first.</span>"
|
||||
|
||||
/obj/machinery/suspension_gen/proc/attempt_unlock(var/obj/item/weapon/card/C)
|
||||
/obj/machinery/suspension_gen/proc/attempt_unlock(var/obj/item/weapon/card/C, var/mob/user)
|
||||
if(!open)
|
||||
if(istype(C, /obj/item/weapon/card/emag) && cell.charge > 0)
|
||||
//put sparks here
|
||||
if(prob(95))
|
||||
locked = 0
|
||||
if(istype(C, /obj/item/weapon/card/emag))
|
||||
C.resolve_attackby(src, user)
|
||||
else if(istype(C, /obj/item/weapon/card/id) && check_access(C))
|
||||
locked = 0
|
||||
|
||||
if(!locked)
|
||||
return 1
|
||||
|
||||
/obj/machinery/suspension_gen/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(cell.charge > 0 && locked)
|
||||
locked = 0
|
||||
return 1
|
||||
|
||||
//checks for whether the machine can be activated or not should already have occurred by this point
|
||||
/obj/machinery/suspension_gen/proc/activate()
|
||||
//depending on the field type, we might pickup certain items
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
icon_state = "satchel"
|
||||
slot_flags = SLOT_BELT | SLOT_POCKET
|
||||
w_class = 3
|
||||
storage_slots = 50
|
||||
max_storage_space = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
|
||||
max_storage_space = 100
|
||||
max_w_class = 3
|
||||
can_hold = list(/obj/item/weapon/fossil)
|
||||
|
||||
Reference in New Issue
Block a user