Skip to content

Commit c034a48

Browse files
adds to and fixes yet more fission things (#37460)
* sounds, bugfix * +-1, bugfix * randon rounding, ISC clarification
1 parent f6eef85 commit c034a48

File tree

6 files changed

+52
-12
lines changed

6 files changed

+52
-12
lines changed

code/controllers/subsystem/machinery.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ var/list/global/fissionreactorlist=list()
3737
reactor.fissioncycle()
3838
reactor.coolantcycle()
3939
reactor.misccycle()
40+
reactor.emitsound()
4041

4142
var/obj/machinery/M
4243
var/c = currentrun_index

code/game/objects/items/weapons/manuals.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,7 @@ building a reactor is an expensive endeavor, costing a lot of both time and reso
14521452
<h3>Isotopic Separational Combiner</h3>
14531453
<ol>
14541454
<li>Use 5 metal to construct a machine frame in the desired location</li>
1455+
<li><ul><li>Do note that the gas port will face SOUTH relative to your station's orientation</li></ul></li>
14551456
<li>Add 5 lengths of wiring to the machine</li>
14561457
<li>Insert the circuitboard</li>
14571458
<li>Add a 2 matter bins, micro-manipulator, 2 scanning modules, and a console screen to the frame</li>

code/modules/fissionreactor/fission_datums.dm

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ datums for the fission reactor, which includes the fuel and reactor
1919
var/fuel_rods_affected_by_rods=0
2020
var/time_last_ticked=null
2121

22+
var/time_last_sound_emission=0 //used to play sounds every 2 seconds.
23+
2224
var/coolantport_counter=0 // this varible exists to ensure that all coolant ports get treated equally, because if we didn't it would have a flow prefrence towards the ports with lower indexes.
2325
var/control_rod_insertion=1 //phase 1 vars. modified during runtime
2426
var/control_rod_target=1 // this is to create a bit of input lag to make things a bit more tense. also allows autoscram to work while the controller is unpowered.
@@ -44,6 +46,7 @@ datums for the fission reactor, which includes the fuel and reactor
4446
coolant.volume = CELL_VOLUME
4547
fissionreactorlist+=src
4648
time_last_ticked=world.time
49+
time_last_sound_emission=world.time
4750

4851
/datum/fission_reactor_holder/Destroy()
4952
fissionreactorlist-=src //remove from global list
@@ -586,10 +589,35 @@ datums for the fission reactor, which includes the fuel and reactor
586589
time_last_ticked=world.time
587590

588591

589-
590-
591-
592-
592+
/datum/fission_reactor_holder/proc/emitsound()
593+
if(!considered_on())
594+
return
595+
if (world.time + 2 SECONDS >=time_last_sound_emission)
596+
time_last_sound_emission=world.time
597+
for(var/mob/living/M in world)
598+
if(!M.client)
599+
continue
600+
if(M.loc.z!=zlevel)
601+
continue
602+
var/dx1=abs(M.loc.x-origin_x)
603+
var/dx2=abs(M.loc.x-corner_x)
604+
var/dy1=abs(M.loc.y-origin_y)
605+
var/dy2=abs(M.loc.y-corner_y)
606+
var/dist=max(min(dx1,dx2),min(dy1,dy2))
607+
if( dist<11) //within 10 tiles of a reactor edge
608+
var/sound/S = sound('sound/machines/fission/reactor_hum.ogg')
609+
S.pan=0
610+
if (M.loc.x>origin_x && M.loc.x > corner_x)
611+
//pan right
612+
S.pan=min(dx1,dx2)*-5
613+
else if (M.loc.x<origin_x && M.loc.x < corner_x)
614+
//pan left
615+
S.pan=min(dx1,dx2)*5
616+
617+
S.falloff = 2
618+
S.volume=23*(1-control_rod_insertion)+10
619+
M << S
620+
593621

594622

595623
/datum/fission_fuel

code/modules/fissionreactor/fuelmaker.dm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,9 @@ Container: [container ? container : "none"][container ? " \[[container.reagents.
314314
html+="<td style='text-align:right;'><a <a href='?src=\ref[interface];reagent=[R.id];dir=to_fuel;amount=1'>1u</a> <a href='?src=\ref[interface];reagent=[R.id];dir=to_fuel;amount=5'>5u</a> <a href='?src=\ref[interface];reagent=[R.id];dir=to_fuel;amount=10'>10u</a> <a href='?src=\ref[interface];reagent=[R.id];dir=to_fuel;amount=25'>25u</a> <a href='?src=\ref[interface];reagent=[R.id];dir=to_fuel;amount=999999'>All</a></td></tr>"
315315
if(air_contents)
316316
if(air_contents.gas[GAS_RADON])
317-
html+="<tr><td> Radon <a href='?src=\ref[interface];reagent=RADON;dir=goto_wiki'>(?)</a> [air_contents.gas[GAS_RADON]] units </td>"
317+
var/amt=air_contents.gas[GAS_RADON]
318+
amt = amt < 0.01 ? "<0.01" : amt
319+
html+="<tr><td> Radon <a href='?src=\ref[interface];reagent=radon;dir=goto_wiki'>(?)</a> [amt] units </td>"
318320
html+="<td style='text-align:right;'><a <a href='?src=\ref[interface];reagent=RADON;dir=to_fuel;amount=1'>1u</a> <a href='?src=\ref[interface];reagent=RADON;dir=to_fuel;amount=5'>5u</a> <a href='?src=\ref[interface];reagent=RADON;dir=to_fuel;amount=10'>10u</a> <a href='?src=\ref[interface];reagent=RADON;dir=to_fuel;amount=25'>25u</a> <a href='?src=\ref[interface];reagent=RADON;dir=to_fuel;amount=999999'>All</a></td></tr>"
319321

320322

code/modules/fissionreactor/objects_external.dm

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ included:
156156
anchored =1
157157
//circuit=/obj/item/weapon/circuitboard/fission_reactor
158158
var/can_autoscram=TRUE //automatic safeties if it gets too hot or power is cut.
159+
var/roddelta = 5 //% to move rods per click
159160
var/datum/fission_reactor_holder/associated_reactor=null
160161
var/obj/item/weapon/fuelrod/currentfuelrod=null
161162
var/poweroutagemsg=FALSE
@@ -425,7 +426,12 @@ included:
425426

426427
<div style='display:inline-block;width:100%;'>
427428
<a href='?src=\ref[interface];action=eject' [(!associated_reactor.fuel || associated_reactor.considered_on()) ? "class='blocked'" : ""]>\[EJECT FUEL\]</a>&nbsp;&nbsp;<a href='?src=\ref[interface];action=swap_tempunit'>\[TEMPERATURE\]</a>&nbsp;&nbsp;&nbsp;<a href='?src=\ref[interface];action=rods_up'>\[RODS UP\]</a> <br>
428-
&nbsp;<a href='?src=\ref[interface];action=SCRAM' id='scram' style='[associated_reactor.SCRAM ? "animation-name:scramon;" : "" ]'>\[&nbsp;SCRAM&nbsp;]</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='?src=\ref[interface];action=swap_gasunit'>\[COOLANT\]</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='?src=\ref[interface];action=rods_down'>\[RODS DOWN\]</a>
429+
&nbsp;<a href='?src=\ref[interface];action=SCRAM' id='scram' style='[associated_reactor.SCRAM ? "animation-name:scramon;" : "" ]'>\[&nbsp;SCRAM&nbsp;]</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='?src=\ref[interface];action=swap_gasunit'>\[COOLANT\]</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='?src=\ref[interface];action=rods_down'>\[RODS DOWN\]</a> <br>
430+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='?src=\ref[interface];action=setdelta_5' [roddelta==5 ? "class='blocked'" : ""]>\[RODS +- 5\]</a>&nbsp;&nbsp;&nbsp;<a href='?src=\ref[interface];action=setdelta_1' [roddelta==1 ? "class='blocked'" : ""]>\[RODS +- 1\]</a>
431+
432+
433+
434+
429435
</div>
430436

431437
</div>
@@ -636,18 +642,16 @@ included:
636642
to_chat(usr, "<span class='warning'>WARNING: Connection failure. Reduce range.</span>")
637643
return 1
638644

639-
640-
641645
switch(href_list["action"])
642646
if("SCRAM")
643647
if(!associated_reactor.SCRAM)
644648
playsound(src,'sound/machines/fission/rc_scram.ogg',50)
645649
associated_reactor.SCRAM=TRUE
646650
if("rods_up")
647-
associated_reactor.control_rod_target-=0.05
651+
associated_reactor.control_rod_target-=roddelta/100
648652
associated_reactor.control_rod_target=max(0,associated_reactor.control_rod_target)
649653
if("rods_down")
650-
associated_reactor.control_rod_target+=0.05
654+
associated_reactor.control_rod_target+=roddelta/100
651655
associated_reactor.control_rod_target=min(1,associated_reactor.control_rod_target)
652656
if("eject")
653657
if(!associated_reactor.fuel)
@@ -664,6 +668,10 @@ included:
664668
tempdisplaymode%=4
665669
if("swap_gasunit")
666670
displaycoolantinmoles=!displaycoolantinmoles
671+
if("setdelta_5")
672+
roddelta=5
673+
if("setdelta_1")
674+
roddelta=1
667675

668676
ask_remakeUI() //update it so that changes appear NOW.
669677
//SS_WAIT_MACHINERY
@@ -864,7 +872,7 @@ included:
864872
if(state!=0)
865873
return
866874
user.visible_message("<span class='warning'>[user] dissasembles \the [src].</span>", "<span class='notice'>You dissasemble \the [src].</span>")
867-
new material(get_turf(src), 4)
875+
new material(get_turf(src), 3)
868876
qdel(src)
869877
return
870878
to_chat(user, "<span class='notice'>You can't find a use for \the [W]</span>")

code/modules/research/designs/boards/computer_engie.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197

198198
/datum/design/fission_fuel_maker
199199
name = "Circuit Design (Isotopic Separational Combiner)"
200-
desc = "Allows for the construction of circuit boards used to seperate and combine different isotopes of materials"
200+
desc = "Allows for the construction of circuit boards used to separate and combine different isotopes of materials.\nRemember that the gas port will face south once constructed."
201201
id = "fission_control"
202202
req_tech = list(Tc_PROGRAMMING = 4, Tc_ENGINEERING = 4)
203203
build_type = IMPRINTER

0 commit comments

Comments
 (0)