diff --git a/code/modules/xenoarcheaology/finds/finds.dm b/code/modules/xenoarcheaology/finds/finds.dm index 2dd956bc27e..8f30b0cb15b 100644 --- a/code/modules/xenoarcheaology/finds/finds.dm +++ b/code/modules/xenoarcheaology/finds/finds.dm @@ -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, new_item_type = inside_item_type) + switch(d100) + if(51 to 100) //standard spawn logic 50% of the time + new /obj/item/archaeological_find(src, new_item_type = inside_item_type) + 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, new_item_type = inside_item_type) + 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))