Mining updates:

- Minerals can now spawn randomly. If you don't want tiles to spawn minerals use the /turf/simulated/mineral turf type, otherwise use /turf/simulated/mineral/random for them to generate random minerals.
- Randomly generated minerals spread in seams
- Known issues include the updating of wall tiles and spawning of floors and... well quite a bit of stuff with random mineral plots. For the moment they're mainly aesthetic. Working on fixing the rest of the stuff.

Map updates:
- Added random mineral patches to the mining level. They are generally a few plots behind the wall that you see, so random minerals will not be visible from the mines themselves. (for the moment anyway)
- Updated the construction site - mining dock

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@833 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2011-01-12 14:18:20 +00:00
parent 4a9f8c42ba
commit e3a572e79a
2 changed files with 4700 additions and 4584 deletions

View File

@@ -21,7 +21,7 @@
/**********************Mineral deposits**************************/
/turf/simulated/mineral //wall piece
name = "Mineral deposit"
name = "Rock"
icon = 'walls.dmi'
icon_state = "rock"
opacity = 1
@@ -29,48 +29,143 @@
blocks_air = 1
var/mineralName = ""
var/mineralAmt = 0
var/spread = 0 //will the seam spread?
var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles
/turf/simulated/mineral/urenium
/turf/simulated/mineral/New()
desc = "0"
if (mineralName && mineralAmt && spread && spreadChance)
var/sp = pickweight(list("1" = spreadChance, "0" = 100-spreadChance))
if(sp == "1")
if(istype(get_step(src, SOUTH), /turf/simulated/mineral/random))
//var/turf/simulated/mineral/random/R
//R = get_step(src, SOUTH)
new src.type(get_step(src, SOUTH))
//R.levelupdate()
sp = pickweight(list("1" = spreadChance, "0" = 100-spreadChance))
if(sp == "1")
if(istype(get_step(src, NORTH), /turf/simulated/mineral/random))
//var/turf/simulated/mineral/random/R
//R = get_step(src, NORTH)
new src.type(get_step(src, NORTH))
//R.levelupdate()
sp = pickweight(list("1" = spreadChance, "0" = 100-spreadChance))
if(sp == "1")
if(istype(get_step(src, WEST), /turf/simulated/mineral/random))
//var/turf/simulated/mineral/random/R
//R = get_step(src, WEST)
new src.type(get_step(src, WEST))
//R.levelupdate()
sp = pickweight(list("1" = spreadChance, "0" = 100-spreadChance))
if(sp == "1")
if(istype(get_step(src, EAST), /turf/simulated/mineral/random))
//var/turf/simulated/mineral/random/R
//R = get_step(src, EAST)
new src.type(get_step(src, EAST))
//R.levelupdate()
return
/*if(istype(get_step(src, SOUTH), /turf/simulated/floor/airless/asteroid))
A = get_step(src, SOUTH)
A.updateMineralOverlays()*/
/turf/simulated/mineral/random
name = "Mineral deposit"
var/mineralAmtList = list("Uranium" = 5, "Iron" = 5, "Diamond" = 5, "Gold" = 5, "Silver" = 5, "Plasma" = 5)
var/mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25)
var/mineralChance = 10 //means 10% chance of this plot changing to a mineral deposit
/turf/simulated/mineral/random/New()
var/mChance = pickweight(list("1" = mineralChance, "0" = 100-mineralChance))
if (mChance == "1")
var/mName = pickweight(mineralSpawnChanceList) //temp mineral name
spawn(5)
if (mName)
var/turf/simulated/mineral/M
switch(mName)
if("Uranium")
M = new/turf/simulated/mineral/uranium(src)
if("Iron")
M = new/turf/simulated/mineral/iron(src)
if("Diamond")
M = new/turf/simulated/mineral/diamond(src)
if("Gold")
M = new/turf/simulated/mineral/gold(src)
if("Silver")
M = new/turf/simulated/mineral/silver(src)
if("Plasma")
M = new/turf/simulated/mineral/plasma(src)
if(M)
src = M
M.levelupdate()
return
/turf/simulated/mineral/random/Del()
/turf/simulated/mineral/uranium
name = "Uranium deposit"
icon_state = "rock_Uranium"
mineralName = "Uranium"
mineralAmt = 5
spreadChance = 10
spread = 1
/turf/simulated/mineral/iron
name = "Iron deposit"
icon_state = "rock_Iron"
mineralName = "Iron"
mineralAmt = 5
spreadChance = 25
spread = 1
/turf/simulated/mineral/diamond
name = "Diamond deposit"
icon_state = "rock_Diamond"
mineralName = "Diamond"
mineralAmt = 5
spreadChance = 10
spread = 1
/turf/simulated/mineral/gold
name = "Gold deposit"
icon_state = "rock_Gold"
mineralName = "Gold"
mineralAmt = 5
spreadChance = 10
spread = 1
/turf/simulated/mineral/silver
name = "Silver deposit"
icon_state = "rock_Silver"
mineralName = "Silver"
mineralAmt = 5
spreadChance = 10
spread = 1
/turf/simulated/mineral/plasma
name = "Plasma deposit"
icon_state = "rock_Plasma"
mineralName = "Plasma"
mineralAmt = 5
spreadChance = 25
spread = 1
/turf/simulated/mineral/clown
name = "Bananium deposit"
icon_state = "rock_Clown"
mineralName = "Clown"
mineralAmt = 2
mineralAmt = 3
spreadChance = 0
spread = 0
/turf/simulated/mineral/ReplaceWithFloor()
if(!icon_old) icon_old = icon_state
@@ -135,6 +230,19 @@
ReplaceWithFloor()
return
/*
/turf/simulated/mineral/proc/setRandomMinerals()
var/s = pickweight(list("uranium" = 5, "iron" = 50, "gold" = 5, "silver" = 5, "plasma" = 50, "diamond" = 1))
if (s)
mineralName = s
var/N = text2path("/turf/simulated/mineral/[s]")
if (N)
var/turf/simulated/mineral/M = new N
src = M
if (src.mineralName)
mineralAmt = 5
return*/
/**********************Asteroid**************************/
@@ -1307,10 +1415,10 @@
icon = 'items.dmi'
icon_state = "pickaxe"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT
force = 5.0
throwforce = 7.0
force = 15.0
throwforce = 4.0
item_state = "wrench"
w_class = 2.0
w_class = 4.0
m_amt = 50
/*****************************Shovel********************************/
@@ -1320,10 +1428,10 @@
icon = 'items.dmi'
icon_state = "shovel"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT
force = 5.0
throwforce = 7.0
force = 8.0
throwforce = 4.0
item_state = "wrench"
w_class = 2.0
w_class = 4.0
m_amt = 50