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-02 18:29:01 -05:00
committed by GitHub
parent 085007eae1
commit 0b0c5ea91e
272 changed files with 850 additions and 280 deletions
@@ -8,6 +8,7 @@
resistance_flags = FLAMMABLE
obj_flags = CAN_BE_HIT
item_flags = NO_PIXEL_RANDOM_DROP
custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT * 5)
/// If the cutout is pushed over and has to be righted
var/pushed_over = FALSE
/// If the cutout actually appears as what it portray and not a discolored version
+1
View File
@@ -2058,6 +2058,7 @@
worn_icon_state = "nothing"
resistance_flags = FLAMMABLE
slot_flags = ITEM_SLOT_ID
custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT)
///The "name" of the "owner" of this "ID"
var/scribbled_name
///The assignment written on this card.
+1
View File
@@ -24,6 +24,7 @@
actions_types = list(/datum/action/item_action/startchainsaw)
tool_behaviour = TOOL_SAW
toolspeed = 1.5 //Turn it on first you dork
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 3)
var/force_on = 24
/// The looping sound for our chainsaw when running
var/datum/looping_sound/chainsaw/chainsaw_loop
+4 -2
View File
@@ -163,7 +163,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
name = "firebrand"
desc = "An unlit firebrand. It makes you wonder why it's not just called a stick."
smoketime = 40 SECONDS
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
grind_results = list(/datum/reagent/carbon = 2)
/obj/item/match/firebrand/Initialize(mapload)
@@ -175,6 +175,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
desc = "A budget lighter done by using a battery and some aluminium. Hold tightly to ignite."
icon_state = "battery_unlit"
base_icon_state = "battery"
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 7, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5)
/obj/item/match/battery/attack_self(mob/living/user, modifiers)
. = ..()
@@ -932,6 +933,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
list_reagents = null
w_class = WEIGHT_CLASS_SMALL
choke_forever = TRUE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
///name of the stuff packed inside this pipe
var/packeditem
@@ -1009,7 +1011,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
inhand_icon_on = null
inhand_icon_off = null
lung_harm = 2
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 3)
///////////
//ROLLING//
+1
View File
@@ -229,6 +229,7 @@
inhand_icon_state = "gold_horn"
worn_icon_state = "horn_gold"
COOLDOWN_DECLARE(golden_horn_cooldown)
custom_materials = list(/datum/material/bananium = SHEET_MATERIAL_AMOUNT * 5)
/obj/item/bikehorn/golden/attack()
flip_mobs()
@@ -35,12 +35,14 @@
desc = "A stylish upgrade (?) to the intelliCard."
icon_state = "aitater"
base_icon_state = "aitater"
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5)
/obj/item/aicard/aispook
name = "intelliLantern"
desc = "A spoOoOoky upgrade to the intelliCard."
icon_state = "aispook"
base_icon_state = "aispook"
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5)
/obj/item/aicard/suicide_act(mob/living/user)
user.visible_message(span_suicide("[user] is trying to upload [user.p_them()]self into [src]! That's not going to work out well!"))
@@ -9,6 +9,7 @@
icon_state = "pressureplate"
layer = ABOVE_OPEN_TURF_LAYER
plane = FLOOR_PLANE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.75, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7)
var/trigger_mob = TRUE
var/trigger_item = FALSE
var/specific_item = null
@@ -197,7 +197,7 @@
icon_state = "intercom"
result_path = /obj/item/radio/intercom/unscrewed
pixel_shift = 26
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.75, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.25)
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
MAPPING_DIRECTIONAL_HELPERS(/obj/item/radio/intercom, 27)
@@ -404,6 +404,7 @@ effective or pretty fucking useless.
desc = "A jury-rigged device that disrupts nearby radio communication. Its crude construction provides a significantly smaller area of effect compared to its Syndicate counterpart."
range = 5
disruptor_range = 3
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5)
/obj/item/jammer/makeshift/Initialize(mapload)
. = ..()
+1 -1
View File
@@ -162,7 +162,7 @@
throwforce = 1
w_class = WEIGHT_CLASS_SMALL
force = 3
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.4)
custom_materials = null
max_water = 30
sprite_name = "coolant"
dog_fashion = null
+1
View File
@@ -83,6 +83,7 @@ GLOBAL_DATUM(bridge_axe, /obj/item/fireaxe)
icon_angle = 180
force_unwielded = 5
force_wielded = 23
custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 6)
/*
* Metal Hydrogen Axe
+1 -1
View File
@@ -12,7 +12,7 @@
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
custom_materials = list(/datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT * 0.5)
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.8)
resistance_flags = FIRE_PROOF
trigger_guard = TRIGGER_GUARD_NORMAL
light_system = OVERLAY_LIGHT
+1
View File
@@ -103,6 +103,7 @@
icon_state = "flatcart"
density = TRUE
opacity = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 8, /datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT)
/obj/structure/flatpack_cart/Initialize(mapload)
. = ..()
+1
View File
@@ -87,6 +87,7 @@
tastes = list("cheese" = 4, "royalty" = 1)
rat_heal = 70
crafting_complexity = FOOD_COMPLEXITY_3
custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT * 5)
//Curd cheese, a general term which I will now proceed to stretch as thin as the toppings on a supermarket sandwich:
//I'll use it as a substitute for ricotta, cottage cheese and quark, as well as any other non-aged, soft grainy cheese
@@ -270,6 +270,7 @@
tastes = list("bread" = 1, "meat" = 1, "tomato sauce" = 1, "death" = 1)
foodtypes = MEAT|VEGETABLES|GRAIN
eat_time = 4 SECONDS // Makes it harder to force-feed this to people as a weapon, as funny as that is.
custom_materials = list(/datum/material/meat = MEATSLAB_MATERIAL_AMOUNT * 2)
var/static/list/correct_clothing = list(/obj/item/clothing/under/rank/civilian/cookjorts, /obj/item/clothing/under/shorts/jeanshorts)
/obj/item/food/sandwich/death/Initialize(mapload)
@@ -6,6 +6,7 @@
inhand_icon_state = "flashbang"
w_class = WEIGHT_CLASS_SMALL
force = 2
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
/// Which stage of construction this grenade is currently at.
var/stage = GRENADE_EMPTY
/// The set of reagent containers that have been added to this grenade casing.
@@ -16,6 +16,7 @@
shrapnel_type = /obj/projectile/bullet/shrapnel/ied
det_time = 225 SECONDS //this is handled by assemblies now
display_timer = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.65, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2)
/// Explosive power
var/power = 5
/// Our assembly that when activated causes us to explode
@@ -14,6 +14,7 @@
w_class = WEIGHT_CLASS_BULKY
drop_sound = 'sound/items/handling/ammobox_drop.ogg'
pickup_sound = 'sound/items/handling/ammobox_pickup.ogg'
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6)
/// How many times we can use this maintenance kit to maintain a gun
var/uses = 3
/// THe maximum uses, used for our examine text.
+4 -1
View File
@@ -208,7 +208,7 @@
var/cable_color = CABLE_COLOR_RED
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
custom_materials = list(/datum/material/iron= SMALL_MATERIAL_AMOUNT * 1.5, /datum/material/glass= SMALL_MATERIAL_AMOUNT * 0.75)
custom_materials = list(/datum/material/iron= SMALL_MATERIAL_AMOUNT * 1.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5)
breakouttime = 30 SECONDS
cuffsound = 'sound/items/weapons/cablecuff.ogg'
pickup_sound = null
@@ -572,6 +572,7 @@
righthand_file = 'icons/mob/inhands/weapons/thrown_righthand.dmi'
breakouttime = 3.5 SECONDS//easy to apply, easy to break out of
gender = NEUTER
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6.1, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5)
///Amount of time to knock the target down for once it's hit in deciseconds.
var/knockdown = 0
///Reference of the mob we will attempt to snare
@@ -624,6 +625,7 @@
inhand_icon_state = "bola_r"
breakouttime = 7 SECONDS
knockdown = 3.5 SECONDS
custom_materials = list(/datum/material/alloy/plasteel = SHEET_MATERIAL_AMOUNT * 6.1, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7)
/**
* A security variant of the bola.
@@ -639,6 +641,7 @@
w_class = WEIGHT_CLASS_SMALL
breakouttime = 6 SECONDS
custom_price = PAYCHECK_COMMAND * 0.35
custom_materials = null
/obj/item/restraints/legcuffs/bola/energy/Initialize(mapload)
. = ..()
+1
View File
@@ -336,6 +336,7 @@
icon_state = "bananium_inspector"
w_class = WEIGHT_CLASS_SMALL
max_mode = BANANIUM_CLOWN_INSPECTOR_PRINT_SOUND_MODE_LAST
custom_materials = list(/datum/material/bananium = SHEET_MATERIAL_AMOUNT * 5)
///How many more times can we print?
var/paper_charges = 32
///Max value of paper_charges
+1 -1
View File
@@ -167,7 +167,7 @@
throwforce = 5
throw_speed = 3
throw_range = 7
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 1.5)
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 2)
resistance_flags = FLAMMABLE
w_class = WEIGHT_CLASS_NORMAL
attack_verb_continuous = list("bashes", "batters", "bludgeons", "thrashes", "whacks")
+5 -5
View File
@@ -217,7 +217,7 @@
obj_flags = parent_type::obj_flags & ~CONDUCTS_ELECTRICITY
force = 15
throwforce = 15
custom_materials = null
custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 2)
/datum/embedding/combat_knife/weak
embed_chance = 35
@@ -245,7 +245,7 @@
attack_verb_continuous = list("shanks", "shivs")
attack_verb_simple = list("shank", "shiv")
armor_type = /datum/armor/none
custom_materials = list(/datum/material/glass = SMALL_MATERIAL_AMOUNT * 4)
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT)
/obj/item/knife/shiv/make_stabby()
AddComponent(/datum/component/alternative_sharpness, SHARP_POINTY, alt_continuous, alt_simple, -3)
@@ -258,7 +258,7 @@
force = 9
throwforce = 13
armor_type = /datum/armor/shiv_plasma
custom_materials = list(/datum/material/glass=SMALL_MATERIAL_AMOUNT *4, /datum/material/plasma=SMALL_MATERIAL_AMOUNT * 2)
custom_materials = list(/datum/material/alloy/plasmaglass = SHEET_MATERIAL_AMOUNT)
/datum/armor/shiv_plasma
melee = 25
@@ -278,7 +278,7 @@
throw_range = 7
wound_bonus = 10
armor_type = /datum/armor/shiv_titanium
custom_materials = list(/datum/material/glass=SMALL_MATERIAL_AMOUNT * 4, /datum/material/titanium=SMALL_MATERIAL_AMOUNT * 2)
custom_materials = list(/datum/material/alloy/titaniumglass = SHEET_MATERIAL_AMOUNT)
/datum/armor/shiv_titanium
melee = 25
@@ -301,7 +301,7 @@
wound_bonus = 10
exposed_wound_bonus = 20
armor_type = /datum/armor/shiv_plastitanium
custom_materials = list(/datum/material/glass= SMALL_MATERIAL_AMOUNT * 4, /datum/material/alloy/plastitanium= SMALL_MATERIAL_AMOUNT * 2)
custom_materials = list(/datum/material/alloy/plastitaniumglass = SHEET_MATERIAL_AMOUNT)
/datum/armor/shiv_plastitanium
melee = 50
+1
View File
@@ -15,6 +15,7 @@
w_class = WEIGHT_CLASS_TINY
throw_speed = 1
throw_range = 7
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.2, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.2)
var/state = DEFLATED
var/datum/gas_mixture/air_contents = null
+2
View File
@@ -836,6 +836,7 @@
slot_flags = ITEM_SLOT_BACK
convertible = FALSE
active_changes_inhand = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.15, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2)
var/obj/item/assembly/igniter/sparkler
///Determines whether or not we can improve the cattleprod into a new type. Prevents turning the cattleprod subtypes into different subtypes, or wasting materials on making it....another version of itself.
var/can_upgrade = TRUE
@@ -925,6 +926,7 @@
inhand_icon_state = "teleprod"
slot_flags = null
can_upgrade = FALSE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.15, /datum/material/bluespace = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 2)
/obj/item/melee/baton/security/cattleprod/teleprod/clumsy_check(mob/living/carbon/human/user)
. = ..()
@@ -75,6 +75,7 @@
icon_state = "tailwhip"
inhand_icon_state = "tailwhip"
item_flags = NONE
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.1, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.1)
/obj/item/melee/chainofcommand/tailwhip/kitty
name = "cat o' nine tails"
+1
View File
@@ -243,6 +243,7 @@
armour_penetration = 1000
force_string = "INFINITE"
item_flags = NEEDS_PERMIT|NO_BLOOD_ON_ITEM
custom_materials = list(/datum/material/adamantine = SHEET_MATERIAL_AMOUNT * 20, /datum/material/iron = SHEET_MATERIAL_AMOUNT)
var/obj/machinery/power/supermatter_crystal/shard
var/balanced = 1
+1
View File
@@ -220,6 +220,7 @@ GLOBAL_LIST_EMPTY(sniffable_sheets)
desc = "A handheld tracking device that locates sheets of glass and iron."
icon_state = "pinpointer_sniffer"
worn_icon_state = "pinpointer_black"
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.8, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7)
/obj/item/pinpointer/material_sniffer/scan_for_target()
if(target || !GLOB.sniffable_sheets.len)
@@ -20,6 +20,7 @@
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
armor_type = /datum/armor/item_pneumatic_cannon
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 6)
var/maxWeightClass = 20 //The max weight of items that can fit into the cannon
var/loadedWeightClass = 0 //The weight of items currently in the cannon
var/obj/item/tank/internals/tank = null //The gas tank that is drawn from to fire things
+1
View File
@@ -324,6 +324,7 @@
max_amount = 30
name = "makeshift rapid pipe cleaner layer"
ghetto = TRUE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 15)
/obj/item/rcl/ghetto/update_icon_state()
if(!loaded)
+1
View File
@@ -9,6 +9,7 @@
attack_verb_simple = list("forcefully inspire", "violently encourage", "relentlessly galvanize")
lefthand_file = 'icons/mob/inhands/equipment/banners_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/banners_righthand.dmi'
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
var/inspiration_available = TRUE //If this banner can be used to inspire crew
var/morale_time = 0
var/morale_cooldown = 600 //How many deciseconds between uses
+5 -3
View File
@@ -117,7 +117,7 @@
desc = "A medieval wooden buckler."
icon_state = "buckler"
inhand_icon_state = "buckler"
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 10)
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 20)
resistance_flags = FLAMMABLE
block_chance = 30
max_integrity = 55
@@ -131,6 +131,7 @@
block_chance = 40
max_integrity = 40
w_class = WEIGHT_CLASS_NORMAL
custom_materials = null
/obj/item/shield/kite
name = "kite shield"
@@ -167,7 +168,7 @@
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder, less so bullets and laser beams."
icon_state = "riot"
inhand_icon_state = "riot"
custom_materials = list(/datum/material/glass= SHEET_MATERIAL_AMOUNT * 3.75, /datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/glass= SHEET_MATERIAL_AMOUNT * 4.05, /datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.8)
transparent = TRUE
max_integrity = 75
shield_break_sound = 'sound/effects/glass/glassbr3.ogg'
@@ -203,6 +204,7 @@
icon_state = "flashshield"
inhand_icon_state = "flashshield"
var/obj/item/assembly/flash/handheld/embedded_flash = /obj/item/assembly/flash/handheld
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5.1, /datum/material/glass= SHEET_MATERIAL_AMOUNT * 4.35)
/obj/item/shield/riot/flash/Initialize(mapload)
. = ..()
@@ -479,7 +481,7 @@
desc = "A crude shield made out of several sheets of iron taped together, not very durable."
icon_state = "improvised"
inhand_icon_state = "improvised"
custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT * 2)
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10)
max_integrity = 35
shield_break_leftover = /obj/item/stack/rods/two
armor_type = /datum/armor/item_shield/improvised
+1 -1
View File
@@ -10,7 +10,7 @@
attack_verb_continuous = list("bashes", "smacks")
attack_verb_simple = list("bash", "smack")
resistance_flags = FLAMMABLE
custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT * 2, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
var/label = ""
COOLDOWN_DECLARE(picket_sign_cooldown)
+1
View File
@@ -10,6 +10,7 @@
w_class = WEIGHT_CLASS_NORMAL
attack_verb_continuous = list("smacks", "whacks", "slams", "smashes")
attack_verb_simple = list("smack", "whack", "slam", "smash")
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 10)
///The vehicle counterpart for the board
var/board_item_type = /obj/vehicle/ridden/scooter/skateboard
+3 -6
View File
@@ -16,7 +16,7 @@
demolition_mod = 0.75 // Note: This is significant, as this needs to be low enough that any possible force adjustments from better spears does not go over airlock deflection. See AIRLOCK_DAMAGE_DEFLECTION_N.
embed_type = /datum/embedding/spear
armour_penetration = 5
custom_materials = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT, /datum/material/glass= HALF_SHEET_MATERIAL_AMOUNT * 2)
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.65, /datum/material/glass= SHEET_MATERIAL_AMOUNT * 1.15)
hitsound = 'sound/items/weapons/bladeslice.ogg'
attack_verb_continuous = list("attacks", "pokes", "jabs", "tears", "lacerates", "gores")
attack_verb_simple = list("attack", "poke", "jab", "tear", "lacerate", "gore")
@@ -96,7 +96,6 @@
if(/obj/item/shard/plasma)
force = 11
throwforce = 21
custom_materials = list(/datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT, /datum/material/alloy/plasmaglass= HALF_SHEET_MATERIAL_AMOUNT * 2)
icon_prefix = "spearplasma"
modify_max_integrity(220)
wound_bonus = -10
@@ -115,7 +114,6 @@
throwforce = 22
throw_range = 8
throw_speed = 5
custom_materials = list(/datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT, /datum/material/alloy/titaniumglass= HALF_SHEET_MATERIAL_AMOUNT * 2)
modify_max_integrity(230)
wound_bonus = -5
force_unwielded = 12
@@ -135,7 +133,6 @@
throwforce = 23
throw_range = 9
throw_speed = 5
custom_materials = list(/datum/material/iron= HALF_SHEET_MATERIAL_AMOUNT, /datum/material/alloy/plastitaniumglass= HALF_SHEET_MATERIAL_AMOUNT * 2)
modify_max_integrity(240)
wound_bonus = 0
exposed_wound_bonus = 20
@@ -307,7 +304,7 @@
icon_prefix = "bone_spear"
throwforce = 22
armour_penetration = 20 //Enhanced armor piercing
custom_materials = list(/datum/material/bone = HALF_SHEET_MATERIAL_AMOUNT * 7)
custom_materials = list(/datum/material/bone = SHEET_MATERIAL_AMOUNT * 4)
force_unwielded = 12
force_wielded = 20
spear_leftovers = /obj/item/stack/sheet/bone
@@ -331,7 +328,7 @@
desc = "A haphazardly-constructed bamboo stick with a sharpened tip, ready to poke holes into unsuspecting people."
throwforce = 23 //Better to throw
custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 20)
custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 25)
spear_leftovers = /obj/item/stack/sheet/mineral/bamboo
/obj/item/spear/bamboospear/add_headpike_component()
+2 -2
View File
@@ -11,7 +11,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
new/datum/stack_recipe("ladder", /obj/structure/ladder/crafted, 15, time = 15 SECONDS, crafting_flags = CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \
new/datum/stack_recipe("catwalk floor tile", /obj/item/stack/tile/catwalk_tile, 1, 4, 20, category = CAT_TILES), \
new/datum/stack_recipe("stairs frame", /obj/structure/stairs_frame, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \
new/datum/stack_recipe("probing cane", /obj/item/cane/white, 3, time = 1 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY, category = CAT_TOOLS), \
new/datum/stack_recipe("probing cane", /obj/item/cane/white, 3, time = 1 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_TOOLS), \
new/datum/stack_recipe("sharpened iron rod", /obj/item/ammo_casing/rebar, 1, time = 0.2 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY, category = CAT_WEAPON_AMMO), \
))
@@ -28,7 +28,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
throw_speed = 3
throw_range = 7
demolition_mod = 1.25
mats_per_unit = list(/datum/material/iron=HALF_SHEET_MATERIAL_AMOUNT)
mats_per_unit = list(/datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
max_amount = 50
attack_verb_continuous = list("hits", "bludgeons", "whacks")
attack_verb_simple = list("hit", "bludgeon", "whack")
@@ -146,7 +146,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
null, \
new/datum/stack_recipe("directional reinforced window", /obj/structure/window/reinforced/unanchored, time = 0.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_CHECK_DIRECTION, category = CAT_WINDOWS), \
new/datum/stack_recipe("fulltile reinforced window", /obj/structure/window/reinforced/fulltile/unanchored, 2, time = 2 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_IS_FULLTILE, category = CAT_WINDOWS), \
new/datum/stack_recipe("glass shard", /obj/item/shard, time = 10, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND, category = CAT_MISC), \
new/datum/stack_recipe("glass shard", /obj/item/shard, time = 10, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_MISC), \
new/datum/stack_recipe("reinforced glass tile", /obj/item/stack/tile/rglass, 1, 4, 20, category = CAT_TILES) \
))
@@ -185,7 +185,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
GLOBAL_LIST_INIT(prglass_recipes, list ( \
new/datum/stack_recipe("directional reinforced window", /obj/structure/window/reinforced/plasma/unanchored, time = 0.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_CHECK_DIRECTION, category = CAT_WINDOWS), \
new/datum/stack_recipe("fulltile reinforced window", /obj/structure/window/reinforced/plasma/fulltile/unanchored, 2, time = 2 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_IS_FULLTILE, category = CAT_WINDOWS), \
new/datum/stack_recipe("plasma glass shard", /obj/item/shard/plasma, time = 40, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND, category = CAT_MISC), \
new/datum/stack_recipe("plasma glass shard", /obj/item/shard/plasma, time = 40, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_SKIP_MATERIALS_PARITY, category = CAT_MISC), \
new/datum/stack_recipe("reinforced plasma glass tile", /obj/item/stack/tile/rglass/plasma, 1, 4, 20, category = CAT_TILES) \
))
@@ -377,6 +377,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
to_chat(user, span_notice("You begin to wrap the [cloth] around the [src]..."))
if(do_after(user, craft_time, target = src))
var/obj/item/knife/shiv/shiv = new shiv_type
shiv.set_custom_materials(custom_materials)
cloth.use(1)
to_chat(user, span_notice("You wrap the [cloth] around the [src], forming a makeshift weapon."))
remove_item_from_storage(src, user)
@@ -12,6 +12,7 @@
obj_flags = CONDUCTS_ELECTRICITY
max_amount = 60
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/copper = 5)
mats_per_unit = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.05)
merge_type = /obj/item/stack/light_w
/obj/item/stack/light_w/examine(mob/user)
@@ -24,9 +24,9 @@ Mineral Sheets
*/
GLOBAL_LIST_INIT(sandstone_recipes, list ( \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \
new/datum/stack_recipe("sandstone platform", /obj/structure/platform/sandstone, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \
new/datum/stack_recipe("Breakdown into sand", /obj/item/stack/ore/glass, 1, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND, category = CAT_MISC), \
new/datum/stack_recipe("Breakdown into sand", /obj/item/stack/ore/glass, 1, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ON_SOLID_GROUND | CRAFT_NO_MATERIALS, category = CAT_MISC), \
))
/obj/item/stack/sheet/mineral/sandstone
@@ -108,7 +108,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
walltype = /turf/closed/wall/mineral/diamond
GLOBAL_LIST_INIT(diamond_recipes, list ( \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \
new/datum/stack_recipe("diamond tile", /obj/item/stack/tile/mineral/diamond, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \
))
@@ -139,7 +139,7 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \
walltype = /turf/closed/wall/mineral/uranium
GLOBAL_LIST_INIT(uranium_recipes, list ( \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \
new/datum/stack_recipe("depleted uranium platform", /obj/structure/platform/uranium, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \
new/datum/stack_recipe("uranium tile", /obj/item/stack/tile/mineral/uranium, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \
))
@@ -180,7 +180,7 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \
return TOXLOSS//dont you kids know that stuff is toxic?
GLOBAL_LIST_INIT(plasma_recipes, list ( \
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \
new/datum/stack_recipe("plasma tile", /obj/item/stack/tile/mineral/plasma, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \
))
@@ -214,7 +214,7 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
walltype = /turf/closed/wall/mineral/gold
GLOBAL_LIST_INIT(gold_recipes, list ( \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \
new/datum/stack_recipe("golden platform", /obj/structure/platform/gold, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \
new/datum/stack_recipe("gold tile", /obj/item/stack/tile/mineral/gold, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \
new/datum/stack_recipe("blank plaque", /obj/item/plaque, 1, crafting_flags = NONE, category = CAT_FURNITURE), \
@@ -246,7 +246,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \
walltype = /turf/closed/wall/mineral/silver
GLOBAL_LIST_INIT(silver_recipes, list ( \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \
new/datum/stack_recipe("silver platform", /obj/structure/platform/silver, 2, time = 3 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, trait_booster = TRAIT_QUICK_BUILD, trait_modifier = 0.75, category = CAT_STRUCTURE), \
new/datum/stack_recipe("silver tile", /obj/item/stack/tile/mineral/silver, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \
))
@@ -145,7 +145,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
new/datum/stack_recipe("tram controller frame", /obj/item/wallframe/tram, 20, crafting_flags = NONE, category = CAT_STRUCTURE), \
new/datum/stack_recipe("tram display frame", /obj/item/wallframe/indicator_display, 7, crafting_flags = NONE, category = CAT_STRUCTURE), \
null, \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_APPLIES_MATS, category = CAT_DOORS), \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_DOORS), \
new/datum/stack_recipe("filing cabinet", /obj/structure/filingcabinet, 2, time = 10 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_FURNITURE), \
new/datum/stack_recipe("desk bell", /obj/structure/desk_bell, 2, time = 3 SECONDS, crafting_flags = NONE, category = CAT_FURNITURE), \
new/datum/stack_recipe("floodlight frame", /obj/structure/floodlight_frame, 5, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_STRUCTURE), \
@@ -373,7 +373,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
new/datum/stack_recipe("rake", /obj/item/cultivator/rake, 5, time = 1 SECONDS, crafting_flags = NONE, category = CAT_TOOLS),\
new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_CONTAINERS),\
new/datum/stack_recipe("wooden crate", /obj/structure/closet/crate/wooden, 6, time = 5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_FURNITURE),\
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 1.5 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_MELEE),\
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 1.5 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_MELEE, removed_mats = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 1.5)),\
new/datum/stack_recipe("wooden crutch", /obj/item/cane/crutch/wood, 5, time = 1.5 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_MELEE),\
new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 1.5 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_TOOLS), \
new/datum/stack_recipe("mortar", /obj/item/reagent_containers/cup/mortar, 3, crafting_flags = NONE, category = CAT_CHEMISTRY), \
@@ -451,7 +451,7 @@ GLOBAL_LIST_INIT(bamboo_recipes, list ( \
new/datum/stack_recipe("bamboo spear", /obj/item/spear/bamboospear, 25, time = 9 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_MELEE), \
new/datum/stack_recipe("blow gun", /obj/item/gun/syringe/blowgun, 10, time = 7 SECONDS, crafting_flags = NONE, category = CAT_WEAPON_RANGED), \
new/datum/stack_recipe("crude syringe", /obj/item/reagent_containers/syringe/crude, 5, time = 1 SECONDS, crafting_flags = NONE, category = CAT_CHEMISTRY), \
new/datum/stack_recipe("rice hat", /obj/item/clothing/head/costume/rice_hat, 10, time = 7 SECONDS, crafting_flags = NONE, category = CAT_CLOTHING), \
new/datum/stack_recipe("rice hat", /obj/item/clothing/head/costume/rice_hat, 10, time = 7 SECONDS, crafting_flags = CRAFT_SKIP_MATERIALS_PARITY, category = CAT_CLOTHING), \
null, \
new/datum/stack_recipe("bamboo stool", /obj/structure/chair/stool/bamboo, 2, time = 1 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, category = CAT_FURNITURE), \
new/datum/stack_recipe("bamboo mat piece", /obj/item/stack/tile/bamboo, 1, 4, 20, crafting_flags = NONE, category = CAT_TILES), \
@@ -802,11 +802,6 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
. = ..()
. += GLOB.bronze_recipes
/obj/item/stack/sheet/paperframes/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1)
. = ..()
pixel_x = 0
pixel_y = 0
/obj/item/stack/sheet/bronze/thirty
amount = 30
@@ -881,7 +876,7 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, time = 4 SECONDS, category = CAT_FURNITURE), \
new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/cup/glass/waterbottle/empty, crafting_flags = NONE, category = CAT_CONTAINERS), \
new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/cup/glass/waterbottle/large/empty, 3, crafting_flags = NONE, category = CAT_CONTAINERS), \
new /datum/stack_recipe("colo cups", /obj/item/reagent_containers/cup/glass/colocup, 1, crafting_flags = NONE, category = CAT_CONTAINERS), \
new /datum/stack_recipe("colo cups", /obj/item/reagent_containers/cup/glass/colocup, 1, crafting_flags = NONE, category = CAT_CONTAINERS, removed_mats = list(/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT)), \
new /datum/stack_recipe("mannequin", /obj/structure/mannequin/plastic, 25, time = 5 SECONDS, crafting_flags = CRAFT_ONE_PER_TURF, category = CAT_ENTERTAINMENT), \
new /datum/stack_recipe("wet floor sign", /obj/item/clothing/suit/caution, 2, crafting_flags = NONE, category = CAT_EQUIPMENT), \
new /datum/stack_recipe("warning cone", /obj/item/clothing/head/cone, 2, crafting_flags = NONE, category = CAT_EQUIPMENT), \
+28 -20
View File
@@ -94,12 +94,11 @@
if(merge)
. = INITIALIZE_HINT_LATELOAD
var/materials_mult = amount
if(LAZYLEN(mat_override))
materials_mult *= mat_amt
mats_per_unit = mat_override
if(LAZYLEN(mats_per_unit))
initialize_materials(mats_per_unit, materials_mult)
mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(mats_per_unit, mat_amt)
initialize_materials(mats_per_unit, amount)
recipes = get_main_recipes().Copy()
if(material_type)
@@ -120,6 +119,10 @@
/obj/item/stack/LateInitialize()
merge_with_loc()
/obj/item/stack/Destroy()
mats_per_unit = null
return ..()
/obj/item/stack/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change)
. = ..()
if((!throwing || throwing.target_turf == loc) && old_loc != loc && (flags_1 & INITIALIZED_1))
@@ -160,11 +163,6 @@
other_stack = find_other_stack(already_found, TRUE)
return TRUE
/obj/item/stack/apply_material_effects(list/materials)
. = ..()
if(amount)
mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(materials, 1/amount)
/obj/item/stack/blend_requirements()
if(is_cyborg)
to_chat(usr, span_warning("[src] is too integrated into your chassis and can't be ground up!"))
@@ -417,7 +415,7 @@
#undef FULL_LIST
/// Makes the item with the given recipe.
/obj/item/stack/proc/make_item(mob/builder, datum/stack_recipe/recipe, multiplier)
/obj/item/stack/proc/make_item(mob/builder, datum/stack_recipe/recipe, multiplier = 1)
if(get_amount() < 1 && !is_cyborg) //sanity check as this shouldn't happen
qdel(src)
return
@@ -456,8 +454,6 @@
return
created = covered_turf.place_on_top(recipe.result_type, flags = CHANGETURF_INHERIT_AIR)
builder.balloon_alert(builder, "placed [ispath(recipe.result_type, /turf/open) ? "floor" : "wall"]")
if((recipe.crafting_flags & CRAFT_APPLIES_MATS) && LAZYLEN(mats_per_unit))
created.set_custom_materials(mats_per_unit, recipe.req_amount / recipe.res_amount)
else
created = new recipe.result_type(builder.drop_location())
@@ -468,17 +464,30 @@
if(ismovable(created))
created.setDir(builder.dir)
created.on_craft_completion(list(used_stack), null, builder)
qdel(used_stack) //you've outlived your purpose
builder.investigate_log("crafted [recipe.title]", INVESTIGATE_CRAFTING)
// Apply mat datums
if((recipe.crafting_flags & CRAFT_APPLIES_MATS) && LAZYLEN(mats_per_unit))
if(LAZYLEN(mats_per_unit) && !(recipe.crafting_flags & CRAFT_NO_MATERIALS))
var/list/result_mats = mats_per_unit.Copy()
for(var/mat in recipe.removed_mats)
var/to_remove = recipe.removed_mats[mat]
var/datum/material/ref_mat = locate(mat) in result_mats
if(!ref_mat)
continue
if(result_mats[ref_mat] < to_remove)
result_mats -= ref_mat
else
result_mats[ref_mat] -= to_remove
if(isstack(created))
var/obj/item/stack/crafted_stack = created
crafted_stack.set_custom_materials(mats_per_unit, (recipe.req_amount / recipe.res_amount) * crafted_stack.amount)
crafted_stack.mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(result_mats)
update_custom_materials()
else
created.set_custom_materials(mats_per_unit, recipe.req_amount / recipe.res_amount)
created.set_custom_materials(result_mats, recipe.req_amount * multiplier)
qdel(used_stack) //you've outlived your purpose
// We could be qdeleted - like if it's a stack and has already been merged
if(QDELETED(created))
@@ -573,11 +582,10 @@
if (amount < used)
return FALSE
amount -= used
if(check && is_zero_amount(delete_if_zero = TRUE))
return TRUE
update_custom_materials()
update_appearance()
update_weight()
if(!is_zero_amount(delete_if_zero = check))
update_custom_materials()
update_appearance()
update_weight()
return TRUE
/obj/item/stack/tool_use_check(mob/living/user, amount, heat_required)
@@ -25,6 +25,8 @@
var/trait_modifier = 1
/// Category for general crafting menu
var/category
/// The amount of material to remove from the recipe's result
var/list/removed_mats
///crafting_flags var to hold bool values
var/crafting_flags = CRAFT_CHECK_DENSITY
@@ -41,6 +43,7 @@
trait_booster,
trait_modifier = 1,
category,
list/removed_mats,
)
src.title = title
@@ -55,6 +58,8 @@
src.trait_modifier = trait_modifier
src.category = src.category || category || CAT_MISC
src.removed_mats = removed_mats
// We create base64 image only if item have color. Otherwise use icon_ref for TGUI
var/obj/item/result = result_type
var/paint = result::color
@@ -8,6 +8,7 @@
attack_verb_simple = list("bash", "batter", "bludgeon", "thrash", "smash")
turf_type = /turf/open/floor/light
merge_type = /obj/item/stack/tile/light
mats_per_unit = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.05)
var/state = 0
/obj/item/stack/tile/light/attackby(obj/item/O, mob/user, list/modifiers, list/attack_modifiers)
@@ -230,3 +230,4 @@
turf_type = /turf/open/floor/fake_snow
mineralType = "snow"
merge_type = /obj/item/stack/tile/mineral/snow
mats_per_unit = list(/datum/material/snow = HALF_SHEET_MATERIAL_AMOUNT / 2)
@@ -137,6 +137,7 @@
/obj/item/stack/tile/wood/tile,
/obj/item/stack/tile/wood/parquet,
)
mats_per_unit = list(/datum/material/wood = HALF_SHEET_MATERIAL_AMOUNT / 2)
/obj/item/stack/tile/wood/parquet
name = "parquet wood floor tile"
@@ -175,6 +176,7 @@
/obj/item/stack/tile/bamboo/tatami/purple,
/obj/item/stack/tile/bamboo/tatami/black,
)
mats_per_unit = list(/datum/material/bamboo = HALF_SHEET_MATERIAL_AMOUNT / 2)
/obj/item/stack/tile/bamboo/tatami
name = "Tatami with green rim"
@@ -207,6 +209,7 @@
inhand_icon_state = "tile-basalt"
turf_type = /turf/open/floor/fakebasalt
merge_type = /obj/item/stack/tile/basalt
mats_per_unit = list(/datum/material/sand = SHEET_MATERIAL_AMOUNT * 2)
//Carpets
/obj/item/stack/tile/carpet
@@ -1079,6 +1082,7 @@
/obj/item/stack/tile/circuit/green,
/obj/item/stack/tile/circuit/red,
)
mats_per_unit = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 1.05, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.05)
/obj/item/stack/tile/circuit/green
name = "green circuit tile"
@@ -1142,7 +1146,7 @@
singular_name = "plastic floor tile"
desc = "A tile of cheap, flimsy plastic flooring."
icon_state = "tile_plastic"
mats_per_unit = list(/datum/material/plastic=SMALL_MATERIAL_AMOUNT*5)
mats_per_unit = list(/datum/material/plastic = HALF_SHEET_MATERIAL_AMOUNT / 2)
turf_type = /turf/open/floor/plastic
merge_type = /obj/item/stack/tile/plastic
@@ -1191,13 +1195,13 @@
desc = "A clangy tile made of high-quality bronze. Clockwork construction techniques allow the clanging to be minimized."
icon_state = "tile_brass"
turf_type = /turf/open/floor/bronze
mats_per_unit = list(/datum/material/bronze=SMALL_MATERIAL_AMOUNT*5)
mats_per_unit = list(/datum/material/bronze = HALF_SHEET_MATERIAL_AMOUNT / 2)
merge_type = /obj/item/stack/tile/bronze
tile_reskin_types = list(
/obj/item/stack/tile/bronze,
/obj/item/stack/tile/bronze/flat,
/obj/item/stack/tile/bronze/filled,
)
)
/obj/item/stack/tile/bronze/flat
name = "flat bronze tile"
@@ -1257,7 +1261,7 @@
desc = "Flooring that shows its contents underneath. Engineers love it!"
icon_state = "maint_catwalk"
inhand_icon_state = "tile-catwalk"
mats_per_unit = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT)
mats_per_unit = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 1.2)
turf_type = /turf/open/floor/catwalk_floor
merge_type = /obj/item/stack/tile/catwalk_tile //Just to be cleaner, these all stack with each other
tile_reskin_types = list(
@@ -1324,7 +1328,7 @@
inhand_icon_state = "tile-rglass"
turf_type = /turf/open/floor/glass/reinforced
merge_type = /obj/item/stack/tile/rglass
mats_per_unit = list(/datum/material/iron=SHEET_MATERIAL_AMOUNT * 0.125, /datum/material/glass=SHEET_MATERIAL_AMOUNT * 0.25) // 4 tiles per sheet
mats_per_unit = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.125, /datum/material/glass=SHEET_MATERIAL_AMOUNT * 0.25) // 4 tiles per sheet
/obj/item/stack/tile/rglass/sixty
amount = 60
+2
View File
@@ -513,6 +513,7 @@
slot_flags = ITEM_SLOT_BACK|ITEM_SLOT_SUITSTORE|ITEM_SLOT_NECK
resistance_flags = FLAMMABLE
storage_type = /datum/storage/bag/rebar_quiver
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 6.5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.5)
/obj/item/storage/bag/rebar_quiver/syndicate
icon_state = "syndie_quiver_0"
@@ -582,6 +583,7 @@
/obj/item/storage/bag/quiver/lesser
storage_type = /datum/storage/bag/quiver/less
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT)
/obj/item/storage/bag/quiver/full/PopulateContents()
. = ..()
@@ -19,6 +19,8 @@
/obj/item/storage/box/Initialize(mapload)
. = ..()
if(foldable_result == /obj/item/stack/sheet/cardboard)
set_custom_materials(list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT))
update_appearance()
/obj/item/storage/box/suicide_act(mob/living/carbon/user)
@@ -58,6 +58,7 @@
illustration = null
resistance_flags = FLAMMABLE
foldable_result = null
custom_materials = list(/datum/material/paper = SHEET_MATERIAL_AMOUNT * 1.25)
/// A list of all available papersack reskins
var/list/papersack_designs = list()
///What design from papersack_designs we are currently using.
+1 -1
View File
@@ -609,7 +609,7 @@
spawn_count = 10
contents_tag = "pickle"
foldable_result = /obj/item/reagent_containers/cup/beaker/large
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.25)
open_status = FANCY_CONTAINER_ALWAYS_OPEN
has_open_closed_states = FALSE
storage_type = /datum/storage/pickles_jar
@@ -498,6 +498,7 @@
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
w_class = WEIGHT_CLASS_SMALL
storage_type = /datum/storage/test_tube_rack
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT)
/obj/item/storage/test_tube_rack/update_icon_state()
icon_state = "[base_icon_state][contents.len > 0 ? contents.len : null]"
+1
View File
@@ -13,6 +13,7 @@
slowdown = 1
item_flags = SLOWS_WHILE_IN_HAND
pass_flags = NONE
custom_materials = list(/datum/material/silver = SHEET_MATERIAL_AMOUNT, /datum/material/iron = SHEET_MATERIAL_AMOUNT)
/// If true we're currently portable
var/is_portable = TRUE
+1
View File
@@ -189,6 +189,7 @@
full_speed = FALSE
drift_force = 1 NEWTONS
stabilizer_force = 0.5 NEWTONS
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 4.4, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 3)
/obj/item/tank/jetpack/improvised/allow_thrust(num)
if(!ismob(loc))
+6
View File
@@ -300,6 +300,12 @@
ACCESS_RD,
ACCESS_SYNDICATE,
)
custom_materials = list(
/datum/material/iron = SHEET_MATERIAL_AMOUNT * 4.75,
/datum/material/silver = SHEET_MATERIAL_AMOUNT * 2.50,
/datum/material/titanium = SHEET_MATERIAL_AMOUNT * 1.75,
/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.25,
)
radio_alert = TRUE
/obj/item/crowbar/power/paramedic/sound_the_alarms(mob/user, obj/machinery/door/airlock/target)
+2
View File
@@ -586,6 +586,7 @@
w_class = WEIGHT_CLASS_SMALL
attack_verb_continuous = list("attacks", "strikes", "hits")
attack_verb_simple = list("attack", "strike", "hit")
custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 4, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 1.1, /datum/material/iron = SMALL_MATERIAL_AMOUNT * 0.1)
/// Whether our sword has been multitooled to rainbow
var/hacked = FALSE
/// The color of our fake energy sword
@@ -1081,6 +1082,7 @@
icon_state = "snowball"
throwforce = 20 //the same damage as a disabler shot
damtype = STAMINA //maybe someday we can add stuffing rocks (or perhaps ore?) into snowballs to make them deal brute damage
custom_materials = list(/datum/material/snow = SHEET_MATERIAL_AMOUNT)
/obj/item/toy/snowball/ranged_interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
user.throw_item(interacting_with)
+1
View File
@@ -66,6 +66,7 @@
throw_speed = 1
armour_penetration = 15
hitsound = 'sound/items/car_engine_start.ogg'
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 14, /datum/material/cardboard = SHEET_MATERIAL_AMOUNT, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.8)
/// The number of charges the house edge has accrued through 2-handed hits, to charge a more powerful charge attack.
var/fire_charges = 0
///Sound played when wielded.
+3 -1
View File
@@ -628,6 +628,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
icon_angle = -135
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
custom_materials = list(/datum/material/bamboo = SHEET_MATERIAL_AMOUNT * 4)
/obj/item/bambostaff/Initialize(mapload)
. = ..()
@@ -745,7 +746,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
desc = "A handmade crutch. Also makes a decent bludgeon if you need it."
icon_state = "crutch_wood"
inhand_icon_state = "crutch_wood"
custom_materials = list(/datum/material/wood = SMALL_MATERIAL_AMOUNT * 0.5)
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT * 5)
/obj/item/cane/white
name = "white cane"
@@ -873,6 +874,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
throw_range = 1
attack_verb_continuous = list("clubs", "bludgeons")
attack_verb_simple = list("club", "bludgeon")
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT)
/obj/item/melee/baseball_bat
name = "baseball bat"
+1
View File
@@ -22,6 +22,7 @@
force = 10
throwforce = 6
w_class = WEIGHT_CLASS_BULKY
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 22, /datum/material/plastic = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.5)
///What item is being charged currently?
var/obj/item/charging = null
///Did we put power into "charging" last process()?