This commit is contained in:
lolman360
2020-08-14 20:18:55 +10:00
parent 87eec3a9eb
commit 0bc79b82eb
3 changed files with 72 additions and 5 deletions
+6 -3
View File
@@ -25,6 +25,7 @@
density = TRUE
anchored = TRUE
var/workpiece_state = FALSE
var/datum/material = workpiece_material
var/qualitymod = 0
var/currentquality = qualitymod
var/currentsteps = 0
@@ -44,20 +45,22 @@
RECIPE_HALBERD = obj/item/smithing/halberdhead)
/obj/structure/anvil/attackby(obj/item/I, mob/user)
if(istype(I, obj/item/ingot))
var/obj/item/ingot/notsword = I
if(istype(I, obj/item/smithing/ingot))
var/obj/item/smithing/ingot/notsword = I
if(workpiece_state)
to_chat(user, "There's already a workpiece! Finish it or take it off.")
return FALSE
if(notsword.workability == "shapeable")
workpiece_state = WORKPIECE_PRESENT
workpiece_material = notsword.custom_materials
to_chat(user, "You place the [notsword] on the [src].")
qdel(notsword)
else
to_chat(user, "The ingot isn't workable yet!")
return FALSE
return
else if(istype(I, obj/item/hammer))
var/obj/item/hammer/hammertime = I
var/obj/item/melee/hammer/hammertime = I
if(workpiece_state = WORKPIECE_PRESENT || WORKPIECE_INPROGRESS)
do_shaping(user, hammer.qualitymod)
else