diff --git a/code/__DEFINES/materials.dm b/code/__DEFINES/materials.dm index 89553d9c6c..e2ae22345f 100644 --- a/code/__DEFINES/materials.dm +++ b/code/__DEFINES/materials.dm @@ -7,5 +7,5 @@ /// Flag for atoms, this flag ensures it isn't re-colored by materials. Useful for snowflake icons such as default toolboxes. #define MATERIAL_COLOR (1<<0) #define MATERIAL_ADD_PREFIX (1<<1) -#define MATERIAL_NO_EFFECTS (1<<2) +#define MATERIAL_EFFECTS (1<<2) #define MATERIAL_AFFECT_STATISTICS (1<<3) \ No newline at end of file diff --git a/code/game/atoms.dm b/code/game/atoms.dm index b71f51bd07..afa8cfed3b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -965,7 +965,7 @@ Proc for attack log creation, because really why not for(var/x in materials) var/datum/material/custom_material = SSmaterials.GetMaterialRef(x) - if(!(material_flags & MATERIAL_NO_EFFECTS)) + if(material_flags & MATERIAL_EFFECTS) custom_material.on_applied(src, materials[custom_material] * multiplier * material_modifier, material_flags) custom_materials[custom_material] += materials[x] * multiplier diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 7ff8696084..4a4d58ea73 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -530,7 +530,6 @@ equip_cooldown = 0 var/obj/item/gun/medbeam/mech/medigun custom_materials = list(/datum/material/iron = 15000, /datum/material/glass = 8000, /datum/material/plasma = 3000, /datum/material/gold = 8000, /datum/material/diamond = 2000) - material_flags = MATERIAL_NO_EFFECTS /obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/Initialize() . = ..() diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index fb321665bc..93228c7fee 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -188,7 +188,6 @@ var/location = get_step(src,(dir)) var/obj/item/I = new D.build_path(location) - I.material_flags |= MATERIAL_NO_EFFECTS //Find a better way to do this. I.set_custom_materials(res_coef) say("\The [I] is complete.") being_built = null diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index c8e5b15f72..63e73625e6 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -898,11 +898,3 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) . = ..() if(var_name == NAMEOF(src, slowdown)) set_slowdown(var_value) //don't care if it's a duplicate edit as slowdown'll be set, do it anyways to force normal behavior. - -//Called when the object is constructed by an autolathe -//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes -/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A) - return - -/obj/item/proc/rnd_crafted(obj/machinery/rnd/production/P) - return diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 011837d48b..c2db529675 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -648,7 +648,7 @@ item_state = "mace_greyscale" lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Material type changes the prefix as well as the color. + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS //Material type changes the prefix as well as the color. custom_materials = list(/datum/material/iron = 12000) //Defaults to an Iron Mace. slot_flags = ITEM_SLOT_BELT force = 14 diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index c8ee6b05c7..fa218c5caa 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -109,7 +109,6 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \ merge_type = /obj/item/stack/sheet/plasmaglass grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10) tableVariant = /obj/structure/table/plasmaglass - material_flags = MATERIAL_NO_EFFECTS shard_type = /obj/item/shard/plasma /obj/item/stack/sheet/plasmaglass/fifty @@ -209,7 +208,6 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \ custom_materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass=MINERAL_MATERIAL_AMOUNT, /datum/material/iron=MINERAL_MATERIAL_AMOUNT * 0.5,) armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) resistance_flags = ACID_PROOF - material_flags = MATERIAL_NO_EFFECTS merge_type = /obj/item/stack/sheet/plasmarglass grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10) point_value = 23 @@ -259,7 +257,6 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( item_state = "sheet-plastitaniumglass" custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass=MINERAL_MATERIAL_AMOUNT) armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) - material_flags = MATERIAL_NO_EFFECTS resistance_flags = ACID_PROOF merge_type = /obj/item/stack/sheet/plastitaniumglass shard_type = /obj/item/shard diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 4a7156db72..d28ae52b52 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -324,7 +324,6 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \ custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT) point_value = 45 merge_type = /obj/item/stack/sheet/mineral/plastitanium - material_flags = MATERIAL_NO_EFFECTS /obj/item/stack/sheet/mineral/plastitanium/fifty amount = 50 diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 6ddd7c136a..f19dbb2a6b 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -215,7 +215,6 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \ grind_results = list(/datum/reagent/iron = 20, /datum/reagent/toxin/plasma = 20) point_value = 23 tableVariant = /obj/structure/table/reinforced - material_flags = MATERIAL_NO_EFFECTS /obj/item/stack/sheet/plasteel/get_main_recipes() . = ..() diff --git a/code/game/objects/items/stacks/tiles/tile_mineral.dm b/code/game/objects/items/stacks/tiles/tile_mineral.dm index 50edc9d15a..1bcd8d72ca 100644 --- a/code/game/objects/items/stacks/tiles/tile_mineral.dm +++ b/code/game/objects/items/stacks/tiles/tile_mineral.dm @@ -78,4 +78,3 @@ turf_type = /turf/open/floor/mineral/plastitanium mineralType = "plastitanium" custom_materials = list(/datum/material/titanium=250, /datum/material/plasma=250) - material_flags = MATERIAL_NO_EFFECTS \ No newline at end of file diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 5acbb2f231..199f0c51e2 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -315,3 +315,11 @@ current_skin = choice icon_state = unique_reskin[choice] to_chat(M, "[src] is now skinned as '[choice]'.") + +//Called when the object is constructed by an autolathe +//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes +/obj/proc/autolathe_crafted(obj/machinery/autolathe/A) + return + +/obj/proc/rnd_crafted(obj/machinery/rnd/production/P) + return diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index c593451c24..d3e8ecf0a6 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -153,7 +153,7 @@ ///Material chair /obj/structure/chair/greyscale icon_state = "chair_greyscale" - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS item_chair = /obj/item/chair/greyscale buildstacktype = null //Custom mats handle this @@ -382,7 +382,7 @@ /obj/item/chair/greyscale icon_state = "chair_greyscale_toppled" item_state = "chair_greyscale" - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS origin_type = /obj/structure/chair/greyscale /obj/item/chair/stool diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index bbdf6925f9..30e451aa14 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -211,7 +211,7 @@ /obj/structure/table/greyscale icon = 'icons/obj/smooth_structures/table_greyscale.dmi' icon_state = "table" - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS buildstack = null //No buildstack, so generate from mat datums /* diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 9ad05efb7a..3d744effb0 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -243,7 +243,7 @@ icon_state = "knight_greyscale" item_state = "knight_greyscale" armor = list("melee" = 35, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 10, "rad" = 10, "fire" = 40, "acid" = 40) - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Can change color and add prefix + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS //Can change color and add prefix /obj/item/clothing/head/helmet/skull name = "skull helmet" diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 8bd7ee741d..bbfab5fda7 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -285,7 +285,7 @@ icon_state = "knight_greyscale" item_state = "knight_greyscale" armor = list("melee" = 35, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 10, "rad" = 10, "fire" = 40, "acid" = 40) - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Can change color and add prefix + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS //Can change color and add prefix /obj/item/clothing/suit/armor/vest/durathread name = "makeshift vest" diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index c7c34b0389..183b4812f2 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -70,7 +70,6 @@ singular_name = "uranium ore chunk" points = 30 custom_materials = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT) - material_flags = MATERIAL_NO_EFFECTS refined_type = /obj/item/stack/sheet/mineral/uranium /obj/item/stack/ore/iron @@ -319,7 +318,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ throwforce = 2 w_class = WEIGHT_CLASS_TINY custom_materials = list(/datum/material/iron = 400) - material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS + material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS var/string_attached var/list/sideslist = list("heads","tails") var/cooldown = 0 diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 800d66969d..368f476183 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -245,7 +245,6 @@ icon_state = "beakerbluespace" custom_materials = list(/datum/material/glass = 5000, /datum/material/plasma = 3000, /datum/material/diamond = 1000, /datum/material/bluespace = 1000) volume = 300 - material_flags = MATERIAL_NO_EFFECTS amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300) container_HP = 5 diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index 0550fa9334..2159e9eba3 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -95,11 +95,9 @@ message_admins("[ADMIN_LOOKUPFLW(user)] has built [amount] of [path] at a [src]([type]).") for(var/i in 1 to amount) var/obj/O = new path(get_turf(src)) - if(efficient_with(O.type) && isitem(O)) - var/obj/item/I = O - I.material_flags |= MATERIAL_NO_EFFECTS //Find a better way to do this. - I.set_custom_materials(matlist.Copy()) - I.rnd_crafted(src) + if(efficient_with(O.type)) + O.set_custom_materials(matlist.Copy()) + O.rnd_crafted(src) SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]")) investigate_log("[key_name(user)] built [amount] of [path] at [src]([type]).", INVESTIGATE_RESEARCH)