Merge pull request #2755 from caelaislinn/master

Xenoarchaeology update
This commit is contained in:
Chinsky
2013-05-14 07:49:18 -07:00
17 changed files with 68 additions and 59 deletions
+5 -1
View File
@@ -273,5 +273,9 @@
'icons/spideros_icons/sos_11.png',
'icons/spideros_icons/sos_12.png',
'icons/spideros_icons/sos_13.png',
'icons/spideros_icons/sos_14.png'
'icons/spideros_icons/sos_14.png',
'icons/xenoarch_icons/chart1.jpg',
'icons/xenoarch_icons/chart2.jpg',
'icons/xenoarch_icons/chart3.jpg',
'icons/xenoarch_icons/chart4.jpg'
)
+7 -22
View File
@@ -344,14 +344,13 @@ commented out in r5061, I left it because of the shroom thingies
user << "\red You start [P.drill_verb][fail_message ? fail_message : ""]."
if(fail_message)
if(prob(50))
if(prob(25))
excavate_find(5, src.finds[1])
else if(prob(50))
src.finds.Remove(src.finds[1])
if(prob(50))
artifact_debris()
if(fail_message && prob(90))
if(prob(25))
excavate_find(5, src.finds[1])
else if(prob(50))
src.finds.Remove(src.finds[1])
if(prob(50))
artifact_debris()
if(do_after(user,P.digspeed))
user << "\blue You finish [P.drill_verb] the rock."
@@ -425,8 +424,6 @@ commented out in r5061, I left it because of the shroom thingies
//extract pesky minerals while we're excavating
while(excavation_minerals.len && src.excavation_level > excavation_minerals[excavation_minerals.len])
drop_mineral()
//have a 50% chance to extract bonus minerals this way
//if(prob(50))
pop(excavation_minerals)
mineralAmt--
@@ -456,13 +453,6 @@ commented out in r5061, I left it because of the shroom thingies
O = new /obj/item/weapon/ore/plasma(src)
if (src.mineralName == "Diamond")
O = new /obj/item/weapon/ore/diamond(src)
/*if (src.mineralName == "Archaeo")
//new /obj/item/weapon/archaeological_find(src)
//if(prob(10) || delicate)
if(prob(50)) //Don't have delicate tools (hand pick/excavation tool) yet, temporarily change to 50% instead of 10% -Mij
O = new /obj/item/weapon/ore/strangerock(src)
else
destroyed = 1*/
if (src.mineralName == "Clown")
O = new /obj/item/weapon/ore/clown(src)
if(O)
@@ -496,14 +486,9 @@ commented out in r5061, I left it because of the shroom thingies
M.Stun(5)
M.apply_effect(25, IRRADIATE)
/*if (prob(src.artifactChance))
//spawn a rare artifact here
new /obj/machinery/artifact(src)*/
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
N.fullUpdateMineralOverlays()
/*if(destroyed) //Display message about being a terrible miner
usr << "\red You destroy some of the rocks!"*/
return
/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
@@ -9,7 +9,7 @@
var/view_range = 20 //how close excavation has to come to show an overlay on the turf
var/clearance_range = 3 //how close excavation has to come to extract the item
//if excavation hits var/excavation_required exactly, it's contained find is extracted cleanly without the ore
var/prob_delicate = 75 //probability it requires an active suspension field to not insta-crumble
var/prob_delicate = 90 //probability it requires an active suspension field to not insta-crumble
var/dissonance_spread = 1 //proportion of the tile that is affected by this find
//used in conjunction with analysis machines to determine correct suspension field type
@@ -276,6 +276,7 @@
if(19)
apply_prefix = 0
new_item = new /obj/item/weapon/claymore(src.loc)
new_item.force = 10
item_type = new_item.name
if(20)
//arcane clothing
@@ -318,6 +319,7 @@
if(25)
apply_prefix = 0
new_item = new /obj/item/weapon/katana(src.loc)
new_item.force = 10
item_type = new_item.name
if(26)
//energy gun
@@ -18,26 +18,23 @@ obj/machinery/anomaly/accelerator/ScanResults()
num_reagents++
if(num_reagents == 2 && scanned_sample && carrier_name)
var/accuracy = GetResultSpecifity(scanned_sample, carrier_name)
accuracy += 0.5 * (1 - accuracy) / scanned_sample.total_spread
if(!accuracy)
accuracy = rand(0.01, 0.5)
results = "Kinetic acceleration of carrier ([carrier_name]) indicates age ([100 * accuracy]% accuracy): <br><br>"
var/specifity = GetResultSpecifity(scanned_sample, carrier_name)
results = "Kinetic acceleration of carrier ([carrier_name]) indicates age ([100 * specifity]% accuracy): <br><br>"
if(scanned_sample.age_billion)
var/displayed_age_millions = scanned_sample.age_million + max(scanned_sample.age_million * ((1 - accuracy) * (2 * rand() - 1)), 0)
var/displayed_age_billions = scanned_sample.age_billion + max(scanned_sample.age_billion * ((1 - accuracy) * (2 * rand() - 1)), 0)
var/displayed_age_millions = scanned_sample.age_million + max(scanned_sample.age_million * ((1 - specifity) * (2 * rand() - 1)), 0)
var/displayed_age_billions = scanned_sample.age_billion + max(scanned_sample.age_billion * ((1 - specifity) * (2 * rand() - 1)), 0)
results += "[displayed_age_billions + displayed_age_millions / 1000] billion years.<br>"
else if(scanned_sample.age_million)
var/displayed_age_thousands = scanned_sample.age_thousand + max(scanned_sample.age_thousand * ((1 - accuracy) * (4 * rand() - 2)), 0)
var/displayed_age_millions = scanned_sample.age_million + max(scanned_sample.age_million * ((1 - accuracy) * (2 * rand() - 1)), 0)
var/displayed_age_thousands = scanned_sample.age_thousand + max(scanned_sample.age_thousand * ((1 - specifity) * (4 * rand() - 2)), 0)
var/displayed_age_millions = scanned_sample.age_million + max(scanned_sample.age_million * ((1 - specifity) * (2 * rand() - 1)), 0)
results += "[displayed_age_millions + displayed_age_thousands / 1000] million years.<br>"
else if(scanned_sample.age_thousand)
var/displayed_age = scanned_sample.age + max(scanned_sample.age * ((1 - accuracy) * (8 * rand() - 4)), 0)
var/displayed_age_thousands = scanned_sample.age_thousand + max(scanned_sample.age * ((1 - accuracy) * (4 * rand() - 2)), 0)
var/displayed_age = scanned_sample.age + max(scanned_sample.age * ((1 - specifity) * (8 * rand() - 4)), 0)
var/displayed_age_thousands = scanned_sample.age_thousand + max(scanned_sample.age * ((1 - specifity) * (4 * rand() - 2)), 0)
results += "[displayed_age_thousands + displayed_age / 1000] thousand years.<br>"
else
var/displayed_age = scanned_sample.age + max(scanned_sample.age * ((1 - accuracy) * (8 * rand() - 4)), 0)
var/displayed_age = scanned_sample.age + max(scanned_sample.age * ((1 - specifity) * (8 * rand() - 4)), 0)
results += "[displayed_age] years.<br>"
results += "<br>Warning, results only valid for ages on the scale of billions of years."
@@ -110,7 +110,7 @@
dat += "Scan in progress<br><br><br>"
else
dat += "[held_container ? "<A href='?src=\ref[src];eject_beaker=1'>Eject beaker</a>" : "No beaker inserted."]<br>"
dat += "[fuel_container ? "<A href='?src=\ref[src];eject_fuel=1'>Eject fuel tank</a>" : "No fuel tank inserted."]<br>"
//dat += "[fuel_container ? "<A href='?src=\ref[src];eject_fuel=1'>Eject fuel tank</a>" : "No fuel tank inserted."]<br>"
dat += "[held_container ? "<A href='?src=\ref[src];begin=1'>Begin scanning</a>" : ""]"
dat += "<hr>"
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</a><BR>"
@@ -130,7 +130,7 @@ obj/machinery/anomaly/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
held_container.loc = src
updateDialog()
else if(istype(W, /obj/item/weapon/tank))
/*else if(istype(W, /obj/item/weapon/tank))
//var/obj/item/weapon/reagent_containers/glass/G = W
if(fuel_container)
user << "\red You must remove the [fuel_container] first."
@@ -139,7 +139,7 @@ obj/machinery/anomaly/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
user.drop_item(W)
fuel_container.loc = src
fuel_container = W
updateDialog()
updateDialog()*/
else
return ..()
@@ -19,16 +19,11 @@ obj/machinery/anomaly/fourier_transform/ScanResults()
if(num_reagents == 2 && scanned_sample && carrier)
//all necessary components are present
var/accuracy = GetResultSpecifity(scanned_sample, carrier)
var/specifity = GetResultSpecifity(scanned_sample, carrier)
var/distance = scanned_sample.artifact_distance
if(distance > 0)
if(prob(accuracy))
distance += (2 * rand() - 1) * distance * 0.05
accuracy = 0.95 + 0.05 * (2 * rand() - 1)
else
var/offset = 1 - accuracy
distance += (2 * rand() - 1) * distance * offset
results = "Fourier transform analysis on anomalous energy absorption through carrier ([carrier]) indicates source located inside emission radius ([100 * accuracy]% accuracy): [distance]."
distance += (2 * rand() - 1) * distance * 0.05
results = "Fourier transform analysis on anomalous energy absorption through carrier ([carrier]) indicates source located inside emission radius ([95 * specifity]% accuracy): [distance]."
else
results = "Energy dispersion detected throughout sample consistent with background readings.<br>"
if(carrier == scanned_sample.source_mineral)
@@ -18,16 +18,13 @@ obj/machinery/anomaly/gas_chromatography/ScanResults()
num_reagents++
if(num_reagents == 2 && scanned_sample)
var/specifity = 0.15
if(carrier)
specifity = GetResultSpecifity(scanned_sample, carrier)
results = "Chromatography partitioning analysis over carrier ([carrier]) indicates the following elements present ([110 * (specifity / (specifity + 0.1))]% accuracy):<br><br>"
var/specifity = GetResultSpecifity(scanned_sample, carrier)
results = "Chromatography partitioning analysis over carrier ([carrier]) indicates the following elements present ([100 * specifity]% accuracy):<br><br>"
var/num_found = 0
for(var/index=1,index <= scanned_sample.find_presence.len, index++)
var/find = scanned_sample.find_presence[index]
if(find && prob( 110 * (specifity / (specifity + 0.1)) ))
if(find && prob(100 * specifity))
results += " - " + finds_as_strings[index] + "<br>"
num_found++
@@ -32,13 +32,17 @@ obj/machinery/anomaly/hyperspectral/ScanResults()
var/specifity = GetResultSpecifity(scanned_sample, carrier)
results = "Spectral signature over carrier ([carrier]):<br>"
if(specifity <= 0.25)
results += "<img src=\"http://i.imgur.com/TAQHn.jpg\"></img><br>"
//results += "<img src=\"http://i.imgur.com/TAQHn.jpg\"></img><br>"
results += "<img src=chart1.jpg>"
else if(specifity <= 0.5)
results += "<img src=\"http://i.imgur.com/EwOZ7.jpg\"></img><br>"
//results += "<img src=\"http://i.imgur.com/EwOZ7.jpg\"></img><br>"
results += "<img src=chart2.jpg>"
else if(specifity <= 0.75)
results += "<img src=\"http://i.imgur.com/1qCae.jpg\"></img><br>"
//results += "<img src=\"http://i.imgur.com/1qCae.jpg\"></img><br>"
results += "<img src=chart3.jpg>"
else
results += "<img src=\"http://i.imgur.com/9T9nc.jpg\"></img><br>"
//results += "<img src=\"http://i.imgur.com/9T9nc.jpg\"></img><br>"
results += "<img src=chart4.jpg>"
results += "<br>"
if(scanned_sample.artifact_id)
@@ -8,6 +8,7 @@
icon = 'device.dmi'
icon_state = "locator"
item_state = "locator"
w_class = 2
/obj/item/device/gps/attack_self(var/mob/user as mob)
var/turf/T = get_turf(src)
@@ -18,5 +19,6 @@
desc = "A coiled metallic tape used to check dimensions and lengths."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "measuring"
w_class = 2
//todo: dig site tape
@@ -22,6 +22,7 @@
var/clearance = 0
var/record_index = 1
var/dissonance_spread = 1
var/material = "unknown"
/obj/item/device/depth_scanner/proc/scan_atom(var/mob/user, var/atom/A)
user.visible_message("\blue [user] scans [A], the air around them humming gently.")
@@ -34,12 +35,14 @@
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
D.material = M.mineralName
//find whichever is closer: find or mineral
if(M.finds.len)
var/datum/find/F = M.finds[1]
D.depth = F.excavation_required * 2
D.clearance = F.clearance_range * 2
D.material = get_responsive_reagent(F.find_type)
if(M.excavation_minerals.len)
if(M.excavation_minerals[1] < D.depth)
D.depth = M.excavation_minerals[1]
@@ -109,7 +109,7 @@
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots = 8
w_class = 4
w_class = 3
can_hold = list("/obj/item/weapon/pickaxe/brush",\
"/obj/item/weapon/pickaxe/one_pick",\
"/obj/item/weapon/pickaxe/two_pick",\
@@ -118,7 +118,7 @@
"/obj/item/weapon/pickaxe/five_pick",\
"/obj/item/weapon/pickaxe/six_pick",\
"/obj/item/weapon/pickaxe/hand")
max_combined_w_class = 20
max_combined_w_class = 11
max_w_class = 4
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try