Merge pull request #9089 from Sishen1542/rapid-construction-dabvice
RCDs can be upgraded to create computer/machine frames, moved deconstruction to the upgrade tier
This commit is contained in:
@@ -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, "<span class='notice'>[src] now holds [matter]/[max_matter] matter-units.</span>")
|
||||
else if(istype(W, /obj/item/rcd_upgrade))
|
||||
to_chat(user, "<span class='notice'>You upgrade the RCD with the [W]!</span>")
|
||||
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
|
||||
@@ -511,6 +551,7 @@ RLD
|
||||
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
|
||||
desc = "A device used to rapidly build walls and floors."
|
||||
canRturf = TRUE
|
||||
upgrade = TRUE
|
||||
|
||||
|
||||
/obj/item/construction/rcd/borg/useResource(amount, mob/user)
|
||||
@@ -542,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!"
|
||||
@@ -582,7 +626,7 @@ RLD
|
||||
name = "admin RCD"
|
||||
max_matter = INFINITY
|
||||
matter = INFINITY
|
||||
|
||||
upgrade = TRUE
|
||||
|
||||
// Ranged RCD
|
||||
|
||||
@@ -776,6 +820,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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user