From dc66446064e228760d48ba0cbb4b6dac2d791556 Mon Sep 17 00:00:00 2001 From: Sishen Date: Fri, 9 Aug 2019 03:19:02 -0400 Subject: [PATCH 1/4] dab dab --- code/__DEFINES/construction.dm | 2 + code/game/objects/items/RCD.dm | 48 ++++++++++++++++++- code/game/turfs/simulated/floor.dm | 20 ++++++++ code/modules/research/designs/misc_designs.dm | 10 ++++ code/modules/research/techweb/all_nodes.dm | 2 +- 5 files changed, 80 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index ee51fb6909..c394d003d8 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -109,3 +109,5 @@ #define RCD_AIRLOCK 2 #define RCD_DECONSTRUCT 3 #define RCD_WINDOWGRILLE 4 +#define RCD_MACHINE 8 +#define RCD_COMPUTER 16 \ No newline at end of file diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 1ff3c7df9f..83f8792882 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -37,6 +37,7 @@ RLD var/has_ammobar = FALSE //controls whether or not does update_icon apply ammo indicator overlays var/ammo_sections = 10 //amount of divisions in the ammo indicator overlay/number of ammo indicator states var/custom_range = 7 + var/upgrade = FALSE /obj/item/construction/Initialize() . = ..() @@ -82,6 +83,11 @@ RLD loaded = loadwithsheets(W, sheetmultiplier * 0.25, user) // 1 matter for 1 floortile, as 4 tiles are produced from 1 metal if(loaded) to_chat(user, "[src] now holds [matter]/[max_matter] matter-units.") + else if(istype(W, /obj/item/rcd_upgrade)) + to_chat(user, "You upgrade the RCD with the [W]!") + upgrade = TRUE + playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + qdel(W) else return ..() update_icon() //ensures that ammo counters (if present) get updated @@ -148,6 +154,7 @@ RLD has_ammobar = TRUE var/mode = 1 var/ranged = FALSE + var/computer_dir = 1 var/airlock_type = /obj/machinery/door/airlock var/airlock_glass = FALSE // So the floor's rcd_act knows how much ammo to use var/window_type = /obj/structure/window/fulltile @@ -270,6 +277,28 @@ RLD return FALSE return TRUE +/obj/item/construction/rcd/proc/change_computer_dir(mob/user) + if(!user) + return + var/list/computer_dirs = list( + "NORTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "cnorth"), + "EAST" = image(icon = 'icons/mob/radial.dmi', icon_state = "ceast"), + "SOUTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "csouth"), + "WEST" = image(icon = 'icons/mob/radial.dmi', icon_state = "cwest") + ) + var/computerdirs = show_radial_menu(user, src, computer_dirs, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE) + if(!check_menu(user)) + return + switch(computerdirs) + if("NORTH") + computer_dir = 1 + if("EAST") + computer_dir = 4 + if("SOUTH") + computer_dir = 2 + if("WEST") + computer_dir = 8 + /obj/item/construction/rcd/proc/change_airlock_setting(mob/user) if(!user) return @@ -434,10 +463,15 @@ RLD ..() var/list/choices = list( "Airlock" = image(icon = 'icons/mob/radial.dmi', icon_state = "airlock"), - "Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"), "Grilles & Windows" = image(icon = 'icons/mob/radial.dmi', icon_state = "grillewindow"), "Floors & Walls" = image(icon = 'icons/mob/radial.dmi', icon_state = "wallfloor") ) + if(upgrade) + choices += list( + "Deconstruct" = image(icon= 'icons/mob/radial.dmi', icon_state = "delete"), + "Machine Frames" = image(icon = 'icons/mob/radial.dmi', icon_state = "machine"), + "Computer Frames" = image(icon = 'icons/mob/radial.dmi', icon_state = "computer_dir"), + ) if(mode == RCD_AIRLOCK) choices += list( "Change Access" = image(icon = 'icons/mob/radial.dmi', icon_state = "access"), @@ -459,6 +493,12 @@ RLD mode = RCD_DECONSTRUCT if("Grilles & Windows") mode = RCD_WINDOWGRILLE + if("Machine Frames") + mode = RCD_MACHINE + if("Computer Frames") + mode = RCD_COMPUTER + change_computer_dir(user) + return if("Change Access") change_airlock_access(user) return @@ -776,6 +816,12 @@ RLD return TRUE return FALSE +/obj/item/rcd_upgrade + name = "RCD advanced design disk" + desc = "It contains the design for machine frames, computer frames, and deconstruction." + icon = 'icons/obj/module.dmi' + icon_state = "datadisk3" + #undef GLOW_MODE #undef LIGHT_MODE #undef REMOVE_MODE diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index b00efc7ed6..194014b61a 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -236,6 +236,10 @@ return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 33) if(RCD_WINDOWGRILLE) return list("mode" = RCD_WINDOWGRILLE, "delay" = 10, "cost" = 4) + if(RCD_MACHINE) + return list("mode" = RCD_MACHINE, "delay" = 20, "cost" = 25) + if(RCD_COMPUTER) + return list("mode" = RCD_COMPUTER, "delay" = 20, "cost" = 25) return FALSE /turf/open/floor/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode) @@ -274,4 +278,20 @@ var/obj/structure/grille/G = new(src) G.anchored = TRUE return TRUE + if(RCD_MACHINE) + if(locate(/obj/structure/frame/machine) in src) + return FALSE + var/obj/structure/frame/machine/M = new(src) + M.state = 2 + M.icon_state = "box_1" + M.anchored = TRUE + return TRUE + if(RCD_COMPUTER) + if(locate(/obj/structure/frame/computer) in src) + return FALSE + var/obj/structure/frame/computer/C = new(src) + C.anchored = TRUE + C.setDir(the_rcd.computer_dir) + return TRUE + return FALSE diff --git a/code/modules/research/designs/misc_designs.dm b/code/modules/research/designs/misc_designs.dm index d27c876f88..d4f5800fd0 100644 --- a/code/modules/research/designs/misc_designs.dm +++ b/code/modules/research/designs/misc_designs.dm @@ -370,6 +370,16 @@ ////////////Tools////////////// /////////////////////////////// +/datum/design/rcd_upgrade + name = "Advanced RCD designs upgrade" + desc = "Adds the computer frame and machine frame to the RCD." + id = "rcd_upgrade" + build_type = PROTOLATHE + materials = list(MAT_METAL = 5000, MAT_GLASS = 2500, MAT_SILVER = 1500, MAT_TITANIUM = 2000) + build_path = /obj/item/rcd_upgrade + category = list("Equipment") + departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING + /datum/design/exwelder name = "Experimental Welding Tool" desc = "An experimental welder capable of self-fuel generation." diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index c70ee8a16b..2459014f9c 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -172,7 +172,7 @@ display_name = "Advanced Engineering" description = "Pushing the boundaries of physics, one chainsaw-fist at a time." prereq_ids = list("engineering", "emp_basic") - design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription") + design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "rcd_upgrade") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000) export_price = 5000 From 0693f27010c64d4ce1f013a269faea4a1feb2356 Mon Sep 17 00:00:00 2001 From: Sishen Date: Fri, 9 Aug 2019 03:43:55 -0400 Subject: [PATCH 2/4] Update lavaland_surface_ash_walker1.dmm --- _maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm index 738148c948..19325a4230 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm @@ -508,7 +508,9 @@ /obj/structure/stone_tile/cracked{ dir = 4 }, -/obj/item/construction/rcd/loaded, +/obj/item/construction/rcd/loaded{ + upgrade = 1 + }, /turf/open/indestructible/boss, /area/ruin/unpowered/ash_walkers) "bn" = ( From c6fbb966c8b06478b430d35dff24d6b1869d6370 Mon Sep 17 00:00:00 2001 From: Sishen Date: Fri, 9 Aug 2019 03:55:08 -0400 Subject: [PATCH 3/4] honk --- code/game/objects/items/RCD.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 83f8792882..cce1778a03 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -551,6 +551,7 @@ RLD no_ammo_message = "Insufficient charge." desc = "A device used to rapidly build walls and floors." canRturf = TRUE + upgrade = TRUE /obj/item/construction/rcd/borg/useResource(amount, mob/user) @@ -622,7 +623,7 @@ RLD name = "admin RCD" max_matter = INFINITY matter = INFINITY - + upgrade = TRUE // Ranged RCD From 3281f23eb65d994b8f1575662798f6c32f7a0b6f Mon Sep 17 00:00:00 2001 From: Sishen Date: Wed, 14 Aug 2019 16:30:54 -0400 Subject: [PATCH 4/4] made changes as per bhijns request --- _maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm | 4 ++-- code/game/objects/items/RCD.dm | 3 +++ .../structures/crates_lockers/closets/secure/engineering.dm | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm index 19325a4230..ed5b07168f 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm @@ -508,8 +508,8 @@ /obj/structure/stone_tile/cracked{ dir = 4 }, -/obj/item/construction/rcd/loaded{ - upgrade = 1 +/obj/item/construction/rcd/loaded/upgraded{ + }, /turf/open/indestructible/boss, /area/ruin/unpowered/ash_walkers) diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index cce1778a03..cf706359f7 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -583,6 +583,9 @@ RLD /obj/item/construction/rcd/loaded matter = 160 +/obj/item/construction/rcd/loaded/upgraded + upgrade = TRUE + /obj/item/construction/rcd/combat name = "Combat RCD" desc = "A device used to rapidly build and deconstruct. Reload with metal, plasteel, glass or compressed matter cartridges. This RCD has been upgraded to be able to remove Rwalls!" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index 167823b9be..a7adafdad4 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -33,6 +33,7 @@ new /obj/item/extinguisher/advanced(src) new /obj/item/storage/photo_album/CE(src) new /obj/item/storage/lockbox/medal/engineering(src) + new /obj/item/construction/rcd/loaded/upgraded(src) /obj/structure/closet/secure_closet/engineering_electrical name = "electrical supplies locker"