Skip to content

Commit

Permalink
[PORT] RCD rework (roundstart engi RCDs, cooling, disrupting, etc) (#…
Browse files Browse the repository at this point in the history
…2107)

* Gives engineers the RCD round start and nerfs its base abilities to compensate (#77641)

## About The Pull Request
- Gives engineers an RCD as part of their round start equipment
- RCD by default will build/deconstruct slower if you already have
another one in progress. This can be upgraded with the new cooling
upgrade disk. Reconstructing (anything that was there roundstart as per
the destructive scan) doesn't have this downside, only
construction/deconstruction.
- RCD construction effects can now be attacked in order to cancel them.
This can be deterred with the anti-disruption upgrade disk.
- RCDs for nukies and whatever don't have these downsides
- The CE's roundstart RCD also doesn't have these downsides

## Why It's Good For The Game
Construction and reconstruction are currently one of the worst aspects
of SS13--they are so slow and tedious that any sort of mass destruction
goes unfixed for 10-30+ minutes, if fixed at all. This limits us because
it means people don't want traitors to create large explosions, for
instance--I do and so I think it's crucial that we fix construction.

Reconstruction has already been improved on the RCD with the destructive
scans, but I see no reason to limit this to something so out of the way.

Ideally the RCD even gets more functionalities, like the ability to
print stock parts (or having stock parts removed), etc, in order to
lessen this burden.

## Changelog
:cl:
add: Engineers now have an RCD round start.
balance: RCD construction/deconstruction effects can now be attacked in
order to cancel them. You can get the anti-disruption upgrade disk to
prevent this.
balance: RCD construction/deconstruction is now slower if you already
have another effect up. This does not effect reconstruction.
balance: Both of the above effects do not effect the CE's roundstart
RCD, nor any other RCDs such as combat RCDs.
/:cl:

---------

Co-authored-by: Fikou <[email protected]>

* Fixes hitting RCD effects when they're done (#77896)

## About The Pull Request

tgstation/tgstation#77641 made it so that RCD
effects can be hit while they're constructing to stop their
construction. however, the construction effect itself lingers a bit
after things are done constructing, allowing it to eat up clicks. this
fixes it by removing the flag when it's done constructing.

## Why It's Good For The Game

fix good 👯 👯‍♂️ 👯‍♀️ 🎉 🏖️ 🐝 

## Changelog

:cl:
fix: You should no longer attack RCD effects when they're done
constructing.
/:cl:

* makes the rcd able to make girders (#76515)

## About The Pull Request

rcd can make girders at half the cost of making a wall in 1.3 seconds

## Why It's Good For The Game
more "rapid" than using iron for girders and putting whatever material
on it

## Changelog
:cl:
add: rcd can make girders now
/:cl:

* Fixes cost values of RCDs (#77650)

fixes cost values to be 1:1 of what the construction would have costed
in manual construction for the RCD. also changes all decaseconds to
seconds in code for clarity.

the biggest change is windows, they used to cost more than they needed
for manual construction:

grille - 4mu - 1 iron sheet - 100% efficiency
directional normal window - 6mu - 1 glass sheet - 66% efficiency
directional reinforced window - 9mu - 1 reinforced glass sheet - 66%
efficiency
fulltile normal window - 12mu - 2 glass sheets - 66% efficiency
fulltile reinforced window - 15mu - 2 reinforced glass sheets - 80%
efficiency

this PR fixes all of these to be 100% efficient by lowering their matter
costs, among some other items like racks or reflector frames.

consistency for material costs is good. most of these incorrect material
values are also for things that don't matter, like racks or reflector
frames. also decaseconds are gross looking in code

:cl:
fix: Some RCD constructs took more material than manual construction.
The RCD cost should be consistent in comparison to manual construction
now.
/:cl:

* RCD directional window qol & wall mount patch. Code improvements (#77858)

## About The Pull Request
Fixes #77852
RCD can build wall mounts on reinforced walls

Closes #77848
Not a fix so labelling this as a qol cause it was always intentional but
now RCD can build directional windows without building a grill first.
Saving some matter units from building a grill is a plus

Added auto doc for some procs & made the extra delay when building
multiple structures into a define

## Changelog
:cl:
fix: rcd can build wallmounts on reinforced walls
qol: rcd can build directional windows without requiring/building a
grill
/:cl:

* Fixes RCD'ing lattices in open space (#77895)

## About The Pull Request

If you RCD a lattice with floor/wall mode on icebox, it won't actually
place down the floor because the open space is not "space" - this
switches the check to openspace, allowing you to fix floors on icebox by
clicking on lattices. For some reason this would also cause you to waste
your matter units on this action.

## Why It's Good For The Game

fix good

## Changelog

:cl:
fix: You should be able to click on lattices on icebox with the RCD and
construct a floor now
/:cl:

* Fixes some construction bugs with airlocks & windoors (#78261)

## About The Pull Request
1. Fixes #77981. the airlock electronics `unres_sides` and
`unres_sensor` vars were not copied onto the windoor after its
construction was finished manually without RCD. Now a windoor assembly
is spawned and it is finished by the RCD just like you would do manually

2. Windoors created via RCD did not have any electronics installed
inside them. It would only copy the `access` and `passed_name` vars onto
the windoor, leaving its `electronics` var blank. It's also fixed by the
windoor assembly

3. Airlocks constructed via RCD now uses the `finish_door()` proc of an
airlock assembly to correctly complete an airlock. This proc does
important stuff such as adding the `/datum/component/shell` component
when the airlock electronics requests shell control and the RCD was
skipping over these steps. That's fixed now too

## Changelog
:cl:
fix: Manually constructed windoors have correct unrestricted accesses
applied to them
fix: Windoors created via RCD now actually have electronics inside them
fix: Airlocks constructed via RCD have the shell component correctly
installed inside them and have no other missing variables
/:cl:

* Maintenance drones can use RCDs, RPEDs, Spray Bottles, and Holosign Projectors (#81219)

## About The Pull Request

makes maintenance drones able to pick up RCD and RPEDs in order to use
for upgrading and repairing the station as per their laws state

you used to be unable to pick these up due to "using this item may break
your laws"
which made no sense since they could be used to repair and upgrade
station gear

this fixes that
## Why It's Good For The Game

drones can now easily repair and maintain station equipment like they
are programmed to do so

additionally with the use of RCD they no longer need to carry around
metal sheets and glass sheets all the time, making their job way easier
## Changelog
:cl:
balance: Maintenance drones now can use RPED, RCD, Holosign, and Spray
bottles
/:cl:

* Fix RCD-built doors being unaligned

---------

Co-authored-by: Mothblocks <[email protected]>
Co-authored-by: Fikou <[email protected]>
Co-authored-by: iwishforducks <[email protected]>
Co-authored-by: jimmyl <[email protected]>
Co-authored-by: SyncIt21 <[email protected]>
Co-authored-by: K4rlox <[email protected]>
  • Loading branch information
7 people authored Jun 26, 2024
1 parent 4a11ce8 commit e4cb655
Show file tree
Hide file tree
Showing 33 changed files with 384 additions and 189 deletions.
6 changes: 6 additions & 0 deletions code/__DEFINES/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,15 @@ GLOBAL_LIST_INIT(crafting_category, list(
#define RCD_FLOODLIGHT 8
#define RCD_WALLFRAME 9
#define RCD_REFLECTOR 10
#define RCD_GIRDER 11


#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_UPGRADE_ANTI_INTERRUPT (1<<4)
#define RCD_UPGRADE_NO_FREQUENT_USE_COOLDOWN (1<<5)

#define RPD_UPGRADE_UNWRENCH (1<<0)

Expand All @@ -213,6 +216,9 @@ GLOBAL_LIST_INIT(crafting_category, list(
/// How much less resources the RCD uses when reconstructing
#define RCD_MEMORY_COST_BUFF 8

/// If set to TRUE in rcd_vals, will bypass the cooldown on slowing down frequent use
#define RCD_RESULT_BYPASS_FREQUENT_USE_COOLDOWN "bypass_frequent_use_cooldown"

// Defines for the construction component
#define FORWARD 1
#define BACKWARD -1
Expand Down
1 change: 1 addition & 0 deletions code/__HELPERS/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
return defaults + list(
"cost" = defaults["cost"] / RCD_MEMORY_COST_BUFF,
"delay" = defaults["delay"] / RCD_MEMORY_SPEED_BUFF,
RCD_RESULT_BYPASS_FREQUENT_USE_COOLDOWN = TRUE,
)
else
return defaults
2 changes: 1 addition & 1 deletion code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@
if(security_level != AIRLOCK_SECURITY_NONE)
to_chat(user, span_notice("[src]'s reinforcement needs to be removed first."))
return FALSE
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 32)
return list("mode" = RCD_DECONSTRUCT, "delay" = 5 SECONDS, "cost" = 32)
return FALSE

/obj/machinery/door/airlock/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
Expand Down
19 changes: 19 additions & 0 deletions code/game/machinery/doors/airlock_electronics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,25 @@
. = ..()
. += span_notice("Has a neat <i>selection menu</i> for modifying airlock access levels.")

/**
* Create a copy of the electronics
* Arguments
* * [location][atom]- the location to create the new copy in
*/
/obj/item/electronics/airlock/proc/create_copy(atom/location)
//create a copy
var/obj/item/electronics/airlock/new_electronics = new(location)
//copy all params
new_electronics.accesses = accesses.Copy()
new_electronics.one_access = one_access
new_electronics.unres_sides = unres_sides
new_electronics.passed_name = passed_name
new_electronics.passed_cycle_id = passed_cycle_id
new_electronics.shell = shell
//return copy
return new_electronics


/obj/item/electronics/airlock/ui_state(mob/user)
return GLOB.hands_state

Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,9 @@

/obj/structure/firelock_frame/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if(the_rcd.mode == RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 16)
return list("mode" = RCD_DECONSTRUCT, "delay" = 5 SECONDS, "cost" = 16)
else if((constructionStep == CONSTRUCTION_NO_CIRCUIT) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 2 SECONDS, "cost" = 1)
return FALSE

/obj/structure/firelock_frame/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/windowdoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
/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 list("mode" = RCD_DECONSTRUCT, "delay" = 5 SECONDS, "cost" = 32)
return FALSE

/obj/machinery/door/window/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/firealarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@

/obj/machinery/firealarm/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if((buildstage == ALARM_NO_CIRCUIT) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
return list("mode" = RCD_WALLFRAME, "delay" = 20, "cost" = 1)
return list("mode" = RCD_WALLFRAME, "delay" = 2 SECONDS, "cost" = 1)
return FALSE

/obj/machinery/firealarm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
Expand Down
39 changes: 37 additions & 2 deletions code/game/objects/effects/temporary_visuals/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,12 @@
layer = ABOVE_ALL_MOB_LAYER
plane = ABOVE_GAME_PLANE
anchored = TRUE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
obj_flags = CAN_BE_HIT
mouse_opacity = MOUSE_OPACITY_OPAQUE
var/status = 0
var/delay = 0

/obj/effect/constructing_effect/Initialize(mapload, rcd_delay, rcd_status)
/obj/effect/constructing_effect/Initialize(mapload, rcd_delay, rcd_status, rcd_upgrades)
. = ..()
status = rcd_status
delay = rcd_delay
Expand All @@ -522,6 +523,26 @@
else
update_appearance()

if (rcd_upgrades & RCD_UPGRADE_ANTI_INTERRUPT)
color = list(
1.0, 0.5, 0.5, 0.0,
0.1, 0.0, 0.0, 0.0,
0.1, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0,
0.0, 0.0, 0.0, 0.0,
)

mouse_opacity = MOUSE_OPACITY_TRANSPARENT
obj_flags &= ~CAN_BE_HIT

/obj/effect/constructing_effect/update_name(updates)
. = ..()

if (status == RCD_DECONSTRUCT)
name = "deconstruction effect"
else
name = "construction effect"

/obj/effect/constructing_effect/update_icon_state()
icon_state = "rcd"
if(delay < 10)
Expand All @@ -541,12 +562,26 @@
if (status == RCD_DECONSTRUCT)
qdel(src)
else
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
obj_flags &= ~CAN_BE_HIT
icon_state = "rcd_end"
addtimer(CALLBACK(src, PROC_REF(end)), 15)

/obj/effect/constructing_effect/proc/end()
qdel(src)

/obj/effect/constructing_effect/proc/attacked(mob/user)
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
user.changeNext_move(CLICK_CD_MELEE)
playsound(loc, 'sound/weapons/egloves.ogg', vol = 80, vary = TRUE)
end()

/obj/effect/constructing_effect/attackby(obj/item/weapon, mob/user, params)
attacked(user)

/obj/effect/constructing_effect/attack_hand(mob/living/user, list/modifiers)
attacked(user)

/obj/effect/temp_visual/electricity
icon_state = "electricity3"
duration = 0.5 SECONDS
Expand Down
116 changes: 92 additions & 24 deletions code/game/objects/items/rcd/RCD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#define CATEGORY_ICON_SUFFIX "category_icon_suffix"
#define TITLE_ICON "ICON=TITLE"

///multiplier applied on construction & deconstruction time when building multiple structures
#define FREQUENT_USE_DEBUFF_MULTIPLIER 3

//RAPID CONSTRUCTION DEVICE

/obj/item/construction/rcd
Expand All @@ -28,7 +31,7 @@
worn_icon_state = "RCD"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
custom_premium_price = PAYCHECK_COMMAND * 10
custom_premium_price = PAYCHECK_COMMAND * 2
max_matter = 160
slot_flags = ITEM_SLOT_BELT
item_flags = NO_MAT_REDEMPTION | NOBLUDGEON
Expand All @@ -48,6 +51,7 @@
list(CONSTRUCTION_MODE = RCD_WINDOWGRILLE, WINDOW_TYPE = /obj/structure/window/reinforced/fulltile, ICON = "rwindow0", TITLE = "Full Tile Reinforced Window"),
list(CONSTRUCTION_MODE = RCD_CATWALK, ICON = "catwalk-0", TITLE = "Catwalk"),
list(CONSTRUCTION_MODE = RCD_REFLECTOR, ICON = "reflector_base", TITLE = "Reflector"),
list(CONSTRUCTION_MODE = RCD_GIRDER, ICON = "girder", TITLE = "Girder"),
list(CONSTRUCTION_MODE = RCD_WINDOWGRILLE, WINDOW_TYPE = /obj/structure/window_sill, ICON = "window_sill-0", TITLE = "Window Sill"),
),

Expand Down Expand Up @@ -161,6 +165,9 @@

COOLDOWN_DECLARE(destructive_scan_cooldown)

///number of active rcd effects in use e.g. when building multiple walls at once this value increases
var/current_active_effects = 0

GLOBAL_VAR_INIT(icon_holographic_wall, init_holographic_wall())
GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())

Expand Down Expand Up @@ -259,39 +266,54 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
user.visible_message(span_suicide("[user] pulls the trigger... But there is not enough ammo!"))
return SHAME

/// check can the structure be placed on the turf
/obj/item/construction/rcd/proc/can_place(atom/A, list/rcd_results, mob/user)
/**
* checks if we can build the structure
* Arguments
*
* * [atom][target]- the target we are trying to build on/deconstruct e.g. turf, wall etc
* * rcd_results- list of params specifically the build type of our structure
* * [mob][user]- the user
*/
/obj/item/construction/rcd/proc/can_place(atom/target, list/rcd_results, mob/user)
/**
*For anything that does not go an a wall we have to make sure that turf is clear for us to put the structure on it
*If we are just trying to destory something then this check is not nessassary
*RCD_WALLFRAME is also returned as the mode when upgrading apc, airalarm, firealarm using simple circuits upgrade
*/
if(rcd_results["mode"] != RCD_WALLFRAME && rcd_results["mode"] != RCD_DECONSTRUCT)
var/turf/target_turf = get_turf(A)
//if we are trying to build a window on top of a grill we check for specific edge cases
if(rcd_results["mode"] == RCD_WINDOWGRILLE && istype(A, /obj/structure/grille))
var/list/structures_to_ignore
var/turf/target_turf = get_turf(target)
//if we are trying to build a window we check for specific edge cases
if(rcd_results["mode"] == RCD_WINDOWGRILLE)
var/is_full_tile = initial(window_type.fulltile)

var/list/structures_to_ignore
if(istype(target, /obj/structure/grille))
if(is_full_tile) //if we are trying to build full-tile windows we ignore the grille
structures_to_ignore = list(target)
else //no building directional windows on grills
return FALSE
else //for directional windows we ignore other directional windows as they can be in diffrent directions on the turf.
structures_to_ignore = list(/obj/structure/window)
//if we are trying to build full-tile windows we only ignore the grille but other directional windows on the grill can block its construction
if(window_type == /obj/structure/window/fulltile || window_type == /obj/structure/window/reinforced/fulltile)
structures_to_ignore = list(A, /obj/structure/window_sill)
structures_to_ignore = list(/obj/structure/grille, /obj/structure/window_sill)
//for normal directional windows we ignore the grille & other directional windows as they can be in diffrent directions on the grill. There is a later check during construction to deal with those
else
structures_to_ignore = list(/obj/structure/grille, /obj/structure/window, /obj/structure/window_sill)

//check if we can build our window on the grill
if(target_turf.is_blocked_turf(exclude_mobs = FALSE, source_atom = null, ignore_atoms = structures_to_ignore, type_list = (length(structures_to_ignore) == 2)))
if(target_turf.is_blocked_turf(exclude_mobs = !is_full_tile, source_atom = null, ignore_atoms = structures_to_ignore, type_list = !is_full_tile))
playsound(loc, 'sound/machines/click.ogg', 50, TRUE)
balloon_alert(user, "something is on the grille!")
balloon_alert(user, "something is blocking the turf")
return FALSE

/**
* if we are trying to create plating on turf which is not a proper floor then dont check for objects on top of the turf just allow that turf to be converted into plating. e.g. create plating beneath a player or underneath a machine frame/any dense object
* if we are trying to finish a wall girder then let it finish then make sure no one/nothing is stuck in the girder
*/
else if(rcd_results["mode"] == RCD_FLOORWALL && (!istype(target_turf, /turf/open/floor) || istype(A, /obj/structure/girder)))
else if(rcd_results["mode"] == RCD_FLOORWALL && (!istype(target_turf, /turf/open/floor) || istype(target, /obj/structure/girder)))
//if a player builds a wallgirder on top of himself manually with iron sheets he can't finish the wall if he is still on the girder. Exclude the girder itself when checking for other dense objects on the turf
if(istype(A, /obj/structure/girder) && target_turf.is_blocked_turf(exclude_mobs = FALSE, source_atom = null, ignore_atoms = list(A)))
if(istype(target, /obj/structure/girder) && target_turf.is_blocked_turf(exclude_mobs = FALSE, source_atom = null, ignore_atoms = list(target)))
playsound(loc, 'sound/machines/click.ogg', 50, TRUE)
balloon_alert(user, "something is on the girder!")
return FALSE
Expand Down Expand Up @@ -340,35 +362,66 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())

return TRUE

/obj/item/construction/rcd/proc/rcd_create(atom/A, mob/user)
/**
* actual proc to create the structure
*
* Arguments
* * [atom][target]- the target we are trying to build on/deconstruct e.g. turf, wall etc
* * [mob][user]- the user building this structure
*/
/obj/item/construction/rcd/proc/rcd_create(atom/target, mob/user)
//does this atom allow for rcd actions?
var/list/rcd_results = A.rcd_vals(user, src)
var/list/rcd_results = target.rcd_vals(user, src)
if(!rcd_results)
return FALSE

var/delay = rcd_results["delay"] * delay_mod
var/obj/effect/constructing_effect/rcd_effect = new(get_turf(A), delay, src.mode)
if (
!(upgrade & RCD_UPGRADE_NO_FREQUENT_USE_COOLDOWN) \
&& !rcd_results[RCD_RESULT_BYPASS_FREQUENT_USE_COOLDOWN] \
&& current_active_effects > 0
)
delay *= FREQUENT_USE_DEBUFF_MULTIPLIER

current_active_effects += 1
_rcd_create_effect(target, user, delay, rcd_results)
current_active_effects -= 1

/**
* Internal proc which creates the rcd effects & creates the structure
*
* Arguments
* * [atom][target]- the target we are trying to build on/deconstruct e.g. turf, wall etc
* * [mob][user]- the user trying to build the structure
* * delay- the delay with the disk upgrades applied
* * rcd_results- list of params which contains the cost & build mode to create the structure
*/
/obj/item/construction/rcd/proc/_rcd_create_effect(atom/target, mob/user, delay, list/rcd_results)
var/obj/effect/constructing_effect/rcd_effect = new(get_turf(target), delay, src.mode, upgrade)

//resource & structure placement sanity checks before & after delay along with beam effects
if(!checkResource(rcd_results["cost"], user) || !can_place(A, rcd_results, user))
if(!checkResource(rcd_results["cost"], user) || !can_place(target, rcd_results, user))
qdel(rcd_effect)
return FALSE
var/beam
if(ranged)
beam = user.Beam(A,icon_state="rped_upgrade", time = delay)
if(!do_after(user, delay, target = A))
beam = user.Beam(target,icon_state="rped_upgrade", time = delay)
if(!do_after(user, delay, target = target))
qdel(rcd_effect)
if(!isnull(beam))
qdel(beam)
return FALSE
if(!checkResource(rcd_results["cost"], user) || !can_place(A, rcd_results, user))
if (QDELETED(rcd_effect))
return FALSE
if(!checkResource(rcd_results["cost"], user) || !can_place(target, rcd_results, user))
qdel(rcd_effect)
return FALSE

if(!useResource(rcd_results["cost"], user))
qdel(rcd_effect)
return FALSE
activate()
if(!A.rcd_act(user, src, rcd_results["mode"]))
if(!target.rcd_act(user, src, rcd_results["mode"]))
qdel(rcd_effect)
return FALSE
playsound(loc, 'sound/machines/click.ogg', 50, TRUE)
Expand Down Expand Up @@ -621,7 +674,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
matter = 160

/obj/item/construction/rcd/loaded/upgraded
upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING
upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING | RCD_UPGRADE_ANTI_INTERRUPT | RCD_UPGRADE_NO_FREQUENT_USE_COOLDOWN

/obj/item/construction/rcd/combat
name = "industrial RCD"
Expand All @@ -630,7 +683,22 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
max_matter = 500
matter = 500
canRturf = TRUE
upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING
upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING | RCD_UPGRADE_ANTI_INTERRUPT | RCD_UPGRADE_NO_FREQUENT_USE_COOLDOWN

/obj/item/construction/rcd/ce
name = "professional RCD"
desc = "A higher-end model of the rapid construction device, prefitted with improved cooling and disruption prevention. Provided to the chief engineer."
upgrade = RCD_UPGRADE_ANTI_INTERRUPT | RCD_UPGRADE_NO_FREQUENT_USE_COOLDOWN
matter = 160
color = list(
0.3, 0.3, 0.7, 0.0,
1.0, 1.0, 0.2, 0.0,
-0.2, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0,
0.0, 0.0, 0.0, 0.0,
)

#undef FREQUENT_USE_DEBUFF_MULTIPLIER

#undef CONSTRUCTION_MODE
#undef WINDOW_TYPE
Expand Down Expand Up @@ -665,7 +733,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
name = "admin RCD"
max_matter = INFINITY
matter = INFINITY
upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING
upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING | RCD_UPGRADE_ANTI_INTERRUPT | RCD_UPGRADE_NO_FREQUENT_USE_COOLDOWN


// Ranged RCD
Expand All @@ -679,4 +747,4 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
icon_state = "arcd"
inhand_icon_state = "oldrcd"
has_ammobar = FALSE
upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING
upgrade = RCD_UPGRADE_FRAMES | RCD_UPGRADE_SIMPLE_CIRCUITS | RCD_UPGRADE_FURNISHING | RCD_UPGRADE_ANTI_INTERRUPT | RCD_UPGRADE_NO_FREQUENT_USE_COOLDOWN
Loading

0 comments on commit e4cb655

Please sign in to comment.