mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
added functional bunsen burner (with placeholder sprite), added capability for heated chem recipes, added preservation of data across chemical reactions for xenoarch (not sure if it actually works, seemed a bit buggy), added tungsten as a dispensable reagent for xenoarch
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
|
||||
//chemistry stuff here so that it can be easily viewed/modified
|
||||
/*
|
||||
datum
|
||||
reagent
|
||||
tungsten //used purely to make lith-sodi-tungs
|
||||
@@ -20,18 +19,18 @@ datum
|
||||
ground_rock
|
||||
name = "Ground Rock"
|
||||
id = "ground_rock"
|
||||
description = "A fine dust made of ground up geological samples."
|
||||
description = "A fine dust made of ground up rock."
|
||||
reagent_state = SOLID
|
||||
color = "#C81040" //rgb: 200, 16, 64
|
||||
//todo: make this brown
|
||||
|
||||
density_separated_sample
|
||||
name = "Density separated sample"
|
||||
name = "Analysis sample"
|
||||
id = "density_separated_sample"
|
||||
description = "A watery paste which has had density separation applied to its contents."
|
||||
description = "A watery paste used in chemical analysis."
|
||||
reagent_state = LIQUID
|
||||
color = "#C81040" //rgb: 200, 16, 64
|
||||
//todo: make this white
|
||||
//todo: make this browny-white
|
||||
|
||||
analysis_sample
|
||||
name = "Analysis sample"
|
||||
@@ -57,6 +56,7 @@ datum
|
||||
result = "lithiumsodiumtungstate"
|
||||
required_reagents = list("lithium" = 1, "sodium" = 2, "tungsten" = 1, "oxygen" = 4)
|
||||
result_amount = 8
|
||||
requires_heating = 1
|
||||
|
||||
density_separated_liquid
|
||||
name = "Density separated sample"
|
||||
@@ -74,4 +74,3 @@ datum
|
||||
required_reagents = list("density_separated_sample" = 5)
|
||||
result_amount = 4
|
||||
requires_heating = 1
|
||||
*/
|
||||
@@ -0,0 +1,58 @@
|
||||
|
||||
/obj/machinery/bunsen_burner
|
||||
name = "bunsen burner"
|
||||
desc = "A flat, self-heating device designed for bringing chemical mixtures to boil."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "bunsen0"
|
||||
var/heating = 0 //whether the bunsen is turned on
|
||||
var/heated = 0 //whether the bunsen has been on long enough to let stuff react
|
||||
var/obj/item/weapon/reagent_containers/held_container
|
||||
var/heat_time = 50
|
||||
|
||||
/obj/machinery/bunsen_burner/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers))
|
||||
if(held_container)
|
||||
user << "\red You must remove the [held_container] first."
|
||||
else
|
||||
user.drop_item(src)
|
||||
held_container = W
|
||||
held_container.loc = src
|
||||
user << "\blue You put the [held_container] onto the [src]."
|
||||
var/image/I = image("icon"=W, "layer"=FLOAT_LAYER)
|
||||
underlays += I
|
||||
if(heating)
|
||||
spawn(heat_time)
|
||||
try_heating()
|
||||
else
|
||||
user << "\red You can't put the [W] onto the [src]."
|
||||
|
||||
|
||||
|
||||
/obj/machinery/bunsen_burner/attack_hand(mob/user as mob)
|
||||
if(held_container)
|
||||
underlays = null
|
||||
user << "\blue You remove the [held_container] from the [src]."
|
||||
held_container.loc = src.loc
|
||||
held_container.attack_hand(user)
|
||||
held_container = null
|
||||
else
|
||||
user << "\red There is nothing on the [src]."
|
||||
|
||||
/obj/machinery/bunsen_burner/proc/try_heating()
|
||||
if(held_container && heating)
|
||||
heated = 1
|
||||
held_container.reagents.handle_reactions()
|
||||
heated = 0
|
||||
spawn(heat_time)
|
||||
try_heating()
|
||||
|
||||
/obj/machinery/bunsen_burner/verb/toggle()
|
||||
set src in oview(1)
|
||||
set name = "Toggle bunsen burner"
|
||||
set category = "IC"
|
||||
|
||||
heating = !heating
|
||||
icon_state = "bunsen[heating]"
|
||||
if(heating)
|
||||
spawn(heat_time)
|
||||
try_heating()
|
||||
Reference in New Issue
Block a user