Skip to content

Commit

Permalink
TGS Test Merge (#19968)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogbot-13 committed Oct 3, 2023
2 parents 599b5ac + ac8f05e commit a9f87f8
Show file tree
Hide file tree
Showing 49 changed files with 7,067 additions and 18 deletions.
2,509 changes: 2,509 additions & 0 deletions _maps/RandomRuins/StationRuins/BoxStation/engine_reactor.dmm

Large diffs are not rendered by default.

2,477 changes: 2,477 additions & 0 deletions _maps/RandomRuins/StationRuins/MetaStation/meta_reactor.dmm

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define RAD_PROTECT_CONTENTS_1 (1 << 15)
/// should this object be allowed to be contaminated
#define RAD_NO_CONTAMINATE_1 (1 << 16)
/// Prevents most radiation on this turf from leaving it
#define RAD_CONTAIN_CONTENTS (1<<17)

//turf-only flags
#define NOJAUNT_1 (1<<0)
Expand All @@ -56,7 +58,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
/// Blocks lava rivers being generated on the turf
#define NO_LAVA_GEN_1 (1<<6)
/// Blocks ruins spawning on the turf
#define NO_RUINS_1 (1<<17)
#define NO_RUINS_1 (1<<18)

//AREA FLAGS
/// If blobs can spawn there and if it counts towards their score.
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define INVESTIGATE_PRESENTS "presents"
#define INVESTIGATE_VIROLOGY "viro" // yogs - Adds Investigate Virology
#define INVESTIGATE_HYPERTORUS "hypertorus"
#define INVESTIGATE_REACTOR "reactor"

// Logging types for log_message()
#define LOG_ATTACK (1 << 0)
Expand Down
59 changes: 59 additions & 0 deletions code/__DEFINES/reactor.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Index of each node in the list of nodes the reactor has
#define COOLANT_INPUT_GATE 1
#define MODERATOR_INPUT_GATE 2
#define COOLANT_OUTPUT_GATE 3

#define REACTOR_TEMPERATURE_MINIMUM 400 // Minimum temperature needed to run normally
#define REACTOR_TEMPERATURE_OPERATING 800 //Kelvin
#define REACTOR_TEMPERATURE_CRITICAL 1000 //At this point the entire station is alerted to a meltdown. This may need altering
#define REACTOR_TEMPERATURE_MELTDOWN 1200

#define REACTOR_HEAT_CAPACITY 6000 //How much thermal energy it takes to cool the reactor
#define REACTOR_ROD_HEAT_CAPACITY 400 //How much thermal energy it takes to cool each reactor rod
#define REACTOR_HEAT_EXPONENT 1.5 // The exponent used for the function for K heating
#define REACTOR_HEAT_FACTOR (20 / (REACTOR_HEAT_EXPONENT**2)) //How much heat from K

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

#define REACTOR_MODERATOR_DECAY_RATE 0.1 //Don't use up ALL of the moderator, engineers need it to last a full round

#define REACTOR_PRESSURE_OPERATING 6000 //Kilopascals
#define REACTOR_PRESSURE_CRITICAL 10000

#define REACTOR_MAX_CRITICALITY 5 //No more criticality than N for now.
#define REACTOR_CRITICALITY_POWER_FACTOR 3000 // affects criticality from high power

#define REACTOR_MAX_FUEL_RODS 5 //Maximum number of fuel rods that can fit in the reactor

#define REACTOR_POWER_FLAVOURISER 1000 //To turn those KWs into something usable
#define REACTOR_PERMEABILITY_FACTOR 500 // How effective permeability-type moderators are
#define REACTOR_CONTROL_FACTOR 250 // How effective control-type moderators are


/// Moderator effects, must be added to the moderator input for them to do anything

// Fuel types: increases power, at the cost of making K harder to control
#define PLASMA_FUEL_POWER 1 // baseline fuel
#define TRITIUM_FUEL_POWER 10 // woah there
#define ANTINOBLIUM_FUEL_POWER 100 // oh god oh fuck

// Power types: makes the fuel have more of an effect
#define OXYGEN_POWER_MOD 1 // baseline power modifier gas, optimal plasma/O2 ratio is 50/50 if you can handle the K increase from the plasma
#define HYDROGEN_POWER_MOD 10 // far superior power moderator gas, if you can handle the rads

// Control types: increases the effectiveness of control rods, makes K easier to control
#define NITROGEN_CONTROL_MOD 1 // good at controlling the reaction, but deadly rads
#define CARBON_CONTROL_MOD 2 // even better control, but even worse rads
#define PLUOXIUM_CONTROL_MOD 3 // best control gas, no rads!

// Cooling types: increases the effectiveness of coolant, exchanges more heat per process
#define BZ_PERMEABILITY_MOD 1 // makes cooling more effective
#define WATER_PERMEABILITY_MOD 2 // even better than BZ
#define NOBLIUM_PERMEABILITY_MOD 10 // best gas for cooling

// Radiation types: increases radiation, lower is better
#define NITROGEN_RAD_MOD 0.04 // mmm radiation
#define CARBON_RAD_MOD 0.08 // even higher
#define HYDROGEN_RAD_MOD 0.12 // getting a bit spicy there
#define TRITIUM_RAD_MOD 0.2 // fuck that's a lot
#define ANTINOBLIUM_RAD_MOD 10 // AAAAAAAAAAAAAAAAAAAA
11 changes: 6 additions & 5 deletions code/__DEFINES/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
#define CHANNEL_VOICE_ANNOUNCE 1015
#define CHANNEL_MEGAFAUNA 1014 // battle music
#define CHANNEL_CHARGED_SPELL 1013
#define CHANNEL_REACTOR_ALERT 1012

//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED

#define CHANNEL_HIGHEST_AVAILABLE 1011

///Default range of a sound.
#define SOUND_RANGE 17
Expand All @@ -24,11 +30,6 @@
///The default exponent of sound falloff
#define SOUND_FALLOFF_EXPONENT 6

//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED

#define CHANNEL_HIGHEST_AVAILABLE 1013

#define MAX_INSTRUMENT_CHANNELS (128 * 6)

#define SOUND_MINIMUM_PRESSURE 10
Expand Down
9 changes: 7 additions & 2 deletions code/__HELPERS/radiation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@
/proc/radiation_pulse(atom/source, intensity, range_modifier, log=FALSE, can_contaminate=TRUE, collectable_radiation = TRUE)
if(!SSradiation.can_fire)
return
for(var/dir in GLOB.cardinals)
new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate, collectable_radiation)
if(source && (source.flags_1 & RAD_CONTAIN_CONTENTS))
return
if(source?.loc && (source.loc.flags_1 & RAD_CONTAIN_CONTENTS))
return
if(intensity >= RAD_BACKGROUND_RADIATION)
for(var/dir in GLOB.cardinals)
new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate, collectable_radiation)

