Unit test material checks are now performed on all crafting recipes by default. All stack recipes now transfer mats to the results (#92620)

## About The Pull Request
Extends the part of the crafting unit test that ensures consistency
between the total mats of the components of a recipe (or rather, the
result of said recipe) and a generic instance of the same type as its
result, previously only implemented on food recipes.

## Why It's Good For The Game
This ensures a degree of consistency with the material composition of
various objects in the game. I couldn't do it in the original PR as that
one was too big already and it took months to get it merged, and have
the relative bugs fixed.

Currently a WIP as I slowly deal with the unit test reports.

## Changelog

🆑
refactor: Follow-up to the crafting/material refactor from months ago.
All objects crafted with stacks now inherit their mat composition (not
necessarily the effects and color) by default, while previously only a
few things like chair, sinks and toilets did. Report any object looking
or behaving weirdly as a result.
fix: The material composition of ammo boxes is no longer a 1/10 of what
it's supposed to be. It was a shitty hack to make it harder to recycle
empty ammo boxes. Instead, they lose materials as they're emptied now.
/🆑
This commit is contained in:
Ghom
2025-12-03 00:29:01 +01:00
committed by GitHub
parent 085007eae1
commit 0b0c5ea91e
272 changed files with 850 additions and 280 deletions
@@ -19,6 +19,7 @@
resistance_flags = FLAMMABLE
max_integrity = 100
integrity_failure = 0.35
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
/// What material this bed is made of
var/build_stack_type = /obj/item/stack/sheet/iron
/// How many mats to drop when deconstructed
@@ -314,6 +315,7 @@
build_stack_type = /obj/item/stack/sheet/mineral/wood
build_stack_amount = 10
elevation = 0
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10)
var/owned = FALSE
/obj/structure/bed/dogbed/ian
@@ -381,6 +383,7 @@
icon_state = "bed_double"
build_stack_amount = 4
max_buckled_mobs = 2
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 4)
/// The mob who buckled to this bed second, to avoid other mobs getting pixel-shifted before he unbuckles.
var/mob/living/goldilocks
@@ -188,6 +188,7 @@
buildstackamount = 3
item_chair = /obj/item/chair/wood
fishing_modifier = -6
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 3)
/obj/structure/chair/wood/narsie_act()
return
@@ -207,6 +208,7 @@
item_chair = null
fishing_modifier = -7
has_armrest = TRUE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/chair/comfy/brown
color = rgb(70, 47, 28)
@@ -232,7 +234,7 @@
unbuckle_sound = SFX_SEATBELT_UNBUCKLE
resistance_flags = FIRE_PROOF
max_integrity = 120
custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/chair/comfy/shuttle/electrify_self(obj/item/assembly/shock_kit/input_shock_kit, mob/user, list/overlays_from_child_procs)
if(!overlays_from_child_procs)
@@ -286,6 +288,7 @@
icon_state = "carp_chair"
buildstacktype = /obj/item/stack/sheet/animalhide/carp
fishing_modifier = -12
custom_materials = null
/obj/structure/chair/office
name = "office chair"
@@ -294,6 +297,7 @@
item_chair = null
fishing_modifier = -6
icon_state = "officechair_dark"
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5)
/obj/structure/chair/office/Initialize(mapload)
. = ..()
@@ -375,6 +379,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
buildstacktype = /obj/item/stack/sheet/mineral/bamboo
buildstackamount = 2
item_chair = /obj/item/chair/stool/bamboo
custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 2)
/obj/item/chair
name = "chair"
@@ -393,7 +398,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
max_integrity = 100
hitsound = 'sound/items/trayhit/trayhit1.ogg'
hit_reaction_chance = 50
custom_materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
item_flags = SKIP_FANTASY_ON_SPAWN
// Duration of daze inflicted when the chair is smashed against someone from behind.
@@ -524,6 +529,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
origin_type = /obj/structure/chair/stool/bamboo
max_integrity = 40 //Submissive and breakable unlike the chad iron stool
daze_amount = 0 //Not hard enough to cause them to become dazed
custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 2)
/obj/item/chair/stool/narsie_act()
return //sturdy enough to ignore a god
@@ -538,6 +544,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
origin_type = /obj/structure/chair/wood
custom_materials = null
daze_amount = 0
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 3)
/obj/item/chair/wood/narsie_act()
return
@@ -563,6 +570,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
item_chair = null
fishing_modifier = -13 //the pinnacle of Ratvarian technology.
has_armrest = TRUE
custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT)
/// Total rotations made
var/turns = 0
@@ -606,6 +614,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
obj_flags = parent_type::obj_flags | NO_DEBRIS_AFTER_DECONSTRUCTION
alpha = 0
fishing_modifier = -21 //it only lives for 25 seconds, so we make them worth it.
custom_materials = null
/obj/structure/chair/mime/wrench_act_secondary(mob/living/user, obj/item/weapon)
return NONE
@@ -622,7 +631,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
desc = "No matter how much you squirm, it'll still be uncomfortable."
resistance_flags = FLAMMABLE
max_integrity = 70
custom_materials = list(/datum/material/plastic =SHEET_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2)
buildstacktype = /obj/item/stack/sheet/plastic
buildstackamount = 2
item_chair = /obj/item/chair/plastic
@@ -656,7 +665,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
w_class = WEIGHT_CLASS_NORMAL
force = 7
throw_range = 5 //Lighter Weight --> Flies Farther.
custom_materials = list(/datum/material/plastic =SHEET_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2)
max_integrity = 70
daze_amount = 0
origin_type = /obj/structure/chair/plastic
@@ -8,6 +8,7 @@
buildstacktype = /obj/item/stack/sheet/mineral/wood
buildstackamount = 3
item_chair = null
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 3)
///This proc adds the rotate component, overwrite this if you for some reason want to change some specific args.
/obj/structure/chair/pew/MakeRotate()
@@ -111,6 +111,7 @@ COLORED_SOFA(/obj/structure/chair/sofa, maroon, SOFA_MAROON)
buildstacktype = /obj/item/stack/sheet/mineral/bamboo
buildstackamount = 3
has_armrest = FALSE
custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 3)
/obj/structure/chair/sofa/bamboo/left
icon_state = "bamboo_sofaend_left"
@@ -581,6 +581,7 @@ LINEN BINS
resistance_flags = FLAMMABLE
max_integrity = 70
anchored_tabletop_offset = 6
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
/// The number of bedsheets in the bin
var/amount = 10
/// A list of actual sheets within the bin
+1
View File
@@ -17,6 +17,7 @@
anchored = TRUE
buckle_lying = 0
pass_flags_self = PASSTABLE | LETPASSTHROW
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10)
/// is the bonfire lit?
var/burning = FALSE
/// icon for the bonfire while on. for a softer more burning embers icon, use "bonfire_warm"
@@ -117,6 +117,7 @@
icon_state = "garbagegun"
anchored = FALSE
anchorable_cannon = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 11.15, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5)
var/fires_before_deconstruction = 5
/obj/structure/cannon/trash/fire()
@@ -71,6 +71,7 @@
base_icon_state = "trashballs"
merge_type = /obj/item/stack/cannonball/trashball
projectile_type = /obj/projectile/bullet/cannonball/trashball
custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT)
/obj/item/stack/cannonball/trashball/four
amount = 4
@@ -114,6 +114,7 @@
fire_delay = 3 DECISECONDS
shot_delay = 2 DECISECONDS
firing_shakes_camera = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 24.5, /datum/material/wood = SHEET_MATERIAL_AMOUNT * 15, /datum/material/glass = SMALL_MATERIAL_AMOUNT)
/obj/structure/mounted_gun/pipe/examine_more(mob/user)
. = ..()
@@ -5,6 +5,7 @@
icon_state = "cat_house"
density = TRUE
anchored = TRUE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5)
///cat residing in this house
var/mob/living/resident_cat
+1
View File
@@ -6,6 +6,7 @@
name = "\improper Probably a White Pawn"
desc = "This is weird. Please inform administration on how you managed to get the parent chess piece. Thanks!"
max_integrity = 100
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/chess/wrench_act(mob/user, obj/item/tool)
if(flags_1 & HOLOGRAM_1)
@@ -20,6 +20,8 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets)
/// How insulated the thing is, for the purposes of calculating body temperature. Must be between 0 and 1!
contents_thermal_insulation = 0
pass_flags_self = PASSSTRUCTURE | LETPASSCLICKS
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
/// The overlay for the closet's door
var/obj/effect/overlay/closet_door/door_obj
/// Whether or not this door is being animated
@@ -19,6 +19,7 @@
door_anim_time = 0 // no animation
can_install_electronics = FALSE
paint_jobs = null
custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT * 4)
/// Cooldown controlling when the box can trigger the Metal Gear Solid-style '!' alert.
COOLDOWN_DECLARE(alert_cooldown)
@@ -5,6 +5,7 @@
door_anim_squish = 0.22
door_anim_angle = 123
door_anim_time = 4
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5.3, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3.5)
/// If FALSE, we will protect the first person in the freezer from an explosion / nuclear blast.
var/jones = FALSE
paint_jobs = null
@@ -8,6 +8,7 @@
secure = TRUE
damage_deflection = 20
material_drop_amount = 5
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5)
/datum/armor/closet_secure_closet
melee = 30
@@ -184,6 +184,7 @@
paint_jobs = null
elevation_open = 0
can_weld_shut = FALSE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5)
/obj/structure/closet/crate/trashcart //please make this a generic cart path later after things calm down a little
desc = "A heavy, metal trashcart with wheels."
@@ -11,6 +11,7 @@
close_sound_volume = 50
paint_jobs = null
cutting_tool = /obj/item/crowbar
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 6)
/obj/structure/closet/crate/wooden/toy
name = "toy box"
+2
View File
@@ -12,6 +12,7 @@
anchored = TRUE
opacity = FALSE
density = FALSE
custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 2, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
/// used in making the icon state
var/icon_type = "bathroom"
var/open = TRUE
@@ -107,6 +108,7 @@
color = null
alpha = 255
opaque_closed = TRUE
custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
/obj/structure/curtain/cloth/atom_deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/cloth (loc, 4)
@@ -227,6 +227,7 @@
resistance_flags = FLAMMABLE
anchored = TRUE
density = FALSE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5)
///The airlock electronics inserted into the chassis, to be moved to the finished product.
var/obj/item/electronics/airlock/electronics
@@ -6,6 +6,7 @@
anchored = FALSE
density = TRUE
max_integrity = 200
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 4)
/// Airlock's current construction state
var/state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
var/base_name = "Airlock"
@@ -122,6 +122,7 @@
noglass = TRUE
material_type = /obj/item/stack/sheet/plasteel
material_amt = 4
custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 4)
/obj/structure/door_assembly/door_assembly_vault
name = "vault door assembly"
@@ -132,6 +133,7 @@
noglass = TRUE
material_type = /obj/item/stack/sheet/plasteel
material_amt = 6
custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 6)
/obj/structure/door_assembly/door_assembly_shuttle
name = "shuttle airlock assembly"
@@ -255,6 +257,7 @@
airlock_type = /obj/machinery/door/airlock/bronze
noglass = TRUE
material_type = /obj/item/stack/sheet/bronze
custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT * 4)
/obj/structure/door_assembly/door_assembly_bronze/seethru
airlock_type = /obj/machinery/door/airlock/bronze/seethru
@@ -282,6 +285,7 @@
noglass = TRUE
mineral = "titanium"
material_type = /obj/item/stack/sheet/mineral/titanium
custom_materials = list(/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 8)
/obj/structure/door_assembly/door_assembly_material/atom_deconstruct(disassembled = TRUE)
var/turf/target_turf = get_turf(src)
+1
View File
@@ -6,6 +6,7 @@
resistance_flags = FLAMMABLE
density = TRUE
anchored = TRUE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10)
/obj/structure/dresser/attackby(obj/item/I, mob/user, list/modifiers, list/attack_modifiers)
if(I.tool_behaviour == TOOL_WRENCH)
+2
View File
@@ -8,6 +8,7 @@
armor_type = /datum/armor/structure_fireaxecabinet
max_integrity = 150
integrity_failure = 0.33
custom_materials = /obj/item/wallframe/fireaxecabinet::custom_materials
/// Do we need to be unlocked to be opened.
var/locked = TRUE
/// Are we opened, can someone take the held item out.
@@ -221,6 +222,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/fireaxecabinet/empty, 32)
icon_state = "fireaxe"
result_path = /obj/structure/fireaxecabinet/empty
pixel_shift = 32
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 5.1, /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 5, /datum/material/iron = SMALL_MATERIAL_AMOUNT)
/obj/structure/fireaxecabinet/mechremoval
name = "mech removal tool cabinet"
+3
View File
@@ -11,6 +11,7 @@
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = SMOOTH_GROUP_GIRDER
canSmoothWith = SMOOTH_GROUP_GIRDER + SMOOTH_GROUP_WALLS
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
var/state = GIRDER_NORMAL
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
var/can_displace = TRUE //If the girder can be moved around by wrenching it
@@ -472,6 +473,7 @@
smoothing_flags = NONE
smoothing_groups = null
canSmoothWith = null
custom_materials = list(/datum/material/runedmetal = SHEET_MATERIAL_AMOUNT)
/obj/structure/girder/cult/attackby(obj/item/W, mob/user, list/modifiers, list/attack_modifiers)
add_fingerprint(user)
@@ -547,6 +549,7 @@
smoothing_flags = NONE
smoothing_groups = null
canSmoothWith = null
custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/girder/bronze/attackby(obj/item/W, mob/living/user, list/modifiers, list/attack_modifiers)
add_fingerprint(user)
+1
View File
@@ -15,6 +15,7 @@
armor_type = /datum/armor/structure_grille
max_integrity = 50
integrity_failure = 0.4
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
var/rods_type = /obj/item/stack/rods
var/rods_amount = 2
/// Whether or not we're disappearing but dramatically
@@ -42,6 +42,12 @@
buckle_lying = 0
buckle_prevents_pull = TRUE
layer = ABOVE_MOB_LAYER
custom_materials = list(
/datum/material/wood = SHEET_MATERIAL_AMOUNT * 20,
/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 3,
/datum/material/iron = SMALL_MATERIAL_AMOUNT,
/datum/material/glass = SMALL_MATERIAL_AMOUNT,
)
/// The sound the guillotine makes when it successfully cuts off a head
var/drop_sound = 'sound/items/weapons/guillotine.ogg'
/// The current state of the blade
@@ -5,6 +5,7 @@
icon_state = "punchingbag"
anchored = TRUE
layer = ABOVE_MOB_LAYER
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5)
///List of sounds that can be played when punched.
var/static/list/hit_sounds = list(
'sound/items/weapons/genhit1.ogg',
@@ -12,6 +12,7 @@
density = TRUE
anchored = TRUE
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7)
///How much we shift the user's pixel y when using the weight machine.
var/pixel_shift_z = -3
+3
View File
@@ -5,6 +5,7 @@
icon_state = "headpike"
density = FALSE
anchored = TRUE
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.15, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.65)
var/obj/item/spear/spear
var/obj/item/spear/speartype = /obj/item/spear
var/obj/item/bodypart/head/victim
@@ -12,10 +13,12 @@
/obj/structure/headpike/bone //for bone spears
icon_state = "headpike-bone"
speartype = /obj/item/spear/bonespear
custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 4)
/obj/structure/headpike/bamboo //for bamboo spears
icon_state = "headpike-bamboo"
speartype = /obj/item/spear/bamboospear
custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 25)
/obj/structure/headpike/military //for military spears
icon_state = "headpike-military"
@@ -8,6 +8,7 @@
density = TRUE
anchored = FALSE
max_integrity = 200
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5)
/obj/structure/kitchenspike_frame/Initialize(mapload)
. = ..()
@@ -74,6 +75,7 @@
buckle_lying = FALSE
can_buckle = TRUE
max_integrity = 250
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7)
/obj/structure/kitchenspike/Initialize(mapload)
. = ..()
+1
View File
@@ -7,6 +7,7 @@
base_icon_state = "ladder"
anchored = TRUE
obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 7.5)
///the ladder below this one
VAR_FINAL/obj/structure/ladder/down
///the ladder above this one
+1
View File
@@ -6,6 +6,7 @@
icon_state = "loom"
density = TRUE
anchored = TRUE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10)
/obj/structure/loom/Initialize(mapload)
. = ..()
@@ -250,6 +250,7 @@ at the cost of risking a vicious bite.**/
icon_state = "steam_vent"
anchored = TRUE
density = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.3, /datum/material/plastic = SMALL_MATERIAL_AMOUNT * 2)
/// How often does the vent reset the blow_steam cooldown.
var/steam_speed = 20 SECONDS
/// Is the steam vent active?
@@ -146,9 +146,11 @@
/obj/structure/mannequin/wood
material = MANNEQUIN_WOOD
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 25)
/obj/structure/mannequin/plastic
material = MANNEQUIN_PLASTIC
custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 25)
/obj/structure/mannequin/skeleton
name = "skeleton model"
+2 -4
View File
@@ -25,6 +25,7 @@
anchored = TRUE
integrity_failure = 0.5
max_integrity = 200
custom_materials = /obj/item/wallframe/mirror::custom_materials
///Can this mirror be removed from walls with tools?
var/deconstructable = TRUE
var/list/mirror_options = INERT_MIRROR_OPTIONS
@@ -350,10 +351,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28)
desc = "An unmounted mirror. Attach it to a wall to use."
icon = 'icons/obj/watercloset.dmi'
icon_state = "mirror"
custom_materials = list(
/datum/material/glass = SHEET_MATERIAL_AMOUNT,
/datum/material/silver = SHEET_MATERIAL_AMOUNT,
)
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 2)
result_path = /obj/structure/mirror
pixel_shift = 28
@@ -12,6 +12,7 @@
integrity_failure = 0.75
// This layer only matters for determining when you click it vs other objects
layer = BELOW_OPEN_DOOR_LAYER
custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 5)
/// If TRUE, we can't pass through unless the mob is resting (or fulfills more specific requirements)
var/require_resting = TRUE
/// Layer the flaps render on
+1
View File
@@ -18,6 +18,7 @@
anchored = TRUE
armor_type = /datum/armor/half_wall
material_flags = MATERIAL_EFFECTS | MATERIAL_AFFECT_STATISTICS
custom_materials = list(/datum/material/iron = PLATFORM_BASE_MATERIAL_AMOUNT)
/// Icon used for the frame
var/frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_normal.dmi'
/// Material used in our construction
+3 -1
View File
@@ -13,7 +13,7 @@
/// armor is a little bit less than a grille. max_integrity about half that of a grille.
armor_type = /datum/armor/structure_railing
max_integrity = 25
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
var/climbable = TRUE
///item released when deconstructed
var/item_deconstruct = /obj/item/stack/rods
@@ -32,6 +32,7 @@
icon_state = "railing_corner"
density = FALSE
climbable = FALSE
custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
/obj/structure/railing/corner/unbreakable
resistance_flags = INDESTRUCTIBLE
@@ -172,6 +173,7 @@
item_deconstruct = /obj/item/stack/sheet/mineral/wood
layer = ABOVE_MOB_LAYER
plane = GAME_PLANE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/railing/wooden_fence/Initialize(mapload)
. = ..()
@@ -5,6 +5,7 @@
desc = "A base for reflector assemblies."
anchored = FALSE
density = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5)
var/deflector_icon_state
var/mutable_appearance/deflector_overlay
var/finished = FALSE
@@ -209,6 +210,7 @@
finished = TRUE
buildstacktype = /obj/item/stack/sheet/rglass
buildstackamount = 10
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 10)
/obj/structure/reflector/double/anchored
anchored = TRUE
@@ -234,6 +236,7 @@
finished = TRUE
buildstacktype = /obj/item/stack/sheet/mineral/diamond
buildstackamount = 1
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10, /datum/material/diamond = SHEET_MATERIAL_AMOUNT)
/obj/structure/reflector/box/anchored
anchored = TRUE
+10 -3
View File
@@ -21,11 +21,13 @@ FLOOR SAFES
obj_flags = CONDUCTS_ELECTRICITY
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
custom_materials = list(
/datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT*10,
/datum/material/alloy/plastitanium = SHEET_MATERIAL_AMOUNT*5,
/datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT * 15,
/datum/material/alloy/plastitanium = SHEET_MATERIAL_AMOUNT * 8,
/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 6,
/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 3,
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 3,
)
material_flags = MATERIAL_EFFECTS
/// The maximum combined w_class of stuff in the safe
var/maxspace = 24
/// The amount of tumblers that will be generated
@@ -302,6 +304,11 @@ FLOOR SAFES
icon_state = "floorsafe"
density = FALSE
layer = LOW_OBJ_LAYER
custom_materials = list(
/datum/material/metalhydrogen = SHEET_MATERIAL_AMOUNT * 15,
/datum/material/alloy/plastitanium = SHEET_MATERIAL_AMOUNT * 8,
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.55,
)
/obj/structure/safe/floor/Initialize(mapload)
. = ..()
+3 -2
View File
@@ -10,8 +10,9 @@
obj_flags = CONDUCTS_ELECTRICITY
resistance_flags = FIRE_PROOF
custom_materials = list(
/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT*5,
/datum/material/titanium = SHEET_MATERIAL_AMOUNT*3,
/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 8,
/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 4,
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2,
)
material_flags = MATERIAL_EFFECTS
/// The lock code transferred from the structure
+1
View File
@@ -384,6 +384,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16))
icon_state = "shower_frame"
desc = "A shower frame, that needs a water recycler to finish construction."
anchored = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/showerframe/Initialize(mapload)
. = ..()
+2
View File
@@ -326,6 +326,7 @@
icon_state = "stairs_frame"
density = FALSE
anchored = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5)
/// What type of stack will this drop on deconstruction?
var/frame_stack = /obj/item/stack/rods
/// How much of frame_stack should this drop on deconstruction?
@@ -335,6 +336,7 @@
name = "wooden stairs frame"
desc = "Everything you need to build a staircase, minus the actual stairs. This one is made of wood."
frame_stack = /obj/item/stack/sheet/mineral/wood
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10)
/obj/structure/stairs_frame/Initialize(mapload)
. = ..()
+1
View File
@@ -6,6 +6,7 @@
icon_state = "iron"
anchored = TRUE
move_resist = INFINITY
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/steps/Initialize(mapload)
. = ..()
@@ -17,6 +17,7 @@
density = FALSE
anchored = FALSE
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
max_integrity = 100
var/framestack = /obj/item/stack/rods
var/framestackamount = 2
@@ -97,6 +98,7 @@
framestack = /obj/item/stack/sheet/mineral/wood
framestackamount = 2
resistance_flags = FLAMMABLE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/table_frame/wood/get_table_type(obj/item/stack/our_stack)
if(istype(our_stack, /obj/item/stack/sheet/mineral/wood))
+2 -1
View File
@@ -6,6 +6,7 @@
base_icon_state = "toiletbong"
density = FALSE
anchored = TRUE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.05, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.8)
var/smokeradius = 1
var/mutable_appearance/weed_overlay
@@ -93,9 +94,9 @@
if (!do_after(user, 10 SECONDS, target = src))
return FALSE
new /obj/item/flamethrower(get_turf(src))
new /obj/item/stack/sheet/iron(get_turf(src))
var/obj/item/tank/internals/plasma/ptank = new /obj/item/tank/internals/plasma(get_turf(src))
ptank.air_contents.gases[/datum/gas/plasma][MOLES] = (0)
drop_costum_materials()
qdel(src)
return TRUE
+1 -1
View File
@@ -9,7 +9,7 @@
icon_state = "votebox_maint"
anchored = TRUE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 15)
var/obj/item/card/id/owner //Slapping the box with this ID starts/ends the vote.
var/voting_active = FALSE //Voting or Maintenance Mode
@@ -6,6 +6,7 @@
base_icon_state = "toilet"
density = FALSE
anchored = TRUE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
/// Boolean if whether the toilet is currently flushing.
var/flushing = FALSE
@@ -17,10 +18,6 @@
var/w_items = 0
/// Reference to the mob being given a swirlie.
var/mob/living/swirlie
/// The type of material used to build the toilet.
var/buildstacktype = /obj/item/stack/sheet/iron
/// How much of the buildstacktype is needed to construct the toilet.
var/buildstackamount = 1
/// Lazylist of items in the cistern.
var/list/cistern_items
/// Lazylist of fish in the toilet, not to be mixed with the items in the cistern. Max of 3
@@ -238,11 +235,7 @@
/obj/structure/toilet/atom_deconstruct(dissambled = TRUE)
dump_contents()
if(buildstacktype)
new buildstacktype(loc,buildstackamount)
else
for(var/datum/material/M as anything in custom_materials)
new M.sheet_type(loc, FLOOR(custom_materials[M] / SHEET_MATERIAL_AMOUNT, 1))
drop_costum_materials()
if(has_water_reclaimer)
new /obj/item/stock_parts/water_recycler(drop_location())
@@ -396,7 +389,7 @@
/obj/structure/toilet/greyscale
material_flags = MATERIAL_EFFECTS | MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
buildstacktype = null
custom_materials = null
has_water_reclaimer = FALSE
/obj/structure/toilet/secret
@@ -409,3 +402,29 @@
secret.desc += " It's a secret!"
w_items += secret.w_class
LAZYADD(cistern_items, secret)
///A toilet made of meat that only drops remains when deconstructed, often unleashed unto this cursed plane of existence by hopeless people off'ing themselves with experi-scanners.
/obj/structure/toilet/greyscale/flesh
desc = "A horrendous mass of fused flesh resembling a standard-issue HT-451 model toilet. How it manages to function as one is beyond you. \
This one seems to be made out of the flesh of a devoted employee of the RnD department."
/obj/structure/toilet/greyscale/flesh/Initialize(mapload, mob/living/carbon/suicide)
. = ..()
///The suicide victim's brain that will be placed inside the toilet's cistern
var/obj/item/organ/brain/toilet_brain
if(suicide)
toilet_brain = suicide.get_organ_slot(ORGAN_SLOT_BRAIN)
suicide.gib(DROP_BRAIN) //we delete everything but the brain, as it's going to be moved to the cistern
set_custom_materials(list(GET_MATERIAL_REF(/datum/material/meat/mob_meat, suicide) = SHEET_MATERIAL_AMOUNT))
else
toilet_brain = new(drop_location())
set_custom_materials(list(/datum/material/meat = SHEET_MATERIAL_AMOUNT))
toilet_brain.forceMove(src)
w_items += toilet_brain.w_class
//this also prevents the toilet from dropping meat sheets. if you want to cheese the meat exepriments, sacrifice more people
/obj/structure/toilet/greyscale/flesh/atom_deconstruct(dissambled = TRUE)
for(var/obj/toilet_item in cistern_items)
toilet_item.forceMove(drop_location())
new /obj/effect/decal/remains/human(loc)
@@ -11,6 +11,7 @@
obj_flags = CAN_BE_HIT | BLOCKS_CONSTRUCTION_DIR | UNIQUE_RENAME | RENAME_NO_DESC
set_dir_on_move = FALSE
can_atmos_pass = ATMOS_PASS_PROC
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 5, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5)
/// Reference to the airlock electronics inside for determining window access.
var/obj/item/electronics/airlock/electronics = null
+10
View File
@@ -17,6 +17,7 @@
set_dir_on_move = FALSE
flags_ricochet = RICOCHET_HARD
receive_ricochet_chance_mod = 0.5
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT)
var/state = WINDOW_OUT_OF_FRAME
var/reinf = FALSE
var/heat_resistance = 800
@@ -495,6 +496,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/unanchored/spawner, 0)
glass_type = /obj/item/stack/sheet/rglass
rad_insulation = RAD_LIGHT_INSULATION
receive_ricochet_chance_mod = 1.1
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
//this is shitcode but all of construction is shitcode and needs a refactor, it works for now
//If you find this like 4 years later and construction still hasn't been refactored, I'm so sorry for this
@@ -630,6 +632,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/unanchored/spawner,
glass_type = /obj/item/stack/sheet/plasmaglass
rad_insulation = RAD_MEDIUM_INSULATION
glass_material_datum = /datum/material/alloy/plasmaglass
custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT)
/datum/armor/window_plasma
melee = 80
@@ -660,6 +663,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/plasma/spawner, 0)
glass_type = /obj/item/stack/sheet/plasmarglass
rad_insulation = RAD_HEAVY_INSULATION
glass_material_datum = /datum/material/alloy/plasmaglass
custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
/datum/armor/reinforced_plasma
melee = 80
@@ -705,6 +709,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw
smoothing_groups = SMOOTH_GROUP_WINDOW_FULLTILE
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE
glass_amount = 2
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/window/fulltile/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if(the_rcd.mode == RCD_DECONSTRUCT)
@@ -726,6 +731,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw
smoothing_groups = SMOOTH_GROUP_WINDOW_FULLTILE
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE
glass_amount = 2
custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/window/plasma/fulltile/unanchored
anchored = FALSE
@@ -743,6 +749,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw
smoothing_groups = SMOOTH_GROUP_WINDOW_FULLTILE
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE
glass_amount = 2
custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT * 2, /datum/material/iron = SHEET_MATERIAL_AMOUNT)
/obj/structure/window/reinforced/plasma/fulltile/unanchored
anchored = FALSE
@@ -763,6 +770,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw
smoothing_groups = SMOOTH_GROUP_WINDOW_FULLTILE
canSmoothWith = SMOOTH_GROUP_WINDOW_FULLTILE
glass_amount = 2
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 2, /datum/material/iron = SHEET_MATERIAL_AMOUNT)
/obj/structure/window/reinforced/fulltile/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if(the_rcd.mode == RCD_DECONSTRUCT)
@@ -1000,6 +1008,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/reinforced/tinted/frosted/spaw
icon = 'icons/obj/smooth_structures/structure_variations.dmi'
icon_state = "clockwork_window-single"
glass_type = /obj/item/stack/sheet/bronze
custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT * 1)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/bronze/spawner, 0)
@@ -1018,6 +1027,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/window/bronze/spawner, 0)
obj_flags = CAN_BE_HIT
max_integrity = 50
glass_amount = 2
custom_materials = list(/datum/material/bronze = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/window/bronze/fulltile/unanchored
anchored = FALSE