mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
[MIRROR] Samples from Strange Rocks (#9569)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e3b5cc0b7b
commit
e9f200a0e7
@@ -26,9 +26,32 @@
|
||||
/obj/item/strangerock/New(loc, var/inside_item_type = 0)
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
var/d100 = rand(1,100)
|
||||
|
||||
if(inside_item_type)
|
||||
new /obj/item/archaeological_find(src, inside_item_type) // CHOMPEdit
|
||||
switch(d100)
|
||||
if(51 to 100) //standard spawn logic 50% of the time
|
||||
new /obj/item/archaeological_find(src, inside_item_type) // CHOMPEdit
|
||||
if(21 to 50) // 30% chance
|
||||
new /obj/item/research_sample/common(src)
|
||||
if(6 to 20) // 15% chance
|
||||
new /obj/item/research_sample/uncommon(src)
|
||||
if(1 to 5) // 5% chance
|
||||
new /obj/item/research_sample/rare(src)
|
||||
else //if something went wrong, somehow, generate the usual find
|
||||
new /obj/item/archaeological_find(src, inside_item_type) // CHOMPEdit
|
||||
else //if this strange rock isn't set to generate a find for whatever reason, create a sample 75% of the time (this shouldn't happen unless the rock is mapped in or adminspawned)
|
||||
switch(d100)
|
||||
if(76 to 100)
|
||||
return
|
||||
if(21 to 75)
|
||||
new /obj/item/research_sample/common(src)
|
||||
if(6 to 20)
|
||||
new /obj/item/research_sample/uncommon(src)
|
||||
if(1 to 5)
|
||||
new /obj/item/research_sample/rare(src)
|
||||
else //if we somehow glitched
|
||||
return //do nothing
|
||||
|
||||
/obj/item/strangerock/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/pickaxe/brush))
|
||||
|
||||
Reference in New Issue
Block a user