Xenoarch: artifacts, strange rocks, pretty orebox

Artifacts and strange rock formations spawn during world gen. Frequency
may need tweaking.

Strange rocks melt when acid hits them due to what I assume are changes
/tg/ made with how acid works. Alternately I missed something during
copypasta spree. I'll muck with it later. For now, harvesting always
works with applied welding tools.

Ore boxes back to old beautiful selves. Re-added a few icons to
mining.dmi and the strange rock icon to turfs.dmi
This commit is contained in:
Mij
2012-10-24 12:24:04 -07:00
parent 9be730245a
commit 4166ae3e3f
8 changed files with 939 additions and 892 deletions
+31 -3
View File
@@ -14,6 +14,7 @@
var/mineralAmt = 0
var/spread = 0 //will the seam spread?
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
/turf/simulated/mineral/Del()
@@ -70,8 +71,8 @@
/turf/simulated/mineral/random
name = "Mineral deposit"
var/mineralAmtList = list("Uranium" = 5, "Iron" = 5, "Diamond" = 5, "Gold" = 5, "Silver" = 5, "Plasma" = 5/*, "Adamantine" = 5*/)
var/mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25/*, "Adamantine" =5*/)//Currently, Adamantine won't spawn as it has no uses. -Durandan
var/mineralAmtList = list("Uranium" = 5, "Iron" = 5, "Diamond" = 5, "Gold" = 5, "Silver" = 5, "Plasma" = 5, "Archaeo" = 3/*, "Adamantine" = 5*/)
var/mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25, "Archaeo" = 5/*, "Adamantine" =5*/)//Currently, Adamantine won't spawn as it has no uses. -Durandan
var/mineralChance = 10 //means 10% chance of this plot changing to a mineral deposit
/turf/simulated/mineral/random/New()
@@ -94,16 +95,21 @@
M = new/turf/simulated/mineral/silver(src)
if("Plasma")
M = new/turf/simulated/mineral/plasma(src)
if("Archaeo")
M = new/turf/simulated/mineral/archaeo(src)
/*if("Adamantine")
M = new/turf/simulated/mineral/adamantine(src)*/
if(M)
src = M
M.levelupdate()
else if (prob(artifactChance))
//spawn a rare, xeno-arch artifact here
new/obj/machinery/artifact(src)
return
/turf/simulated/mineral/random/high_chance
mineralChance = 25
mineralSpawnChanceList = list("Uranium" = 10, "Iron" = 30, "Diamond" = 2, "Gold" = 10, "Silver" = 10, "Plasma" = 25)
mineralSpawnChanceList = list("Uranium" = 10, "Iron" = 30, "Diamond" = 2, "Gold" = 10, "Silver" = 10, "Plasma" = 25, "Archaeo" = 2)
/turf/simulated/mineral/random/Del()
return
@@ -163,6 +169,15 @@
spread = 1
/turf/simulated/mineral/archaeo
name = "Strange rock formation"
icon_state = "rock_Archaeo"
mineralName = "Archaeo"
mineralAmt = 3
spreadChance = 25
spread = 1
/turf/simulated/mineral/clown
name = "Bananium deposit"
icon_state = "rock_Clown"
@@ -231,6 +246,7 @@
return
/turf/simulated/mineral/proc/gets_drilled()
var/destroyed = 0 //used for breaking strange rocks
if ((src.mineralName != "") && (src.mineralAmt > 0) && (src.mineralAmt < 11))
var/i
for (i=0;i<mineralAmt;i++)
@@ -246,9 +262,21 @@
new /obj/item/weapon/ore/plasma(src)
if (src.mineralName == "Diamond")
new /obj/item/weapon/ore/diamond(src)
if (src.mineralName == "Archaeo")
//spawn strange rocks here
//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
new /obj/item/weapon/ore/strangerock(src)
else
destroyed = 1
if (src.mineralName == "Clown")
new /obj/item/weapon/ore/clown(src)
if (prob(src.artifactChance))
//spawn a rare, xeno-archaelogical artifact here
new /obj/machinery/artifact(src)
ReplaceWithFloor()
if(destroyed) //Display message about being a terrible miner
usr << "\red You destroy some of the rocks!"
return
/*
@@ -59,6 +59,15 @@
desc = "Completely useless"
icon_state = "slag"
/obj/item/weapon/ore/strangerock //see artifact_archaeo.dm in modules/research for more info
name = "Strange rock"
desc = "Seems to have some unusal strata evident throughout it."
icon_state = "strange"
var/obj/inside
var/method // 0 = fire, 1+ = acid
origin_tech = "materials=5"
//unacidable = 1 //This can prevent acid from gooey grey massing
/obj/item/weapon/ore/New()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
-5
View File
@@ -125,7 +125,6 @@
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
var/amt_archaeo = 0
for (var/obj/item/weapon/ore/C in contents)
if (istype(C,/obj/item/weapon/ore/diamond))
amt_diamond++;
@@ -143,8 +142,6 @@
amt_uranium++;
else if (istype(C,/obj/item/weapon/ore/clown))
amt_clown++;
else if (istype(C,/obj/item/weapon/ore/strangerock))
amt_archaeo++;
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
if (amt_gold)
@@ -163,8 +160,6 @@
dat += text("Uranium ore: [amt_uranium]<br>")
if (amt_clown)
dat += text("Bananium ore: [amt_clown]<br>")
if (amt_archaeo)
dat += text("Strange rocks: [amt_archaeo]<br>")
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse("[dat]", "window=orebox")
+5
View File
@@ -28,6 +28,7 @@
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
var/amt_archaeo = 0
for (var/obj/item/weapon/ore/C in contents)
if (istype(C,/obj/item/weapon/ore/diamond))
@@ -46,6 +47,8 @@
amt_uranium++;
if (istype(C,/obj/item/weapon/ore/clown))
amt_clown++;
if (istype(C,/obj/item/weapon/ore/strangerock))
amt_archaeo++;
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
if (amt_gold)
@@ -64,6 +67,8 @@
dat += text("Uranium ore: [amt_uranium]<br>")
if (amt_clown)
dat += text("Bananium ore: [amt_clown]<br>")
if (amt_archaeo)
dat += text("Strange rocks: [amt_archaeo]<br>")
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse("[dat]", "window=orebox")