mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Mining fixes as it was annoying as fuck. Also a random object with nothing in it removed.
Conflicts: code/modules/mining/mine_turfs.dm
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
anchored = 1
|
||||
spawn(drill_time)
|
||||
if(get_turf(src) == drilling_turf && active)
|
||||
M.gets_drilled()
|
||||
M.GetDrilled()
|
||||
src.loc = M
|
||||
drilling_turf = null
|
||||
anchored = 0
|
||||
|
||||
@@ -57,44 +57,45 @@
|
||||
|
||||
age = rand(1,999)
|
||||
|
||||
switch(container.mineralName)
|
||||
if("Uranium")
|
||||
age_million = rand(1, 704)
|
||||
age_thousand = rand(1,999)
|
||||
find_presence["potassium"] = rand(1,1000) / 100
|
||||
source_mineral = "potassium"
|
||||
if("Iron")
|
||||
age_thousand = rand(1, 999)
|
||||
age_million = rand(1, 999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Diamond")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["nitrogen"] = rand(1,1000) / 100
|
||||
source_mineral = "nitrogen"
|
||||
if("Gold")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(3,4)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Silver")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Plasma")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(10, 13)
|
||||
find_presence["plasma"] = rand(1,1000) / 100
|
||||
source_mineral = "plasma"
|
||||
if("Clown")
|
||||
age = rand(-1,-999) //thats the joke
|
||||
age_thousand = rand(-1,-999)
|
||||
find_presence["plasma"] = rand(1,1000) / 100
|
||||
source_mineral = "plasma"
|
||||
if(container.mineral)
|
||||
switch(container.mineral.name)
|
||||
if("Uranium")
|
||||
age_million = rand(1, 704)
|
||||
age_thousand = rand(1,999)
|
||||
find_presence["potassium"] = rand(1,1000) / 100
|
||||
source_mineral = "potassium"
|
||||
if("Iron")
|
||||
age_thousand = rand(1, 999)
|
||||
age_million = rand(1, 999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Diamond")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["nitrogen"] = rand(1,1000) / 100
|
||||
source_mineral = "nitrogen"
|
||||
if("Gold")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(3,4)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Silver")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Plasma")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(10, 13)
|
||||
find_presence["plasma"] = rand(1,1000) / 100
|
||||
source_mineral = "plasma"
|
||||
if("Clown")
|
||||
age = rand(-1,-999) //thats the joke
|
||||
age_thousand = rand(-1,-999)
|
||||
find_presence["plasma"] = rand(1,1000) / 100
|
||||
source_mineral = "plasma"
|
||||
|
||||
if(prob(75))
|
||||
find_presence["phosphorus"] = rand(1,500) / 100
|
||||
|
||||
@@ -273,8 +273,8 @@
|
||||
switch(scanned_item.type)
|
||||
if(/obj/item/weapon/ore)
|
||||
var/obj/item/weapon/ore/O = scanned_item
|
||||
if(O.geological_data)
|
||||
G = O.geological_data
|
||||
if(O.geologic_data)
|
||||
G = O.geologic_data
|
||||
|
||||
if(/obj/item/weapon/rocksliver)
|
||||
var/obj/item/weapon/rocksliver/O = scanned_item
|
||||
|
||||
@@ -1,3 +1,52 @@
|
||||
#define XENOARCH_SPAWN_CHANCE 0.5
|
||||
#define XENOARCH_SPREAD_CHANCE 15
|
||||
#define ARTIFACT_SPAWN_CHANCE 20
|
||||
|
||||
proc/SetupXenoarch()
|
||||
for(var/turf/simulated/mineral/M in block(locate(1,1,1), locate(world.maxx, world.maxy, world.maxz)))
|
||||
if(!M.geologic_data)
|
||||
M.geologic_data = new/datum/geosample(M)
|
||||
|
||||
if(!prob(XENOARCH_SPAWN_CHANCE))
|
||||
continue
|
||||
|
||||
var/digsite = get_random_digsite_type()
|
||||
var/list/processed_turfs = list()
|
||||
var/list/turfs_to_process = list(M)
|
||||
for(var/turf/simulated/mineral/archeo_turf in turfs_to_process)
|
||||
|
||||
for(var/turf/simulated/mineral/T in orange(1, archeo_turf))
|
||||
if(T.finds)
|
||||
continue
|
||||
if(T in processed_turfs)
|
||||
continue
|
||||
if(prob(XENOARCH_SPREAD_CHANCE))
|
||||
turfs_to_process.Add(T)
|
||||
|
||||
processed_turfs.Add(archeo_turf)
|
||||
if(!archeo_turf.finds)
|
||||
archeo_turf.finds = list()
|
||||
if(prob(50))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,95)))
|
||||
else if(prob(75))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,45)))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(55,95)))
|
||||
else
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,30)))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(35,75)))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(75,95)))
|
||||
|
||||
//sometimes a find will be close enough to the surface to show
|
||||
var/datum/find/F = archeo_turf.finds[1]
|
||||
if(F.excavation_required <= F.view_range)
|
||||
archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]"
|
||||
archeo_turf.overlays += archeo_turf.archaeo_overlay
|
||||
|
||||
//dont create artifact machinery in animal or plant digsites, or if we already have one
|
||||
if(!M.artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE))
|
||||
M.artifact_find = new()
|
||||
artifact_spawn.Add(src)
|
||||
|
||||
|
||||
//---- Noticeboard
|
||||
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
var/datum/geosample/geo_data
|
||||
if(istype(item_to_sample, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/T = item_to_sample
|
||||
T.geological_data.UpdateNearbyArtifactInfo(T)
|
||||
geo_data = T.geological_data
|
||||
T.geologic_data.UpdateNearbyArtifactInfo(T)
|
||||
geo_data = T.geologic_data
|
||||
else if(istype(item_to_sample, /obj/item/weapon/ore))
|
||||
var/obj/item/weapon/ore/O = item_to_sample
|
||||
geo_data = O.geological_data
|
||||
geo_data = O.geologic_data
|
||||
|
||||
if(geo_data)
|
||||
if(filled_bag)
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
user.visible_message("\blue [user] scans [A], the air around them humming gently.")
|
||||
if(istype(A,/turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = A
|
||||
if(M.excavation_minerals.len || M.finds.len || M.artifact_find)
|
||||
if(M.finds.len || M.artifact_find)
|
||||
|
||||
//create a new scanlog entry
|
||||
var/datum/depth_scan/D = new()
|
||||
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
|
||||
D.material = M.mineral ? M.mineral.display_name : "Rock"
|
||||
|
||||
//find the first artifact and store it
|
||||
if(M.finds.len)
|
||||
@@ -44,13 +44,6 @@
|
||||
D.clearance = F.clearance_range * 2
|
||||
D.material = get_responsive_reagent(F.find_type)
|
||||
|
||||
//check if there are minerals interfering with the scan
|
||||
if(M.excavation_minerals.len)
|
||||
if(!D.depth || M.excavation_minerals[1] < D.depth)
|
||||
D.depth = M.excavation_minerals[1]
|
||||
D.clearance = rand() * 4 + 1
|
||||
D.material = M.mineralName
|
||||
|
||||
positive_locations.Add(D)
|
||||
|
||||
for(var/mob/L in range(src, 1))
|
||||
|
||||
Reference in New Issue
Block a user