Merge pull request #12084 from Ghommie/Ghommie-cit717
Replacing the MATERIAL_NO_EFFECTS flag with MATERIAL_EFFECTS.
This commit is contained in:
@@ -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)
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
/*
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user