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

adds hydrogen, ice, and combustion thrusters! #2431

Merged
merged 159 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
add6a24
first draft
Thera-Pissed Oct 27, 2023
9541b62
fixes linter checks and tweaks thrust
Thera-Pissed Oct 27, 2023
b51e1f2
linters take 2
Thera-Pissed Oct 27, 2023
7343b18
adds overpressure damage, hydrogen gas miner, and a temporary fuel te…
Thera-Pissed Oct 28, 2023
7c8007f
adds repair functionality, examine text coming soon
Thera-Pissed Oct 28, 2023
4e68c8a
repair 2, examine steps, stockparts/board
Thera-Pissed Oct 29, 2023
d9700be
fixes dumb error, more stockparts stuff
Thera-Pissed Oct 29, 2023
44ba5f8
adds combustion thrusters to shuttle research
Thera-Pissed Oct 29, 2023
386e79d
thanks bog
Thera-Pissed Oct 31, 2023
12d8d47
ice ore spawns now
Thera-Pissed Nov 1, 2023
5cb991e
adds unique sprites for ice ore scanning and items
Thera-Pissed Nov 1, 2023
744d486
Merge branch 'master' into Thruster
Thera-Pissed Nov 1, 2023
8e084a2
Merge branch 'Thruster' of https://github.com/Thera-Pissed/Shiptest i…
Thera-Pissed Nov 1, 2023
d2eb7e8
I lied. removes some testing stuff and an icon fix
Thera-Pissed Nov 1, 2023
df28b94
instructions, open turf tanks, canister, safe limit on examine
Thera-Pissed Nov 1, 2023
48897c0
adds electrolyzers to outpost for TMing
Thera-Pissed Nov 1, 2023
f98cb45
lights + signs
Thera-Pissed Nov 1, 2023
b5c786f
integration tests fix?
Thera-Pissed Nov 1, 2023
c3ff4ff
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 9, 2023
4bc3f6f
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 9, 2023
5e1c8e1
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 9, 2023
501374b
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 9, 2023
5bb8fe3
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 9, 2023
e844bc7
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 9, 2023
ced7f67
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 9, 2023
60e4808
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 9, 2023
86c152e
switch instead of if chain
Thera-Pissed Nov 9, 2023
fbcdc41
Merge branch 'master' into Thruster
Thera-Pissed Nov 9, 2023
d5dae71
linters fix I hope
Thera-Pissed Nov 9, 2023
e5b7993
adds two new canister sprites for fuel & hydrogen
Thera-Pissed Nov 9, 2023
ee73633
Merge branch 'master' into Thruster
Thera-Pissed Nov 10, 2023
926c2c5
Merge branch 'master' into Thruster
Thera-Pissed Nov 10, 2023
2fbc3f0
Merge branch 'master' into Thruster
Thera-Pissed Nov 11, 2023
096156f
Merge branch 'master' into Thruster
Thera-Pissed Nov 14, 2023
8f2a7bb
Merge branch 'master' into Thruster
Thera-Pissed Nov 14, 2023
e902bb6
Merge branch 'master' into Thruster
Thera-Pissed Nov 15, 2023
f7ae69d
Merge branch 'master' into Thruster
Thera-Pissed Nov 16, 2023
61ef0da
kill indie map in an attempt to put in the new one
Thera-Pissed Nov 16, 2023
17c0604
50/50 shot this fixes it or breaks my maps
Thera-Pissed Nov 17, 2023
16e5ae8
Merge remote-tracking branch 'upstream/master' into Thruster
Thera-Pissed Nov 17, 2023
e900d2e
Merge branch 'master' into Thruster
Thera-Pissed Nov 17, 2023
cd9e379
fixes map merge stuff
Thera-Pissed Nov 17, 2023
4f09324
Merge branch 'Thruster' of https://github.com/Thera-Pissed/Shiptest i…
Thera-Pissed Nov 17, 2023
114d22a
fixes random doubled tiles
Thera-Pissed Nov 17, 2023
16acc35
fixes evil doubled tiles for real
Thera-Pissed Nov 17, 2023
5f8aacc
Merge branch 'master' into Thruster
Thera-Pissed Nov 18, 2023
86d8224
Merge branch 'master' into Thruster
Thera-Pissed Nov 18, 2023
ac01234
Merge branch 'master' into Thruster
Thera-Pissed Nov 19, 2023
c785704
Merge branch 'master' into Thruster
Thera-Pissed Nov 21, 2023
4b5df4c
Merge branch 'master' into Thruster
Thera-Pissed Nov 25, 2023
9e77005
Merge branch 'master' into Thruster
Thera-Pissed Nov 26, 2023
b6f277a
Merge branch 'master' into Thruster
Thera-Pissed Nov 26, 2023
77a2399
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 29, 2023
9e6bf85
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 29, 2023
9ccdd68
Update code/modules/atmospherics/machinery/portable/canister.dm
Thera-Pissed Nov 29, 2023
938b323
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 29, 2023
1b0edae
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 29, 2023
ac9c1b3
Update code/modules/mining/ores_coins.dm
Thera-Pissed Nov 29, 2023
a505a82
Update code/modules/research/designs/machine_designs.dm
Thera-Pissed Nov 29, 2023
927f4cc
Update code/modules/research/designs/machine_designs.dm
Thera-Pissed Nov 29, 2023
c8f86b0
Update code/modules/research/designs/machine_designs.dm
Thera-Pissed Nov 29, 2023
b91c805
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Nov 29, 2023
0a2703a
makes MOLS_PER_ICE do anything
Thera-Pissed Nov 29, 2023
d9b3207
Merge branch 'Thruster' of https://github.com/Thera-Pissed/Shiptest i…
Thera-Pissed Nov 29, 2023
3d71609
actually fixes MOLS_PER_ICE
Thera-Pissed Nov 29, 2023
a8d2e78
Update code/game/machinery/shuttle/shuttle_engine_types.dm
Thera-Pissed Nov 29, 2023
3ec55ad
addresses review stuff!
Thera-Pissed Nov 29, 2023
b69e7ea
Merge branch 'master' into Thruster
Thera-Pissed Nov 29, 2023
4a5ad80
Merge branch 'master' into Thruster
Thera-Pissed Dec 3, 2023
9d22fed
Update code/game/machinery/outpost_electrolyzer.dm
Thera-Pissed Dec 6, 2023
65e112a
Update code/game/machinery/shuttle/shuttle_engine_types.dm
Thera-Pissed Dec 6, 2023
1fea2a3
most of the review
Thera-Pissed Dec 6, 2023
f0f0d9c
Merge branch 'master' into Thruster
Thera-Pissed Dec 6, 2023
f7be5ef
Merge branch 'master' into Thruster
Thera-Pissed Dec 7, 2023
4f09b2a
Merge branch 'master' into Thruster
Thera-Pissed Dec 9, 2023
e272617
resolves map conflict?
Thera-Pissed Dec 13, 2023
92c6b9c
Merge branch 'master' into Thruster
Thera-Pissed Dec 19, 2023
86c5483
attempts to revert indie_space to fix problems. might not
Thera-Pissed Dec 19, 2023
a6baafc
Merge branch 'master' into Thruster
Thera-Pissed Dec 19, 2023
3596122
fixes indie_space changes pt 6
Thera-Pissed Dec 19, 2023
f7a8214
Merge branch 'master' into Thruster
Thera-Pissed Dec 24, 2023
bcd86ba
Merge branch 'master' into Thruster
Thera-Pissed Dec 29, 2023
91ca713
Merge branch 'master' into Thruster
Thera-Pissed Jan 1, 2024
5b72faf
Merge branch 'master' into Thruster
Thera-Pissed Jan 5, 2024
174a393
Merge branch 'master' into Thruster
Thera-Pissed Jan 6, 2024
2e97b23
Merge branch 'master' into Thruster
Thera-Pissed Jan 8, 2024
45f7ece
Merge branch 'master' into Thruster
Thera-Pissed Jan 15, 2024
036b675
Merge branch 'master' into Thruster
Thera-Pissed Jan 17, 2024
32a38dd
reverts map changes. again. hopefully
Thera-Pissed Jan 17, 2024
bb5fba8
reverts but from a modern commit? maybe?
Thera-Pissed Jan 17, 2024
4ce96d9
Merge branch 'master' into Thruster
Thera-Pissed Jan 18, 2024
1e3d646
Merge branch 'master' into Thruster
Thera-Pissed Jan 18, 2024
06e44f7
Merge branch 'master' into Thruster
Thera-Pissed Jan 19, 2024
cb9d494
scrip replaces direct production
Thera-Pissed Jan 20, 2024
e51ab19
slightly nicer placeholder sprites
Thera-Pissed Jan 20, 2024
07a69e3
hydrogen exchange gets worse the more its used
Thera-Pissed Jan 20, 2024
92eeb8c
better placeholder pump sprite
Thera-Pissed Jan 20, 2024
a1bd997
noises and stuff
Thera-Pissed Jan 20, 2024
9d32880
pump is on click instead of ctrl click
Thera-Pissed Jan 20, 2024
053e1d5
outpost tax rate to encourage hydrogen mining
Thera-Pissed Jan 20, 2024
c5e3b13
Merge branch 'master' into Thruster
Thera-Pissed Jan 22, 2024
0cf48f6
Merge branch 'master' into Thruster
Thera-Pissed Jan 24, 2024
d547e84
Merge branch 'master' into Thruster
Thera-Pissed Jan 26, 2024
f733b02
Merge branch 'master' into Thruster
Thera-Pissed Feb 2, 2024
0195ea3
Merge branch 'master' into Thruster
Thera-Pissed Feb 6, 2024
3f7fe15
Merge branch 'master' into Thruster
Thera-Pissed Feb 9, 2024
8800f60
Merge branch 'master' into Thruster
Thera-Pissed Feb 11, 2024
996b55e
Merge branch 'master' into Thruster
Thera-Pissed Feb 17, 2024
1fc83c3
Merge branch 'master' into Thruster
Thera-Pissed Feb 22, 2024
476ebd1
Merge branch 'master' into Thruster
Thera-Pissed Feb 24, 2024
12a363b
Merge branch 'master' into Thruster
Thera-Pissed Feb 27, 2024
bbf9995
reverts minerals.dm for now
Thera-Pissed Feb 29, 2024
ac5e29c
Merge branch 'master' into Thruster
Thera-Pissed Feb 29, 2024
fef0bed
addresses review + h exchange sprite
Thera-Pissed Feb 29, 2024
36cb431
Merge remote-tracking branch 'upstream/master' into Thruster
Thera-Pissed Apr 16, 2024
d2898c3
resolves conflict hopefully
Thera-Pissed Apr 16, 2024
3659bc7
github eludes me still
Thera-Pissed Apr 16, 2024
1c381b9
fixes conflict
Thera-Pissed May 14, 2024
8a2c8d1
re-adds placeholder pump icon
Thera-Pissed May 14, 2024
38bd6ee
im skill
Thera-Pissed May 14, 2024
4a21de5
Merge branch 'master' into Thruster
Thera-Pissed May 14, 2024
262ce51
I sure hope it works this time
Thera-Pissed May 14, 2024
f445352
makes ice ore show up again (only on ice planets, duh)
Thera-Pissed May 14, 2024
101434d
electrolyzer eats ice again, oopsies
Thera-Pissed May 14, 2024
0847abf
stuff I missed, for review
Thera-Pissed May 15, 2024
31e492e
actually addresses review of outpost_electrolyzer. oops
Thera-Pissed May 15, 2024
e33e299
adds combustion thruster boards for 2000 credits
Thera-Pissed May 15, 2024
678bc5c
adds combustion thrusters to the dwayne, skipper, and crying sun for TM.
Thera-Pissed May 27, 2024
df38393
minor ship tweaks
Thera-Pissed May 27, 2024
55d8251
reverts computer dmi to fix conflict
Thera-Pissed May 27, 2024
4a6e3a0
readds new screen
Thera-Pissed May 27, 2024
238f201
I hate code
Thera-Pissed May 27, 2024
b969b3c
Merge branch 'master' into Thruster
Thera-Pissed May 27, 2024
ba9ccab
if I just do the exact same thing again it'll work right.
Thera-Pissed May 27, 2024
5410f24
adds combustion thrusters to inkwell and komodo
Thera-Pissed May 27, 2024
c1c082d
test your map changes. duh.
Thera-Pissed May 27, 2024
6f7fa4f
Merge branch 'master' into Thruster
Thera-Pissed May 28, 2024
0a39c7d
implements PR #2977 heater layers
Thera-Pissed May 28, 2024
e32bd3a
how'd that get there
Thera-Pissed May 28, 2024
0251607
Merge remote-tracking branch 'upstream/master' into Thruster
Thera-Pissed May 30, 2024
5441965
Merge commit '493ea5f' into tmp
Thera-Pissed May 31, 2024
f665650
Merge commit '493ea5f' into tmp
Thera-Pissed May 31, 2024
1fbb4fb
Merge branch 'tmp' into Thruster
Thera-Pissed May 31, 2024
39ff64f
what do you mean I should just ask someone who knows what they're doi…
Thera-Pissed May 31, 2024
c480c04
work
Thera-Pissed May 31, 2024
6baa9b8
this should be fixed now
Thera-Pissed May 31, 2024
de0cf12
this is horrid
Thera-Pissed May 31, 2024
4b84174
why couldn't it just let me right click revert, huh
Thera-Pissed May 31, 2024
d3986ff
outpost maps
goober3 May 31, 2024
3ca62e4
Merge branch 'Thruster' of https://github.com/Thera-Pissed/Shiptest i…
goober3 May 31, 2024
a7ef99f
fixes double pipe, pump broke still
Thera-Pissed Jun 1, 2024
2913fe3
bug 'fixed'
Thera-Pissed Jun 2, 2024
104401f
dumb stupid no-fun linters
Thera-Pissed Jun 2, 2024
9a9dccc
another double pipe
Thera-Pissed Jun 2, 2024
0fa4181
wrong unloader
Thera-Pissed Jun 2, 2024
3f557b2
Update code/game/machinery/shuttle/shuttle_heater.dm
Thera-Pissed Jun 8, 2024
fa753bb
wrong path
Thera-Pissed Jun 8, 2024
b5c276d
fixes reconstructing heater bug for plasma & combustion and all thrus…
Thera-Pissed Jun 8, 2024
f9c33eb
probably should unregister the old signal huh
Thera-Pissed Jun 8, 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
16,237 changes: 8,215 additions & 8,022 deletions _maps/outpost/indie_space.dmm

