mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 16:38:18 +01:00
Merge pull request #174 from Azarak/rcd-update
Ports all the RCD changes, updates from Citadel
This commit is contained in:
@@ -109,3 +109,8 @@
|
||||
#define RCD_AIRLOCK 2
|
||||
#define RCD_DECONSTRUCT 3
|
||||
#define RCD_WINDOWGRILLE 4
|
||||
#define RCD_MACHINE 8
|
||||
#define RCD_COMPUTER 16
|
||||
|
||||
#define RCD_UPGRADE_FRAMES 1
|
||||
#define RCD_UPGRADE_SIMPLE_CIRCUITS 2
|
||||
|
||||
@@ -1408,6 +1408,9 @@
|
||||
/obj/machinery/door/airlock/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
if(security_level != AIRLOCK_SECURITY_NONE && the_rcd.canRturf != TRUE)
|
||||
to_chat(user, "<span class='notice'>[src]'s reinforcement needs to be removed first.</span>")
|
||||
return FALSE
|
||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 32)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -450,6 +450,21 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/firelock_frame/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
if((constructionStep == CONSTRUCTION_NOCIRCUIT) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
|
||||
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/firelock_frame/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_UPGRADE_SIMPLE_CIRCUITS)
|
||||
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
|
||||
"<span class='notice'>You adapt a firelock circuit and slot it into the assembly.</span>")
|
||||
constructionStep = CONSTRUCTION_GUTTED
|
||||
update_icon()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/firelock_frame/heavy
|
||||
name = "heavy firelock frame"
|
||||
reinforced = TRUE
|
||||
|
||||
@@ -252,6 +252,20 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/firealarm/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
if((buildstage == 0) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
|
||||
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/firealarm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_UPGRADE_SIMPLE_CIRCUITS)
|
||||
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
|
||||
"<span class='notice'>You adapt a fire alarm circuit and slot it into the assembly.</span>")
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/firealarm/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
|
||||
@@ -435,3 +435,44 @@
|
||||
animate(src, alpha = 0, transform = skew, time = duration)
|
||||
else
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/constructing_effect
|
||||
icon = 'icons/effects/effects_rcd.dmi'
|
||||
icon_state = ""
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
anchored = TRUE
|
||||
var/status = 0
|
||||
var/delay = 0
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/constructing_effect/Initialize(mapload, rcd_delay, rcd_status)
|
||||
. = ..()
|
||||
status = rcd_status
|
||||
delay = rcd_delay
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
addtimer(CALLBACK(src, .proc/update_icon), 11)
|
||||
delay -= 11
|
||||
icon_state = "rcd_end_reverse"
|
||||
else
|
||||
update_icon()
|
||||
|
||||
/obj/effect/constructing_effect/update_icon()
|
||||
icon_state = "rcd"
|
||||
if (delay < 10)
|
||||
icon_state += "_shortest"
|
||||
else if (delay < 20)
|
||||
icon_state += "_shorter"
|
||||
else if (delay < 37)
|
||||
icon_state += "_short"
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
icon_state += "_reverse"
|
||||
|
||||
/obj/effect/constructing_effect/proc/end_animation()
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
qdel(src)
|
||||
else
|
||||
icon_state = "rcd_end"
|
||||
addtimer(CALLBACK(src, .proc/end), 15)
|
||||
|
||||
/obj/effect/constructing_effect/proc/end()
|
||||
qdel(src)
|
||||
+108
-32
@@ -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()
|
||||
. = ..()
|
||||
@@ -45,8 +46,12 @@ RLD
|
||||
spark_system.attach(src)
|
||||
|
||||
/obj/item/construction/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "\A [src]. It currently holds [matter]/[max_matter] matter-units." )
|
||||
. = ..()
|
||||
to_chat(user, "It currently holds [matter]/[max_matter] matter-units." )
|
||||
if(upgrade & RCD_UPGRADE_FRAMES)
|
||||
to_chat(user, "It contains the design for machine frames, computer frames and deconstruction." )
|
||||
if(upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS)
|
||||
to_chat(user, "It contains the design for firelock, air alarm, fire alarm, apc circuits and crap power cells.")
|
||||
|
||||
/obj/item/construction/Destroy()
|
||||
QDEL_NULL(spark_system)
|
||||
@@ -82,6 +87,13 @@ 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>")
|
||||
var/obj/item/rcd_upgrade/rcd_up = W
|
||||
if(!(upgrade & rcd_up.upgrade))
|
||||
upgrade |= rcd_up.upgrade
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
qdel(W)
|
||||
else
|
||||
return ..()
|
||||
update_icon() //ensures that ammo counters (if present) get updated
|
||||
@@ -110,10 +122,10 @@ RLD
|
||||
if(matter < amount)
|
||||
if(user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
return FALSE
|
||||
matter -= amount
|
||||
update_icon()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/proc/checkResource(amount, mob/user)
|
||||
. = matter >= amount
|
||||
@@ -127,15 +139,14 @@ RLD
|
||||
if(!(A in range(custom_range, get_turf(user))))
|
||||
to_chat(user, "<span class='warning'>The \'Out of Range\' light on [src] blinks red.</span>")
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/proc/prox_check(proximity)
|
||||
if(proximity)
|
||||
return TRUE
|
||||
else
|
||||
var/view_range = user.client ? user.client.view : world.view
|
||||
//if user can't be seen from A (only checks surroundings' opaqueness) and can't see A.
|
||||
//jarring, but it should stop people from targetting atoms they can't see...
|
||||
//excluding darkness, to allow RLD to be used to light pitch black dark areas.
|
||||
if(!((user in view(view_range, A)) || (user in viewers(view_range, A))))
|
||||
to_chat(user, "<span class='warning'>You focus, pointing \the [src] at whatever outside your field of vision in the given direction... to no avail.</span>")
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/rcd
|
||||
name = "rapid-construction-device (RCD)"
|
||||
@@ -148,6 +159,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
|
||||
@@ -218,11 +230,10 @@ RLD
|
||||
|
||||
t1 += "<p><a href='?src=[REF(src)];close=1'>Close</a></p>\n"
|
||||
|
||||
var/datum/browser/popup = new(user, "rcd_access", "Access Control", 900, 500)
|
||||
var/datum/browser/popup = new(user, "rcd_access", "Access Control", 900, 500, src)
|
||||
popup.set_content(t1)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.open()
|
||||
onclose(user, "rcd_access")
|
||||
|
||||
/obj/item/construction/rcd/Topic(href, href_list)
|
||||
..()
|
||||
@@ -270,6 +281,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
|
||||
@@ -412,15 +445,22 @@ RLD
|
||||
var/list/rcd_results = A.rcd_vals(user, src)
|
||||
if(!rcd_results)
|
||||
return FALSE
|
||||
if(do_after(user, rcd_results["delay"] * delay_mod, target = A))
|
||||
var/delay = rcd_results["delay"] * delay_mod
|
||||
var/obj/effect/constructing_effect/rcd_effect = new(get_turf(A), delay, src.mode)
|
||||
var/turf/the_turf = get_turf(A)
|
||||
var/turf_coords = "[COORD(the_turf)]"
|
||||
investigate_log("[user] is attempting to use [src] on [A] (loc [turf_coords] at [the_turf]) with cost [rcd_results["cost"]], delay [rcd_results["delay"]], mode [rcd_results["mode"]].", INVESTIGATE_RCD)
|
||||
if(do_after(user, delay, target = A))
|
||||
if(checkResource(rcd_results["cost"], user))
|
||||
var/atom/cached = A
|
||||
if(A.rcd_act(user, src, rcd_results["mode"]))
|
||||
rcd_effect.end_animation()
|
||||
useResource(rcd_results["cost"], user)
|
||||
activate()
|
||||
investigate_log("[user] used [src] on [cached] (now [A]) with cost [rcd_results["cost"]], delay [rcd_results["delay"]], mode [rcd_results["mode"]].", INVESTIGATE_RCD)
|
||||
investigate_log("[user] used [src] on [cached] (loc [turf_coords] at [the_turf]) with cost [rcd_results["cost"]], delay [rcd_results["delay"]], mode [rcd_results["mode"]].", INVESTIGATE_RCD)
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
return TRUE
|
||||
qdel(rcd_effect)
|
||||
|
||||
/obj/item/construction/rcd/Initialize()
|
||||
. = ..()
|
||||
@@ -434,10 +474,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 & RCD_UPGRADE_FRAMES)
|
||||
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 +504,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
|
||||
@@ -481,7 +532,12 @@ RLD
|
||||
|
||||
/obj/item/construction/rcd/afterattack(atom/A, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!prox_check(proximity))
|
||||
if(!proximity)
|
||||
if(!ranged || !range_check(A,user)) //early return not-in-range sanity.
|
||||
return
|
||||
if(target_check(A,user))
|
||||
user.Beam(A,icon_state="rped_upgrade",time=30)
|
||||
rcd_create(A,user)
|
||||
return
|
||||
rcd_create(A, user)
|
||||
|
||||
@@ -511,6 +567,8 @@ RLD
|
||||
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
|
||||
desc = "A device used to rapidly build walls and floors."
|
||||
canRturf = TRUE
|
||||
upgrade = TRUE
|
||||
var/energyfactor = 72
|
||||
|
||||
|
||||
/obj/item/construction/rcd/borg/useResource(amount, mob/user)
|
||||
@@ -521,7 +579,7 @@ RLD
|
||||
if(user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
. = borgy.cell.use(amount * 72) //borgs get 1.3x the use of their RCDs
|
||||
. = borgy.cell.use(amount * energyfactor) //borgs get 1.3x the use of their RCDs
|
||||
if(!. && user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
@@ -534,19 +592,29 @@ RLD
|
||||
if(user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
. = borgy.cell.charge >= (amount * 72)
|
||||
. = borgy.cell.charge >= (amount * energyfactor)
|
||||
if(!. && user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/construction/rcd/borg/syndicate
|
||||
icon_state = "ircd"
|
||||
item_state = "ircd"
|
||||
energyfactor = 66
|
||||
|
||||
/obj/item/construction/rcd/loaded
|
||||
materials = list(MAT_METAL=48000, MAT_GLASS=32000)
|
||||
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!"
|
||||
icon_state = "ircd"
|
||||
item_state = "ircd"
|
||||
upgrade = TRUE
|
||||
max_matter = 500
|
||||
matter = 500
|
||||
canRturf = TRUE
|
||||
@@ -557,6 +625,7 @@ RLD
|
||||
item_state = "ircd"
|
||||
max_matter = 500
|
||||
matter = 500
|
||||
upgrade = TRUE
|
||||
delay_mod = 0.6
|
||||
sheetmultiplier = 8
|
||||
|
||||
@@ -582,7 +651,8 @@ RLD
|
||||
name = "admin RCD"
|
||||
max_matter = INFINITY
|
||||
matter = INFINITY
|
||||
|
||||
upgrade = TRUE
|
||||
ranged = TRUE
|
||||
|
||||
// Ranged RCD
|
||||
|
||||
@@ -593,25 +663,16 @@ RLD
|
||||
max_matter = 300
|
||||
matter = 300
|
||||
delay_mod = 0.6
|
||||
upgrade = TRUE
|
||||
ranged = TRUE
|
||||
icon_state = "arcd"
|
||||
item_state = "oldrcd"
|
||||
has_ammobar = FALSE
|
||||
|
||||
/obj/item/construction/rcd/arcd/afterattack(atom/A, mob/user)
|
||||
. = ..()
|
||||
if(!range_check(A,user))
|
||||
return
|
||||
if(target_check(A,user))
|
||||
user.Beam(A,icon_state="rped_upgrade",time=30)
|
||||
rcd_create(A,user)
|
||||
|
||||
|
||||
|
||||
// RAPID LIGHTING DEVICE
|
||||
|
||||
|
||||
|
||||
/obj/item/construction/rld
|
||||
name = "rapid-light-device (RLD)"
|
||||
desc = "A device used to rapidly provide lighting sources to an area. Reload with metal, plasteel, glass or compressed matter cartridges."
|
||||
@@ -776,6 +837,21 @@ RLD
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/rcd_upgrade
|
||||
name = "RCD advanced design disk"
|
||||
desc = "It seems to be empty."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "datadisk3"
|
||||
var/upgrade
|
||||
|
||||
/obj/item/rcd_upgrade/frames
|
||||
desc = "It contains the design for machine frames, computer frames and deconstruction."
|
||||
upgrade = RCD_UPGRADE_FRAMES
|
||||
|
||||
/obj/item/rcd_upgrade/simple_circuits
|
||||
desc = "It contains the design for firelock, air alarm, fire alarm, apc circuits and crap power cells."
|
||||
upgrade = RCD_UPGRADE_SIMPLE_CIRCUITS
|
||||
|
||||
#undef GLOW_MODE
|
||||
#undef LIGHT_MODE
|
||||
#undef REMOVE_MODE
|
||||
#undef REMOVE_MODE
|
||||
@@ -34,6 +34,7 @@
|
||||
new /obj/item/storage/photo_album/CE(src)
|
||||
new /obj/item/storage/lockbox/medal/engineering(src)
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/ce(src)
|
||||
new /obj/item/construction/rcd/loaded/upgraded(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical
|
||||
name = "electrical supplies locker"
|
||||
|
||||
@@ -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)
|
||||
@@ -263,7 +267,7 @@
|
||||
A.autoclose = TRUE
|
||||
return TRUE
|
||||
if(RCD_DECONSTRUCT)
|
||||
if(ScrapeAway() == src)
|
||||
if(!ScrapeAway(flags = CHANGETURF_INHERIT_AIR))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You deconstruct [src].</span>")
|
||||
return TRUE
|
||||
@@ -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.state = 1
|
||||
C.setDir(the_rcd.computer_dir)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -822,6 +822,21 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/airalarm/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
if((buildstage == 0) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
|
||||
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/airalarm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_UPGRADE_SIMPLE_CIRCUITS)
|
||||
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
|
||||
"<span class='notice'>You adapt an air alarm circuit and slot it into the assembly.</span>")
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/airalarm/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc))
|
||||
|
||||
@@ -701,6 +701,52 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/apc/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
if(the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS)
|
||||
if(!has_electronics)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
|
||||
return FALSE
|
||||
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
|
||||
else if(!cell)
|
||||
if(stat & MAINT)
|
||||
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
|
||||
return FALSE
|
||||
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 50, "cost" = 10) //16 for a wall
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] has both electronics and a cell.</span>")
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/power/apc/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_UPGRADE_SIMPLE_CIRCUITS)
|
||||
if(!has_electronics)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
|
||||
"<span class='notice'>You adapt a power control board and click it into place in [src]'s guts.</span>")
|
||||
has_electronics = TRUE
|
||||
locked = TRUE
|
||||
return TRUE
|
||||
else if(!cell)
|
||||
if(stat & MAINT)
|
||||
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
|
||||
return FALSE
|
||||
var/obj/item/stock_parts/cell/crap/empty/C = new(src)
|
||||
C.forceMove(src)
|
||||
cell = C
|
||||
chargecount = 0
|
||||
user.visible_message("<span class='notice'>[user] fabricates a weak power cell and places it into [src].</span>", \
|
||||
"<span class='warning'>Your [the_rcd.name] whirrs with strain as you create a weak power cell and place it into [src]!</span>")
|
||||
update_icon()
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] has both electronics and a cell.</span>")
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/power/apc/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc))
|
||||
|
||||
@@ -423,6 +423,26 @@
|
||||
////////////Tools//////////////
|
||||
///////////////////////////////
|
||||
|
||||
/datum/design/rcd_upgrade/frames
|
||||
name = "RCD frames designs upgrade"
|
||||
desc = "Adds the computer frame and machine frame to the RCD."
|
||||
id = "rcd_upgrade_frames"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 2500, MAT_SILVER = 1500, MAT_TITANIUM = 2000)
|
||||
build_path = /obj/item/rcd_upgrade/frames
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
|
||||
|
||||
/datum/design/rcd_upgrade/simple_circuits
|
||||
name = "RCD simple circuits designs upgrade"
|
||||
desc = "Adds the simple circuits to the RCD."
|
||||
id = "rcd_upgrade_simple_circuits"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 2500, MAT_SILVER = 1500, MAT_TITANIUM = 2000)
|
||||
build_path = /obj/item/rcd_upgrade/simple_circuits
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
|
||||
|
||||
/datum/design/exwelder
|
||||
name = "Experimental Welding Tool"
|
||||
desc = "An experimental welder capable of self-fuel generation."
|
||||
@@ -453,6 +473,26 @@
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
|
||||
|
||||
/datum/design/rcd_loaded
|
||||
name = "Rapid Construction Device (RCD)"
|
||||
desc = "A tool that can construct and deconstruct walls, airlocks and floors on the fly."
|
||||
id = "rcd_loaded"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL=48000, MAT_GLASS=32000) // costs more than what it did in the autolathe, this one comes loaded.
|
||||
build_path = /obj/item/construction/rcd/loaded
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
|
||||
|
||||
/datum/design/pipe_dispenser
|
||||
name = "Rapid Pipe Dispenser (RPD)"
|
||||
desc = "A tool that can construct and deconstruct pipes on the fly."
|
||||
id = "pipe_dispenser"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 75000, MAT_GLASS = 37500)
|
||||
build_path = /obj/item/pipe_dispenser
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
|
||||
|
||||
/datum/design/alienwrench
|
||||
name = "Alien Wrench"
|
||||
desc = "An advanced wrench obtained through Abductor technology."
|
||||
|
||||
@@ -173,7 +173,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", "double_emergency_oxygen")
|
||||
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "double_emergency_oxygen","rcd_loaded", "pipe_dispenser","rcd_upgrade_frames", "rcd_upgrade_simple_circuits")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000)
|
||||
export_price = 5000
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/obj/item/storage/bag/construction = 5,
|
||||
/obj/item/clothing/glasses/welding = 5,
|
||||
/obj/item/multitool = 5,
|
||||
/obj/item/construction/rcd/loaded = 3,
|
||||
/obj/item/construction/rcd/loaded/upgraded = 3,
|
||||
/obj/item/grenade/chem_grenade/smart_metal_foam = 10,
|
||||
/obj/item/geiger_counter = 6,
|
||||
/obj/item/stock_parts/cell/high = 10,
|
||||
|
||||
Reference in New Issue
Block a user