From ee435ef63ff464f6c433eac712fcd704b47d528a Mon Sep 17 00:00:00 2001 From: Cyantime Date: Wed, 29 Nov 2017 01:13:18 -0500 Subject: [PATCH] Unfix --- .../binary_devices/algae_generator_vr.dm | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm index 38530a7793..bf7ade49b9 100644 --- a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm +++ b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm @@ -41,7 +41,7 @@ desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]." default_apply_parts() update_icon() - // TODO - Make these in actual icon states so its not silly like this + // TODO - Make these in acutal icon states so its not silly like this var/image/I = image(icon = icon, icon_state = "algae-pipe-overlay", dir = dir) I.color = PIPE_COLOR_BLUE overlays += I @@ -59,15 +59,9 @@ if(inoperable() || use_power < 2) ui_error = null - if(use_power == 1) - last_power_draw = idle_power_usage - else - last_power_draw = 0 update_icon() return 0 - last_power_draw = active_power_usage - // STEP 1 - Check material resources if(stored_material[MATERIAL_ALGAE] < algae_per_mole) ui_error = "Insufficient [material_display_name(MATERIAL_ALGAE)] to process." @@ -79,7 +73,7 @@ return var/moles_to_convert = min(moles_per_tick,\ stored_material[MATERIAL_ALGAE] * algae_per_mole,\ - storage_capacity[MATERIAL_CARBON] - stored_material[MATERIAL_CARBON]) + storage_capacity[MATERIAL_CARBON] - stored_material[MATERIAL_CARBON] * carbon_per_mole) // STEP 2 - Take the CO2 out of the input! var/power_draw = scrub_gas(src, list(input_gas), air1, internal, moles_to_convert) @@ -124,7 +118,7 @@ return 1 /obj/machinery/atmospherics/binary/algae_farm/attackby(obj/item/weapon/W as obj, mob/user as mob) - add_fingerprint(user) + src.add_fingerprint(user) if(default_deconstruction_screwdriver(user, W)) return if(default_deconstruction_crowbar(user, W)) @@ -134,12 +128,11 @@ if(try_load_materials(user, W)) return else - to_chat(user, "You cannot insert this item into \the [src]!") + user << "You cannot insert this item into \the [src]!" return /obj/machinery/atmospherics/binary/algae_farm/attack_hand(mob/user) - if(..()) - return 1 + if(..()) return 1 ui_interact(user) /obj/machinery/atmospherics/binary/algae_farm/RefreshParts() @@ -258,7 +251,7 @@ if(!istype(S)) return 0 if(!(S.material.name in stored_material)) - to_chat(user, "\The [src] doesn't accept [material_display_name(S.material)]!") + user << "\The [src] doesn't accept [material_display_name(S.material)]!" return 1 var/max_res_amount = storage_capacity[S.material.name] if(stored_material[S.material.name] + S.perunit <= max_res_amount) @@ -270,7 +263,7 @@ user.visible_message("\The [user] inserts [S.name] into \the [src].", "You insert [count] [S.name] into \the [src].") updateUsrDialog() else - to_chat(user, "\The [src] cannot hold more [S.name].") + user << "\The [src] cannot hold more [S.name]." return 1 /material/algae