Large diffs are not rendered by default.

1,056 changes: 607 additions & 449 deletions _maps/outpost/nanotrasen_asteroid.dmm

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@
#define ATMOS_TANK_PLASMA "plasma=70000;TEMP=293.15"
#define ATMOS_TANK_O2 "o2=100000;TEMP=293.15"
#define ATMOS_TANK_N2 "n2=100000;TEMP=293.15"
#define ATMOS_TANK_HYDROGEN "h2=100000;TEMP=293.15"
#define ATMOS_TANK_AIRMIX "o2=2644;n2=10580;TEMP=293.15"
#define ATMOS_TANK_FUEL "o2=33000;plasma=66000;TEMP=293.15"
#define ATMOS_TANK_HYDROGEN_FUEL "o2=33000;h2=66000;TEMP=293.15"

//PLANETARY
/// what pressure you have to be under to increase the effect of equipment meant for lavaland
Expand Down Expand Up @@ -324,6 +326,7 @@
#define GAS_STIMULUM "stim"
#define GAS_PLUOXIUM "pluox"
#define GAS_FREON "freon"
#define GAS_HYDROGEN "h2"

#define GAS_FLAG_DANGEROUS (1<<0)
#define GAS_FLAG_BREATH_PROC (1<<1)
Expand Down
145 changes: 145 additions & 0 deletions code/game/machinery/outpost_electrolyzer.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
//allows production of hydrogen from ice chunks
#define MOLS_PER_ICE 50

