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

new engine: fission reactor #36853

Draft
wants to merge 63 commits into
base: Bleeding-Edge
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
499e28c
mm code
CrazyAmphibian Jul 27, 2024
2f38644
size detection and setup
CrazyAmphibian Jul 28, 2024
cc02649
it actually compiles now
CrazyAmphibian Jul 28, 2024
79262f8
smore changes
CrazyAmphibian Jul 28, 2024
7202985
fixes, additions
CrazyAmphibian Jul 31, 2024
72facda
making things buildable pt 1
CrazyAmphibian Aug 2, 2024
a392ee4
buildability pt2
CrazyAmphibian Aug 3, 2024
9b3d37d
grammar, because i was making this at 3 in the morning
CrazyAmphibian Aug 3, 2024
88cd692
file seperation and fixes
CrazyAmphibian Aug 13, 2024
de40270
adds a new reagent
CrazyAmphibian Aug 22, 2024
a2f4809
placeholder sprites pt1
CrazyAmphibian Sep 14, 2024
65cbb0f
conflict resolution (i hope)
CrazyAmphibian Sep 14, 2024
380e0a3
more icons, reactor assembly works on spawned obj
CrazyAmphibian Sep 15, 2024
534078c
rework to fuel mechanics, constructability additions
CrazyAmphibian Sep 16, 2024
911526c
fixes, changes, stuff
CrazyAmphibian Sep 17, 2024
6c389bb
cargo orders, construciton, bugs
CrazyAmphibian Sep 18, 2024
a55c50f
runtime fixes, errors and isues. it just werks.
CrazyAmphibian Sep 18, 2024
90aa693
Update datums.dm
CrazyAmphibian Sep 18, 2024
cb48be0
ENGAGE HYPERSHITCODE THRUSTERS!!!1!111!!
CrazyAmphibian Sep 18, 2024
305df15
suggested changes pt1
CrazyAmphibian Sep 18, 2024
de066b5
changes pt2
CrazyAmphibian Sep 18, 2024
9bddebf
SCRAM actually works now. better controller examine text.
CrazyAmphibian Sep 18, 2024
8f50b4d
FIX IT FIX IT FIX IT FIX IT
CrazyAmphibian Sep 19, 2024
c1d3e99
the candle the burns twice as long burns half as bright (fuel number …
CrazyAmphibian Sep 19, 2024
717591b
nerf starter
CrazyAmphibian Sep 19, 2024
04a1dd0
new cargo order
CrazyAmphibian Sep 19, 2024
e0c403f
reactor UI
CrazyAmphibian Sep 20, 2024
8f08fc9
UI refactor
CrazyAmphibian Sep 21, 2024
b5cccbe
reactor UI functional
CrazyAmphibian Sep 21, 2024
bb94900
construction fixes
CrazyAmphibian Sep 21, 2024
8d59c82
fuel creation UI
CrazyAmphibian Sep 23, 2024
c0a3a1d
deconstruction
CrazyAmphibian Sep 23, 2024
16755fb
adjustable units
CrazyAmphibian Sep 23, 2024
fa83bae
new fuelrod subtype
CrazyAmphibian Sep 23, 2024
cdaae15
fuel recycling
CrazyAmphibian Sep 24, 2024
e526943
rads
CrazyAmphibian Sep 24, 2024
807bd27
meltdown framework
CrazyAmphibian Sep 24, 2024
7fbf86b
rads, guide
CrazyAmphibian Sep 25, 2024
2a3facb
Merge branch 'Bleeding-Edge' into edging-my-demon-core
CrazyAmphibian Sep 25, 2024
8286cd2
finishing touches
CrazyAmphibian Sep 26, 2024
653954d
UI autoclose, explosion changes
CrazyAmphibian Sep 26, 2024
b9170a9
oops wrong side
CrazyAmphibian Sep 26, 2024
d600971
nevermind i'm dumb
CrazyAmphibian Sep 26, 2024
c0b8558
explosion tweak
CrazyAmphibian Sep 26, 2024
0ce6eea
ex_act
CrazyAmphibian Sep 26, 2024
a436b20
seconds are 2 digits
CrazyAmphibian Sep 27, 2024
fec6efd
more rod icons
CrazyAmphibian Sep 27, 2024
7ed7b55
more heatcap
CrazyAmphibian Sep 27, 2024
c905f9f
TWO SECONDS
CrazyAmphibian Sep 28, 2024
560830e
file rename
CrazyAmphibian Sep 29, 2024
2b625ad
Merge branch 'Bleeding-Edge' into edging-my-demon-core
CrazyAmphibian Sep 29, 2024
fd0c46d
updated control rod code for 2 secs
CrazyAmphibian Oct 1, 2024
98d6282
sprite changes, system changes, ui changes
CrazyAmphibian Oct 3, 2024
af8995d
reactor controller sounds
CrazyAmphibian Oct 5, 2024
d2d074e
scram sound manually
CrazyAmphibian Oct 5, 2024
680fb07
post-review code fixes
CrazyAmphibian Oct 7, 2024
440bc3c
BEGONE SUBSYSTEM, CURSE YE TO THE SHADOWS
CrazyAmphibian Oct 7, 2024
cdc7c69
movment fix
CrazyAmphibian Oct 8, 2024
2b01b15
UI recolred to look more similar
CrazyAmphibian Oct 8, 2024
87c5cc7
case icon updates
CrazyAmphibian Oct 10, 2024
1f2b505
Merge branch 'Bleeding-Edge' into edging-my-demon-core
CrazyAmphibian Oct 11, 2024
36f2c6b
enhanced detection of reactor construction, fixed runtimes
CrazyAmphibian Oct 26, 2024
6c902c7
Merge branch 'edging-my-demon-core' of https://github.com/CrazyAmphib…
CrazyAmphibian Oct 26, 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
1 change: 1 addition & 0 deletions __DEFINES/gases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
#define GAS_CRYOTHEUM "cryotheum"
#define GAS_VOLATILE "volatile_fuel"
#define GAS_OXAGENT "oxygen_agent_b"
#define GAS_RADON "radon"
7 changes: 7 additions & 0 deletions __DEFINES/reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define CHEMFLAG_DISHONORABLE 1
#define CHEMFLAG_OBSCURING 2
#define CHEMFLAG_PIGMENT 4
#define CHEMFLAG_NOTREMOVABLE 8 //cannot be rid of by charcoal (or other reagent tomfoolery means).

#define EXPLICITLY_INVALID_REAGENT_ID "Use this ID if the reagent is not supposed to be used, like for the base type of other reagents."

Expand Down Expand Up @@ -540,6 +541,12 @@
#define FLAXOIL "flax_oil"
#define WAX "wax"

#define PLUTONIUM "plutonium"
#define RADON "radon"
#define LEAD "lead"
#define THALLIUM "thallium"
#define REGENERATECALCIUM "regeneratecalcium"

#define DYE_DANDELIONS "dandelion_dye"

// How many units of reagent are consumed per tick, by default.
Expand Down
1 change: 1 addition & 0 deletions __DEFINES/setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1777,6 +1777,7 @@ var/proccalls = 1
#define COMPUTER "computer"
#define EMBEDDED_CONTROLLER "embedded controller"
#define OTHER "other"
#define MACHINE_REINFORCED "reinforced machine"

// Bedsheet altering
#define PLAIDPATTERN_INCOMPATIBLE 0
Expand Down
10 changes: 10 additions & 0 deletions code/ZAS/Radon.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/mob/proc/radon_effects()

/mob/living/radon_effects()
if(flags & INVULNERABLE)
return
if(!src.loc)
return

var/molesofradon=src.loc.return_air().molar_density(GAS_RADON)*CELL_VOLUME
src.apply_radiation(molesofradon*1.5, RAD_EXTERNAL)
18 changes: 18 additions & 0 deletions code/ZAS/XGM_gases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,21 @@
/obj/effect/overlay/gas_overlay/cryotheum
name = "cryotheum"
icon_state = "cryotheum"

/datum/gas/radon
id = GAS_RADON
name = "Radon"
short_name = "Rn"
specific_heat = 20

molar_mass = 0.222 //i think i did this right

flags = XGM_GAS_NOTEWORTHY | XGM_GAS_LOGGED

/datum/gas/radon/is_human_safe(moles, datum/gas_mixture/mixture)
return moles/mixture.total_moles() < 0.01





6 changes: 6 additions & 0 deletions code/controllers/subsystem/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var/datum/subsystem/machinery/SSmachinery

var/list/machines = list()

var/list/global/fissionreactorlist=list()

/datum/subsystem/machinery
name = "Machinery"
Expand Down Expand Up @@ -32,6 +33,11 @@ var/list/machines = list()
if (!resumed)
currentrun = get_currenrun()

for(var/datum/fission_reactor_holder/reactor in fissionreactorlist)
reactor.fissioncycle()
reactor.coolantcycle()
reactor.misccycle()

var/obj/machinery/M
var/c = currentrun_index
while (c)
Expand Down
68 changes: 68 additions & 0 deletions code/datums/supply_packs/engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -420,3 +420,71 @@
access = list(access_engine_minor)
group = "Engineering"
containsdesc = "A cutting edge machine that tears into a universe orthogonal to ours and applies alternative laws of physics to gaseous oxygen in its immediate vicinity. Requires a bluespace crystal to work (an artificial crystal comes with this crate!)."

/datum/supply_packs/fissionreactor_starterkit
contains = list(
/obj/item/weapon/fuelrod/small/starter,
/obj/item/weapon/book/manual/engineering_fissionreactor_guide,
/obj/item/weapon/storage/box/fissionsupply_controller, //makes a crappy 1x2 interior. but it'll do.
/obj/item/weapon/storage/box/fissionsupply_genericassembly,
/obj/item/weapon/storage/box/fissionsupply_genericassembly,
/obj/item/weapon/storage/box/fissionsupply_fuelmaker,
/obj/item/weapon/circuitboard/fission_control_rod,
/obj/item/weapon/circuitboard/fission_fuel_rod,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,

)
name = "Fission reactor starter kit"
cost = 500 //Includes a lot of plasteel. Fuck you, ask the miners for more you socially inept jobbie.
containertype = /obj/structure/closet/crate/secure/large/reinforced/shard/empty
containername = "Fission reactor starter kit"
group = "Engineering"
access = list(access_engine_major)
containsdesc = "Everything you need to build a very basic fission reactor. Comes with a pre-filled (albeit small) fuel rod."

/datum/supply_packs/fissionreactor_expansion
contains = list(
/obj/item/weapon/storage/box/fissionsupply_genericassembly,
/obj/item/weapon/storage/box/fissionsupply_genericassembly,
/obj/item/weapon/circuitboard/fission_control_rod, //gives you 2 expansion parts (control/fuel rod) and the casing needed to add.
/obj/item/weapon/circuitboard/fission_fuel_rod,
/obj/item/weapon/circuitboard/fission_control_rod,
/obj/item/weapon/circuitboard/fission_fuel_rod,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
/obj/item/weapon/storage/box/fissionsupply_casing,
)
name = "Fission reactor expansion pak"
cost = 200 //See above.
containertype = /obj/structure/closet/crate/secure/large/reinforced/shard/empty
containername = "Fission reactor expansion pak"
group = "Engineering"
access = list(access_engine_major)
containsdesc = "Contains supplies to expand an existing fission reactor. Remember to turn it off and drain the coolant first!"

/datum/supply_packs/fissionreactor_bigrod
contains = list(
/obj/item/weapon/fuelrod/large
)
name = "High-capacity fuel rod"
cost = 100 //It's a one time purchance, really. somewhat costy, but not that much for a department. watch for meltdowns.
containertype = /obj/structure/closet/crate/secure/large/reinforced/shard/empty
containername = "Large fuel rod"
group = "Engineering"
access = list(access_engine_major)
containsdesc = "An extra-large fuel rod, for extra power or for more complex fuel mixes. Use with extreme caution and control rods inserted."






9 changes: 8 additions & 1 deletion code/game/machinery/alarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
GAS_CARBON = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_PLASMA = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_SLEEPING = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_CRYOTHEUM = new /datum/airalarm_threshold(-1, -1, -1, -1) )
GAS_CRYOTHEUM = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_RADON = new /datum/airalarm_threshold(-1, -1, -1, -1))
// Partial pressure, kpa threshold for any gas not included in gas_thresholds. These gasses are added up.
var/datum/airalarm_threshold/other_gas_threshold = new /datum/airalarm_threshold(-1, -1, -1, -1)
// Kpa thresholds for what pressures are acceptable.
Expand Down Expand Up @@ -196,6 +197,7 @@
GAS_NITROGEN = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_CARBON = new /datum/airalarm_threshold(-1, -1, 5, 10),
GAS_PLASMA = new /datum/airalarm_threshold(-1, -1, 0.2, 0.5),
GAS_RADON = new /datum/airalarm_threshold(-1, -1, 0.05, 0.1),
GAS_SLEEPING = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_CRYOTHEUM = new /datum/airalarm_threshold(-1, -1, 0.5, 1) )
other_gas_threshold = new /datum/airalarm_threshold(-1, -1, 0.5, 1)
Expand All @@ -212,6 +214,7 @@
GAS_NITROGEN = new /datum/airalarm_threshold(16, 18, 135, 140),
GAS_CARBON = new /datum/airalarm_threshold(-1, -1, 5, 10),
GAS_PLASMA = new /datum/airalarm_threshold(-1, -1, 0.2, 0.5),
GAS_RADON = new /datum/airalarm_threshold(-1, -1, 0.05, 0.1),
GAS_SLEEPING = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_CRYOTHEUM = new /datum/airalarm_threshold(-1, -1, 0.5, 1) )
other_gas_threshold = new /datum/airalarm_threshold(-1, -1, 0.5, 1)
Expand All @@ -228,6 +231,7 @@
GAS_NITROGEN = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_CARBON = new /datum/airalarm_threshold(-1, -1, 5, 10),
GAS_PLASMA = new /datum/airalarm_threshold(-1, -1, 0.2, 0.5),
GAS_RADON = new /datum/airalarm_threshold(-1, -1, 0.05, 0.1),
GAS_SLEEPING = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_CRYOTHEUM = new /datum/airalarm_threshold(-1, -1, 0.5, 1) )
other_gas_threshold = new /datum/airalarm_threshold(-1, -1, 0.5, 1)
Expand All @@ -244,6 +248,7 @@
GAS_NITROGEN = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_CARBON = new /datum/airalarm_threshold(-1, -1, 5, 10),
GAS_PLASMA = new /datum/airalarm_threshold(16, 18, 135, 140),
GAS_RADON = new /datum/airalarm_threshold(-1, -1, 0.05, 0.1),
GAS_SLEEPING = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_CRYOTHEUM = new /datum/airalarm_threshold(-1, -1, 0.5, 1) )
other_gas_threshold = new /datum/airalarm_threshold(-1, -1, 0.5, 1)
Expand All @@ -260,6 +265,7 @@
GAS_NITROGEN = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_CARBON = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_PLASMA = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_RADON = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_SLEEPING = new /datum/airalarm_threshold(-1, -1, 0.5, 1),
GAS_CRYOTHEUM = new /datum/airalarm_threshold(-1, -1, 0.5, 1) )
other_gas_threshold = new /datum/airalarm_threshold(-1, -1, 0.5, 1)
Expand All @@ -276,6 +282,7 @@
GAS_NITROGEN = new /datum/airalarm_threshold(16, 18, 135, 140),
GAS_CARBON = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_PLASMA = new /datum/airalarm_threshold(-1, -1, 0.2, 0.5),
GAS_RADON = new /datum/airalarm_threshold(-1, -1, 0.05, 0.1),
GAS_SLEEPING = new /datum/airalarm_threshold(-1, -1, -1, -1),
GAS_CRYOTHEUM = new /datum/airalarm_threshold(-1, -1, -1, -1) )
other_gas_threshold = new /datum/airalarm_threshold(-1, -1, 0.5, 1)
Expand Down
13 changes: 13 additions & 0 deletions code/game/machinery/atmoalter/canister.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
canister_color = "grey"
can_label = 0

