mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
[MIRROR] Fixes fluid pump (#9385)
Co-authored-by: Nadyr <41974248+Darlantanis@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f424065b02
commit
f1020d3d55
@@ -10,5 +10,6 @@
|
|||||||
origin_tech = list(TECH_DATA = 1)
|
origin_tech = list(TECH_DATA = 1)
|
||||||
req_components = list(
|
req_components = list(
|
||||||
/obj/item/stock_parts/matter_bin = 2,
|
/obj/item/stock_parts/matter_bin = 2,
|
||||||
|
/obj/item/cell = 1,
|
||||||
/obj/item/stock_parts/motor = 2,
|
/obj/item/stock_parts/motor = 2,
|
||||||
/obj/item/stock_parts/manipulator = 1)
|
/obj/item/stock_parts/manipulator = 1)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
var/obj/item/cell/cell = null
|
var/obj/item/cell/cell = null
|
||||||
var/obj/item/hose_connector/output/Output = 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/on = 0
|
||||||
var/unlocked = 0
|
var/unlocked = 0
|
||||||
var/open = 0
|
var/open = 0
|
||||||
@@ -58,6 +58,8 @@
|
|||||||
qdel(src.reagents)
|
qdel(src.reagents)
|
||||||
src.reagents = R
|
src.reagents = R
|
||||||
|
|
||||||
|
cell = locate(/obj/item/cell) in src
|
||||||
|
|
||||||
/obj/machinery/pump/update_icon()
|
/obj/machinery/pump/update_icon()
|
||||||
..()
|
..()
|
||||||
cut_overlays()
|
cut_overlays()
|
||||||
@@ -158,7 +160,13 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
default_unfasten_wrench(user, W, 2 SECONDS)
|
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))
|
if(istype(cell))
|
||||||
to_chat(user, span_notice("There is a power cell already installed."))
|
to_chat(user, span_notice("There is a power cell already installed."))
|
||||||
return FALSE
|
return FALSE
|
||||||
@@ -168,7 +176,7 @@
|
|||||||
else
|
else
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
RefreshParts()
|
RefreshParts() // Handles cell assignment
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
@@ -184,13 +192,13 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
R.add_reagent("water", round(volume, 0.1))
|
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))
|
R.add_reagent("ice", round(volume / 2, 0.1))
|
||||||
|
|
||||||
for(var/turf/simulated/mineral/M in orange(5))
|
for(var/turf/simulated/mineral/M in orange(5,src)) // Uses the turf as center instead of an unset usr
|
||||||
if(istype(M.mineral, /obj/effect/mineral))
|
if(M.mineral && prob(40)) // v
|
||||||
var/obj/effect/mineral/ore = M.mineral
|
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
|
||||||
reagents.add_reagent(ore.ore_reagent, round(volume / 2, 0.1))
|
|
||||||
|
|
||||||
/turf/simulated/floor/water/pool/pump_reagents(var/datum/reagents/R, var/volume)
|
/turf/simulated/floor/water/pool/pump_reagents(var/datum/reagents/R, var/volume)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
Reference in New Issue
Block a user