mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Xenoarch Rework [Ready for Review] (#9951)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0c114ce5d3
commit
ab1a8177ff
@@ -422,6 +422,7 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
|
||||
else
|
||||
//This lets us get a sample of the artifact core...This is JUST used for fluff.
|
||||
if (istype(W, /obj/item/core_sampler))
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
var/obj/item/core_sampler/C = W
|
||||
@@ -455,8 +456,8 @@ var/list/mining_overlay_cache = list()
|
||||
return
|
||||
|
||||
var/obj/item/melee/shock_maul/S = W
|
||||
if(!S.wielded) //CHOMPEdit - slight maul buff
|
||||
to_chat(user, span_warning("\The [W] must be wielded in two hands to be used for mining!")) //CHOMPEdit - fixed improper name
|
||||
if(!S.wielded)
|
||||
to_chat(user, span_warning("\The [W] must be wielded in two hands to be used for mining!"))
|
||||
return
|
||||
|
||||
var/newDepth = excavation_level + S.excavation_amount // Used commonly below
|
||||
@@ -470,9 +471,12 @@ var/list/mining_overlay_cache = list()
|
||||
wreckfinds(S.destroy_artefacts)
|
||||
|
||||
to_chat(user, span_notice("You smash through \the [src][fail_message]."))
|
||||
//CHOMPEdit start - Moved the maul sounds up here and made it not cost energy to mine
|
||||
user.visible_message(span_warning("\The [src] discharges with a thunderous, hair-raising crackle!"))
|
||||
playsound(src, 'sound/weapons/resonator_blast.ogg', 100, 1, -1)
|
||||
if(S.status != 0) //We're on. This isn't just a == 1 in case someone adds some weird functionality in the future to give it multiple states.
|
||||
user.visible_message(span_warning("\The [src] discharges with a thunderous, hair-raising crackle!"))
|
||||
playsound(src, 'sound/weapons/resonator_blast.ogg', 100, 1, -1)
|
||||
else
|
||||
user.visible_message(span_warning("\The [src] plows into the rock with a thunk, smashing it to pieces."))
|
||||
playsound(src, get_sfx("pickaxe"), 35, 1, -1) //Weak. Not on. Just as good as a normal pick.
|
||||
|
||||
if(newDepth >= 200) // This means the rock is mined out fully
|
||||
if(S.destroy_artefacts)
|
||||
@@ -483,7 +487,7 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
excavation_level += S.excavation_amount
|
||||
update_archeo_overlays(S.excavation_amount)
|
||||
geologic_data = new /datum/geosample(src) //CHOMPEdit
|
||||
geologic_data = new /datum/geosample(src)
|
||||
//drop some rocks
|
||||
next_rock += S.excavation_amount
|
||||
while(next_rock > 50)
|
||||
@@ -491,7 +495,6 @@ var/list/mining_overlay_cache = list()
|
||||
var/obj/item/ore/O = new(src)
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
O.geologic_data = geologic_data
|
||||
//CHOMPEdit end
|
||||
|
||||
if (istype(W, /obj/item/pickaxe))
|
||||
if(!istype(user.loc, /turf))
|
||||
@@ -520,8 +523,8 @@ var/list/mining_overlay_cache = list()
|
||||
var/datum/find/F = finds[1]
|
||||
if(newDepth == F.excavation_required) // When the pick hits that edge just right, you extract your find perfectly, it's never confined in a rock
|
||||
excavate_find(1, F)
|
||||
else if(newDepth > F.excavation_required - F.clearance_range) // Not quite right but you still extract your find, the closer to the bottom the better, but not above 80%
|
||||
excavate_find(prob(80 * (F.excavation_required - newDepth) / F.clearance_range), F)
|
||||
else if(newDepth > F.excavation_required)
|
||||
excavate_find(prob(10), F) //A 1 in 10 chance to get it out perfectly seems fine if you're not being careful.
|
||||
|
||||
to_chat(user, span_notice("You finish [P.drill_verb] \the [src]."))
|
||||
|
||||
@@ -534,7 +537,7 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
excavation_level += P.excavation_amount
|
||||
update_archeo_overlays(P.excavation_amount)
|
||||
geologic_data = new /datum/geosample(src) //CHOMPEdit
|
||||
geologic_data = new /datum/geosample(src)
|
||||
//drop some rocks
|
||||
next_rock += P.excavation_amount
|
||||
while(next_rock > 50)
|
||||
@@ -602,7 +605,7 @@ var/list/mining_overlay_cache = list()
|
||||
if(!mineral)
|
||||
return
|
||||
clear_ore_effects()
|
||||
geologic_data = new /datum/geosample(src) //CHOMPEdit
|
||||
geologic_data = new /datum/geosample(src)
|
||||
var/obj/item/ore/O = new mineral.ore (src)
|
||||
if(istype(O))
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
@@ -612,16 +615,9 @@ var/list/mining_overlay_cache = list()
|
||||
/turf/simulated/mineral/proc/excavate_turf()
|
||||
var/obj/structure/boulder/B
|
||||
if(artifact_find)
|
||||
if( excavation_level > 0 || prob(15) )
|
||||
//boulder with an artifact inside
|
||||
B = new(src)
|
||||
if(artifact_find)
|
||||
B.artifact_find = artifact_find
|
||||
else
|
||||
artifact_debris(1)
|
||||
else if(prob(5))
|
||||
//empty boulder
|
||||
//boulder with an artifact inside
|
||||
B = new(src)
|
||||
B.artifact_find = artifact_find
|
||||
|
||||
if(B)
|
||||
GetDrilled(0)
|
||||
@@ -676,10 +672,10 @@ var/list/mining_overlay_cache = list()
|
||||
/turf/simulated/mineral/proc/excavate_find(var/is_clean = 0, var/datum/find/F)
|
||||
//with skill and luck, players can cleanly extract finds
|
||||
//otherwise, they come out inside a chunk of rock
|
||||
geologic_data = new /datum/geosample(src) //CHOMPEdit
|
||||
geologic_data = new /datum/geosample(src)
|
||||
var/obj/item/X
|
||||
if(is_clean)
|
||||
X = new /obj/item/archaeological_find(src, F.find_type) // CHOMPEdit
|
||||
X = new /obj/item/archaeological_find(src, F.find_type)
|
||||
else
|
||||
X = new /obj/item/strangerock(src, inside_item_type = F.find_type)
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
@@ -694,6 +690,8 @@ var/list/mining_overlay_cache = list()
|
||||
if(X)
|
||||
display_name = X.name
|
||||
|
||||
//This is affected by 'prob_delicate' in finds.dm. As of writing, this has been set to 0 because the suspension field is just one extra piece that makes
|
||||
//Xenoarch that much more confusing, and the intent of this PR is to make it more friendly to get into.
|
||||
//many finds are ancient and thus very delicate - luckily there is a specialised energy suspension field which protects them when they're being extracted
|
||||
if(prob(F.prob_delicate))
|
||||
var/obj/effect/suspension_field/S = locate() in src
|
||||
|
||||
@@ -91,6 +91,9 @@
|
||||
EQUIPMENT("Resonator", /obj/item/resonator, 900),
|
||||
EQUIPMENT("Silver Pickaxe", /obj/item/pickaxe/silver, 1200),
|
||||
EQUIPMENT("Super Resonator", /obj/item/resonator/upgraded, 2500),
|
||||
EQUIPMENT("Archeology Equipment - Chisels", /obj/item/storage/excavation, 500),
|
||||
EQUIPMENT("Archeology Equipment - Scanner", /obj/item/depth_scanner, 1000), // They can get a basic scanner for archeology, but not the anomaly scanner. Keeps job stealing at a minimum while also allowing miners to excavate any cool rocks they come across.
|
||||
EQUIPMENT("Fine Excavation Kit - Measuring Tape", /obj/item/measuring_tape, 125),
|
||||
EQUIPMENT("Explosive Excavation Kit - Plastic Charge",/obj/item/plastique/seismic/locked, 1500),
|
||||
EQUIPMENT("Industrial Equipment - Phoron Bore", /obj/item/gun/magnetic/matfed/phoronbore/loaded, 3000),
|
||||
EQUIPMENT("Industrial Equipment - Inducer", /obj/item/inducer, 3500),
|
||||
|
||||
Reference in New Issue
Block a user