Merge pull request #1126 from ArchieBeepBoop/RBMK_Branch_Simple

[Experimental] Ports NSV13's rbmk fission reactor
This commit is contained in:
Dahlular
2021-05-05 20:56:46 -06:00
committed by GitHub
52 changed files with 8222 additions and 7 deletions
+5 -1
View File
@@ -16,10 +16,14 @@
#define CHANNEL_DIGEST 1009
#define CHANNEL_PREYLOOP 1008
//Hyperstation Channels
#define CHANNEL_REACTOR_ALERT 1007 // reactor sounds
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED
#define CHANNEL_HIGHEST_AVAILABLE 1008 //CIT CHANGE - COMPENSATES FOR VORESOUND CHANNELS
#define CHANNEL_HIGHEST_AVAILABLE 1006 //CIT CHANGE - COMPENSATES FOR VORESOUND CHANNELS
#define SOUND_MINIMUM_PRESSURE 10
+45 -1
View File
@@ -176,4 +176,48 @@ round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), ro
offset = (y-1)*4
for(x in 1 to 4)
output[offset+x] = round(A[offset+1]*B[x] + A[offset+2]*B[x+4] + A[offset+3]*B[x+8] + A[offset+4]*B[x+12]+(y==5?B[x+16]:0), 0.001)
return output
return output
/atom/proc/shake_animation(var/intensity = 8) //Makes the object visibly shake
var/initial_transform = new/matrix(transform)
var/init_px = pixel_x
var/shake_dir = pick(-1, 1)
var/rotation = 2+soft_cap(intensity, 1, 1, 0.94)
var/offset = 1+soft_cap(intensity*0.3, 1, 1, 0.8)
var/time = 2+soft_cap(intensity*0.3, 2, 1, 0.92)
animate(src, transform=turn(transform, rotation*shake_dir), pixel_x=init_px + offset*shake_dir, time=1)
animate(transform=initial_transform, pixel_x=init_px, time=time, easing=ELASTIC_EASING)
/*
This proc makes the input taper off above cap. But there's no absolute cutoff.
Chunks of the input value above cap, are reduced more and more with each successive one and added to the output
A higher input value always makes a higher output value. but the rate of growth slows
*/
/proc/soft_cap(var/input, var/cap = 0, var/groupsize = 1, var/groupmult = 0.9)
//The cap is a ringfenced amount. If we're below that, just return the input
if (input <= cap)
return input
var/output = 0
var/buffer = 0
var/power = 1//We increment this after each group, then apply it to the groupmult as a power
//Ok its above, so the cap is a safe amount, we move that to the output
input -= cap
output += cap
//Now we start moving groups from input to buffer
while (input > 0)
buffer = min(input, groupsize) //We take the groupsize, or all the input has left if its less
input -= buffer
buffer *= groupmult**power //This reduces the group by the groupmult to the power of which index we're on.
//This ensures that each successive group is reduced more than the previous one
output += buffer
power++ //Transfer to output, increment power, repeat until the input pile is all used
return output
+4
View File
@@ -27,6 +27,10 @@
/proc/radiation_pulse(atom/source, intensity, range_modifier, log=FALSE, can_contaminate=TRUE)
if(!SSradiation.can_fire)
return
if(istype(get_turf(source), /turf/open/pool))
var/turf/open/pool/PL = get_turf(source)
if(PL.filled == TRUE)
intensity *= 0.15
var/area/A = get_area(source)
var/atom/nested_loc = source.loc
var/spawn_waves = TRUE
+5 -1
View File
@@ -537,6 +537,10 @@
SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT)
/atom/proc/rad_act(strength)
if(istype(get_turf(src), /turf/open/pool))
var/turf/open/pool/PL = get_turf(src)
if(PL.filled == TRUE)
strength *= 0.15
SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength)
/atom/proc/narsie_act()
@@ -894,4 +898,4 @@ Proc for attack log creation, because really why not
if(href_list["statpanel_item_click"])
// first of all make sure we valid
var/mouseparams = list2params(paramslist)
usr_client.Click(src, loc, null, mouseparams)
usr_client.Click(src, loc, null, mouseparams)
+1 -1
View File
@@ -9,7 +9,7 @@
S.update_icon()
S.power_change()
var/list/skipped_areas = list(/area/engine/engineering, /area/engine/supermatter, /area/engine/atmospherics_engine, /area/ai_monitored/turret_protected/ai)
var/list/skipped_areas = list(/area/engine/engineering, /area/engine/supermatter, /area/engine/atmospherics_engine, /area/engine/engineering/reactor_core, /area/engine/engineering/reactor_control, /area/ai_monitored/turret_protected/ai)
for(var/area/A in world)
if( !A.requires_power || A.always_unpowered )
@@ -208,7 +208,7 @@
/datum/pipeline/proc/return_air()
. = other_airs + air
if(null in .)
stack_trace("[src] has one or more null gas mixtures, which may cause bugs. Null mixtures will not be considered in reconcile_air().")
stack_trace("[src]([REF(src)]) has one or more null gas mixtures, which may cause bugs. Null mixtures will not be considered in reconcile_air().")
return removeNullsFromList(.)
/datum/pipeline/proc/reconcile_air()
+36
View File
@@ -193,3 +193,39 @@
contains = list(/obj/item/energy_harvester)
crate_name = "energy harvesting module crate"
crate_type = /obj/structure/closet/crate/secure/engineering
/datum/supply_pack/engine/fuel_rod
name = "Uranium Fuel Rod crate"
desc = "Two additional fuel rods for use in a reactor, requires CE access to open. Caution: Radioactive"
cost = 3000
access = ACCESS_CE
contains = list(/obj/item/twohanded/required/fuel_rod,
/obj/item/twohanded/required/fuel_rod)
crate_name = "Uranium-235 Fuel Rod crate"
crate_type = /obj/structure/closet/crate/secure/engineering
dangerous = TRUE
/datum/supply_pack/engine/bananium_fuel_rod
name = "Bananium Fuel Rod crate"
desc = "Two fuel rods designed to utilize and multiply bananium in a reactor, requires CE access to open. Caution: Radioactive"
cost = 4000
access = ACCESS_CE // Nag your local CE
contains = list(/obj/item/twohanded/required/fuel_rod/material/bananium,
/obj/item/twohanded/required/fuel_rod/material/bananium)
crate_name = "Bluespace Crystal Fuel Rod crate"
crate_type = /obj/structure/closet/crate/secure/engineering
dangerous = TRUE
contraband = TRUE
/datum/supply_pack/engine/reactor
name = "RMBK Nuclear Reactor Kit" // (not) a toy
desc = "Contains a reactor beacon and 3 reactor consoles. Uranium rods not included."
cost = 12000
access = ACCESS_CE
contains = list(/obj/item/survivalcapsule/reactor,
/obj/machinery/computer/reactor/control_rods/cargo,
/obj/machinery/computer/reactor/stats/cargo,
/obj/machinery/computer/reactor/fuel_rods/cargo)
crate_name = "Build Your Own Reactor Kit"
crate_type = /obj/structure/closet/crate/secure/engineering
dangerous = TRUE
@@ -38,6 +38,7 @@
hard_drive.store_file(new/datum/computer_file/program/power_monitor())
hard_drive.store_file(new/datum/computer_file/program/alarm_monitor())
hard_drive.store_file(new/datum/computer_file/program/supermatter_monitor())
hard_drive.store_file(new/datum/computer_file/program/nuclear_monitor())
// ===== RESEARCH CONSOLE =====
/obj/machinery/modular_computer/console/preset/research