/obj/machinery/portable_atmospherics/canister/radon //for testing (or admin shittery)
name = "Canister \[Rn\]"
icon_state = "green"
canister_color = "green"
can_label = 0

/obj/machinery/portable_atmospherics/canister/update_icon()
if(destroyed)
icon_state = "[canister_color]-1"
Expand Down Expand Up @@ -399,6 +405,7 @@
"\[CO2\]" = "black", \
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \
"\[Rn\]" = "green", \
)
var/label = input("Choose canister label", "Gas canister") as null|anything in colors
if (label)
Expand Down Expand Up @@ -446,6 +453,12 @@

update_icon()


/obj/machinery/portable_atmospherics/canister/radon/New(loc)
..(loc)
air_contents.adjust_gas(GAS_RADON, (maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature))
CrazyAmphibian marked this conversation as resolved.
Show resolved Hide resolved
update_icon()

/obj/machinery/portable_atmospherics/canister/proc/weld(var/obj/item/tool/weldingtool/WT, var/mob/user)


Expand Down
4 changes: 4 additions & 0 deletions code/game/machinery/computer/buildandrepair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@
build_path = /obj/machinery/computer/stacking_unit
origin_tech = Tc_PROGRAMMING + "=2;" + Tc_MATERIALS + "=2"



