diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm
index aeae88a328c..7838697ccdb 100644
--- a/code/__DEFINES/construction.dm
+++ b/code/__DEFINES/construction.dm
@@ -99,13 +99,21 @@
#define CAT_ICE "Frozen"
#define CAT_DRINK "Drinks"
-#define RCD_FLOORWALL 1
-#define RCD_AIRLOCK 2
-#define RCD_DECONSTRUCT 3
-#define RCD_WINDOWGRILLE 4
-#define RCD_MACHINE 8
-#define RCD_COMPUTER 16
+// these aren't even used as bitflags so who even knows why they are treated like them
+#define RCD_FLOORWALL (1<<0)
+#define RCD_AIRLOCK (1<<1)
+#define RCD_DECONSTRUCT (1<<2)
+#define RCD_WINDOWGRILLE (1<<3)
+#define RCD_MACHINE (1<<4)
+#define RCD_COMPUTER (1<<5)
+#define RCD_FURNISHING (1<<6)
-#define RCD_UPGRADE_FRAMES 1
-#define RCD_UPGRADE_SIMPLE_CIRCUITS 2
-#define RCD_UPGRADE_SILO_LINK 4
+#define RCD_UPGRADE_FRAMES (1<<0)
+#define RCD_UPGRADE_SIMPLE_CIRCUITS (1<<1)
+#define RCD_UPGRADE_SILO_LINK (1<<2)
+#define RCD_UPGRADE_FURNISHING (1<<3)
+
+#define RCD_WINDOW_FULLTILE "full tile"
+#define RCD_WINDOW_DIRECTIONAL "directional"
+#define RCD_WINDOW_NORMAL "glass"
+#define RCD_WINDOW_REINFORCED "reinforced glass"
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index f9429a546aa..aca2ae897ee 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -334,6 +334,21 @@
if("touch")
INVOKE_ASYNC(src, .proc/open_and_close)
+/obj/machinery/door/window/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
+ switch(the_rcd.mode)
+ if(RCD_DECONSTRUCT)
+ return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 32)
+ return FALSE
+
+/obj/machinery/door/window/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
+ switch(passed_mode)
+ if(RCD_DECONSTRUCT)
+ to_chat(user, "You deconstruct the windoor.")
+ qdel(src)
+ return TRUE
+ return FALSE
+
+
/obj/machinery/door/window/brigdoor
name = "secure door"
icon_state = "leftsecure"
diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm
index 2ede9daeb74..7b924c5e64c 100644
--- a/code/game/objects/items/RCD.dm
+++ b/code/game/objects/items/RCD.dm
@@ -29,14 +29,13 @@ RLD
var/datum/effect_system/spark_spread/spark_system
var/matter = 0
var/max_matter = 100
- var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
- var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
- var/plasmarglassmultiplier = 2 //50% less plasma than in plasteel
- var/rglassmultiplier = 1.5 //One metal sheet, half a glass sheet
var/no_ammo_message = "The \'Low Ammo\' light on the device blinks yellow."
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/upgrade = FALSE
+ /// Bitflags for upgrades
+ var/upgrade = NONE
+ /// Bitflags for banned upgrades
+ var/banned_upgrades = NONE
var/datum/component/remote_materials/silo_mats //remote connection to the silo
var/silo_link = FALSE //switch to use internal or remote storage
@@ -61,49 +60,65 @@ RLD
silo_mats = null
return ..()
+/obj/item/construction/pre_attack(atom/target, mob/user, params)
+ if(istype(target, /obj/item/rcd_upgrade))
+ install_upgrade(target, user)
+ return TRUE
+ if(insert_matter(target, user))
+ return TRUE
+ return ..()
+
/obj/item/construction/attackby(obj/item/W, mob/user, params)
- if(iscyborg(user))
+ if(istype(W, /obj/item/rcd_upgrade))
+ install_upgrade(W, user)
+ return TRUE
+ if(insert_matter(W, user))
+ return TRUE
+ return ..()
+
+/// Installs an upgrade into the RCD checking if it is already installed, or if it is a banned upgrade
+/obj/item/construction/proc/install_upgrade(obj/item/rcd_upgrade/rcd_up, mob/user)
+ if(rcd_up.upgrade & upgrade)
+ to_chat(user, "[src] has already installed this upgrade!")
return
- var/loaded = 0
- if(istype(W, /obj/item/rcd_ammo))
- var/obj/item/rcd_ammo/R = W
+ if(rcd_up.upgrade & banned_upgrades)
+ to_chat(user, "[src] can't install this upgrade!")
+ return
+ upgrade |= rcd_up.upgrade
+ if((rcd_up.upgrade & RCD_UPGRADE_SILO_LINK) && !silo_mats)
+ silo_mats = AddComponent(/datum/component/remote_materials, "RCD", FALSE, FALSE)
+ playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
+ qdel(rcd_up)
+
+/// Inserts matter into the RCD allowing it to build
+/obj/item/construction/proc/insert_matter(obj/O, mob/user)
+ if(iscyborg(user))
+ return FALSE
+ var/loaded = FALSE
+ if(istype(O, /obj/item/rcd_ammo))
+ var/obj/item/rcd_ammo/R = O
var/load = min(R.ammoamt, max_matter - matter)
if(load <= 0)
to_chat(user, "[src] can't hold any more matter-units!")
- return
+ return FALSE
R.ammoamt -= load
if(R.ammoamt <= 0)
qdel(R)
matter += load
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
- loaded = 1
- else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
- loaded = loadwithsheets(W, sheetmultiplier, user)
- else if(istype(W, /obj/item/stack/sheet/plasteel))
- loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //12 matter for 1 plasteel sheet
- else if(istype(W, /obj/item/stack/sheet/plasmarglass))
- loaded = loadwithsheets(W, plasmarglassmultiplier*sheetmultiplier, user) //8 matter for one plasma rglass sheet
- else if(istype(W, /obj/item/stack/sheet/rglass))
- loaded = loadwithsheets(W, rglassmultiplier*sheetmultiplier, user) //6 matter for one rglass sheet
- else if(istype(W, /obj/item/stack/rods))
- loaded = loadwithsheets(W, sheetmultiplier * 0.5, user) // 2 matter for 1 rod, as 2 rods are produced from 1 metal
- else if(istype(W, /obj/item/stack/tile/plasteel))
- loaded = loadwithsheets(W, sheetmultiplier * 0.25, user) // 1 matter for 1 floortile, as 4 tiles are produced from 1 metal
+ loaded = TRUE
+ else if(istype(O, /obj/item/stack))
+ loaded = loadwithsheets(O, user)
if(loaded)
to_chat(user, "[src] now holds [matter]/[max_matter] matter-units.")
- else if(istype(W, /obj/item/rcd_upgrade))
- var/obj/item/rcd_upgrade/rcd_up = W
- if(!(upgrade & rcd_up.upgrade))
- upgrade |= rcd_up.upgrade
- if((rcd_up.upgrade & RCD_UPGRADE_SILO_LINK) && !silo_mats)
- silo_mats = AddComponent(/datum/component/remote_materials, "RCD", FALSE, FALSE)
- playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
- qdel(W)
- else
- return ..()
- update_icon() //ensures that ammo counters (if present) get updated
+ update_icon() //ensures that ammo counters (if present) get updated
+ return loaded
-/obj/item/construction/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
+/obj/item/construction/proc/loadwithsheets(obj/item/stack/S, mob/user)
+ var/value = S.matter_amount
+ if(value <= 0)
+ to_chat(user, "You can't insert [S.name] into [src]!")
+ return FALSE
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
if(maxsheets > 0)
var/amount_to_use = min(S.amount, maxsheets)
@@ -111,9 +126,9 @@ RLD
matter += value*amount_to_use
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
to_chat(user, "You insert [amount_to_use] [S.name] sheets into [src]. ")
- return 1
+ return TRUE
to_chat(user, "You can't insert any more [S.name] sheets into [src]!")
- return 0
+ return FALSE
/obj/item/construction/proc/activate()
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
@@ -204,6 +219,11 @@ RLD
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
+ var/window_glass = RCD_WINDOW_NORMAL
+ var/window_size = RCD_WINDOW_FULLTILE
+ var/furnish_type = /obj/structure/chair
+ var/furnish_cost = 8
+ var/furnish_delay = 10
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
var/delay_mod = 1
var/canRturf = FALSE //Variable for R walls to deconstruct them
@@ -214,26 +234,56 @@ RLD
user.visible_message("[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..")
return (BRUTELOSS)
-/obj/item/construction/rcd/verb/toggle_window_type_verb()
- set name = "RCD : Toggle Window Type"
+/obj/item/construction/rcd/verb/toggle_window_glass_verb()
+ set name = "RCD : Toggle Window Glass"
set category = "Object"
set src in view(1)
if(!usr.canUseTopic(src, BE_CLOSE))
return
- toggle_window_type(usr)
+ toggle_window_glass(usr)
-/obj/item/construction/rcd/proc/toggle_window_type(mob/user)
- var/window_type_name
- if (window_type == /obj/structure/window/fulltile)
- window_type = /obj/structure/window/reinforced/fulltile
- window_type_name = "reinforced glass"
+/obj/item/construction/rcd/verb/toggle_window_size_verb()
+ set name = "RCD : Toggle Window Size"
+ set category = "Object"
+ set src in view(1)
+
+ if(!usr.canUseTopic(src, BE_CLOSE))
+ return
+
+ toggle_window_size(usr)
+
+/// Toggles the usage of reinforced or normal glass
+/obj/item/construction/rcd/proc/toggle_window_glass(mob/user)
+ if (window_glass != RCD_WINDOW_REINFORCED)
+ set_window_type(user, RCD_WINDOW_REINFORCED, window_size)
+ return
+ set_window_type(user, RCD_WINDOW_NORMAL, window_size)
+
+/// Toggles the usage of directional or full tile windows
+/obj/item/construction/rcd/proc/toggle_window_size(mob/user)
+ if (window_size != RCD_WINDOW_DIRECTIONAL)
+ set_window_type(user, window_glass, RCD_WINDOW_DIRECTIONAL)
+ return
+ set_window_type(user, window_glass, RCD_WINDOW_FULLTILE)
+
+/// Sets the window type to be created based on parameters
+/obj/item/construction/rcd/proc/set_window_type(mob/user, glass, size)
+ window_glass = glass
+ window_size = size
+ if(window_glass == RCD_WINDOW_REINFORCED)
+ if(window_size == RCD_WINDOW_DIRECTIONAL)
+ window_type = /obj/structure/window/reinforced
+ else
+ window_type = /obj/structure/window/reinforced/fulltile
else
- window_type = /obj/structure/window/fulltile
- window_type_name = "glass"
+ if(window_size == RCD_WINDOW_DIRECTIONAL)
+ window_type = /obj/structure/window
+ else
+ window_type = /obj/structure/window/fulltile
- to_chat(user, "You change \the [src]'s window mode to [window_type_name].")
+ to_chat(user, "You change \the [src]'s window mode to [window_size] [window_glass] window.")
/obj/item/construction/rcd/proc/toggle_silo_link(mob/user)
if(silo_mats)
@@ -243,7 +293,7 @@ RLD
silo_link = !silo_link
to_chat(user, "You change \the [src]'s storage link state: [silo_link ? "ON" : "OFF"].")
else
- to_chat(user, "\the [src] dont have remote storage connection.")
+ to_chat(user, "\the [src] doesn't have remote storage connection.")
/obj/item/construction/rcd/proc/get_airlock_image(airlock_type)
var/obj/machinery/door/airlock/proto = airlock_type
@@ -282,7 +332,9 @@ RLD
var/list/solid_or_glass_choices = list(
"Solid" = get_airlock_image(/obj/machinery/door/airlock),
- "Glass" = get_airlock_image(/obj/machinery/door/airlock/glass)
+ "Glass" = get_airlock_image(/obj/machinery/door/airlock/glass),
+ "Windoor" = image(icon = 'icons/mob/radial.dmi', icon_state = "windoor"),
+ "Secure Windoor" = image(icon = 'icons/mob/radial.dmi', icon_state = "secure_windoor")
)
var/list/solid_choices = list(
@@ -403,10 +455,47 @@ RLD
else
airlock_type = /obj/machinery/door/airlock/glass
airlock_glass = TRUE
+ if("Windoor")
+ airlock_type = /obj/machinery/door/window
+ airlock_glass = TRUE
+ if("Secure Windoor")
+ airlock_type = /obj/machinery/door/window/brigdoor
+ airlock_glass = TRUE
else
airlock_type = /obj/machinery/door/airlock
airlock_glass = FALSE
+/// Radial menu for choosing the object you want to be created with the furnishing mode
+/obj/item/construction/rcd/proc/change_furnishing_type(mob/user)
+ if(!user)
+ return
+ var/static/list/choices = list(
+ "Chair" = image(icon = 'icons/mob/radial.dmi', icon_state = "chair"),
+ "Stool" = image(icon = 'icons/mob/radial.dmi', icon_state = "stool"),
+ "Table" = image(icon = 'icons/mob/radial.dmi', icon_state = "table"),
+ "Glass Table" = image(icon = 'icons/mob/radial.dmi', icon_state = "glass_table")
+ )
+ var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
+ if(!check_menu(user))
+ return
+ switch(choice)
+ if("Chair")
+ furnish_type = /obj/structure/chair
+ furnish_cost = 8
+ furnish_delay = 10
+ if("Stool")
+ furnish_type = /obj/structure/chair/stool
+ furnish_cost = 8
+ furnish_delay = 10
+ if("Table")
+ furnish_type = /obj/structure/table
+ furnish_cost = 16
+ furnish_delay = 20
+ if("Glass Table")
+ furnish_type = /obj/structure/table/glass
+ furnish_cost = 16
+ furnish_delay = 20
+
/obj/item/construction/rcd/proc/rcd_create(atom/A, mob/user)
var/list/rcd_results = A.rcd_vals(user, src)
if(!rcd_results)
@@ -453,6 +542,10 @@ RLD
choices += list(
"Silo Link" = image(icon = 'icons/obj/mining.dmi', icon_state = "silo"),
)
+ if(upgrade & RCD_UPGRADE_FURNISHING)
+ choices += list(
+ "Furnishing" = image(icon = 'icons/mob/radial.dmi', icon_state = "chair")
+ )
if(mode == RCD_AIRLOCK)
choices += list(
"Change Access" = image(icon = 'icons/mob/radial.dmi', icon_state = "access"),
@@ -460,7 +553,12 @@ RLD
)
else if(mode == RCD_WINDOWGRILLE)
choices += list(
- "Change Window Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "windowtype")
+ "Change Window Glass" = image(icon = 'icons/mob/radial.dmi', icon_state = "windowtype"),
+ "Change Window Size" = image(icon = 'icons/mob/radial.dmi', icon_state = "windowsize")
+ )
+ else if(mode == RCD_FURNISHING)
+ choices += list(
+ "Change Furnishing Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "chair")
)
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
if(!check_menu(user))
@@ -476,6 +574,8 @@ RLD
mode = RCD_WINDOWGRILLE
if("Machine Frames")
mode = RCD_MACHINE
+ if("Furnishing")
+ mode = RCD_FURNISHING
if("Computer Frames")
mode = RCD_COMPUTER
change_computer_dir(user)
@@ -486,8 +586,14 @@ RLD
if("Change Airlock Type")
change_airlock_setting(user)
return
- if("Change Window Type")
- toggle_window_type(user)
+ if("Change Window Glass")
+ toggle_window_glass(user)
+ return
+ if("Change Window Size")
+ toggle_window_size(user)
+ return
+ if("Change Furnishing Type")
+ change_furnishing_type(user)
return
if("Silo Link")
toggle_silo_link(user)
@@ -534,6 +640,7 @@ RLD
no_ammo_message = "Insufficient charge."
desc = "A device used to rapidly build walls and floors."
canRturf = TRUE
+ banned_upgrades = RCD_UPGRADE_SILO_LINK
var/energyfactor = 72
@@ -600,7 +707,7 @@ RLD
name = "admin RCD"
max_matter = INFINITY
matter = INFINITY
- upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS
+ upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING
// Ranged RCD
@@ -893,6 +1000,10 @@ RLD
desc = "It contains direct silo connection RCD upgrade."
upgrade = RCD_UPGRADE_SILO_LINK
+/obj/item/rcd_upgrade/furnishing
+ desc = "It contains the design for chairs, stools, tables, and glass tables."
+ upgrade = RCD_UPGRADE_FURNISHING
+
#undef GLOW_MODE
#undef LIGHT_MODE
#undef REMOVE_MODE
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index b5142017b14..053baeafc96 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -24,6 +24,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
hitsound = 'sound/weapons/gun/general/grenade_launch.ogg'
embedding = list()
novariants = TRUE
+ matter_amount = 2
/obj/item/stack/rods/suicide_act(mob/living/carbon/user)
user.visible_message("[user] begins to stuff \the [src] down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide!")//it looks like theyre ur mum
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index 16419573993..486f56c4061 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -27,6 +27,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
material_type = /datum/material/glass
point_value = 1
tableVariant = /obj/structure/table/glass
+ matter_amount = 4
/obj/item/stack/sheet/glass/suicide_act(mob/living/carbon/user)
user.visible_message("[user] begins to slice [user.p_their()] neck with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!")
@@ -143,6 +144,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
merge_type = /obj/item/stack/sheet/rglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/iron = 10)
point_value = 4
+ matter_amount = 6
/obj/item/stack/sheet/rglass/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
@@ -189,6 +191,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
merge_type = /obj/item/stack/sheet/plasmarglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10)
point_value = 23
+ matter_amount = 8
/obj/item/stack/sheet/plasmarglass/get_main_recipes()
. = ..()
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 728a4b32bd7..de46d12aea3 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -108,6 +108,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
point_value = 2
tableVariant = /obj/structure/table
material_type = /datum/material/iron
+ matter_amount = 4
/obj/item/stack/sheet/metal/narsie_act()
new /obj/item/stack/sheet/runed_metal(loc, amount)
@@ -167,6 +168,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
point_value = 23
tableVariant = /obj/structure/table/reinforced
material_flags = MATERIAL_NO_EFFECTS
+ matter_amount = 12
/obj/item/stack/sheet/plasteel/get_main_recipes()
. = ..()
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 0099c33e6ec..b4bffe6ccfd 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -38,6 +38,8 @@
var/absorption_capacity
/// How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in ticks is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first
var/absorption_rate
+ /// Amount of matter for RCD
+ var/matter_amount = 0
/obj/item/stack/on_grind()
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index fcd0328a9cf..1c4b243c2ee 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -339,6 +339,7 @@
mineralType = "metal"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
+ matter_amount = 1
/obj/item/stack/tile/plasteel/cyborg
custom_materials = null // All other Borg versions of items have no Metal or Glass - RR
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 993bed6f80a..6cba435b139 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -50,10 +50,9 @@
if(RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
if(RCD_WINDOWGRILLE)
- if(the_rcd.window_type == /obj/structure/window/reinforced/fulltile)
+ if(the_rcd.window_glass == RCD_WINDOW_REINFORCED)
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 12)
- else
- return list("mode" = RCD_WINDOWGRILLE, "delay" = 20, "cost" = 8)
+ return list("mode" = RCD_WINDOWGRILLE, "delay" = 20, "cost" = 8)
return FALSE
/obj/structure/grille/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
@@ -63,10 +62,14 @@
qdel(src)
return TRUE
if(RCD_WINDOWGRILLE)
- if(locate(/obj/structure/window) in loc)
+ if(!isturf(loc))
+ return FALSE
+ var/turf/T = loc
+ var/window_dir = the_rcd.window_size == RCD_WINDOW_FULLTILE ? FULLTILE_WINDOW_DIR : user.dir
+ if(!valid_window_location(T, window_dir))
return FALSE
to_chat(user, "You construct the window.")
- var/obj/structure/window/WD = new the_rcd.window_type(drop_location())
+ var/obj/structure/window/WD = new the_rcd.window_type(T, window_dir)
WD.set_anchored(TRUE)
return TRUE
return FALSE
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index badc82ec316..081d31aaff1 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -239,6 +239,20 @@
new framestack(T, framestackamount)
qdel(src)
+/obj/structure/table/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
+ switch(the_rcd.mode)
+ if(RCD_DECONSTRUCT)
+ return list("mode" = RCD_DECONSTRUCT, "delay" = 24, "cost" = 16)
+ return FALSE
+
+/obj/structure/table/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
+ switch(passed_mode)
+ if(RCD_DECONSTRUCT)
+ to_chat(user, "You deconstruct the table.")
+ qdel(src)
+ return TRUE
+ return FALSE
+
/obj/structure/table/greyscale
icon = 'icons/obj/smooth_structures/table_greyscale.dmi'
diff --git a/code/game/turfs/open/floor.dm b/code/game/turfs/open/floor.dm
index 8691db8d43f..be0c581a7dc 100644
--- a/code/game/turfs/open/floor.dm
+++ b/code/game/turfs/open/floor.dm
@@ -255,6 +255,8 @@
return list("mode" = RCD_MACHINE, "delay" = 20, "cost" = 25)
if(RCD_COMPUTER)
return list("mode" = RCD_COMPUTER, "delay" = 20, "cost" = 25)
+ if(RCD_FURNISHING)
+ return list("mode" = RCD_FURNISHING, "delay" = the_rcd.furnish_delay, "cost" = the_rcd.furnish_cost)
return FALSE
/turf/open/floor/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
@@ -264,23 +266,33 @@
PlaceOnTop(/turf/closed/wall)
return TRUE
if(RCD_AIRLOCK)
- if(locate(/obj/machinery/door/airlock) in src)
+ if(locate(/obj/machinery/door) in src)
return FALSE
+ if(ispath(the_rcd.airlock_type, /obj/machinery/door/window))
+ to_chat(user, "You build a windoor.")
+ var/obj/machinery/door/window/new_window = new the_rcd.airlock_type(src, user.dir)
+ if(the_rcd.airlock_electronics)
+ new_window.req_access = the_rcd.airlock_electronics.accesses.Copy()
+ new_window.req_one_access = the_rcd.airlock_electronics.one_access
+ new_window.unres_sides = the_rcd.airlock_electronics.unres_sides
+ new_window.autoclose = TRUE
+ new_window.update_icon()
+ return TRUE
to_chat(user, "You build an airlock.")
- var/obj/machinery/door/airlock/A = new the_rcd.airlock_type(src)
- A.electronics = new /obj/item/electronics/airlock(A)
+ var/obj/machinery/door/airlock/new_airlock = new the_rcd.airlock_type(src)
+ new_airlock.electronics = new /obj/item/electronics/airlock(new_airlock)
if(the_rcd.airlock_electronics)
- A.electronics.accesses = the_rcd.airlock_electronics.accesses.Copy()
- A.electronics.one_access = the_rcd.airlock_electronics.one_access
- A.electronics.unres_sides = the_rcd.airlock_electronics.unres_sides
- if(A.electronics.one_access)
- A.req_one_access = A.electronics.accesses
+ new_airlock.electronics.accesses = the_rcd.airlock_electronics.accesses.Copy()
+ new_airlock.electronics.one_access = the_rcd.airlock_electronics.one_access
+ new_airlock.electronics.unres_sides = the_rcd.airlock_electronics.unres_sides
+ if(new_airlock.electronics.one_access)
+ new_airlock.req_one_access = new_airlock.electronics.accesses
else
- A.req_access = A.electronics.accesses
- if(A.electronics.unres_sides)
- A.unres_sides = A.electronics.unres_sides
- A.autoclose = TRUE
- A.update_icon()
+ new_airlock.req_access = new_airlock.electronics.accesses
+ if(new_airlock.electronics.unres_sides)
+ new_airlock.unres_sides = new_airlock.electronics.unres_sides
+ new_airlock.autoclose = TRUE
+ new_airlock.update_icon()
return TRUE
if(RCD_DECONSTRUCT)
if(!ScrapeAway(flags = CHANGETURF_INHERIT_AIR))
@@ -291,26 +303,31 @@
if(locate(/obj/structure/grille) in src)
return FALSE
to_chat(user, "You construct the grille.")
- var/obj/structure/grille/G = new(src)
- G.set_anchored(TRUE)
+ var/obj/structure/grille/new_grille = new(src)
+ new_grille.set_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.set_anchored(TRUE)
+ var/obj/structure/frame/machine/new_machine = new(src)
+ new_machine.state = 2
+ new_machine.icon_state = "box_1"
+ new_machine.set_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.set_anchored(TRUE)
- C.state = 1
- C.setDir(the_rcd.computer_dir)
+ var/obj/structure/frame/computer/new_computer = new(src)
+ new_computer.set_anchored(TRUE)
+ new_computer.state = 1
+ new_computer.setDir(the_rcd.computer_dir)
+ return TRUE
+ if(RCD_FURNISHING)
+ if(locate(the_rcd.furnish_type) in src)
+ return FALSE
+ var/atom/new_furnish = new the_rcd.furnish_type(src)
+ new_furnish.setDir(user.dir)
return TRUE
-
return FALSE
/turf/open/floor/material
diff --git a/code/modules/mining/aux_base_camera.dm b/code/modules/mining/aux_base_camera.dm
index 988a83d8392..b69fb772fc1 100644
--- a/code/modules/mining/aux_base_camera.dm
+++ b/code/modules/mining/aux_base_camera.dm
@@ -210,13 +210,13 @@
/datum/action/innate/aux_base/window_type
- name = "Select Window Type"
+ name = "Select Window Glass"
button_icon_state = "window_select"
/datum/action/innate/aux_base/window_type/Activate()
if(..())
return
- B.RCD.toggle_window_type()
+ B.RCD.toggle_window_glass()
/datum/action/innate/aux_base/place_fan
name = "Place Tiny Fan"
diff --git a/code/modules/research/designs/tool_designs.dm b/code/modules/research/designs/tool_designs.dm
index 3eb106ce1ef..99fd14aabc1 100644
--- a/code/modules/research/designs/tool_designs.dm
+++ b/code/modules/research/designs/tool_designs.dm
@@ -73,6 +73,16 @@
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
+/datum/design/rcd_upgrade/furnishing
+ name = "RCD furnishing upgrade"
+ desc = "Adds the ability to furnish areas using the RCD."
+ id = "rcd_upgrade_furnishing"
+ build_type = PROTOLATHE
+ materials = list(/datum/material/iron = 5000, /datum/material/glass = 2500, /datum/material/silver = 1500, /datum/material/titanium = 2000)
+ build_path = /obj/item/rcd_upgrade/furnishing
+ category = list("Tool Designs")
+ departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
+
/datum/design/rcd_upgrade/silo_link
name = "Advanced RCD silo link upgrade"
desc = "Upgrades the RCD to be able to pull materials from the ore silo. The RCD must be linked to the silo using a multitool before it will function."
diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm
index 7e71f86788b..71f0bb000e0 100644
--- a/code/modules/research/techweb/all_nodes.dm
+++ b/code/modules/research/techweb/all_nodes.dm
@@ -583,7 +583,7 @@
id = "rcd_upgrade"
display_name = "RCD designs upgrade"
description = "Unlocks new RCD designs."
- design_ids = list("rcd_upgrade_frames", "rcd_upgrade_simple_circuits")
+ design_ids = list("rcd_upgrade_frames", "rcd_upgrade_simple_circuits", "rcd_upgrade_furnishing")
prereq_ids = list("adv_engi")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000
diff --git a/icons/mob/radial.dmi b/icons/mob/radial.dmi
index d2d032fbbb4..6e5c79cc34d 100644
Binary files a/icons/mob/radial.dmi and b/icons/mob/radial.dmi differ