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

Mini Cherrypick: Electrolyzer fixes. #63

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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 @@ -3367,9 +3368,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/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
1 change: 1 addition & 0 deletions _maps/shuttles/terragov/terragov_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
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
Loading