Skip to content

Commit

Permalink
I lied. removes some testing stuff and an icon fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Thera-Pissed committed Nov 1, 2023
1 parent 8e084a2 commit d2eb7e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 148 deletions.
147 changes: 5 additions & 142 deletions code/game/machinery/outpost_electrolyzer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@
layer = OBJ_LAYER
showpipe = TRUE
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
var/molstomakedebug //removewhendone

var/molestomake

/obj/machinery/atmospherics/components/binary/electrolyzer_out/process_atmos()
update_parents()
Expand All @@ -141,145 +140,9 @@
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/molstomake = S.get_amount() * MOLS_PER_ICE
molstomakedebug = molstomake
air1.adjust_moles (GAS_HYDROGEN, molstomake)
air1.set_temperature (T20C)
air2.adjust_moles (GAS_O2, molstomake / 2)
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)
update_parents()
/*
/obj/machinery/mineral/electrolyzer
name = "ice crusher"
desc = "breaks down ice into hydrogen and oxygen."
icon = 'icons/obj/recycling.dmi'
icon_state = "grinder-o0"
circuit = /obj/item/circuitboard/machine/electrolyzer
input_dir = WEST
output_dir = EAST
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 50
active_power_usage = 1000
max_integrity = 500
var/icon_name = "grinder-o"
var/amount_produced = 50
var/item_recycle_sound = 'sound/items/welder.ogg'
/obj/machinery/electrolyzer/Initialize()
. = ..()
/obj/machinery/electrolyzer/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I))
return
if(default_pry_open(I))
return
if(default_deconstruction_crowbar(I))
return
return ..()
/obj/machinery/electrolyzer/CanAllowThrough(atom/movable/mover, border_dir)
. = ..()
if(!anchored)
return
if(border_dir == eat_dir)
return TRUE
/obj/machinery/electrolyzer/proc/on_entered(datum/source, atom/movable/AM)
SIGNAL_HANDLER
INVOKE_ASYNC(src, .proc/electrolyze, AM)
/obj/machinery/electrolyzer/proc/electrolyze(atom/movable/AM0, sound=TRUE)
if(machine_stat & (BROKEN|NOPOWER))
return
if(!isturf(AM0.loc))
return
if(istype(AM0, /obj/effect))
return //effects are not touchable
var/list/to_electrolyze = AM0.GetAllContents()
var/list/electrolyze = list()
for(var/i in to_electrolyze)
var/atom/movable/AM = i
if(istype(AM, /obj/item/ice_chunk))
electrolyze += AM
else if (istype(AM, /obj/item))
playsound(src, 'sound/machines/buzz-sigh.ogg', 20, FALSE)
for(var/electrolyzed in electrolyze)
electrolyze_item()
/obj/machinery/electrolyzer/proc/electrolyze(atom/movable/AM0, sound=TRUE)
if(QDELETED(target))
return
if(machine_stat & (BROKEN|NOPOWER))
return
if(!isturf(AM0.loc))
return
if(istype(AM0, /obj/effect))
return //effects are not touchable
var/list/to_electrolyze = AM0.GetAllContents()
var/list/electrolyze = list()
for(var/i in to_electrolyze)
var/atom/movable/AM = i
if(istype(AM, /obj/item))
var/obj/item/bodypart/head/as_head = AM
var/obj/item/mmi/as_mmi = AM
if(istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /obj/item/dullahan_relay))
living_detected = TRUE
nom += AM
else if(isliving(AM))
living_detected = TRUE
crunchy_nom += AM
var/not_eaten = to_eat.len - nom.len - crunchy_nom.len
if(living_detected) // First, check if we have any living beings detected.
if(obj_flags & EMAGGED)
for(var/CRUNCH in crunchy_nom) // Eat them and keep going because we don't care about safety.
if(isliving(CRUNCH)) // MMIs and brains will get eaten like normal items
crush_living(CRUNCH)
else // Stop processing right now without eating anything.
emergency_stop()
return
for(var/nommed in nom)
recycle_item(nommed)
if(nom.len && sound)
playsound(src, item_recycle_sound, (50 + nom.len*5), TRUE, nom.len, ignore_walls = (nom.len - 10)) // As a substitute for playing 50 sounds at once.
if(not_eaten)
playsound(src, 'sound/machines/buzz-sigh.ogg', (50 + not_eaten*5), FALSE, not_eaten, ignore_walls = (not_eaten - 10)) // Ditto.
if(!ismob(AM0))
AM0.moveToNullspace()
qdel(AM0)
else // Lets not move a mob to nullspace and qdel it, yes?
for(var/i in AM0.contents)
var/atom/movable/content = i
content.moveToNullspace()
qdel(content)
/obj/machinery/atmospherics/components/binary/electrolyzer_out
name = "electrolyzing chamber"
desc = "breaks down ice into hydrogen and oxygen."
icon = 'icons/obj/shuttle.dmi'
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
/obj/machinery/atmospherics/components/binary/electrolyzer_out/electrolyze()
*/
4 changes: 0 additions & 4 deletions code/game/machinery/shuttle/shuttle_heater.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@
var/icon_state_closed = "heater_pipe"
var/icon_state_open = "heater_pipe_open"
var/gas_amount = 0 //amount of gas used in calculations
var/fuel = 0
var/oxy = 0 //used for debugging REMOVEWHENDONE
var/gas_capacity = 0
var/efficiency_multiplier = 1
var/pressure_damage = 0
Expand Down Expand Up @@ -368,8 +366,6 @@
air_contents.adjust_moles(id, -gas_amount)

thrust_power = min(oxidation_power,fuel_power) * efficiency_multiplier //"simulates" how much possible thrust either oxidizer or fuel could make, and takes the min
oxy = oxidation_power //variables for debugging REMOVEWHENDONE
fuel = fuel_power
return(thrust_power)

/obj/machinery/atmospherics/components/unary/shuttle/fire_heater/attackby(obj/item/I, mob/living/user, params)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mining/ores_coins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/stack/ore/ice
name = "ice crystals"
desc = "used in an electrolyzer for hydrogen production"
icon_state = "Diamond ore"
item_state = "Diamond ore"
icon_state = "Ice ore"
item_state = "Ice ore"
singular_name = "ice chunk"
scan_state = "rock_Ice"
mine_experience = 2
Expand Down

0 comments on commit d2eb7e8

Please sign in to comment.