diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 6c5bb01e5c..f2b92c0836 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -193,6 +193,10 @@ proc/move_mining_shuttle() var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO origin_tech = "materials=1;engineering=1" attack_verb = list("hit", "pierced", "sliced", "attacked") + var/drill_sound = 'sound/weapons/Genhit.ogg' + var/drill_verb = "picking" + + var/excavation_amount = 100 hammer name = "sledgehammer" diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 163b1cc343..cca0035846 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -1,5 +1,8 @@ /**********************Mineral deposits**************************/ +#define XENOARCH_SPAWN_CHANCE 0.5 +#define XENOARCH_SPREAD_CHANCE 15 + /turf/simulated/mineral //wall piece name = "Rock" icon = 'icons/turf/walls.dmi' @@ -16,7 +19,16 @@ var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles var/artifactChance = 0.3 //percent chance to spawn a xenoarchaelogical artifact var/last_act = 0 + var/datum/geosample/geological_data + var/excavation_level = 0 + var/list/finds = list() + var/list/excavation_minerals = list() + var/list/excavation_minerals_ascending = list() + var/list/exca_first = list("A","B","C","D","E") + var/list/exca_second = list() + var/next_rock = 0 + var/overlay_num = 0 /turf/simulated/mineral/Del() return @@ -56,27 +68,82 @@ T.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6) if (mineralName && mineralAmt && spread && spreadChance) - if(prob(spreadChance)) - if(istype(get_step(src, SOUTH), /turf/simulated/mineral/random)) - new src.type(get_step(src, SOUTH)) - if(prob(spreadChance)) - if(istype(get_step(src, NORTH), /turf/simulated/mineral/random)) - new src.type(get_step(src, NORTH)) - if(prob(spreadChance)) - if(istype(get_step(src, WEST), /turf/simulated/mineral/random)) - new src.type(get_step(src, WEST)) - if(prob(spreadChance)) - if(istype(get_step(src, EAST), /turf/simulated/mineral/random)) - new src.type(get_step(src, EAST)) + for(var/trydir in list(1,2,4,8)) + if(prob(spreadChance)) + if(istype(get_step(src, trydir), /turf/simulated/mineral/random)) + var/turf/simulated/mineral/T = get_step(src, trydir) + var/turf/simulated/mineral/M = new src.type(T) + //keep any digsite data as constant as possible + if(T.finds.len && !M.finds.len) + M.finds = T.finds + M.overlays += "overlay_archaeo1" - src.geological_data = new /datum/geosample(src) + //---- Xenoarchaeology BEGIN + + if(mineralAmt > 0 && !excavation_minerals.len) + for(var/i=0, i 0) + if(excavation_level < 25) + src.overlays += image('icons/obj/xenoarchaeology.dmi', "overlay_excv1_[rand(1,3)]") + else if(excavation_level < 50) + src.overlays += image('icons/obj/xenoarchaeology.dmi', "overlay_excv2_[rand(1,3)]") + else if(excavation_level < 75) + src.overlays += image('icons/obj/xenoarchaeology.dmi', "overlay_excv3_[rand(1,3)]") + else + src.overlays += image('icons/obj/xenoarchaeology.dmi', "overlay_excv4_[rand(1,3)]") + desc = "It appears to be partially excavated."*/ return /turf/simulated/mineral/random name = "Mineral deposit" - var/mineralAmtList = list("Uranium" = 5, "Iron" = 5, "Diamond" = 5, "Gold" = 5, "Silver" = 5, "Plasma" = 5, "Archaeo" = 3/*, "Adamantine" = 5*/) - var/mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25, "Archaeo" = 5/*, "Adamantine" =5*/)//Currently, Adamantine won't spawn as it has no uses. -Durandan + var/mineralAmtList = list("Uranium" = 5, "Iron" = 5, "Diamond" = 5, "Gold" = 5, "Silver" = 5, "Plasma" = 5/*, "Adamantine" = 5*/) + var/mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25/*, "Adamantine" =5*/)//Currently, Adamantine won't spawn as it has no uses. -Durandan var/mineralChance = 10 //means 10% chance of this plot changing to a mineral deposit /turf/simulated/mineral/random/New() @@ -99,19 +166,14 @@ M = new/turf/simulated/mineral/silver(src) if("Plasma") M = new/turf/simulated/mineral/plasma(src) - if("Archaeo") - M = new/turf/simulated/mineral/archaeo(src) /*if("Adamantine") M = new/turf/simulated/mineral/adamantine(src)*/ if(M) src = M M.levelupdate() - if(!geological_data) - src.geological_data = new /datum/geosample - src.geological_data.UpdateTurf(src) - else if (prob(artifactChance)) - //spawn a rare, xeno-arch artifact here - new/obj/machinery/artifact(src) + + /*else if (prob(artifactChance)) + new/obj/machinery/artifact(src)*/ return /turf/simulated/mineral/random/high_chance @@ -176,15 +238,6 @@ spread = 1 -/turf/simulated/mineral/archaeo - name = "Strange rock formation" - icon_state = "rock_Archaeo" - mineralName = "Archaeo" - mineralAmt = 3 - spreadChance = 25 - spread = 1 - - /turf/simulated/mineral/clown name = "Bananium deposit" icon_state = "rock_Clown" @@ -245,61 +298,105 @@ commented out in r5061, I left it because of the shroom thingies return */ //Watch your tabbing, microwave. --NEO - if(last_act+W:digspeed > world.time)//prevents message spam + + var/obj/item/weapon/pickaxe/P = W + if(last_act+P.digspeed > world.time)//prevents message spam return last_act = world.time - user << "\red You start picking." - playsound(user, 'sound/weapons/Genhit.ogg', 20, 1) - if(do_after(user,W:digspeed)) - user << "\blue You finish cutting into the rock." - gets_drilled() + playsound(user, P.drill_sound, 20, 1) + + //Chance to destroy any archaeological finds if we carelessly pick away at the rock + var/fail_message = "" + if(src.finds.len) + var/datum/find/F = src.finds[1] + if(src.excavation_level + P.excavation_amount >= F.excavation_required + F.destruct_range) + fail_message = ", [pick("there is a crunching noise","[W] hits something","part of the rock face crumbles away","something breaks under [W]")]" + if(prob(50)) + src.finds.Remove(F) + user << "\red You start [P.drill_verb][fail_message]." + + if(do_after(user,P.digspeed)) + user << "\blue You finish [P.drill_verb] the rock." + if(src.excavation_level + P.excavation_amount >= 100) + gets_drilled() + else + src.excavation_level += P.excavation_amount + + //handle any archaeological finds we might uncover + + //extract pesky minerals while we're excavating + while(excavation_minerals.len && src.excavation_level > excavation_minerals[excavation_minerals.len]) + drop_mineral() + //have a 50% chance to extract bonus minerals this way + //if(prob(50)) + pop(excavation_minerals) + mineralAmt-- + + //drop some rocks + next_rock += P.excavation_amount * 10 + while(next_rock > 100) + next_rock -= 100 + var/obj/item/weapon/ore/O = new(src) + O.geological_data = src.geological_data else return attack_hand(user) return -/turf/simulated/mineral/proc/gets_drilled() - var/destroyed = 0 //used for breaking strange rocks - if ((src.mineralName != "") && (src.mineralAmt > 0) && (src.mineralAmt < 11)) - var/i - for (i=0;i 0) && (src.mineralAmt < 11)) + + //if the turf has already been excavated, some of it's ore has been removed + for (var/i=0;i 3)) - if(!src.method) //0 = fire, 1+ = acid + if(w.isOn()) + if(w.get_fuel() >= 4 && !src.method) if(inside) - var/obj/A = new src.inside(get_turf(src)) + inside.loc = src.loc for(var/mob/M in viewers(world.view, user)) - M.show_message("\blue The rock burns away revealing a [A.name].",1) + M.show_message("[src] burns away revealing [inside].",1) else for(var/mob/M in viewers(world.view, user)) - M.show_message("\blue The rock burns away into nothing.",1) - del src + M.show_message("[src] burns away into nothing.",1) + del(src) + w.remove_fuel(4) else for(var/mob/M in viewers(world.view, user)) - M.show_message("\blue A few sparks fly off the rock, but otherwise nothing else happens.",1) - w.remove_fuel(4) + M.show_message("A few sparks fly off [src], but nothing else happens.",1) + w.remove_fuel(1) + return else if(istype(W,/obj/item/device/core_sampler/)) var/obj/item/device/core_sampler/S = W S.sample_item(src, user) + return -/*Code does not work, likely due to removal/change of acid_act proc -//Strange rocks currently melt to gooey grey w/ acid application (see reactions) -//will fix when I get a chance to fiddle with it -Mij -/obj/item/weapon/ore/strangerock/acid_act(var/datum/reagent/R) - if(src.method) - if(inside) - var/obj/A = new src.inside(get_turf(src)) - for(var/mob/M in viewers(world.view, get_turf(src))) - M.show_message("\blue The rock fizzes away revealing a [A.name].",1) - else - for(var/mob/M in viewers(world.view, get_turf(src))) - M.show_message("\blue The rock fizzes away into nothing.",1) - del src - else - for(var/mob/M in viewers(world.view, get_turf(src))) - M.show_message("\blue The acid splashes harmlessly off the rock, nothing else interesting happens.",1) - return 1 -*/ + ..() + if(prob(33)) + src.visible_message("[src] crumbles away, leaving some dust and gravel behind.") + del(src) /obj/item/weapon/archaeological_find name = "object" @@ -90,11 +224,12 @@ icon_state = "ano01" var/find_type = 0 -/obj/item/weapon/archaeological_find/New() - if(find_type < 1 || find_type > 25) - find_type = 0 - if(!find_type) - find_type = rand(1, 25) +/obj/item/weapon/archaeological_find/New(var/new_item_type) + + if(new_item_type) + find_type = new_item_type + else + find_type = get_random_find_type(0) var/item_type = "object" icon_state = "unknown[rand(1,4)]" @@ -115,220 +250,291 @@ //for all items here: //icon_state //item_state - if(prob(90)) - switch(find_type) - if(1) - item_type = "bowl" - new_item = new /obj/item/weapon/reagent_containers/glass(src.loc) - new_item.icon = 'xenoarchaeology.dmi' - new_item.icon_state = "bowl" + switch(find_type) + if(1) + item_type = "bowl" + new_item = new /obj/item/weapon/reagent_containers/glass(src.loc) + new_item.icon = 'xenoarchaeology.dmi' + new_item.icon_state = "bowl" + apply_image_decorations = 1 + if(prob(20)) + additional_desc = "There appear to be [pick("dark","faintly glowing","pungent")] [pick("red","purple","green","blue")] stains inside." + if(2) + item_type = "urn" + new_item = new /obj/item/weapon/reagent_containers/glass(src.loc) + new_item.icon = 'xenoarchaeology.dmi' + new_item.icon_state = "urn" + apply_image_decorations = 1 + if(prob(20)) + additional_desc = "It [pick("whispers faintly","makes a quiet roaring sound","whistles softly","thrums quietly","throbs")] if you put it to your ear." + if(3) + item_type = "[pick("fork","spoon","knife")]" + if(prob(25)) + new_item = new /obj/item/weapon/kitchen/utensil/fork(src.loc) + else if(prob(50)) + new_item = new /obj/item/weapon/kitchen/utensil/knife(src.loc) + else + new_item = new /obj/item/weapon/kitchen/utensil/spoon(src.loc) + additional_desc = "[pick("It's like no [item_type] you've ever seen before",\ + "It's a mystery how anyone is supposed to eat with this",\ + "You wonder what the creator's mouth was shaped like")]." + if(4) + item_type = "statuette" + icon_state = "statuette" + additional_desc = "It depicts a [pick("small","ferocious","wild","pleasing","hulking")] \ + [pick("alien figure","rodent-like creature","reptilian alien","primate","unidentifiable object")] \ + [pick("performing unspeakable acts","posing heroically","in a feotal position","cheering","sobbing","making a plaintive gesture","making a rude gesture")]." + if(5) + item_type = "instrument" + icon_state = "instrument" + if(prob(30)) apply_image_decorations = 1 - if(prob(20)) - additional_desc = "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains inside." - if(2) - item_type = "urn" - new_item = new /obj/item/weapon/reagent_containers/glass(src.loc) - new_item.icon = 'xenoarchaeology.dmi' - new_item.icon_state = "urn" - apply_image_decorations = 1 - if(prob(20)) - additional_desc = "It [pick("whispers faintly","makes a quiet roaring sound","whistles softly","thrums quietly"<"throbs")] if you put it to your ear." - if(3) - item_type = "[pick("fork","spoon","knife")]" - if(prob(25)) - new_item = new /obj/item/weapon/kitchen/utensil/fork(src.loc) - else if(prob(50)) - new_item = new /obj/item/weapon/kitchen/utensil/knife(src.loc) - else - new_item = new /obj/item/weapon/kitchen/utensil/spoon(src.loc) - additional_desc = "[pick("It's like no [item_type] you've ever seen before",\ - "It's a mystery how anyone is supposed to eat with this",\ - "You wonder what the creator's mouth was shaped like")]." - if(4) - item_type = "statuette" - icon_state = "statuette" - additional_desc = "It depicts a [pick("small","ferocious","wild","pleasing","hulking")] \ - [pick("alien humanoid figure","rodent-like creature","reptilian alien","primate","unidentifiable object")] \ - [pick("performing unspeakable acts","posing heroically","in a feotal position","cheering","sobbing","making a plaintive gesture","making a rude gesture")]." - if(5) - item_type = "instrument" - icon_state = "instrument" additional_desc = "[pick("You're not sure how anyone could have played this",\ "You wonder how many mouths the creator had",\ "You wonder what it sounds like",\ "You wonder what kind of music was made with it")]." - if(prob(30)) - apply_image_decorations = 1 - if(6) - item_type = "[pick("bladed knife","serrated blade","sharp cutting implement")]" - new_item = new /obj/item/weapon/kitchenknife(src.loc) - additional_desc = "[pick("It doesn't look safe.",\ - "It looks wickedly jagged",\ - "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along the edges")]." - if(7) - //assuming there are 10 types of coins - var/chance = 10 - for(var/type in typesof(/obj/item/weapon/coin)) - if(prob(chance)) - new_item = new type(src.loc) - break - chance += 10 + if(6) + item_type = "[pick("bladed knife","serrated blade","sharp cutting implement")]" + new_item = new /obj/item/weapon/kitchenknife(src.loc) + additional_desc = "[pick("It doesn't look safe.",\ + "It looks wickedly jagged",\ + "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along the edges")]." + if(7) + //assuming there are 10 types of coins + var/chance = 10 + for(var/type in typesof(/obj/item/weapon/coin)) + if(prob(chance)) + new_item = new type(src.loc) + break + chance += 10 - item_type = new_item.name - apply_material_decorations = 0 + item_type = new_item.name + apply_material_decorations = 0 + apply_image_decorations = 1 + if(8) + item_type = "chained loops" + new_item = new /obj/item/weapon/handcuffs(src.loc) + additional_desc = "[pick("They appear to be for securing two things together","Looks kinky","Doesn't seem like a children's toy")]." + if(9) + item_type = "[pick("wicked","evil","byzantine","dangerous")] looking [pick("device","contraption","thing","trap")]" + new_item = new /obj/item/weapon/legcuffs/beartrap(src.loc) + additional_desc = "[pick("It looks like it could take a limb off",\ + "Could be some kind of animal trap",\ + "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along part of it")]." + if(10) + item_type = "small [pick("cylinder","tank","chamber")]" + new_item = new /obj/item/weapon/lighter(src.loc) + additional_desc = "There is a tiny device attached." + if(prob(30)) apply_image_decorations = 1 - if(8) - item_type = "chained loops" - new_item = new /obj/item/weapon/handcuffs(src.loc) - additional_desc = "[pick("They appear to be for securing two things together","Looks kinky","Doesn't seem like a children's toy")]." - if(9) - item_type = "[pick("wicked","evil","byzantine","dangerous")] looking [pick("device","contraption","thing","trap")]" - new_item = new /obj/item/weapon/legcuffs/beartrap(src.loc) - additional_desc = "[pick("It looks like it could take a limb off",\ - "Could be some kind of animal trap",\ - "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along part of it")]." - if(10) - item_type = "small [pick("cylinder","tank","chamber")]" - new_item = new /obj/item/weapon/lighter(src.loc) - additional_desc = "There is a tiny device attached." - if(prob(30)) - apply_image_decorations = 1 - if(11) - item_type = "box" - new_item = new /obj/item/weapon/storage/box(src.loc) - new_item.icon = 'xenoarchaeology.dmi' - new_item.icon_state = "box" - if(prob(30)) - apply_image_decorations = 1 - if(12) - item_type = "[pick("cylinder","tank","chamber")]" - if(prob(25)) - new_item = new /obj/item/weapon/tank/air(src.loc) - else if(prob(50)) - new_item = new /obj/item/weapon/tank/anesthetic(src.loc) - else - new_item = new /obj/item/weapon/tank/plasma(src.loc) - icon_state = pick("oxygen","oxygen_fr","oxygen_f","plasma","anesthetic") - additional_desc = "It [pick("gloops","sloshes")] slightly when you shake it." - if(13) - item_type = "strange tool" - if(prob(25)) - new_item = new /obj/item/weapon/wrench(src.loc) - else if(prob(25)) - new_item = new /obj/item/weapon/crowbar(src.loc) - else - new_item = new /obj/item/weapon/screwdriver(src.loc) - additional_desc = "[pick("It doesn't look safe.",\ - "You wonder what it was used for",\ - "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains on it")]." - if(14) - apply_material_decorations = 0 - var/list/possible_spawns = list() - possible_spawns += /obj/item/stack/sheet/metal - possible_spawns += /obj/item/stack/sheet/plasteel - possible_spawns += /obj/item/stack/sheet/glass - possible_spawns += /obj/item/stack/sheet/rglass - possible_spawns += /obj/item/stack/sheet/mineral/plasma - possible_spawns += /obj/item/stack/sheet/mineral/mythril - possible_spawns += /obj/item/stack/sheet/mineral/gold - possible_spawns += /obj/item/stack/sheet/mineral/silver - possible_spawns += /obj/item/stack/sheet/mineral/enruranium - possible_spawns += /obj/item/stack/sheet/mineral/sandstone - possible_spawns += /obj/item/stack/sheet/mineral/silver + if(11) + item_type = "box" + new_item = new /obj/item/weapon/storage/box(src.loc) + new_item.icon = 'xenoarchaeology.dmi' + new_item.icon_state = "box" + if(prob(30)) + apply_image_decorations = 1 + if(12) + item_type = "[pick("cylinder","tank","chamber")]" + if(prob(25)) + new_item = new /obj/item/weapon/tank/air(src.loc) + else if(prob(50)) + new_item = new /obj/item/weapon/tank/anesthetic(src.loc) + else + new_item = new /obj/item/weapon/tank/plasma(src.loc) + icon_state = pick("oxygen","oxygen_fr","oxygen_f","plasma","anesthetic") + additional_desc = "It [pick("gloops","sloshes")] slightly when you shake it." + if(13) + item_type = "strange tool" + if(prob(25)) + new_item = new /obj/item/weapon/wrench(src.loc) + else if(prob(25)) + new_item = new /obj/item/weapon/crowbar(src.loc) + else + new_item = new /obj/item/weapon/screwdriver(src.loc) + additional_desc = "[pick("It doesn't look safe.",\ + "You wonder what it was used for",\ + "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains on it")]." + if(14) + apply_material_decorations = 0 + var/list/possible_spawns = list() + possible_spawns += /obj/item/stack/sheet/metal + possible_spawns += /obj/item/stack/sheet/plasteel + possible_spawns += /obj/item/stack/sheet/glass + possible_spawns += /obj/item/stack/sheet/rglass + possible_spawns += /obj/item/stack/sheet/mineral/plasma + possible_spawns += /obj/item/stack/sheet/mineral/mythril + possible_spawns += /obj/item/stack/sheet/mineral/gold + possible_spawns += /obj/item/stack/sheet/mineral/silver + possible_spawns += /obj/item/stack/sheet/mineral/enruranium + possible_spawns += /obj/item/stack/sheet/mineral/sandstone + possible_spawns += /obj/item/stack/sheet/mineral/silver - var/new_type = pick(possible_spawns) - new_item = new new_type(src.loc) - new_item:amount = rand(5,45) - del(src) - return //nothing fancy here - if(15) - if(prob(75)) - new_item = new /obj/item/weapon/pen(src.loc) - else - new_item = new /obj/item/weapon/pen/sleepypen(src.loc) - if(prob(30)) - apply_image_decorations = 1 - if(16) + var/new_type = pick(possible_spawns) + new_item = new new_type(src.loc) + new_item:amount = rand(5,45) + del(src) + return //nothing fancy here + if(15) + if(prob(75)) + new_item = new /obj/item/weapon/pen(src.loc) + else + new_item = new /obj/item/weapon/pen/sleepypen(src.loc) + if(prob(30)) + apply_image_decorations = 1 + if(16) + if(prob(50)) item_type = "smooth green crystal" - additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.") icon_state = "Green lump" - apply_material_decorations = 0 - if(prob(10)) - apply_image_decorations = 1 - if(17) + else item_type = "irregular purple crystal" - additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.") icon_state = "Phazon" - apply_material_decorations = 0 - if(prob(10)) - apply_image_decorations = 1 - if(18) - new_item = new /obj/item/device/radio/beacon(src.loc) - talkative = 0 - new_item.icon_state = "unknown[rand(1,4)]" - new_item.icon = 'xenoarchaeology.dmi' - new_item.desc = "" - if(19) - new_item = new /obj/item/weapon/claymore(src.loc) - name = new_item.name - desc = new_item.desc - apply_material_decorations = 0 - if(20) - //arcane clothing - var/list/possible_spawns = list(/obj/item/clothing/head/culthood, - /obj/item/clothing/head/magus, - /obj/item/clothing/head/culthood/alt, - /obj/item/clothing/head/helmet/space/cult) + additional_desc = pick("It shines faintly as it catches the light.","It appears to have a faint inner glow.","It seems to draw you inward as you look it at.","Something twinkles faintly as you look at it.","It's mesmerizing to behold.") - var/new_type = pick(possible_spawns) - new_item = new new_type(src.loc) - del(src) - return - if(21) - //the dangerous stuff: low chance of turning up - var/list/possible_spawns = list(/obj/item/weapon/veilrender, - /obj/item/device/soulstone, - /obj/item/weapon/melee/cultblade) + apply_material_decorations = 0 + if(prob(10)) + apply_image_decorations = 1 + if(17) + //cultblade + new /obj/item/weapon/melee/cultblade(src.loc) + del(src) + return + if(18) + new_item = new /obj/item/device/radio/beacon(src.loc) + talkative = 0 + new_item.icon_state = "unknown[rand(1,4)]" + new_item.icon = 'xenoarchaeology.dmi' + new_item.desc = "" + if(19) + new_item = new /obj/item/weapon/claymore(src.loc) + name = new_item.name + desc = new_item.desc + apply_material_decorations = 0 + if(20) + //arcane clothing + var/list/possible_spawns = list(/obj/item/clothing/head/culthood, + /obj/item/clothing/head/magus, + /obj/item/clothing/head/culthood/alt, + /obj/item/clothing/head/helmet/space/cult) - var/new_type = pick(possible_spawns) - new_item = new new_type(src.loc) - del(src) - return - if(22) - new_item = new /obj/item/weapon/shard(src.loc) - del(src) - return - if(23) - new_item = new /obj/item/stack/rods(src.loc) - del(src) - return - if(24) - var/list/possible_spawns = list() - possible_spawns += typesof(/obj/item/weapon/stock_parts) - possible_spawns -= /obj/item/weapon/stock_parts - possible_spawns -= /obj/item/weapon/stock_parts/subspace + var/new_type = pick(possible_spawns) + new_item = new new_type(src.loc) + del(src) + return + if(21) + //soulstone + new_item = new /obj/item/device/soulstone(src.loc) + del(src) + return + if(22) + new_item = new /obj/item/weapon/shard(src.loc) + del(src) + return + if(23) + new_item = new /obj/item/stack/rods(src.loc) + del(src) + return + if(24) + var/list/possible_spawns = typesof(/obj/item/weapon/stock_parts) + possible_spawns -= /obj/item/weapon/stock_parts + possible_spawns -= /obj/item/weapon/stock_parts/subspace - var/new_type = pick(possible_spawns) - new_item = new new_type(src.loc) - del(src) - return - if(25) - new_item = new /obj/item/weapon/katana(src.loc) - name = new_item.name - desc = new_item.desc - apply_material_decorations = 0 + var/new_type = pick(possible_spawns) + new_item = new new_type(src.loc) + del(src) + return + if(25) + new_item = new /obj/item/weapon/katana(src.loc) + name = new_item.name + desc = new_item.desc + apply_material_decorations = 0 + if(26) + //energy gun + var/spawn_type = pick(\ + /obj/item/weapon/gun/energy/laser/practice;100,\ + /obj/item/weapon/gun/energy/laser;75,\ + /obj/item/weapon/gun/energy/xray;50,\ + /obj/item/weapon/gun/energy/laser/captain;25,\ + ) + var/obj/item/weapon/gun/energy/new_gun = new spawn_type(src.loc) + new_item = new_gun + new_item.icon_state = "egun[rand(1,6)]" - else if(prob(40)) - apply_image_decorations = 1 + //5% chance to explode when first fired + //10% chance to have an unchargeable cell + //15% chance to gain a random amount of starting energy, otherwise start with an empty cell + if(prob(5)) + new_gun.power_supply.rigged = 1 + if(prob(10)) + new_gun.power_supply.maxcharge = 0 + if(prob(15)) + new_gun.power_supply.charge = rand(0, new_gun.power_supply.maxcharge) + else + new_gun.power_supply.charge = 0 + + name = new_item.name + desc = new_item.desc + if(27) + //revolver + var/obj/item/weapon/gun/projectile/new_gun = new (src.loc) + new_item = new_gun + new_item.icon_state = "gun[rand(1,4)]" + + //33% chance to be able to reload the gun with human ammunition + if(prob(66)) + new_gun.caliber = "999" + + //33% chance to fill it with a random amount of bullets + new_gun.max_shells = rand(1,12) + if(prob(33)) + var/num_bullets = rand(1,new_gun.max_shells) + if(num_bullets < new_gun.loaded.len) + for(var/i = num_bullets, i <= new_gun.loaded.len, i++) + new_gun.loaded += new new_gun.ammo_type(src) + else + for(var/obj/item/I in new_gun) + if(new_gun.loaded.len > num_bullets) + if(I in new_gun.loaded) + new_gun.loaded.Remove(I) + I.loc = null + else + break + else + for(var/obj/item/I in new_gun) + if(I in new_gun.loaded) + new_gun.loaded.Remove(I) + I.loc = null + + name = new_item.name + desc = new_item.desc + if(28) + //completely unknown alien device + if(prob(40)) + apply_image_decorations = 0 + if(29) + //fossil bone/skull + new/obj/item/weapon/fossil/base(src.loc) + del(src) + return + if(30) + //fossil shell + new/obj/item/weapon/fossil/base(src.loc) + del(src) + return + if(30) + //fossil plant + new/obj/item/weapon/fossil/base(src.loc) + del(src) + return var/decorations = "" - source_material = pick("cordite","quadrinium","steel","titanium","aluminium","ferritic-alloy","plasteel","duranium") if(apply_material_decorations) + source_material = pick("cordite","quadrinium","steel","titanium","aluminium","ferritic-alloy","plasteel","duranium") desc = "A [material_descriptor ? "[material_descriptor] " : ""][item_type] made of [source_material], all craftsmanship is of [pick("the lowest","low","average","high","the highest")] quality." var/list/descriptors = list() if(prob(30)) - descriptors.Add("is encrusted with [pick("","synthetic ","multi-faceted ","uncut ","sparkling ") + pick("rubies","emeralds","diamonds","crystals","lapiz lazuli")]") + descriptors.Add("is encrusted with [pick("","synthetic ","multi-faceted ","uncut ","sparkling ") + pick("rubies","emeralds","diamonds","opals","lapiz lazuli")]") if(prob(30)) descriptors.Add("is studded with [pick("gold","silver","aluminium","titanium")]") if(prob(30)) @@ -378,16 +584,14 @@ new_item.listening_to_players = 1 if(prob(25)) new_item.speaking_to_players = 1 - spawn(100) - new_item.process_talking() + processing_objects.Add(src) del(src) else if(talkative) listening_to_players = 1 if(prob(25)) speaking_to_players = 1 - spawn(100) - process_talking() + processing_objects.Add(src) //legacy crystal /obj/item/weapon/crystal @@ -397,10 +601,6 @@ //large finds /* - /obj/item/clothing/suit/cultrobes - /obj/item/clothing/suit/cultrobes/alt - /obj/item/clothing/suit/magusred - /obj/item/clothing/suit/space/cult /obj/machinery/syndicate_beacon /obj/machinery/wish_granter if(18) @@ -417,4 +617,5 @@ apply_material_decorations = 0 if(prob(10)) apply_image_decorations = 1 - */ \ No newline at end of file + */ + //machinery type artifacts? \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/fossils.dm b/code/modules/research/xenoarchaeology/fossils.dm index 746a0beba3..9ee9ecba8b 100644 --- a/code/modules/research/xenoarchaeology/fossils.dm +++ b/code/modules/research/xenoarchaeology/fossils.dm @@ -10,8 +10,8 @@ /obj/item/weapon/fossil/base/New() spawn(0) - var/list/l = list("/obj/item/weapon/fossil/bone"=8,"/obj/item/weapon/fossil/skull"=2, - "/obj/item/weapon/fossil/skull/horned"=2,"/obj/item/weapon/fossil/shell"=1) + var/list/l = list("/obj/item/weapon/fossil/bone"=9,"/obj/item/weapon/fossil/skull"=3, + "/obj/item/weapon/fossil/skull/horned"=2) var/t = pickweight(l) new t(src.loc) del src @@ -21,20 +21,15 @@ icon_state = "bone" desc = "It's a fossilised bone." -/obj/item/weapon/fossil/shell - name = "Fossilised shell" - icon_state = "shell" - desc = "It's a fossilised shell." - -/obj/item/weapon/fossil/skull/horned - icon_state = "hskull" - desc = "It's a fossilised, horned skull." - /obj/item/weapon/fossil/skull name = "Fossilised skull" icon_state = "skull" desc = "It's a fossilised skull." +/obj/item/weapon/fossil/skull/horned + icon_state = "hskull" + desc = "It's a fossilised, horned skull." + /obj/item/weapon/fossil/skull/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/fossil/bone)) var/obj/o = new /obj/skeleton(get_turf(src)) @@ -53,6 +48,7 @@ var/bnum = 1 var/breq var/bstate = 0 + var/plaque_contents = "Unnamed alien creature" /obj/skeleton/New() src.breq = rand(6)+3 @@ -67,18 +63,38 @@ if(bnum==breq) usr = user icon_state = "skel" - var/creaturename = input("Input a name for your discovery:","Name your discovery","Spaceosaurus") src.bstate = 1 src.density = 1 - src.name = "[creaturename] skeleton" + src.name = "alien skeleton display" if(src.contents.Find(/obj/item/weapon/fossil/skull/horned)) - src.desc = "A creature made of [src.contents.len-1] assorted bones and a horned skull, the plaque reads [creaturename]." + src.desc = "A creature made of [src.contents.len-1] assorted bones and a horned skull. The plaque reads \'[plaque_contents]\'." else - src.desc = "A creature made of [src.contents.len-1] assorted bones and a skull, the plaque reads [creaturename]." + src.desc = "A creature made of [src.contents.len-1] assorted bones and a skull. The plaque reads \'[plaque_contents]\'." else src.desc = "Incomplete skeleton, looks like it could use [src.breq-src.bnum] more bones." user << "Looks like it could use [src.breq-src.bnum] more bones." else ..() + else if(istype(W,/obj/item/weapon/pen)) + plaque_contents = input("What would you like to write on the plaque:","Skeleton plaque","") + user.visible_message("[user] writes something on the base of [src].","You relabel the plaque on the base of \icon[src] [src].") + if(src.contents.Find(/obj/item/weapon/fossil/skull/horned)) + src.desc = "A creature made of [src.contents.len-1] assorted bones and a horned skull. The plaque reads \'[plaque_contents]\'." + else + src.desc = "A creature made of [src.contents.len-1] assorted bones and a skull. The plaque reads \'[plaque_contents]\'." else ..() + +//shells and plants do not make skeletons +/obj/item/weapon/fossil/shell + name = "Fossilised shell" + icon_state = "shell" + desc = "It's a fossilised shell." + +/obj/item/weapon/fossil/plant + name = "Fossilised plant" + icon_state = "plant1" + desc = "It's fossilised plant remains." + +/obj/item/weapon/fossil/plant/New() + icon_state = "plant[rand(1,4)]" diff --git a/code/modules/research/xenoarchaeology/talking_item.dm b/code/modules/research/xenoarchaeology/talking_item.dm index 8a0a7f168a..81f9831ed5 100644 --- a/code/modules/research/xenoarchaeology/talking_item.dm +++ b/code/modules/research/xenoarchaeology/talking_item.dm @@ -10,11 +10,12 @@ var/listening_to_players = 0 var/speaking_to_players = 0 -/obj/item/weapon/proc/process_talking(var/word = null) - if(prob(25) && world.timeofday >= lastsaid && heard_words.len >= 1) - SaySomething(word) - spawn(100) - process_talking() +/obj/item/weapon/process() + if(!speaking_to_players) + processing_objects.Remove(src) + return + if(prob(10) && world.timeofday >= lastsaid && heard_words.len >= 1) + SaySomething() /obj/item/weapon/proc/catchMessage(var/msg, var/mob/source) if(speaking_to_players)