fixed xenoarch chemical analysis, added icons for excavation picks, various misc tweaks

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-02-14 21:59:50 +10:00
parent 7fba00ce55
commit f0de14d0d4
12 changed files with 85 additions and 15 deletions

View File

@@ -368,7 +368,7 @@ commented out in r5061, I left it because of the shroom thingies
else if(src.excavation_level + P.excavation_amount > F.excavation_required - F.clearance_range)
//just pull the surrounding rock out
excavate_find(5, F)
excavate_find(0, F)
if(src.excavation_level + P.excavation_amount >= 100)
//if players have been excavating this turf, have a chance to leave some rocky debris behind

View File

@@ -230,6 +230,15 @@ datum
continue
var/datum/chemical_reaction/C = reaction
//check if this recipe needs to be heated to mix
if(C.requires_heating)
if(istype(my_atom.loc, /obj/machinery/bunsen_burner))
if(!my_atom.loc:heated)
continue
else
continue
var/total_required_reagents = C.required_reagents.len
var/total_matching_reagents = 0
var/total_required_catalysts = C.required_catalysts.len
@@ -276,11 +285,25 @@ datum
for(var/B in C.required_reagents)
remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1)
//try and grab any data so we can preserve it across reactions
//added for xenoarchaeology, might be useful for other things
var/preserved_data = null
for(var/B in src.reagent_list)
if(!preserved_data)
var/temp_data = get_data(B)
if(temp_data)
preserved_data = temp_data
var/created_volume = C.result_amount*multiplier
if(C.result)
feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]")
multiplier = max(multiplier, 1) //this shouldnt happen ...
add_reagent(C.result, C.result_amount*multiplier)
set_data(C.result, preserved_data)
//add secondary products
for(var/S in C.secondary_results)
add_reagent(S, C.result_amount * C.secondary_results[S] * multiplier)
var/list/seen = viewers(4, get_turf(my_atom))
for(var/mob/M in seen)
@@ -490,6 +513,21 @@ datum
return res
//two helper functions to preserve data across reactions (needed for xenoarch)
get_data(var/reagent_id)
for(var/R in reagent_list)
var/datum/reagent/D = reagent_list[R]
if(D.id == reagent_id)
//world << "proffering a data-carrying reagent ([reagent_id])"
return D.data
set_data(var/reagent_id, var/new_data)
for(var/R in reagent_list)
var/datum/reagent/D = reagent_list[R]
if(D.id == reagent_id)
//world << "reagent data set ([reagent_id])"
D.data = new_data
///////////////////////////////////////////////////////////////////////////////////

View File

@@ -17,7 +17,7 @@
var/recharged = 0
var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine",
"sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron",
"copper","mercury","radium","water","ethanol","sugar","sacid")
"copper","mercury","radium","water","ethanol","sugar","sacid","tungsten")
/obj/machinery/chem_dispenser/proc/recharge()
if(stat & (BROKEN|NOPOWER)) return
@@ -743,6 +743,9 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat = list("flour" = -5),
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries = list("cherryjelly" = 0),
//archaeology!
/obj/item/weapon/rocksliver = list("ground_rock" = 50),
//All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.!
@@ -1070,6 +1073,20 @@
break
remove_object(O)
//xenoarch
for(var/obj/item/weapon/rocksliver/O in holdingitems)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
var/allowed = get_allowed_by_id(O)
for (var/r_id in allowed)
var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume
var/amount = allowed[r_id]
beaker.reagents.add_reagent(r_id,min(amount, space), O.geological_data)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
remove_object(O)
//Everything else - Transfers reagents from it into beaker
for (var/obj/item/weapon/reagent_containers/O in holdingitems)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)

View File

@@ -480,7 +480,7 @@ datum
var/location = get_turf(holder.my_atom)
new /obj/item/stack/sheet/mineral/plasma(location)
return
virus_food
name = "Virus Food"
id = "virusfood"

View File

@@ -29,7 +29,7 @@
D = M
break
S.reagents.add_reagent("analysis_sample", 1, D.geological_data)
S.reagents.add_reagent("chlorine", 1, D.geological_data)
S.reagents.add_reagent("calcium", 1, D.geological_data)
/obj/machinery/anomaly/process()
//not sure if everything needs to heat up, or just the GLPC

View File

@@ -51,9 +51,9 @@ datum
//todo: make this brown
density_separated_sample
name = "Analysis liquid"
name = "Density separated sample"
id = "density_separated_sample"
description = "A watery paste used in chemical analysis."
description = "A watery paste used in chemical analysis, this one has some chunks floating in it."
reagent_state = LIQUID
color = "#C81040" //rgb: 200, 16, 64
//todo: make this browny-white

View File

