mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-24 21:56:55 +01:00
drakes can dig through outcrops
This commit is contained in:
@@ -11,11 +11,35 @@
|
||||
var/upperdrop = 10
|
||||
var/outcropdrop = /obj/item/ore/glass
|
||||
|
||||
|
||||
/obj/structure/outcrop/Initialize()
|
||||
. = ..()
|
||||
if(prob(1))
|
||||
if (prob(1))
|
||||
add_overlay("[initial(icon_state)]-egg")
|
||||
|
||||
|
||||
/obj/structure/outcrop/attackby(obj/item/item, mob/living/user)
|
||||
if (!istype(item, /obj/item/pickaxe))
|
||||
return ..()
|
||||
visible_message(
|
||||
SPAN_ITALIC("\The [user] begins to hack away at \the [src]."),
|
||||
SPAN_ITALIC("You hear the industrious clanging of metal on rock!")
|
||||
)
|
||||
if (!do_after(user, 4 SECONDS, src))
|
||||
return TRUE
|
||||
visible_message(
|
||||
SPAN_ITALIC("\The [user] breaks the [src] apart."),
|
||||
SPAN_ITALIC("You hear rocks shatter apart!")
|
||||
)
|
||||
var/turf/turf = get_turf(src)
|
||||
qdel(src)
|
||||
if (!turf)
|
||||
return TRUE
|
||||
for (var/i = 1 to rand(mindrop, upperdrop))
|
||||
new outcropdrop (turf)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/structure/outcrop/diamond
|
||||
name = "shiny outcrop"
|
||||
desc = "A shiny rocky outcrop."
|
||||
@@ -24,6 +48,7 @@
|
||||
upperdrop = 4
|
||||
outcropdrop = /obj/item/ore/diamond
|
||||
|
||||
|
||||
/obj/structure/outcrop/phoron
|
||||
name = "shiny outcrop"
|
||||
desc = "A shiny rocky outcrop."
|
||||
@@ -32,6 +57,7 @@
|
||||
upperdrop = 8
|
||||
outcropdrop = /obj/item/ore/phoron
|
||||
|
||||
|
||||
/obj/structure/outcrop/iron
|
||||
name = "rugged outcrop"
|
||||
desc = "A rugged rocky outcrop."
|
||||
@@ -40,6 +66,7 @@
|
||||
upperdrop = 20
|
||||
outcropdrop = /obj/item/ore/iron
|
||||
|
||||
|
||||
/obj/structure/outcrop/coal
|
||||
name = "rugged outcrop"
|
||||
desc = "A rugged rocky outcrop."
|
||||
@@ -48,6 +75,7 @@
|
||||
upperdrop = 20
|
||||
outcropdrop = /obj/item/ore/coal
|
||||
|
||||
|
||||
/obj/structure/outcrop/lead
|
||||
name = "rugged outcrop"
|
||||
desc = "A rugged rocky outcrop."
|
||||
@@ -56,6 +84,7 @@
|
||||
upperdrop = 5
|
||||
outcropdrop = /obj/item/ore/lead
|
||||
|
||||
|
||||
/obj/structure/outcrop/gold
|
||||
name = "hollow outcrop"
|
||||
desc = "A hollow rocky outcrop."
|
||||
@@ -64,6 +93,7 @@
|
||||
upperdrop = 6
|
||||
outcropdrop = /obj/item/ore/gold
|
||||
|
||||
|
||||
/obj/structure/outcrop/silver
|
||||
name = "hollow outcrop"
|
||||
desc = "A hollow rocky outcrop."
|
||||
@@ -72,6 +102,7 @@
|
||||
upperdrop = 8
|
||||
outcropdrop = /obj/item/ore/silver
|
||||
|
||||
|
||||
/obj/structure/outcrop/platinum
|
||||
name = "hollow outcrop"
|
||||
desc = "A hollow rocky outcrop."
|
||||
@@ -80,6 +111,7 @@
|
||||
upperdrop = 5
|
||||
outcropdrop = /obj/item/ore/osmium
|
||||
|
||||
|
||||
/obj/structure/outcrop/uranium
|
||||
name = "spiky outcrop"
|
||||
desc = "A spiky rocky outcrop, it glows faintly."
|
||||
@@ -88,30 +120,24 @@
|
||||
upperdrop = 8
|
||||
outcropdrop = /obj/item/ore/uranium
|
||||
|
||||
/obj/structure/outcrop/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/pickaxe))
|
||||
to_chat(user, "<span class='notice'>[user] begins to hack away at \the [src].</span>")
|
||||
if(do_after(user,40))
|
||||
to_chat(user, "<span class='notice'>You have finished digging!</span>")
|
||||
for(var/i=0;i<(rand(mindrop,upperdrop));i++)
|
||||
new outcropdrop(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/random/outcrop //In case you want an outcrop without pre-determining the type of ore.
|
||||
/obj/random/outcrop
|
||||
name = "random rock outcrop"
|
||||
desc = "This is a random rock outcrop."
|
||||
icon = 'icons/obj/outcrop.dmi'
|
||||
icon_state = "outcrop-random"
|
||||
|
||||
|
||||
/obj/random/outcrop/item_to_spawn()
|
||||
return pick(prob(100);/obj/structure/outcrop,
|
||||
prob(100);/obj/structure/outcrop/iron,
|
||||
prob(100);/obj/structure/outcrop/coal,
|
||||
prob(65);/obj/structure/outcrop/silver,
|
||||
prob(50);/obj/structure/outcrop/gold,
|
||||
prob(30);/obj/structure/outcrop/uranium,
|
||||
prob(30);/obj/structure/outcrop/phoron,
|
||||
prob(7);/obj/structure/outcrop/diamond,
|
||||
prob(15);/obj/structure/outcrop/platinum,
|
||||
prob(15);/obj/structure/outcrop/lead)
|
||||
return pick(
|
||||
prob(100); /obj/structure/outcrop,
|
||||
prob(100); /obj/structure/outcrop/iron,
|
||||
prob(100); /obj/structure/outcrop/coal,
|
||||
prob(65); /obj/structure/outcrop/silver,
|
||||
prob(50); /obj/structure/outcrop/gold,
|
||||
prob(30); /obj/structure/outcrop/uranium,
|
||||
prob(30); /obj/structure/outcrop/phoron,
|
||||
prob(15); /obj/structure/outcrop/platinum,
|
||||
prob(15); /obj/structure/outcrop/lead,
|
||||
prob(7); /obj/structure/outcrop/diamond
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user