Skip to content

Commit

Permalink
Plugging in Doe's icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Jan 1, 2025
1 parent 5304c87 commit 496142b
Show file tree
Hide file tree
Showing 30 changed files with 122 additions and 15 deletions.
4 changes: 1 addition & 3 deletions code/game/objects/__objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand All @@ -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
9 changes: 9 additions & 0 deletions code/game/objects/items/artifice/chain.dm
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions code/game/objects/items/artifice/hook.dm
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
12 changes: 12 additions & 0 deletions code/game/objects/items/chisel.dm
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions code/game/objects/items/crafting/barrel_rim.dm
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions code/game/objects/items/crafting/shield_fasteners.dm
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions code/game/objects/items/horseshoe.dm
Original file line number Diff line number Diff line change
@@ -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
20 changes: 18 additions & 2 deletions code/modules/crafting/forging/forge_anvil.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
10 changes: 8 additions & 2 deletions code/modules/crafting/forging/forge_billet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/crafting/forging/forge_fire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 18 additions & 6 deletions code/modules/crafting/forging/forging_step.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
15 changes: 15 additions & 0 deletions code/modules/materials/material_stack_nail.dm
Original file line number Diff line number Diff line change
@@ -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
Binary file added icons/obj/items/barrel_rim.dmi
Binary file not shown.
Binary file modified icons/obj/items/billet.dmi
Binary file not shown.
Binary file added icons/obj/items/chain.dmi
Binary file not shown.
Binary file added icons/obj/items/hook.dmi
Binary file not shown.
Binary file added icons/obj/items/horseshoe.dmi
Binary file not shown.
Binary file added icons/obj/items/shield_fasteners.dmi
Binary file not shown.
Binary file added icons/obj/items/stacks/nails.dmi
Binary file not shown.
Binary file added icons/obj/items/tool/chisel.dmi
Binary file not shown.
Binary file modified icons/obj/structures/anvil.dmi
Binary file not shown.
Binary file modified icons/obj/structures/anvil_crude.dmi
Binary file not shown.
Binary file added icons/obj/structures/anvil_crude_alt.dmi
Binary file not shown.
Binary file added icons/obj/structures/anvil_improvised.dmi
Binary file not shown.
Binary file removed icons/obj/structures/forge.dmi
Binary file not shown.
Binary file added icons/obj/structures/forging/bellows.dmi
Binary file not shown.
Binary file added icons/obj/structures/forging/forge.dmi
Binary file not shown.
Binary file added icons/obj/structures/forging/grindstone.dmi
Binary file not shown.
9 changes: 8 additions & 1 deletion nebula.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 496142b

Please sign in to comment.