mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
tweaked artifact extraction, artifacts
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
var/mineralAmt = 0
|
var/mineralAmt = 0
|
||||||
var/spread = 0 //will the seam spread?
|
var/spread = 0 //will the seam spread?
|
||||||
var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles
|
var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles
|
||||||
var/artifactChance = 0.3 //percent chance to spawn a xenoarchaelogical artifact
|
|
||||||
var/last_act = 0
|
var/last_act = 0
|
||||||
|
|
||||||
var/datum/geosample/geological_data
|
var/datum/geosample/geological_data
|
||||||
@@ -128,7 +127,6 @@
|
|||||||
//dont create artifact machinery in animal or plant digsites, or if we already have one
|
//dont create artifact machinery in animal or plant digsites, or if we already have one
|
||||||
if(!artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE))
|
if(!artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE))
|
||||||
artifact_find = new()
|
artifact_find = new()
|
||||||
//world << "<b>[artifact_find.artifact_find_type]</b> [src.x], [src.y], [src.z]"
|
|
||||||
artifact_spawning_turfs.Add(src)
|
artifact_spawning_turfs.Add(src)
|
||||||
|
|
||||||
if(!src.geological_data)
|
if(!src.geological_data)
|
||||||
@@ -370,25 +368,30 @@ commented out in r5061, I left it because of the shroom thingies
|
|||||||
//just pull the surrounding rock out
|
//just pull the surrounding rock out
|
||||||
excavate_find(0, F)
|
excavate_find(0, F)
|
||||||
|
|
||||||
if(src.excavation_level + P.excavation_amount >= 100)
|
if( src.excavation_level + P.excavation_amount >= 100 || (!finds.len && !excavation_minerals.len) )
|
||||||
//if players have been excavating this turf, have a chance to leave some rocky debris behind
|
//if players have been excavating this turf, have a chance to leave some rocky debris behind
|
||||||
var/boulder_prob = 0
|
var/boulder_prob = 0
|
||||||
|
var/obj/structure/boulder/B
|
||||||
|
|
||||||
if(src.excavation_level > 15)
|
if(src.excavation_level > 15)
|
||||||
boulder_prob = 50
|
boulder_prob = 10
|
||||||
if(artifact_find)
|
if(artifact_find)
|
||||||
boulder_prob += 10
|
boulder_prob += 25
|
||||||
if(src.excavation_level == 100)
|
if(src.excavation_level >= 100)
|
||||||
boulder_prob += 40
|
boulder_prob += 40
|
||||||
else if(src.excavation_level > 95)
|
else if(src.excavation_level > 95)
|
||||||
boulder_prob += 25
|
boulder_prob += 25
|
||||||
else if(src.excavation_level > 90)
|
else if(src.excavation_level > 90)
|
||||||
boulder_prob += 10
|
boulder_prob += 10
|
||||||
if(prob(boulder_prob))
|
if(prob(boulder_prob))
|
||||||
var/obj/structure/boulder/B = new(src)
|
B = new(src)
|
||||||
if(artifact_find)
|
if(artifact_find)
|
||||||
B.artifact_find = artifact_find
|
B.artifact_find = artifact_find
|
||||||
|
else if(src.excavation_level + P.excavation_amount >= 100)
|
||||||
|
spawn(0)
|
||||||
|
artifact_debris()
|
||||||
|
|
||||||
gets_drilled()
|
gets_drilled(B ? 0 : 1)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
src.excavation_level += P.excavation_amount
|
src.excavation_level += P.excavation_amount
|
||||||
@@ -466,7 +469,7 @@ commented out in r5061, I left it because of the shroom thingies
|
|||||||
O.geological_data = src.geological_data
|
O.geological_data = src.geological_data
|
||||||
return O
|
return O
|
||||||
|
|
||||||
/turf/simulated/mineral/proc/gets_drilled()
|
/turf/simulated/mineral/proc/gets_drilled(var/artifact_fail = 0)
|
||||||
//var/destroyed = 0 //used for breaking strange rocks
|
//var/destroyed = 0 //used for breaking strange rocks
|
||||||
if ((src.mineralName != "") && (src.mineralAmt > 0) && (src.mineralAmt < 11))
|
if ((src.mineralName != "") && (src.mineralAmt > 0) && (src.mineralAmt < 11))
|
||||||
|
|
||||||
@@ -485,10 +488,22 @@ commented out in r5061, I left it because of the shroom thingies
|
|||||||
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
||||||
N.fullUpdateMineralOverlays()
|
N.fullUpdateMineralOverlays()
|
||||||
|
|
||||||
/*if(src.contents)
|
//destroyed artifacts have weird, unpleasant effects
|
||||||
[src.contents ? pick(" There is a crunching noise."," [W] hits something."," Part of the rock face crumbles away.","Something breaks under [W].") : ""]"
|
if(artifact_find && artifact_fail)
|
||||||
var/atom/A = pick(src.contents)
|
var/pain = 0
|
||||||
del(A)*/
|
if(prob(50))
|
||||||
|
pain = 1
|
||||||
|
for(var/mob/living/M in range(src, 200))
|
||||||
|
M << "<font color='red'><b>[pick("A high pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fadaing away!</b></font>"
|
||||||
|
if(pain)
|
||||||
|
flick("pain",M.pain)
|
||||||
|
if(prob(50))
|
||||||
|
M.adjustBruteLoss(5)
|
||||||
|
else
|
||||||
|
flick("flash",M.flash)
|
||||||
|
if(prob(50))
|
||||||
|
M.Stun(5)
|
||||||
|
M.apply_effect(25, IRRADIATE)
|
||||||
|
|
||||||
/*if(destroyed) //Display message about being a terrible miner
|
/*if(destroyed) //Display message about being a terrible miner
|
||||||
usr << "\red You destroy some of the rocks!"*/
|
usr << "\red You destroy some of the rocks!"*/
|
||||||
@@ -523,6 +538,69 @@ commented out in r5061, I left it because of the shroom thingies
|
|||||||
|
|
||||||
src.finds.Remove(F)
|
src.finds.Remove(F)
|
||||||
|
|
||||||
|
/turf/simulated/mineral/proc/artifact_debris()
|
||||||
|
//cael's patented random limited drop componentized loot system!
|
||||||
|
var/materials = 0
|
||||||
|
var/list/viable_materials = list(1,2,4,8,16,32,64,128,256)
|
||||||
|
|
||||||
|
var/num_materials = rand(1,5)
|
||||||
|
for(var/i=0, i<num_materials, i++)
|
||||||
|
var/chosen = pick(viable_materials)
|
||||||
|
materials |= chosen
|
||||||
|
viable_materials.Remove(chosen)
|
||||||
|
|
||||||
|
if(materials & 1)
|
||||||
|
var/quantity = rand(0,3)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
var/obj/item/stack/rods/R = new(src)
|
||||||
|
R.amount = rand(5,25)
|
||||||
|
|
||||||
|
if(materials & 2)
|
||||||
|
var/quantity = pick(0, 0, 1)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
var/obj/item/stack/tile/R = new(src)
|
||||||
|
R.amount = rand(1,5)
|
||||||
|
|
||||||
|
if(materials & 4)
|
||||||
|
var/quantity = rand(0,3)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
var/obj/item/stack/sheet/metal/R = new(src)
|
||||||
|
R.amount = rand(5,25)
|
||||||
|
|
||||||
|
if(materials & 8)
|
||||||
|
var/quantity = rand(0,3)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
var/obj/item/stack/sheet/plasteel/R = new(src)
|
||||||
|
R.amount = rand(5,25)
|
||||||
|
|
||||||
|
if(materials & 16)
|
||||||
|
var/quantity = rand(0,3)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
new /obj/item/weapon/shard(src)
|
||||||
|
|
||||||
|
if(materials & 32)
|
||||||
|
var/quantity = rand(0,3)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
new /obj/item/weapon/shard/plasma(src)
|
||||||
|
|
||||||
|
if(materials & 64)
|
||||||
|
var/quantity = rand(0,3)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
var/obj/item/stack/sheet/mineral/uranium/R = new(src)
|
||||||
|
R.amount = rand(5,25)
|
||||||
|
|
||||||
|
if(materials & 128)
|
||||||
|
var/quantity = rand(0,3)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
var/obj/item/stack/sheet/mineral/mythril/R = new(src)
|
||||||
|
R.amount = rand(5,25)
|
||||||
|
|
||||||
|
if(materials & 256)
|
||||||
|
var/quantity = rand(0,3)
|
||||||
|
for(var/i=0, i<quantity, i++)
|
||||||
|
var/obj/item/stack/sheet/mineral/adamantine/R = new(src)
|
||||||
|
R.amount = rand(5,25)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
/turf/simulated/mineral/proc/setRandomMinerals()
|
/turf/simulated/mineral/proc/setRandomMinerals()
|
||||||
var/s = pickweight(list("uranium" = 5, "iron" = 50, "gold" = 5, "silver" = 5, "plasma" = 50, "diamond" = 1))
|
var/s = pickweight(list("uranium" = 5, "iron" = 50, "gold" = 5, "silver" = 5, "plasma" = 50, "diamond" = 1))
|
||||||
|
|||||||
@@ -25,8 +25,9 @@ obj/machinery/anomaly/fourier_transform/ScanResults()
|
|||||||
var/accuracy = GetResultSpecifity(scanned_sample, carrier)
|
var/accuracy = GetResultSpecifity(scanned_sample, carrier)
|
||||||
var/distance = scanned_sample.artifact_distance
|
var/distance = scanned_sample.artifact_distance
|
||||||
if(distance > 0)
|
if(distance > 0)
|
||||||
if(accuracy > 0.6)
|
if(prob(accuracy))
|
||||||
distance += (2 * rand() - 1) * distance * 0.01
|
distance += (2 * rand() - 1) * distance * 0.05
|
||||||
|
accuracy = 0.95 + 0.05 * (2 * rand() - 1)
|
||||||
else
|
else
|
||||||
var/offset = 1 - accuracy
|
var/offset = 1 - accuracy
|
||||||
distance += (2 * rand() - 1) * distance * offset
|
distance += (2 * rand() - 1) * distance * offset
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
obj/machinery/anomaly/hyperspectral
|
obj/machinery/anomaly/hyperspectral
|
||||||
name = "Hyperspectral Imager"
|
name = "Hyperspectral Imager"
|
||||||
desc = "A specialised, complex analysis machine."
|
desc = "A specialised, complex analysis machine."
|
||||||
icon = 'icons/obj/computer.dmi'
|
//icon = 'icons/obj/computer.dmi'
|
||||||
icon_state = "rdcomp"
|
//icon_state = "rdcomp"
|
||||||
|
|
||||||
obj/machinery/anomaly/hyperspectral/ScanResults()
|
obj/machinery/anomaly/hyperspectral/ScanResults()
|
||||||
var/results = "The scan was inconclusive. Check sample integrity and carrier consistency."
|
var/results = "The scan was inconclusive. Check sample integrity and carrier consistency."
|
||||||
@@ -32,7 +32,13 @@ obj/machinery/anomaly/hyperspectral/ScanResults()
|
|||||||
results += "<img src=\"http://i.imgur.com/1qCae.jpg\"></img><br>"
|
results += "<img src=\"http://i.imgur.com/1qCae.jpg\"></img><br>"
|
||||||
else
|
else
|
||||||
results += "<img src=\"http://i.imgur.com/9T9nc.jpg\"></img><br>"
|
results += "<img src=\"http://i.imgur.com/9T9nc.jpg\"></img><br>"
|
||||||
if(scanned_sample.artifact_id && prob(specifity * 100))
|
|
||||||
results += "Anomalous exotic energy signature detected: [scanned_sample.artifact_id]."
|
results += "<br>"
|
||||||
|
if(scanned_sample.artifact_id)
|
||||||
|
results += "Detected energy signatures [100 * (1 - specifity)]% consistent with standard background readings.<br>"
|
||||||
|
if(prob( (specifity + 0.5 * (1 - specifity)) * 100))
|
||||||
|
results += "Anomalous exotic energy signature isolated: <font color='red'><b>[scanned_sample.artifact_id].</b></font>"
|
||||||
|
else
|
||||||
|
results += "Detected energy signatures [95 + 5 * (2 * rand() - 1) * (1 - specifity)]% consistent with standard background readings."
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
/datum/artifact_find/New()
|
/datum/artifact_find/New()
|
||||||
artifact_detect_range = rand(5,300)
|
artifact_detect_range = rand(5,300)
|
||||||
|
|
||||||
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","upsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
|
artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
|
||||||
|
|
||||||
artifact_find_type = pick(\
|
artifact_find_type = pick(\
|
||||||
5;/obj/machinery/power/supermatter,\
|
5;/obj/machinery/power/supermatter,\
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
100;/obj/mecha/working/hoverpod,\
|
100;/obj/mecha/working/hoverpod,\
|
||||||
100;/obj/machinery/replicator,\
|
100;/obj/machinery/replicator,\
|
||||||
150;/obj/structure/crystal,\
|
150;/obj/structure/crystal,\
|
||||||
500;/obj/machinery/artifact)
|
1000;/obj/machinery/artifact)
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Boulders - sometimes turn up after excavating turf - excavate further to try and find large xenoarch finds
|
// Boulders - sometimes turn up after excavating turf - excavate further to try and find large xenoarch finds
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
/obj/mecha/working/hoverpod
|
/obj/mecha/working/hoverpod
|
||||||
name = "hover pod"
|
name = "hover pod"
|
||||||
icon = 'icons/obj/vehicles.dmi'
|
|
||||||
icon_state = "engineering_pod"
|
icon_state = "engineering_pod"
|
||||||
desc = "Stubby and round, it has a human sized access hatch on the top."
|
desc = "Stubby and round, it has a human sized access hatch on the top."
|
||||||
|
wreckage = /obj/effect/decal/mecha_wreckage/hoverpod
|
||||||
|
|
||||||
//duplicate of parent proc, but without space drifting
|
//duplicate of parent proc, but without space drifting
|
||||||
/obj/mecha/working/hoverpod/dyndomove(direction)
|
/obj/mecha/working/hoverpod/dyndomove(direction)
|
||||||
@@ -50,3 +50,18 @@
|
|||||||
if(result)
|
if(result)
|
||||||
playsound(src,'sound/machines/hiss.ogg',40,1)
|
playsound(src,'sound/machines/hiss.ogg',40,1)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
/obj/effect/decal/mecha_wreckage/hoverpod
|
||||||
|
name = "Hover pod wreckage"
|
||||||
|
icon_state = "engineering_pod-broken"
|
||||||
|
|
||||||
|
/*New()
|
||||||
|
..()
|
||||||
|
var/list/parts = list(
|
||||||
|
|
||||||
|
for(var/i=0;i<2;i++)
|
||||||
|
if(!isemptylist(parts) && prob(40))
|
||||||
|
var/part = pick(parts)
|
||||||
|
welder_salvage += part
|
||||||
|
parts -= part
|
||||||
|
return*/
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
user.visible_message("\blue [user] scans [A], the air around them humming gently.")
|
user.visible_message("\blue [user] scans [A], the air around them humming gently.")
|
||||||
if(istype(A,/turf/simulated/mineral))
|
if(istype(A,/turf/simulated/mineral))
|
||||||
var/turf/simulated/mineral/M = A
|
var/turf/simulated/mineral/M = A
|
||||||
if(M.excavation_minerals.len || M.finds.len)
|
if(M.excavation_minerals.len || M.finds.len || M.artifact_find)
|
||||||
|
|
||||||
//create a new scanlog entry
|
//create a new scanlog entry
|
||||||
var/datum/depth_scan/D = new()
|
var/datum/depth_scan/D = new()
|
||||||
@@ -79,8 +79,8 @@
|
|||||||
if(current)
|
if(current)
|
||||||
dat += "Time: [current.time]<br>"
|
dat += "Time: [current.time]<br>"
|
||||||
dat += "Coords: [current.coords]<br>"
|
dat += "Coords: [current.coords]<br>"
|
||||||
dat += "Anomaly depth: [current.depth]<br>"
|
dat += "Anomaly depth: [current.depth] cm<br>"
|
||||||
dat += "Clearance: [current.clearance]<br>"
|
dat += "Clearance above anomaly depth: [current.clearance] cm<br>"
|
||||||
dat += "Dissonance spread: [current.dissonance_spread]<br>"
|
dat += "Dissonance spread: [current.dissonance_spread]<br>"
|
||||||
dat += "<A href='?src=\ref[src];clear=[current.record_index]'>clear entry</a><br>"
|
dat += "<A href='?src=\ref[src];clear=[current.record_index]'>clear entry</a><br>"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#define TRIGGER_CO2 11
|
#define TRIGGER_CO2 11
|
||||||
#define TRIGGER_NITRO 12
|
#define TRIGGER_NITRO 12
|
||||||
#define MAX_TRIGGER 12
|
#define MAX_TRIGGER 12
|
||||||
|
/*
|
||||||
//sleeping gas appears to be bugged, currently
|
//sleeping gas appears to be bugged, currently
|
||||||
var/list/valid_primary_effect_types = list(\
|
var/list/valid_primary_effect_types = list(\
|
||||||
/datum/artifact_effect/cellcharge,\
|
/datum/artifact_effect/cellcharge,\
|
||||||
@@ -55,6 +55,7 @@ var/list/valid_secondary_effect_types = list(\
|
|||||||
/datum/artifact_effect/sleepy,\
|
/datum/artifact_effect/sleepy,\
|
||||||
/datum/artifact_effect/stun,\
|
/datum/artifact_effect/stun,\
|
||||||
/datum/artifact_effect/teleport)
|
/datum/artifact_effect/teleport)
|
||||||
|
*/
|
||||||
|
|
||||||
/obj/machinery/artifact
|
/obj/machinery/artifact
|
||||||
name = "alien artifact"
|
name = "alien artifact"
|
||||||
@@ -71,12 +72,12 @@ var/list/valid_secondary_effect_types = list(\
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
//setup primary effect - these are the main ones (mixed)
|
//setup primary effect - these are the main ones (mixed)
|
||||||
var/effecttype = pick(valid_primary_effect_types)
|
var/effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
|
||||||
my_effect = new effecttype(src)
|
my_effect = new effecttype(src)
|
||||||
|
|
||||||
//75% chance to have a secondary stealthy (and mostly bad) effect
|
//75% chance to have a secondary stealthy (and mostly bad) effect
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
effecttype = pick(valid_secondary_effect_types)
|
effecttype = pick(typesof(/datum/artifact_effect) - /datum/artifact_effect)
|
||||||
secondary_effect = new effecttype(src)
|
secondary_effect = new effecttype(src)
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
secondary_effect.ToggleActivate(0)
|
secondary_effect.ToggleActivate(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user