var/list/things = get_rad_contents(source) //copypasta because I don't want to put special code in waves to handle their origin
for(var/k in 1 to things.len)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ GLOBAL_LIST_EMPTY(airlocks) //list of all airlocks
GLOBAL_LIST_EMPTY(mechas_list) //list of all mechs. Used by hostile mobs target tracking.
GLOBAL_LIST_EMPTY(shuttle_caller_list) //list of all communication consoles and AIs, for automatic shuttle calls when there are none.
GLOBAL_LIST_EMPTY(machines) //NOTE: this is a list of ALL machines now. The processing machines list is SSmachine.processing !
GLOBAL_LIST_EMPTY(lights) //list of all light bulbs
GLOBAL_LIST_EMPTY(navigation_computers) //list of all /obj/machinery/computer/camera_advanced/shuttle_docker
GLOBAL_LIST_EMPTY(syndicate_shuttle_boards) //important to keep track of for managing nukeops war declarations.
GLOBAL_LIST_EMPTY(navbeacons) //list of all bot nagivation beacons, used for patrolling.
Expand Down
15 changes: 15 additions & 0 deletions code/datums/components/crafting/recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -850,3 +850,18 @@
)
result = /obj/item/reagent_containers/food/snacks/bait/wild
category = CAT_BAIT

// It can't run without fuel rods (cargo only) so this shouldn't be a problem
/datum/crafting_recipe/reactor_frame
name = "Nuclear Reactor Frame"
reqs = list(
/obj/item/stack/sheet/plasteel = 20,
/obj/item/stack/sheet/metal = 50,
/obj/item/stack/cable_coil = 10,
/obj/item/pipe = 3,
/obj/item/electronics/advanced_airlock_controller = 1
)
tool_behaviors = list(TOOL_WELDER)
result = /obj/structure/reactor_frame
category = CAT_STRUCTURES
time = 10 SECONDS
4 changes: 4 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,10 @@
* Default behaviour is to send COMSIG_ATOM_RAD_ACT and return
*/
/atom/proc/rad_act(strength, collectable_radiation)
if(flags_1 & RAD_CONTAIN_CONTENTS)
return
if(loc && (loc.flags_1 & RAD_CONTAIN_CONTENTS))
return
SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength, collectable_radiation)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
desc = "A crate with a lock on it, painted in the scheme of the station's engineers."
name = "secure engineering crate"
icon_state = "engi_secure_crate"
flags_1 = RAD_CONTAIN_CONTENTS // rad-insulated

/obj/structure/closet/crate/secure/science
name = "secure science crate"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/admin_investigate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if(!holder)
return