/obj/machinery/mineral/electrolyzer_unloader
name = "ice unloading machine"
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "unloader"
density = TRUE
input_dir = WEST
output_dir = EAST
needs_item_input = TRUE
processing_flags = START_PROCESSING_MANUALLY

/obj/machinery/mineral/electrolyzer_unloader/pickup_item(datum/source, atom/movable/target, atom/oldLoc)
if(istype(target, /obj/structure/ore_box))
var/obj/structure/ore_box/box = target
for(var/obj/item/stack/ore/ice/chunk in box)
unload_mineral(chunk)
else if(istype(target, /obj/item/stack/ore/ice))
var/obj/item/stack/ore/chunk = target
unload_mineral(chunk)

/obj/machinery/mineral/electrolyzer
name = "ice crusher"
desc = "breaks down ice into hydrogen and oxygen."
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved
icon = 'icons/obj/recycling.dmi'
icon_state = "grinder-o1"
input_dir = WEST
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 50
active_power_usage = 1000
max_integrity = 500
var/crush_damage = 1000
var/datum/weakref/attached_output

/obj/machinery/mineral/electrolyzer/Initialize()
. = ..()
update_appearance()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/machinery/mineral/electrolyzer/CanAllowThrough(atom/movable/mover, border_dir)
. = ..()
if(!anchored)
return
if(border_dir == input_dir)
return TRUE

