Skip to content

Commit

Permalink
Combustion & Electrolyzer fixes (#3202)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Hydrogen now burns with the correct (I think) enthalpy, making hydrogen
TEGs viable. yay!
Komodo, Skipper, and Inkwell get instruction sheets. Crying-sun had one
and the upcoming dwayne remap adds one.
Electrolyzers now try to link when ice goes in instead of on init, which
caused certain maps to not connect.
Electrolyzer multitool linking works now.
Merits can no longer turn into a magic 0 value slip.
Replaces nt_ice passive pumps with volume pumps
(skipper keeps hydrogen, the commits lie)

Hydrogen pumps not correctly connecting to the pipenet even when the
Other recent map bug isn't in effect is still an issue, but I've got no
idea how to fix it. Leaving it as an issue for now.

fixed single wrong pixel on the sprite.
new

![image](https://github.com/user-attachments/assets/575e4ef0-5f29-4fc8-bbf6-cc2d57eb28c4)
old

![image](https://github.com/user-attachments/assets/2165bc33-f260-41ab-934d-3f6a90062277)

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
#2431 needed more testing, especially since it was an early PR of mine.
Fixes some of my mistakes.
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
fix: hydrogen and combustion bugs
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
Thera-Pissed authored Aug 3, 2024
1 parent 0666952 commit a7b94da
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 58 deletions.
2 changes: 1 addition & 1 deletion _maps/outpost/hangar/nt_ice_20x20.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@
/obj/effect/turf_decal/siding/white/corner{
dir = 4
},
/obj/machinery/atmospherics/components/binary/pressure_valve,
/obj/machinery/atmospherics/components/binary/volume_pump,
/turf/open/floor/plasteel/patterned/brushed{
light_color = "#1B1D2E";
light_range = 2;
Expand Down
2 changes: 1 addition & 1 deletion _maps/outpost/hangar/nt_ice_40x20.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
/obj/effect/turf_decal/siding/white/corner{
dir = 4
},
/obj/machinery/atmospherics/components/binary/pressure_valve,
/obj/machinery/atmospherics/components/binary/volume_pump,
/turf/open/floor/plasteel/patterned/brushed{
light_color = "#1B1D2E";
light_range = 2;
Expand Down
2 changes: 1 addition & 1 deletion _maps/outpost/hangar/nt_ice_40x40.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@
/obj/effect/turf_decal/siding/white/corner{
dir = 4
},
/obj/machinery/atmospherics/components/binary/pressure_valve,
/obj/machinery/atmospherics/components/binary/volume_pump,
/turf/open/floor/plasteel/patterned/brushed{
light_color = "#1B1D2E";
light_range = 2;
Expand Down
18 changes: 2 additions & 16 deletions _maps/outpost/hangar/nt_ice_56x20.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -322,20 +322,6 @@
planetary_atmos = 1
},
/area/hangar)
"hD" = (
/obj/effect/turf_decal/siding/white{
dir = 1
},
/obj/machinery/atmospherics/components/binary/volume_pump{
dir = 4
},
/obj/effect/turf_decal/industrial/shutoff,
/obj/structure/railing{
dir = 1;
layer = 2.8
},
/turf/open/floor/plasteel/tech,
/area/hangar)
"if" = (
/obj/machinery/door/airlock/outpost,
/obj/machinery/atmospherics/pipe/simple/yellow/hidden,
Expand Down Expand Up @@ -934,7 +920,7 @@
/obj/effect/turf_decal/siding/white/corner{
dir = 4
},
/obj/machinery/atmospherics/components/binary/pressure_valve,
/obj/machinery/atmospherics/components/binary/volume_pump,
/turf/open/floor/plasteel/patterned/brushed{
light_color = "#1B1D2E";
light_range = 2;
Expand Down Expand Up @@ -3996,7 +3982,7 @@ Hr
ag
yh
nD
hD
TK
AZ
Vu
OZ
Expand Down
18 changes: 2 additions & 16 deletions _maps/outpost/hangar/nt_ice_56x40.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
/obj/effect/turf_decal/siding/white/corner{
dir = 4
},
/obj/machinery/atmospherics/components/binary/pressure_valve,
/obj/machinery/atmospherics/components/binary/volume_pump,
/turf/open/floor/plasteel/patterned/brushed{
light_color = "#1B1D2E";
light_range = 2;
Expand Down Expand Up @@ -1185,20 +1185,6 @@
planetary_atmos = 1
},
/area/hangar)
"Eo" = (
/obj/effect/turf_decal/siding/white{
dir = 1
},
/obj/machinery/atmospherics/components/binary/volume_pump{
dir = 4
},
/obj/effect/turf_decal/industrial/shutoff,
/obj/structure/railing{
dir = 1;
layer = 2.8
},
/turf/open/floor/plasteel/tech,
/area/hangar)
"Eu" = (
/obj/structure/catwalk/over/plated_catwalk,
/obj/machinery/atmospherics/pipe/simple/orange/hidden,
Expand Down Expand Up @@ -5258,7 +5244,7 @@ tj
aH
Zj
qN
Eo
AW
pa
Od
aK
Expand Down
4 changes: 1 addition & 3 deletions _maps/shuttles/nanotrasen/nanotrasen_skipper.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@
/area/ship/hallway/central)
"dO" = (
/obj/machinery/atmospherics/components/trinary/mixer/flipped/layer4,
/obj/item/paper/guides/jobs/engi/combustion_thruster,
/turf/open/floor/plasteel/tech,
/area/ship/engineering/atmospherics)
"dS" = (
Expand Down Expand Up @@ -3365,9 +3366,6 @@
/obj/structure/cable{
icon_state = "1-2"
},
/obj/item/paper/crumpled{
default_raw_text = "66% Oxy (Node 1) to 34% Plasma (Node 2) works great at 500 kPa."
},
/obj/machinery/atmospherics/components/binary/pump{
dir = 8;
name = "engine fuel pump"
Expand Down
1 change: 1 addition & 0 deletions _maps/shuttles/solgov/solgov_inkwell.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2282,6 +2282,7 @@
dir = 4;
name = "Fuel Mixer"
},
/obj/item/paper/guides/jobs/engi/combustion_thruster,
/turf/open/floor/plasteel/tech,
/area/ship/maintenance/starboard)
"oH" = (
Expand Down
1 change: 1 addition & 0 deletions _maps/shuttles/syndicate/syndicate_gorlex_komodo.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,7 @@
/obj/machinery/atmospherics/components/trinary/mixer/flipped{
dir = 1
},
/obj/item/paper/guides/jobs/engi/combustion_thruster,
/turf/open/floor/plasteel/tech,
/area/ship/engineering)
"wJ" = (
Expand Down
45 changes: 26 additions & 19 deletions code/game/machinery/outpost_electrolyzer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@

var/obj/machinery/mineral/electrolyzer/linked_electrolyzer

/obj/machinery/computer/electrolyzer_console/Initialize()
. = ..()
find_electrolyzer()

/obj/machinery/computer/electrolyzer_console/proc/find_electrolyzer()
for(var/obj/machinery/mineral/electrolyzer/potential in oview(3,src))
if(linked_electrolyzer == null)
linked_electrolyzer = potential
potential.linked_console = src

/obj/machinery/computer/electrolyzer_console/proc/electrolyze_item(obj/item/I)
var/obj/item/stack/ore/ice/S = I
var/meritval = round(S.get_amount() * MERITS_PER_ICE * OUTPOST_HYDROGEN_CUT,1) // causes a bit of surplus in the "outpost" supply, even if they use all of these merits for hydrogen.
Expand All @@ -61,6 +51,7 @@
var/obj/item/multitool/multi = item
if(istype(multi.buffer, /obj/machinery/mineral/electrolyzer))
linked_electrolyzer = multi.buffer
linked_electrolyzer.linked_console = src
visible_message("Linked to [linked_electrolyzer]!")
return
return ..()
Expand Down Expand Up @@ -88,7 +79,17 @@
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/machinery/computer/electrolyzer_console/attackby(item,mob/user)
/obj/machinery/mineral/electrolyzer/proc/find_electrolyzer()
if(linked_console)
return TRUE
for(var/obj/machinery/computer/electrolyzer_console/potential in oview(3,src))
if(linked_console == null)
linked_console = potential
potential.linked_electrolyzer = src
return TRUE
return FALSE

/obj/machinery/mineral/electrolyzer/attackby(item,mob/user)
if(istype(item, /obj/item/multitool))
var/obj/item/multitool/multi = item
multi.buffer = src
Expand All @@ -108,6 +109,10 @@
INVOKE_ASYNC(src, PROC_REF(electrolyze), AM)

/obj/machinery/mineral/electrolyzer/proc/electrolyze(atom/movable/electrolyze_target, sound=TRUE)
if(!find_electrolyzer())
visible_message("<span class='danger'>[src] doesn't have a linked console!</span>")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, FALSE, 1)
return
if(istype(electrolyze_target, /obj/effect) || !linked_console || !isturf(electrolyze_target.loc) || (machine_stat & (BROKEN|NOPOWER)))
return
if(!istype(electrolyze_target, /obj/item/stack/ore/ice))
Expand Down Expand Up @@ -448,34 +453,36 @@
return ..()

/obj/item/merit/bundle/attack_self(mob/user)
if(!Adjacent(user))
to_chat(user, "<span class='warning'>You need to be in arm's reach for that!</span>")
return

var/cashamount = input(user, "How many merits do you want to take? (0 to [value])", "Take Merits", 20) as num
cashamount = round(clamp(cashamount, 0, value))
if(!cashamount)
return

if(!Adjacent(user))
to_chat(user, "<span class='warning'>You need to be in arm's reach for that!</span>")
return

value -= cashamount
if(!value)
user.dropItemToGround(src)
qdel(src)

var/obj/item/merit/bundle/bundle = new (user.loc)
bundle.value = cashamount
bundle.update_appearance()
user.put_in_hands(bundle)
update_appearance()

/obj/item/merit/bundle/AltClick(mob/living/user)
if(!Adjacent(user))
to_chat(user, "<span class='warning'>You need to be in arm's reach for that!</span>")
return

var/cashamount = input(user, "How many merits do you want to take? (0 to [value])", "Take Merits", 20) as num
cashamount = round(clamp(cashamount, 0, value))
if(!cashamount)
return

else if(!Adjacent(user))
to_chat(user, "<span class='warning'>You need to be in arm's reach for that!</span>")
return

value -= cashamount
if(!value)
user.dropItemToGround(src)
Expand Down
1 change: 1 addition & 0 deletions code/modules/atmospherics/auxgm/gas_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,6 @@
color = "#ffe"
fusion_power = 0
fire_products = list(GAS_H2O = 1)
enthalpy = FIRE_HYDROGEN_ENERGY_RELEASED
fire_burn_rate = 2
fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50
Binary file modified icons/obj/nutanks.dmi
Binary file not shown.
2 changes: 1 addition & 1 deletion tgui/packages/tgui/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const GASES = [
color: 'paleturquoise',
},
{
id: 'hydrogen',
id: 'h2',
path: '/datum/gas/hydrogen',
name: 'Hydrogen',
label: 'H₂',
Expand Down

0 comments on commit a7b94da

Please sign in to comment.