[MIRROR] Fixes fluid pump (#9385)

Co-authored-by: Nadyr <41974248+Darlantanis@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2024-11-02 09:21:04 -07:00
committed by GitHub
parent f424065b02
commit f1020d3d55
2 changed files with 17 additions and 8 deletions

View File

@@ -18,7 +18,7 @@
var/obj/item/cell/cell = null
var/obj/item/hose_connector/output/Output = null
var/reagents_per_cycle = 40
var/reagents_per_cycle = 5 // severe nerf to unupgraded speed
var/on = 0
var/unlocked = 0
var/open = 0
@@ -58,6 +58,8 @@
qdel(src.reagents)
src.reagents = R
cell = locate(/obj/item/cell) in src
/obj/machinery/pump/update_icon()
..()
cut_overlays()
@@ -158,7 +160,13 @@
return FALSE
default_unfasten_wrench(user, W, 2 SECONDS)
else if(istype(W, /obj/item/cell) && open)
else if(istype(W, /obj/item/cell))
if(!open)
if(unlocked)
to_chat(user, span_notice("The battery panel is screwed shut."))
else
to_chat(user, span_notice("The battery panel is watertight and cannot be opened without a crowbar."))
return FALSE
if(istype(cell))
to_chat(user, span_notice("There is a power cell already installed."))
return FALSE
@@ -168,7 +176,7 @@
else
. = ..()
RefreshParts()
RefreshParts() // Handles cell assignment
update_icon()
@@ -184,13 +192,13 @@
. = ..()
R.add_reagent("water", round(volume, 0.1))
if(temperature <= T0C)
var/datum/gas_mixture/air = return_air() // v
if(air.temperature <= T0C) // Uses the current air temp, instead of the turf starting temp
R.add_reagent("ice", round(volume / 2, 0.1))
for(var/turf/simulated/mineral/M in orange(5))
if(istype(M.mineral, /obj/effect/mineral))
var/obj/effect/mineral/ore = M.mineral
reagents.add_reagent(ore.ore_reagent, round(volume / 2, 0.1))
for(var/turf/simulated/mineral/M in orange(5,src)) // Uses the turf as center instead of an unset usr
if(M.mineral && prob(40)) // v
R.add_reagent(M.mineral.reagent, round(volume / 5, 0.1)) // Was the turf's reagents variable not the R argument, and changed ore_reagent to M.mineral.reagent because of above change. Also nerfed amount to 1/5 instead of 1/2
/turf/simulated/floor/water/pool/pump_reagents(var/datum/reagents/R, var/volume)
. = ..()