Merge pull request #2131 from Razharas/MachinesOverhaulANdR&D

Constructable machines will depend on R&D parts
This commit is contained in:
Cheridan
2014-01-03 09:26:31 -08:00
15 changed files with 497 additions and 387 deletions
+24 -9
View File
@@ -336,6 +336,9 @@
use_power = 1
idle_power_usage = 50
active_power_usage = 300
var/damage_coeff
var/scan_level
var/precision_coeff
/obj/machinery/dna_scannernew/New()
..()
@@ -347,8 +350,20 @@
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
RefreshParts()
/obj/machinery/dna_scannernew/RefreshParts()
scan_level = 0
damage_coeff = 0
precision_coeff = 0
for(var/obj/item/weapon/stock_parts/scanning_module/P in component_parts)
scan_level += P.rating
for(var/obj/item/weapon/stock_parts/manipulator/P in component_parts)
precision_coeff = P.rating
for(var/obj/item/weapon/stock_parts/micro_laser/P in component_parts)
damage_coeff = P.rating
/obj/machinery/dna_scannernew/proc/toggle_open(mob/user=usr)
if(!user)
return
@@ -582,7 +597,7 @@
if(connected)
if(connected.occupant) //set occupant_status message
viable_occupant = connected.occupant
if(check_dna_integrity(viable_occupant) && !(NOCLONE in viable_occupant.mutations)) //occupent is viable for dna modification
if(check_dna_integrity(viable_occupant) && (!(NOCLONE in viable_occupant.mutations) || (connected.scan_level == 3))) //occupent is viable for dna modification
occupant_status += "[viable_occupant.name] => "
switch(viable_occupant.stat)
if(CONSCIOUS) occupant_status += "<span class='good'>Conscious</span>"
@@ -624,7 +639,7 @@
var/stddev = radstrength*RADIATION_STRENGTH_MULTIPLIER
status += "<div class='line'><div class='statusLabel'>Output Level:</div><div class='statusValue'>[radstrength]</div></div>"
status += "<div class='line'><div class='statusLabel'>&nbsp;&nbsp;\> Mutation:</div><div class='statusValue'>(-[stddev] to +[stddev] = 68%) (-[2*stddev] to +[2*stddev] = 95%)</div></div>"
stddev = RADIATION_ACCURACY_MULTIPLIER/radduration
stddev = RADIATION_ACCURACY_MULTIPLIER/(radduration + (connected.precision_coeff ** 2))
var/chance_to_hit
switch(stddev) //hardcoded values from a z-table for a normal distribution
if(0 to 0.25) chance_to_hit = ">95%"
@@ -828,9 +843,9 @@
if(num && viable_occupant)
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
viable_occupant.radiation += rand(15,40)
switch(href_list["text"])
if(istype(buffer_slot)) //15 and 40 are just magic numbers that were here before so i didnt touch them, they are initial boundaries of damage
viable_occupant.radiation += rand(15/(connected.damage_coeff ** 2),40/(connected.damage_coeff ** 2)) //Each laser level reduces damage by lvl^2, so no effect on 1 lvl, 4 times less damage on 2 and 9 times less damage on 3
switch(href_list["text"]) //Numbers are this high because other way upgrading laser is just not worth the hassle, and i cant think of anything better to inmrove
if("se")
if(buffer_slot["SE"])
viable_occupant.dna.struc_enzymes = buffer_slot["SE"]
@@ -899,13 +914,13 @@
current_screen = "mainmenu"
if(viable_occupant && connected && connected.occupant==viable_occupant)
viable_occupant.radiation += RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength
switch(href_list["task"])
viable_occupant.radiation += (RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength)/(connected.damage_coeff ** 2) //Read comment in "transferbuffer" section above for explanation
switch(href_list["task"]) //Same thing as there but values are even lower, on best part they are about 0.0*, effectively no damage
if("pulseui")
var/len = length(viable_occupant.dna.uni_identity)
num = Wrap(num, 1, len+1)
num = randomize_radiation_accuracy(num, radduration, len)
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
var/subblock = num - block*DNA_BLOCK_SIZE
last_change = "UI #[block]-[subblock]; "
+39 -20
View File
@@ -89,6 +89,7 @@ var/global/list/autolathe_recipes_hidden = list( \
idle_power_usage = 10
active_power_usage = 100
var/busy = 0
var/prod_coeff
proc
wires_win(mob/user as mob)
@@ -104,6 +105,7 @@ var/global/list/autolathe_recipes_hidden = list( \
onclose(user, "autolathe_hack")
regular_win(mob/user as mob)
var/coeff = 2 ** prod_coeff
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<HR>")
var/list/objs = list()
@@ -111,12 +113,13 @@ var/global/list/autolathe_recipes_hidden = list( \
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
if (max_multiplier>1)
@@ -127,6 +130,12 @@ var/global/list/autolathe_recipes_hidden = list( \
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
else
var/title = "[t.name] ([t.m_amt/coeff] m /[t.g_amt/coeff] g)"
if (m_amount<t.m_amt/coeff || g_amount<t.g_amt/coeff)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
@@ -250,6 +259,7 @@ var/global/list/autolathe_recipes_hidden = list( \
src.add_fingerprint(usr)
if (!busy)
if(href_list["make"])
var/coeff = 2 ** prod_coeff
var/turf/T = get_step(src.loc, get_dir(src,usr))
var/obj/template = locate(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
@@ -260,21 +270,27 @@ var/global/list/autolathe_recipes_hidden = list( \
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
spawn(16/coeff)
use_power(power)
spawn(16)
spawn(16/coeff)
use_power(power)
spawn(16)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
spawn(16/coeff)
if(template.type == /obj/item/stack)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
var/obj/new_item = new template.type(T)
var/obj/item/stack/S = new_item
S.amount = multiplier
else
src.m_amount -= template.m_amt/coeff
src.g_amount -= template.g_amt/coeff
var/obj/new_item = new template.type(T)
new_item.m_amt /= coeff
new_item.g_amt /= coeff
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
var/obj/new_item = new template.type(T)
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
busy = 0
src.updateUsrDialog()
if(href_list["act"])
@@ -319,21 +335,24 @@ var/global/list/autolathe_recipes_hidden = list( \
RefreshParts()
..()
var/tot_rating = 0
prod_coeff = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
prod_coeff += M.rating - 1
New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/circuitboard/autolathe(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
RefreshParts()
src.L = autolathe_recipes
+39 -19
View File
@@ -3,6 +3,9 @@
//Potential replacement for genetics revives or something I dunno (?)
#define CLONE_INITIAL_DAMAGE 190 //Clones in clonepods start with 190 cloneloss damage and 190 brainloss damage, thats just logical
/obj/machinery/clonepod
anchored = 1
name = "cloning pod"
@@ -18,19 +21,30 @@
var/mess = 0 //Need to clean out it if it's full of exploded clone.
var/attempting = 0 //One clone attempt at a time thanks
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
var/speed_coeff
var/efficiency
/obj/machinery/clonepod/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/circuitboard/clonepod(null)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(null)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
RefreshParts()
/obj/machinery/clonepod/RefreshParts()
speed_coeff = 0
efficiency = 0
for(var/obj/item/weapon/stock_parts/scanning_module/S in component_parts)
efficiency += S.rating
for(var/obj/item/weapon/stock_parts/manipulator/P in component_parts)
speed_coeff += P.rating
heal_level = (efficiency * 15) + 10
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
//TO-DO: Make the genetics machine accept them.
@@ -132,8 +146,6 @@
return 0
src.heal_level = rand(50,90) //Randomizes what health the clone is when ejected
src.attempting = 1 //One at a time!!
src.locked = 1
@@ -150,8 +162,8 @@
src.icon_state = "pod_1"
//Get the clone body ready
H.adjustCloneLoss(src.heal_level + 100) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
H.adjustBrainLoss(heal_level)
H.adjustCloneLoss(CLONE_INITIAL_DAMAGE ) //Yeah, clones start with very low health, not with random, because why would they start with random health
H.adjustBrainLoss(CLONE_INITIAL_DAMAGE )
H.Paralyse(4)
//Here let's calculate their health so the pod doesn't immediately eject them!!!
@@ -178,7 +190,13 @@
// -- End mode specific stuff
hardset_dna(H, ui, se, null, mrace)
randmutb(H) //Sometimes the clones come out wrong.
if(efficiency > 2)
for(var/A in bad_se_blocks)
setblock(H.dna.struc_enzymes, A, construct_block(0,2))
if(efficiency > 5 && prob(20))
randmutg(H)
if(efficiency < 3 && prob(50))
randmutb(H)
if(H.gender == MALE)
H.facial_hair_style = "Full Beard"
@@ -206,14 +224,14 @@
src.connected_message("Clone Rejected: Deceased.")
return
else if(src.occupant.cloneloss > src.heal_level)
else if(src.occupant.cloneloss > (100 - src.heal_level))
src.occupant.Paralyse(4)
//Slowly get that clone healed and finished.
src.occupant.adjustCloneLoss(-heal_level/50)
src.occupant.adjustCloneLoss(-((speed_coeff/2)))
//Premature clones may have brain damage.
src.occupant.adjustBrainLoss(-heal_level/100)
src.occupant.adjustBrainLoss(-((speed_coeff/2)))
//So clones don't die of oxyloss in a running pod.
if (src.occupant.reagents.get_reagent_amount("inaprovaline") < 30)
@@ -222,7 +240,7 @@
use_power(7500) //This might need tweaking.
return
else if((src.occupant.cloneloss <= src.heal_level) && (!src.eject_wait))
else if((src.occupant.cloneloss <= (100 - src.heal_level)) && (!src.eject_wait))
src.connected_message("Cloning Process Complete.")
src.locked = 0
src.go_out()
@@ -350,7 +368,7 @@
return
/obj/machinery/clonepod/emp_act(severity)
if(prob(100/severity)) malfunction()
if(prob(100/(severity*efficiency))) malfunction()
..()
/obj/machinery/clonepod/ex_act(severity)
@@ -427,4 +445,6 @@
/* EMP grenade/spell effect
if(istype(A, /obj/machinery/clonepod))
A:malfunction()
*/
*/
#undef CLONE_INITIAL_DAMAGE
+31 -4
View File
@@ -15,6 +15,7 @@
var/datum/data/record/active_record = null
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
var/loading = 0 // Nice loading text
var/autoprocess = 0
/obj/machinery/computer/cloning/New()
..()
@@ -23,6 +24,19 @@
return
return
/obj/machinery/computer/cloning/process()
if(!(scanner && pod1 && autoprocess))
return
if(scanner.occupant && (scanner.scan_level > 2))
scan_mob(scanner.occupant)
if(!(pod1.occupant || pod1.mess) && (pod1.efficiency > 5))
for(var/datum/data/record/R in records)
if(!(pod1.occupant || pod1.mess))
if(pod1.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"]))
records -= R
/obj/machinery/computer/cloning/proc/updatemodules()
src.scanner = findscanner()
src.pod1 = findcloner()
@@ -82,7 +96,13 @@
var/dat = ""
dat += "<a href='byond://?src=\ref[src];refresh=1'>Refresh</a>"
if(scanner && pod1 && ((scanner.scan_level > 2) || (pod1.efficiency > 5)))
if(!autoprocess)
dat += "<a href='byond://?src=\ref[src];task=autoprocess'>Autoprocess</a>"
else
dat += "<a href='byond://?src=\ref[src];task=stopautoprocess'>Stop autoprocess</a>"
else
dat += "<span class='linkOff'>Autoprocess</span>"
dat += "<h3>Cloning Pod Status</h3>"
dat += "<div class='statusDisplay'>[temp]&nbsp;</div>"
@@ -200,7 +220,14 @@
if(loading)
return
if ((href_list["scan"]) && (!isnull(src.scanner)))
if(href_list["task"])
switch(href_list["task"])
if("autoprocess")
autoprocess = 1
if("stopautoprocess")
autoprocess = 0
else if ((href_list["scan"]) && (!isnull(src.scanner)))
scantemp = ""
loading = 1
@@ -296,7 +323,7 @@
temp = "<font class='bad'>Clonepod malfunction.</font>"
else if(!config.revival_cloning)
temp = "<font class='bad'>Unable to initiate cloning cycle.</font>"
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"]))
else if(pod1.growclone(null, C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"]))
temp = "[C.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
records.Remove(C)
if(active_record == C)
@@ -325,7 +352,7 @@
if (subject.suiciding == 1)
scantemp = "<font class='bad'>Subject's brain is not responding to scanning stimuli.</font>"
return
if (NOCLONE in subject.mutations)
if (NOCLONE in subject.mutations && src.scanner.scan_level < 2)
scantemp = "<font class='bad'>Subject no longer contains the fundamental materials required to create a living clone.</font>"
return
if ((!subject.ckey) || (!subject.client))
+18 -18
View File
@@ -162,7 +162,7 @@ to destroy them and players will be able to make replacements.
*/
/obj/item/weapon/circuitboard/destructive_analyzer
name = "circuit board (Destructive Analyzer)"
build_path = "/obj/machinery/r_n_d/destructive_analyzer"
build_path = /obj/machinery/r_n_d/destructive_analyzer
board_type = "machine"
origin_tech = "magnets=2;engineering=2;programming=2"
req_components = list(
@@ -172,7 +172,7 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/circuitboard/autolathe
name = "circuit board (Autolathe)"
build_path = "/obj/machinery/autolathe"
build_path = /obj/machinery/autolathe
board_type = "machine"
origin_tech = "engineering=2;programming=2"
req_components = list(
@@ -182,7 +182,7 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/circuitboard/protolathe
name = "circuit board (Protolathe)"
build_path = "/obj/machinery/r_n_d/protolathe"
build_path = /obj/machinery/r_n_d/protolathe
board_type = "machine"
origin_tech = "engineering=2;programming=2"
req_components = list(
@@ -193,7 +193,7 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/circuitboard/circuit_imprinter
name = "circuit board (Circuit Imprinter)"
build_path = "/obj/machinery/r_n_d/circuit_imprinter"
build_path = /obj/machinery/r_n_d/circuit_imprinter
board_type = "machine"
origin_tech = "engineering=2;programming=2"
req_components = list(
@@ -203,7 +203,7 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/circuitboard/pacman
name = "circuit board (PACMAN-type Generator)"
build_path = "/obj/machinery/power/port_gen/pacman"
build_path = /obj/machinery/power/port_gen/pacman
board_type = "machine"
origin_tech = "programming=3:powerstorage=3;plasmatech=3;engineering=3"
req_components = list(
@@ -214,7 +214,7 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/circuitboard/pacman/super
name = "circuit board (SUPERPACMAN-type Generator)"
build_path = "/obj/machinery/power/port_gen/pacman/super"
build_path = /obj/machinery/power/port_gen/pacman/super
origin_tech = "programming=3;powerstorage=4;engineering=4"
/obj/item/weapon/circuitboard/pacman/mrs
@@ -224,7 +224,7 @@ to destroy them and players will be able to make replacements.
obj/item/weapon/circuitboard/rdserver
name = "circuit board (R&D Server)"
build_path = "/obj/machinery/r_n_d/server"
build_path = /obj/machinery/r_n_d/server
board_type = "machine"
origin_tech = "programming=3"
req_components = list(
@@ -233,7 +233,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/mechfab
name = "circuit board (Exosuit Fabricator)"
build_path = "/obj/machinery/mecha_part_fabricator"
build_path = /obj/machinery/mecha_part_fabricator
board_type = "machine"
origin_tech = "programming=3;engineering=3"
req_components = list(
@@ -244,7 +244,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/clonepod
name = "circuit board (Clone Pod)"
build_path = "/obj/machinery/clonepod"
build_path = /obj/machinery/clonepod
board_type = "machine"
origin_tech = "programming=3;biotech=3"
req_components = list(
@@ -255,7 +255,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/clonescanner
name = "circuit board (Cloning Scanner)"
build_path = "/obj/machinery/dna_scannernew"
build_path = /obj/machinery/dna_scannernew
board_type = "machine"
origin_tech = "programming=2;biotech=2"
req_components = list(
@@ -267,7 +267,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/cyborgrecharger
name = "circuit board (Cyborg Recharger)"
build_path = "/obj/machinery/recharge_station"
build_path = /obj/machinery/recharge_station
board_type = "machine"
origin_tech = "powerstorage=3;engineering=3"
req_components = list(
@@ -279,7 +279,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/telecomms/receiver
name = "circuit board (Subspace Receiver)"
build_path = "/obj/machinery/telecomms/receiver"
build_path = /obj/machinery/telecomms/receiver
board_type = "machine"
origin_tech = "programming=2;engineering=2;bluespace=1"
req_components = list(
@@ -290,7 +290,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/telecomms/hub
name = "circuit board (Hub Mainframe)"
build_path = "/obj/machinery/telecomms/hub"
build_path = /obj/machinery/telecomms/hub
board_type = "machine"
origin_tech = "programming=2;engineering=2"
req_components = list(
@@ -300,7 +300,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/telecomms/relay
name = "circuit board (Relay Mainframe)"
build_path = "/obj/machinery/telecomms/relay"
build_path = /obj/machinery/telecomms/relay
board_type = "machine"
origin_tech = "programming=2;engineering=2;bluespace=2"
req_components = list(
@@ -310,7 +310,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/telecomms/bus
name = "circuit board (Bus Mainframe)"
build_path = "/obj/machinery/telecomms/bus"
build_path = /obj/machinery/telecomms/bus
board_type = "machine"
origin_tech = "programming=2;engineering=2"
req_components = list(
@@ -320,7 +320,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/telecomms/processor
name = "circuit board (Processor Unit)"
build_path = "/obj/machinery/telecomms/processor"
build_path = /obj/machinery/telecomms/processor
board_type = "machine"
origin_tech = "programming=2;engineering=2"
req_components = list(
@@ -333,7 +333,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/telecomms/server
name = "circuit board (Telecommunication Server)"
build_path = "/obj/machinery/telecomms/server"
build_path = /obj/machinery/telecomms/server
board_type = "machine"
origin_tech = "programming=2;engineering=2"
req_components = list(
@@ -343,7 +343,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/telecomms/broadcaster
name = "circuit board (Subspace Broadcaster)"
build_path = "/obj/machinery/telecomms/broadcaster"
build_path = /obj/machinery/telecomms/broadcaster
board_type = "machine"
origin_tech = "programming=2;engineering=2;bluespace=1"
req_components = list(
+33 -8
View File
@@ -13,12 +13,32 @@
var/circuitboard = "/obj/item/weapon/circuitboard/cyborgrecharger"
var/locked = 1
req_access = list(access_robotics)
var/recharge_speed
var/repairs
/obj/machinery/recharge_station/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/cyborgrecharger(null)
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/cell/high(null)
RefreshParts()
build_icon()
/obj/machinery/recharge_station/RefreshParts()
recharge_speed = 0
repairs = 0
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
recharge_speed += C.rating * 100
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
repairs += M.rating - 1
for(var/obj/item/weapon/cell/C in component_parts)
recharge_speed *= C.maxcharge / 10000
/obj/machinery/recharge_station/process()
if(!(NOPOWER|BROKEN))
return
@@ -230,22 +250,25 @@
/obj/machinery/recharge_station/proc/process_occupant()
if(occupant)
restock_modules()
if(repairs)
occupant.heal_organ_damage(repairs, repairs - 1)
if(occupant.cell)
if(occupant.cell.charge >= occupant.cell.maxcharge)
occupant.cell.charge = occupant.cell.maxcharge
else
occupant.cell.charge = min(occupant.cell.charge + 200, occupant.cell.maxcharge)
occupant.cell.charge = min(occupant.cell.charge + recharge_speed, occupant.cell.maxcharge)
/obj/machinery/recharge_station/proc/restock_modules()
if(occupant)
if(occupant.module && occupant.module.modules)
var/list/um = occupant.contents|occupant.module.modules
// ^ makes sinle list of active (occupant.contents) and inactive modules (occupant.module.modules)
var/coeff = recharge_speed / 200
for(var/obj/O in um)
// Engineering
if(istype(O,/obj/item/stack/sheet/metal) || istype(O,/obj/item/stack/sheet/rglass) || istype(O,/obj/item/stack/rods) || istype(O,/obj/item/weapon/cable_coil)|| istype(O,/obj/item/stack/tile/plasteel))
if(O:amount < 50)
O:amount += 1
O:amount += coeff
// Security
if(istype(O,/obj/item/device/flash))
if(O:broken)
@@ -254,7 +277,7 @@
O:icon_state = "flash"
if(istype(O,/obj/item/weapon/gun/energy/taser/cyborg))
if(O:power_supply.charge < O:power_supply.maxcharge)
O:power_supply.give(O:charge_cost)
O:power_supply.give(O:charge_cost * coeff)
O:update_icon()
else
O:charge_tick = 0
@@ -265,16 +288,18 @@
//Service
if(istype(O,/obj/item/weapon/reagent_containers/food/condiment/enzyme))
if(O.reagents.get_reagent_amount("enzyme") < 50)
O.reagents.add_reagent("enzyme", 2)
O.reagents.add_reagent("enzyme", 2 * coeff)
//Medical
if(istype(O,/obj/item/weapon/reagent_containers/glass/bottle/robot))
var/obj/item/weapon/reagent_containers/glass/bottle/robot/B = O
if(B.reagent && (B.reagents.get_reagent_amount(B.reagent) < B.volume))
B.reagents.add_reagent(B.reagent, 2)
B.reagents.add_reagent(B.reagent, 2 * coeff)
//Janitor
if(istype(O, /obj/item/device/lightreplacer))
var/obj/item/device/lightreplacer/LR = O
LR.Charge(occupant)
var/i = 1
for(1, i < coeff, i++)
LR.Charge(occupant)
if(occupant)
if(occupant.module)
@@ -285,6 +310,6 @@
if(istype(occupant.module.emag, /obj/item/weapon/reagent_containers/spray))
var/obj/item/weapon/reagent_containers/spray/S = occupant.module.emag
if(S.name == "polyacid spray")
S.reagents.add_reagent("pacid", 2)
S.reagents.add_reagent("pacid", 2 * coeff)
else if(S.name == "lube spray")
S.reagents.add_reagent("lube", 2)
S.reagents.add_reagent("lube", 2 * coeff)
+14 -14
View File
@@ -133,12 +133,12 @@
/obj/machinery/mecha_part_fabricator/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/mechfab(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/circuitboard/mechfab(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
RefreshParts()
// part_sets["Cyborg Upgrade Modules"] = typesof(/obj/item/borg/upgrade/) - /obj/item/borg/upgrade/ // Eh. This does it dymaically, but to support having the items referenced otherwhere in the code but not being constructable, going to do it manaully.
@@ -162,18 +162,16 @@
T = 0
for(var/obj/item/weapon/stock_parts/micro_laser/Ma in component_parts)
T += Ma.rating
if(T >= 1)
T -= 1
T -= 1
var/diff
diff = round(initial(resource_coeff) - (initial(resource_coeff)*(T))/25,0.01)
diff = round(initial(resource_coeff) - (initial(resource_coeff)*(T))/6,0.01)
if(resource_coeff!=diff)
resource_coeff = diff
T = 0
for(var/obj/item/weapon/stock_parts/manipulator/Ml in component_parts)
T += Ml.rating
if(T>= 2)
T -= 2
diff = round(initial(time_coeff) - (initial(time_coeff)*(T))/25,0.01)
T -= 1
diff = round(initial(time_coeff) - (initial(time_coeff)*(T))/4,0.01)
if(time_coeff!=diff)
time_coeff = diff
@@ -358,6 +356,8 @@
src.being_built = new part.type(src)
src.desc = "It's building [src.being_built]."
src.remove_resources(part)
part.m_amt = get_resource_cost_w_coeff(part,"metal")
part.g_amt = get_resource_cost_w_coeff(part,"glass")
src.overlays += "fab-active"
src.use_power = 2
src.updateUsrDialog()
@@ -581,10 +581,10 @@
<body>
<table style='width: 100%;'>
<tr>
<td style='width: 70%; padding-right: 10px;'>
<td style='width: 65%; padding-right: 10px;'>
[left_part]
</td>
<td style='width: 30%; background: #ccc;' id='queue'>
<td style='width: 35%; background: #ccc;' id='queue'>
[list_queue()]
</td>
<tr>
+10 -5
View File
@@ -55,6 +55,7 @@ display round(lastgen) and plasmatank amount
var/power_gen = 5000
var/recent_fault = 0
var/power_output = 1
var/consumption = 0
/obj/machinery/power/port_gen/proc/HasFuel() //Placeholder for fuel check.
return 1
@@ -129,15 +130,19 @@ display round(lastgen) and plasmatank amount
/obj/machinery/power/port_gen/pacman/RefreshParts()
var/temp_rating = 0
var/temp_reliability = 0
var/consumption_coeff = 0
for(var/obj/item/weapon/stock_parts/SP in component_parts)
if(istype(SP, /obj/item/weapon/stock_parts/matter_bin))
max_sheets = SP.rating * SP.rating * 50
else if(istype(SP, /obj/item/weapon/stock_parts/micro_laser) || istype(SP, /obj/item/weapon/stock_parts/capacitor))
else if(istype(SP, /obj/item/weapon/stock_parts/capacitor))
temp_rating += SP.rating
else
consumption_coeff += SP.rating
for(var/obj/item/weapon/CP in component_parts)
temp_reliability += CP.reliability
reliability = min(round(temp_reliability / 4), 100)
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
power_gen = round(initial(power_gen) * temp_rating * 2)
consumption = consumption_coeff
/obj/machinery/power/port_gen/pacman/examine()
..()
@@ -160,7 +165,7 @@ display round(lastgen) and plasmatank amount
sheets -= amount
/obj/machinery/power/port_gen/pacman/UseFuel()
var/needed_sheets = 1 / (time_per_sheet / power_output)
var/needed_sheets = 1 / (time_per_sheet * consumption / power_output)
var/temp = min(needed_sheets, sheet_left)
needed_sheets -= temp
sheet_left -= temp
@@ -175,9 +180,9 @@ display round(lastgen) and plasmatank amount
var/bias = 0
if (power_output > 4)
upper_limit = 400
bias = power_output * 3
bias = power_output - consumption * (4 - consumption)
if (heat < lower_limit)
heat += 3
heat += 4 - consumption
else
heat += rand(-7 + bias, 7 + bias)
if (heat < lower_limit)
+5 -1
View File
@@ -13,6 +13,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
var/gold_amount = 0
var/diamond_amount = 0
var/max_material_amount = 75000.0
var/efficiency_coeff
New()
..()
@@ -35,7 +36,10 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
T += M.rating
max_material_amount = T * 75000.0
T = 0
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
T += M.rating
efficiency_coeff = T-1
blob_act()
if (prob(50))
File diff suppressed because it is too large Load Diff
+11 -15
View File
@@ -16,17 +16,16 @@ Note: Must be placed within 3 tiles of the R&D Console
/obj/machinery/r_n_d/destructive_analyzer/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/destructive_analyzer(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/circuitboard/destructive_analyzer(null)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
RefreshParts()
/obj/machinery/r_n_d/destructive_analyzer/RefreshParts()
var/T = 0
for(var/obj/item/weapon/stock_parts/S in src)
T += S.rating * 0.1
T = Clamp(T, 0, 1)
T += S.rating
decon_mod = T
/obj/machinery/r_n_d/destructive_analyzer/meteorhit()
@@ -54,32 +53,29 @@ Note: Must be placed within 3 tiles of the R&D Console
default_deconstruction_crowbar()
return 1
else
user << "\red You can't load the [src.name] while it's opened."
user << "<span class='warning'>You can't load the [src.name] while it's opened.</span>"
return 1
if (disabled)
return
if (!linked_console)
user << "\red The destructive analyzer must be linked to an R&D console first!"
user << "<span class='warning'>The protolathe must be linked to an R&D console first!</span>"
return
if (busy)
user << "\red The destructive analyzer is busy right now."
user << "<span class='warning'> The protolathe is busy right now.</span>"
return
if (istype(O, /obj/item) && !loaded_item)
if(!O.origin_tech)
user << "\red This doesn't seem to have a tech origin!"
user << "<span class='warning'> 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 << "\red You cannot deconstruct this item!"
return
if(O.reliability < 90 && O.crit_fail == 0)
usr << "\red Item is neither reliable enough nor broken enough to learn from."
user << "<span class='warning'> You cannot deconstruct this item!</span>"
return
busy = 1
loaded_item = O
user.drop_item()
O.loc = src
user << "\blue You add the [O.name] to the machine!"
user << "<span class='notice'>You add the [O.name] to the machine!</span>"
flick("d_analyzer_la", src)
spawn(10)
icon_state = "d_analyzer_l"
+5
View File
@@ -22,6 +22,7 @@ Note: Must be placed west/left of and R&D console to function.
var/diamond_amount = 0.0
var/clown_amount = 0.0
var/adamantine_amount = 0.0
var/efficiency_coeff
/obj/machinery/r_n_d/protolathe/New()
@@ -50,6 +51,10 @@ Note: Must be placed west/left of and R&D console to function.
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
T += M.rating
max_material_storage = T * 75000
T = 0
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
T += M.rating
efficiency_coeff = T-1
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (shocked)
+61 -47
View File
@@ -256,16 +256,21 @@ won't update every console in existence) but it's more of a hassle to do. Also,
usr <<"\red The destructive analyzer appears to be empty."
screen = 1.0
return
if(linked_destroy.loaded_item.reliability >= 90)
if((linked_destroy.loaded_item.reliability >= 99 - (linked_destroy.decon_mod * 3)) || linked_destroy.loaded_item.crit_fail)
var/list/temp_tech = linked_destroy.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(prob(linked_destroy.loaded_item.reliability)) //If deconstructed item is not reliable enough its just being wasted, else it is pocessed
files.UpdateTech(T, temp_tech[T]) //Check if deconstructed item has research levels higher/same/one less than current ones
files.UpdateDesigns(linked_destroy.loaded_item, temp_tech, src) //If if such reseach type found all the known designs are checked for having this research type in them
screen = 1.0 //If design have it it gains some reliability
else //Same design always gain quality
screen = 2.3 //Crit fail gives the same design a lot of reliability, like really a lot
if(linked_lathe) //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.m_amt*linked_destroy.decon_mod))
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.g_amt*linked_destroy.decon_mod))
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.m_amt*(linked_destroy.decon_mod/10)))
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.g_amt*(linked_destroy.decon_mod/10)))
linked_destroy.loaded_item = null
else
screen = 1.0
for(var/obj/I in linked_destroy.contents)
for(var/mob/M in I.contents)
M.death()
@@ -282,7 +287,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
del(I)
linked_destroy.icon_state = "d_analyzer"
use_power(250)
screen = 1.0
updateUsrDialog()
else if(href_list["lock"]) //Lock the console from use by anyone without tox access.
@@ -326,6 +330,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
sync = !sync
else if(href_list["build"]) //Causes the Protolathe to build something.
var/coeff = linked_lathe.efficiency_coeff
var/g2g = 1
if(linked_lathe)
var/datum/design/being_built = null
@@ -351,23 +356,23 @@ won't update every console in existence) but it's more of a hassle to do. Also,
break
switch(M)
if("$metal")
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M]))
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-(being_built.materials[M]/coeff)))
if("$glass")
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M]))
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-(being_built.materials[M]/coeff)))
if("$gold")
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M]))
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-(being_built.materials[M]/coeff)))
if("$silver")
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M]))
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-(being_built.materials[M]/coeff)))
if("$plasma")
linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-being_built.materials[M]))
linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-(being_built.materials[M]/coeff)))
if("$uranium")
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]))
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-(being_built.materials[M]/coeff)))
if("$diamond")
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]))
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-(being_built.materials[M]/coeff)))
if("$clown")
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-being_built.materials[M]))
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-(being_built.materials[M]/coeff)))
else
linked_lathe.reagents.remove_reagent(M, being_built.materials[M])
linked_lathe.reagents.remove_reagent(M, being_built.materials[M]/coeff)
var/P = being_built.build_path //lets save these values before the spawn() just in case. Nobody likes runtimes.
var/R = being_built.reliability
@@ -378,6 +383,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if( new_item.type == /obj/item/weapon/storage/backpack/holding )
new_item.investigate_log("built by [key]","singulo")
new_item.reliability = R
new_item.m_amt /= coeff
new_item.g_amt /= coeff
if(linked_lathe.hacked) R = max((reliability / 2), 0)
if(O)
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(linked_lathe.loc)
@@ -390,6 +397,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
updateUsrDialog()
else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something.
var/coeff = 2 ** linked_imprinter.efficiency_coeff
if(linked_imprinter)
var/datum/design/being_built = null
for(var/datum/design/D in files.known_designs)
@@ -409,20 +417,19 @@ won't update every console in existence) but it's more of a hassle to do. Also,
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.g_amount = max(0, (linked_imprinter.g_amount-being_built.materials[M]/coeff))
if("$gold")
linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]))
linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]/coeff))
if("$diamond")
linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]))
linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]/coeff))
else
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M])
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M]/coeff)
var/P = being_built.build_path //lets save these values before the spawn() just in case. Nobody likes runtimes.
var/R = being_built.reliability
spawn(16)
var/obj/new_item = new P(src)
new_item.reliability = R
if(linked_imprinter.hacked) R = max((reliability / 2), 0)
new_item.loc = linked_imprinter.loc
linked_imprinter.busy = 0
screen = 4.1
@@ -533,23 +540,23 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/proc/check_mat(datum/design/being_built, var/M)
switch(M)
if("$metal")
return (linked_lathe.m_amount - being_built.materials[M] >= 0) ? 1 : 0
return (linked_lathe.m_amount - (being_built.materials[M]/linked_lathe.efficiency_coeff) >= 0) ? 1 : 0
if("$glass")
return (linked_lathe.g_amount - being_built.materials[M] >= 0) ? 1 : 0
return (linked_lathe.g_amount - (being_built.materials[M]/linked_lathe.efficiency_coeff) >= 0) ? 1 : 0
if("$gold")
return (linked_lathe.gold_amount - being_built.materials[M] >= 0) ? 1 : 0
return (linked_lathe.gold_amount - (being_built.materials[M]/linked_lathe.efficiency_coeff) >= 0) ? 1 : 0
if("$silver")
return (linked_lathe.silver_amount - being_built.materials[M] >= 0) ? 1 : 0
return (linked_lathe.silver_amount - (being_built.materials[M]/linked_lathe.efficiency_coeff) >= 0) ? 1 : 0
if("$plasma")
return (linked_lathe.plasma_amount - being_built.materials[M] >= 0) ? 1 : 0
return (linked_lathe.plasma_amount - (being_built.materials[M]/linked_lathe.efficiency_coeff) >= 0) ? 1 : 0
if("$uranium")
return (linked_lathe.uranium_amount - being_built.materials[M] >= 0) ? 1 : 0
return (linked_lathe.uranium_amount - (being_built.materials[M]/linked_lathe.efficiency_coeff) >= 0) ? 1 : 0
if("$diamond")
return (linked_lathe.diamond_amount - being_built.materials[M] >= 0) ? 1 : 0
return (linked_lathe.diamond_amount - (being_built.materials[M]/linked_lathe.efficiency_coeff) >= 0) ? 1 : 0
if("$clown")
return (linked_lathe.clown_amount - being_built.materials[M] >= 0) ? 1 : 0
return (linked_lathe.clown_amount - (being_built.materials[M]/linked_lathe.efficiency_coeff) >= 0) ? 1 : 0
else
return linked_lathe.reagents.remove_reagent(M, being_built.materials[M])
return linked_lathe.reagents.remove_reagent(M, (being_built.materials[M]/linked_lathe.efficiency_coeff))
/obj/machinery/computer/rdconsole/attack_hand(mob/user as mob)
if(..())
@@ -560,7 +567,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
files.RefreshResearch()
switch(screen) //A quick check to make sure you get the right screen when a device is disconnected.
if(2 to 2.9)
if(linked_destroy == null)
if(screen == 2.3)
;
else if(linked_destroy == null)
screen = 2.0
else if(linked_destroy.loaded_item == null)
screen = 2.1
@@ -708,12 +717,16 @@ 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.0'>Main Menu</A><HR>"
dat += "Deconstruction Menu<HR>"
dat += "Name: [linked_destroy.loaded_item.name]<BR>"
dat += "Reliability: [linked_destroy.loaded_item.reliability]<BR>"
dat += "Origin Tech:<BR>"
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
for(var/T in temp_tech)
dat += "* [CallTechName(T)] [temp_tech[T]]<BR>"
dat += "<HR><A href='?src=\ref[src];deconstruct=1'>Deconstruct Item</A> || "
dat += "<A href='?src=\ref[src];eject_item=1'>Eject Item</A> || "
if(2.3)
dat += "Item is neither reliable enough or broken enough to learn from.<BR><BR>"
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
/////////////////////PROTOLATHE SCREENS/////////////////////////
if(3.0)
@@ -727,32 +740,33 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "Protolathe Menu:<BR><BR>"
dat += "<B>Material Amount:</B> [linked_lathe.TotalMaterials()] cm<sup>3</sup> (MAX: [linked_lathe.max_material_storage])<BR>"
dat += "<B>Chemical Volume:</B> [linked_lathe.reagents.total_volume] (MAX: [linked_lathe.reagents.maximum_volume])<HR>"
var/coeff = linked_lathe.efficiency_coeff
for(var/datum/design/D in files.known_designs)
if(!(D.build_type & PROTOLATHE))
continue
var/temp_dat = "[D.name]"
var/check_materials = 1
for(var/M in D.materials)
temp_dat += " [D.materials[M]] [CallMaterialName(M)]"
temp_dat += " [D.materials[M]/coeff] [CallMaterialName(M)]"
if(copytext(M, 1, 2) == "$")
switch(M)
if("$glass")
if(D.materials[M] > linked_lathe.g_amount) check_materials = 0
if(D.materials[M]/coeff > linked_lathe.g_amount) check_materials = 0
if("$metal")
if(D.materials[M] > linked_lathe.m_amount) check_materials = 0
if(D.materials[M]/coeff > linked_lathe.m_amount) check_materials = 0
if("$gold")
if(D.materials[M] > linked_lathe.gold_amount) check_materials = 0
if(D.materials[M]/coeff > linked_lathe.gold_amount) check_materials = 0
if("$silver")
if(D.materials[M] > linked_lathe.silver_amount) check_materials = 0
if(D.materials[M]/coeff > linked_lathe.silver_amount) check_materials = 0
if("$plasma")
if(D.materials[M] > linked_lathe.plasma_amount) check_materials = 0
if(D.materials[M]/coeff > linked_lathe.plasma_amount) check_materials = 0
if("$uranium")
if(D.materials[M] > linked_lathe.uranium_amount) check_materials = 0
if(D.materials[M]/coeff > linked_lathe.uranium_amount) check_materials = 0
if("$diamond")
if(D.materials[M] > linked_lathe.diamond_amount) check_materials = 0
if(D.materials[M]/coeff > linked_lathe.diamond_amount) check_materials = 0
if("$clown")
if(D.materials[M] > linked_lathe.clown_amount) check_materials = 0
else if (!linked_lathe.reagents.has_reagent(M, D.materials[M]))
if(D.materials[M]/coeff > linked_lathe.clown_amount) check_materials = 0
else if (!linked_lathe.reagents.has_reagent(M, D.materials[M]/coeff))
check_materials = 0
if (check_materials)
dat += "* <A href='?src=\ref[src];build=[D.id]'>[temp_dat]</A><BR>"
@@ -840,23 +854,23 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "Circuit Imprinter Menu:<BR><BR>"
dat += "Material Amount: [linked_imprinter.TotalMaterials()] cm<sup>3</sup><BR>"
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]<HR>"
var/coeff = 2 ** linked_imprinter.efficiency_coeff
for(var/datum/design/D in files.known_designs)
if(!(D.build_type & IMPRINTER))
continue
var/temp_dat = "[D.name]"
var/check_materials = 1
for(var/M in D.materials)
temp_dat += " [D.materials[M]] [CallMaterialName(M)]"
temp_dat += " [D.materials[M]/coeff] [CallMaterialName(M)]"
if(copytext(M, 1, 2) == "$")
switch(M)
if("$glass")
if(D.materials[M] > linked_imprinter.g_amount) check_materials = 0
if(D.materials[M]/coeff > linked_imprinter.g_amount) check_materials = 0
if("$gold")
if(D.materials[M] > linked_imprinter.gold_amount) check_materials = 0
if(D.materials[M]/coeff > linked_imprinter.gold_amount) check_materials = 0
if("$diamond")
if(D.materials[M] > linked_imprinter.diamond_amount) check_materials = 0
else if (!linked_imprinter.reagents.has_reagent(M, D.materials[M]))
if(D.materials[M]/coeff > linked_imprinter.diamond_amount) check_materials = 0
else if (!linked_imprinter.reagents.has_reagent(M, D.materials[M]/coeff))
check_materials = 0
if (check_materials)
dat += "* <A href='?src=\ref[src];imprint=[D.id]'>[temp_dat]</A><BR>"
+14 -11
View File
@@ -118,8 +118,8 @@ research holder datum.
/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(D.reliability > known.reliability)
known.reliability = D.reliability
return
known_designs += D
return
@@ -144,17 +144,20 @@ research holder datum.
/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.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
/datum/research/proc/UpdateDesigns(var/obj/item/I, var/list/temp_tech)
for(var/T in temp_tech)
if(temp_tech[T] - 1 >= known_tech[T])
for(var/datum/design/D in known_designs)
if(D.req_tech[T])
D.reliability = min(100, D.reliability + prob(35))
if(D.build_path == I.type)
D.reliability = min(100, D.reliability + rand(1,3))
if(I.crit_fail)
D.reliability = min(100, D.reliability + rand(3, 5))
/***************************************************************
+4 -5
View File
@@ -17,10 +17,10 @@
/obj/machinery/r_n_d/server/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/rdserver(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/circuitboard/rdserver(null)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(null)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
RefreshParts()
src.initialize(); //Agouri
@@ -250,7 +250,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()