Making certain SMES and Blast Doors be critical + remapping Tesla APC and SM blast doors (#5993)

This commit is contained in:
Mykhailo Bykhovtsev
2019-01-29 13:23:35 +01:00
committed by Werner
parent 7aba102b1d
commit e7ff9f8931
6 changed files with 81 additions and 18 deletions
+2 -1
View File
@@ -4,7 +4,8 @@
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
for(var/obj/machinery/power/smes/buildable/S in SSpower.smes_units)
S.energy_fail(rand(15 * severity,30 * severity))
if(!S.is_critical)
S.energy_fail(rand(15 * severity,30 * severity))
for(var/obj/machinery/power/apc/C in SSmachinery.processing_machines)
+5 -4
View File
@@ -35,7 +35,8 @@
var/_wifi_id
var/datum/wifi/receiver/button/door/wifi_receiver
var/securitylock = 0
var/securitylock = FALSE
var/is_critical = FALSE
/obj/machinery/door/blast/Initialize()
. = ..()
@@ -182,14 +183,14 @@
/obj/machinery/door/blast/power_change()
..()
if(src.operating || (stat & BROKEN))
if(src.operating || (stat & BROKEN) || is_critical)
return
if(stat & NOPOWER)
INVOKE_ASYNC(src, /obj/machinery/door/blast/.proc/force_close)
securitylock = 1
securitylock = TRUE
else if(securitylock)
INVOKE_ASYNC(src, /obj/machinery/door/blast/.proc/force_open)
securitylock = 0
securitylock = FALSE
/obj/machinery/door/blast/attack_hand(mob/user as mob)
return
+1
View File
@@ -55,6 +55,7 @@
var/input_pulsed = 0
var/output_cut = 0
var/output_pulsed = 0
var/is_critical = FALSE // Use by gridcheck event, if set to true we do not disable it
var/failure_timer = 0 // Set by gridcheck event, temporarily disables the SMES.
var/target_load = 0
var/open_hatch = 0
+44
View File
@@ -0,0 +1,44 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: PoZe
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- tweak: "SMES can no be marked on map as critical, which will exclude them in power grid check event. Tesla and SM engine SMES are now marked as critical."
- tweak: "Blast doors can now be mapped as critical, which will prevent them from being affected if area lost power, they will remain in same state as they were."
- maptweak: "SM emergency ventilation blast door is labeled as critical. Same goes for reactor blast doors. They are no longer affected by power loss."
- maptweak: "Tesla Engine APC was remapped and is no connected to the Tesla Engine SMES instead of main SMES. Tesla Engine SMES max default input/output was increased by 150kW to account for the new APC connected, since PA eats lots of power."
+23 -13
View File
@@ -1003,6 +1003,9 @@
"acm" = (
/obj/machinery/power/smes/buildable{
charge = 2e+006;
input_level_max = 350000;
is_critical = 1;
output_level_max = 350000;
RCon_tag = "Tesla - Containment"
},
/obj/structure/cable{
@@ -3024,18 +3027,6 @@
pixel_x = 0;
pixel_y = 36
},
/obj/machinery/power/apc{
cell_type = /obj/item/weapon/cell/super;
dir = 1;
is_critical = 1;
name = "north bump";
pixel_x = 0;
pixel_y = 24
},
/obj/structure/cable{
icon_state = "0-4";
d2 = 4
},
/turf/simulated/floor/plating,
/area/outpost/engineering/power)
"agF" = (
@@ -4133,6 +4124,11 @@
d2 = 8;
icon_state = "2-8"
},
/obj/structure/cable/yellow{
d1 = 2;
d2 = 4;
icon_state = "2-4"
},
/turf/simulated/floor/plating,
/area/outpost/engineering/power)
"aiO" = (
@@ -30755,6 +30751,20 @@
},
/turf/simulated/floor/tiled/white,
/area/medical/patient_wing_post1)
"wzY" = (
/obj/machinery/light,
/obj/machinery/power/apc{
dir = 2;
is_critical = 1;
name = "south bump";
pixel_y = -24
},
/obj/structure/cable/yellow{
d2 = 8;
icon_state = "0-8"
},
/turf/simulated/floor/plating,
/area/outpost/engineering/power)
"wLc" = (
/turf/simulated/floor/tiled/white,
/area/medical/patient_wing_gym)
@@ -43016,7 +43026,7 @@ agE
ace
aiu
ace
afR
wzY
abJ
ajQ
afM
+6
View File
@@ -9817,6 +9817,7 @@
charge = 2e+006;
input_attempt = 1;
input_level = 100000;
is_critical = 1;
output_attempt = 1;
output_level = 200000;
RCon_tag = "Supermatter - Containment"
@@ -10796,6 +10797,7 @@
dir = 4;
icon_state = "pdoor0";
id = "SupermatterPort";
is_critical = 1;
layer = 2.7;
name = "Reactor Blast Door";
opacity = 0
@@ -10814,6 +10816,7 @@
dir = 4;
icon_state = "pdoor0";
id = "SupermatterPort";
is_critical = 1;
layer = 2.7;
name = "Reactor Blast Door";
opacity = 0
@@ -10836,6 +10839,7 @@
dir = 4;
icon_state = "pdoor0";
id = "SupermatterPort";
is_critical = 1;
layer = 2.7;
name = "Reactor Blast Door";
opacity = 0
@@ -12636,6 +12640,7 @@
dir = 4;
icon_state = "pdoor1";
id = "EngineVent";
is_critical = 1;
name = "Reactor Vent";
p_open = 0
},
@@ -12686,6 +12691,7 @@
dir = 1;
icon_state = "pdoor0";
id = "SupermatterPort";
is_critical = 1;
layer = 2.7;
name = "Reactor Blast Door";
opacity = 0