This commit is contained in:
lolman360
2020-08-18 10:04:52 +10:00
parent 09fc795f3b
commit bb86003510
8 changed files with 145 additions and 10 deletions
+3 -1
View File
@@ -51,7 +51,8 @@
RECIPE_SMALLKNIFE = /obj/item/smithing/knifeblade,
RECIPE_BROADSWORD = /obj/item/smithing/broadblade,
RECIPE_HALBERD = /obj/item/smithing/halberdhead,
RECIPE_GLAIVE = /obj/item/smithing/glaivehead)
RECIPE_GLAIVE = /obj/item/smithing/glaivehead,
RECIPE_KATANA = /obj/item/smithing/katanablade)
/obj/structure/anvil/Initialize()
..()
@@ -204,6 +205,7 @@
/obj/structure/anvil/obtainable/sandstone
name = "sandstone brick anvil"
desc = "A big block of sandstone. Useable as an anvil."
custom_materials = list(/datum/material/sandstone=8000)
icon = 'icons/obj/smith.dmi'
icon_state = "anvil"
anvilquality = -1
+47
View File
@@ -0,0 +1,47 @@
/obj/structure/furnace
name = "furnace"
desc = "A furnace."
icon = 'icons/obj/smith.dmi'
icon_state = "anvil"
density = TRUE
anchored = TRUE
var/debug = FALSE //debugging only
var/working = TRUE
var/fueluse = 1
/obj/structure/furnace/Initialize()
..()
create_reagents(250, TRANSPARENT)
START_PROCESSING(SSobj, src)
/obj/structure/furnace/Destroy()
..()
STOP_PROCESSING(SSobj, src)
/obj/structure/furnace/process()
if(debug)
reagents.add_reagent(/datum/reagent/fuel, 1)
return TRUE
if(reagents.remove_reagent(/datum/reagent/fuel, fueluse))
working = TRUE
else
working = FALSE
/obj/structure/furnace/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/ingot))
var/obj/item/ingot/notsword = I
if(working)
to_chat(user, "You heat the [notsword] in the [src].")
else
to_chat(user, "The furnace isn't working!.")
else
..()
/obj/structure/furnace/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 5)
return TRUE
/obj/structure/furnace/infinite
name = "fuelless furnace"
debug = TRUE
+67 -9
View File
@@ -1,5 +1,8 @@
/obj/item/basaltblock
name = "basalt block"
desc = "A block of basalt."
icon = 'icons/obj/smith.dmi'
icon_state = "unfinished"
/obj/item/smithing
@@ -16,11 +19,66 @@
icon = 'icons/obj/smith.dmi'
icon_state = "ingot"
material_flags = MATERIAL_COLOR | MATERIAL_ADD_PREFIX
var/workability = "shapeable"
var/workability = "cold"
/obj/item/ingot/on_attack_hand(mob/user)
var/mob/living/carbon/human/H
if(!workability == "shapeable")
return ..()
var/prot = 0
if(ishuman(user))
H = user
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(G.max_heat_protection_temperature)
prot = (G.max_heat_protection_temperature > 360)
else
prot = 1
if(prot > 0 || HAS_TRAIT(user, TRAIT_RESISTHEAT) || HAS_TRAIT(user, TRAIT_RESISTHEATHANDS))
to_chat(user, "<span class='notice'>You pick up the [src].</span>")
return ..()
else
to_chat(user, "<span class='warning'>You try to move the [src], but you burn your hand on it!</span>")
if(H)
var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
H.update_damage_overlays()
/obj/item/ingot/iron
custom_materials = list(/datum/material/iron=12000)
/obj/item/ingot/diamond
custom_materials = list(/datum/material/diamond=12000) //yeah ok
/obj/item/ingot/uranium
custom_materials = list(/datum/material/uranium=12000)
/obj/item/ingot/plasma
custom_materials = list(/datum/material/plasma=12000)//yeah ok
/obj/item/ingot/gold
custom_materials = list(/datum/material/gold=12000)
/obj/item/ingot/silver
custom_materials = list(/datum/material/silver=12000)
/obj/item/ingot/bananium
custom_materials = list(/datum/material/bananium=12000)
/obj/item/ingot/titanium
custom_materials = list(/datum/material/titanium=12000)
/obj/item/ingot/adamantine
custom_materials = list(/datum/material/adamantine=12000)
/obj/item/ingot/cult
custom_materials = list(/datum/material/runedmetal=12000)
/obj/item/ingot/bronze
custom_materials = list(/datum/material/bronze=12000)
/obj/item/smithing/Initialize()
..()
desc = "A [src]. Hit it with a [finishingitem.name] to create a [finalitem.name]."
@@ -129,7 +187,7 @@
var/obj/item/melee/smith/twohand/javelin/finalforreal = new /obj/item/melee/smith/twohand/javelin(src)
finalforreal.force += quality
finalforreal.wield_force = finalforreal.force*finalforreal.wielded_mult
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]_wield")
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]")
finalforreal.throwforce = finalforreal.force*2
finalitem = finalforreal
..()
@@ -202,7 +260,7 @@
var/obj/item/melee/smith/twohand/broadsword/finalforreal = new /obj/item/melee/smith/twohand/broadsword(src)
finalforreal.force += quality
finalforreal.wield_force = finalforreal.force*finalforreal.wielded_mult
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]_wield")
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]")
finalitem = finalforreal
..()
@@ -216,7 +274,7 @@
finalforreal.force += quality
finalforreal.wield_force = finalforreal.force*finalforreal.wielded_mult
finalforreal.throwforce = finalforreal.force/3
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]_wield")
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]")
finalitem = finalforreal
..()
@@ -230,7 +288,7 @@
finalforreal.force += quality
finalforreal.wield_force = finalforreal.force*finalforreal.wielded_mult
finalforreal.throwforce = finalforreal.force
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]_wield")
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]")
finalitem = finalforreal
..()
@@ -239,13 +297,13 @@
finishingitem = /obj/item/swordhandle
finalitem = /obj/item/melee/smith/twohand/katana
icon_state = "katana"
/obj/item/smithing/katanablade/startfinish()
var/obj/item/melee/smith/twohand/katana/finalforreal = new /obj/item/melee/smith/twohand/katana(src)
finalforreal.force += quality
finalforreal.wield_force = finalforreal.force*finalforreal.wielded_mult
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]_wield")
finalforreal.AddComponent(/datum/component/two_handed, force_unwielded=finalforreal.force, force_wielded=finalforreal.wield_force, icon_wielded="[icon_state]")
finalitem = finalforreal
/obj/item/stick