mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
[MIRROR] Fixes a few bugs with greyscale stacks. (#1670)
* Fixes a few bugs with greyscale stacks. (#54858) Fixes greyscale floor tiles merging regardless of their materials. Fixes greyscale floor tiles voiding materials when splitting the stack. Fixes greyscale floor tile stacks being created with no mats_per_unit and only enough custom materials for a single unit. Fixes greyscale tile flooring being created with the wrong amount of materials. Fixes greyscale tile flooring not producing floor tiles/producing floor tiles with 0 units. * Fixes a few bugs with greyscale stacks. Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
This commit is contained in:
co-authored by
TemporalOroboros
parent
d972fc4003
commit
186f4bd4c2
@@ -7,7 +7,7 @@
|
||||
singular_name = "bluespace crystal"
|
||||
dye_color = DYE_COSMIC
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
custom_materials = list(/datum/material/bluespace=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/bluespace=MINERAL_MATERIAL_AMOUNT)
|
||||
points = 50
|
||||
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
|
||||
refined_type = /obj/item/stack/sheet/bluespace_crystal
|
||||
@@ -51,7 +51,7 @@
|
||||
/obj/item/stack/ore/bluespace_crystal/artificial
|
||||
name = "artificial bluespace crystal"
|
||||
desc = "An artificially made bluespace crystal, it looks delicate."
|
||||
custom_materials = list(/datum/material/bluespace=MINERAL_MATERIAL_AMOUNT*0.5)
|
||||
mats_per_unit = list(/datum/material/bluespace=MINERAL_MATERIAL_AMOUNT*0.5)
|
||||
blink_range = 4 // Not as good as the organic stuff!
|
||||
points = 0 //nice try
|
||||
refined_type = null
|
||||
@@ -65,7 +65,7 @@
|
||||
inhand_icon_state = "sheet-polycrystal"
|
||||
singular_name = "bluespace polycrystal"
|
||||
desc = "A stable polycrystal, made of fused-together bluespace crystals. You could probably break one off."
|
||||
custom_materials = list(/datum/material/bluespace=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/bluespace=MINERAL_MATERIAL_AMOUNT)
|
||||
attack_verb_continuous = list("bluespace polybashes", "bluespace polybatters", "bluespace polybludgeons", "bluespace polythrashes", "bluespace polysmashes")
|
||||
attack_verb_simple = list("bluespace polybash", "bluespace polybatter", "bluespace polybludgeon", "bluespace polythrash", "bluespace polysmash")
|
||||
novariants = TRUE
|
||||
|
||||
@@ -19,7 +19,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
custom_materials = list(/datum/material/iron=1000)
|
||||
mats_per_unit = list(/datum/material/iron=1000)
|
||||
max_amount = 50
|
||||
attack_verb_continuous = list("hits", "bludgeons", "whacks")
|
||||
attack_verb_simple = list("hit", "bludgeon", "whack")
|
||||
@@ -68,7 +68,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/rods/cyborg
|
||||
custom_materials = null
|
||||
mats_per_unit = null
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
|
||||
@@ -94,7 +94,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
color = "#5286b9ff"
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
custom_materials = list(/datum/material/iron=1000, /datum/material/plasma=500, /datum/material/titanium=2000)
|
||||
mats_per_unit = list(/datum/material/iron=1000, /datum/material/plasma=500, /datum/material/titanium=2000)
|
||||
max_amount = 30
|
||||
resistance_flags = FIRE_PROOF | LAVA_PROOF
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
inhand_icon_state = "sheet-glass"
|
||||
custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/glass
|
||||
@@ -35,7 +35,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
custom_materials = null
|
||||
mats_per_unit = null
|
||||
is_cyborg = 1
|
||||
cost = 500
|
||||
|
||||
@@ -86,7 +86,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \
|
||||
singular_name = "plasma glass sheet"
|
||||
icon_state = "sheet-pglass"
|
||||
inhand_icon_state = "sheet-pglass"
|
||||
custom_materials = list(/datum/material/alloy/plasmaglass=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/alloy/plasmaglass=MINERAL_MATERIAL_AMOUNT)
|
||||
material_type = /datum/material/alloy/plasmaglass
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 75, ACID = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
@@ -138,7 +138,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
inhand_icon_state = "sheet-rglass"
|
||||
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT * 0.5, /datum/material/glass=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/iron=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 = 70, ACID = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/rglass
|
||||
@@ -151,7 +151,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
|
||||
..()
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
custom_materials = null
|
||||
mats_per_unit = null
|
||||
var/datum/robot_energy_storage/glasource
|
||||
var/metcost = 250
|
||||
var/glacost = 500
|
||||
@@ -185,7 +185,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
|
||||
singular_name = "reinforced plasma glass sheet"
|
||||
icon_state = "sheet-prglass"
|
||||
inhand_icon_state = "sheet-prglass"
|
||||
custom_materials = list(/datum/material/alloy/plasmaglass=MINERAL_MATERIAL_AMOUNT, /datum/material/iron = MINERAL_MATERIAL_AMOUNT * 0.5)
|
||||
mats_per_unit = list(/datum/material/alloy/plasmaglass=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
|
||||
@@ -209,7 +209,7 @@ GLOBAL_LIST_INIT(titaniumglass_recipes, list(
|
||||
singular_name = "titanium glass sheet"
|
||||
icon_state = "sheet-titaniumglass"
|
||||
inhand_icon_state = "sheet-titaniumglass"
|
||||
custom_materials = list(/datum/material/alloy/titaniumglass=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/alloy/titaniumglass=MINERAL_MATERIAL_AMOUNT)
|
||||
material_type = /datum/material/alloy/titaniumglass
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
@@ -230,7 +230,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
||||
singular_name = "plastitanium glass sheet"
|
||||
icon_state = "sheet-plastitaniumglass"
|
||||
inhand_icon_state = "sheet-plastitaniumglass"
|
||||
custom_materials = list(/datum/material/alloy/plastitaniumglass=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/alloy/plastitaniumglass=MINERAL_MATERIAL_AMOUNT)
|
||||
material_type = /datum/material/alloy/plastitaniumglass
|
||||
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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
inhand_icon_state = "hot-ice"
|
||||
singular_name = "hot ice piece"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
custom_materials = list(/datum/material/hot_ice=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/hot_ice=MINERAL_MATERIAL_AMOUNT)
|
||||
grind_results = list(/datum/reagent/toxin/hot_ice = 25)
|
||||
material_type = /datum/material/hot_ice
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ GLOBAL_LIST_INIT(sandstone_recipes, list ( \
|
||||
inhand_icon_state = "sheet-sandstone"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
custom_materials = list(/datum/material/sandstone=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/sandstone=MINERAL_MATERIAL_AMOUNT)
|
||||
sheettype = "sandstone"
|
||||
merge_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
walltype = /turf/closed/wall/mineral/sandstone
|
||||
@@ -98,7 +98,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
|
||||
inhand_icon_state = "sheet-diamond"
|
||||
singular_name = "diamond"
|
||||
sheettype = "diamond"
|
||||
custom_materials = list(/datum/material/diamond=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/diamond=MINERAL_MATERIAL_AMOUNT)
|
||||
novariants = TRUE
|
||||
grind_results = list(/datum/reagent/carbon = 20)
|
||||
point_value = 25
|
||||
@@ -124,7 +124,7 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \
|
||||
inhand_icon_state = "sheet-uranium"
|
||||
singular_name = "uranium sheet"
|
||||
sheettype = "uranium"
|
||||
custom_materials = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT)
|
||||
novariants = TRUE
|
||||
grind_results = list(/datum/reagent/uranium = 20)
|
||||
point_value = 20
|
||||
@@ -152,7 +152,7 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \
|
||||
sheettype = "plasma"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 100
|
||||
custom_materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
|
||||
grind_results = list(/datum/reagent/toxin/plasma = 20)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/plasma
|
||||
@@ -194,7 +194,7 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
|
||||
inhand_icon_state = "sheet-gold"
|
||||
singular_name = "gold bar"
|
||||
sheettype = "gold"
|
||||
custom_materials = list(/datum/material/gold=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/gold=MINERAL_MATERIAL_AMOUNT)
|
||||
grind_results = list(/datum/reagent/gold = 20)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/gold
|
||||
@@ -221,7 +221,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \
|
||||
inhand_icon_state = "sheet-silver"
|
||||
singular_name = "silver bar"
|
||||
sheettype = "silver"
|
||||
custom_materials = list(/datum/material/silver=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/silver=MINERAL_MATERIAL_AMOUNT)
|
||||
grind_results = list(/datum/reagent/silver = 20)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/silver
|
||||
@@ -247,7 +247,7 @@ GLOBAL_LIST_INIT(silver_recipes, list ( \
|
||||
inhand_icon_state = "sheet-bananium"
|
||||
singular_name = "bananium sheet"
|
||||
sheettype = "bananium"
|
||||
custom_materials = list(/datum/material/bananium=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/bananium=MINERAL_MATERIAL_AMOUNT)
|
||||
novariants = TRUE
|
||||
grind_results = list(/datum/reagent/consumable/banana = 20)
|
||||
point_value = 50
|
||||
@@ -277,7 +277,7 @@ GLOBAL_LIST_INIT(bananium_recipes, list ( \
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
sheettype = "titanium"
|
||||
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/titanium
|
||||
material_type = /datum/material/titanium
|
||||
@@ -309,7 +309,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
sheettype = "plastitanium"
|
||||
custom_materials = list(/datum/material/alloy/plastitanium=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/alloy/plastitanium=MINERAL_MATERIAL_AMOUNT)
|
||||
point_value = 45
|
||||
material_type = /datum/material/alloy/plastitanium
|
||||
merge_type = /obj/item/stack/sheet/mineral/plastitanium
|
||||
@@ -333,7 +333,7 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list ( \
|
||||
name = "snow"
|
||||
icon_state = "sheet-snow"
|
||||
inhand_icon_state = "sheet-snow"
|
||||
custom_materials = list(/datum/material/snow = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/snow = MINERAL_MATERIAL_AMOUNT)
|
||||
singular_name = "snow block"
|
||||
force = 1
|
||||
throwforce = 2
|
||||
@@ -369,7 +369,7 @@ GLOBAL_LIST_INIT(adamantine_recipes, list(
|
||||
icon_state = "sheet-adamantine"
|
||||
inhand_icon_state = "sheet-adamantine"
|
||||
singular_name = "adamantine sheet"
|
||||
custom_materials = list(/datum/material/adamantine=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/adamantine=MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/mineral/adamantine
|
||||
|
||||
/obj/item/stack/sheet/mineral/adamantine/get_main_recipes()
|
||||
@@ -386,7 +386,7 @@ GLOBAL_LIST_INIT(adamantine_recipes, list(
|
||||
singular_name = "runite bar"
|
||||
icon_state = "sheet-runite"
|
||||
inhand_icon_state = "sheet-runite"
|
||||
custom_materials = list(/datum/material/runite=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/runite=MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/mineral/runite
|
||||
material_type = /datum/material/runite
|
||||
|
||||
@@ -400,7 +400,7 @@ GLOBAL_LIST_INIT(adamantine_recipes, list(
|
||||
inhand_icon_state = "sheet-mythril"
|
||||
singular_name = "mythril sheet"
|
||||
novariants = TRUE
|
||||
custom_materials = list(/datum/material/mythril=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/mythril=MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/mineral/mythril
|
||||
|
||||
/*
|
||||
@@ -413,7 +413,7 @@ GLOBAL_LIST_INIT(adamantine_recipes, list(
|
||||
inhand_icon_state = "sheet-abductor"
|
||||
singular_name = "alien alloy sheet"
|
||||
sheettype = "abductor"
|
||||
custom_materials = list(/datum/material/alloy/alien=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/alloy/alien=MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/mineral/abductor
|
||||
material_type = /datum/material/alloy/alien
|
||||
walltype = /turf/closed/wall/mineral/abductor
|
||||
@@ -481,7 +481,7 @@ GLOBAL_LIST_INIT(metalhydrogen_recipes, list(
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
resistance_flags = FIRE_PROOF | LAVA_PROOF | ACID_PROOF | INDESTRUCTIBLE
|
||||
point_value = 100
|
||||
custom_materials = list(/datum/material/metalhydrogen = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/metalhydrogen = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/mineral/metal_hydrogen
|
||||
|
||||
/obj/item/stack/sheet/mineral/metal_hydrogen/get_main_recipes()
|
||||
|
||||
@@ -128,7 +128,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
singular_name = "metal sheet"
|
||||
icon_state = "sheet-metal"
|
||||
inhand_icon_state = "sheet-metal"
|
||||
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
|
||||
throwforce = 10
|
||||
flags_1 = CONDUCT_1
|
||||
resistance_flags = FIRE_PROOF
|
||||
@@ -156,7 +156,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
amount = 5
|
||||
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
custom_materials = null
|
||||
mats_per_unit = null
|
||||
is_cyborg = 1
|
||||
cost = 500
|
||||
|
||||
@@ -187,7 +187,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
|
||||
desc = "This sheet is an alloy of iron and plasma."
|
||||
icon_state = "sheet-plasteel"
|
||||
inhand_icon_state = "sheet-plasteel"
|
||||
custom_materials = list(/datum/material/alloy/plasteel=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/alloy/plasteel=MINERAL_MATERIAL_AMOUNT)
|
||||
material_type = /datum/material/alloy/plasteel
|
||||
throwforce = 10
|
||||
flags_1 = CONDUCT_1
|
||||
@@ -260,7 +260,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
icon_state = "sheet-wood"
|
||||
inhand_icon_state = "sheet-wood"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
custom_materials = list(/datum/material/wood=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/wood=MINERAL_MATERIAL_AMOUNT)
|
||||
sheettype = "wood"
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 0)
|
||||
resistance_flags = FLAMMABLE
|
||||
@@ -293,7 +293,7 @@ GLOBAL_LIST_INIT(bamboo_recipes, list ( \
|
||||
icon_state = "sheet-bamboo"
|
||||
inhand_icon_state = "sheet-bamboo"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
custom_materials = list(/datum/material/bamboo = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/bamboo = MINERAL_MATERIAL_AMOUNT)
|
||||
throwforce = 15
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 0)
|
||||
resistance_flags = FLAMMABLE
|
||||
@@ -477,7 +477,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
|
||||
singular_name = "cardboard sheet"
|
||||
icon_state = "sheet-card"
|
||||
inhand_icon_state = "sheet-card"
|
||||
custom_materials = list(/datum/material/cardboard = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/cardboard = MINERAL_MATERIAL_AMOUNT)
|
||||
resistance_flags = FLAMMABLE
|
||||
force = 0
|
||||
throwforce = 0
|
||||
@@ -531,7 +531,7 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \
|
||||
icon_state = "sheet-runed"
|
||||
inhand_icon_state = "sheet-runed"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
custom_materials = list(/datum/material/runedmetal = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/runedmetal = MINERAL_MATERIAL_AMOUNT)
|
||||
sheettype = "runed"
|
||||
merge_type = /obj/item/stack/sheet/runed_metal
|
||||
novariants = TRUE
|
||||
@@ -587,7 +587,7 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
|
||||
icon_state = "sheet-brass"
|
||||
inhand_icon_state = "sheet-brass"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
custom_materials = list(/datum/material/bronze = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/bronze = MINERAL_MATERIAL_AMOUNT)
|
||||
lefthand_file = 'icons/mob/inhands/misc/sheets_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/sheets_righthand.dmi'
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
@@ -643,7 +643,7 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "bone"
|
||||
inhand_icon_state = "sheet-bone"
|
||||
custom_materials = list(/datum/material/bone = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/bone = MINERAL_MATERIAL_AMOUNT)
|
||||
singular_name = "bone"
|
||||
desc = "Someone's been drinking their milk."
|
||||
force = 7
|
||||
@@ -672,7 +672,7 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
|
||||
singular_name = "plastic sheet"
|
||||
icon_state = "sheet-plastic"
|
||||
inhand_icon_state = "sheet-plastic"
|
||||
custom_materials = list(/datum/material/plastic=MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/plastic=MINERAL_MATERIAL_AMOUNT)
|
||||
throwforce = 7
|
||||
material_type = /datum/material/plastic
|
||||
merge_type = /obj/item/stack/sheet/plastic
|
||||
@@ -697,7 +697,7 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
singular_name = "paper frame"
|
||||
icon_state = "sheet-paper"
|
||||
inhand_icon_state = "sheet-paper"
|
||||
custom_materials = list(/datum/material/paper = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/paper = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/paperframes
|
||||
resistance_flags = FLAMMABLE
|
||||
grind_results = list(/datum/reagent/cellulose = 20)
|
||||
@@ -719,7 +719,7 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
singular_name = "meat sheet"
|
||||
icon_state = "sheet-meat"
|
||||
material_flags = MATERIAL_COLOR
|
||||
custom_materials = list(/datum/material/meat = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/meat = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/meat
|
||||
material_type = /datum/material/meat
|
||||
material_modifier = 1 //None of that wussy stuff
|
||||
@@ -736,7 +736,7 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
desc = "It's a delicious pepperoni sheetzza!"
|
||||
singular_name = "pepperoni sheetzza"
|
||||
icon_state = "sheet-pizza"
|
||||
custom_materials = list(/datum/material/pizza = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/pizza = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/pizza
|
||||
material_type = /datum/material/pizza
|
||||
material_modifier = 1
|
||||
@@ -753,7 +753,7 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
desc = "You're too old to be playing with sandcastles. Now you build... sandstations."
|
||||
singular_name = "sand block"
|
||||
icon_state = "sheet-sandstone"
|
||||
custom_materials = list(/datum/material/sand = MINERAL_MATERIAL_AMOUNT)
|
||||
mats_per_unit = list(/datum/material/sand = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/sandblock
|
||||
material_type = /datum/material/sand
|
||||
material_modifier = 1
|
||||
|
||||
@@ -40,16 +40,6 @@
|
||||
/// Amount of matter for RCD
|
||||
var/matter_amount = 0
|
||||
|
||||
/obj/item/stack/on_grind()
|
||||
for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists
|
||||
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
|
||||
|
||||
/obj/item/stack/grind_requirements()
|
||||
if(is_cyborg)
|
||||
to_chat(usr, "<span class='warning'>[src] is electronically synthesized in your chassis and can't be ground up!</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
|
||||
if(new_amount != null)
|
||||
amount = new_amount
|
||||
@@ -58,16 +48,16 @@
|
||||
new type(loc, max_amount, FALSE)
|
||||
if(!merge_type)
|
||||
merge_type = type
|
||||
if(custom_materials?.len)
|
||||
mats_per_unit = list()
|
||||
var/in_process_mat_list = custom_materials.Copy()
|
||||
for(var/i in custom_materials)
|
||||
mats_per_unit[SSmaterials.GetMaterialRef(i)] = in_process_mat_list[i]
|
||||
custom_materials[i] *= amount
|
||||
|
||||
if(LAZYLEN(mats_per_unit))
|
||||
set_mats_per_unit(mats_per_unit, 1)
|
||||
else if(LAZYLEN(custom_materials))
|
||||
set_mats_per_unit(custom_materials, amount ? 1/amount : 1)
|
||||
|
||||
. = ..()
|
||||
if(merge)
|
||||
for(var/obj/item/stack/S in loc)
|
||||
if(S.merge_type == merge_type)
|
||||
if(can_merge(S))
|
||||
INVOKE_ASYNC(src, .proc/merge, S)
|
||||
var/list/temp_recipes = get_main_recipes()
|
||||
recipes = temp_recipes.Copy()
|
||||
@@ -84,6 +74,31 @@
|
||||
update_weight()
|
||||
update_icon()
|
||||
|
||||
/** Sets the amount of materials per unit for this stack.
|
||||
*
|
||||
* Arguments:
|
||||
* - [mats][/list]: The value to set the mats per unit to.
|
||||
* - multiplier: The amount to multiply the mats per unit by. Defaults to 1.
|
||||
*/
|
||||
/obj/item/stack/proc/set_mats_per_unit(list/mats, multiplier=1)
|
||||
mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(mats, multiplier)
|
||||
update_custom_materials()
|
||||
|
||||
/** Updates the custom materials list of this stack.
|
||||
*/
|
||||
/obj/item/stack/proc/update_custom_materials()
|
||||
set_custom_materials(mats_per_unit, amount)
|
||||
|
||||
/obj/item/stack/on_grind()
|
||||
for(var/i in 1 to length(grind_results)) //This should only call if it's ground, so no need to check if grind_results exists
|
||||
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
|
||||
|
||||
/obj/item/stack/grind_requirements()
|
||||
if(is_cyborg)
|
||||
to_chat(usr, "<span class='warning'>[src] is electronically synthesized in your chassis and can't be ground up!</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/proc/get_main_recipes()
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
return list()//empty list
|
||||
@@ -242,11 +257,12 @@
|
||||
O.setDir(usr.dir)
|
||||
use(R.req_amount * multiplier)
|
||||
|
||||
if(R.applies_mats && custom_materials?.len)
|
||||
var/list/used_materials = list()
|
||||
for(var/i in custom_materials)
|
||||
used_materials[SSmaterials.GetMaterialRef(i)] = R.req_amount / R.res_amount * (MINERAL_MATERIAL_AMOUNT / custom_materials.len)
|
||||
O.set_custom_materials(used_materials)
|
||||
if(R.applies_mats && LAZYLEN(mats_per_unit))
|
||||
if(isstack(O))
|
||||
var/obj/item/stack/crafted_stack = O
|
||||
crafted_stack.set_mats_per_unit(mats_per_unit, R.req_amount / R.res_amount)
|
||||
else
|
||||
O.set_custom_materials(mats_per_unit, R.req_amount / R.res_amount)
|
||||
|
||||
if(istype(O, /obj/structure/windoor_assembly))
|
||||
var/obj/structure/windoor_assembly/W = O
|
||||
@@ -337,10 +353,7 @@
|
||||
if(check && zero_amount())
|
||||
return TRUE
|
||||
if(length(mats_per_unit))
|
||||
var/temp_materials = custom_materials.Copy()
|
||||
for(var/i in mats_per_unit)
|
||||
temp_materials[i] = mats_per_unit[i] * src.amount
|
||||
set_custom_materials(temp_materials)
|
||||
update_custom_materials()
|
||||
update_icon()
|
||||
update_weight()
|
||||
return TRUE
|
||||
@@ -367,19 +380,33 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/stack/proc/add(amount)
|
||||
/** Adds some number of units to this stack.
|
||||
*
|
||||
* Arguments:
|
||||
* - _amount: The number of units to add to this stack.
|
||||
*/
|
||||
/obj/item/stack/proc/add(_amount)
|
||||
if (is_cyborg)
|
||||
source.add_charge(amount * cost)
|
||||
source.add_charge(_amount * cost)
|
||||
else
|
||||
src.amount += amount
|
||||
amount += _amount
|
||||
if(length(mats_per_unit))
|
||||
var/temp_materials = custom_materials.Copy()
|
||||
for(var/i in mats_per_unit)
|
||||
temp_materials[i] = mats_per_unit[i] * src.amount
|
||||
set_custom_materials(temp_materials)
|
||||
update_custom_materials()
|
||||
update_icon()
|
||||
update_weight()
|
||||
|
||||
/** Checks whether this stack can merge itself into another stack.
|
||||
*
|
||||
* Arguments:
|
||||
* - [check][/obj/item/stack]: The stack to check for mergeability.
|
||||
*/
|
||||
/obj/item/stack/proc/can_merge(obj/item/stack/check)
|
||||
if(!istype(check, merge_type))
|
||||
return FALSE
|
||||
if(mats_per_unit != check.mats_per_unit)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible
|
||||
if(QDELETED(S) || QDELETED(src) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
|
||||
return
|
||||
@@ -395,14 +422,14 @@
|
||||
S.add(transfer)
|
||||
return transfer
|
||||
|
||||
/obj/item/stack/Crossed(atom/movable/AM)
|
||||
if(istype(AM, merge_type) && !AM.throwing)
|
||||
merge(AM)
|
||||
/obj/item/stack/Crossed(atom/movable/crossing)
|
||||
if(!crossing.throwing && can_merge(crossing))
|
||||
merge(crossing)
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(istype(AM, merge_type))
|
||||
merge(AM)
|
||||
/obj/item/stack/hitby(atom/movable/hitting, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(can_merge(hitting))
|
||||
merge(hitting)
|
||||
. = ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
@@ -410,7 +437,7 @@
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
return change_stack(user,1)
|
||||
return split_stack(user, 1)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -433,14 +460,21 @@
|
||||
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
else
|
||||
change_stack(user, stackmaterial)
|
||||
split_stack(user, stackmaterial)
|
||||
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack.</span>")
|
||||
|
||||
/obj/item/stack/proc/change_stack(mob/user, amount)
|
||||
/** Splits the stack into two stacks.
|
||||
*
|
||||
* Arguments:
|
||||
* - [user][/mob]: The mob splitting the stack.
|
||||
* - amount: The number of units to split from this stack.
|
||||
*/
|
||||
/obj/item/stack/proc/split_stack(mob/user, amount)
|
||||
if(!use(amount, TRUE, FALSE))
|
||||
return FALSE
|
||||
return null
|
||||
var/obj/item/stack/F = new type(user? user : drop_location(), amount, FALSE)
|
||||
. = F
|
||||
F.set_mats_per_unit(mats_per_unit, 1) // Required for greyscale sheets and tiles.
|
||||
F.copy_evidences(src)
|
||||
if(user)
|
||||
if(!user.put_in_hands(F, merge_stacks = FALSE))
|
||||
@@ -450,7 +484,7 @@
|
||||
zero_amount()
|
||||
|
||||
/obj/item/stack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, merge_type))
|
||||
if(can_merge(W))
|
||||
var/obj/item/stack/S = W
|
||||
if(merge(S))
|
||||
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
inhand_icon_state = "tile-plasma"
|
||||
turf_type = /turf/open/floor/mineral/plasma
|
||||
mineralType = "plasma"
|
||||
custom_materials = list(/datum/material/plasma=500)
|
||||
mats_per_unit = list(/datum/material/plasma=500)
|
||||
|
||||
/obj/item/stack/tile/mineral/uranium
|
||||
name = "uranium tile"
|
||||
@@ -16,7 +16,7 @@
|
||||
inhand_icon_state = "tile-uranium"
|
||||
turf_type = /turf/open/floor/mineral/uranium
|
||||
mineralType = "uranium"
|
||||
custom_materials = list(/datum/material/uranium=500)
|
||||
mats_per_unit = list(/datum/material/uranium=500)
|
||||
|
||||
/obj/item/stack/tile/mineral/gold
|
||||
name = "gold tile"
|
||||
@@ -26,7 +26,7 @@
|
||||
inhand_icon_state = "tile-gold"
|
||||
turf_type = /turf/open/floor/mineral/gold
|
||||
mineralType = "gold"
|
||||
custom_materials = list(/datum/material/gold=500)
|
||||
mats_per_unit = list(/datum/material/gold=500)
|
||||
|
||||
/obj/item/stack/tile/mineral/silver
|
||||
name = "silver tile"
|
||||
@@ -36,7 +36,7 @@
|
||||
inhand_icon_state = "tile-silver"
|
||||
turf_type = /turf/open/floor/mineral/silver
|
||||
mineralType = "silver"
|
||||
custom_materials = list(/datum/material/silver=500)
|
||||
mats_per_unit = list(/datum/material/silver=500)
|
||||
|
||||
/obj/item/stack/tile/mineral/diamond
|
||||
name = "diamond tile"
|
||||
@@ -46,7 +46,7 @@
|
||||
inhand_icon_state = "tile-diamond"
|
||||
turf_type = /turf/open/floor/mineral/diamond
|
||||
mineralType = "diamond"
|
||||
custom_materials = list(/datum/material/diamond=500)
|
||||
mats_per_unit = list(/datum/material/diamond=500)
|
||||
|
||||
/obj/item/stack/tile/mineral/bananium
|
||||
name = "bananium tile"
|
||||
@@ -56,7 +56,7 @@
|
||||
inhand_icon_state = "tile-bananium"
|
||||
turf_type = /turf/open/floor/mineral/bananium
|
||||
mineralType = "bananium"
|
||||
custom_materials = list(/datum/material/bananium=500)
|
||||
mats_per_unit = list(/datum/material/bananium=500)
|
||||
|
||||
/obj/item/stack/tile/mineral/abductor
|
||||
name = "alien floor tile"
|
||||
@@ -65,7 +65,7 @@
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "tile_abductor"
|
||||
inhand_icon_state = "tile-abductor"
|
||||
custom_materials = list(/datum/material/alloy/alien=MINERAL_MATERIAL_AMOUNT*0.25)
|
||||
mats_per_unit = list(/datum/material/alloy/alien=MINERAL_MATERIAL_AMOUNT*0.25)
|
||||
turf_type = /turf/open/floor/mineral/abductor
|
||||
mineralType = "abductor"
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
inhand_icon_state = "tile-shuttle"
|
||||
turf_type = /turf/open/floor/mineral/titanium
|
||||
mineralType = "titanium"
|
||||
custom_materials = list(/datum/material/titanium=500)
|
||||
mats_per_unit = list(/datum/material/titanium=500)
|
||||
tile_reskin_types = list(
|
||||
/obj/item/stack/tile/mineral/titanium,
|
||||
/obj/item/stack/tile/mineral/titanium/yellow,
|
||||
@@ -162,7 +162,7 @@
|
||||
inhand_icon_state = "tile-darkshuttle"
|
||||
turf_type = /turf/open/floor/mineral/plastitanium
|
||||
mineralType = "plastitanium"
|
||||
custom_materials = list(/datum/material/alloy/plastitanium=MINERAL_MATERIAL_AMOUNT*0.25)
|
||||
mats_per_unit = list(/datum/material/alloy/plastitanium=MINERAL_MATERIAL_AMOUNT*0.25)
|
||||
material_flags = MATERIAL_NO_EFFECTS
|
||||
|
||||
/obj/item/stack/tile/mineral/snow
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
icon_state = "tile"
|
||||
inhand_icon_state = "tile"
|
||||
force = 6
|
||||
custom_materials = list(/datum/material/iron=500)
|
||||
mats_per_unit = list(/datum/material/iron=500)
|
||||
throwforce = 10
|
||||
flags_1 = CONDUCT_1
|
||||
turf_type = /turf/open/floor/plasteel
|
||||
@@ -375,7 +375,7 @@
|
||||
matter_amount = 1
|
||||
|
||||
/obj/item/stack/tile/plasteel/cyborg
|
||||
custom_materials = null // All other Borg versions of items have no Metal or Glass - RR
|
||||
mats_per_unit = null // All other Borg versions of items have no Metal or Glass - RR
|
||||
is_cyborg = 1
|
||||
cost = 125
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
singular_name = "plastic floor tile"
|
||||
desc = "A tile of cheap, flimsy plastic flooring."
|
||||
icon_state = "tile_plastic"
|
||||
custom_materials = list(/datum/material/plastic=500)
|
||||
mats_per_unit = list(/datum/material/plastic=500)
|
||||
turf_type = /turf/open/floor/plastic
|
||||
|
||||
/obj/item/stack/tile/material
|
||||
|
||||
Reference in New Issue
Block a user