mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
made circuitboards for fuel injectors and rust core, made said circuits researchable, miscellaneous tweaks and cleanups
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -1,24 +1,12 @@
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Core Control computer
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_core_control
|
||||
name = "Circuit board (RUST core controller)"
|
||||
build_path = "/obj/machinery/computer/rust_core_control"
|
||||
origin_tech = "programming=4;engineering=5;power=6"
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_fuel_control
|
||||
name = "Circuit board (RUST fuel controller)"
|
||||
build_path = "/obj/machinery/computer/rust_fuel_control"
|
||||
origin_tech = "programming=4;engineering=5;power=6"
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_fuel_port
|
||||
name = "Circuit board (RUST fuel port)"
|
||||
build_path = "/obj/machinery/computer/rust_fuel_control"
|
||||
origin_tech = "programming=4;engineering=5;power=6"
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_fuel_compressor
|
||||
name = "Circuit board (RUST fuel compressor)"
|
||||
build_path = "/obj/machinery/computer/rust_fuel_control"
|
||||
origin_tech = "programming=4;engineering=5;power=6"
|
||||
|
||||
datum/design/rust_core_control
|
||||
name = "Circuit Design (RUST core controller)"
|
||||
desc = "Allows for the construction of circuit boards used to build a core control console for the RUST fusion engine."
|
||||
@@ -28,6 +16,14 @@ datum/design/rust_core_control
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 2000)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_core_control"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Fuel Control computer
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_fuel_control
|
||||
name = "Circuit board (RUST fuel controller)"
|
||||
build_path = "/obj/machinery/computer/rust_fuel_control"
|
||||
origin_tech = "programming=4;engineering=5;power=6"
|
||||
|
||||
datum/design/rust_fuel_control
|
||||
name = "Circuit Design (RUST fuel controller)"
|
||||
desc = "Allows for the construction of circuit boards used to build a fuel injector control console for the RUST fusion engine."
|
||||
@@ -37,6 +33,14 @@ datum/design/rust_fuel_control
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$silver" = 2000)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_fuel_control"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Fuel Port board
|
||||
|
||||
/obj/item/weapon/module/rust_fuel_port
|
||||
name = "Circuit board (RUST fuel port)"
|
||||
icon_state = "card_mod"
|
||||
origin_tech = "engineering=3;power=4"
|
||||
|
||||
datum/design/rust_fuel_port
|
||||
name = "Circuit Design (RUST fuel port)"
|
||||
desc = "Allows for the construction of circuit boards used to build a fuel injection port for the RUST fusion engine."
|
||||
@@ -44,13 +48,73 @@ datum/design/rust_fuel_port
|
||||
req_tech = list("programming" = 4, "engineering" = 5, "magnets" = 6)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$uranium" = 3000)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_fuel_port"
|
||||
build_path = "/obj/item/weapon/module/rust_fuel_port"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Fuel Compressor board
|
||||
|
||||
/obj/item/weapon/module/rust_fuel_compressor
|
||||
name = "Circuit board (RUST fuel compressor)"
|
||||
icon_state = "card_mod"
|
||||
origin_tech = "power=4;engineering=5;plasmatech=6"
|
||||
|
||||
datum/design/rust_fuel_compressor
|
||||
name = "Circuit Design (RUST fuel compressor)"
|
||||
desc = "Allows for the construction of circuit boards used to build a fuel compressor of the RUST fusion engine."
|
||||
id = "rust_fuel_compressor"
|
||||
req_tech = list("programming" = 4, "engineering" = 5 "magnets" = 6)
|
||||
req_tech = list("power" = 4, "engineering" = 5, "plasmatech" = 6)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_fuel_compressor"
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 1000)
|
||||
build_path = "/obj/item/weapon/module/rust_fuel_compressor"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Tokamak Core board
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_core
|
||||
name = "Circuit Design (RUST tokamak core)"
|
||||
build_path = "/obj/machinery/power/rust_core"
|
||||
board_type = "machine"
|
||||
origin_tech = "bluespace=3;engineering=4;plasmatech=5;magnets=6;power=7"
|
||||
frame_desc = "Requires 2 Pico Manipulators, 1 Ultra Micro-Laser, 5 Pieces of Cable, 1 Subspace Crystal and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
|
||||
"/obj/item/weapon/stock_parts/micro_laser/ultra" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
|
||||
datum/design/rust_core
|
||||
name = "Circuit board (RUST tokamak core)"
|
||||
desc = "The circuit board that for a RUST-pattern tokamak fusion core."
|
||||
id = "pacman"
|
||||
req_tech = list(bluespace = 3, engineering = 4, plasmatech = 5, magnets = 6, power = 7)
|
||||
build_type = IMPRINTER
|
||||
reliability_base = 79
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 2000)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_core"
|
||||
|
||||
//////////////////////////////////////
|
||||
// RUST Fuel Injector board
|
||||
|
||||
/obj/item/weapon/circuitboard/rust_injector
|
||||
name = "Circuit Design (RUST fuel injector)"
|
||||
build_path = "/obj/machinery/power/rust_fuel_injector"
|
||||
board_type = "machine"
|
||||
origin_tech = "power=3;engineering=4;plasmatech=5;magnets=6;materials=7"
|
||||
frame_desc = "Requires 2 Pico Manipulators, 1 Phasic Scanning Module, 1 Super Matter Bin, 1 Console Screen and 5 Pieces of Cable."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module/phasic" = 1,
|
||||
"/obj/item/weapon/stock_parts/matter_bin/super" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cable_coil" = 5)
|
||||
|
||||
datum/design/rust_injector
|
||||
name = "Circuit board (RUST tokamak core)"
|
||||
desc = "The circuit board that for a RUST-pattern particle accelerator."
|
||||
id = "pacman"
|
||||
req_tech = list(power = 3, engineering = 4, plasmatech = 5, magnets = 6, materials = 7)
|
||||
build_type = IMPRINTER
|
||||
reliability_base = 79
|
||||
materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$uranium" = 2000)
|
||||
build_path = "/obj/item/weapon/circuitboard/rust_core"
|
||||
|
||||
@@ -258,7 +258,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
switch(newsize)
|
||||
if(1)
|
||||
size = 1
|
||||
icon = 'emfield.dmi'
|
||||
icon = 'rust.dmi'
|
||||
icon_state = "emfield_s1"
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
anchored = 1
|
||||
|
||||
var/opened = 1 //0=closed, 1=opened
|
||||
var/coverlocked = 0
|
||||
var/locked = 0
|
||||
var/has_electronics = 0 // 0 - none, bit 1 - circuitboard, bit 2 - wires
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/attackby(var/obj/item/I, var/mob/user)
|
||||
|
||||
@@ -43,8 +43,6 @@
|
||||
else
|
||||
has_electronics = 3
|
||||
opened = 1
|
||||
coverlocked = 1
|
||||
locked = 0
|
||||
icon_state = "port0"
|
||||
|
||||
//20% easier to read than apc code
|
||||
@@ -65,47 +63,19 @@
|
||||
"\red [user.name] has removed the circuitboard from [src.name]!",\
|
||||
"\blue You remove the circuitboard.")
|
||||
has_electronics = 0
|
||||
new /obj/item/weapon/circuitboard/rust_fuel_port(loc)
|
||||
new /obj/item/weapon/module/rust_fuel_port(loc)
|
||||
has_electronics &= ~1
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "port0"
|
||||
user << "\blue You close the maintenance cover."
|
||||
else if(!coverlocked)
|
||||
else
|
||||
if(cur_assembly)
|
||||
user << "\red You cannot open the cover while there is a fuel assembly inside."
|
||||
else
|
||||
opened = 1
|
||||
user << "\blue You open the maintenance cover."
|
||||
icon_state = "port2"
|
||||
else
|
||||
user << "\red The cover is locked and cannot be opened."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
if(src.allowed(usr))
|
||||
locked = !locked
|
||||
user << "You [ locked ? "lock" : "unlock"] the port interface."
|
||||
update_icon()
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/emag) && !emagged) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
if (do_after(user,6))
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "You emag the port interface."
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the port interface."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
|
||||
@@ -134,7 +104,7 @@
|
||||
has_electronics &= ~2
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/circuitboard/rust_fuel_port) && opened && !(has_electronics & 1))
|
||||
else if (istype(W, /obj/item/weapon/module/rust_fuel_port) && opened && !(has_electronics & 1))
|
||||
user << "You trying to insert the port control board into the frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10))
|
||||
|
||||
@@ -5,11 +5,10 @@ var/const/max_assembly_amount = 300
|
||||
icon_state = "fuel_compressor0"
|
||||
name = "Fuel Compressor"
|
||||
var/list/new_assembly_quantities
|
||||
var/compressed_matter = 100
|
||||
var/compressed_matter = 0
|
||||
anchored = 1
|
||||
|
||||
var/opened = 1 //0=closed, 1=opened
|
||||
var/coverlocked = 0
|
||||
var/locked = 0
|
||||
var/has_electronics = 0 // 0 - none, bit 1 - circuitboard, bit 2 - wires
|
||||
|
||||
@@ -32,64 +31,83 @@ var/const/max_assembly_amount = 300
|
||||
return*/
|
||||
interact(user)
|
||||
|
||||
/*/obj/machinery/rust_fuel_compressor/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broken"
|
||||
/obj/machinery/rust_fuel_compressor/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/rcd_ammo))
|
||||
compressed_matter += 10
|
||||
del(W)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=fuelcomp")
|
||||
return
|
||||
|
||||
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
if(locked)
|
||||
t += "Swipe your ID to unlock this console."
|
||||
else
|
||||
if( powered() )
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "c_unpowered"
|
||||
stat |= NOPOWER*/
|
||||
t += "Compressed matter in storage: [compressed_matter] <A href='?src=\ref[src];eject_matter=1'>\[Eject all\]</a>"
|
||||
t += "<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>"
|
||||
t += "<hr>"
|
||||
t += "- New fuel assembly constituents:- <br>"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];change_reagent=[reagent]'>Modify</A>\]<br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
|
||||
user << browse(t, "window=fuelcomp;size=500x300")
|
||||
user.set_machine(src)
|
||||
|
||||
//var/locked
|
||||
//var/coverlocked
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=fuelcomp")
|
||||
usr.machine = null
|
||||
return
|
||||
//
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
if(href_list[reagent])
|
||||
var/new_amount = text2num(input("Enter new rod amount", "Fuel Assembly Rod Composition ([reagent])", new_assembly_quantities[reagent]) as text|null)
|
||||
if(!new_amount)
|
||||
usr << "\red That's not a valid number."
|
||||
return
|
||||
var/sum_reactants = new_amount - new_assembly_quantities[reagent]
|
||||
for(var/rod in new_assembly_quantities)
|
||||
sum_reactants += new_assembly_quantities[rod]
|
||||
if(sum_reactants > max_assembly_amount)
|
||||
usr << "\red You have entered too many rods."
|
||||
else
|
||||
new_assembly_quantities[reagent] = new_amount
|
||||
updateDialog()
|
||||
return
|
||||
if( href_list["activate"] )
|
||||
var/obj/item/weapon/fuel_assembly/F = new(src)
|
||||
//world << "\blue New fuel rod assembly"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
F.rod_quantities[reagent] = new_assembly_quantities[reagent]
|
||||
//world << "\blue [reagent]: new_assembly_quantities[reagent]<br>"
|
||||
F.loc = src.loc
|
||||
F.percent_depleted = 0
|
||||
return
|
||||
|
||||
/obj/machinery/rust_fuel_compressor/interact(mob/user)
|
||||
/*if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.machine = null
|
||||
user << browse(null, "window=fuelcomp")
|
||||
return*/
|
||||
var/t = "<B>Reactor Fuel Rod Compressor / Assembler</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<A href='?src=\ref[src];activate=1'><b>Activate Fuel Synthesis</b></A><BR> (fuel assemblies require no more than [max_assembly_amount] rods).<br>"
|
||||
t += "<hr>"
|
||||
t += "- New fuel assembly constituents:- <br>"
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
t += " [reagent] rods: [new_assembly_quantities[reagent]] \[<A href='?src=\ref[src];reagent=1'>Modify</A>\]<br>"
|
||||
t += "<hr>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=fuelcomp;size=500x300")
|
||||
user.machine = src
|
||||
if( href_list["eject_matter"] )
|
||||
while(compressed_matter > 10)
|
||||
new /obj/item/weapon/rcd_ammo(src.loc)
|
||||
compressed_matter -= 10
|
||||
src.visible_message("\blue \icon[src] [src] ejects some compressed matter units.")
|
||||
|
||||
if( href_list["activate"] )
|
||||
//world << "\blue New fuel rod assembly"
|
||||
var/obj/item/weapon/fuel_assembly/F = new(src)
|
||||
var/fail = 0
|
||||
var/old_matter = compressed_matter
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
var/req_matter = F.rod_quantities[reagent] / 10
|
||||
if(req_matter <= compressed_matter)
|
||||
F.rod_quantities[reagent] = new_assembly_quantities[reagent]
|
||||
compressed_matter -= req_matter
|
||||
else
|
||||
fail = 1
|
||||
break
|
||||
//world << "\blue [reagent]: new_assembly_quantities[reagent]<br>"
|
||||
if(fail)
|
||||
del(F)
|
||||
compressed_matter = old_matter
|
||||
src.visible_message("\red \icon[src] [src] flashes red: \'Out of matter.\'")
|
||||
else
|
||||
F.loc = src.loc
|
||||
F.percent_depleted = 0
|
||||
|
||||
if( href_list["change_reagent"] )
|
||||
var/cur_reagent = href_list["change_reagent"]
|
||||
var/avail_rods = 300
|
||||
for(var/rod in new_assembly_quantities)
|
||||
avail_rods -= new_assembly_quantities[rod]
|
||||
avail_rods += new_assembly_quantities[cur_reagent]
|
||||
avail_rods = max(avail_rods, 0)
|
||||
|
||||
var/new_amount = min(input("Enter new [cur_reagent] rod amount (max [avail_rods])", "Fuel Assembly Rod Composition ([cur_reagent])") as num, avail_rods)
|
||||
new_assembly_quantities[cur_reagent] = new_amount
|
||||
|
||||
updateDialog()
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
else
|
||||
has_electronics = 3
|
||||
opened = 1
|
||||
coverlocked = 1
|
||||
locked = 0
|
||||
icon_state = "port0"
|
||||
|
||||
@@ -65,21 +64,19 @@
|
||||
"\red [user.name] has removed the circuitboard from [src.name]!",\
|
||||
"\blue You remove the circuitboard board.")
|
||||
has_electronics = 0
|
||||
new /obj/item/weapon/circuitboard/rust_fuel_compressor(loc)
|
||||
new /obj/item/weapon/module/rust_fuel_compressor(loc)
|
||||
has_electronics &= ~1
|
||||
else
|
||||
opened = 0
|
||||
icon_state = "fuel_compressor0"
|
||||
user << "\blue You close the maintenance cover."
|
||||
else if(!coverlocked)
|
||||
else
|
||||
if(compressed_matter > 0)
|
||||
user << "\red You cannot open the cover while there is compressed matter inside."
|
||||
else
|
||||
opened = 1
|
||||
user << "\blue You open the maintenance cover."
|
||||
icon_state = "fuel_compressor1"
|
||||
else
|
||||
user << "\red The cover is locked and cannot be opened."
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
@@ -134,7 +131,7 @@
|
||||
has_electronics &= ~2
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/circuitboard/rust_fuel_compressor) && opened && !(has_electronics & 1))
|
||||
else if (istype(W, /obj/item/weapon/module/rust_fuel_compressor) && opened && !(has_electronics & 1))
|
||||
user << "You trying to insert the circuitboard into the frame..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10))
|
||||
|
||||
@@ -62,14 +62,14 @@
|
||||
return
|
||||
|
||||
var/dat = "<B>Reactor Core Fuel Control</B><BR>"
|
||||
dat += "<b>Fuel depletion announcement:</b> "
|
||||
/*dat += "<b>Fuel depletion announcement:</b> "
|
||||
dat += "[announce_fueldepletion == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_fueldepletion=0'>\[Disable\]</a>"] "
|
||||
dat += "[announce_fueldepletion == 1 ? "Announcing" : "<a href='?src=\ref[src];announce_fueldepletion=1'>\[Announce\]</a>"] "
|
||||
dat += "[announce_fueldepletion == 2 ? "Broadcasting" : "<a href='?src=\ref[src];announce_fueldepletion=2'>\[Broadcast\]</a>"]<br>"
|
||||
dat += "<b>Stage progression announcement:</b> "
|
||||
dat += "[announce_stageprogression == 0 ? "Disabled" : "<a href='?src=\ref[src];announce_stageprogression=0'>\[Disable\]</a>"] "
|
||||
dat += "[announce_stageprogression == 1 ? "Announcing" : "<a href='?src=\ref[src];announce_stageprogression=1'>\[Announce\]</a>"] "
|
||||
dat += "[announce_stageprogression == 2 ? "Broadcasting" : "<a href='?src=\ref[src];announce_stageprogression=2'>\[Broadcast\]</a>"]<br>"
|
||||
dat += "[announce_stageprogression == 2 ? "Broadcasting" : "<a href='?src=\ref[src];announce_stageprogression=2'>\[Broadcast\]</a>"]<br>"*/
|
||||
dat += "<hr>"
|
||||
|
||||
dat += "<b>Detected devices</b> <a href='?src=\ref[src];scan=1'>\[Refresh list\]</a>"
|
||||
|
||||
Reference in New Issue
Block a user