/obj/machinery/mineral/electrolyzer/proc/on_entered(datum/source, atom/movable/AM)
SIGNAL_HANDLER
set_electrolyzer_output()
INVOKE_ASYNC(src, PROC_REF(electrolyze), AM)


/obj/machinery/mineral/electrolyzer/proc/electrolyze(atom/movable/electrolyze_target, sound=TRUE)
if(machine_stat & (BROKEN|NOPOWER))
return
if(!isturf(electrolyze_target.loc))
return
if(istype(electrolyze_target, /obj/effect))
return //effects are not touchable

var/list/to_electrolyze = electrolyze_target.GetAllContents()

var/list/electrolyze = list()

var/not_electrolyzed //used to play sounds if something that isnt ice gets chucked in

var/obj/machinery/atmospherics/components/binary/electrolyzer_out/resolved_output = attached_output?.resolve()

if(!resolved_output)
return
for(var/atom/movable/target as anything in to_electrolyze)
if(istype(target, /obj/item/stack/ore/ice))
electrolyze += target
continue
not_electrolyzed = TRUE
if(isliving(target))
crush_living(target)
if(not_electrolyzed)
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, FALSE, 1) // Dont play a ton of sounds for a ton of items
for(var/electro in electrolyze)
resolved_output.electrolyze_item(electro)
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved

