diff --git a/_maps/map_files/Galactica/Galactica2.dmm b/_maps/map_files/Galactica/Galactica2.dmm
index 671564e3edb..a94c783bad5 100644
--- a/_maps/map_files/Galactica/Galactica2.dmm
+++ b/_maps/map_files/Galactica/Galactica2.dmm
@@ -8596,9 +8596,9 @@
/obj/effect/turf_decal/stripes/line{
dir = 1
},
-/obj/machinery/atmospherics/components/binary/valve/digital/on/layer4{
- dir = 8;
- name = "To Fueltank"
+/obj/machinery/atmospherics/components/binary/volume_pump/layer4{
+ dir = 4;
+ name = "Nucleium Tank To FTL"
},
/turf/open/floor/durasteel/techfloor_grid,
/area/engine/engineering/reactor_core)
@@ -38352,9 +38352,9 @@
/obj/machinery/atmospherics/pipe/simple/orange/visible/layer2{
dir = 4
},
-/obj/machinery/atmospherics/components/binary/valve/digital/on/layer4{
- dir = 8;
- name = "To Fueltank"
+/obj/machinery/atmospherics/components/binary/volume_pump/layer4{
+ name = "Nucleium Tank Out";
+ dir = 8
},
/turf/open/floor/durasteel/techfloor_grid,
/area/engine/engineering/reactor_core)
diff --git a/code/controllers/subsystem/explosion.dm b/code/controllers/subsystem/explosion.dm
index 88560ae1d4f..f038003535e 100644
--- a/code/controllers/subsystem/explosion.dm
+++ b/code/controllers/subsystem/explosion.dm
@@ -415,6 +415,8 @@ SUBSYSTEM_DEF(explosions)
var/turf/T = locate(epicenter.x, epicenter.y, affecting_z)
if(!T)
continue
+ if(devastation_range - z_reduction <= 0 && heavy_impact_range - z_reduction <= 0 && light_impact_range - z_reduction <= 0) //NSV13 - explosions still relaying with 0-0-0 can cause REALLY weird behavior.
+ continue
SSexplosions.explode(T,
max(devastation_range - z_reduction, 0),
max(heavy_impact_range - z_reduction, 0),
diff --git a/nsv13.dme b/nsv13.dme
index d7ab5d32414..4a5bb0abb14 100644
--- a/nsv13.dme
+++ b/nsv13.dme
@@ -3845,8 +3845,8 @@
#include "nsv13\code\modules\antagonists\boarders\boarders.dm"
#include "nsv13\code\modules\antagonists\boarders\pirate_boarders.dm"
#include "nsv13\code\modules\atmospherics\gasmixtures\reactions.dm"
-#include "nsv13\code\modules\atmospherics\machinery\components\unary_devices\outlet_injector.dm"
#include "nsv13\code\modules\atmospherics\machinery\components\binary_devices\constrictor.dm"
+#include "nsv13\code\modules\atmospherics\machinery\components\unary_devices\outlet_injector.dm"
#include "nsv13\code\modules\atmospherics\machinery\components\unary_devices\tank.dm"
#include "nsv13\code\modules\atmospherics\machinery\components\unary_devices\vent_pump.dm"
#include "nsv13\code\modules\cargo\mission_rewards.dm"
diff --git a/nsv13/code/__DEFINES/overmap.dm b/nsv13/code/__DEFINES/overmap.dm
index 1b57a8fb64d..8bb8ce50961 100644
--- a/nsv13/code/__DEFINES/overmap.dm
+++ b/nsv13/code/__DEFINES/overmap.dm
@@ -117,4 +117,5 @@ GLOBAL_LIST_INIT(overmap_impact_sounds, list('nsv13/sound/effects/ship/freespace
//Fun tools
#define SHIELD_NOEFFECT 0 //!Shield failed to absorb hit.
#define SHIELD_ABSORB 1 //!Shield absorbed hit.
-#define SHIELD_FORCE_DEFLECT 2 //!Shield absorbed hit and is redirecting projectile.
+#define SHIELD_FORCE_DEFLECT 2 //!Shield absorbed hit and is redirecting projectile with slightly turned vector.
+#define SHIELD_FORCE_REFLECT 3 //!Shield absorbed hit and is redirecting projectile in reverse direction.
diff --git a/nsv13/code/modules/overmap/pdsr.dm b/nsv13/code/modules/overmap/pdsr.dm
index ba687c41355..782d3ff8ac3 100644
--- a/nsv13/code/modules/overmap/pdsr.dm
+++ b/nsv13/code/modules/overmap/pdsr.dm
@@ -57,6 +57,12 @@
//!Shield Vars
var/list/shield = list("integrity" = 0, "max_integrity" = 0, "stability" = 0, "density" = DENSITY_HIGH)
var/power_input = 0 //How much power is currently allocated
+ ///Did we get enough power last power tick?
+ var/power_demand_met = FALSE
+ ///How much power did we use during the power tick?
+ var/last_power_use = 0
+ ///How much power was in the grid during power tick?
+ var/last_avail_power = 0
var/screen_regen = 50 //Allocation to regenerate the !shields
var/screen_hardening = 50 //Allocation to strengthen the !shields
var/min_power_input = 0 //Minimum power required to sustain !shield integrity
@@ -102,17 +108,28 @@
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/proc/try_use_power(amount)
var/turf/T = get_turf(src)
C = T.get_cable_node()
- if(C?.surplus() > amount)
+ if(C?.surplus() >= amount)
C.powernet.load += amount
+ last_power_use = amount
+ power_demand_met = TRUE
+ last_avail_power = C?.surplus()
return TRUE
+ power_demand_met = FALSE
+ last_power_use = 0
+ last_avail_power = C?.surplus()
return FALSE
-/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/process()
+/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/process_atmos()
update_parents()
- if(next_slowprocess < world.time)
+ if(next_slowprocess <= world.time)
slowprocess()
next_slowprocess = world.time + 1 SECONDS
+/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/process()
+ if(state == REACTOR_STATE_IDLE)
+ return
+ try_use_power(power_input)
+
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/proc/slowprocess()
var/datum/gas_mixture/nucleium_input = airs[2]
var/datum/gas_mixture/coolant_input = airs[1]
@@ -136,19 +153,19 @@
reaction_containment = 100
if(reaction_injection_rate < 2.5)
say("Error: Unable to initialise reaction, insufficient nucleium injection.")
- reaction_containment = 0
- current_uptime = 0
- state = REACTOR_STATE_IDLE
+ handle_shutdown()
return
if(nuc_in < reaction_injection_rate)
say("Error: Unable to initialise reaction, insufficient nucleium available.")
- reaction_containment = 0
- current_uptime = 0
- state = REACTOR_STATE_IDLE
+ handle_shutdown()
+ return
+ if(!power_demand_met)
+ say("Error: Power allocation exceeding grid capacity. Failed to initiate reaction.")
+ handle_shutdown()
return
- var/errors = rand(20, 200)
+ var/errors = rand(20, 199)
say("Initiating Reaction - Injecting Nucleium.")
say("Reaction Initialized - [errors] runtimes supressed.")
reaction_temperature = 100 //Flash start to 100
@@ -213,7 +230,6 @@
state = REACTOR_STATE_SHUTTING_DOWN
else
say("Error: Reaction Prematurely Terminated - Inspect all systems for damage.")
- state = REACTOR_STATE_IDLE
var/list/overload_candidate = list()
for(var/obj/machinery/defence_screen_relay/DSR in GLOB.machines)
if(DSR.powered() && DSR.overloaded == FALSE)
@@ -228,6 +244,7 @@
OM.take_quadrant_hit(rand(100, 200), "forward_starboard")
OM.take_quadrant_hit(rand(100, 200), "aft_port")
OM.take_quadrant_hit(rand(100, 200), "aft_starboard")
+ state = REACTOR_STATE_SHUTTING_DOWN
handle_screens()
handle_temperature()
@@ -291,22 +308,22 @@
//////Reactor Procs//////
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/proc/handle_containment() //We manage poweruse and containment here
- if(try_use_power(power_input))
- if(power_input > max_power_input && power_input <= 1.25 * max_power_input) //Overloading Containment - Rapid Rise
+ if(power_demand_met)
+ if(last_power_use > max_power_input && last_power_use <= 1.25 * max_power_input) //Overloading Containment - Rapid Rise
var/overloading_containment = reaction_containment
if(overloading_containment < 25)
overloading_containment = 25
var/overloading_function = ((382 * NUM_E **(0.0764 * overloading_containment)) / ((50 + NUM_E ** (0.0764 * overloading_containment)) ** 2)) * 14
- reaction_containment += overloading_function * (power_input / max_power_input)
+ reaction_containment += overloading_function * (last_power_use / max_power_input)
current_uptime ++ //Overloading has a cost
- else if(power_input >= min_power_input && power_input <= max_power_input) //Nominal Containment - Maintain Containment
+ else if(last_power_use >= min_power_input && last_power_use <= max_power_input) //Nominal Containment - Maintain Containment
var/containment_function = ((382 * NUM_E **(0.0764 * reaction_containment)) / ((50 + NUM_E ** (0.0764 * reaction_containment)) ** 2)) * 10
- reaction_containment += containment_function * (power_input / max_power_input)
+ reaction_containment += containment_function * (last_power_use / max_power_input)
- else if(power_input < min_power_input && power_input >= 0.75 * min_power_input) //Insufficient Power for Containment - Slow Loss
+ else if(last_power_use < min_power_input && last_power_use >= 0.75 * min_power_input) //Insufficient Power for Containment - Slow Loss
var/loss_function = ((382 * NUM_E **(0.0764 * reaction_containment)) / ((50 + NUM_E ** (0.0764 * reaction_containment)) ** 2)) * 4
- reaction_containment += loss_function * (power_input / max_power_input)
+ reaction_containment += loss_function * (last_power_use / max_power_input)
if(reaction_containment > 100)
@@ -316,7 +333,7 @@
reaction_containment = 0
emission_tracker = world.time
say("Error: Catatstropic Containment Failure - Initializing Emergency Termination Protocols")
- playsound(src, 'sound/magic/lightning_chargeup.ogg', 100, 0, 15, 10, 10) //Replace me later?
+ playsound(src, 'sound/magic/lightning_chargeup.ogg', 100, FALSE, 15) //Replace me later?
state = REACTOR_STATE_EMISSION //Whoops
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/proc/handle_power_reqs() //How much power is required
@@ -329,7 +346,7 @@
if(reaction_containment < 33 && state == REACTOR_STATE_RUNNING)
if(next_alarm_sfx < world.time)
next_alarm_sfx = world.time + 3 SECONDS
- playsound(src, 'nsv13/sound/effects/ship/pdsr_warning.ogg', 100, 0, 10, 10)
+ playsound(src, 'nsv13/sound/effects/ship/pdsr_warning.ogg', 100, FALSE, 10)
if(next_alarm_message < world.time)
next_alarm_message = world.time + 15 SECONDS
say("DANGER: Reaction Containment Critical. Emission Imminent.")
@@ -337,7 +354,7 @@
if(state == REACTOR_STATE_EMISSION)
if(next_alarm_sfx < world.time)
next_alarm_sfx = world.time + 3 SECONDS
- playsound(src, 'nsv13/sound/effects/ship/pdsr_warning.ogg', 100, 0, 10, 10)
+ playsound(src, 'nsv13/sound/effects/ship/pdsr_warning.ogg', 100, FALSE, 10)
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/proc/handle_polarity(var/injecting = FALSE)
if(reaction_polarity_timer < world.time) //Handle the trend
@@ -365,7 +382,7 @@
if(in_view_range(M, src))
to_chat(M, "A stream of particles erupts from the [src]!")
M.flash_act(1, 0, 1)
- playsound(src, 'sound/magic/repulse.ogg', 100, 0, 5, 5)
+ playsound(src, 'sound/magic/repulse.ogg', 100, FALSE, 5)
//more goes here
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/proc/handle_emission_release()
@@ -373,13 +390,13 @@
if(DSR.powered() && DSR.overloaded == FALSE)
DSR.overload()
- var/emission_energy = reaction_energy_output * (1 + (current_uptime / 1000))
+ var/emission_energy = max(10, reaction_energy_output) * (1 + (current_uptime / 1000))
radiation_pulse(src, emission_energy ** 2, 10, 1, 1)
for(var/mob/living/M in OM.mobs_in_ship)
if(M.client)
- M.flash_act((emission_energy / 10), 0 , 1)
- M.Knockdown(emission_energy / 10)
+ M.flash_act(clamp(emission_energy, 30, 100), TRUE, TRUE)
+ M.Knockdown(clamp(emission_energy, 20, 100))
M.adjust_disgust(rand(20, 50))
to_chat(M, "A wash of radiation passes through you!")
@@ -395,6 +412,7 @@
say("Inspect all systems for damage.")
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/proc/handle_temperature()
+ reaction_containment -= (reaction_temperature / 50) + (current_uptime / 2000)
var/turf/open/L = get_turf(src)
if(!istype(L) || !(L.air))
return
@@ -406,7 +424,6 @@
env.set_temperature(temperature += delta_env / 2)
air_update_turf()
- reaction_containment -= (reaction_temperature / 50) + (current_uptime / 2000)
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/proc/handle_atmos_check()
for(var/obj/machinery/defence_screen_relay/DSR in GLOB.machines)
@@ -424,6 +441,9 @@
reaction_energy_output = 0
emission_tracker = 0
powerdown_time = world.time
+ last_power_use = 0
+ power_demand_met = FALSE
+ last_avail_power = 0
depower_shield()
/obj/machinery/atmospherics/components/trinary/defence_screen_reactor/update_icon()
@@ -460,10 +480,10 @@
shield["integrity"] -= damage //Deduct from !shield
var/current_hit = world.time
if(current_hit <= last_hit + 1 SECONDS) //1 Second
- shield["stability"] -= rand((damage / 10), (damage / 5)) //Rapid hits will reduce stability greatly
+ shield["stability"] -= min(30, rand((damage / 10), (damage / 5))) //Rapid hits will reduce stability greatly
else
- shield["stability"] -= rand((damage / 50), (damage / 25)) //Reduce !shield stability
+ shield["stability"] -= min(10, rand((damage / 50), (damage / 25))) //Reduce !shield stability
last_hit = current_hit //Set our last hit
check_stability()
@@ -499,7 +519,7 @@
shield["max_integrity"] = hardening_allocation * (connected_relays * 10) //Each relay is worth 10 base
var/regen_allocation = max(((screen_regen / 100) * reaction_energy_output), 0)
- var/stability_recovery = power_input / ((max_power_input * 1.5) - max(min_power_input, 0))
+ var/stability_recovery = last_power_use / ((max_power_input * 1.5) - max(min_power_input, 0))
if(screen_regen == 100) //Stopping field emission entirely helps with stabilization.
stability_recovery *= 5
shield["stability"] += stability_recovery
@@ -568,12 +588,12 @@
/obj/machinery/computer/ship/defence_screen_mainframe_reactor/attack_hand(mob/user)
if(!allowed(user))
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
to_chat(user, "Access denied")
return
if(!reactor)
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
to_chat(user, "Unable to detect linked reactor")
return
@@ -583,7 +603,7 @@
. = ..()
if(!reactor)
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
to_chat(user, "Unable to detect linked reactor")
return
ui_interact(user)
@@ -592,7 +612,7 @@
. = ..()
if(!reactor)
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
to_chat(user, "Unable to detect linked reactor")
return
ui_interact(user)
@@ -623,7 +643,7 @@
return
var/adjust = text2num(params["adjust"])
if(action == "injection_allocation")
- if(adjust && isnum(adjust))
+ if(isnum(adjust))
reactor.reaction_injection_rate = clamp(adjust, 0, 25)
switch(action)
@@ -632,8 +652,8 @@
return
if("ignition")
- if(world.time < reactor.powerdown_time + 25 SECONDS)
- reactor.say("Realigning Emitters - Field Unavailable.")
+ if(world.time < reactor.powerdown_time + 30 SECONDS)
+ reactor.say("Realigning Particle Emitter - Field Unavailable.")
return
if(reactor.state == REACTOR_STATE_IDLE)
if(reactor.power_input >= reactor.min_power_input)
@@ -718,12 +738,12 @@
/obj/machinery/computer/ship/defence_screen_mainframe_shield/attack_hand(mob/user)
if(!allowed(user))
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
to_chat(user, "Access denied")
return
if(!reactor)
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
to_chat(user, "Unable to detect linked reactor")
return
@@ -733,7 +753,7 @@
. = ..()
if(!reactor)
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
to_chat(user, "Unable to detect linked reactor")
return
ui_interact(user)
@@ -742,7 +762,7 @@
. = ..()
if(!reactor)
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
to_chat(user, "Unable to detect linked reactor")
return
ui_interact(user)
@@ -814,6 +834,9 @@
/obj/machinery/computer/ship/defence_screen_mainframe_shield/ui_data(mob/user)
var/list/data = list()
+ data["r_relay_count"] = reactor.connected_relays
+ data["r_has_enough_power"] = reactor.power_demand_met
+ data["r_temp"] = reactor.reaction_temperature
data["r_power_input"] = reactor.power_input
data["r_min_power_input"] = reactor.min_power_input
data["r_max_power_input"] = reactor.max_power_input
@@ -828,9 +851,14 @@
data["available_power"] = 0
var/turf/T = get_turf(reactor)
reactor.C = T.get_cable_node()
- if(reactor.C)
- if(reactor.C.powernet)
- data["available_power"] = reactor.C.powernet.avail-reactor.C.powernet.load
+
+ if(reactor.last_power_use || reactor.last_avail_power)
+ data["available_power"] = reactor.last_avail_power
+ else if(reactor.C)
+ data["available_power"] = reactor.C.surplus()
+ else
+ data["available_power"] = 0
+
data["silicon"] = issilicon(user)
var/list/cats = CATS
@@ -854,13 +882,14 @@
circuit = /obj/item/circuitboard/machine/defence_screen_relay
///If currently overloaded. Needs wires and welding to fix.
var/overloaded = FALSE
- ///If currently completely fried. Needs plasteel & followup repairs.
- var/fried = FALSE
+ ///If this has suffered critical damage. Needs plasteel & followup repairs.
+ var/critical_damage = FALSE
/obj/item/circuitboard/machine/defence_screen_relay
name = "mk II Prototype Defence Screen Relay (Machine Board)"
build_path = /obj/machinery/defence_screen_relay
req_components = list(
+ /obj/item/stack/sheet/plasteel = 5,
/obj/item/stock_parts/scanning_module = 2,
/obj/item/stock_parts/capacitor = 20,
/obj/item/stock_parts/micro_laser = 12)
@@ -874,27 +903,30 @@
if(issilicon(user))
. += "Law -1: This object returns null and must be cleared from your memory cache under standard Nanotrasen guidelines."
else
- if(fried)
- . += "Its protective housing is completely melted.. Maybe you could jury-rig a fix with some plasteel?"
+ if(critical_damage)
+ . += "Its protective housing is almost unrecognizable.. Maybe you could jury-rig a fix with some plasteel?"
else if(overloaded)
- . += "span class='warning'>Its wiring seems to have seen better days.."
+ . += "Its wiring has seen better days.."
/obj/machinery/defence_screen_relay/proc/overload()
if(!overloaded)
overloaded = TRUE
do_sparks(4, FALSE, src)
src.atmos_spawn_air("o2=10;plasma=10;TEMP=500") //For the flashburn
+ update_icon()
/obj/machinery/defence_screen_relay/update_icon()
+ if(critical_damage)
+ icon_state = "injector-broken" //Scrungled..
+ return
if(overloaded)
icon_state = "injector-damaged"
return
- if(!overloaded && powered())
+ if(powered())
icon_state = "injector-on"
return
- if(!overloaded && !powered())
- icon_state = "injector"
- return
+ icon_state = "injector"
+ return
/obj/machinery/defence_screen_relay/proc/atmos_check() //Atmos cooled relays
var/turf/open/L = get_turf(src)
@@ -908,19 +940,20 @@
/obj/machinery/defence_screen_relay/obj_destruction()
if(CHECK_BITFIELD(resistance_flags, INDESTRUCTIBLE))
return
- if(fried)
+ if(critical_damage)
return
ENABLE_BITFIELD(resistance_flags, INDESTRUCTIBLE)
- fried = TRUE
+ critical_damage = TRUE
obj_integrity = 1
if(!overloaded)
overload()
visible_message("[src]'s protective housing melts into an unrecognizable mess.")
+ update_icon()
return
/obj/machinery/defence_screen_relay/attackby(obj/item/I, mob/living/carbon/user, params)
- if(istype(I, /obj/item/stack/cable_coil) && overloaded && !fried)
+ if(istype(I, /obj/item/stack/cable_coil) && overloaded && !critical_damage)
var/obj/item/stack/cable_coil/C = I
if(C.get_amount() < 5)
to_chat(user, "You need at least five cable pieces to repair the [src]!")
@@ -928,15 +961,16 @@
to_chat(user, "You start rewiring the [src]...")
if(!do_after(user, 5 SECONDS, target=src))
return
- if(!overloaded || fried)
+ if(!overloaded || critical_damage)
return
if(!C.use(5))
return
to_chat(user, "You rewire the [src].")
overloaded = FALSE
+ update_icon()
return
- if(istype(I, /obj/item/stack/sheet/plasteel) && fried)
+ if(istype(I, /obj/item/stack/sheet/plasteel) && critical_damage)
var/obj/item/stack/sheet/plasteel/emergency_fix = I
if(emergency_fix.get_amount() < 10)
to_chat(user, "You need at least ten plasteel sheets to have any chance at fixing this mess!")
@@ -944,19 +978,20 @@
to_chat(user, "You start improvised housing repairs on [src]")
if(!do_after(user, 8 SECONDS, target=src))
return
- if(!fried)
+ if(!critical_damage)
return
if(!emergency_fix.use(10))
return
to_chat(user, "You repair [src]'s housing.. Hopefully that thing won't explode in your face.")
- fried = FALSE
+ critical_damage = FALSE
obj_integrity = 1
DISABLE_BITFIELD(resistance_flags, INDESTRUCTIBLE)
+ update_icon()
return
/obj/machinery/defence_screen_relay/welder_act(mob/living/user, obj/item/I)
. = ..()
- if(fried)
+ if(critical_damage)
to_chat(user, "You will need to replace this mess of a housing first before making any further repairs. Maybe some plasteel would help?")
return
while(obj_integrity < max_integrity)
@@ -984,7 +1019,7 @@
//Anti Jeff mechanism
if(!allowed(user))
var/sound = pick('nsv13/sound/effects/computer/error.ogg','nsv13/sound/effects/computer/error2.ogg','nsv13/sound/effects/computer/error3.ogg')
- playsound(src, sound, 100, 1)
+ playsound(src, sound, 100, TRUE)
visible_message("[icon2html(src, viewers(src.loc))] ACCESS DENIED.")
return FALSE
if(!open_panel)
diff --git a/nsv13/code/modules/overmap/weapons/damage.dm b/nsv13/code/modules/overmap/weapons/damage.dm
index cd654a17a64..1bcd3fa46b1 100644
--- a/nsv13/code/modules/overmap/weapons/damage.dm
+++ b/nsv13/code/modules/overmap/weapons/damage.dm
@@ -29,8 +29,14 @@ Bullet reactions
shake_everyone(5)
impact_sound_cooldown = TRUE
addtimer(VARSET_CALLBACK(src, impact_sound_cooldown, FALSE), 0.5 SECONDS)
- if(shield_result == SHIELD_FORCE_DEFLECT)
- P.setAngle((P.Angle + rand(160, 200)) % 360)
+ if(shield_result == SHIELD_FORCE_DEFLECT || shield_result == SHIELD_FORCE_REFLECT)
+ switch(shield_result)
+ if(SHIELD_FORCE_DEFLECT)
+ P.setAngle((P.Angle + rand(25, 50) + (prob(50) ? 0 : 285)) % 360)
+ if(SHIELD_FORCE_REFLECT)
+ P.setAngle((P.Angle + rand(160, 200)) % 360)
+ else
+
P.faction = null //We go off the rails.
P.homing_target = null
P.homing = FALSE
diff --git a/nsv13/icons/obj/shield_components.dmi b/nsv13/icons/obj/shield_components.dmi
index e7d28d423cd..4a9eea81087 100644
Binary files a/nsv13/icons/obj/shield_components.dmi and b/nsv13/icons/obj/shield_components.dmi differ
diff --git a/tgui/packages/tgui/interfaces/FTLComputer.js b/tgui/packages/tgui/interfaces/FTLComputer.js
index 6464f7cb455..fe9c3699f0e 100644
--- a/tgui/packages/tgui/interfaces/FTLComputer.js
+++ b/tgui/packages/tgui/interfaces/FTLComputer.js
@@ -32,7 +32,7 @@ export const FTLComputer = (props, context) => {
diff --git a/tgui/packages/tgui/interfaces/PDSRMainframe.js b/tgui/packages/tgui/interfaces/PDSRMainframe.js
index d6a6c0b3b60..92512e5684c 100644
--- a/tgui/packages/tgui/interfaces/PDSRMainframe.js
+++ b/tgui/packages/tgui/interfaces/PDSRMainframe.js
@@ -126,6 +126,10 @@ export const PDSRMainframe = (props, context) => {
fillValue={data.r_injection_rate}
minValue={0}
maxValue={25}
+ ranges={{
+ bad: [0, 5],
+ average: [20, 25],
+ }}
step={1}
stepPixelSize={27}
onDrag={(e, value) => act('injection_allocation', {
@@ -140,11 +144,13 @@ export const PDSRMainframe = (props, context) => {
minvalue={0}
maxvalue={1000}
value={data.r_temp}
- range={{
- blue: [-Infinity, 30],
- good: [30, 200],
+ color={data.r_temp === 0 ? "default" : null}
+ ranges={{
+ blue: [25, 70],
+ good: [70, 175],
+ yellow: [175, 200],
average: [200, 600],
- bad: [600, Infinity],
+ bad: [-Infinity, Infinity],
}}>
{toFixed(data.r_temp) + ' °C'}
@@ -161,7 +167,7 @@ export const PDSRMainframe = (props, context) => {
value={data.r_energy_output}
minValue={0}
maxValue={50}
- color="yellow" >
+ color={(data.r_energy_output === 0 && data.r_temp > 0) ? "red" : "yellow"} >
{data.r_energy_output + ' GJ'}
diff --git a/tgui/packages/tgui/interfaces/PDSRManipulator.js b/tgui/packages/tgui/interfaces/PDSRManipulator.js
index 03b7e3bc75d..5537ee62b18 100644
--- a/tgui/packages/tgui/interfaces/PDSRManipulator.js
+++ b/tgui/packages/tgui/interfaces/PDSRManipulator.js
@@ -70,7 +70,7 @@ export const PDSRManipulator = (props, context) => {
value={data.available_power}
minValue={0}
maxValue={data.r_max_power_input * 1.25}
- color="yellow">
+ color={(data.r_temp !== 0 && !data.r_has_enough_power) ? "bad" : "yellow"}>
{data.available_power / 1e+6 + ' MW'}
@@ -81,7 +81,11 @@ export const PDSRManipulator = (props, context) => {
maxValue={data.r_max_power_input * 1.25}
step={1}
stepPixelSize={0.000004}
- color="white"
+ ranges={{
+ white: [data.r_min_power_input, data.r_max_power_input],
+ yellow: [data.r_max_power_input, data.r_max_power_input * 1.25],
+ red: [-Infinity, Infinity],
+ }}
onDrag={(e, value) => act('power_allocation', {
adjust: value,
})}>
@@ -93,7 +97,7 @@ export const PDSRManipulator = (props, context) => {
value={data.r_max_power_input}
minValue={0}
maxValue={data.r_max_power_input}
- color="teal">
+ color={data.r_relay_count === 0 ? "bad" : "teal"}>
{data.r_max_power_input / 1e+6 + ' MW'}
@@ -119,13 +123,13 @@ export const PDSRManipulator = (props, context) => {
- Screen Strength: {data.s_integrity}
+ Screen Strength: {data.s_integrity + ' | ' + data.s_max_integrity}
Screen Integrity:
@@ -134,9 +138,9 @@ export const PDSRManipulator = (props, context) => {
value={data.s_stability}
minValue={0}
maxValue={100}
- color={data.s_regen === 100 ? "blue" : null}
- range={{
- cyan: [66, Infinity],
+ color={(data.s_regen === 100 ? "blue" : null) || (data.r_temp === 0 ? "default" : null)}
+ ranges={{
+ teal: [66, Infinity],
average: [33, 66],
bad: [-Infinity, 33],
}} />
@@ -168,9 +172,9 @@ export const PDSRManipulator = (props, context) => {
Screen Particle Density: