Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ports the RBMK from NSV (for real this time) #10364

Merged
merged 51 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b3ba36c
done?
XeonMations Dec 20, 2023
bcaa7c1
Merge branch 'BeeStation:master' into RBMK2ElectricBoogaloo
XeonMations Dec 21, 2023
4c3c7e6
added crate
XeonMations Dec 24, 2023
cb765be
fixed tools.dmi
XeonMations Dec 24, 2023
5b2f2b7
Circuit board done!
XeonMations Jan 12, 2024
3a47020
2
XeonMations Jan 21, 2024
67a1b0c
work
XeonMations Jan 27, 2024
10bace7
day 2
XeonMations Jan 28, 2024
91ec5b6
progress?
XeonMations Jan 30, 2024
c0796c0
still not working...
XeonMations Jan 31, 2024
527d332
For dakae!
XeonMations Jan 31, 2024
d3c8c55
to do: refactor
XeonMations Jan 31, 2024
b78a755
refactor 1
XeonMations Feb 2, 2024
dc5be2d
soon:tm:
XeonMations Apr 3, 2024
bde0419
day 2 of new code
XeonMations Apr 9, 2024
84a0339
DAY @*()#&@!#(*
XeonMations Apr 12, 2024
ba38659
remove unnecessary sounds, fix runtime issue
XeonMations Apr 22, 2024
165d657
New alarm.ogg sfx
XeonMations Apr 22, 2024
120de46
turns out unnecessary sounds were infact necessary, as well as icon c…
XeonMations May 15, 2024
b42148f
Final!
XeonMations May 15, 2024
fe2e806
Merge remote-tracking branch 'upstream/master' into RBMK2ElectricBoog…
XeonMations May 15, 2024
ff72cec
fix a thing
XeonMations May 15, 2024
f45c9f8
fix things + make co2 actually work
XeonMations May 15, 2024
fd9f7e1
fdsfds
XeonMations May 15, 2024
1124619
finish
XeonMations May 15, 2024
e87c331
update to apperance, makes it actually deconstructable and not die by…
XeonMations May 16, 2024
71530a4
propane and propane accessories
XeonMations May 24, 2024
f17be95
Merge branch 'master' into RBMK2ElectricBoogaloo
XeonMations Jun 30, 2024
4d9b2b3
last minute changes
XeonMations Jul 6, 2024
85efdc5
aaaa
XeonMations Jul 6, 2024
ef4b1c7
fixed proper blowout and meltdown conditions
XeonMations Jul 6, 2024
d6d8669
added ghost statistics
XeonMations Jul 6, 2024
b71d9cb
to do: figure out correct graph for damage model
XeonMations Jul 7, 2024
19a2728
fixed console, damage handler changes
XeonMations Jul 7, 2024
fa9b2bc
added ambience audio while th ereactor is active, plus bugfixes
XeonMations Jul 11, 2024
629c218
aaaa
XeonMations Jul 20, 2024
a14d543
finally fixed the damage handler model, also made the ambience not ba…
XeonMations Jul 28, 2024
a39c8b6
made passively produced power a thing
XeonMations Jul 28, 2024
8470a11
integrity viewing + tuned down power generation
XeonMations Jul 30, 2024
1b2c85e
gah
XeonMations Sep 8, 2024
7c1c3c7
rah
XeonMations Sep 8, 2024
a114620
maybe?
XeonMations Sep 8, 2024
845ae15
Merge remote-tracking branch 'upstream/master' into RBMK2ElectricBoog…
XeonMations Sep 9, 2024
3492b78
Update rbmk_core.dm
XeonMations Sep 9, 2024
86262c6
no more arbitrary names
XeonMations Nov 22, 2024
e8817a9
womp womp
XeonMations Nov 22, 2024
2155934
Update rbmk_procs.dm
XeonMations Nov 22, 2024
9f631fd
Update code/modules/power/rbmk/rbmk_monitoring.dm
XeonMations Nov 23, 2024
cb6a3a9
Update code/modules/power/rbmk/rbmk_monitoring.dm
XeonMations Nov 23, 2024
4b44f6a
Update code/modules/power/rbmk/rbmk_procs.dm
XeonMations Nov 23, 2024
09f240a
Update rbmk_monitoring.dm
XeonMations Nov 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,7 @@
#include "code\game\objects\effects\decals\cleanable\food.dm"
#include "code\game\objects\effects\decals\cleanable\humans.dm"
#include "code\game\objects\effects\decals\cleanable\misc.dm"
#include "code\game\objects\effects\decals\cleanable\nuclear_waste.dm"
#include "code\game\objects\effects\decals\cleanable\robots.dm"
#include "code\game\objects\effects\decals\turfdecal\dirt.dm"
#include "code\game\objects\effects\decals\turfdecal\guideline.dm"
Expand Down Expand Up @@ -3520,6 +3521,13 @@
#include "code\modules\power\lighting\light_items.dm"
#include "code\modules\power\lighting\light_mapping_helpers.dm"
#include "code\modules\power\lighting\light_wallframes.dm"
#include "code\modules\power\rbmk\_rbmk_defines.dm"
#include "code\modules\power\rbmk\fuel_rods.dm"
#include "code\modules\power\rbmk\rbmk_core.dm"
#include "code\modules\power\rbmk\rbmk_main_processes.dm"
#include "code\modules\power\rbmk\rbmk_monitoring.dm"
#include "code\modules\power\rbmk\rbmk_parts.dm"
#include "code\modules\power\rbmk\rbmk_procs.dm"
#include "code\modules\power\singularity\anomaly.dm"
#include "code\modules\power\singularity\boh_tear.dm"
#include "code\modules\power\singularity\collector.dm"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#define WIRE_LAYER 2.4
#define WIRE_TERMINAL_LAYER 2.45
#define UNDER_CATWALK 2.454
#define NUCLEAR_REACTOR_LAYER 2.456 //Below atmospheric devices, above hidden pipes and catwalks.
#define CATWALK_LATTICE 2.455
#define GAS_SCRUBBER_LAYER 2.46
#define GAS_PIPE_VISIBLE_LAYER 2.47
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/machines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@
#define SUPERMATTER_EMERGENCY 5 // Integrity < 25%
#define SUPERMATTER_DELAMINATING 6 // Pretty obvious.

#define NUCLEAR_REACTOR_ERROR -1
#define NUCLEAR_REACTOR_INACTIVE 0
#define NUCLEAR_REACTOR_ACTIVE 1
#define NUCLEAR_EXPLODING 2

//Nuclear bomb stuff
#define NUKESTATE_INTACT 5
#define NUKESTATE_UNSCREWED 4
Expand Down
18 changes: 18 additions & 0 deletions code/datums/looping_sounds/machinery_sounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,21 @@
falloff_exponent = 5
falloff_distance = 3
volume = 150

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/datum/looping_sound/rbmk
mid_sounds = list('sound/effects/rbmk/alarm.ogg' = 1)
volume = 100
extra_range = 10
mid_length = 58
ignore_walls = TRUE

/datum/looping_sound/rbmk_ambience
mid_sounds = list('sound/effects/rbmk/ambience.ogg' = 1)
mid_length = 19
volume = 20
extra_range = 10
falloff_exponent = 10
falloff_distance = 5
vary = FALSE
46 changes: 46 additions & 0 deletions code/game/objects/effects/decals/cleanable/nuclear_waste.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/obj/effect/decal/cleanable/nuclear_waste
name = "plutonium sludge"
desc = "A writhing pool of heavily irradiated, spent reactor fuel. You probably shouldn't step through this..."
icon = 'icons/obj/machines/rbmkparts.dmi'
icon_state = "nuclearwaste"
alpha = 150
light_color = LIGHT_COLOR_CYAN
color = "#ff9eff"

/obj/effect/decal/cleanable/nuclear_waste/Initialize(mapload)
. = ..()
set_light(3)

var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/effect/decal/cleanable/nuclear_waste/ex_act(severity, target)
if(severity != EXPLODE_DEVASTATE)
return
qdel(src)

/obj/effect/decal/cleanable/nuclear_waste/on_entered(datum/source, atom/movable/entered_mob)
if(isliving(entered_mob))
var/mob/living/L = entered_mob
playsound(loc, 'sound/effects/gib_step.ogg', HAS_TRAIT(L, TRAIT_LIGHT_STEP) ? 20 : 50, 1)
radiation_pulse(src, 625, 5) //MORE RADS

/obj/effect/decal/cleanable/nuclear_waste/attackby(obj/item/tool, mob/user)
if(tool.tool_behaviour == TOOL_SHOVEL)
radiation_pulse(src, 500, 5) //MORE RADS //The careful clearing of sludge should not give off as much radiation as casually running through it.
to_chat(user, "<span class='notice'>You start to clear [src]...</span>")
if(tool.use_tool(src, user, 50, volume=100))
to_chat(user, "<span class='notice'>You clear [src]. </span>")
qdel(src)
return
. = ..()

/obj/effect/decal/cleanable/nuclear_waste/epicenter //The one that actually does the irradiating. This is to avoid every bit of sludge PROCESSING
name = "dense nuclear sludge"


/obj/effect/decal/cleanable/nuclear_waste/epicenter/Initialize(mapload)
. = ..()
AddComponent(/datum/component/radioactive, 1500, src, 0)
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@
icon_state = "engineering"
build_path = /obj/machinery/computer/turbine_computer

/obj/item/circuitboard/computer/control_rods
name = "rbmk reactor control rod console (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/reactor/control_rods

//Generic

Expand Down
47 changes: 47 additions & 0 deletions code/modules/cargo/packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,17 @@
crate_name = "power cell crate"
crate_type = /obj/structure/closet/crate/engineering/electrical

/datum/supply_pack/engineering/sealant
name = "Engine Sealant Crate"
desc = "Nuclear reactor looking a bit cracked? Don't be afraid to slap on some NT brand sealant to patch those holes right up!"
cost = 1000
max_supply = 1
contains = list(/obj/item/sealant,
/obj/item/sealant,
/obj/item/sealant)
crate_name = "sealant crate"
crate_type = /obj/structure/closet/crate/engineering/

/datum/supply_pack/engineering/shuttle_engine
name = "Shuttle Engine Crate"
desc = "Through advanced bluespace-shenanigans, our engineers have managed to fit an entire shuttle engine into one tiny little crate. Requires CE access to open."
Expand All @@ -1125,6 +1136,20 @@
/obj/item/storage/toolbox/mechanical)
crate_name = "toolbox crate"

/datum/supply_pack/engineering/fuel_rods
name = "Uranium Fuel Rod Crate"
desc = "A five nuclear reactor grade fuel rod crate. Don't forget to wear radiation protection!"
cost = 3000
max_supply = 2
access_budget = ACCESS_ENGINE
contains = list(/obj/item/fuel_rod,
/obj/item/fuel_rod,
/obj/item/fuel_rod,
/obj/item/fuel_rod,
/obj/item/fuel_rod)
crate_name = "fuel rod crate"
crate_type = /obj/structure/closet/crate/secure/engineering

/datum/supply_pack/engineering/vending/engineering
name = "Engineering Vending Crate"
desc = "Sick of assistants breaking into engineering for tools? Contains one Engi-Vend refill and one YouTool refill."
Expand Down Expand Up @@ -1336,6 +1361,28 @@
/obj/machinery/power/rad_collector)
crate_name = "collector crate"

/datum/supply_pack/engine/nuclear_reactor
name = "RBMK Nuclear Reactor Engine Crate"
desc = "Contains the boards for an NT certified nuclear power engine! Don't forget to wear a radiation suit!"
cost = 7000
max_supply = 1
access = ACCESS_CE
access_budget = ACCESS_CE
contains = list(/obj/item/RBMK_box/core,
/obj/item/RBMK_box/body/coolant_input,
/obj/item/RBMK_box/body/moderator_input,
/obj/item/RBMK_box/body/waste_output,
/obj/item/RBMK_box/body,
/obj/item/RBMK_box/body,
/obj/item/RBMK_box/body,
/obj/item/RBMK_box/body,
/obj/item/RBMK_box/body,
/obj/item/circuitboard/computer/control_rods,
/obj/item/book/manual/wiki/rbmk)
crate_name = "nuclear engine crate"
crate_type = /obj/structure/closet/crate/secure/engineering
dangerous = TRUE

/datum/supply_pack/engine/sing_gen
name = "Singularity Generator Crate"
desc = "The key to unlocking the power of Lord Singuloth. Particle Accelerator not included."
Expand Down
38 changes: 38 additions & 0 deletions code/modules/power/rbmk/_rbmk_defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#define RBMK_TEMPERATURE_OPERATING 640 //Celsius
XeonMations marked this conversation as resolved.
Show resolved Hide resolved
#define RBMK_TEMPERATURE_WARNING 800 //At this point the entire station is alerted to a meltdown.
#define RBMK_TEMPERATURE_CRITICAL 900 //Kablowey

#define RBMK_NO_COOLANT_TOLERANCE 5 //How many process()ing ticks the reactor can sustain without coolant before slowly taking damage

#define RBMK_PRESSURE_OPERATING 6500 //KPA
#define RBMK_PRESSURE_WARNING 8200 //KPA, At this point the entire station is alerted to a meltdown.
#define RBMK_PRESSURE_CRITICAL 10100 //KPA, Kaboom

#define RBMK_MAX_CRITICALITY 3 //No more criticality than N for now.

#define RBMK_POWER_FLAVOURISER 800 //To turn those KWs into something usable

#define WARNING_TIME_DELAY 60 //to prevent accent sounds from layering
#define REACTOR_COUNTDOWN_TIME 30 SECONDS

///High pressure damage
#define RBMK_PRESSURE_DAMAGE (1<<0)
///High temperature damage
#define RBMK_TEMPERATURE_DAMAGE (1<<1)

#define REACTOR_INACTIVE 0 // No or minimal energy
#define REACTOR_NOMINAL 1 // Normal operation
#define REACTOR_WARNING 2 // Integrity damaged
#define REACTOR_DANGER 3 // Integrity < 50%
#define REACTOR_EMERGENCY 4 // Integrity < 25%
#define REACTOR_MELTING 5 // Pretty obvious.

#define REACTOR_MELTING_PERCENT 5
#define REACTOR_EMERGENCY_PERCENT 25
#define REACTOR_DANGER_PERCENT 50
#define REACTOR_WARNING_PERCENT 100

#define REACTOR_NEW_SEALS 0.875
#define REACTOR_CRACKED_SEALS 0.5

#define SAFE_POWER_LEVEL 20
Loading
Loading