mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
if(istype(I,/obj/item/weapon/modkit/unathi))
|
||||
user.drop_item()
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\red You painstakingly modify [src] to make it more suitable for a Tajaran user."
|
||||
user << "\red You painstakingly modify [src] to make it more suitable for a Unathi user."
|
||||
new /obj/item/clothing/head/helmet/space/rig/unathi(user.loc)
|
||||
del(I)
|
||||
del(src)
|
||||
|
||||
@@ -60,9 +60,17 @@
|
||||
icon_state = "armor_reflec"
|
||||
item_state = "armor_reflec"
|
||||
blood_overlay_type = "armor"
|
||||
reflect_chance = 40
|
||||
armor = list(melee = 10, bullet = 10, laser = 80, energy = 50, bomb = 0, bio = 0, rad = 0)
|
||||
siemens_coefficient = 0
|
||||
|
||||
/obj/item/clothing/suit/armor/laserproof/IsReflect(var/def_zone)
|
||||
var/hit_reflect_chance = reflect_chance
|
||||
if(!(def_zone in list("chest", "groin"))) //If not shot where ablative is covering you, you don't get the reflection bonus!
|
||||
hit_reflect_chance = 0
|
||||
if (prob(hit_reflect_chance))
|
||||
return 1
|
||||
|
||||
/obj/item/clothing/suit/armor/swat
|
||||
name = "swat suit"
|
||||
desc = "A heavily armored suit that protects against moderate damage. Used in special operations."
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/datum/event/prison_break/start()
|
||||
for(var/area/A in world)
|
||||
if(istype(A, /area/security/prison) || istype(A, /area/security/brig) || istype(A, /area/prison) || istype(A, /area/security/lobby))
|
||||
if(istype(A, /area/security/prison) || istype(A, /area/security/brig) || istype(A, /area/prison) || istype(A, /area/security/permabrig) || istype(A, /area/security/prisonlockers) || istype(A, /area/security/lobby) || istype(A, /area/security/processing))
|
||||
prisonAreas += A
|
||||
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
|
||||
@@ -12,35 +12,31 @@ emp_act
|
||||
|
||||
var/datum/organ/external/organ = get_organ(check_zone(def_zone))
|
||||
|
||||
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
|
||||
if(check_reflect(def_zone)) // Checks if you've passed a reflection% check
|
||||
visible_message("<span class='danger'>The [P.name] gets reflected by [src]!</span>", \
|
||||
"<span class='userdanger'>The [P.name] gets reflected by [src]!</span>")
|
||||
// Find a turf near or on the original location to bounce to
|
||||
if(P.starting)
|
||||
var/new_x = P.starting.x + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/turf/curloc = get_turf(src)
|
||||
|
||||
// redirect the projectile
|
||||
P.original = locate(new_x, new_y, P.z)
|
||||
P.starting = curloc
|
||||
P.current = curloc
|
||||
P.firer = src
|
||||
P.yo = new_y - curloc.y
|
||||
P.xo = new_x - curloc.x
|
||||
|
||||
return -1 // complete projectile permutation
|
||||
|
||||
//Shields
|
||||
if(check_shields(P.damage, "the [P.name]"))
|
||||
P.on_hit(src, 2, def_zone)
|
||||
return 2
|
||||
|
||||
//Laserproof armour
|
||||
if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor/laserproof))
|
||||
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
|
||||
var/reflectchance = 40 - round(P.damage/3)
|
||||
if(!(def_zone in list("chest", "groin")))
|
||||
reflectchance /= 2
|
||||
if(prob(reflectchance))
|
||||
visible_message("\red <B>The [P.name] gets reflected by [src]'s [wear_suit.name]!</B>")
|
||||
|
||||
// Find a turf near or on the original location to bounce to
|
||||
if(P.starting)
|
||||
var/new_x = P.starting.x + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/turf/curloc = get_turf(src)
|
||||
|
||||
// redirect the projectile
|
||||
P.original = locate(new_x, new_y, P.z)
|
||||
P.starting = curloc
|
||||
P.current = curloc
|
||||
P.firer = src
|
||||
P.yo = new_y - curloc.y
|
||||
P.xo = new_x - curloc.x
|
||||
|
||||
return -1 // complete projectile permutation
|
||||
|
||||
//Shrapnel
|
||||
if (P.damage_type == BRUTE)
|
||||
@@ -138,6 +134,20 @@ emp_act
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/check_reflect(var/def_zone) //Reflection checks for anything in your l_hand, r_hand, or wear_suit based on reflect_chance var of the object
|
||||
if(wear_suit && istype(wear_suit, /obj/item/))
|
||||
var/obj/item/I = wear_suit
|
||||
if(I.IsReflect(def_zone) == 1)
|
||||
return 1
|
||||
if(l_hand && istype(l_hand, /obj/item/))
|
||||
var/obj/item/I = l_hand
|
||||
if(I.IsReflect(def_zone) == 1)
|
||||
return 1
|
||||
if(r_hand && istype(r_hand, /obj/item/))
|
||||
var/obj/item/I = r_hand
|
||||
if(I.IsReflect(def_zone) == 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack")
|
||||
if(l_hand && istype(l_hand, /obj/item/weapon))//Current base is the prob(50-d/3)
|
||||
|
||||
@@ -28,6 +28,7 @@ var/list/ai_list = list()
|
||||
var/viewalerts = 0
|
||||
var/lawcheck[1]
|
||||
var/ioncheck[1]
|
||||
var/lawchannel = "Common" // Default channel on which to state laws
|
||||
var/icon/holo_icon//Default is assigned when AI is created.
|
||||
var/obj/item/device/pda/ai/aiPDA = null
|
||||
var/obj/item/device/multitool/aiMulti = null
|
||||
@@ -413,9 +414,12 @@ var/list/ai_list = list()
|
||||
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
|
||||
checklaws()
|
||||
|
||||
if(href_list["say_word"])
|
||||
play_vox_word(href_list["say_word"], null, src)
|
||||
return
|
||||
if (href_list["lawr"]) // Selects on which channel to state laws
|
||||
var/setchannel = input(usr, "Specify channel.", "Channel selection") in list("State","Common","Science","Command","Medical","Engineering","Security","Supply","Binary","Holopad", "Cancel")
|
||||
if(setchannel == "Cancel")
|
||||
return
|
||||
lawchannel = setchannel
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawi"])
|
||||
@@ -427,7 +431,11 @@ var/list/ai_list = list()
|
||||
|
||||
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
|
||||
statelaws()
|
||||
|
||||
|
||||
if(href_list["say_word"])
|
||||
play_vox_word(href_list["say_word"], null, src)
|
||||
return
|
||||
|
||||
if (href_list["track"])
|
||||
var/mob/target = locate(href_list["track"]) in mob_list
|
||||
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
|
||||
|
||||
@@ -51,24 +51,32 @@
|
||||
src.laws_sanity_check()
|
||||
src.laws.clear_supplied_laws()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/statelaws() // -- TLE
|
||||
// set category = "AI Commands"
|
||||
// set name = "State Laws"
|
||||
src.say("Current Active Laws:")
|
||||
/var/prefix = ""
|
||||
switch(lawchannel)
|
||||
if("Common") prefix = ";"
|
||||
if("Science") prefix = ":n "
|
||||
if("Command") prefix = ":c "
|
||||
if("Medical") prefix = ":m "
|
||||
if("Engineering") prefix = ":e "
|
||||
if("Security") prefix = ":s "
|
||||
if("Supply") prefix = ":u "
|
||||
if("Binary") prefix = ":b "
|
||||
if("Holopad") prefix = ":h "
|
||||
else prefix = ""
|
||||
|
||||
src.say("[prefix]Current Active Laws:")
|
||||
|
||||
//src.laws_sanity_check()
|
||||
//src.laws.show_laws(world)
|
||||
var/number = 1
|
||||
sleep(10)
|
||||
|
||||
|
||||
|
||||
if (src.laws.zeroth)
|
||||
if (src.lawcheck[1] == "Yes") //This line and the similar lines below make sure you don't state a law unless you want to. --NeoFite
|
||||
src.say("0. [src.laws.zeroth]")
|
||||
src.say("[prefix]0. [src.laws.zeroth]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= src.laws.ion.len, index++)
|
||||
@@ -76,7 +84,7 @@
|
||||
var/num = ionnum()
|
||||
if (length(law) > 0)
|
||||
if (src.ioncheck[index] == "Yes")
|
||||
src.say("[num]. [law]")
|
||||
src.say("[prefix][num]. [law]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= src.laws.inherent.len, index++)
|
||||
@@ -84,7 +92,7 @@
|
||||
|
||||
if (length(law) > 0)
|
||||
if (src.lawcheck[index+1] == "Yes")
|
||||
src.say("[number]. [law]")
|
||||
src.say("[prefix][number]. [law]")
|
||||
sleep(10)
|
||||
number++
|
||||
|
||||
@@ -95,7 +103,7 @@
|
||||
if (length(law) > 0)
|
||||
if(src.lawcheck.len >= number+1)
|
||||
if (src.lawcheck[number+1] == "Yes")
|
||||
src.say("[number]. [law]")
|
||||
src.say("[prefix][number]. [law]")
|
||||
sleep(10)
|
||||
number++
|
||||
|
||||
@@ -106,8 +114,6 @@
|
||||
|
||||
var/list = "<b>Which laws do you want to include when stating them for the crew?</b><br><br>"
|
||||
|
||||
|
||||
|
||||
if (src.laws.zeroth)
|
||||
if (!src.lawcheck[1])
|
||||
src.lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite
|
||||
@@ -144,6 +150,8 @@
|
||||
src.lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=\ref[src];lawc=[number]'>[src.lawcheck[number+1]] [number]:</A> [law]<BR>"}
|
||||
number++
|
||||
list += {"<br><br><A href='byond://?src=\ref[src];laws=1'>State Laws</A>"}
|
||||
|
||||
list += {"<br><A href='byond://?src=\ref[src];lawr=1'>Channel: [src.lawchannel]</A><br>"}
|
||||
list += {"<A href='byond://?src=\ref[src];laws=1'>State Laws</A>"}
|
||||
|
||||
usr << browse(list, "window=laws")
|
||||
@@ -253,6 +253,10 @@
|
||||
stored_comms["wood"]++
|
||||
stored_comms["wood"]++
|
||||
stored_comms["wood"]++
|
||||
else if(istype(W,/obj/item/weapon/broken_bottle))
|
||||
stored_comms["glass"]++
|
||||
stored_comms["glass"]++
|
||||
stored_comms["glass"]++
|
||||
else
|
||||
continue
|
||||
|
||||
|
||||
@@ -108,3 +108,92 @@
|
||||
if(2)
|
||||
var/datum/ai_laws/lawtype = pick(typesof(/datum/ai_laws/default) - /datum/ai_laws/default)
|
||||
laws = new lawtype()
|
||||
|
||||
/mob/living/silicon/robot/proc/statelaws() // -- TLE
|
||||
// set category = "AI Commands"
|
||||
// set name = "State Laws"
|
||||
src.say("Current Active Laws:")
|
||||
//src.laws_sanity_check()
|
||||
//src.laws.show_laws(world)
|
||||
var/number = 1
|
||||
sleep(10)
|
||||
|
||||
if (src.laws.zeroth)
|
||||
if (src.lawcheck[1] == "Yes") //This line and the similar lines below make sure you don't state a law unless you want to. --NeoFite
|
||||
src.say("0. [src.laws.zeroth]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= src.laws.ion.len, index++)
|
||||
var/law = src.laws.ion[index]
|
||||
var/num = ionnum()
|
||||
if (length(law) > 0)
|
||||
if (src.ioncheck[index] == "Yes")
|
||||
src.say("[num]. [law]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= src.laws.inherent.len, index++)
|
||||
var/law = src.laws.inherent[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if (src.lawcheck[index+1] == "Yes")
|
||||
src.say("[number]. [law]")
|
||||
sleep(10)
|
||||
number++
|
||||
|
||||
|
||||
for (var/index = 1, index <= src.laws.supplied.len, index++)
|
||||
var/law = src.laws.supplied[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if(src.lawcheck.len >= number+1)
|
||||
if (src.lawcheck[number+1] == "Yes")
|
||||
src.say("[number]. [law]")
|
||||
sleep(10)
|
||||
number++
|
||||
|
||||
|
||||
/mob/living/silicon/robot/verb/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
|
||||
set category = "Robot Commands"
|
||||
set name = "State Laws"
|
||||
var/list = "<b>Which laws do you want to include when stating them for the crew?</b><br><br>"
|
||||
|
||||
if (src.laws.zeroth)
|
||||
if (!src.lawcheck[1])
|
||||
src.lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite
|
||||
list += {"<A href='byond://?src=\ref[src];lawc=0'>[src.lawcheck[1]] 0:</A> [src.laws.zeroth]<BR>"}
|
||||
|
||||
for (var/index = 1, index <= src.laws.ion.len, index++)
|
||||
var/law = src.laws.ion[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
|
||||
|
||||
if (!src.ioncheck[index])
|
||||
src.ioncheck[index] = "Yes"
|
||||
list += {"<A href='byond://?src=\ref[src];lawi=[index]'>[src.ioncheck[index]] [ionnum()]:</A> [law]<BR>"}
|
||||
src.ioncheck.len += 1
|
||||
|
||||
var/number = 1
|
||||
for (var/index = 1, index <= src.laws.inherent.len, index++)
|
||||
var/law = src.laws.inherent[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
src.lawcheck.len += 1
|
||||
|
||||
if (!src.lawcheck[number+1])
|
||||
src.lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=\ref[src];lawc=[number]'>[src.lawcheck[number+1]] [number]:</A> [law]<BR>"}
|
||||
number++
|
||||
|
||||
for (var/index = 1, index <= src.laws.supplied.len, index++)
|
||||
var/law = src.laws.supplied[index]
|
||||
if (length(law) > 0)
|
||||
src.lawcheck.len += 1
|
||||
if (!src.lawcheck[number+1])
|
||||
src.lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=\ref[src];lawc=[number]'>[src.lawcheck[number+1]] [number]:</A> [law]<BR>"}
|
||||
number++
|
||||
|
||||
list += {"<br><br><A href='byond://?src=\ref[src];laws=1'>State Laws</A>"}
|
||||
|
||||
usr << browse(list, "window=laws")
|
||||
@@ -63,6 +63,8 @@
|
||||
var/weapon_lock = 0
|
||||
var/weaponlock_time = 120
|
||||
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
|
||||
var/lawcheck[1] //For stating laws.
|
||||
var/ioncheck[1] //Ditto.
|
||||
var/lockcharge //Used when locking down a borg to preserve cell charge
|
||||
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
|
||||
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
|
||||
@@ -565,7 +567,11 @@
|
||||
..()
|
||||
if (istype(AM, /obj/machinery/recharge_station))
|
||||
var/obj/machinery/recharge_station/F = AM
|
||||
F.move_inside()
|
||||
if(F.panel_open)
|
||||
usr << "\blue <b>Close the maintenance panel first.</b>"
|
||||
return
|
||||
else
|
||||
F.move_inside()
|
||||
if (!istype(AM, /atom/movable))
|
||||
return
|
||||
if (!now_pushing)
|
||||
@@ -1228,6 +1234,25 @@
|
||||
else
|
||||
src << "Module isn't activated"
|
||||
installed_modules()
|
||||
|
||||
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawc"])
|
||||
switch(lawcheck[L+1])
|
||||
if ("Yes") lawcheck[L+1] = "No"
|
||||
if ("No") lawcheck[L+1] = "Yes"
|
||||
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawi"])
|
||||
switch(ioncheck[L])
|
||||
if ("Yes") ioncheck[L] = "No"
|
||||
if ("No") ioncheck[L] = "Yes"
|
||||
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
|
||||
checklaws()
|
||||
|
||||
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
|
||||
statelaws()
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/radio_menu()
|
||||
|
||||
@@ -235,6 +235,7 @@
|
||||
src.modules += new /obj/item/weapon/melee/baton/robot(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
|
||||
src.modules += new /obj/item/taperoll/police(src)
|
||||
src.modules += new /obj/item/device/taperecorder(src)
|
||||
src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
|
||||
return
|
||||
|
||||
@@ -299,6 +300,7 @@
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/weapon/pen/robopen(src)
|
||||
src.modules += new /obj/item/weapon/form_printer(src)
|
||||
src.modules += new /obj/item/device/taperecorder(src)
|
||||
src.modules += new /obj/item/weapon/gripper/paperwork(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/stamp/denied(src)
|
||||
@@ -395,6 +397,7 @@
|
||||
src.modules += new /obj/item/weapon/gripper(src)
|
||||
src.modules += new /obj/item/weapon/matter_decompiler(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
|
||||
src.modules += new /obj/item/weapon/soap(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
|
||||
src.emag.name = "Plasma Cutter"
|
||||
|
||||
@@ -56,6 +56,7 @@ display round(lastgen) and plasmatank amount
|
||||
var/open = 0
|
||||
var/recent_fault = 0
|
||||
var/power_output = 1
|
||||
var/consumption = 0
|
||||
|
||||
/obj/machinery/power/port_gen/proc/HasFuel() //Placeholder for fuel check.
|
||||
return 1
|
||||
@@ -101,7 +102,7 @@ display round(lastgen) and plasmatank amount
|
||||
var/sheet_path = /obj/item/stack/sheet/mineral/plasma
|
||||
var/board_path = "/obj/item/weapon/circuitboard/pacman"
|
||||
var/sheet_left = 0 // How much is left of the sheet
|
||||
var/time_per_sheet = 40
|
||||
var/time_per_sheet = 260
|
||||
var/heat = 0
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/initialize()
|
||||
@@ -114,8 +115,8 @@ display round(lastgen) and plasmatank amount
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new board_path(src)
|
||||
var/obj/sheet = new sheet_path(null)
|
||||
@@ -128,16 +129,16 @@ 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
|
||||
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))
|
||||
else
|
||||
consumption_coeff += SP.rating
|
||||
power_gen = round(initial(power_gen) * temp_rating * 2)
|
||||
consumption = consumption_coeff
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/examine()
|
||||
..()
|
||||
@@ -160,7 +161,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 +176,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)
|
||||
@@ -191,7 +192,6 @@ display round(lastgen) and plasmatank amount
|
||||
return
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/handleInactive()
|
||||
|
||||
if (heat > 0)
|
||||
heat = max(heat - 2, 0)
|
||||
src.updateDialog()
|
||||
@@ -215,45 +215,29 @@ display round(lastgen) and plasmatank amount
|
||||
emagged = 1
|
||||
emp_act(1)
|
||||
else if(!active)
|
||||
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
|
||||
if(!anchored)
|
||||
if(!anchored && !isinspace())
|
||||
connect_to_network()
|
||||
user << "\blue You secure the generator to the floor."
|
||||
anchored = 1
|
||||
else
|
||||
disconnect_from_network()
|
||||
user << "\blue You unsecure the generator from the floor."
|
||||
anchored = 0
|
||||
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(O, /obj/item/weapon/screwdriver))
|
||||
open = !open
|
||||
panel_open = !panel_open
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(open)
|
||||
user << "\blue You open the access panel."
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>You open the access panel.</span>"
|
||||
else
|
||||
user << "\blue You close the access panel."
|
||||
else if(istype(O, /obj/item/weapon/crowbar) && open)
|
||||
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
for(var/obj/item/I in component_parts)
|
||||
if(I.reliability < 100)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
while ( sheets > 0 )
|
||||
var/obj/item/stack/sheet/G = new sheet_path(src.loc)
|
||||
|
||||
if ( sheets > 50 )
|
||||
G.amount = 50
|
||||
else
|
||||
G.amount = sheets
|
||||
|
||||
sheets -= G.amount
|
||||
|
||||
new_frame.state = 2
|
||||
new_frame.icon_state = "box_1"
|
||||
del(src)
|
||||
user << "<span class='notice'>You close the access panel.</span>"
|
||||
else if(istype(O, /obj/item/weapon/storage/part_replacer) && panel_open)
|
||||
exchange_parts(user, O)
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/crowbar) && panel_open)
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob)
|
||||
..()
|
||||
|
||||
+158
-12
@@ -22,6 +22,8 @@
|
||||
var/chargemode = 0
|
||||
var/chargecount = 0
|
||||
var/chargelevel = 50000
|
||||
var/input_level_max = 200000 // cap on input_level
|
||||
var/output_level_max = 200000 // cap on output_level
|
||||
var/online = 1
|
||||
var/name_tag = null
|
||||
var/obj/machinery/power/terminal/terminal = null
|
||||
@@ -29,6 +31,16 @@
|
||||
|
||||
/obj/machinery/power/smes/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/smes(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
spawn(5)
|
||||
if(!powernet)
|
||||
connect_to_network()
|
||||
@@ -49,7 +61,17 @@
|
||||
updateicon()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/smes/RefreshParts()
|
||||
var/IO = 0
|
||||
var/C = 0
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/CP in component_parts)
|
||||
IO += CP.rating
|
||||
input_level_max = 200000 * IO
|
||||
output_level_max = 200000 * IO
|
||||
for(var/obj/item/weapon/cell/PC in component_parts)
|
||||
C += PC.maxcharge
|
||||
capacity = C / (15000) * 1e6
|
||||
|
||||
/obj/machinery/power/smes/proc/updateicon()
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN) return
|
||||
@@ -85,15 +107,139 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/smes/attackby(obj/item/I, mob/user)
|
||||
//opening using screwdriver
|
||||
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//changing direction using wrench
|
||||
if(default_change_direction_wrench(user, I))
|
||||
terminal = null
|
||||
var/turf/T = get_step(src, dir)
|
||||
for(var/obj/machinery/power/terminal/term in T)
|
||||
if(term && term.dir == turn(dir, 180))
|
||||
terminal = term
|
||||
terminal.master = src
|
||||
user << "<span class='notice'>Terminal found.</span>"
|
||||
break
|
||||
if(!terminal)
|
||||
user << "<span class='alert'>No power source found.</span>"
|
||||
return
|
||||
stat &= ~BROKEN
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//exchanging parts using the RPE
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
//building and linking a terminal
|
||||
if(istype(I, /obj/item/stack/cable_coil))
|
||||
var/dir = get_dir(user,src)
|
||||
if(dir & (dir-1))//we don't want diagonal click
|
||||
return
|
||||
|
||||
if(terminal) //is there already a terminal ?
|
||||
user << "<span class='alert'>This SMES already have a power terminal!</span>"
|
||||
return
|
||||
|
||||
if(!panel_open) //is the panel open ?
|
||||
user << "<span class='alert'>You must open the maintenance panel first!</span>"
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
if (T.intact) //is the floor plating removed ?
|
||||
user << "<span class='alert'>You must first remove the floor plating!</span>"
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
if(C.amount < 10)
|
||||
user << "<span class='alert'>You need more wires.</span>"
|
||||
return
|
||||
|
||||
user << "You start building the power terminal..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 20) && C.amount >= 10)
|
||||
var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
|
||||
if (prob(50) && electrocute_mob(usr, N, N)) //animate the electrocution if uncautious and unlucky
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
C.use(10)
|
||||
user.visible_message(\
|
||||
"<span class='alert'>[user.name] has built a power terminal!</span>",\
|
||||
"You build the power terminal.")
|
||||
|
||||
//build the terminal and link it to the network
|
||||
make_terminal(T)
|
||||
terminal.connect_to_network()
|
||||
return
|
||||
|
||||
//disassembling the terminal
|
||||
if(istype(I, /obj/item/weapon/wirecutters) && terminal && panel_open)
|
||||
var/turf/T = get_turf(terminal)
|
||||
if (T.intact) //is the floor plating removed ?
|
||||
user << "<span class='alert'>You must first expose the power terminal!</span>"
|
||||
return
|
||||
|
||||
user << "You begin to dismantle the power terminal..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 50))
|
||||
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) //animate the electrocution if uncautious and unlucky
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
//give the wires back and delete the terminal
|
||||
new /obj/item/stack/cable_coil(T,10)
|
||||
user.visible_message(\
|
||||
"<span class='alert'>[user.name] cuts the cables and dismantles the power terminal.</span>",\
|
||||
"You cut the cables and dismantle the power terminal.")
|
||||
charging = 0 //stop inputting, since we have don't have a terminal anymore
|
||||
del(terminal)
|
||||
return
|
||||
|
||||
//crowbarring it !
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
/obj/machinery/power/smes/Destroy()
|
||||
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
var/area/area = get_area(src)
|
||||
message_admins("SMES deleted at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
|
||||
log_game("SMES deleted at ([area.name])")
|
||||
investigate_log("<font color='red'>deleted</font> at ([area.name])","singulo")
|
||||
if(terminal)
|
||||
disconnect_terminal()
|
||||
..()
|
||||
|
||||
// create a terminal object pointing towards the SMES
|
||||
// wires will attach to this
|
||||
/obj/machinery/power/smes/proc/make_terminal(var/turf/T)
|
||||
terminal = new/obj/machinery/power/terminal(T)
|
||||
terminal.dir = get_dir(T,src)
|
||||
terminal.master = src
|
||||
|
||||
/obj/machinery/power/smes/proc/disconnect_terminal()
|
||||
if(terminal)
|
||||
terminal.master = null
|
||||
terminal = null
|
||||
|
||||
/obj/machinery/power/smes/proc/chargedisplay()
|
||||
return round(5.5*charge/(capacity ? capacity : 5e6))
|
||||
return round(5.5*charge/capacity)
|
||||
|
||||
#define SMESRATE 0.05 // rate of internal charge to external power
|
||||
|
||||
|
||||
/obj/machinery/power/smes/process()
|
||||
|
||||
if(stat & BROKEN) return
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
//store machine state to see if we need to update the icon overlays
|
||||
var/last_disp = chargedisplay()
|
||||
@@ -205,10 +351,10 @@
|
||||
data["charging"] = charging
|
||||
data["chargeMode"] = chargemode
|
||||
data["chargeLevel"] = chargelevel
|
||||
data["chargeMax"] = SMESMAXCHARGELEVEL
|
||||
data["chargeMax"] = input_level_max
|
||||
data["outputOnline"] = online
|
||||
data["outputLevel"] = output
|
||||
data["outputMax"] = SMESMAXOUTPUT
|
||||
data["outputMax"] = output_level_max
|
||||
data["outputLoad"] = round(loaddemand)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
@@ -254,20 +400,20 @@
|
||||
if("min")
|
||||
chargelevel = 0
|
||||
if("max")
|
||||
chargelevel = SMESMAXCHARGELEVEL //30000
|
||||
chargelevel = input_level_max //30000
|
||||
if("set")
|
||||
chargelevel = input(usr, "Enter new input level (0-[SMESMAXCHARGELEVEL])", "SMES Input Power Control", chargelevel) as num
|
||||
chargelevel = max(0, min(SMESMAXCHARGELEVEL, chargelevel)) // clamp to range
|
||||
chargelevel = input(usr, "Enter new input level (0-[input_level_max])", "SMES Input Power Control", chargelevel) as num
|
||||
chargelevel = max(0, min(input_level_max, chargelevel)) // clamp to range
|
||||
|
||||
else if( href_list["output"] )
|
||||
switch( href_list["output"] )
|
||||
if("min")
|
||||
output = 0
|
||||
if("max")
|
||||
output = SMESMAXOUTPUT //30000
|
||||
output = output_level_max //30000
|
||||
if("set")
|
||||
output = input(usr, "Enter new output level (0-[SMESMAXOUTPUT])", "SMES Output Power Control", output) as num
|
||||
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
|
||||
output = input(usr, "Enter new output level (0-[output_level_max])", "SMES Output Power Control", output) as num
|
||||
output = max(0, min(output_level_max, output)) // clamp to range
|
||||
|
||||
investigate_log("input/output; [chargelevel>output?"<font color='green'>":"<font color='red'>"][chargelevel]/[output]</font> | Output-mode: [online?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [chargemode?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
|
||||
|
||||
|
||||
@@ -118,7 +118,8 @@
|
||||
name = "\improper Bulldog shotgun"
|
||||
desc = "A compact, mag-fed semi-automatic shotgun for combat in narrow corridors. Compatible only with specialized magazines."
|
||||
icon_state = "bulldog"
|
||||
item_state = "c20r"
|
||||
item_state = "bulldog"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
w_class = 3.0
|
||||
origin_tech = "combat=5;materials=4;syndicate=6"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m12g"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode."
|
||||
var/list/broken_requirements = list()
|
||||
var/broken_on_spawn = 0
|
||||
var/recharge_delay = 15
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/recharge()
|
||||
@@ -48,7 +49,7 @@
|
||||
|
||||
if(recharged < 0)
|
||||
recharge()
|
||||
recharged = 15
|
||||
recharged = recharge_delay
|
||||
else
|
||||
recharged -= 1
|
||||
|
||||
@@ -180,7 +181,8 @@
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
B.loc = loc
|
||||
beaker = null
|
||||
icon_state = initial(icon_state)
|
||||
if(!panel_open)
|
||||
icon_state = initial(icon_state)
|
||||
add_fingerprint(usr)
|
||||
return 1 // update UIs attached to this object
|
||||
|
||||
@@ -266,6 +268,84 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/chem_dispenser/constructable
|
||||
name = "portable chem dispenser"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "minidispenser"
|
||||
energy = 5
|
||||
max_energy = 5
|
||||
amount = 5
|
||||
recharge_delay = 30
|
||||
dispensable_reagents = list()
|
||||
var/list/special_reagents = list(list("hydrogen", "oxygen", "silicon", "phosphorus", "sulfur", "carbon", "nitrogen"),
|
||||
list("lithium", "sugar", "sacid", "water", "copper", "mercury", "sodium"),
|
||||
list("ethanol", "chlorine", "potassium", "aluminium", "radium", "fluorine", "iron"))
|
||||
|
||||
/obj/machinery/chem_dispenser/constructable/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(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/capacitor(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/weapon/cell/super(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/chem_dispenser/constructable/RefreshParts()
|
||||
var/time = 0
|
||||
var/temp_energy = 0
|
||||
var/i
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
temp_energy += M.rating
|
||||
temp_energy--
|
||||
max_energy = temp_energy * 5 //max energy = (bin1.rating + bin2.rating - 1) * 5, 5 on lowest 25 on highest
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
time += C.rating
|
||||
for(var/obj/item/weapon/cell/P in component_parts)
|
||||
time += round(P.maxcharge, 10000) / 10000
|
||||
recharge_delay /= time/2 //delay between recharges, double the usual time on lowest 50% less than usual on highest
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
for(i=1, i<=M.rating, i++)
|
||||
dispensable_reagents = sortList(dispensable_reagents | special_reagents[i])
|
||||
|
||||
/obj/machinery/chem_dispenser/constructable/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass))
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
..()
|
||||
else
|
||||
..()
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
user << "<span class='caution'>The [src] can now be moved.</span>"
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
user << "<span class='caution'>The [src] is now secured.</span>"
|
||||
|
||||
if(panel_open)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
B.loc = loc
|
||||
beaker = null
|
||||
default_deconstruction_crowbar(I)
|
||||
return 1
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/chem_master
|
||||
name = "ChemMaster 3000"
|
||||
density = 1
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|
||||
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink))
|
||||
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/portable_atmospherics/hydroponics))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/effect/proc_holder/spell))
|
||||
|
||||
@@ -14,6 +14,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
var/diamond_amount = 0
|
||||
var/uranium_amount = 0
|
||||
var/max_material_amount = 75000.0
|
||||
var/efficiency_coeff
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -36,7 +37,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 = 2 ** (T - 1) //Only 1 manipulator here, you're making runtimes Razharas
|
||||
|
||||
blob_act()
|
||||
if (prob(50))
|
||||
@@ -52,33 +56,19 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
if (!opened)
|
||||
opened = 1
|
||||
if (default_deconstruction_screwdriver(user, "circuit_imprinter_t", "circuit_imprinter", O))
|
||||
if(linked_console)
|
||||
linked_console.linked_imprinter = null
|
||||
linked_console = null
|
||||
icon_state = "circuit_imprinter_t"
|
||||
user << "You open the maintenance hatch of [src]."
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "circuit_imprinter"
|
||||
user << "You close the maintenance hatch of [src]."
|
||||
return
|
||||
if (opened)
|
||||
|
||||
if (panel_open)
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
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(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
reagents.trans_to(I, reagents.total_volume)
|
||||
if(I.reliability != 100 && crit_fail)
|
||||
I.crit_fail = 1
|
||||
I.loc = src.loc
|
||||
if(g_amount >= 3750)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(g_amount / 3750)
|
||||
@@ -91,7 +81,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
if(uranium_amount >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc)
|
||||
G.amount = round(uranium_amount / 2000)
|
||||
del(src)
|
||||
default_deconstruction_crowbar(O)
|
||||
return 1
|
||||
else
|
||||
user << "\red You can't load the [src.name] while it's opened."
|
||||
|
||||
@@ -142,7 +142,7 @@ datum/design/scan_console
|
||||
build_path = "/obj/item/weapon/circuitboard/scan_consolenew"
|
||||
|
||||
datum/design/comconsole
|
||||
name = "Circuit Design (Communications)"
|
||||
name = "Circuit Design (Communications Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a communications console."
|
||||
id = "comconsole"
|
||||
req_tech = list("programming" = 2, "magnets" = 2)
|
||||
@@ -160,7 +160,7 @@ datum/design/idcardconsole
|
||||
build_path = "/obj/item/weapon/circuitboard/card"
|
||||
|
||||
datum/design/crewconsole
|
||||
name = "Circuit Design (Crew monitoring computer)"
|
||||
name = "Circuit Design (Crew Monitoring Computer)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Crew monitoring computer."
|
||||
id = "crewconsole"
|
||||
req_tech = list("programming" = 3, "magnets" = 2, "biotech" = 2)
|
||||
@@ -243,7 +243,7 @@ datum/design/clonecontrol
|
||||
build_path = "/obj/item/weapon/circuitboard/cloning"
|
||||
|
||||
datum/design/clonepod
|
||||
name = "Circuit Design (Clone Pod)"
|
||||
name = "Circuit Design (Cloning Pod)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Cloning Pod."
|
||||
id = "clonepod"
|
||||
req_tech = list("programming" = 3, "biotech" = 3)
|
||||
@@ -260,10 +260,82 @@ datum/design/clonescanner
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/clonescanner"
|
||||
|
||||
datum/design/teleport_station
|
||||
name = "Circuit Design (Teleportation Station Board)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Teleporter Station."
|
||||
id = "tele_station"
|
||||
req_tech = list("programming" = 4, "bluespace" = 4, "engineering" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/teleporter_station
|
||||
|
||||
datum/design/teleport_hub
|
||||
name = "Circuit Design (Teleportation Hub Board)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Teleportation Hub."
|
||||
id = "tele_hub"
|
||||
req_tech = list("programming" = 3, "bluespace" = 5, "materials" = 4, "engineering" = 5)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/teleporter_hub
|
||||
|
||||
datum/design/telepad
|
||||
name = "Circuit Design (Telepad Board)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Telepad."
|
||||
id = "telepad"
|
||||
req_tech = list("programming" = 4, "bluespace" = 4, "materials" = 3, "engineering" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/telesci_pad"
|
||||
|
||||
datum/design/sleeper
|
||||
name = "Circuit Design (Sleeper Board)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Sleeper."
|
||||
id = "sleeper"
|
||||
req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3, "engineering" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/sleeper"
|
||||
|
||||
datum/design/sleep_console
|
||||
name = "Circuit Design (Sleeper Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Sleeper Console."
|
||||
id = "sleeper"
|
||||
req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3, "engineering" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/sleep_console"
|
||||
|
||||
datum/design/bodyscanner
|
||||
name = "Circuit Design (Body Scanner Board)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Body Scanner."
|
||||
id = "sleeper"
|
||||
req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3, "engineering" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/bodyscanner"
|
||||
|
||||
datum/design/sleep_console
|
||||
name = "Circuit Design (Body Scanner Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Body Scanner Console."
|
||||
id = "sleeper"
|
||||
req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3, "engineering" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/bodyscanner_console"
|
||||
|
||||
datum/design/cryotube
|
||||
name = "Circuit Design (Cryotube Board)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Cryotube."
|
||||
id = "cryotube"
|
||||
req_tech = list("programming" = 4, "biotech" = 3, "engineering" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/cryo_tube"
|
||||
|
||||
datum/design/arcadebattle
|
||||
name = "Circuit Design (Battle Arcade Machine)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new arcade machine."
|
||||
id = "arcademachine"
|
||||
id = "arcademachinebattle"
|
||||
req_tech = list("programming" = 1)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
@@ -272,7 +344,7 @@ datum/design/arcadebattle
|
||||
datum/design/orion_trail
|
||||
name = "Circuit Design (Orion Trail Arcade Machine)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new Orion Trail machine."
|
||||
id = "arcademachine"
|
||||
id = "arcademachineonion"
|
||||
req_tech = list("programming" = 2)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
@@ -333,8 +405,8 @@ datum/design/rdconsole
|
||||
build_path = "/obj/item/weapon/circuitboard/rdconsole"
|
||||
|
||||
datum/design/ordercomp
|
||||
name = "Circuit Design (Supply ordering console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Supply ordering console."
|
||||
name = "Circuit Design (Supply Ordering Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a supply ordering console."
|
||||
id = "ordercomp"
|
||||
req_tech = list("programming" = 2)
|
||||
build_type = IMPRINTER
|
||||
@@ -342,8 +414,8 @@ datum/design/ordercomp
|
||||
build_path = "/obj/item/weapon/circuitboard/ordercomp"
|
||||
|
||||
datum/design/supplycomp
|
||||
name = "Circuit Design (Supply shuttle console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Supply shuttle console."
|
||||
name = "Circuit Design (Supply Shuttle Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a supply shuttle console."
|
||||
id = "supplycomp"
|
||||
req_tech = list("programming" = 3)
|
||||
build_type = IMPRINTER
|
||||
@@ -377,6 +449,24 @@ datum/design/message_monitor
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/message_monitor"
|
||||
|
||||
datum/design/comm_traffic
|
||||
name = "Circuit Design (Telecommunications Traffic Control Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a telecommunications traffic control console."
|
||||
id = "comm_traffic"
|
||||
req_tech = list("programming" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/comm_traffic"
|
||||
|
||||
datum/design/telesci_console
|
||||
name = "Circuit Design (Telepad Control Console Board)"
|
||||
desc = "Allows for the construction of circuit boards used to build a telescience console."
|
||||
id = "telesci_console"
|
||||
req_tech = list("programming" = 3, "bluespace" = 2)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/telesci_console"
|
||||
|
||||
datum/design/aifixer
|
||||
name = "Circuit Design (AI Integrity Restorer)"
|
||||
desc = "Allows for the construction of circuit boards used to build an AI Integrity Restorer."
|
||||
@@ -1235,6 +1325,59 @@ datum/design/light_replacer
|
||||
////////////////////////////////////////
|
||||
//////////////MISC Boards///////////////
|
||||
////////////////////////////////////////
|
||||
datum/design/smes
|
||||
name = "SMES Board"
|
||||
desc = "The circuit board for a SMES."
|
||||
id = "smes"
|
||||
req_tech = list("programming" = 4, "power" = 5, "engineering" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/smes
|
||||
|
||||
datum/design/thermomachine
|
||||
name = "Freezer/Heater Board"
|
||||
desc = "The circuit board for a freezer/heater."
|
||||
id = "thermomachine"
|
||||
req_tech = list("programming" = 3, "plasmatech" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/thermomachine
|
||||
|
||||
datum/design/biogenerator
|
||||
name = "Biogenerator Board"
|
||||
desc = "The circuit board for a biogenerator."
|
||||
id = "biogenerator"
|
||||
req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/biogenerator
|
||||
|
||||
datum/design/hydroponics
|
||||
name = "Hydroponics Tray Board"
|
||||
desc = "The circuit board for a hydroponics tray."
|
||||
id = "hydro_tray"
|
||||
req_tech = list("programming" = 1, "biotech" = 1)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/hydroponics
|
||||
|
||||
datum/design/microwave
|
||||
name = "Microwave Board"
|
||||
desc = "The circuit board for a microwave."
|
||||
id = "microwave"
|
||||
req_tech = list("programming" = 1)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/microwave"
|
||||
|
||||
datum/design/chem_dispenser
|
||||
name = "Portable Chem Dispenser Board"
|
||||
desc = "The circuit board for a portable chem dispenser."
|
||||
id = "chem_dispenser"
|
||||
req_tech = list("programming" = 4, "biotech" = 3, "engineering" = 4, "materials" = 4, "plasmatech" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/chem_dispenser"
|
||||
|
||||
datum/design/destructive_analyzer
|
||||
name = "Destructive Analyzer Board"
|
||||
@@ -1299,7 +1442,33 @@ datum/design/mechfab
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/mechfab"
|
||||
|
||||
|
||||
datum/design/cyborgrecharger
|
||||
name = "Cyborg Recharger Board"
|
||||
desc = "The circuit board for a Cyborg Recharger."
|
||||
id = "cyborgrecharger"
|
||||
req_tech = list("powerstorage" = 3, "engineering" = 3)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/cyborgrecharger"
|
||||
|
||||
datum/design/mech_recharger
|
||||
name = "Mech Bay Recharger Board"
|
||||
desc = "The circuit board for a Mech Bay Recharger."
|
||||
id = "mech_recharger"
|
||||
req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/mech_recharger"
|
||||
|
||||
datum/design/vendor
|
||||
name = "Vendor Board"
|
||||
desc = "The circuit board for a Vendor."
|
||||
id = "vendor"
|
||||
req_tech = list("programming" = 1)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/vendor"
|
||||
|
||||
/////////////////////////////////////////
|
||||
////////////Power Stuff//////////////////
|
||||
/////////////////////////////////////////
|
||||
@@ -1334,7 +1503,6 @@ datum/design/mrspacman
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/pacman/mrs"
|
||||
|
||||
|
||||
/////////////////////////////////////////
|
||||
////////////Medical Tools////////////////
|
||||
/////////////////////////////////////////
|
||||
@@ -1865,8 +2033,7 @@ datum/design/telepad_beacon
|
||||
build_type = PROTOLATHE
|
||||
materials = list ("$metal" = 2000, "$glass" = 1750, "$silver" = 500)
|
||||
build_path = "/obj/item/device/telepad_beacon"
|
||||
|
||||
|
||||
|
||||
datum/design/bag_holding
|
||||
name = "Bag of Holding"
|
||||
desc = "A backpack that opens into a localized pocket of Blue Space."
|
||||
@@ -1876,6 +2043,25 @@ datum/design/bag_holding
|
||||
materials = list("$gold" = 3000, "$diamond" = 1500, "$uranium" = 250)
|
||||
reliability_base = 80
|
||||
build_path = "/obj/item/weapon/storage/backpack/holding"
|
||||
|
||||
datum/design/bluespace_crystal
|
||||
name = "Artificial Bluespace Crystal"
|
||||
desc = "A small blue crystal with mystical properties."
|
||||
id = "bluespace_crystal"
|
||||
req_tech = list("bluespace" = 4, "materials" = 6)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$gold" = 1500, "$diamond" = 3000, "$plasma" = 1500)
|
||||
reliability_base = 100
|
||||
build_path = "/obj/item/bluespace_crystal/artificial"
|
||||
|
||||
datum/design/telesci_sps
|
||||
name = "SPS Device"
|
||||
desc = "A device that can track its position at all times."
|
||||
id = "telesci_sps"
|
||||
req_tech = list("materials" = 2, "magnets" = 3, "bluespace" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 500, "$glass" = 1000)
|
||||
build_path = /obj/item/device/sps
|
||||
|
||||
/////////////////////////////////////////
|
||||
/////////////////HUDs////////////////////
|
||||
|
||||
@@ -11,7 +11,7 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
name = "Destructive Analyzer"
|
||||
icon_state = "d_analyzer"
|
||||
var/obj/item/weapon/loaded_item = null
|
||||
var/decon_mod = 1
|
||||
var/decon_mod = 0
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/New()
|
||||
..()
|
||||
@@ -24,9 +24,8 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
|
||||
/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 = between (0, T, 1)
|
||||
for(var/obj/item/weapon/stock_parts/S in component_parts)
|
||||
T += S.rating
|
||||
decon_mod = T
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/meteorhit()
|
||||
@@ -43,28 +42,20 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
/obj/machinery/r_n_d/destructive_analyzer/attackby(var/obj/O as obj, var/mob/user as mob)
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
if (!opened)
|
||||
opened = 1
|
||||
if (default_deconstruction_screwdriver(user, "d_analyzer_t", "d_analyzer", O))
|
||||
if(linked_console)
|
||||
linked_console.linked_destroy = null
|
||||
linked_console = null
|
||||
icon_state = "d_analyzer_t"
|
||||
user << "You open the maintenance hatch of [src]."
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "d_analyzer"
|
||||
user << "You close the maintenance hatch of [src]."
|
||||
return
|
||||
if (opened)
|
||||
return 1
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return 1
|
||||
|
||||
if (panel_open)
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
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)
|
||||
I.loc = src.loc
|
||||
del(src)
|
||||
default_deconstruction_crowbar(O)
|
||||
return 1
|
||||
else
|
||||
user << "\red You can't load the [src.name] while it's opened."
|
||||
|
||||
@@ -22,6 +22,7 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
var/uranium_amount = 0.0
|
||||
var/diamond_amount = 0.0
|
||||
var/clown_amount = 0.0
|
||||
var/efficiency_coeff
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/New()
|
||||
@@ -50,33 +51,30 @@ 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/3)
|
||||
efficiency_coeff = max(T, 1)
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
shock(user,50)
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return 1
|
||||
|
||||
if (O.is_open_container())
|
||||
return
|
||||
return 1
|
||||
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
if (!opened)
|
||||
opened = 1
|
||||
if (default_deconstruction_screwdriver(user, "protolathe_t", "protolathe", O))
|
||||
if(linked_console)
|
||||
linked_console.linked_lathe = null
|
||||
linked_console.linked_imprinter = null
|
||||
linked_console = null
|
||||
icon_state = "protolathe_t"
|
||||
user << "You open the maintenance hatch of [src]."
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "protolathe"
|
||||
user << "You close the maintenance hatch of [src]."
|
||||
return
|
||||
if (opened)
|
||||
return 1
|
||||
|
||||
if (panel_open)
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
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(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
reagents.trans_to(I, reagents.total_volume)
|
||||
@@ -110,7 +108,7 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
if(clown_amount >= 2000)
|
||||
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc)
|
||||
G.amount = round(clown_amount / G.perunit)
|
||||
del(src)
|
||||
default_deconstruction_crowbar(O)
|
||||
return 1
|
||||
else
|
||||
user << "\red You can't load the [src.name] while it's opened."
|
||||
|
||||
@@ -274,7 +274,7 @@ 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)))
|
||||
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])
|
||||
@@ -349,7 +349,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.id == href_list["build"])
|
||||
being_built = D
|
||||
break
|
||||
break
|
||||
if(being_built)
|
||||
var/power = 2000
|
||||
for(var/M in being_built.materials)
|
||||
@@ -358,6 +358,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
screen = 0.3
|
||||
linked_lathe.busy = 1
|
||||
flick("protolathe_n",linked_lathe)
|
||||
var/prot_efficiency = linked_lathe.efficiency_coeff
|
||||
var/key = usr.key //so we don't lose the info during the spawn delay
|
||||
spawn(16)
|
||||
use_power(power)
|
||||
@@ -365,25 +366,25 @@ 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("$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] / prot_efficiency)))
|
||||
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] / prot_efficiency)))
|
||||
if("$plasteel")
|
||||
linked_lathe.plasteel_amount = max(0, (linked_lathe.plasteel_amount-being_built.materials[M]))
|
||||
linked_lathe.plasteel_amount = max(0, (linked_lathe.plasteel_amount - (being_built.materials[M] / prot_efficiency)))
|
||||
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] / prot_efficiency)))
|
||||
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] / prot_efficiency)))
|
||||
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] / prot_efficiency)))
|
||||
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] / prot_efficiency)))
|
||||
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] / prot_efficiency)))
|
||||
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] / prot_efficiency)))
|
||||
else
|
||||
linked_lathe.reagents.remove_reagent(M, being_built.materials[M])
|
||||
linked_lathe.reagents.remove_reagent(M, (being_built.materials[M] / prot_efficiency))
|
||||
|
||||
if(being_built.build_path)
|
||||
var/obj/new_item = new being_built.build_path(src)
|
||||
@@ -416,20 +417,21 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
screen = 0.4
|
||||
linked_imprinter.busy = 1
|
||||
flick("circuit_imprinter_ani",linked_imprinter)
|
||||
var/imprinter_efficiency = linked_imprinter.efficiency_coeff
|
||||
spawn(16)
|
||||
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.g_amount = max(0, linked_imprinter.g_amount - (being_built.materials[M] / imprinter_efficiency))
|
||||
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] / imprinter_efficiency))
|
||||
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] / imprinter_efficiency))
|
||||
if("$uranium")
|
||||
linked_imprinter.uranium_amount = max(0, (linked_imprinter.uranium_amount-being_built.materials[M]))
|
||||
linked_imprinter.uranium_amount = max(0, linked_imprinter.uranium_amount - (being_built.materials[M] / imprinter_efficiency))
|
||||
else
|
||||
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M])
|
||||
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M] / imprinter_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)
|
||||
@@ -728,28 +730,30 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
continue
|
||||
var/temp_dat = "[D.name]"
|
||||
var/check_materials = 1
|
||||
var/prot_efficiency = linked_lathe.efficiency_coeff
|
||||
for(var/M in D.materials)
|
||||
temp_dat += " [D.materials[M]] [CallMaterialName(M)]"
|
||||
var neededmaterials = (D.materials[M] / prot_efficiency)
|
||||
temp_dat += " [neededmaterials] [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] / prot_efficiency) > linked_lathe.g_amount) check_materials = 0
|
||||
if("$metal")
|
||||
if(D.materials[M] > linked_lathe.m_amount) check_materials = 0
|
||||
if((D.materials[M] / prot_efficiency) > linked_lathe.m_amount) check_materials = 0
|
||||
if("$plasteel")
|
||||
if(D.materials[M] > linked_lathe.plasteel_amount) check_materials = 0
|
||||
if((D.materials[M] / prot_efficiency) > linked_lathe.plasteel_amount) check_materials = 0
|
||||
if("$gold")
|
||||
if(D.materials[M] > linked_lathe.gold_amount) check_materials = 0
|
||||
if((D.materials[M] / prot_efficiency) > linked_lathe.gold_amount) check_materials = 0
|
||||
if("$silver")
|
||||
if(D.materials[M] > linked_lathe.silver_amount) check_materials = 0
|
||||
if((D.materials[M] / prot_efficiency) > linked_lathe.silver_amount) check_materials = 0
|
||||
if("$plasma")
|
||||
if(D.materials[M] > linked_lathe.plasma_amount) check_materials = 0
|
||||
if((D.materials[M] / prot_efficiency) > linked_lathe.plasma_amount) check_materials = 0
|
||||
if("$uranium")
|
||||
if(D.materials[M] > linked_lathe.uranium_amount) check_materials = 0
|
||||
if((D.materials[M] / prot_efficiency) > linked_lathe.uranium_amount) check_materials = 0
|
||||
if("$diamond")
|
||||
if(D.materials[M] > linked_lathe.diamond_amount) check_materials = 0
|
||||
if((D.materials[M] / prot_efficiency) > linked_lathe.diamond_amount) check_materials = 0
|
||||
if("$clown")
|
||||
if(D.materials[M] > linked_lathe.clown_amount) check_materials = 0
|
||||
if((D.materials[M] / prot_efficiency) > linked_lathe.clown_amount) check_materials = 0
|
||||
else if (!linked_lathe.reagents.has_reagent(M, D.materials[M]))
|
||||
check_materials = 0
|
||||
if (check_materials)
|
||||
@@ -851,19 +855,21 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
continue
|
||||
var/temp_dat = "[D.name]"
|
||||
var/check_materials = 1
|
||||
var/imp_efficiency = linked_imprinter.efficiency_coeff
|
||||
for(var/M in D.materials)
|
||||
temp_dat += " [D.materials[M]] [CallMaterialName(M)]"
|
||||
var/materialsneeded = (D.materials[M] / imp_efficiency)
|
||||
temp_dat += " [materialsneeded] [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] / imp_efficiency) > linked_imprinter.g_amount) check_materials = 0
|
||||
if("$gold")
|
||||
if(D.materials[M] > linked_imprinter.gold_amount) check_materials = 0
|
||||
if((D.materials[M] / imp_efficiency) > linked_imprinter.gold_amount) check_materials = 0
|
||||
if("$diamond")
|
||||
if(D.materials[M] > linked_imprinter.diamond_amount) check_materials = 0
|
||||
if((D.materials[M] / imp_efficiency) > linked_imprinter.diamond_amount) check_materials = 0
|
||||
if("$uranium")
|
||||
if(D.materials[M] > linked_imprinter.uranium_amount) check_materials = 0
|
||||
else if (!linked_imprinter.reagents.has_reagent(M, D.materials[M]))
|
||||
if((D.materials[M] / imp_efficiency) > linked_imprinter.uranium_amount) check_materials = 0
|
||||
else if (!linked_imprinter.reagents.has_reagent(M, (D.materials[M] / imp_efficiency)))
|
||||
check_materials = 0
|
||||
if (check_materials)
|
||||
dat += "* <A href='?src=\ref[src];imprint=[D.id]'>[temp_dat]</A><BR>"
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
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/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src,1)
|
||||
component_parts += new /obj/item/stack/cable_coil(src,1)
|
||||
RefreshParts()
|
||||
src.initialize(); //Agouri
|
||||
|
||||
@@ -89,9 +89,7 @@
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
|
||||
//Backup files to centcomm to help admins recover data after greifer attacks
|
||||
// Backup files to CentComm to help admins recover data after griefer attacks
|
||||
/obj/machinery/r_n_d/server/proc/griefProtection()
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in machines)
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
@@ -101,7 +99,7 @@
|
||||
C.files.RefreshResearch()
|
||||
|
||||
/obj/machinery/r_n_d/server/proc/produce_heat(heat_amt)
|
||||
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
|
||||
if(!(stat & (NOPOWER|BROKEN))) // Blatantly stolen from space heater.
|
||||
var/turf/simulated/L = loc
|
||||
if(istype(L))
|
||||
var/datum/gas_mixture/env = L.return_air()
|
||||
@@ -121,49 +119,35 @@
|
||||
env.merge(removed)
|
||||
|
||||
/obj/machinery/r_n_d/server/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
if (disabled)
|
||||
return
|
||||
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
if (!opened)
|
||||
opened = 1
|
||||
icon_state = "server_o"
|
||||
user << "You open the maintenance hatch of [src]."
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "server"
|
||||
user << "You close the maintenance hatch of [src]."
|
||||
return
|
||||
if (opened)
|
||||
|
||||
if(istype(O, /obj/item/weapon/screwdriver))
|
||||
default_deconstruction_screwdriver(user, "server_o", "server")
|
||||
return 1
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return 1
|
||||
|
||||
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
|
||||
del(src)
|
||||
default_deconstruction_crowbar(O)
|
||||
return 1
|
||||
|
||||
/obj/machinery/r_n_d/server/attack_hand(mob/user as mob)
|
||||
if (disabled)
|
||||
return
|
||||
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/server/centcom
|
||||
name = "Centcom Central R&D Database"
|
||||
name = "CentComm. Central R&D Database"
|
||||
server_id = -1
|
||||
|
||||
/obj/machinery/r_n_d/server/centcom/initialize()
|
||||
|
||||
Reference in New Issue
Block a user