diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm b/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm new file mode 100644 index 00000000000..3b00bbc7a7e --- /dev/null +++ b/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm @@ -0,0 +1,56 @@ + +/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." + id = "rust_core_control" + req_tech = list("programming" = 4, "engineering" = 5, "power" = 6) + build_type = IMPRINTER + materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 2000) + build_path = "/obj/item/weapon/circuitboard/rust_core_control" + +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." + id = "rust_fuel_control" + req_tech = list("programming" = 4, "engineering" = 5, "power" = 6) + build_type = IMPRINTER + materials = list("$glass" = 2000, "sacid" = 20, "$silver" = 2000) + build_path = "/obj/item/weapon/circuitboard/rust_fuel_control" + +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." + id = "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" + +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) + build_type = IMPRINTER + materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000) + build_path = "/obj/item/weapon/circuitboard/rust_fuel_compressor" diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port_construction.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port_construction.dm new file mode 100644 index 00000000000..81bec6781e3 --- /dev/null +++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port_construction.dm @@ -0,0 +1,163 @@ + +//frame assembly + +/obj/item/rust_fuel_assembly_port_frame + name = "Fuel Assembly Port frame" + icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi' + icon_state = "port2" + w_class = 4 + flags = FPRINT | TABLEPASS| CONDUCT + +/obj/item/rust_fuel_assembly_port_frame/attackby(obj/item/weapon/W as obj, mob/user as mob) + if (istype(W, /obj/item/weapon/wrench)) + new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 ) + del(src) + return + ..() + +/obj/item/rust_fuel_assembly_port_frame/proc/try_build(turf/on_wall) + if (get_dist(on_wall,usr)>1) + return + var/ndir = get_dir(usr,on_wall) + if (!(ndir in cardinal)) + return + var/turf/loc = get_turf(usr) + var/area/A = loc.loc + if (!istype(loc, /turf/simulated/floor)) + usr << "\red Port cannot be placed on this spot." + return + if (A.requires_power == 0 || A.name == "Space") + usr << "\red Port cannot be placed in this area." + return + new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1) + del(src) + +//construction steps +/obj/machinery/rust_fuel_assembly_port/New(turf/loc, var/ndir, var/building=0) + ..() + + // offset 24 pixels in direction of dir + // this allows the APC to be embedded in a wall, yet still inside an area + if (building) + dir = ndir + else + has_electronics = 3 + opened = 1 + coverlocked = 1 + locked = 0 + icon_state = "port0" + + //20% easier to read than apc code + pixel_x = (dir & 3)? 0 : (dir == 4 ? 32 : -32) + pixel_y = (dir & 3)? (dir ==1 ? 32 : -32) : 0 + +/obj/machinery/rust_fuel_assembly_port/attackby(obj/item/W, mob/user) + + if (istype(user, /mob/living/silicon) && get_dist(src,user)>1) + return src.attack_hand(user) + if (istype(W, /obj/item/weapon/crowbar)) + if(opened) + if(has_electronics & 1) + playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + user << "You begin removing the circuitboard" //lpeters - fixed grammar issues + if(do_after(user, 50)) + user.visible_message(\ + "\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) + has_electronics &= ~1 + else + opened = 0 + icon_state = "port0" + user << "\blue You close the maintenance cover." + else if(!coverlocked) + 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)) + var/obj/item/weapon/cable_coil/C = W + if(C.amount < 10) + user << "\red You need more wires." + return + user << "You start adding cables to the frame..." + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + if(do_after(user, 20) && C.amount >= 10) + C.use(10) + user.visible_message(\ + "\red [user.name] has added cables to the port frame!",\ + "You add cables to the port frame.") + has_electronics &= 2 + return + + else if (istype(W, /obj/item/weapon/wirecutters) && opened && (has_electronics & 2)) + user << "You begin to cut the cables..." + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + if(do_after(user, 50)) + new /obj/item/weapon/cable_coil(loc,10) + user.visible_message(\ + "\red [user.name] cut the cabling inside the port.",\ + "You cut the cabling inside the port.") + has_electronics &= ~2 + return + + else if (istype(W, /obj/item/weapon/circuitboard/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)) + has_electronics &= 1 + user << "You place the port control board inside the frame." + del(W) + return + + else if (istype(W, /obj/item/weapon/weldingtool) && opened && !has_electronics) + var/obj/item/weapon/weldingtool/WT = W + if (WT.get_fuel() < 3) + user << "\blue You need more welding fuel to complete this task." + return + user << "You start welding the port frame..." + playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + if(do_after(user, 50)) + if(!src || !WT.remove_fuel(3, user)) return + new /obj/item/rust_fuel_assembly_port_frame(loc) + user.visible_message(\ + "\red [src] has been cut away from the wall by [user.name].",\ + "You detached the port frame.",\ + "\red You hear welding.") + del(src) + return + + ..() diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor_construction.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor_construction.dm new file mode 100644 index 00000000000..9f2e40d7e82 --- /dev/null +++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor_construction.dm @@ -0,0 +1,163 @@ + +//frame assembly + +/obj/item/rust_fuel_compressor_frame + name = "Fuel Compressor frame" + icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi' + icon_state = "fuel_compressor0" + w_class = 4 + flags = FPRINT | TABLEPASS| CONDUCT + +/obj/item/rust_fuel_compressor_frame/attackby(obj/item/weapon/W as obj, mob/user as mob) + if (istype(W, /obj/item/weapon/wrench)) + new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 ) + del(src) + return + ..() + +/obj/item/rust_fuel_compressor_frame/proc/try_build(turf/on_wall) + if (get_dist(on_wall,usr)>1) + return + var/ndir = get_dir(usr,on_wall) + if (!(ndir in cardinal)) + return + var/turf/loc = get_turf(usr) + var/area/A = loc.loc + if (!istype(loc, /turf/simulated/floor)) + usr << "\red Compressor cannot be placed on this spot." + return + if (A.requires_power == 0 || A.name == "Space") + usr << "\red Compressor cannot be placed in this area." + return + new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1) + del(src) + +//construction steps +/obj/machinery/rust_fuel_compressor/New(turf/loc, var/ndir, var/building=0) + ..() + + // offset 24 pixels in direction of dir + // this allows the APC to be embedded in a wall, yet still inside an area + if (building) + dir = ndir + else + has_electronics = 3 + opened = 1 + coverlocked = 1 + locked = 0 + icon_state = "port0" + + //20% easier to read than apc code + pixel_x = (dir & 3)? 0 : (dir == 4 ? 32 : -32) + pixel_y = (dir & 3)? (dir ==1 ? 32 : -32) : 0 + +/obj/machinery/rust_fuel_compressor/attackby(obj/item/W, mob/user) + + if (istype(user, /mob/living/silicon) && get_dist(src,user)>1) + return src.attack_hand(user) + if (istype(W, /obj/item/weapon/crowbar)) + if(opened) + if(has_electronics & 1) + playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + user << "You begin removing the circuitboard" //lpeters - fixed grammar issues + if(do_after(user, 50)) + user.visible_message(\ + "\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) + has_electronics &= ~1 + else + opened = 0 + icon_state = "fuel_compressor0" + user << "\blue You close the maintenance cover." + else if(!coverlocked) + 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 + 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 compressor 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 compressor interface." + return + + else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2)) + var/obj/item/weapon/cable_coil/C = W + if(C.amount < 10) + user << "\red You need more wires." + return + user << "You start adding cables to the compressor frame..." + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + if(do_after(user, 20) && C.amount >= 10) + C.use(10) + user.visible_message(\ + "\red [user.name] has added cables to the compressor frame!",\ + "You add cables to the port frame.") + has_electronics &= 2 + return + + else if (istype(W, /obj/item/weapon/wirecutters) && opened && (has_electronics & 2)) + user << "You begin to cut the cables..." + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + if(do_after(user, 50)) + new /obj/item/weapon/cable_coil(loc,10) + user.visible_message(\ + "\red [user.name] cut the cabling inside the compressor.",\ + "You cut the cabling inside the port.") + has_electronics &= ~2 + return + + else if (istype(W, /obj/item/weapon/circuitboard/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)) + has_electronics &= 1 + user << "You place the circuitboard inside the frame." + del(W) + return + + else if (istype(W, /obj/item/weapon/weldingtool) && opened && !has_electronics) + var/obj/item/weapon/weldingtool/WT = W + if (WT.get_fuel() < 3) + user << "\blue You need more welding fuel to complete this task." + return + user << "You start welding the compressor frame..." + playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + if(do_after(user, 50)) + if(!src || !WT.remove_fuel(3, user)) return + new /obj/item/rust_fuel_assembly_port_frame(loc) + user.visible_message(\ + "\red [src] has been cut away from the wall by [user.name].",\ + "You detached the compressor frame.",\ + "\red You hear welding.") + del(src) + return + + ..() diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 33caf8f1164..045ab1d689a 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -849,3 +849,19 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containertype = /obj/structure/closet containername = "Formalwear for the best occasions." group = "Operations" + +/datum/supply_packs/rust_core + contains = list(/obj/machinery/power/rust_core) + name = "RUST Tokamak Core" + cost = 75 + containertype = /obj/structure/largecrate + containername = "RUST tokamak crate." + group = "Engineering" + +/datum/supply_packs/rust_injector + contains = list(/obj/machinery/power/rust_fuel_injector) + name = "RUST fuel injector" + cost = 40 + containertype = /obj/structure/largecrate + containername = "RUST injector crate." + group = "Engineering" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 6c62365fdb3..6b95c453374 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -73,6 +73,8 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \ new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \ + new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/rust_fuel_assembly_port_frame, 12, time = 50, one_per_turf = 1), \ + new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/rust_fuel_compressor_frame, 12, time = 50, one_per_turf = 1), \ ) /obj/item/stack/sheet/plasteel diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 37f71d1f3c7..5d055f1a8cb 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -265,6 +265,16 @@ AH.try_build(src) return + else if(istype(W,/obj/item/rust_fuel_compressor_frame)) + var/obj/item/rust_fuel_compressor_frame/AH = W + AH.try_build(src) + return + + else if(istype(W,/obj/item/rust_fuel_assembly_port_frame)) + var/obj/item/rust_fuel_assembly_port_frame/AH = W + AH.try_build(src) + return + //Poster stuff else if(istype(W,/obj/item/weapon/contraband/poster)) place_poster(W,user)