gemspawning fix (#7546)

This commit is contained in:
Kaedwuff
2019-12-01 08:42:21 -06:00
committed by Werner
parent f0ce5dd534
commit 0295d28868
3 changed files with 70 additions and 31 deletions

View File

@@ -524,7 +524,7 @@ var/list/gemtype2type = list(
maxstack = 5
stacksize = 0
/turf/simulated/mineral/proc/findgem(loc)
/turf/simulated/mineral/proc/findgem()
if(prob(95))
spawnsmallgem()
else
@@ -536,51 +536,51 @@ var/list/gemtype2type = list(
else
spawnhugegem()
/turf/simulated/mineral/proc/spawnsmallgem(loc)
/turf/simulated/mineral/proc/spawnsmallgem()
if(prob(75))
if(prob(80))
var/picked = pick(/obj/item/precious/gemstone/ruby, /obj/item/precious/gemstone/topaz, /obj/item/precious/gemstone/sapphire, /obj/item/precious/gemstone/amethyst, /obj/item/precious/gemstone/emerald)
new picked(loc)
new picked(src)
visible_message(span("notice", "A tiny, glittering gemstone was in the rubble!"))
else
new /obj/item/precious/gemstone/diamond(loc)
new /obj/item/precious/gemstone/diamond(src)
visible_message(span("notice", "A tiny, glittering diamond was in the rubble! Shiny!"))
else
if(prob(80))
var/picked = pick(/obj/item/precious/gemstone/ruby, /obj/item/precious/gemstone/topaz, /obj/item/precious/gemstone/sapphire, /obj/item/precious/gemstone/amethyst, /obj/item/precious/gemstone/emerald)
new picked(loc, 2)
new picked(src, 2)
visible_message(span("notice", "A couple tiny, glittering gemstones were in the rubble! Lucky!"))
else
new /obj/item/precious/gemstone/diamond(loc)
new /obj/item/precious/gemstone/diamond(src)
visible_message(span("notice", "A couple tiny, glittering diamonds were in the rubble! Sweet!"))
/turf/simulated/mineral/proc/spawnmediumgem(loc)
/turf/simulated/mineral/proc/spawnmediumgem(src)
if(prob(80))
var/picked = pick(/obj/item/precious/gemstone/ruby/med, /obj/item/precious/gemstone/topaz/med, /obj/item/precious/gemstone/sapphire/med, /obj/item/precious/gemstone/amethyst/med, /obj/item/precious/gemstone/emerald/med)
new picked(loc)
new picked(src)
visible_message(span("notice", "You found a small gemstone in the rubble! Nice!"))
else
new /obj/item/precious/gemstone/diamond/med(loc)
new /obj/item/precious/gemstone/diamond/med(src)
visible_message(span("notice", "You found a small diamond in the rubble! Yeehaw!"))
/turf/simulated/mineral/proc/spawnlargegem(loc)
/turf/simulated/mineral/proc/spawnlargegem(src)
var/picked = pick(/obj/item/precious/gemstone/ruby/large, /obj/item/precious/gemstone/topaz/large, /obj/item/precious/gemstone/sapphire/large, /obj/item/precious/gemstone/amethyst/large, /obj/item/precious/gemstone/diamond/large, /obj/item/precious/gemstone/emerald/large)
new picked(loc)
new picked(src)
visible_message(span("notice", "There was sizable gemstone in the rubble! Wow!"))
/turf/simulated/mineral/proc/spawnhugegem(loc)
/turf/simulated/mineral/proc/spawnhugegem(src)
if(prob(90))
var/picked = pick(/obj/item/precious/gemstone/ruby/large, /obj/item/precious/gemstone/topaz/large, /obj/item/precious/gemstone/sapphire/large, /obj/item/precious/gemstone/amethyst/large, /obj/item/precious/gemstone/diamond/large, /obj/item/precious/gemstone/emerald/large)
new picked(loc, rand(2,5))
new picked(src, rand(2,5))
visible_message(span("danger", "There is a loud crunching sound and you watch in horror as a enormous gemstone that had been embedded in the rock fractures into pieces."))
visible_message(span("notice", "Well, that was unlucky... at least the fragments are worth something, though..."))
else
var/picked = pick(/obj/item/precious/gemstone/ruby/huge, /obj/item/precious/gemstone/topaz/huge, /obj/item/precious/gemstone/sapphire/huge, /obj/item/precious/gemstone/amethyst/huge, /obj/item/precious/gemstone/diamond/huge, /obj/item/precious/gemstone/emerald/huge)
new picked(loc)
new picked(src)
visible_message("<span style='color: green;'><i><em>An enormous gemstone tumbles out of the rubble, somehow managing to survive the destruction of the rock it was hidden in. Holy shit - this thing is larger than your head! You're going to be rich if you can get hold of that!</em></i></span>")
/turf/simulated/mineral/proc/spawndiamond(loc)
/turf/simulated/mineral/proc/spawndiamond()
if(prob(95))
spawnsmalldiamond()
else
@@ -592,27 +592,27 @@ var/list/gemtype2type = list(
else
spawnhugediamond()
/turf/simulated/mineral/proc/spawnsmalldiamond(loc)
/turf/simulated/mineral/proc/spawnsmalldiamond()
if(prob(75))
new /obj/item/precious/gemstone/diamond(loc)
new /obj/item/precious/gemstone/diamond(src)
visible_message(span("notice", "There was also a tiny, glittering higher quality diamond among the rubble!"))
else
new /obj/item/precious/gemstone/diamond(loc, 2)
new /obj/item/precious/gemstone/diamond(src, 2)
visible_message(span("notice", "A couple of tiny higher quality diamonds were also among the rubble! Lucky!"))
/turf/simulated/mineral/proc/spawnmediumdiamond(loc)
new /obj/item/precious/gemstone/diamond/med(loc)
/turf/simulated/mineral/proc/spawnmediumdiamond()
new /obj/item/precious/gemstone/diamond/med(src)
visible_message(span("notice", "A small higher quality diamond was also in the rubble! Nice!"))
/turf/simulated/mineral/proc/spawnlargediamond(loc)
new /obj/item/precious/gemstone/diamond/large(loc)
/turf/simulated/mineral/proc/spawnlargediamond()
new /obj/item/precious/gemstone/diamond/large(src)
visible_message(span("notice", "A sizable higher quality diamond was in the rubble! Wow!"))
/turf/simulated/mineral/proc/spawnhugediamond(loc)
/turf/simulated/mineral/proc/spawnhugediamond()
if(prob(90))
new /obj/item/precious/gemstone/diamond/large(loc, rand(2,5))
new /obj/item/precious/gemstone/diamond/large(src, rand(2,5))
visible_message(span("danger", "There is a loud crunching sound and you watch in horror as a enormous diamond that had been embedded in the rock fractures into pieces."))
visible_message(span("notice", "Well, that was unlucky... at least the fragments are worth something, though..."))
else
new /obj/item/precious/gemstone/diamond/huge(loc)
new /obj/item/precious/gemstone/diamond/huge(src)
visible_message("<span style='color: green;'><i><em>You find an enormous diamond in the rubble that managed to survive the destruction of the rock it was hidden in. Holy shit - this thing is larger than your head! You're going to be rich if you can get hold of that!</em></i></span>")

View File

@@ -391,8 +391,6 @@ var/list/mineral_can_smooth_with = list(
clear_ore_effects()
var/obj/item/ore/O = new mineral.ore (src)
if(src.mineral == "diamond")
spawndiamond()
if(istype(O))
geologic_data.UpdateNearbyArtifactInfo(src)
O.geologic_data = geologic_data
@@ -426,15 +424,15 @@ var/list/mineral_can_smooth_with = list(
if(prob(3))
excavate_find(prob(5), finds[1])
if(prob(5))
findgem()
//Add some rubble, you did just clear out a big chunk of rock.
ChangeTurf(mined_turf)
if(rand(1,500) == 1)
visible_message("<span class='notice'>An old dusty crate was buried within!</span>")
new /obj/structure/closet/crate/secure/loot(src)
else if(prob(5))
findgem(loc)
/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
//with skill and luck, players can cleanly extract finds