diff --git a/code/__defines/materials.dm b/code/__defines/materials.dm index 2f09f19fe4..5f11c5b4b3 100644 --- a/code/__defines/materials.dm +++ b/code/__defines/materials.dm @@ -103,6 +103,7 @@ #define MATERIAL_UNMELTABLE 0x1 #define MATERIAL_BRITTLE 0x2 #define MATERIAL_PADDING 0x4 +#define MATERIAL_NO_SYNTH 0x8 #define TABLE_BRITTLE_MATERIAL_MULTIPLIER 4 // Amount table damage is multiplied by if it is made of a brittle material (e.g. glass) diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm index 06184c1978..b81fc31184 100644 --- a/code/game/machinery/partslathe_vr.dm +++ b/code/game/machinery/partslathe_vr.dm @@ -123,7 +123,7 @@ if(!istype(S)) return 0 if(!(S.material.name in materials)) - to_chat(user, span_warning("The [src] doesn't accept [S.material]!")) + to_chat(user, span_warning("The [src] doesn't accept [material_display_name(S.material)]!")) return 1 if(S.get_amount() < 1) return 1 // Does this even happen? Sanity check I guess. diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 9adf769226..48a224af5e 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -51,7 +51,9 @@ MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, - MAT_SUPERMATTER = 0) + MAT_SUPERMATTER = 0, + MAT_TITANIUM = 0) + var/res_max_amount = 200000 var/datum/research/files @@ -87,13 +89,6 @@ /obj/machinery/mecha_part_fabricator/Initialize(mapload) . = ..() -// Go through all materials, and add them to the possible storage, but hide them unless we contain them. - for(var/Name in name_to_material) - if(Name in materials) - continue - - materials[Name] = 0 - default_apply_parts() files = new /datum/research(src) //Setup the research data holder. @@ -643,7 +638,7 @@ if(istype(I,/obj/item/stack/material)) var/obj/item/stack/material/S = I if(!(S.material.name in materials)) - to_chat(user, span_warning("The [src] doesn't accept [S.material]!")) + to_chat(user, span_warning("The [src] doesn't accept [material_display_name(S.material)]!")) return var/sname = "[S.name]" diff --git a/code/game/objects/items/weapons/RMS.dm b/code/game/objects/items/weapons/RMS.dm index d162a3e5e2..d2791fd992 100644 --- a/code/game/objects/items/weapons/RMS.dm +++ b/code/game/objects/items/weapons/RMS.dm @@ -191,11 +191,15 @@ var/list/RMS_random_malfunction = list(/obj/item/fbp_backup_cell, /obj/item/stack/material/morphium // Include if you enable in the .dme /obj/item/stack/material/debug ) + possible_object_paths -= banned_sheet_materials var/obj/item/stack/new_metal = /obj/item/stack/material/supermatter for(var/x=1;x<=10;x++) //You got 10 chances to hit a metal that is NOT banned. - var/picked_metal = pick(possible_object_paths) //We select + var/obj/item/stack/material/picked_metal = pick(possible_object_paths) //We select if(picked_metal in banned_sheet_materials) continue + var/datum/material/M = get_material_by_name(initial(picked_metal.default_type)) + if(M.flags & MATERIAL_NO_SYNTH) + continue else new_metal = picked_metal break diff --git a/code/modules/materials/materials/_materials.dm b/code/modules/materials/materials/_materials.dm index 0e08ac5897..54876f9fd4 100644 --- a/code/modules/materials/materials/_materials.dm +++ b/code/modules/materials/materials/_materials.dm @@ -96,7 +96,10 @@ var/list/name_to_material return name_to_material[name] /proc/material_display_name(name) - var/datum/material/material = get_material_by_name(name) + if(istype(name, /datum/material)) //We were fed a datum. + var/datum/material/M = name + return M.display_name + var/datum/material/material = get_material_by_name(name) //If not a datum, we were fed a name. if(material) return material.display_name return null diff --git a/code/modules/materials/materials/metals/hull.dm b/code/modules/materials/materials/metals/hull.dm index b3ff64d4fc..5aa9135763 100644 --- a/code/modules/materials/materials/metals/hull.dm +++ b/code/modules/materials/materials/metals/hull.dm @@ -7,7 +7,7 @@ table_icon_base = "stone" icon_reinf = "reinf_mesh" icon_colour = "#666677" - flags = MATERIAL_UNMELTABLE + flags = MATERIAL_UNMELTABLE | MATERIAL_NO_SYNTH composite_material = list(MAT_STEEL = SHEET_MATERIAL_AMOUNT) /datum/material/steel/hull/place_sheet(var/turf/target) //Deconstructed into normal steel sheets. @@ -22,7 +22,7 @@ icon_reinf = "reinf_mesh" icon_colour = "#777788" explosion_resistance = 40 - flags = MATERIAL_UNMELTABLE + flags = MATERIAL_UNMELTABLE | MATERIAL_NO_SYNTH composite_material = list(MAT_PLASTEEL = SHEET_MATERIAL_AMOUNT) /datum/material/plasteel/hull/place_sheet(var/turf/target) //Deconstructed into normal plasteel sheets. @@ -37,7 +37,7 @@ icon_colour = "#45829a" explosion_resistance = 90 reflectivity = 0.9 - flags = MATERIAL_UNMELTABLE + flags = MATERIAL_UNMELTABLE | MATERIAL_NO_SYNTH composite_material = list(MAT_DURASTEEL = SHEET_MATERIAL_AMOUNT) /datum/material/durasteel/hull/place_sheet(var/turf/target) //Deconstructed into normal durasteel sheets. @@ -49,7 +49,7 @@ icon_base = "hull" table_icon_base = "stone" icon_reinf = "reinf_mesh" - flags = MATERIAL_UNMELTABLE + flags = MATERIAL_UNMELTABLE | MATERIAL_NO_SYNTH composite_material = list(MAT_TITANIUM = SHEET_MATERIAL_AMOUNT) /datum/material/titanium/hull/place_sheet(var/turf/target) //Deconstructed into normal titanium sheets. @@ -61,8 +61,35 @@ icon_base = "hull" table_icon_base = "stone" icon_reinf = "reinf_mesh" - flags = MATERIAL_UNMELTABLE + flags = MATERIAL_UNMELTABLE | MATERIAL_NO_SYNTH composite_material = list(MAT_MORPHIUM = SHEET_MATERIAL_AMOUNT) /datum/material/morphium/hull/place_sheet(var/turf/target) new /obj/item/stack/material/morphium(target) + +/datum/material/plastitanium/hull + name = MAT_PLASTITANIUMHULL + stack_type = /obj/item/stack/material/plastitanium/hull + icon_base = "hull" + table_icon_base = "stone" + icon_reinf = "reinf_mesh" + icon_colour = "#585658" + explosion_resistance = 50 + flags = MATERIAL_NO_SYNTH + composite_material = list(MAT_PLASTITANIUM = SHEET_MATERIAL_AMOUNT) + +/datum/material/plastitanium/hull/place_sheet(var/turf/target) //Deconstructed into normal plasteel sheets. + new /obj/item/stack/material/plastitanium(target) + +/datum/material/gold/hull + name = MAT_GOLDHULL + stack_type = /obj/item/stack/material/gold/hull + icon_base = "hull" + table_icon_base = "stone" + icon_reinf = "reinf_mesh" + explosion_resistance = 50 + flags = MATERIAL_NO_SYNTH + composite_material = list(MAT_GOLD = SHEET_MATERIAL_AMOUNT) + +/datum/material/gold/hull/place_sheet(var/turf/target) //Deconstructed into normal gold sheets. + new /obj/item/stack/material/gold(target) diff --git a/code/modules/materials/materials/metals/hull_vr.dm b/code/modules/materials/materials/metals/hull_vr.dm deleted file mode 100644 index e0dada40cc..0000000000 --- a/code/modules/materials/materials/metals/hull_vr.dm +++ /dev/null @@ -1,24 +0,0 @@ -/datum/material/plastitanium/hull - name = MAT_PLASTITANIUMHULL - stack_type = /obj/item/stack/material/plastitanium/hull - icon_base = "hull" - table_icon_base = "stone" - icon_reinf = "reinf_mesh" - icon_colour = "#585658" - explosion_resistance = 50 - composite_material = list(MAT_PLASTITANIUM = SHEET_MATERIAL_AMOUNT) - -/datum/material/plastitanium/hull/place_sheet(var/turf/target) //Deconstructed into normal plasteel sheets. - new /obj/item/stack/material/plastitanium(target) - -/datum/material/gold/hull - name = MAT_GOLDHULL - stack_type = /obj/item/stack/material/gold/hull - icon_base = "hull" - table_icon_base = "stone" - icon_reinf = "reinf_mesh" - explosion_resistance = 50 - composite_material = list(MAT_GOLD = SHEET_MATERIAL_AMOUNT) - -/datum/material/gold/hull/place_sheet(var/turf/target) //Deconstructed into normal gold sheets. - new /obj/item/stack/material/gold(target) diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index f5de9cffc6..3454d408ec 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -18,7 +18,24 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). var/list/LockedDesigns = list() //CHOMPADDITION: FOR VR mainly. - materials = list(MAT_STEEL = 0, MAT_GLASS = 0, MAT_PLASTEEL = 0, MAT_PLASTIC = 0, MAT_GRAPHITE = 0, MAT_GOLD = 0, MAT_SILVER = 0, MAT_OSMIUM = 0, MAT_LEAD = 0, MAT_PHORON = 0, MAT_URANIUM = 0, MAT_DIAMOND = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) + materials = list( + MAT_STEEL = 0, + MAT_GLASS = 0, + MAT_PLASTEEL = 0, + MAT_PLASTIC = 0, + MAT_GRAPHITE = 0, + MAT_GOLD = 0, + MAT_SILVER = 0, + MAT_OSMIUM = 0, + MAT_LEAD = 0, + MAT_PHORON = 0, + MAT_URANIUM = 0, + MAT_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_GRAPHITE, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER) @@ -29,15 +46,6 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). /obj/machinery/r_n_d/circuit_imprinter/Initialize(mapload) . = ..() - spawn() // Go through all materials, and add them to the possible storage, but hide them unless we contain them. - for(var/Name in name_to_material) - if(Name in materials) - continue - - hidden_materials |= Name - - materials[Name] = 0 - default_apply_parts() /obj/machinery/r_n_d/circuit_imprinter/process() @@ -143,7 +151,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). var/obj/item/stack/material/S = O if(!(S.material.name in materials)) - to_chat(user, span_warning("The [src] doesn't accept [S.material]!")) + to_chat(user, span_warning("The [src] doesn't accept [material_display_name(S.material)]!")) return busy = 1 diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 10cddcc315..11c43b573a 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -44,15 +44,6 @@ /obj/machinery/r_n_d/protolathe/Initialize(mapload) . = ..() -// Go through all materials, and add them to the possible storage, but hide them unless we contain them. - for(var/Name in name_to_material) - if(Name in materials) - continue - - hidden_materials |= Name - - materials[Name] = 0 - default_apply_parts() if(dep_overlay) // CHOMPAdd @@ -162,7 +153,7 @@ var/obj/item/stack/material/S = O if(!(S.material.name in materials)) - to_chat(user, span_warning("The [src] doesn't accept [S.material]!")) + to_chat(user, span_warning("The [src] doesn't accept [material_display_name(S.material)]!")) return busy = 1 diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm index e51d9bdb5f..d1c9021270 100644 --- a/code/modules/resleeving/machines.dm +++ b/code/modules/resleeving/machines.dm @@ -430,7 +430,7 @@ var/obj/item/stack/material/S = W if(!(S.material.name in stored_material)) - to_chat(user, span_warning("\The [src] doesn't accept [S.material]!")) + to_chat(user, span_warning("\The [src] doesn't accept [material_display_name(S.material)]!")) return var/amnt = S.perunit diff --git a/code/modules/xenoarcheaology/effects/electric_field.dm b/code/modules/xenoarcheaology/effects/electric_field.dm index 4cc0ac66ac..f00c406963 100644 --- a/code/modules/xenoarcheaology/effects/electric_field.dm +++ b/code/modules/xenoarcheaology/effects/electric_field.dm @@ -9,7 +9,6 @@ /datum/artifact_effect/electric_field/DoEffectTouch(var/mob/user) var/atom/holder = get_master_holder() - var/weakness = GetAnomalySusceptibility(user) if(last_used >= world.time + use_delay) return else @@ -32,6 +31,9 @@ light.flicker() for(var/mob/living/L in nearby_mobs) + var/weakness = GetAnomalySusceptibility(L) + if(!weakness) //We have protection on! + continue if(L.isSynthetic()) to_chat(L, span_danger("ERROR: Electrical fault detected!")) L.stuttering += 3 @@ -39,12 +41,12 @@ if(ishuman(L)) var/mob/living/carbon/human/H = L var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO)) - H.electrocute_act(rand(25, 40), holder, H.get_siemens_coefficient_organ(affected), affected) + H.electrocute_act(rand(25, 40) * weakness, holder, H.get_siemens_coefficient_organ(affected), affected) var/turf/T = get_turf(H) if(istype(T)) lightning_strike(T, TRUE) else - L.electrocute_act(rand(25, 40), holder, 0.75, BP_TORSO) + L.electrocute_act(rand(25, 40) * weakness, holder, 0.75, BP_TORSO) var/turf/T = get_turf(L) if(istype(T)) lightning_strike(T, TRUE) diff --git a/code/modules/xenoarcheaology/finds/find_spawning.dm b/code/modules/xenoarcheaology/finds/find_spawning.dm index 9da98b872d..e49e20dba8 100644 --- a/code/modules/xenoarcheaology/finds/find_spawning.dm +++ b/code/modules/xenoarcheaology/finds/find_spawning.dm @@ -49,6 +49,8 @@ /datum/material/durasteel/hull, /datum/material/titanium/hull, /datum/material/morphium/hull, + /datum/material/plastitanium/hull, + /datum/material/gold/hull, /datum/material/steel/holographic, /datum/material/plastic/holographic, /datum/material/wood/holographic, diff --git a/vorestation.dme b/vorestation.dme index 8691761a79..5b12f184af 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -3075,7 +3075,6 @@ #include "code\modules\materials\materials\stone.dm" #include "code\modules\materials\materials\supermatter.dm" #include "code\modules\materials\materials\metals\hull.dm" -#include "code\modules\materials\materials\metals\hull_vr.dm" #include "code\modules\materials\materials\metals\metals.dm" #include "code\modules\materials\materials\metals\metals_vr.dm" #include "code\modules\materials\materials\metals\plasteel.dm"