This commit is contained in:
lolman360
2020-08-17 11:45:24 +10:00
parent de2d80696e
commit 09fc795f3b
5 changed files with 194 additions and 9 deletions
+65 -4
View File
@@ -6,14 +6,21 @@
#define RECIPE_SMALLPICK "dbp" //draw bend punch
#define RECIPE_LARGEPICK "ddbp" //draw draw bend punch
#define RECIPE_SHOVEL "dfup" //draw fold upset punch
#define RECIPE_SMALLKNIFE "sdd" //shrink draw draw
#define RECIPE_HAMMER "sfp" //shrink fold punch
#define RECIPE_AXE "ufp" //upset fold punch
#define RECIPE_SMALLKNIFE "sdd" //shrink draw draw
#define RECIPE_SHORTSWORD "dff" //draw fold fold
#define RECIPE_JAVELIN "dbf" //draw bend fold
#define RECIPE_BROADSWORD "dfufd" //draw fold upset fold draw
#define RECIPE_KATANA "fffff" //fold fold fold fold fold
#define RECIPE_SCYTHE "bdf" //bend draw fold
#define RECIPE_COGHEAD "bsf" //bend shrink fold.
#define RECIPE_BROADSWORD "dfufd" //draw fold upset fold draw
#define RECIPE_JAVELIN "dbf" //draw bend fold
#define RECIPE_HALBERD "duffp" //draw upset fold fold punch
#define RECIPE_GLAIVE "usfp" //upset shrink fold punch
@@ -31,6 +38,7 @@
var/currentsteps = 0 //even i don't know
var/outrightfailchance = 1 //todo: document this shit
var/stepsdone = ""
var/rng = FALSE
var/list/smithrecipes = list(RECIPE_AXE = /obj/item/smithing/axehead,
RECIPE_HAMMER = /obj/item/smithing/hammerhead,
RECIPE_SCYTHE = /obj/item/smithing/scytheblade,
@@ -133,7 +141,7 @@
tryfinish(user)
/obj/structure/anvil/proc/tryfinish(mob/user)
if(currentsteps > 12 || (rng && prob(outrightfailchance))
if(currentsteps > 12 || (rng && prob(outrightfailchance)))
to_chat(user, "You overwork the metal, causing it to turn into useless slag!")
var/turf/T = get_turf(user)
workpiece_state = FALSE
@@ -160,6 +168,59 @@
outrightfailchance = 1
break
/obj/structure/anvil/debugsuper
name = "super ultra epic anvil of debugging."
desc = "WOW. A DEBUG <del>ITEM</DEL> STRUCTURE. EPIC."
icon = 'icons/obj/smith.dmi'
icon_state = "anvil"
anvilquality = 10
outrightfailchance = 0
/obj/structure/anvil/obtainable
name = "anvil"
desc = "Base class of anvil. This shouldn't exist, but is useable."
icon = 'icons/obj/smith.dmi'
icon_state = "anvil"
anvilquality = 0
outrightfailchance = 5
rng = TRUE
/obj/structure/anvil/obtainable/table
name = "table anvil"
desc = "A slightly reinforced table. Good luck."
icon = 'icons/obj/smith.dmi'
icon_state = "anvil"
anvilquality = -2
/obj/structure/anvil/obtainable/table/do_shaping(mob/user, var/qualitychange)
if(prob(5))
to_chat(user, "The [src] breaks under the strain!")
take_damage(max_integrity)
return FALSE
else
..()
/obj/structure/anvil/obtainable/sandstone
name = "sandstone brick anvil"
desc = "A big block of sandstone. Useable as an anvil."
icon = 'icons/obj/smith.dmi'
icon_state = "anvil"
anvilquality = -1
/obj/structure/anvil/obtainable/basalt
name = "basalt brick anvil"
desc = "A big block of basalt. Useable as an anvil, better than sandstone. Igneous!"
icon = 'icons/obj/smith.dmi'
icon_state = "anvil"
anvilquality = -0.5
/obj/structure/anvil/obtainable/basic
name = "anvil"
desc = "An anvil. It's got wheels bolted to the bottom."
icon = 'icons/obj/smith.dmi'
icon_state = "anvil"
anvilquality = 0
#undef WORKPIECE_PRESENT
#undef WORKPIECE_INPROGRESS
+61 -2
View File
@@ -1,9 +1,33 @@
//TODO: OBTAILABILITY, ANVIL TYPES, HAMMER TYPES, INGOTS
/*
sords:
broadsword [x]
gladius [x]
dirk [x]
zweihander [x]
sabre
rapier
scimitar
katana [x]
polearms:
halberd [x]
glaive [x]
javelin [x]
pike
misc:
blacksmith's hammer [x]
scythe [x]
axe
coghead club
pickaxes [x]
*/
/obj/item/melee/smith
name = "base class obj/item/melee/smith" //tin. handles overlay and quality and shit.
desc = "cringe"
icon = 'icons/obj/smith.dmi'
icon_state = "mace_greyscale"
item_state = "mace_greyscale"
@@ -19,7 +43,8 @@
/obj/item/melee/smith/Initialize()
..()
desc = "A handmade [name]."
if(desc == "cringe")
desc = "A handmade [name]."
overlay = mutable_appearance(icon, overlay_state)
overlay.appearance_flags = RESET_COLOR
add_overlay(overlay)
@@ -28,6 +53,7 @@
/obj/item/melee/smith/twohand
item_flags = NEEDS_PERMIT //it's a bigass sword/spear. beepsky is going to give you shit for it.
wielded_mult = 1.75
@@ -129,6 +155,7 @@
/obj/item/melee/smith/axe
name = "axe"
item_flags = NEEDS_PERMIT
/obj/item/melee/smith/hammer//blacksmithing, not warhammer.
name = "hammer"
@@ -142,9 +169,11 @@
/obj/item/melee/smith/cogheadclub
name = "coghead club"
item_flags = NEEDS_PERMIT
/obj/item/melee/smith/shortsword
name = "gladius"
item_flags = NEEDS_PERMIT
icon_state = "gladius"
overlay_state = "gladiushilt"
@@ -152,5 +181,35 @@
name = "broadsword"
icon_state = "broadsword"
overlay_state = "broadhilt"
force = 15
force = 11
wielded_mult = 1.8
/obj/item/melee/smith/twohand/zweihander
name = "zweihander"
icon_state = "zweihander"
overlay_state = "zweihilt"
force = 4
wielded_mult = 3
/obj/item/melee/smith/twohand/katana
name = "katana"
icon_state = "katana"
overlay_state = "katanahilt"
force = 7
wielded_mult = 2
item_flags = ITEM_CAN_PARRY | UNIQUE_RENAME //want to name your katana "DEMON BLADE" or some shit? go ahead, idiot.
block_parry_data = /datum/block_parry_data/captain_saber
//unique hammers
/obj/item/melee/smith/hammer/toolbox
name = "toolbox hammer"
desc = "A metal filled toolbox on a stick. Useable as a really shitty hammer."
w_class = WEIGHT_CLASS_BULKY
icon_state = "toolbox"
overlay_state = "hammerhandle"
qualitymod = -2
/obj/item/melee/smith/hammer/debug
name = "debugging hammer"
desc = "A DEBUGGING HAMMER!! EPIC!!."
qualitymod = 10
+15 -2
View File
@@ -23,7 +23,7 @@
/obj/item/smithing/Initialize()
..()
desc = "A [src]. Hit it with a [finishingitem] to create a [finalitem]."
desc = "A [src]. Hit it with a [finishingitem.name] to create a [finalitem.name]."
/obj/item/smithing/attackby(obj/item/I, mob/user)
@@ -234,6 +234,19 @@
finalitem = finalforreal
..()
/obj/item/smithing/katanablade
name = "smithed katana blade"
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")
finalitem = finalforreal
/obj/item/stick
name = "wooden rod"
@@ -244,6 +257,6 @@
/obj/item/swordhandle
name = "sword handle"
desc = "It's a rod, suitable for use of a handle of a tool. Also could serve as a weapon, in a pinch."
desc = "It's a crudlely shaped wooden sword hilt."
icon = 'icons/obj/smith.dmi'
icon_state = "shorthilt"