if(!ismob(electrolyze_target)) //MULCH IT IF IT AINT ICE
qdel(electrolyze_target)


/obj/machinery/mineral/electrolyzer/proc/set_electrolyzer_output()
for(var/direction in GLOB.cardinals)
for(var/obj/machinery/atmospherics/components/binary/electrolyzer_out/found in get_step(get_turf(src), direction))
attached_output = WEAKREF(found)
update_icon_state()
return TRUE

/obj/machinery/mineral/electrolyzer/proc/crush_living(mob/living/L)

L.forceMove(loc)

if(issilicon(L))
playsound(src, 'sound/items/welder.ogg', 50, TRUE)
else
playsound(src, 'sound/effects/splat.ogg', 50, TRUE)

if(iscarbon(L))
if(L.stat == CONSCIOUS)
L.say("YOUWCH!!!!", forced="recycler grinding")
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved

// Instantly lie down, also go unconscious from the pain, before you die.
L.Unconscious(100)
L.adjustBruteLoss(crush_damage)

/obj/machinery/atmospherics/components/binary/electrolyzer_out
name = "electrolyzing chamber"
desc = "breaks down ice into hydrogen and oxygen."
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved
icon = 'icons/obj/shuttle.dmi'
icon_state = "heater_pipe"

use_power = IDLE_POWER_USE
idle_power_usage = 50
active_power_usage = 1000

density = TRUE
max_integrity = 400
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 30)
layer = OBJ_LAYER
showpipe = TRUE
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY

/obj/machinery/atmospherics/components/binary/electrolyzer_out/process_atmos()
update_parents()

