diff --git a/code/game/objects/__objs.dm b/code/game/objects/__objs.dm index 678ecf25f08..03064aae179 100644 --- a/code/game/objects/__objs.dm +++ b/code/game/objects/__objs.dm @@ -404,7 +404,6 @@ /obj/proc/refresh_color() return -<<<<<<< HEAD:code/game/objects/__objs.dm // Slightly convoluted reagent logic to avoid fluid_act() putting reagents straight back into the destroyed /obj. /obj/physically_destroyed(skip_qdel) var/dumped_reagents = FALSE @@ -417,7 +416,7 @@ if(dumped_reagents && last_loc && !QDELETED(last_loc) && last_loc.reagents?.total_volume) last_loc.reagents.handle_update() HANDLE_REACTIONS(last_loc.reagents) -======= + // Used by HE pipes and forging bars/billets. Defaults are for HE pipes. /obj/proc/animate_heat_glow(icon_temperature, scale_sub = 500, scale_div = 1500, scale_max = 2000, skip_filter = FALSE) @@ -444,4 +443,3 @@ if(!skip_filter) animate_filter("glow", list(color = scale_color, time = 2 SECONDS, easing = LINEAR_EASING)) set_light(min(3, scale*2.5), min(3, scale*2.5), scale_color) ->>>>>>> 89bbcbdbef0 (Adding glow effects and heat retention/loss to billets/bars.):code/game/objects/objs.dm diff --git a/code/game/objects/items/artifice/chain.dm b/code/game/objects/items/artifice/chain.dm new file mode 100644 index 00000000000..3a48abad475 --- /dev/null +++ b/code/game/objects/items/artifice/chain.dm @@ -0,0 +1,9 @@ +// Stub for forging. TODO crafting that uses chains. +/obj/item/chain + name = "chain" + name_prefix = "length of" + desc = "A flexible length of interconnected links forming a chain." + icon_state = ICON_STATE_WORLD + icon = 'icons/obj/items/chain.dmi' + material = /decl/material/solid/metal/iron + material_alteration = MAT_FLAG_ALTERATION_ALL diff --git a/code/game/objects/items/artifice/hook.dm b/code/game/objects/items/artifice/hook.dm new file mode 100644 index 00000000000..b70f99190fc --- /dev/null +++ b/code/game/objects/items/artifice/hook.dm @@ -0,0 +1,8 @@ +// Stub for forging. TODO use for fishing rod? +/obj/item/hook + name = "hook" + desc = "A small sharp curved object." + icon_state = ICON_STATE_WORLD + icon = 'icons/obj/items/hook.dmi' + material = /decl/material/solid/metal/iron + material_alteration = MAT_FLAG_ALTERATION_ALL diff --git a/code/game/objects/items/lockpicks.dm b/code/game/objects/items/artifice/lockpicks.dm similarity index 100% rename from code/game/objects/items/lockpicks.dm rename to code/game/objects/items/artifice/lockpicks.dm diff --git a/code/game/objects/items/chisel.dm b/code/game/objects/items/chisel.dm new file mode 100644 index 00000000000..8bdcf2ab1a4 --- /dev/null +++ b/code/game/objects/items/chisel.dm @@ -0,0 +1,12 @@ +// Stub for forging. TODO implement TOOL_CHISEL. +/obj/item/tool/chisel + name = "chisel" + desc = "A hard, sharpened tool used to chisel stone, wood or bone." + icon_state = ICON_STATE_WORLD + icon = 'icons/obj/items/tool/chisel.dmi' + material = /decl/material/solid/metal/steel + handle_material = /decl/material/solid/organic/plastic + binding_material = null + +/obj/item/tool/chisel/forged + handle_material = null diff --git a/code/game/objects/items/crafting/barrel_rim.dm b/code/game/objects/items/crafting/barrel_rim.dm new file mode 100644 index 00000000000..f217957e557 --- /dev/null +++ b/code/game/objects/items/crafting/barrel_rim.dm @@ -0,0 +1,8 @@ +// Stub for forging. TODO barrel crafting. +/obj/item/barrel_rim + name = "barrel rim" + desc = "A circular brace used to hold a barrel together." + icon_state = ICON_STATE_WORLD + icon = 'icons/obj/items/barrel_rim.dmi' + material = /decl/material/solid/metal/iron + material_alteration = MAT_FLAG_ALTERATION_ALL diff --git a/code/game/objects/items/crafting/shield_fasteners.dm b/code/game/objects/items/crafting/shield_fasteners.dm new file mode 100644 index 00000000000..b61b95c7995 --- /dev/null +++ b/code/game/objects/items/crafting/shield_fasteners.dm @@ -0,0 +1,8 @@ +// Stub for forging. TODO shield crafting. +/obj/item/shield_fasteners + name = "shield fasteners" + desc = "A handful of shaped fasteners used to hold a buckler or shield together." + icon_state = ICON_STATE_WORLD + icon = 'icons/obj/items/shield_fasteners.dmi' + material = /decl/material/solid/metal/iron + material_alteration = MAT_FLAG_ALTERATION_ALL diff --git a/code/game/objects/items/horseshoe.dm b/code/game/objects/items/horseshoe.dm new file mode 100644 index 00000000000..089d3c9cc4b --- /dev/null +++ b/code/game/objects/items/horseshoe.dm @@ -0,0 +1,8 @@ +// Stub for forging. TODO implement shoes on honse. +/obj/item/horseshoe + name = "horseshoe" + desc = "A curved length of metal, usually nailed to a horse's hoof. May bring luck." + icon_state = ICON_STATE_WORLD + icon = 'icons/obj/items/horseshoe.dmi' + material = /decl/material/solid/metal/iron + material_alteration = MAT_FLAG_ALTERATION_ALL diff --git a/code/modules/crafting/forging/forge_anvil.dm b/code/modules/crafting/forging/forge_anvil.dm index eab2574a5e6..df9da5e0ba1 100644 --- a/code/modules/crafting/forging/forge_anvil.dm +++ b/code/modules/crafting/forging/forge_anvil.dm @@ -13,6 +13,15 @@ structure_flags = STRUCTURE_FLAG_SURFACE material_alteration = MAT_FLAG_ALTERATION_ALL +/obj/structure/anvil/on_update_icon() + . = ..() + icon_state = initial(icon_state) + switch(get_health_percent()) + if(0 to 0.35) + icon_state = "[icon_state]-damage-heavy" + if(0.35 to 0.65) + icon_state = "[icon_state]-damage-light" + /obj/structure/anvil/attackby(obj/item/used_item, mob/user, click_params) // Put the hammer on the forge. @@ -24,7 +33,9 @@ // Put the bar onto the anvil (need to do this to avoid repairs in ..()) if(istype(used_item, /obj/item/stack/material/bar)) var/obj/item/stack/material/bar/bar = used_item - if(bar.get_amount() == 1 && current_health >= get_max_health()) + if(used_item.material != material || current_health >= get_max_health()) + if(bar.get_amount() > 1) + bar = bar.split(1) if(bar.loc == user) user.try_unequip(bar, get_turf(src)) else @@ -57,10 +68,15 @@ material = /decl/material/solid/stone/granite max_health = 500 +/obj/structure/anvil/boulder/Initialize(ml, _mat, _reinf_mat) + . = ..() + if(prob(50)) + set_icon('icons/obj/structures/anvil_crude_alt.dmi') + // Improvised with spaceman materials. /obj/structure/anvil/improvised name_prefix = "improvised" - icon = 'icons/obj/structures/anvil_crude.dmi' // anvil_improvised.dmi' + icon = 'icons/obj/structures/anvil_improvised.dmi' desc = "A anvil roughly improvised out of scrap metal. It probably won't last very long." material = /decl/material/solid/metal/steel max_health = 500 diff --git a/code/modules/crafting/forging/forge_billet.dm b/code/modules/crafting/forging/forge_billet.dm index d63b0f2d8ee..b754ae8f6ef 100644 --- a/code/modules/crafting/forging/forge_billet.dm +++ b/code/modules/crafting/forging/forge_billet.dm @@ -139,17 +139,23 @@ /obj/item/billet/on_update_icon() . = ..() - // TODO: update color from red hot to white hot based on current temperature of the material. - icon_state = get_world_inventory_state() if(!istype(current_forging_step)) return if(current_forging_step.billet_icon) set_icon(current_forging_step.billet_icon) else set_icon(initial(icon)) + icon_state = get_world_inventory_state() if(current_forging_step.billet_icon_state) icon_state = "[icon_state]-[current_forging_step.billet_icon_state]" +/obj/item/billet/get_world_inventory_state() + if(!current_forging_step?.billet_icon_state) + return ..() + if(!check_state_in_icon("[ICON_STATE_INV]-[current_forging_step.billet_icon_state]", icon)) + return ICON_STATE_WORLD + return ..() + /obj/item/billet/update_name() if(!istype(current_forging_step)) base_name = initial(base_name) diff --git a/code/modules/crafting/forging/forge_fire.dm b/code/modules/crafting/forging/forge_fire.dm index 3a5d2d81482..993049defe7 100644 --- a/code/modules/crafting/forging/forge_fire.dm +++ b/code/modules/crafting/forging/forge_fire.dm @@ -13,7 +13,7 @@ name = "forge fire" desc = "A sturdy hearth used to heat metal bars for forging on an anvil." density = TRUE - icon = 'icons/obj/structures/forge.dmi' + icon = 'icons/obj/structures/forging/forge.dmi' icon_state = "forge" storage = /datum/storage/forge diff --git a/code/modules/crafting/forging/forging_step.dm b/code/modules/crafting/forging/forging_step.dm index 177d2607a02..8fe88418c52 100644 --- a/code/modules/crafting/forging/forging_step.dm +++ b/code/modules/crafting/forging/forging_step.dm @@ -9,7 +9,7 @@ /// Icon state modifier to use for the billet at this stage. var/billet_icon_state /// Icon to use for the billet (for modpacks/downstreams) - var/billet_icon + var/billet_icon = 'icons/obj/items/billet.dmi' /// Assoc list of /decl/forging_action to next /decl/forging_step. var/list/steps /// Probability of failing this step if we're below skill_level. @@ -42,6 +42,12 @@ . += "null or invalid billet_desc" if(!length(steps)) . += "null or empty steps list" + if(billet_icon_state) + if(billet_icon) + if(!check_state_in_icon("[ICON_STATE_WORLD]-[billet_icon_state]", billet_icon)) + . += "missing billet icon state '[ICON_STATE_WORLD]-[billet_icon_state]' from icon '[billet_icon]'" + else + . += "missing billet_icon" /decl/forging_step/proc/get_product_name(decl/material/billet_material) . = billet_name @@ -165,29 +171,35 @@ /decl/forging_step/product/nails billet_name = "nails" + product_type = /obj/item/stack/material/nail/twelve /decl/forging_step/product/hook billet_name = "hook" - product_type = /obj/item/knife/hook + product_type = /obj/item/hook /decl/forging_step/product/chain billet_name = "chain" + product_type = /obj/item/chain /decl/forging_step/product/rim billet_name = "barrel rim" + product_type = /obj/item/barrel_rim /decl/forging_step/product/horseshoe billet_name = "horseshoe" - -/decl/forging_step/product/lock_and_key - billet_name = "lock and key" + product_type = /obj/item/horseshoe /decl/forging_step/product/shield_fasteners billet_name = "shield fasteners" + product_type = /obj/item/shield_fasteners /decl/forging_step/product/tongs billet_name = "tongs" product_type = /obj/item/tongs /decl/forging_step/product/chisel - billet_name = "chisl" + billet_name = "chisel" + product_type = /obj/item/tool/chisel/forged + +/decl/forging_step/product/lock_and_key + billet_name = "lock and key" diff --git a/code/modules/materials/material_stack_nail.dm b/code/modules/materials/material_stack_nail.dm new file mode 100644 index 00000000000..a989de40b89 --- /dev/null +++ b/code/modules/materials/material_stack_nail.dm @@ -0,0 +1,15 @@ +/obj/item/stack/material/nail + name = "nails" + singular_name = "nail" + plural_name = "nails" + icon_state = "nail" + plural_icon_state = "nail-mult" + max_icon_state = "nail-max" + stack_merge_type = /obj/item/stack/material/nail + crafting_stack_type = /obj/item/stack/material/nail + icon = 'icons/obj/items/stacks/nails.dmi' + is_spawnable_type = TRUE + matter_multiplier = 0.05 // 20 per standard sheet + +/obj/item/stack/material/nail/twelve + amount = 12 diff --git a/icons/obj/items/barrel_rim.dmi b/icons/obj/items/barrel_rim.dmi new file mode 100644 index 00000000000..a5567e33c7c Binary files /dev/null and b/icons/obj/items/barrel_rim.dmi differ diff --git a/icons/obj/items/billet.dmi b/icons/obj/items/billet.dmi index 412f359e995..1b841d667a0 100644 Binary files a/icons/obj/items/billet.dmi and b/icons/obj/items/billet.dmi differ diff --git a/icons/obj/items/chain.dmi b/icons/obj/items/chain.dmi new file mode 100644 index 00000000000..95d5c71b70f Binary files /dev/null and b/icons/obj/items/chain.dmi differ diff --git a/icons/obj/items/hook.dmi b/icons/obj/items/hook.dmi new file mode 100644 index 00000000000..602683208c7 Binary files /dev/null and b/icons/obj/items/hook.dmi differ diff --git a/icons/obj/items/horseshoe.dmi b/icons/obj/items/horseshoe.dmi new file mode 100644 index 00000000000..15f6f5f2482 Binary files /dev/null and b/icons/obj/items/horseshoe.dmi differ diff --git a/icons/obj/items/shield_fasteners.dmi b/icons/obj/items/shield_fasteners.dmi new file mode 100644 index 00000000000..e4c289ffc0c Binary files /dev/null and b/icons/obj/items/shield_fasteners.dmi differ diff --git a/icons/obj/items/stacks/nails.dmi b/icons/obj/items/stacks/nails.dmi new file mode 100644 index 00000000000..10ba6ebcc98 Binary files /dev/null and b/icons/obj/items/stacks/nails.dmi differ diff --git a/icons/obj/items/tool/chisel.dmi b/icons/obj/items/tool/chisel.dmi new file mode 100644 index 00000000000..e277e1ba44b Binary files /dev/null and b/icons/obj/items/tool/chisel.dmi differ diff --git a/icons/obj/structures/anvil.dmi b/icons/obj/structures/anvil.dmi index 893d8393e76..403390e3251 100644 Binary files a/icons/obj/structures/anvil.dmi and b/icons/obj/structures/anvil.dmi differ diff --git a/icons/obj/structures/anvil_crude.dmi b/icons/obj/structures/anvil_crude.dmi index cf49aee111c..1f43be3ed0f 100644 Binary files a/icons/obj/structures/anvil_crude.dmi and b/icons/obj/structures/anvil_crude.dmi differ diff --git a/icons/obj/structures/anvil_crude_alt.dmi b/icons/obj/structures/anvil_crude_alt.dmi new file mode 100644 index 00000000000..d3876c4f37f Binary files /dev/null and b/icons/obj/structures/anvil_crude_alt.dmi differ diff --git a/icons/obj/structures/anvil_improvised.dmi b/icons/obj/structures/anvil_improvised.dmi new file mode 100644 index 00000000000..a80b2d7a06b Binary files /dev/null and b/icons/obj/structures/anvil_improvised.dmi differ diff --git a/icons/obj/structures/forge.dmi b/icons/obj/structures/forge.dmi deleted file mode 100644 index 9710330f554..00000000000 Binary files a/icons/obj/structures/forge.dmi and /dev/null differ diff --git a/icons/obj/structures/forging/bellows.dmi b/icons/obj/structures/forging/bellows.dmi new file mode 100644 index 00000000000..bcee8e64406 Binary files /dev/null and b/icons/obj/structures/forging/bellows.dmi differ diff --git a/icons/obj/structures/forging/forge.dmi b/icons/obj/structures/forging/forge.dmi new file mode 100644 index 00000000000..452def1aa58 Binary files /dev/null and b/icons/obj/structures/forging/forge.dmi differ diff --git a/icons/obj/structures/forging/grindstone.dmi b/icons/obj/structures/forging/grindstone.dmi new file mode 100644 index 00000000000..c7b0c5fc18a Binary files /dev/null and b/icons/obj/structures/forging/grindstone.dmi differ diff --git a/nebula.dme b/nebula.dme index 6eef270f10b..dae5137dd54 100644 --- a/nebula.dme +++ b/nebula.dme @@ -1079,6 +1079,7 @@ #include "code\game\objects\items\bodybag.dm" #include "code\game\objects\items\buttons.dm" #include "code\game\objects\items\candelabra.dm" +#include "code\game\objects\items\chisel.dm" #include "code\game\objects\items\christmas.dm" #include "code\game\objects\items\contraband.dm" #include "code\game\objects\items\crutches.dm" @@ -1087,10 +1088,10 @@ #include "code\game\objects\items\fleece.dm" #include "code\game\objects\items\glassjar.dm" #include "code\game\objects\items\holosign_creator.dm" +#include "code\game\objects\items\horseshoe.dm" #include "code\game\objects\items\hourglass.dm" #include "code\game\objects\items\instruments.dm" #include "code\game\objects\items\latexballoon.dm" -#include "code\game\objects\items\lockpicks.dm" #include "code\game\objects\items\paintkit.dm" #include "code\game\objects\items\paper_fortune_teller.dm" #include "code\game\objects\items\part_replacer.dm" @@ -1108,6 +1109,9 @@ #include "code\game\objects\items\trash.dm" #include "code\game\objects\items\umbrella.dm" #include "code\game\objects\items\waterskin.dm" +#include "code\game\objects\items\artifice\chain.dm" +#include "code\game\objects\items\artifice\hook.dm" +#include "code\game\objects\items\artifice\lockpicks.dm" #include "code\game\objects\items\blades\_blade.dm" #include "code\game\objects\items\blades\axe.dm" #include "code\game\objects\items\blades\axe_fire.dm" @@ -1135,6 +1139,8 @@ #include "code\game\objects\items\books\skill\research.dm" #include "code\game\objects\items\books\skill\security.dm" #include "code\game\objects\items\books\skill\service.dm" +#include "code\game\objects\items\crafting\barrel_rim.dm" +#include "code\game\objects\items\crafting\shield_fasteners.dm" #include "code\game\objects\items\devices\aicard.dm" #include "code\game\objects\items\devices\auto_cpr.dm" #include "code\game\objects\items\devices\binoculars.dm" @@ -2731,6 +2737,7 @@ #include "code\modules\materials\material_stack_logs.dm" #include "code\modules\materials\material_stack_lump.dm" #include "code\modules\materials\material_stack_misc.dm" +#include "code\modules\materials\material_stack_nail.dm" #include "code\modules\materials\material_synth.dm" #include "code\modules\materials\materials_ore.dm" #include "code\modules\materials\definitions\gasses\_mat_gas.dm"