mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-21 08:06:43 +01:00
53 lines
2.0 KiB
Plaintext
53 lines
2.0 KiB
Plaintext
|
|
|
|
/* Nooooope, not yet.
|
|
/obj/structure/geyser
|
|
name = "geyser"
|
|
icon = 'icons/obj/lavaland/terrain.dmi'
|
|
icon_state = "geyser"
|
|
anchored = TRUE
|
|
|
|
var/erupting_state = null //set to null to get it greyscaled from "[icon_state]_soup". Not very usable with the whole random thing, but more types can be added if you change the spawn prob
|
|
var/activated = FALSE //whether we are active and generating chems
|
|
var/reagent_id = /datum/reagent/oil
|
|
var/potency = 2 //how much reagents we add every process (2 seconds)
|
|
var/max_volume = 500
|
|
var/start_volume = 50
|
|
|
|
/obj/structure/geyser/proc/start_chemming()
|
|
activated = TRUE
|
|
create_reagents(max_volume, DRAINABLE)
|
|
reagents.add_reagent(reagent_id, start_volume)
|
|
START_PROCESSING(SSfluids, src) //It's main function is to be plumbed, so use SSfluids
|
|
if(erupting_state)
|
|
icon_state = erupting_state
|
|
else
|
|
var/mutable_appearance/I = mutable_appearance('icons/obj/lavaland/terrain.dmi', "[icon_state]_soup")
|
|
I.color = reagents.get_color()
|
|
add_overlay(I)
|
|
|
|
/obj/structure/geyser/process()
|
|
if(activated && reagents.total_volume <= reagents.maximum_volume) //this is also evaluated in add_reagent, but from my understanding proc calls are expensive
|
|
reagents.add_reagent(reagent_id, potency)
|
|
|
|
/obj/structure/geyser/plunger_act(obj/item/plunger/P, mob/living/user, _reinforced)
|
|
if(!_reinforced)
|
|
to_chat(user, "<span class='warning'>The [P.name] isn't strong enough!</span>")
|
|
return
|
|
if(activated)
|
|
to_chat(user, "<span class'warning'>The [name] is already active!</span>")
|
|
return
|
|
|
|
to_chat(user, "<span class='notice'>You start vigorously plunging [src]!</span>")
|
|
if(do_after(user, 50 * P.plunge_mod, target = src) && !activated)
|
|
start_chemming()
|
|
|
|
/obj/structure/geyser/random
|
|
erupting_state = null
|
|
var/list/options = list(/datum/reagent/clf3 = 10, /datum/reagent/water/hollowwater = 10, /datum/reagent/medicine/omnizine/protozine = 6, /datum/reagent/wittel = 1)
|
|
|
|
/obj/structure/geyser/random/Initialize(mapload)
|
|
. = ..()
|
|
reagent_id = pickweight(options)
|
|
*/
|