diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 0e3234ed83..c17e6d1594 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -145,7 +145,10 @@ #define DEFAULT_TABLE_MATERIAL "plastic" #define DEFAULT_WALL_MATERIAL "steel" +#define MAT_IRON "iron" +#define MAT_MARBLE "marble" #define MAT_STEEL "steel" +#define MAT_PLASTIC "plastic" #define MAT_GLASS "glass" #define MAT_SILVER "silver" #define MAT_GOLD "gold" @@ -164,6 +167,13 @@ #define MAT_DURASTEEL "durasteel" #define MAT_DURASTEELHULL "durasteel hull" #define MAT_TITANIUMHULL "titanium hull" +#define MAT_VERDANTIUM "verdantium" +#define MAT_MORPHIUM "morphium" +#define MAT_MORPHIUMHULL "morphium hull" +#define MAT_VALHOLLIDE "valhollide" +#define MAT_LEAD "lead" +#define MAT_SUPERMATTER "supermatter" +#define MAT_METALHYDROGEN "mhydrogen" #define SHARD_SHARD "shard" #define SHARD_SHRAPNEL "shrapnel" diff --git a/code/__defines/research.dm b/code/__defines/research.dm index 9c3bec3066..b55f6601f8 100644 --- a/code/__defines/research.dm +++ b/code/__defines/research.dm @@ -11,6 +11,7 @@ #define TECH_DATA "programming" #define TECH_ILLEGAL "syndicate" #define TECH_ARCANE "arcane" +#define TECH_PRECURSOR "precursor" #define IMPRINTER 0x0001 //For circuits. Uses glass/chemicals. #define PROTOLATHE 0x0002 //New stuff. Uses glass/metal/chemicals diff --git a/code/__defines/xenoarcheaology.dm b/code/__defines/xenoarcheaology.dm index b8b781795f..45e40cfbde 100644 --- a/code/__defines/xenoarcheaology.dm +++ b/code/__defines/xenoarcheaology.dm @@ -34,7 +34,9 @@ #define ARCHAEO_REMAINS_XENO 34 #define ARCHAEO_GASMASK 35 #define ARCHAEO_ALIEN_ITEM 36 -#define MAX_ARCHAEO 36 +#define ARCHAEO_ALIEN_BOAT 37 +#define ARCHAEO_IMPERION_CIRCUIT 38 +#define MAX_ARCHAEO 38 #define DIGSITE_GARDEN 1 #define DIGSITE_ANIMAL 2 diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 493d5ccd38..8d31ecb9f4 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -555,6 +555,91 @@ rating = 3 matter = list(DEFAULT_WALL_MATERIAL = 80) +// Rating 4 - Anomaly + +/obj/item/weapon/stock_parts/capacitor/hyper + name = "hyper capacitor" + desc = "A hyper-capacity capacitor used in the construction of a variety of devices." + icon_state = "capacitor_hyper" + origin_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 80, MAT_GLASS = 40) + +/obj/item/weapon/stock_parts/scanning_module/hyper + name = "quantum scanning module" + desc = "A compact, near-perfect resolution quantum scanning module used in the construction of certain devices." + icon_state = "scan_module_hyper" + origin_tech = list(TECH_MAGNET = 6, TECH_BLUESPACE = 1, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 100,"glass" = 40) + +/obj/item/weapon/stock_parts/manipulator/hyper + name = "planck-manipulator" + desc = "A miniscule manipulator used in the construction of certain devices." + icon_state = "hyper_mani" + origin_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 30) + +/obj/item/weapon/stock_parts/micro_laser/hyper + name = "hyper-power micro-laser" + icon_state = "hyper_micro_laser" + desc = "A tiny laser used in certain devices." + origin_tech = list(TECH_MAGNET = 6, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 30, MAT_GLASS = 40) + +/obj/item/weapon/stock_parts/matter_bin/hyper + name = "hyper matter bin" + desc = "A container for holding compressed matter awaiting re-construction." + icon_state = "hyper_matter_bin" + origin_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 100) + +// Rating 5 - Precursor + +/obj/item/weapon/stock_parts/capacitor/omni + name = "omni-capacitor" + desc = "A capacitor of immense capacity used in the construction of a variety of devices." + icon_state = "capacitor_omni" + origin_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 80, MAT_GLASS = 40) + +/obj/item/weapon/stock_parts/scanning_module/omni + name = "omni-scanning module" + desc = "A compact, perfect resolution temporospatial scanning module used in the construction of certain devices." + icon_state = "scan_module_omni" + origin_tech = list(TECH_MAGNET = 7, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 100,"glass" = 40) + +/obj/item/weapon/stock_parts/manipulator/omni + name = "omni-manipulator" + desc = "A strange, infinitesimal manipulator used in the construction of certain devices." + icon_state = "omni_mani" + origin_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 30) + +/obj/item/weapon/stock_parts/micro_laser/omni + name = "omni-power micro-laser" + icon_state = "omni_micro_laser" + desc = "A strange laser used in certain devices." + origin_tech = list(TECH_MAGNET = 7, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 30, MAT_GLASS = 40) + +/obj/item/weapon/stock_parts/matter_bin/omni + name = "omni-matter bin" + desc = "A strange container for holding compressed matter awaiting re-construction." + icon_state = "omni_matter_bin" + origin_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 100) + + // Subspace stock parts /obj/item/weapon/stock_parts/subspace/ansible diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 0ce85959ef..c04760b4ef 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -304,7 +304,7 @@ storage_capacity[DEFAULT_WALL_MATERIAL] = mb_rating * 25000 storage_capacity["glass"] = mb_rating * 12500 build_time = 50 / man_rating - mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3 + mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.6. Maximum rating of parts is 5 /obj/machinery/autolathe/dismantle() for(var/mat in stored_material) diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm index cc982ce207..f60fcabbfa 100644 --- a/code/game/machinery/bioprinter.dm +++ b/code/game/machinery/bioprinter.dm @@ -19,6 +19,7 @@ var/base_print_delay = 100 // For Adminbus reasons var/printing var/loaded_dna //Blood sample for DNA hashing. + var/malfunctioning = FALSE // May cause rejection, or the printing of some alien limb instead! // These should be subtypes of /obj/item/organ // Costs roughly 20u Phoron (1 sheet) per internal organ, limbs are 60u for limb and extremity @@ -76,10 +77,19 @@ /obj/machinery/organ_printer/RefreshParts() // Print Delay updating print_delay = base_print_delay + var/manip_rating = 0 for(var/obj/item/weapon/stock_parts/manipulator/manip in component_parts) + manip_rating += manip.rating print_delay -= (manip.rating-1)*10 print_delay = max(0,print_delay) + manip_rating = round(manip_rating / 2) + + if(manip_rating >= 5) + malfunctioning = TRUE + else + malfunctioning = initial(malfunctioning) + . = ..() /obj/machinery/organ_printer/attack_hand(mob/user) @@ -182,7 +192,17 @@ O.set_dna(C.dna) O.species = C.species - if(istype(O, /obj/item/organ/external)) + var/malfunctioned = FALSE + + if(malfunctioning && prob(30)) // Alien Tech is a hell of a drug. + malfunctioned = TRUE + var/possible_species = list(SPECIES_HUMAN, SPECIES_VOX, SPECIES_SKRELL, SPECIES_ZADDAT, SPECIES_UNATHI, SPECIES_GOLEM, SPECIES_SHADOW) + var/new_species = pick(possible_species) + if(!all_species[new_species]) + new_species = SPECIES_HUMAN + O.species = all_species[new_species] + + if(istype(O, /obj/item/organ/external) && !malfunctioned) var/obj/item/organ/external/E = O E.sync_colour_to_human(C) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index e4818d0c79..c326574eeb 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -13,7 +13,8 @@ var/speed = 1 var/mat_efficiency = 1 - var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "diamond" = 0, "phoron" = 0, "uranium" = 0) + var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, MAT_PLASTEEL = 0, "gold" = 0, "silver" = 0, MAT_LEAD = 0, "osmium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, "phoron" = 0, "uranium" = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) + var/list/hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER) var/res_max_amount = 200000 var/datum/research/files @@ -75,7 +76,7 @@ var/T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating - mat_efficiency = 1 - (T - 1) / 4 // 1 -> 0.5 + mat_efficiency = max(1 - (T - 1) / 4, 0.2) // 1 -> 0.2 for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) // Not resetting T is intended; speed is affected by both T += M.rating speed = T / 2 // 1 -> 3 @@ -273,7 +274,13 @@ /obj/machinery/mecha_part_fabricator/proc/get_materials() . = list() for(var/T in materials) - . += list(list("mat" = capitalize(T), "amt" = materials[T])) + var/hidden_mat = FALSE + for(var/HM in hidden_materials) // Direct list contents comparison was failing. + if(T == HM && materials[T] == 0) + hidden_mat = TRUE + continue + if(!hidden_mat) + . += list(list("mat" = capitalize(T), "amt" = materials[T])) /obj/machinery/mecha_part_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything var/recursive = amount == -1 ? 1 : 0 diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm index e40db24878..d2d0b8b55f 100644 --- a/code/game/mecha/mech_prosthetics.dm +++ b/code/game/mecha/mech_prosthetics.dm @@ -13,7 +13,8 @@ var/speed = 1 var/mat_efficiency = 1 - var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "diamond" = 0, "phoron" = 0, "uranium" = 0, "plasteel" = 0) + var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, MAT_PLASTEEL = 0, "gold" = 0, "silver" = 0, MAT_LEAD = 0, "osmium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, "phoron" = 0, "uranium" = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0) + var/list/hidden_materials = list(MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM) var/res_max_amount = 200000 var/datum/research/files @@ -77,7 +78,7 @@ var/T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating - mat_efficiency = 1 - (T - 1) / 4 // 1 -> 0.5 + mat_efficiency = max(0.2, 1 - (T - 1) / 4) // 1 -> 0.2 for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) // Not resetting T is intended; speed is affected by both T += M.rating speed = T / 2 // 1 -> 3 @@ -299,7 +300,13 @@ /obj/machinery/pros_fabricator/proc/get_materials() . = list() for(var/T in materials) - . += list(list("mat" = capitalize(T), "amt" = materials[T])) + var/hidden_mat = FALSE + for(var/HM in hidden_materials) // Direct list contents comparison was failing. + if(T == HM && materials[T] == 0) + hidden_mat = TRUE + continue + if(!hidden_mat) + . += list(list("mat" = capitalize(T), "amt" = materials[T])) /obj/machinery/pros_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything var/recursive = amount == -1 ? 1 : 0 diff --git a/code/game/objects/items/weapons/circuitboards/mecha.dm b/code/game/objects/items/weapons/circuitboards/mecha.dm index 1415edea84..ed158a347b 100644 --- a/code/game/objects/items/weapons/circuitboards/mecha.dm +++ b/code/game/objects/items/weapons/circuitboards/mecha.dm @@ -79,5 +79,28 @@ name = T_BOARD_MECHA("Odysseus central control") icon_state = "mainboard" +/obj/item/weapon/circuitboard/mecha/imperion + name = "Alien Circuit" + origin_tech = list(TECH_DATA = 5, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + icon = 'icons/obj/abductor.dmi' + icon_state = "circuit" + +/obj/item/weapon/circuitboard/mecha/imperion/main + desc = "It is marked with a strange glyph." + +/obj/item/weapon/circuitboard/mecha/imperion/peripherals + desc = "It is marked with a pulsing glyph." + +/obj/item/weapon/circuitboard/mecha/imperion/targeting + desc = "It is marked with an ominous glyph." + +/obj/item/weapon/circuitboard/mecha/imperion/phasing + desc = "It is marked with a disturbing glyph." + +/obj/item/weapon/circuitboard/mecha/imperion/damaged + name = "Damaged Alien Circuit" + desc = "It is marked with a constantly shifting glyph." + origin_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 1, TECH_PRECURSOR = 2) + //Undef the macro, shouldn't be needed anywhere else #undef T_BOARD_MECHA diff --git a/code/game/objects/items/weapons/material/material_armor.dm b/code/game/objects/items/weapons/material/material_armor.dm index d8fba58175..d981cafc07 100644 --- a/code/game/objects/items/weapons/material/material_armor.dm +++ b/code/game/objects/items/weapons/material/material_armor.dm @@ -105,6 +105,31 @@ Protectiveness | Armor % if(!material) // No point checking for reflection. return ..() + if(material.negation && prob(material.negation)) // Strange and Alien materials, or just really strong materials. + user.visible_message("\The [src] completely absorbs [attack_text]!") + return TRUE + + if(material.spatial_instability && prob(material.spatial_instability)) + user.visible_message("\The [src] flashes [user] clear of [attack_text]!") + var/list/turfs = new/list() + for(var/turf/T in orange(round(material.spatial_instability / 10) + 1, user)) + if(istype(T,/turf/space)) continue + if(T.density) continue + if(T.x>world.maxx-6 || T.x<6) continue + if(T.y>world.maxy-6 || T.y<6) continue + turfs += T + if(!turfs.len) turfs += pick(/turf in orange(6)) + var/turf/picked = pick(turfs) + if(!isturf(picked)) return + + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, user.loc) + spark_system.start() + playsound(user.loc, 'sound/effects/teleport.ogg', 50, 1) + + user.loc = picked + return PROJECTILE_FORCE_MISS + if(material.reflectivity) if(istype(damage_source, /obj/item/projectile/energy) || istype(damage_source, /obj/item/projectile/beam)) var/obj/item/projectile/P = damage_source diff --git a/code/game/objects/structures/props/alien_props.dm b/code/game/objects/structures/props/alien_props.dm index 1eb811838e..38f0b1b893 100644 --- a/code/game/objects/structures/props/alien_props.dm +++ b/code/game/objects/structures/props/alien_props.dm @@ -114,4 +114,12 @@ for(var/i = 1 to rand(1, 4)) var/new_tech = pick(techs) techs -= new_tech - origin_tech[new_tech] = rand(5, 9) \ No newline at end of file + origin_tech[new_tech] = rand(5, 9) + + origin_tech[TECH_PRECURSOR] = rand(0,2) + +/obj/item/prop/alien/phasecoil + name = "reverberating device" + desc = "A device pulsing with an ominous energy." + icon_state = "circuit_phase" + origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 6, TECH_PHORON = 3, TECH_POWER = 5, TECH_MAGNET = 5, TECH_DATA = 5, TECH_PRECURSOR = 2, TECH_ARCANE = 1) diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index 232ef46e3e..f62356d83c 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -190,3 +190,7 @@ recipes += new/datum/stack_recipe("alien wood floor tile", /obj/item/stack/tile/wood/sif, 1, 4, 20) recipes -= new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20) recipes -= new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1) + +/material/supermatter/generate_recipes() + recipes = list() + recipes += new/datum/stack_recipe("supermatter shard", /obj/machinery/power/supermatter/shard, 30 , one_per_turf = 1, time = 600, on_floor = 1) diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 0b1daf10fa..1035c70eba 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -214,7 +214,101 @@ no_variants = FALSE /obj/item/stack/material/durasteel/hull - name = "MAT_DURASTEELHULL" + name = MAT_DURASTEELHULL + +/obj/item/stack/material/titanium + name = MAT_TITANIUM + icon_state = "sheet-silver" + item_state = "sheet-silver" + default_type = MAT_TITANIUM + no_variants = FALSE + +/obj/item/stack/material/titanium/hull + name = MAT_TITANIUMHULL + default_type = MAT_TITANIUMHULL + +// Particle Smasher and Exotic material. +/obj/item/stack/material/verdantium + name = MAT_VERDANTIUM + icon_state = "sheet-wavy" + item_state = "mhydrogen" + default_type = MAT_VERDANTIUM + no_variants = FALSE + apply_colour = TRUE + +/obj/item/stack/material/morphium + name = MAT_MORPHIUM + icon_state = "sheet-wavy" + item_state = "mhydrogen" + default_type = MAT_MORPHIUM + no_variants = FALSE + apply_colour = TRUE + +/obj/item/stack/material/morphium/hull + name = MAT_MORPHIUMHULL + default_type = MAT_MORPHIUMHULL + +/obj/item/stack/material/valhollide + name = MAT_VALHOLLIDE + icon_state = "sheet-gem" + item_state = "diamond" + default_type = MAT_VALHOLLIDE + no_variants = FALSE + apply_colour = TRUE + +// Forged in the equivalent of Hell, one piece at a time. +/obj/item/stack/material/supermatter + name = MAT_SUPERMATTER + icon_state = "sheet-super" + item_state = "diamond" + default_type = MAT_SUPERMATTER + apply_colour = TRUE + +/obj/item/stack/material/supermatter/proc/update_mass() // Due to how dangerous they can be, the item will get heavier and larger the more are in the stack. + slowdown = amount / 10 + w_class = min(5, round(amount / 10) + 1) + throw_range = round(amount / 7) + 1 + +/obj/item/stack/material/supermatter/use(var/used) + . = ..() + update_mass() + return + +/obj/item/stack/material/supermatter/attack_hand(mob/user) + update_mass() + radiation_repository.radiate(src, 5 + amount) + var/mob/living/M = user + if(!istype(M)) + return + + var/burn_user = TRUE + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + var/obj/item/clothing/gloves/G = H.gloves + if(istype(G) && ((G.flags & THICKMATERIAL && prob(70)) || istype(G, /obj/item/clothing/gloves/gauntlets))) + burn_user = FALSE + + if(burn_user) + H.visible_message("\The [src] flashes as it scorches [H]'s hands!") + H.apply_damage(amount / 2 + 5, BURN, "r_hand", used_weapon="Supermatter Chunk") + H.apply_damage(amount / 2 + 5, BURN, "l_hand", used_weapon="Supermatter Chunk") + H.drop_from_inventory(src, get_turf(H)) + return + + if(istype(user, /mob/living/silicon/robot)) + burn_user = FALSE + + if(burn_user) + M.apply_damage(amount, BURN, null, used_weapon="Supermatter Chunk") + +/obj/item/stack/material/supermatter/ex_act(severity) // An incredibly hard to manufacture material, SM chunks are unstable by their 'stabilized' nature. + if(prob((4 / severity) * 20)) + radiation_repository.radiate(get_turf(src), amount * 4) + explosion(get_turf(src),round(amount / 12) , round(amount / 6), round(amount / 3), round(amount / 25)) + qdel(src) + return + radiation_repository.radiate(get_turf(src), amount * 2) + ..() /obj/item/stack/material/wood name = "wooden plank" diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 6f55572ef9..b31c849563 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -105,6 +105,8 @@ var/list/name_to_material var/opacity = 1 // Is the material transparent? 0.5< makes transparent walls/doors. var/reflectivity = 0 // How reflective to light is the material? Currently used for laser reflection and defense. var/explosion_resistance = 5 // Only used by walls currently. + var/negation = 0 // Objects that respect this will randomly absorb impacts with this var as the percent chance. + var/spatial_instability = 0 // Objects that have trouble staying in the same physical space by sheer laws of nature have this. Percent for respecting items to cause teleportation. var/conductive = 1 // Objects with this var add CONDUCTS to flags on spawn. var/conductivity = null // How conductive the material is. Iron acts as the baseline, at 10. var/list/composite_material // If set, object matter var will be a list containing these values. @@ -293,6 +295,8 @@ var/list/name_to_material /material/supermatter name = "supermatter" icon_colour = "#FFFF00" + stack_type = /obj/item/stack/material/supermatter + shard_type = SHARD_SHARD radioactivity = 20 stack_type = null luminescence = 3 @@ -304,6 +308,7 @@ var/list/name_to_material sheet_singular_name = "crystal" sheet_plural_name = "crystals" is_fusion_fuel = 1 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 5, TECH_BLUESPACE = 4) /material/phoron name = "phoron" @@ -354,11 +359,14 @@ var/list/name_to_material name = "marble" icon_colour = "#AAAAAA" weight = 26 +<<<<<<< HEAD hardness = 30 //VOREStation Edit - Please. +======= + hardness = 70 +>>>>>>> 4ff3ee1... Merge pull request #6023 from Mechoid/Precursotech_Baseline integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system stack_type = /obj/item/stack/material/marble - /material/steel name = DEFAULT_WALL_MATERIAL stack_type = /obj/item/stack/material/steel @@ -455,8 +463,8 @@ var/list/name_to_material reflectivity = 0.9 /material/plasteel/titanium - name = "titanium" - stack_type = null + name = MAT_TITANIUM + stack_type = /obj/item/stack/material/titanium conductivity = 2.38 icon_base = "metal" door_icon_base = "metal" @@ -465,7 +473,7 @@ var/list/name_to_material /material/plasteel/titanium/hull name = MAT_TITANIUMHULL - stack_type = null + stack_type = /obj/item/stack/material/titanium/hull icon_base = "hull" icon_reinf = "reinf_mesh" @@ -686,7 +694,7 @@ var/list/name_to_material sheet_plural_name = "ingots" /material/lead - name = "lead" + name = MAT_LEAD stack_type = /obj/item/stack/material/lead icon_colour = "#273956" weight = 23 // Lead is a bit more dense than silver IRL, and silver has 22 ingame. @@ -695,6 +703,74 @@ var/list/name_to_material sheet_plural_name = "ingots" radiation_resistance = 25 // Lead is Special and so gets to block more radiation than it normally would with just weight, totalling in 48 protection. +// Particle Smasher and other exotic materials. + +/material/verdantium + name = MAT_VERDANTIUM + stack_type = /obj/item/stack/material/verdantium + icon_base = "metal" + door_icon_base = "metal" + icon_reinf = "reinf_metal" + icon_colour = "#4FE95A" + integrity = 80 + protectiveness = 15 + weight = 15 + hardness = 30 + shard_type = SHARD_SHARD + negation = 15 + conductivity = 60 + reflectivity = 0.3 + radiation_resistance = 5 + stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 5, TECH_BIO = 4) + sheet_singular_name = "sheet" + sheet_plural_name = "sheets" + +/material/morphium + name = MAT_MORPHIUM + stack_type = /obj/item/stack/material/morphium + icon_base = "metal" + door_icon_base = "metal" + icon_colour = "#37115A" + icon_reinf = "reinf_metal" + protectiveness = 60 + integrity = 300 + conductivity = 1.5 + hardness = 90 + shard_type = SHARD_SHARD + weight = 30 + negation = 25 + explosion_resistance = 85 + reflectivity = 0.2 + radiation_resistance = 10 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_ILLEGAL = 1, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_ARCANE = 1) + +/material/morphium/hull + name = MAT_MORPHIUMHULL + stack_type = /obj/item/stack/material/morphium/hull + icon_base = "hull" + icon_reinf = "reinf_mesh" + +/material/valhollide + name = MAT_VALHOLLIDE + stack_type = /obj/item/stack/material/valhollide + icon_base = "stone" + door_icon_base = "stone" + icon_reinf = "reinf_mesh" + icon_colour = "##FFF3B2" + protectiveness = 30 + integrity = 240 + weight = 30 + hardness = 45 + negation = 2 + conductivity = 5 + reflectivity = 0.5 + radiation_resistance = 20 + spatial_instability = 30 + stack_origin_tech = list(TECH_MATERIAL = 7, TECH_PHORON = 5, TECH_BLUESPACE = 5) + sheet_singular_name = "gem" + sheet_plural_name = "gems" + + // Adminspawn only, do not let anyone get this. /material/alienalloy name = "alienalloy" diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 5e28944ae0..08580c7f97 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -17,7 +17,7 @@ var/list/resource_field = list() var/obj/item/device/radio/intercom/faultreporter = new /obj/item/device/radio/intercom{channels=list("Supply")}(null) - var/ore_types = list( + var/list/ore_types = list( "hematite" = /obj/item/weapon/ore/iron, "uranium" = /obj/item/weapon/ore/uranium, "gold" = /obj/item/weapon/ore/gold, @@ -34,8 +34,20 @@ var/harvest_speed var/capacity var/charge_use + var/exotic_drilling var/obj/item/weapon/cell/cell = null + // Found with an advanced laser. exotic_drilling >= 1 + var/list/ore_types_uncommon = list( + MAT_MARBLE = /obj/item/weapon/ore/marble, + MAT_LEAD = /obj/item/weapon/ore/lead + ) + + // Found with an ultra laser. exotic_drilling >= 2 + var/list/ore_types_rare = list( + MAT_VERDANTIUM = /obj/item/weapon/ore/verdantium + ) + //Flags var/need_update_field = 0 var/need_player_check = 0 @@ -127,7 +139,7 @@ var/oretype = ore_types[metal] new oretype(src) - if(!found_resource) + if(!found_resource) // If a drill can't see an advanced material, it will destroy it while going through. harvesting.has_resources = 0 harvesting.resources = null resource_field -= harvesting @@ -219,6 +231,14 @@ for(var/obj/item/weapon/stock_parts/P in component_parts) if(istype(P, /obj/item/weapon/stock_parts/micro_laser)) harvest_speed = P.rating + exotic_drilling = P.rating - 1 + if(exotic_drilling >= 1) + ore_types |= ore_types_uncommon + if(exotic_drilling >= 2) + ore_types |= ore_types_rare + else + ore_types -= ore_types_uncommon + ore_types -= ore_types_rare if(istype(P, /obj/item/weapon/stock_parts/matter_bin)) capacity = 200 * P.rating if(istype(P, /obj/item/weapon/stock_parts/capacitor)) diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index 0df256c131..56f371fe91 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -18,7 +18,8 @@ "surface minerals" = 0, "precious metals" = 0, "nuclear fuel" = 0, - "exotic matter" = 0 + "exotic matter" = 0, + "anomalous matter" = 0 ) for(var/turf/simulated/T in range(2, get_turf(user))) @@ -30,10 +31,11 @@ var/ore_type switch(metal) - if("silicates", "carbon", "hematite") ore_type = "surface minerals" - if("gold", "silver", "diamond") ore_type = "precious metals" + if("silicates", "carbon", "hematite", "marble") ore_type = "surface minerals" + if("gold", "silver", "diamond", "lead") ore_type = "precious metals" if("uranium") ore_type = "nuclear fuel" if("phoron", "osmium", "hydrogen") ore_type = "exotic matter" + if("verdantium") ore_type = "anomalous matter" if(ore_type) metals[ore_type] += T.resources[metal] diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 3f76672610..ec3bfad9cb 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -174,7 +174,8 @@ "uranium" = 30, "diamond" = 50, "platinum" = 40, - "mhydrogen" = 40) + "mhydrogen" = 40, + "verdantium" = 60) /obj/machinery/mineral/processing_unit/New() ..() diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index ae388a717d..09752b74ed 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -46,7 +46,9 @@ var/list/mining_overlay_cache = list() "osmium" = /obj/item/weapon/ore/osmium, "hydrogen" = /obj/item/weapon/ore/hydrogen, "silicates" = /obj/item/weapon/ore/glass, - "carbon" = /obj/item/weapon/ore/coal + "carbon" = /obj/item/weapon/ore/coal, + "verdantium" = /obj/item/weapon/ore/verdantium, + "marble" = /obj/item/weapon/ore/marble ) has_resources = 1 @@ -608,10 +610,10 @@ var/list/mining_overlay_cache = list() var/mineral_name if(rare_ore) - mineral_name = pickweight(list("uranium" = 10, "platinum" = 10, "hematite" = 20, "carbon" = 20, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20)) + mineral_name = pickweight(list("marble" = 5, "uranium" = 10, "platinum" = 10, "hematite" = 20, "carbon" = 20, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 5, "verdantium" = 1)) else - mineral_name = pickweight(list("uranium" = 5, "platinum" = 5, "hematite" = 35, "carbon" = 35, "diamond" = 1, "gold" = 5, "silver" = 5, "phoron" = 10)) + mineral_name = pickweight(list("marble" = 3, "uranium" = 10, "platinum" = 10, "hematite" = 70, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 2, "verdantium" = 1)) if(mineral_name && (mineral_name in ore_data)) mineral = ore_data[mineral_name] diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index e531e5208f..099ce46ba5 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -24,6 +24,12 @@ origin_tech = list(TECH_MATERIAL = 1) material = "carbon" +/obj/item/weapon/ore/marble + name = "recrystallized carbonate" + icon_state = "ore_marble" + origin_tech = list(TECH_MATERIAL = 1) + material = "carbon" + /obj/item/weapon/ore/glass name = "sand" icon_state = "ore_glass" @@ -77,6 +83,29 @@ icon_state = "ore_hydrogen" material = "mhydrogen" +/obj/item/weapon/ore/verdantium + name = "verdantite dust" + icon_state = "ore_verdantium" + material = MAT_VERDANTIUM + origin_tech = list(TECH_MATERIAL = 7) + +// POCKET ... Crystal dust. +/obj/item/weapon/ore/verdantium/throw_impact(atom/hit_atom) + ..() + var/mob/living/carbon/human/H = hit_atom + if(istype(H) && H.has_eyes() && prob(85)) + H << "Some of \the [src] gets in your eyes!" + H.Blind(10) + H.eye_blurry += 15 + spawn(1) + if(istype(loc, /turf/)) qdel(src) + +/obj/item/weapon/ore/lead + name = "lead glance" + icon_state = "ore_lead" + material = MAT_LEAD + origin_tech = list(TECH_MATERIAL = 3) + /obj/item/weapon/ore/slag name = "Slag" desc = "Someone screwed up..." diff --git a/code/modules/mining/ore_datum.dm b/code/modules/mining/ore_datum.dm index a3528eb55b..da97a26873 100644 --- a/code/modules/mining/ore_datum.dm +++ b/code/modules/mining/ore_datum.dm @@ -132,4 +132,34 @@ var/global/list/ore_data = list() display_name = "metallic hydrogen" smelts_to = "tritium" compresses_to = "mhydrogen" + scan_icon = "mineral_rare" + +/ore/verdantium + name = MAT_VERDANTIUM + display_name = "crystalline verdantite" + compresses_to = MAT_VERDANTIUM + result_amount = 2 + spread_chance = 5 + scan_icon = "mineral_rare" + xarch_ages = list( + "billion" = 13, + "billion_lower" = 10 + ) + +/ore/marble + name = MAT_MARBLE + display_name = "recrystallized carbonate" + compresses_to = "marble" + result_amount = 1 + spread_chance = 10 + ore = /obj/item/weapon/ore/marble + scan_icon = "mineral_common" + +/ore/lead + name = MAT_LEAD + display_name = "lead glance" + compresses_to = "marble" + result_amount = 1 + spread_chance = 10 + ore = /obj/item/weapon/ore/marble scan_icon = "mineral_rare" \ No newline at end of file diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 888d75ea6f..c49c605598 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -29,4 +29,25 @@ "You unsecure the [src.name] from the floor.", \ "You hear a ratchet.") return + if(W.is_screwdriver()) + panel_open = !panel_open + playsound(loc, W.usesound, 50, 1) + visible_message("\The [user] adjusts \the [src]'s mechanisms.") + if(panel_open && do_after(user, 30)) + to_chat(user, "\The [src] looks like it could be modified.") + if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity) + playsound(loc, W.usesound, 50, 1) + to_chat(user, "\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow..") + else + to_chat(user, "\The [src]'s mechanisms look secure.") + if(istype(W, /obj/item/weapon/smes_coil/super_io) && panel_open) + visible_message("\The [user] begins to modify \the [src] with \the [W].") + if(do_after(user, 300)) + user.drop_from_inventory(W) + visible_message("\The [user] installs \the [W] onto \the [src].") + qdel(W) + var/turf/T = get_turf(src) + var/new_machine = /obj/machinery/particle_smasher + new new_machine(T) + qdel(src) return ..() diff --git a/code/modules/power/singularity/particle_accelerator/particle.dm b/code/modules/power/singularity/particle_accelerator/particle.dm index 3b5992e4e4..2c3e99318d 100644 --- a/code/modules/power/singularity/particle_accelerator/particle.dm +++ b/code/modules/power/singularity/particle_accelerator/particle.dm @@ -44,7 +44,7 @@ if (A) if(ismob(A)) toxmob(A) - if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/))) + if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/))||(istype(A, /obj/machinery/particle_smasher))) A:energy += energy //R-UST port else if(istype(A,/obj/machinery/power/fusion_core)) diff --git a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm new file mode 100644 index 0000000000..a9fca3e160 --- /dev/null +++ b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm @@ -0,0 +1,365 @@ +/* + * Contains the particle smasher and its recipes. + */ + +/obj/machinery/particle_smasher + name = "Particle Focus" + desc = "A strange device used to create exotic matter." + icon = 'icons/obj/machines/particle_smasher.dmi' + icon_state = "smasher" + anchored = 0 + density = 1 + use_power = 0 + + var/successful_craft = FALSE // Are we waiting to be emptied? + var/image/material_layer // Holds the image used for the filled overlay. + var/image/material_glow // Holds the image used for the glow overlay. + var/image/reagent_layer // Holds the image used for showing a contained beaker. + var/energy = 0 // How many 'energy' units does this have? Acquired by a Particle Accelerator like a Singularity. + var/max_energy = 600 + var/obj/item/stack/material/target // The material being bombarded. + var/obj/item/weapon/reagent_containers/reagent_container // Holds the beaker. The process will consume ALL reagents inside it. + var/beaker_type = /obj/item/weapon/reagent_containers/glass/beaker + var/list/storage // Holds references to items allowed to be used in the fabrication phase. + var/max_storage = 3 // How many items can be jammed into it? + var/list/recipes // The list containing the Particle Smasher's recipes. + +/obj/machinery/particle_smasher/Initialize() + ..() + storage = list() + update_icon() + prepare_recipes() + +/obj/machinery/particle_smasher/Destroy() + for(var/datum/recipe/particle_smasher/D in recipes) + qdel(D) + recipes.Cut() + ..() + +/obj/machinery/particle_smasher/examine(mob/user) + ..() + if(user in view(1)) + to_chat(user, "\The [src] contains:") + for(var/obj/item/I in contents) + to_chat(user, "\the [I]") + +/obj/machinery/particle_smasher/attackby(obj/item/W as obj, mob/user as mob) + if(W.type == /obj/item/device/analyzer) + to_chat(user, "\The [src] reads an energy level of [energy].") + else if(istype(W, /obj/item/stack/material)) + var/obj/item/stack/material/M = W + if(M.uses_charge) + to_chat(user, "You cannot fill \the [src] with a synthesizer!") + return + target = M.split(1) + target.forceMove(src) + update_icon() + else if(istype(W, beaker_type)) + if(reagent_container) + to_chat(user, "\The [src] already has a container attached.") + return + if(isrobot(user) && istype(W.loc, /obj/item/weapon/gripper)) + var/obj/item/weapon/gripper/G = W.loc + G.drop_item() + else + user.drop_from_inventory(W) + reagent_container = W + reagent_container.forceMove(src) + to_chat(user, "You add \the [reagent_container] to \the [src].") + update_icon() + return + else if(W.is_wrench()) + anchored = !anchored + playsound(src, W.usesound, 75, 1) + if(anchored) + user.visible_message("[user.name] secures [src.name] to the floor.", \ + "You secure the [src.name] to the floor.", \ + "You hear a ratchet.") + else + user.visible_message("[user.name] unsecures [src.name] from the floor.", \ + "You unsecure the [src.name] from the floor.", \ + "You hear a ratchet.") + update_icon() + return + else if(istype(W, /obj/item/weapon/card/id)) + to_chat(user, "Swiping \the [W] on \the [src] doesn't seem to do anything...") + return ..() + else if(((isrobot(user) && istype(W.loc, /obj/item/weapon/gripper)) || (!isrobot(user) && W.canremove)) && storage.len < max_storage) + if(isrobot(user) && istype(W.loc, /obj/item/weapon/gripper)) + var/obj/item/weapon/gripper/G = W.loc + G.drop_item() + else + user.drop_from_inventory(W) + W.forceMove(src) + storage += W + else + return ..() + +/obj/machinery/particle_smasher/update_icon() + cut_overlays() + if(!material_layer) + material_layer = image(icon, "[initial(icon_state)]-material") + if(!material_glow) + material_glow = image(icon, "[initial(icon_state)]-material-glow") + material_glow.plane = PLANE_LIGHTING_ABOVE + if(!reagent_layer) + reagent_layer = image(icon, "[initial(icon_state)]-reagent") + if(anchored) + icon_state = "[initial(icon_state)]-o" + if(target) + material_layer.color = target.material.icon_colour + add_overlay(material_layer) + if(successful_craft) + material_glow.color = target.material.icon_colour + add_overlay(material_glow) + if(reagent_container) + add_overlay(reagent_layer) + else + icon_state = initial(icon_state) + + if(target && energy) + var/power_percent = round((energy / max_energy) * 100) + light_color = target.material.icon_colour + switch(power_percent) + if(0 to 25) + light_range = 1 + if(26 to 50) + light_range = 2 + if(51 to 75) + light_range = 3 + if(76 to INFINITY) + light_range = 4 + set_light(light_range, 2, light_color) + else + set_light(0, 0, "#FFFFFF") + +/obj/machinery/particle_smasher/bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj, /obj/item/projectile/beam)) + if(Proj.damage >= 50) + TryCraft() + return 0 + +/obj/machinery/particle_smasher/process() + if(!src.anchored) // Rapidly loses focus. + if(energy) + radiation_repository.radiate(src, round(((src.energy-150)/50)*5,1)) + energy = max(0, energy - 30) + update_icon() + return + + if(energy) + radiation_repository.radiate(src, round(((src.energy-150)/50)*5,1)) + energy = CLAMP(energy - 5, 0, max_energy) + + return + +/obj/machinery/particle_smasher/proc/prepare_recipes() + if(!recipes) + recipes = list() + for(var/D in subtypesof(/datum/recipe/particle_smasher)) + recipes += new D + else + for(var/datum/recipe/particle_smasher/D in recipes) + qdel(D) + recipes.Cut() + for(var/D in subtypesof(/datum/recipe/particle_smasher)) + recipes += new D + +/obj/machinery/particle_smasher/proc/TryCraft() + + if(!recipes || !recipes.len) + recipes = typesof(/datum/recipe/particle_smasher) + + if(!target) // You are just blasting an empty machine. + visible_message("\The [src] shudders.") + update_icon() + return + + if(successful_craft) + visible_message("\The [src] fizzles.") + if(prob(33)) // Why are you blasting it after it's already done! + radiation_repository.radiate(src, 10 + round(src.energy / 60, 1)) + energy = max(0, energy - 30) + update_icon() + return + + var/list/possible_recipes = list() + var/max_prob = 0 + for(var/datum/recipe/particle_smasher/R in recipes) // Only things for the smasher. Don't get things like the chef's cake recipes. + if(R.probability) // It's actually a recipe you're supposed to be able to make. + if(istype(target, R.required_material)) + if(energy >= R.required_energy_min && energy <= R.required_energy_max) // The machine has enough Vaguely Defined 'Energy'. + var/turf/T = get_turf(src) + var/datum/gas_mixture/environment = T.return_air() + if(environment.temperature >= R.required_atmos_temp_min && environment.temperature <= R.required_atmos_temp_max) // Too hot, or too cold. + if(R.reagents && R.reagents.len) + if(!reagent_container || R.check_reagents(reagent_container.reagents) == -1) // It doesn't have a reagent storage when it needs it, or it's lacking what is needed. + continue + if(R.items && R.items.len) + if(!(storage && storage.len) || R.check_items(src) == -1) // It's empty, or it doesn't contain what is needed. + continue + possible_recipes += R + max_prob += R.probability + + if(possible_recipes.len) + var/local_prob = rand(0, max_prob - 1)%max_prob + var/cumulative = 0 + for(var/datum/recipe/particle_smasher/R in possible_recipes) + cumulative += R.probability + if(local_prob < cumulative) + successful_craft = TRUE + DoCraft(R) + break + update_icon() + +/obj/machinery/particle_smasher/proc/DoCraft(var/datum/recipe/particle_smasher/recipe) + if(!successful_craft || !recipe) + return + + qdel(target) + target = null + + if(reagent_container) + reagent_container.reagents.clear_reagents() + + if(recipe.items && recipe.items.len) + for(var/obj/item/I in storage) + for(var/item_type in recipe.items) + if(istype(I, item_type)) + storage -= I + qdel(I) + break + + var/result = recipe.result + var/obj/item/stack/material/M = new result(src) + target = M + update_icon() + +/obj/machinery/particle_smasher/verb/eject_contents() + set src in view(1) + set category = "Object" + set name = "Eject Particle Focus Contents" + + if(usr.incapacitated()) + return + + DumpContents() + +/obj/machinery/particle_smasher/proc/DumpContents() + target = null + reagent_container = null + successful_craft = FALSE + var/turf/T = get_turf(src) + for(var/obj/item/I in contents) + if(I in storage) + storage -= I + I.forceMove(T) + update_icon() + +/* + * The special recipe datums used for the particle smasher. + */ + +/datum/recipe/particle_smasher + //reagents //Commented out due to inheritance. Still a list, used as ex: // example: = list("pacid" = 5) + //items //Commented out due to inheritance. Still a list, used as ex: // example: = list(/obj/item/weapon/tool/crowbar, /obj/item/weapon/welder) Place /foo/bar before /foo. Do not include fruit. Maximum of 3 items. + + result = /obj/item/stack/material/iron // The sheet this will produce. + var/required_material = /obj/item/stack/material/iron // The required material sheet. + var/required_energy_min = 0 // The minimum energy this recipe can process at. + var/required_energy_max = 600 // The maximum energy this recipe can process at. + var/required_atmos_temp_min = 0 // The minimum ambient atmospheric temperature required, in kelvin. + var/required_atmos_temp_max = 600 // The maximum ambient atmospheric temperature required, in kelvin. + var/probability = 0 // The probability for the recipe to be produced. 0 will make it impossible. + +/datum/recipe/particle_smasher/check_items(var/obj/container as obj) + . = 1 + if (items && items.len) + var/list/checklist = list() + checklist = items.Copy() // You should really trust Copy + if(istype(container, /obj/machinery/particle_smasher)) + var/obj/machinery/particle_smasher/machine = container + for(var/obj/O in machine.storage) + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown)) + continue // Fruit is handled in check_fruit(). + var/found = 0 + for(var/i = 1; i < checklist.len+1; i++) + var/item_type = checklist[i] + if (istype(O,item_type)) + checklist.Cut(i, i+1) + found = 1 + break + if (!found) + . = 0 + if (checklist.len) + . = -1 + return . + +/datum/recipe/particle_smasher/deuterium_tritium + reagents = list("hydrogen" = 15) + + result = /obj/item/stack/material/tritium + required_material = /obj/item/stack/material/deuterium + + required_energy_min = 200 + required_energy_max = 400 + + required_atmos_temp_max = 200 + probability = 30 + +/datum/recipe/particle_smasher/verdantium_morphium + result = /obj/item/stack/material/morphium + required_material = /obj/item/stack/material/verdantium + + required_energy_min = 400 + required_energy_max = 500 + probability = 20 + +/datum/recipe/particle_smasher/plasteel_morphium + items = list(/obj/item/prop/alien/junk) + + result = /obj/item/stack/material/morphium + required_material = /obj/item/stack/material/plasteel + + required_energy_min = 100 + required_energy_max = 300 + probability = 10 + +/datum/recipe/particle_smasher/osmium_lead + reagents = list("tungsten" = 10) + + result = /obj/item/stack/material/lead + required_material = /obj/item/stack/material/osmium + + required_energy_min = 200 + required_energy_max = 400 + + required_atmos_temp_min = 1000 + required_atmos_temp_max = 8000 + probability = 50 + +/datum/recipe/particle_smasher/phoron_valhollide + reagents = list("phoron" = 10, "pacid" = 10) + + result = /obj/item/stack/material/valhollide + required_material = /obj/item/stack/material/phoron + + required_energy_min = 300 + required_energy_max = 500 + + required_atmos_temp_min = 1 + required_atmos_temp_max = 100 + probability = 10 + +/datum/recipe/particle_smasher/valhollide_supermatter + reagents = list("phoron" = 300) + + result = /obj/item/stack/material/supermatter + required_material = /obj/item/stack/material/valhollide + + required_energy_min = 575 + required_energy_max = 600 + + required_atmos_temp_min = 3000 + required_atmos_temp_max = 10000 + probability = 1 \ No newline at end of file diff --git a/code/modules/random_map/noise/ore.dm b/code/modules/random_map/noise/ore.dm index 697a0b416d..99dc761ee6 100644 --- a/code/modules/random_map/noise/ore.dm +++ b/code/modules/random_map/noise/ore.dm @@ -57,25 +57,34 @@ T.resources["gold"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources["silver"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources["marble"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) T.resources["diamond"] = 0 T.resources["phoron"] = 0 T.resources["osmium"] = 0 T.resources["hydrogen"] = 0 + T.resources["verdantium"] = 0 + T.resources["lead"] = 0 else if(current_cell < deep_val) // Rare metals. T.resources["gold"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["silver"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["uranium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["phoron"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["osmium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources["verdantium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources["lead"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) T.resources["hydrogen"] = 0 T.resources["diamond"] = 0 T.resources["hematite"] = 0 + T.resources["marble"] = 0 else // Deep metals. T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources["diamond"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources["verdantium"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) T.resources["phoron"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) T.resources["osmium"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) T.resources["hydrogen"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources["marble"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) + T.resources["lead"] = rand(RESOURCE_LOW_MIN, RESOURCE_HIGH_MAX) T.resources["hematite"] = 0 T.resources["gold"] = 0 T.resources["silver"] = 0 diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 70ca9692f3..9d3eab7c43 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -16,7 +16,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). var/mat_efficiency = 1 var/speed = 1 - materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0) + materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, MAT_PLASTEEL = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, MAT_LEAD = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) + + hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER) use_power = 1 idle_power_usage = 30 @@ -68,7 +70,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating - mat_efficiency = 1 - (T - 1) / 4 + mat_efficiency = max(1 - (T - 1) / 4, 0.2) speed = T /obj/machinery/r_n_d/circuit_imprinter/update_icon() diff --git a/code/modules/research/designs/precursor.dm b/code/modules/research/designs/precursor.dm new file mode 100644 index 0000000000..41284c64ef --- /dev/null +++ b/code/modules/research/designs/precursor.dm @@ -0,0 +1,25 @@ +/* + * Contains Precursor and Anomalous designs for the Protolathe. + */ + +/datum/design/item/precursor/AssembleDesignName() + ..() + name = "Alien prototype ([item_name])" + +/datum/design/item/precursor/AssembleDesignDesc() + if(!desc) + if(build_path) + var/obj/item/I = build_path + desc = initial(I.desc) + ..() + +/datum/design/item/anomaly/AssembleDesignName() + ..() + name = "Anomalous prototype ([item_name])" + +/datum/design/item/anomaly/AssembleDesignDesc() + if(!desc) + if(build_path) + var/obj/item/I = build_path + desc = initial(I.desc) + ..() \ No newline at end of file diff --git a/code/modules/research/designs/stock_parts.dm b/code/modules/research/designs/stock_parts.dm index fb629e7ad7..60a0abb63e 100644 --- a/code/modules/research/designs/stock_parts.dm +++ b/code/modules/research/designs/stock_parts.dm @@ -34,6 +34,20 @@ build_path = /obj/item/weapon/stock_parts/capacitor/super sort_string = "CAAAC" +/datum/design/item/stock_part/hyper_capacitor + id = "hyper_capacitor" + req_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1) + materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_GLASS = 100, MAT_VERDANTIUM = 30, MAT_DURASTEEL = 25) + build_path = /obj/item/weapon/stock_parts/capacitor/hyper + sort_string = "CAAAD" + +/datum/design/item/stock_part/omni_capacitor + id = "omni_capacitor" + req_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_DIAMOND = 1000, MAT_GLASS = 1000, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/capacitor/omni + sort_string = "CAAAE" + /datum/design/item/stock_part/micro_mani id = "micro_mani" req_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1) @@ -55,6 +69,20 @@ build_path = /obj/item/weapon/stock_parts/manipulator/pico sort_string = "CAABC" +/datum/design/item/stock_part/hyper_mani + id = "hyper_mani" + req_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 2) + materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_VERDANTIUM = 50, MAT_DURASTEEL = 50) + build_path = /obj/item/weapon/stock_parts/manipulator/hyper + sort_string = "CAABD" + +/datum/design/item/stock_part/omni_mani + id = "omni_mani" + req_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 2) + materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_PLASTEEL = 500, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/manipulator/omni + sort_string = "CAABE" + /datum/design/item/stock_part/basic_matter_bin id = "basic_matter_bin" req_tech = list(TECH_MATERIAL = 1) @@ -76,6 +104,20 @@ build_path = /obj/item/weapon/stock_parts/matter_bin/super sort_string = "CAACC" +/datum/design/item/stock_part/hyper_matter_bin + id = "hyper_matter_bin" + req_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 2) + materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_VERDANTIUM = 60, MAT_DURASTEEL = 75) + build_path = /obj/item/weapon/stock_parts/matter_bin/hyper + sort_string = "CAACD" + +/datum/design/item/stock_part/omni_matter_bin + id = "omni_matter_bin" + req_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 2) + materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_PLASTEEL = 100, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/matter_bin/omni + sort_string = "CAACE" + /datum/design/item/stock_part/basic_micro_laser id = "basic_micro_laser" req_tech = list(TECH_MAGNET = 1) @@ -97,6 +139,20 @@ build_path = /obj/item/weapon/stock_parts/micro_laser/ultra sort_string = "CAADC" +/datum/design/item/stock_part/hyper_micro_laser + id = "hyper_micro_laser" + req_tech = list(TECH_MAGNET = 6, TECH_MATERIAL = 6, TECH_ARCANE = 2) + materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_GLASS = 20, MAT_URANIUM = 30, MAT_VERDANTIUM = 50, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/micro_laser/hyper + sort_string = "CAADD" + +/datum/design/item/stock_part/omni_micro_laser + id = "omni_micro_laser" + req_tech = list(TECH_MAGNET = 7, TECH_MATERIAL = 7, TECH_PRECURSOR = 2) + materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_GLASS = 500, MAT_URANIUM = 2000, MAT_MORPHIUM = 50, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/micro_laser/omni + sort_string = "CAADE" + /datum/design/item/stock_part/basic_sensor id = "basic_sensor" req_tech = list(TECH_MAGNET = 1) @@ -118,6 +174,20 @@ build_path = /obj/item/weapon/stock_parts/scanning_module/phasic sort_string = "CAAEC" +/datum/design/item/stock_part/hyper_sensor + id = "hyper_sensor" + req_tech = list(TECH_MAGNET = 6, TECH_MATERIAL = 4, TECH_ARCANE = 1) + materials = list(DEFAULT_WALL_MATERIAL = 50, MAT_GLASS = 20, MAT_SILVER = 50, MAT_VERDANTIUM = 40, MAT_DURASTEEL = 50) + build_path = /obj/item/weapon/stock_parts/scanning_module/hyper + sort_string = "CAAED" + +/datum/design/item/stock_part/omni_sensor + id = "omni_sensor" + req_tech = list(TECH_MAGNET = 7, TECH_MATERIAL = 5, TECH_PRECURSOR = 1) + materials = list(DEFAULT_WALL_MATERIAL = 1000, MAT_PLASTEEL = 500, MAT_GLASS = 750, MAT_SILVER = 500, MAT_MORPHIUM = 60, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/scanning_module/omni + sort_string = "CAAEE" + /datum/design/item/stock_part/subspace_ansible id = "s-ansible" req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index bea555b70c..b8b4130dfe 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -15,7 +15,9 @@ var/mat_efficiency = 1 var/speed = 1 - materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0) + materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, MAT_PLASTEEL = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, MAT_LEAD = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) + + hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER) /obj/machinery/r_n_d/protolathe/Initialize() . = ..() @@ -71,7 +73,7 @@ T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating - mat_efficiency = 1 - (T - 2) / 8 + mat_efficiency = max(1 - (T - 2) / 8, 0.2) speed = T / 2 /obj/machinery/r_n_d/protolathe/dismantle() @@ -207,28 +209,17 @@ /obj/machinery/r_n_d/protolathe/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything var/recursive = amount == -1 ? 1 : 0 material = lowertext(material) - var/mattype - switch(material) - if(DEFAULT_WALL_MATERIAL) - mattype = /obj/item/stack/material/steel - if("glass") - mattype = /obj/item/stack/material/glass - if("plastic") - mattype = /obj/item/stack/material/plastic - if("gold") - mattype = /obj/item/stack/material/gold - if("silver") - mattype = /obj/item/stack/material/silver - if("osmium") - mattype = /obj/item/stack/material/osmium - if("diamond") - mattype = /obj/item/stack/material/diamond - if("phoron") - mattype = /obj/item/stack/material/phoron - if("uranium") - mattype = /obj/item/stack/material/uranium - else - return + var/obj/item/stack/material/mattype + var/material/MAT = get_material_by_name(material) + + if(!MAT) + return + + mattype = MAT.stack_type + + if(!mattype) + return + var/obj/item/stack/material/S = new mattype(loc) if(amount <= 0) amount = S.max_amount diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 38cba96c84..5346f50e6e 100755 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -660,6 +660,13 @@ won't update every console in existence) but it's more of a hassle to do. Also, dat += "