mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 02:23:10 +00:00
Revert "Reagent Geysers, Pump Fixing, Puddles. (#8268)"
This reverts commit 6996e46ed4.
This commit is contained in:
@@ -20,10 +20,10 @@
|
||||
if(location)
|
||||
location.hotspot_expose(1000,1000)
|
||||
if (istype(src.loc,/obj/item/device/assembly_holder))
|
||||
if (istype(src.loc.loc, /obj/structure/reagent_dispensers))
|
||||
var/obj/structure/reagent_dispensers/tank = src.loc.loc
|
||||
if (tank && tank.faucet)
|
||||
tank.rupture()
|
||||
if (istype(src.loc.loc, /obj/structure/reagent_dispensers/fueltank/))
|
||||
var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc
|
||||
if (tank && tank.modded)
|
||||
tank.explode()
|
||||
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
new /datum/stack_recipe("lampshade", /obj/item/weapon/lampshade, 1, time = 1, pass_stack_color = TRUE, recycle_material = "[name]"),
|
||||
new /datum/stack_recipe("plastic net", /obj/item/weapon/material/fishing_net, 25, time = 1 MINUTE, pass_stack_color = TRUE, recycle_material = "[name]"),
|
||||
new /datum/stack_recipe("plastic fishtank", /obj/item/glass_jar/fish/plastic, 2, time = 30 SECONDS, recycle_material = "[name]"),
|
||||
new /datum/stack_recipe("reagent tubing", /obj/item/stack/hose, 1, 4, 20, pass_stack_color = TRUE, recycle_material = "[name]"),
|
||||
new /datum/stack_recipe("chemical tank", /obj/structure/reagent_dispensers/empty, 30, time = 15 SECONDS, one_per_turf = 1, on_floor = 1, pass_stack_color = TRUE, recycle_material = "[name]")
|
||||
new /datum/stack_recipe("reagent tubing", /obj/item/stack/hose, 1, 4, 20, pass_stack_color = TRUE, recycle_material = "[name]")
|
||||
)
|
||||
|
||||
/datum/material/cardboard
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
dump_contents()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/tesla_act()
|
||||
/obj/structure/reagent_dispensers/fueltank/tesla_act()
|
||||
..() //extend the zap
|
||||
rupture()
|
||||
explode()
|
||||
|
||||
/obj/mecha/tesla_act(power)
|
||||
..()
|
||||
|
||||
@@ -66,14 +66,6 @@
|
||||
|
||||
return the_id
|
||||
|
||||
/datum/reagents/proc/get_viscosity() // Returns a multiplier for the mixture's viscosity.
|
||||
. = 0
|
||||
if(total_volume <= 0)
|
||||
return
|
||||
for(var/datum/reagent/A in reagent_list)
|
||||
. += A.viscosity * A.volume
|
||||
. = max(0.1, . / total_volume)
|
||||
|
||||
/datum/reagents/proc/update_total() // Updates volume.
|
||||
total_volume = 0
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
@@ -254,12 +246,6 @@
|
||||
. += "[current.id] ([current.volume])"
|
||||
return english_list(., "EMPTY", "", ", ", ", ")
|
||||
|
||||
/datum/reagents/proc/has_liquids()
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
if(current.reagent_state == LIQUID)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/* Holder-to-holder and similar procs */
|
||||
|
||||
/datum/reagents/proc/remove_any(var/amount = 1) // Removes up to [amount] of reagents from [src]. Returns actual amount removed.
|
||||
@@ -400,16 +386,7 @@
|
||||
return
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
if(!has_liquids() || current.no_puddle)
|
||||
current.touch_turf(target, amount)
|
||||
|
||||
|
||||
if(has_liquids())
|
||||
var/obj/effect/decal/cleanable/chempuddle/CP = locate() in target
|
||||
if(!CP)
|
||||
CP = new(target)
|
||||
trans_to_holder(CP.reagents, amount)
|
||||
CP.Spread()
|
||||
current.touch_turf(target, amount)
|
||||
|
||||
update_total()
|
||||
|
||||
@@ -540,7 +517,7 @@
|
||||
trans_to(T, total_volume, multiplier, copy)
|
||||
if (total_volume <= 0)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/**
|
||||
* Calls [/datum/reagent/proc/on_update] on every reagent in this holder
|
||||
*
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
anchored = 0
|
||||
pressure_resistance = 2*ONE_ATMOSPHERE
|
||||
|
||||
var/faucet = FALSE
|
||||
|
||||
var/obj/item/hose_connector/input/active/InputSocket
|
||||
var/obj/item/hose_connector/output/active/OutputSocket
|
||||
|
||||
@@ -20,22 +18,6 @@
|
||||
|
||||
/obj/structure/reagent_dispensers/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(W.is_wrench())
|
||||
user.visible_message("[user] wrenches [src]'s faucet [faucet ? "closed" : "open"].", \
|
||||
"You wrench [src]'s faucet [faucet ? "closed" : "open"]")
|
||||
faucet = !faucet
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if (faucet)
|
||||
message_admins("[key_name_admin(user)] opened a reagent tank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]), leaking [LAZYLEN(reagents.reagent_list) ? english_list(reagents.reagent_list) : "nothing"]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>)")
|
||||
log_game("[key_name(user)] opened reagent tank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]), leaking [LAZYLEN(reagents.reagent_list) ? english_list(reagents.reagent_list) : "nothing"].")
|
||||
leak(amount_per_transfer_from_this)
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
if(faucet)
|
||||
. += SPAN_WARNING("The faucet is wrenched open, leaking the contents!")
|
||||
|
||||
/obj/structure/reagent_dispensers/Destroy()
|
||||
QDEL_NULL(InputSocket)
|
||||
@@ -75,26 +57,6 @@
|
||||
if (N)
|
||||
amount_per_transfer_from_this = N
|
||||
|
||||
/obj/structure/reagent_dispensers/Move()
|
||||
. = ..()
|
||||
if (. && faucet)
|
||||
leak(amount_per_transfer_from_this / 5 / reagents.get_viscosity())
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/leak(amount)
|
||||
if (reagents.total_volume <= 0)
|
||||
return
|
||||
|
||||
amount = min(amount, reagents.total_volume)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
var/obj/effect/decal/cleanable/chempuddle/CP = locate() in T
|
||||
if(!CP)
|
||||
CP = new(T)
|
||||
reagents.trans_to_holder(CP.reagents, amount)
|
||||
spawn(1)
|
||||
CP.Spread()
|
||||
|
||||
/obj/structure/reagent_dispensers/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -113,63 +75,10 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/reagent_dispensers/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.get_structure_damage())
|
||||
if(istype(Proj.firer))
|
||||
message_admins("[key_name_admin(Proj.firer)] shot reagent tank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>).")
|
||||
log_game("[key_name(Proj.firer)] shot reagent tank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).")
|
||||
|
||||
if(Proj.sharp || (istype(Proj, /obj/item/projectile/beam) && !Proj.damage))
|
||||
rupture()
|
||||
|
||||
/obj/structure/reagent_dispensers/ex_act()
|
||||
rupture()
|
||||
|
||||
/obj/structure/reagent_dispensers/blob_act()
|
||||
rupture()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/rupture()
|
||||
var/severity = 1
|
||||
var/violent = FALSE
|
||||
|
||||
if (reagents.total_volume > 500)
|
||||
severity = 3
|
||||
reagents.trans_to_turf(get_turf(src), reagents.total_volume / 5)
|
||||
else if (reagents.total_volume > 100)
|
||||
severity = 2
|
||||
reagents.trans_to_turf(get_turf(src), reagents.total_volume / 3)
|
||||
else if (reagents.total_volume > 50)
|
||||
severity = 1
|
||||
reagents.trans_to_turf(get_turf(src), reagents.total_volume / 2)
|
||||
|
||||
if(reagents.has_any_reagent(list("phoron","fuel","hydrophoron")))
|
||||
violent = TRUE
|
||||
|
||||
if(violent)
|
||||
switch(severity)
|
||||
if(3)
|
||||
explosion(get_turf(src),1,2,4)
|
||||
if(2)
|
||||
explosion(get_turf(src),0,1,3)
|
||||
if(1)
|
||||
explosion(get_turf(src),-1,1,2)
|
||||
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fire_act(datum/gas_mixture/air, temperature, volume)
|
||||
if (faucet)
|
||||
rupture()
|
||||
else if (temperature > T0C+500)
|
||||
rupture()
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/empty
|
||||
name = "chemical tank"
|
||||
desc = "A chemical tank."
|
||||
icon = 'icons/obj/machines/reagent.dmi'
|
||||
icon_state = "chemtank"
|
||||
amount_per_transfer_from_this = 10
|
||||
|
||||
//Dispensers
|
||||
/obj/structure/reagent_dispensers/watertank
|
||||
@@ -198,6 +107,7 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "weldtank"
|
||||
amount_per_transfer_from_this = 10
|
||||
var/modded = 0
|
||||
var/obj/item/device/assembly_holder/rig = null
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Initialize()
|
||||
@@ -207,7 +117,7 @@
|
||||
/obj/structure/reagent_dispensers/fueltank/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
if(faucet)
|
||||
if(modded)
|
||||
. += "<span class='warning'>Fuel faucet is wrenched open, leaking the fuel!</span>"
|
||||
if(rig)
|
||||
. += "<span class='notice'>There is some kind of device rigged to the tank.</span>"
|
||||
@@ -223,6 +133,15 @@
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if (W.is_wrench())
|
||||
user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \
|
||||
"You wrench [src]'s faucet [modded ? "closed" : "open"]")
|
||||
modded = modded ? 0 : 1
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if (modded)
|
||||
message_admins("[key_name_admin(user)] opened fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]), leaking fuel. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>)")
|
||||
log_game("[key_name(user)] opened fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]), leaking fuel.")
|
||||
leak_fuel(amount_per_transfer_from_this)
|
||||
if (istype(W,/obj/item/device/assembly_holder))
|
||||
if (rig)
|
||||
to_chat(user, "<span class='warning'>There is another device in the way.</span>")
|
||||
@@ -247,6 +166,51 @@
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.get_structure_damage())
|
||||
if(istype(Proj.firer))
|
||||
message_admins("[key_name_admin(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>).")
|
||||
log_game("[key_name(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).")
|
||||
|
||||
if(!istype(Proj ,/obj/item/projectile/beam/lasertag) && !istype(Proj ,/obj/item/projectile/beam/practice) )
|
||||
explode()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/ex_act()
|
||||
explode()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/blob_act()
|
||||
explode()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/proc/explode()
|
||||
if (reagents.total_volume > 500)
|
||||
explosion(src.loc,1,2,4)
|
||||
else if (reagents.total_volume > 100)
|
||||
explosion(src.loc,0,1,3)
|
||||
else if (reagents.total_volume > 50)
|
||||
explosion(src.loc,-1,1,2)
|
||||
if(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/fire_act(datum/gas_mixture/air, temperature, volume)
|
||||
if (modded)
|
||||
explode()
|
||||
else if (temperature > T0C+500)
|
||||
explode()
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Move()
|
||||
if (..() && modded)
|
||||
leak_fuel(amount_per_transfer_from_this/10.0)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/proc/leak_fuel(amount)
|
||||
if (reagents.total_volume == 0)
|
||||
return
|
||||
|
||||
amount = min(amount, reagents.total_volume)
|
||||
reagents.remove_reagent("fuel",amount)
|
||||
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, amount,1)
|
||||
|
||||
/obj/structure/reagent_dispensers/peppertank
|
||||
name = "Pepper Spray Refiller"
|
||||
desc = "Refills pepper spray canisters."
|
||||
@@ -441,7 +405,7 @@
|
||||
/obj/structure/reagent_dispensers/acid/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent("sacid", 1000)
|
||||
|
||||
|
||||
//Cooking oil refill tank
|
||||
/obj/structure/reagent_dispensers/cookingoil
|
||||
name = "cooking oil tank"
|
||||
|
||||
@@ -202,4 +202,4 @@
|
||||
|
||||
/turf/simulated/floor/water/contaminated/pump_reagents(var/datum/reagents/R, var/volume)
|
||||
. = ..()
|
||||
R.add_reagent("vatstabilizer", round(volume / 2, 0.1))
|
||||
R.add_reagent("vatstabilizer", round(volume / 2, 0.1))
|
||||
@@ -157,7 +157,7 @@
|
||||
id = "distill_brutejuice"
|
||||
result = "berserkmed"
|
||||
required_reagents = list("biomass" = 1, "hyperzine" = 3, "synaptizine" = 2, "phoron" = 1)
|
||||
result_amount = 5
|
||||
result_amount = 3
|
||||
|
||||
temp_range = list(T0C + 600, T0C + 700)
|
||||
temp_shift = 4
|
||||
@@ -176,7 +176,7 @@
|
||||
result = "cryoslurry"
|
||||
required_reagents = list("frostoil" = 7, "enzyme" = 3, "plasticide" = 3, "foaming_agent" = 2)
|
||||
inhibitors = list("water" = 5)
|
||||
result_amount = 12
|
||||
result_amount = 1
|
||||
|
||||
temp_range = list(0, 15)
|
||||
temp_shift = 20
|
||||
@@ -214,14 +214,3 @@
|
||||
reaction_rate = HALF_LIFE(20)
|
||||
|
||||
temp_range = list(T0C + 90, T0C + 95)
|
||||
|
||||
/decl/chemical_reaction/distilling/phoron_plasma
|
||||
name = "Energizing Phoron"
|
||||
id = "energize_phoron"
|
||||
result = "energetic_phoron"
|
||||
required_reagents = list("phoron" = 5)
|
||||
catalysts = list("hydrophoron" = 10)
|
||||
|
||||
result_amount = 4
|
||||
|
||||
temp_range = list(T0C + 100, T0C + 200)
|
||||
|
||||
@@ -1054,14 +1054,6 @@
|
||||
inhibitors = list("nitrogen" = 1) //So it doesn't mess with lexorin
|
||||
result_amount = 2
|
||||
|
||||
/decl/chemical_reaction/instant/energized_phoron
|
||||
name = "phoron plasma"
|
||||
id = "inst_energetic_phoron"
|
||||
result = "energetic_phoron"
|
||||
required_reagents = list("phoron" = 1, "hydrophoron" = 3)
|
||||
inhibitors = list("nitrogen" = 1) //So it doesn't mess with hydrophoron
|
||||
result_amount = 3
|
||||
|
||||
/decl/chemical_reaction/instant/deuterium
|
||||
name = "Deuterium"
|
||||
id = "deuterium"
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
var/can_overdose_touch = FALSE // Can the chemical OD when processing on touch?
|
||||
var/scannable = 0 // Shows up on health analyzers.
|
||||
|
||||
var/viscosity = 1 // Resistance to flow.
|
||||
var/no_puddle = FALSE // Prevent the creation of reagent puddles?
|
||||
|
||||
var/affects_dead = 0 // Does this chem process inside a corpse?
|
||||
var/affects_robots = 0 // Does this chem process inside a Synth?
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
color = "#C80000"
|
||||
var/volume_mod = 1 // So if you add different subtypes of blood, you can affect how much vessel blood each unit of reagent adds
|
||||
|
||||
viscosity = 0.3 // Slightly thicker than water.
|
||||
|
||||
glass_name = "tomato juice"
|
||||
glass_desc = "Are you sure this is tomato juice?"
|
||||
|
||||
@@ -159,8 +157,6 @@
|
||||
color = "#0064C877"
|
||||
metabolism = REM * 10
|
||||
|
||||
viscosity = 0.2 // For puddle flow, this forms puddles roughly of 5 units. Little bit of water goes a long way.
|
||||
|
||||
glass_name = "water"
|
||||
glass_desc = "The father of all refreshments."
|
||||
|
||||
|
||||
@@ -434,7 +434,6 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#A5F0EE"
|
||||
touch_met = 50
|
||||
no_puddle = TRUE
|
||||
|
||||
/datum/reagent/space_cleaner/touch_mob(var/mob/M)
|
||||
..()
|
||||
|
||||
@@ -89,7 +89,6 @@
|
||||
/datum/reagent/toxin/hydrophoron
|
||||
name = "Hydrophoron"
|
||||
id = "hydrophoron"
|
||||
reagent_state = SOLID
|
||||
description = "An exceptionally flammable molecule formed from deuterium synthesis."
|
||||
strength = 80
|
||||
var/fire_mult = 30
|
||||
@@ -123,27 +122,6 @@
|
||||
spawn(rand(30, 60))
|
||||
M.IgniteMob()
|
||||
|
||||
/datum/reagent/toxin/energized_phoron
|
||||
name = "phoron plasma"
|
||||
id = "energetic_phoron"
|
||||
description = "A strange, liquid-like form of Phoron."
|
||||
strength = 20
|
||||
affects_robots = TRUE
|
||||
|
||||
var/fire_mult = 4
|
||||
|
||||
/datum/reagent/toxin/energized_phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
..()
|
||||
M.apply_damage(removed * 30, ELECTROCUTE, ran_zone())
|
||||
M.apply_damage(removed * 10, BIOACID, ran_zone())
|
||||
if(prob(10 * fire_mult))
|
||||
M.pl_effects()
|
||||
|
||||
/datum/reagent/toxin/energized_phoron/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
..()
|
||||
M.apply_damage(removed * 40, ELECTROCUTE, ran_zone())
|
||||
M.adjust_fire_stacks(removed * 5)
|
||||
|
||||
/datum/reagent/toxin/lead
|
||||
name = "lead"
|
||||
id = "lead"
|
||||
@@ -161,9 +139,9 @@
|
||||
/datum/reagent/toxin/phoron
|
||||
name = "Phoron"
|
||||
id = "phoron"
|
||||
description = "Phoron in a powdered form."
|
||||
description = "Phoron in its liquid form."
|
||||
taste_mult = 1.5
|
||||
reagent_state = SOLID
|
||||
reagent_state = LIQUID
|
||||
color = "#9D14DB"
|
||||
strength = 30
|
||||
touch_met = 5
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
|
||||
/obj/structure/geyser
|
||||
name = "geothermal vent"
|
||||
desc = "A geothermal vent."
|
||||
description_info = "A geothermal vent capable of being \"mined\" for a reagent via a Reagent Pump.\
|
||||
The reagent is often randomized, but can be guessed via the color of the reagent, or a reagent scanner."
|
||||
|
||||
icon = 'icons/obj/machines/reagent.dmi'
|
||||
icon_state = "geyser"
|
||||
|
||||
density = FALSE
|
||||
|
||||
var/list/reagent_set // The associative list of what reagents this geyser produces. [ID = Amount]
|
||||
|
||||
var/max_reagent_picks = 3
|
||||
|
||||
var/list/allowed_reagents // The associated list of what reagents are allowed to be picked by RNG. [ID = [Min AMT, Max AMT]]
|
||||
|
||||
var/display_reagents = TRUE
|
||||
var/reagent_overlay_state
|
||||
|
||||
var/icon/reagent_overlay_icon
|
||||
|
||||
var/datum/effect_system/smoke_spread/chem/Smoke
|
||||
|
||||
/obj/structure/geyser/Initialize()
|
||||
. = ..()
|
||||
|
||||
create_reagents(100)
|
||||
Smoke = new(src)
|
||||
Smoke.show_log = FALSE
|
||||
|
||||
if(display_reagents == TRUE)
|
||||
if(!reagent_overlay_state)
|
||||
reagent_overlay_state = "[icon_state]-reag"
|
||||
|
||||
reagent_overlay_icon = new/icon(icon, reagent_overlay_state)
|
||||
|
||||
var/list/from_reag = get_allowed_reagents()
|
||||
|
||||
if(!LAZYLEN(reagent_set) && LAZYLEN(from_reag))
|
||||
LAZYINITLIST(reagent_set)
|
||||
var/reag_count = rand(1, max_reagent_picks)
|
||||
for(var/count = 1, count <= reag_count, count++)
|
||||
var/targ_reagent = pick(from_reag)
|
||||
|
||||
if(targ_reagent in SSchemistry.chemical_reagents)
|
||||
var/reag_bounds = from_reag[targ_reagent]
|
||||
reagent_set[targ_reagent] = rand(reag_bounds[1],reag_bounds[2])
|
||||
|
||||
if(LAZYLEN(reagent_set))
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/geyser/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/geyser/update_icon()
|
||||
cut_overlays()
|
||||
if(reagent_overlay_icon && reagents.total_volume)
|
||||
var/list/hextorgb = hex2rgb(reagents.get_color())
|
||||
reagent_overlay_icon.GrayScale()
|
||||
|
||||
reagent_overlay_icon.Blend(rgb(hextorgb[1],hextorgb[2],hextorgb[3]),ICON_MULTIPLY)
|
||||
|
||||
add_overlay(reagent_overlay_icon)
|
||||
|
||||
/obj/structure/geyser/process()
|
||||
var/obj/machinery/pump/Pump = locate() in get_turf(src)
|
||||
|
||||
for(var/reag_id in reagent_set)
|
||||
reagents.add_reagent(reag_id, reagent_set[reag_id])
|
||||
|
||||
if(Pump && Pump.anchored)
|
||||
return
|
||||
|
||||
if(reagents.total_volume > 20 && prob(round(reagents.total_volume / 10)))
|
||||
Smoke.set_up(reagents, rand(3,10), 0, get_turf(src))
|
||||
Smoke.start()
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/structure/geyser/proc/get_allowed_reagents()
|
||||
return allowed_reagents
|
||||
|
||||
/obj/structure/geyser/planetary
|
||||
desc = "A rocky outcropping."
|
||||
|
||||
allowed_reagents = list(
|
||||
"carbon" = list(1,10),
|
||||
"gold" = list(1,3),
|
||||
"silver" = list(1,5),
|
||||
"hydrogen" = list(3,10),
|
||||
"nitrogen" = list(10,30),
|
||||
"oxygen" = list(5,15),
|
||||
"sacid" = list(1,5),
|
||||
"sulfur" = list(2,10),
|
||||
"phoron" = list(1,1),
|
||||
"fuel" = list(10,30),
|
||||
"mineralizedfluid" = list(1,20)
|
||||
)
|
||||
|
||||
/obj/structure/geyser/planetary/phorogenic
|
||||
desc = "An ominous outcropping."
|
||||
|
||||
allowed_reagents = list(
|
||||
"energetic_phoron" = list(5,10)
|
||||
)
|
||||
|
||||
/obj/structure/geyser/truerandom
|
||||
name = "strange vent"
|
||||
|
||||
/obj/structure/geyser/truerandom/get_allowed_reagents()
|
||||
var/list/allowed_reagents = list()
|
||||
for(var/I = 1, I <= max_reagent_picks, I++)
|
||||
allowed_reagents[pick(SSchemistry.chemical_reagents)] = list(rand(1,5), rand(5,10))
|
||||
return ..()
|
||||
Reference in New Issue
Block a user