/obj/machinery/atmospherics/components/binary/electrolyzer_out/proc/electrolyze_item(obj/item/I)
var/datum/gas_mixture/air1 = airs[1] //hydrogen out
var/datum/gas_mixture/air2 = airs[2] //oxygen out
var/obj/item/stack/ore/ice/S = I
var/molestomake = S.get_amount()
air1.adjust_moles (GAS_HYDROGEN, molestomake)
air1.set_temperature (T20C) //sets temp, otherwise the gas spawns at lowest possible temp
air2.adjust_moles (GAS_O2, molestomake / 2)
air2.set_temperature (T20C)
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved
update_parents()
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved
82 changes: 82 additions & 0 deletions code/game/machinery/shuttle/shuttle_engine_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,88 @@
thrust = 15
//All fuel code already handled

/**
* ### Combustion/Fire engines
* Engines that use oxidizer and fuel to output thrust. Theoretically works with any mix of fuels and oxiders. Wish me luck.
*/

/obj/item/paper/guides/recycler
name = "paper - 'combustion thruster instructions'"
default_raw_text = "<h2>Combustion Thruster Instructions</h2> text <b>bold</b>"
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved

/obj/machinery/power/shuttle/engine/fire
name = "combustion thruster"
desc = "A thruster that burns fuel with oxider that is stored in an adjacent heater."
icon_state = "burst_plasma"
icon_state_off = "burst_plasma_off"
circuit = /obj/item/circuitboard/machine/shuttle/engine/fire

idle_power_usage = 0
///what portion of the mols in the attached heater to "burn"
var/fuel_consumption = 0.0125
//multiplier for thrust
thrust = 3
//used by stockparts, efficiency_multiplier
var/consumption_multiplier = 1
//If this engine should create heat when burned.
var/heat_creation = FALSE
//A weakref of the connected engine heater with fuel.
var/datum/weakref/attached_heater


/obj/machinery/power/shuttle/engine/fire/burn_engine(percentage = 100, deltatime)
..()
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved
var/obj/machinery/atmospherics/components/unary/shuttle/fire_heater/resolved_heater = attached_heater?.resolve()
if(!resolved_heater)
return
if(heat_creation)
heat_engine()
var/actual_consumption = fuel_consumption * (percentage / 100) * deltatime * consumption_multiplier
return resolved_heater.consume_fuel(actual_consumption) * thrust //this proc returns the min of the fuel/oxy possible burns, multiply by our thrust value

/obj/machinery/power/shuttle/engine/fire/return_fuel()
. = ..()
var/obj/machinery/atmospherics/components/unary/shuttle/fire_heater/resolved_heater = attached_heater?.resolve()
return resolved_heater?.return_gas()

/obj/machinery/power/shuttle/engine/fire/return_fuel_cap()
. = ..()
var/obj/machinery/atmospherics/components/unary/shuttle/fire_heater/resolved_heater = attached_heater?.resolve()
return resolved_heater?.return_gas_capacity()

/obj/machinery/power/shuttle/engine/fire/screwdriver_act(mob/living/user, obj/item/I)
. = ..()
if(!panel_open)
update_icon_state()
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved

/obj/machinery/power/shuttle/engine/fire/update_engine()
. = ..()
if(!.)
return
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved
if(!attached_heater)
if(!set_heater())
thruster_active = FALSE
return FALSE
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved

/obj/machinery/power/shuttle/engine/fire/proc/set_heater()
for(var/direction in GLOB.cardinals)
for(var/obj/machinery/atmospherics/components/unary/shuttle/fire_heater/found in get_step(get_turf(src), direction))
if(found.dir != dir)
continue
if(found.panel_open)
continue
if(!found.anchored)
continue
attached_heater = WEAKREF(found)
update_icon_state()
return TRUE

/obj/machinery/power/shuttle/engine/fire/RefreshParts()
var/laz = 0
for(var/obj/item/stock_parts/micro_laser/L in component_parts)
laz += L.rating
consumption_multiplier = laz
return
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved
Thera-Pissed marked this conversation as resolved.
Show resolved Hide resolved
/**
* ### Ion Engines
* Engines that convert electricity to thrust. Yes, I know that's not how it works, it needs a propellant, but this is a video game.
Expand Down
Loading