var/list/investigates = list(INVESTIGATE_RESEARCH, INVESTIGATE_EXONET, INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS, INVESTIGATE_RADIATION, INVESTIGATE_NANITES, INVESTIGATE_PRESENTS, INVESTIGATE_VIROLOGY, INVESTIGATE_HYPERTORUS) //Yogs - investigate virology
var/list/investigates = list(INVESTIGATE_RESEARCH, INVESTIGATE_EXONET, INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS, INVESTIGATE_RADIATION, INVESTIGATE_NANITES, INVESTIGATE_PRESENTS, INVESTIGATE_VIROLOGY, INVESTIGATE_HYPERTORUS, INVESTIGATE_REACTOR) //Yogs - investigate virology

var/list/logs_present = list("notes, memos, watchlist")
var/list/logs_missing = list("---")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

var/list/datum/pipeline/parents
var/list/datum/gas_mixture/airs
var/startingvolume = 200

/obj/machinery/atmospherics/components/New()
parents = new(device_type)
Expand All @@ -16,7 +17,7 @@
..()

for(var/i in 1 to device_type)
var/datum/gas_mixture/A = new(200)
var/datum/gas_mixture/A = new(startingvolume)
airs[i] = A

// Iconnery
Expand Down
37 changes: 37 additions & 0 deletions code/modules/cargo/packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,43 @@
crate_type = /obj/structure/closet/crate/secure/engineering
dangerous = TRUE

/datum/supply_pack/engine/fuel_rod_basic
name = "Uranium-235 Fuel Rods Crate"
desc = "Contains 5 Enriched Uranium Control Rods."
cost = 5000
contains = list(/obj/item/fuel_rod,
/obj/item/fuel_rod,
/obj/item/fuel_rod,
/obj/item/fuel_rod,
/obj/item/fuel_rod)
crate_name = "Uranium-235 Fuel Rods"
crate_type = /obj/structure/closet/crate/radiation

/datum/supply_pack/engine/fuel_rod_plutonium
name = "Plutonium-239 Fuel Rods Crate"
desc = "Contains 5 Plutonium-239 Control Rods."
cost = 15000
contains = list(/obj/item/fuel_rod/plutonium,
/obj/item/fuel_rod/plutonium,
/obj/item/fuel_rod/plutonium,
/obj/item/fuel_rod/plutonium,
/obj/item/fuel_rod/plutonium)
crate_name = "Plutonium-239 Fuel Rods"
crate_type = /obj/structure/closet/crate/radiation

/datum/supply_pack/engine/fuel_rod_bananium
name = "Bananium Fuel Rods Crate"
desc = "Contains 5 Bananium Control Rods."
cost = 15000
contraband = TRUE
contains = list(/obj/item/fuel_rod/material/bananium,
/obj/item/fuel_rod/material/bananium,
/obj/item/fuel_rod/material/bananium,
/obj/item/fuel_rod/material/bananium,
/obj/item/fuel_rod/material/bananium)
crate_name = "Bananium Fuel Rods"
crate_type = /obj/structure/closet/crate/radiation

//////////////////////////////////////////////////////////////////////////////
/////////////////////// Canisters & Materials ////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
starting_files |= list(
new /datum/computer_file/program/alarm_monitor,
new /datum/computer_file/program/supermatter_monitor,
new /datum/computer_file/program/nuclear_monitor,
new /datum/computer_file/program/power_monitor
)
. = ..()
Expand Down Expand Up @@ -82,7 +83,8 @@
starting_files |= list(
new /datum/computer_file/program/atmosscan,
new /datum/computer_file/program/alarm_monitor,
new /datum/computer_file/program/supermatter_monitor
new /datum/computer_file/program/supermatter_monitor,
new /datum/computer_file/program/nuclear_monitor
)
. = ..()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@

starting_files = list( new /datum/computer_file/program/budgetorders,
new /datum/computer_file/program/card_mod,
new /datum/computer_file/program/alarm_monitor)
new /datum/computer_file/program/alarm_monitor,
new /datum/computer_file/program/supermatter_monitor,
new /datum/computer_file/program/nuclear_monitor,
new /datum/computer_file/program/energy_harvester_control)
finish_color = "orange"

/obj/item/modular_computer/tablet/phone/preset/advanced/command/rd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
desc = "A stationary computer. This one comes preloaded with engineering programs."
starting_files = list( new /datum/computer_file/program/power_monitor,
new /datum/computer_file/program/alarm_monitor,
new /datum/computer_file/program/nuclear_monitor,
new /datum/computer_file/program/supermatter_monitor)
initial_program = /datum/computer_file/program/power_monitor

Expand Down Expand Up @@ -145,6 +146,7 @@
new /datum/computer_file/program/card_mod,
new /datum/computer_file/program/power_monitor,
new /datum/computer_file/program/alarm_monitor,
new /datum/computer_file/program/nuclear_monitor,
new /datum/computer_file/program/supermatter_monitor,
new /datum/computer_file/program/energy_harvester_control)

Expand Down
Loading

0 comments on commit a9f87f8

Please sign in to comment.