From 9aeb6c984bca07871ed1b7291cf0fa2ed4258158 Mon Sep 17 00:00:00 2001 From: BaraBara Date: Mon, 5 Feb 2024 13:27:40 +0300 Subject: [PATCH] Revert "pisya" This reverts commit 2caae901d59163a0aa94c726c5befd8ed7440c3f. --- code/game/mecha/equipment/tools/tools.dm | 22 ++++++++-------------- code/game/mecha/mecha.dm | 2 -- code/game/mecha/working/ripley.dm | 4 ++-- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 673328b3335..c46f4e0c690 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -834,7 +834,6 @@ var/output = ..() if(output) return "[output] \[[fuel]: [round(fuel.amount*fuel.perunit,0.1)] cm3\] - [pr_mech_generator.active()?"Dea":"A"]ctivate" - return /obj/item/mecha_parts/mecha_equipment/generator/action(target) @@ -852,7 +851,7 @@ return /obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(obj/item/stack/material/P) - if(istype(P, fuel) && P.amount) + if(P.type == fuel.type && P.amount) var/to_load = max(max_fuel - fuel.amount * fuel.perunit,0) if(to_load) var/units = min(max(round(to_load / P.perunit), 1), P.amount) @@ -861,8 +860,7 @@ P.use(units) return units else - return FALSE - + return 0 return /obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user) @@ -880,7 +878,6 @@ var/turf/simulated/T = get_turf(src) if(!T) return - var/datum/gas_mixture/GM = new if(prob(10)) T.assume_gas("plasma", 100, 1500 CELSIUS) @@ -896,29 +893,26 @@ if(!EG.chassis) stop() EG.set_ready_state(1) - return FALSE - + return 0 if(EG.fuel.amount<=0) stop() EG.log_message("Deactivated - no fuel.") EG.set_ready_state(1) - return FALSE - + return 0 var/cur_charge = EG.chassis.get_charge() if(isnull(cur_charge)) EG.set_ready_state(1) EG.occupant_message("No powercell detected.") EG.log_message("Deactivated.") stop() - return FALSE - + return 0 var/use_fuel = EG.fuel_per_cycle_idle - if(cur_charge < (EG.chassis.cell.maxcharge / CELLRATE)) + if(cur_charge < EG.chassis.cell.maxcharge) use_fuel = EG.fuel_per_cycle_active EG.chassis.give_power(EG.power_per_cycle) EG.fuel.amount -= min(use_fuel/EG.fuel.perunit, EG.fuel.amount) EG.update_equip_info() - return TRUE + return 1 //Nuclear Generator @@ -955,7 +949,7 @@ EG.rad_source = SSradiation.radiate(EG, new /datum/radiation/preset/uranium_238(EG.fuel.amount)) else EG.rad_source.info.activity = EG.rad_source.info.specific_activity * EG.fuel.amount - return TRUE + return 1 //This is pretty much just for the death-ripley so that it is harmless diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 3dad36e1fc5..edcd8405838 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1129,7 +1129,6 @@ forceMove(src.loc) log_append_to_last("[H] moved in as pilot.") icon_state = src.reset_icon() - on_update_icon() set_dir(dir_in) playsound(src, 'sound/machines/windowdoor.ogg', 50, 1) if(!hasInternalDamage()) @@ -1310,7 +1309,6 @@ occupant = null icon_state = reset_icon()+"-open" set_dir(dir_in) - on_update_icon() return ///////////////////////// diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 102adc6c320..1b3c4764fbc 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -27,9 +27,9 @@ if(hides) ClearOverlays() if(hides < 3) - AddOverlays(image("mecha.dmi", src, occupant ? "ripley-g" : "ripley-g-open")) + AddOverlays(OVERLAY("mecha.dmi", occupant ? "ripley-g" : "ripley-g-open")) else - AddOverlays(image("mecha.dmi", src, occupant ? "ripley-g-full" : "ripley-g-full-open")) + AddOverlays(OVERLAY("mecha.dmi", occupant ? "ripley-g-full" : "ripley-g-full-open")) /obj/mecha/working/ripley/firefighter desc = "Standart APLU chassis was refitted with additional thermal protection and cistern."