/obj/item/weapon/circuitboard/attackby(obj/item/I as obj, mob/user as mob)
if(issolder(I))
var/obj/item/tool/solder/S = I
Expand Down Expand Up @@ -391,6 +393,8 @@
to_chat(user, "<span class='notice'>You [contraband_enabled ? "" : "un"]connect the mysterious fuse.</span>")
contraband_enabled = !contraband_enabled



/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob)
switch(state)
if(0)
Expand Down
7 changes: 6 additions & 1 deletion code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
var/list/components_in_use = null
var/build_state = 1
var/build_path = 0 //0 = Default path. 1 = Glass Frame
var/required_circuit_type = null

// For pods
var/list/connected_parts = list()
Expand Down Expand Up @@ -43,6 +44,9 @@
amt += req_components[path]
return amt

/obj/machinery/constructable_frame/machine_frame
required_circuit_type=MACHINE

/obj/machinery/constructable_frame/machine_frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.crit_fail)
to_chat(user, "<span class='warning'>This part is faulty, you cannot add this to the machine!</span>")
Expand Down Expand Up @@ -125,7 +129,7 @@
if(!..())
if(istype(P, /obj/item/weapon/circuitboard))
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == MACHINE)
if(B.board_type == required_circuit_type)
if(!user.drop_item(B, src, failmsg = TRUE))
return

Expand Down Expand Up @@ -1718,3 +1722,4 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/stock_parts/manipulator = 2,
/obj/item/weapon/stock_parts/matter_bin = 1,
)

5 changes: 5 additions & 0 deletions code/game/objects/items/stacks/stack_recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ var/list/datum/stack_recipe/plasteel_recipes = list (
new/datum/stack_recipe("shuttle bed", /obj/structure/bed/racecar/shuttle, 2, one_per_turf = 1, on_floor = 1),
new/datum/stack_recipe("fire truck bed", /obj/structure/bed/racecar/firetruck, 2, one_per_turf = 1, on_floor = 1),
)),
null,
new/datum/stack_recipe("Reinforced machine frame", /obj/machinery/constructable_frame/machine_frame/reinforced, 5, time = 60, one_per_turf = 1 ),
null,
new/datum/stack_recipe("Reactor casing frame", /obj/structure/girder/reactor, 4, time = 50, one_per_turf = 1 ),
new/datum/stack_recipe("Reactor fuel rod", /obj/item/weapon/fuelrod, 2, time = 25),
)

/* ====================================================================
Expand Down
Loading
Loading