From d8248906cf826aecd65ccfe3d253a2e8c0c642da Mon Sep 17 00:00:00 2001
From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com>
Date: Tue, 13 Feb 2024 13:43:54 +0300
Subject: [PATCH] New Primitive Tool + Iron Rods Can Be Melted (#868) (#1966)
* New Primitive Tool + Iron Rods Can Be Melted
* Update modular_nova/modules/reagent_forging/code/forge.dm
* Update modular_nova/modules/reagent_forging/code/forge.dm
* Update modular_nova/modules/reagent_forging/code/forge.dm
* Update modular_nova/modules/reagent_forging/code/forge.dm
* Update modular_nova/modules/reagent_forging/code/forge.dm
* Update modular_nova/modules/reagent_forging/code/forge.dm
* fix iron rod result + consumption amount
---------
Co-authored-by: MortoSasye <38175176+MortoSasye@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
---
.../ashwalkers/code/items/ash_surgery.dm | 15 ++++++
.../ashwalkers/icons/ashwalker_tools.dmi | Bin 1663 -> 1791 bytes
.../modules/reagent_forging/code/forge.dm | 46 ++++++++++++++++++
3 files changed, 61 insertions(+)
diff --git a/modular_nova/modules/ashwalkers/code/items/ash_surgery.dm b/modular_nova/modules/ashwalkers/code/items/ash_surgery.dm
index 5eb40601e86..ec263c5dedf 100644
--- a/modular_nova/modules/ashwalkers/code/items/ash_surgery.dm
+++ b/modular_nova/modules/ashwalkers/code/items/ash_surgery.dm
@@ -88,3 +88,18 @@
/datum/crafting_recipe/ash_recipe/ash_hemostat
name = "Ash Hemostat"
result = /obj/item/hemostat/ashwalker
+
+/obj/item/bonesetter/ashwalker
+ name = "primitive bonesetter"
+ icon = 'modular_nova/modules/ashwalkers/icons/ashwalker_tools.dmi'
+ icon_state = "bonesetter"
+
+ greyscale_colors = null
+ greyscale_config = null
+ greyscale_config_inhand_left = null
+ greyscale_config_inhand_right = null
+ greyscale_config_worn = null
+
+/datum/crafting_recipe/ash_recipe/ash_bonesetter
+ name = "Ash Bonesetter"
+ result = /obj/item/bonesetter/ashwalker
diff --git a/modular_nova/modules/ashwalkers/icons/ashwalker_tools.dmi b/modular_nova/modules/ashwalkers/icons/ashwalker_tools.dmi
index aa1224aca1e86ca74a6972263c5d861a3e21bb51..5066689e2e2bf865e3bf2da725fd963a39a523bd 100644
GIT binary patch
delta 1704
zcmV;Z23Pt24F3%!iBL{Q4GJ0x0000DNk~Le0001>0001h2m=5B0K2`CDF6Tfhmj>)
zMddah`9?1PGXVd4TK{H1{*7_}d079WjQ^Pc{;4Vdy;%SN|9=1g|NsBTyQhG3V76+S
zr~m)}0d!JMQvg8b*k%9#0Opau6@Nbq!Y~lU=jKxcT}Ax2I%q9g&<={T#Pl?Q+Q{W<
z@Y|az=%Sotx%c=bdAUnh&a-7+$i*fXH$ZP)EvItQABZH_l1voikw^^Kv!R#pqzGc!
z+3mN>Je{pOA}KBUXbnYjLUn;x{RVx5XRB3p@G9_d1g}v2e`txe;&B8*rGLqxXHf$e
z*9sQYsv*GpcWx40sMNi+d(ZXRxXIGhtoW~Y8X?3d#^JDRK&Z9hV>c9I^L^0h!cp
U+Q2#QJUa000FvNkl
zaS_&Tys49Q(=<4nCUvv#|9^a)0UsOe(FG6|+4B4NoDE}%PctJfVo36vLrH9{fGc2Z
zt$-_FY>fkiMFRpr3Sz=OWjYTaoFru?@379C-B|01({t#lPAOg
zK$TaULZ5_Ags~n3h7Xxj9JErGD8V^OUVs1ySaiF*jxoabhi`B(?thpuXo+c~s$4-g
zO5Pq6m~}{~EPg2}B|F0Yc|zpV+;-Z9s#KQsHYT2cI6lzmLNg!ISE>y@kP}QfZ{nj}
zkOMiB8&FGfM~M)iyPt0V1@fyCmU%{6_%aHS?&XO$pwMl&l+?XXrxT$IYX+Q>-^ADK
z0zFukrPke<=m(f!yMMMH+52==mc{i>`+Su3M!sejB~9YykCQ}8=m9ugEz1A;ed&zW7VkhPEZxs-?|-Vi<-@tZu|;QYyF=UU``u2Nhc~y~p$}WsZmSYQ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Jy+sG9;PrS4Q3p{ehd0jNW0f1PO^L7+0XfMS5W$c_Q>WrY4XtmC;VXDESFM-_8fHpl_iBv_8;P
zrXL(AF{ms5aq7_*09cLPDM3V8_v18T3*a*cSxVinF91kwUrwX#;Nvusf7*f_p~E5U
z)0YfESspgigO3|!Sxj0U=;N{L)xXZQfYHAa0G>NxPrexd5Zo9bv3M+dPYqWB00cai
zZwg?&`v2-3(F(8vtg*)b6w3|BONjf2*HQUs{Xp}fe6;>UTs}ImfAB?+Eida-C2-R1*}Ruc}~9CY#!g%4Y`wz^Ed?n4m-=-9}Q+8)HKiOS3uh&
zuc-=5@)q@JgKM>7^W)|Xw9ou{n#U;s@c(u&&*DUS%)`JR_X27Rf1rDY)t}~Z3IKWt
zKHOS&CTf&7*8K%V(07m4_vWGDa{s^b6sb#qc_186dkHq!Jw`s1A3y~rWIcH}wl-Y#
zL;1+4>o-kf=``^BNyr@3ZAduf)R(_3J#`i$104u;h
z4j}ON7X^^``%40d{QV^XME?Gw6_EJ*B>;o<15EoOf4=}gjjcWrGJiiGVEp`^Y+vT@
zX9EcJ#r}RSfK*@X?`HzY^ym2dSpbvu8)Wz7{(cU?bp3`mf9CmnA%IdvJM$O{}t>HS(8eBAHGVO=jyxspumr>X;B*ue1$z|W-p^Ruu4}vF5YXquUB2({;9s)y
zKydy6e+cj>V0M9CZdwCTh~__9@nhf8}by&p%xQfSZ4M>G2nkJ>II<#z6o83jhEBNkvXXu0mjfOso};
diff --git a/modular_nova/modules/reagent_forging/code/forge.dm b/modular_nova/modules/reagent_forging/code/forge.dm
index a3e2e639cbf..a52b0f9f49e 100644
--- a/modular_nova/modules/reagent_forging/code/forge.dm
+++ b/modular_nova/modules/reagent_forging/code/forge.dm
@@ -461,6 +461,12 @@
handle_metal_cup_melting(attacking_item, user)
return TRUE
+ if(istype(attacking_item, /obj/item/stack/rods))
+ in_use = TRUE
+ smelt_iron_rods(attacking_item, user)
+ in_use = FALSE
+ return TRUE
+
return ..()
/// Take the given tray and place it inside the forge, updating everything relevant to that
@@ -740,6 +746,46 @@
COOLDOWN_START(spawned_glass, remaining_heat, glassblowing_amount)
spawned_glass.total_time = glassblowing_amount
+/// Almost a copy from the proc smelt_ore but to smelt iron rods
+/obj/structure/reagent_forge/proc/smelt_iron_rods(obj/attacking_item, mob/living/user)
+
+ var/obj/item/stack/rods/rod_item = attacking_item
+
+ if(!istype(rod_item))
+ return
+
+ if(forge_temperature < MIN_FORGE_TEMP)
+ fail_message(user, "forge too cool")
+ return
+
+ var/skill_modifier = user.mind.get_skill_modifier(/datum/skill/smithing, SKILL_SPEED_MODIFIER)
+
+ if(rod_item.amount < 2)
+ fail_message(user, "too few iron rods to smelt")
+ return
+
+ balloon_alert_to_viewers("smelting...")
+
+ if(!do_after(user, skill_modifier * 3 SECONDS, target = src))
+ fail_message(user, "stopped smelting [rod_item]")
+ return
+
+ var/src_turf = get_turf(src)
+ var/spawning_item = /obj/item/stack/sheet/iron
+ var/rods_to_sheet_amount = round((rod_item.amount / 2))
+ var/used_rods = rod_item.amount
+
+ if(ISODD(used_rods))
+ used_rods = used_rods - 1
+
+ rod_item.use(used_rods)
+ var/obj/item/stack/sheet/iron/result = new spawning_item(src_turf)
+
+ if(rods_to_sheet_amount > 1)
+ result.add(rods_to_sheet_amount - 1)
+
+ balloon_alert_to_viewers("finished smelting!")
+
/obj/structure/reagent_forge/billow_act(mob/living/user, obj/item/tool)
if(in_use) // Preventing billow use if the forge is in use to prevent spam
fail_message(user, "forge busy")