@@ -382,12 +382,14 @@
//fossil bone/skull
new_item = new /obj/item/weapon/fossil/base(src.loc)
apply_prefix = 0
additional_desc = "A fossilised part of an alien, long dead."
apply_image_decorations = 0
apply_material_decorations = 0
if(30)
//fossil shell
new_item = new /obj/item/weapon/fossil/shell(src.loc)
apply_prefix = 0
additional_desc = "A fossilised, pre-Stygian alien crustacean."
apply_image_decorations = 0
apply_material_decorations = 0
if(prob(10))
@@ -395,6 +397,8 @@
if(31)
//fossil plant
new_item = new /obj/item/weapon/fossil/plant(src.loc)
item_type = new_item.name
additional_desc = "A fossilised shred of alien plant matter."
apply_image_decorations = 0
apply_material_decorations = 0
apply_prefix = 0

View File

@@ -63,6 +63,8 @@
return "aluminium"
if(ARCHAEO_COIN)
return "silicon"
if(ARCHAEO_KNIFE)
return "silicon"
if(ARCHAEO_HANDCUFFS)
return "aluminium"
if(ARCHAEO_BEARTRAP)

View File

@@ -39,6 +39,7 @@
user << "\red There is nothing on the [src]."
/obj/machinery/bunsen_burner/proc/try_heating()
src.visible_message("\blue \icon[src] [src] bubbles.")
if(held_container && heating)
heated = 1
held_container.reagents.handle_reactions()

View File

@@ -11,7 +11,7 @@
/obj/item/device/gps/attack_self(var/mob/user as mob)
var/turf/T = get_turf(src)
user << "\blue \icon[src] [src] flashes <i>[10 * T.x].[rand(0,9)]:[10 * T.y].[rand(0,9)]:[10 * T.z].[rand(0,9)]</i>."
user << "\blue \icon[src] [src] flashes <i>[T.x].[rand(0,9)]:[T.y].[rand(0,9)]:[T.z].[rand(0,9)]</i>."
/obj/item/device/measuring_tape
name = "measuring tape"

View File

@@ -31,7 +31,7 @@
//create a new scanlog entry
var/datum/depth_scan/D = new()
D.coords = "[10 * M.x + rand(0,9)]:[10 * M.y + rand(0,9)]:[10 * M.z + rand(0,9)]"
D.coords = "[M.x].[rand(0,9)]:[M.y].[rand(0,9)]:[10 * M.z].[rand(0,9)]"
D.time = worldtime2text()
D.record_index = positive_locations.len + 1

View File

@@ -4,6 +4,7 @@
/obj/item/weapon/pickaxe/brush
name = "brush"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick_brush"
item_state = "syringe_0"
digspeed = 50
@@ -14,7 +15,8 @@
/obj/item/weapon/pickaxe/one_pick
name = "1/6 pick"
//icon_state = "excavation"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick1"
item_state = "syringe_0"
digspeed = 50
desc = "A miniature excavation tool for precise digging (2 centimetre excavation depth)."
@@ -24,7 +26,8 @@
/obj/item/weapon/pickaxe/two_pick
name = "1/3 pick"
//icon_state = "excavation"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick2"
item_state = "syringe_0"
digspeed = 50
desc = "A miniature excavation tool for precise digging (4 centimetre excavation depth)."
@@ -34,7 +37,8 @@
/obj/item/weapon/pickaxe/three_pick
name = "1/2 pick"
//icon_state = "excavation"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick3"
item_state = "syringe_0"
digspeed = 50
desc = "A miniature excavation tool for precise digging (6 centimetre excavation depth)."
@@ -44,7 +48,8 @@
/obj/item/weapon/pickaxe/four_pick
name = "2/3 pick"
//icon_state = "excavation"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick4"
item_state = "syringe_0"
digspeed = 50
desc = "A miniature excavation tool for precise digging (8 centimetre excavation depth)."
@@ -54,7 +59,8 @@
/obj/item/weapon/pickaxe/five_pick
name = "5/6 pick"
//icon_state = "excavation"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick5"
item_state = "syringe_0"
digspeed = 50
desc = "A miniature excavation tool for precise digging (10 centimetre excavation depth)."
@@ -64,7 +70,8 @@
/obj/item/weapon/pickaxe/six_pick
name = "1/1 pick"
//icon_state = "excavation"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick6"
item_state = "syringe_0"
digspeed = 50
desc = "A miniature excavation tool for precise digging (12 centimetre excavation depth)."
@@ -74,7 +81,8 @@
/obj/item/weapon/pickaxe/hand
name = "hand pickaxe"
//icon_state = "excavation"
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "pick_hand"
item_state = "syringe_0"
digspeed = 50
desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)."