dix
This commit is contained in:
@@ -35,23 +35,24 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
value_per_unit = 0.025
|
||||
beauty_modifier = 0.075
|
||||
|
||||
///Slight force increase
|
||||
///Slight force decrease. It's gold, it's soft as fuck.
|
||||
/datum/material/gold
|
||||
name = "gold"
|
||||
desc = "Gold"
|
||||
color = list(340/255, 240/255, 50/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0) //gold is shiny, but not as bright as bananium
|
||||
strength_modifier = 1.2
|
||||
strength_modifier = 0.8
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/gold
|
||||
value_per_unit = 0.0625
|
||||
beauty_modifier = 0.15
|
||||
armor_modifiers = list("melee" = 1.1, "bullet" = 1.1, "laser" = 1.15, "energy" = 1.15, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 0.7, "acid" = 1.1)
|
||||
|
||||
///Has no special properties
|
||||
///Small force increase, for diamond swords
|
||||
/datum/material/diamond
|
||||
name = "diamond"
|
||||
desc = "Highly pressurized carbon"
|
||||
color = list(48/255, 272/255, 301/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
strength_modifier = 1.1
|
||||
alpha = 132
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/diamond
|
||||
@@ -106,6 +107,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
name = "bluespace crystal"
|
||||
desc = "Crystals with bluespace properties"
|
||||
color = list(119/255, 217/255, 396/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
integrity_modifier = 0.2 //these things shatter when thrown.
|
||||
alpha = 200
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE)
|
||||
beauty_modifier = 0.5
|
||||
@@ -139,7 +141,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
name = "titanium"
|
||||
desc = "Titanium"
|
||||
color = "#b3c0c7"
|
||||
strength_modifier = 1.3
|
||||
strength_modifier = 1.1
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/titanium
|
||||
value_per_unit = 0.0625
|
||||
@@ -203,7 +205,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
name = "adamantine"
|
||||
desc = "A powerful material made out of magic, I mean science!"
|
||||
color = "#6d7e8e"
|
||||
strength_modifier = 1.5
|
||||
strength_modifier = 1.3
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/adamantine
|
||||
value_per_unit = 0.25
|
||||
@@ -276,6 +278,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
desc = "Mir'ntrath barhah Nar'sie."
|
||||
color = "#3C3434"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
strength_modifier = 1.2
|
||||
sheet_type = /obj/item/stack/sheet/runed_metal
|
||||
value_per_unit = 0.75
|
||||
armor_modifiers = list("melee" = 1.2, "bullet" = 1.2, "laser" = 1, "energy" = 1, "bomb" = 1.2, "bio" = 1.2, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/**
|
||||
* Automatic skill increase, multiplied by skill affinity if existing.
|
||||
* Only works if skill is numerical.
|
||||
* Only works if skill is numerical or levelled..
|
||||
*/
|
||||
/datum/mind/proc/auto_gain_experience(skill, value, maximum, silent = FALSE)
|
||||
if(!ispath(skill, /datum/skill))
|
||||
|
||||
6
code/datums/skills/blacksmithing.dm
Normal file
6
code/datums/skills/blacksmithing.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
/datum/skill/level/dorfy/blacksmithing
|
||||
name = "Blacksmithing"
|
||||
desc = "Making metal into fancy shapes using heat and force. Higher levels increase both your working speed at an anvil as well as the quality of your works."
|
||||
name_color = COLOR_FLOORTILE_GRAY
|
||||
skill_traits = list(SKILL_SANITY, SKILL_INTELLIGENCE, SKILL_USE_TOOL, SKILL_TRAINING_TOOL)
|
||||
ui_category = SKILL_UI_CAT_MISC
|
||||
@@ -17,7 +17,6 @@
|
||||
#define RECIPE_HALBERD "duffp" //draw upset fold fold punch
|
||||
#define RECIPE_GLAIVE "usfp" //upset shrink fold punch
|
||||
|
||||
#define STEPS_CAP 8
|
||||
/obj/structure/anvil
|
||||
name = "anvil"
|
||||
desc = "Base class of anvil. This shouldn't exist, but is useable."
|
||||
@@ -28,10 +27,9 @@
|
||||
var/workpiece_state = FALSE
|
||||
var/datum/material/workpiece_material
|
||||
var/anvilquality = 0
|
||||
var/qualitymod = 0
|
||||
var/currentquality = 0 //lolman? what the fuck do these vars do?
|
||||
var/currentsteps = 0 //even i don't know
|
||||
var/strengthstepcostmod = 1 //todo: document this shit
|
||||
var/outrightfailchance = 1 //todo: document this shit
|
||||
var/stepsdone = ""
|
||||
var/list/smithrecipes = list(RECIPE_AXE = /obj/item/smithing/axehead,
|
||||
RECIPE_HAMMER = /obj/item/smithing/hammerhead,
|
||||
@@ -49,7 +47,7 @@
|
||||
|
||||
/obj/structure/anvil/Initialize()
|
||||
..()
|
||||
qualitymod = anvilquality
|
||||
currentquality = anvilquality
|
||||
|
||||
/obj/structure/anvil/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/ingot))
|
||||
@@ -61,7 +59,11 @@
|
||||
workpiece_state = WORKPIECE_PRESENT
|
||||
workpiece_material = notsword.custom_materials
|
||||
to_chat(user, "You place the [notsword] on the [src].")
|
||||
currentquality = qualitymod
|
||||
currentquality = anvilquality
|
||||
var/skillmod = 0
|
||||
if(user.mind.skill_holder)
|
||||
skillmod = user.mind.get_skill_level(/datum/skill/level/dorfy/blacksmithing)/2
|
||||
currentquality += skillmod
|
||||
qdel(notsword)
|
||||
else
|
||||
to_chat(user, "The ingot isn't workable yet!")
|
||||
@@ -84,63 +86,64 @@
|
||||
|
||||
|
||||
/obj/structure/anvil/proc/do_shaping(mob/user, var/qualitychange)
|
||||
qualitymod += qualitychange
|
||||
currentquality += qualitychange
|
||||
var/list/shapingsteps = list("weak hit", "strong hit", "heavy hit", "fold", "draw", "shrink", "bend", "punch", "upset") //weak/strong/heavy hit affect strength. All the other steps shape.
|
||||
workpiece_state = WORKPIECE_INPROGRESS
|
||||
var/stepdone = input(user, "How would you like to work the metal?") in shapingsteps
|
||||
switch(stepdone)
|
||||
if("weak hit")
|
||||
currentsteps += 1 * strengthstepcostmod
|
||||
strengthstepcostmod += 0.3
|
||||
qualitymod += 1
|
||||
currentsteps += 1
|
||||
outrightfailchance += 10
|
||||
currentquality += 1
|
||||
if("strong hit")
|
||||
currentsteps += 1.25 * strengthstepcostmod
|
||||
strengthstepcostmod += 0.5
|
||||
qualitymod += 2
|
||||
currentsteps += 2
|
||||
outrightfailchance += 17.5
|
||||
currentquality += 2
|
||||
if("heavy hit")
|
||||
currentsteps += 1.5 * strengthstepcostmod
|
||||
strengthstepcostmod += 0.7
|
||||
qualitymod += 3
|
||||
currentsteps += 3
|
||||
outrightfailchance += 25
|
||||
currentquality += 3
|
||||
if("fold")
|
||||
stepsdone += "f"
|
||||
currentsteps += 1
|
||||
qualitymod -= 2
|
||||
currentquality -= 1
|
||||
if("draw")
|
||||
stepsdone += "d"
|
||||
currentsteps += 1
|
||||
qualitymod -= 2
|
||||
currentquality -= 1
|
||||
if("shrink")
|
||||
stepsdone += "s"
|
||||
currentsteps += 1
|
||||
qualitymod -= 2
|
||||
currentquality -= 1
|
||||
if("bend")
|
||||
stepsdone += "b"
|
||||
currentsteps += 1
|
||||
qualitymod -= 2
|
||||
currentquality -= 1
|
||||
if("punch")
|
||||
stepsdone += "p"
|
||||
currentsteps += 1
|
||||
qualitymod -= 2
|
||||
currentquality -= 1
|
||||
if("upset")
|
||||
stepsdone += "u"
|
||||
currentsteps += 1
|
||||
qualitymod -= 2
|
||||
currentquality -= 1
|
||||
to_chat(user, "You [stepdone] the metal.")
|
||||
currentquality += qualitymod
|
||||
to_chat(user, stepsdone)
|
||||
if(length(stepsdone) >= 3)
|
||||
tryfinish(user)
|
||||
|
||||
/obj/structure/anvil/proc/tryfinish(mob/user)
|
||||
if(currentsteps > STEPS_CAP)
|
||||
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
|
||||
new /obj/item/stack/ore/slag(T)
|
||||
currentquality = 0
|
||||
qualitymod = anvilquality
|
||||
currentquality = anvilquality
|
||||
stepsdone = ""
|
||||
currentsteps = 0
|
||||
outrightfailchance = 1
|
||||
if(user.mind.skill_holder)
|
||||
user.mind.auto_gain_experience(/datum/skill/level/dorfy/blacksmithing, 25, 400, silent = FALSE)
|
||||
for(var/i in smithrecipes)
|
||||
to_chat(user, "comparing [i] to [stepsdone]")
|
||||
if(i == stepsdone)
|
||||
@@ -151,10 +154,10 @@
|
||||
workpiece_state = FALSE
|
||||
finisheditem.quality = currentquality
|
||||
finisheditem.set_custom_materials(workpiece_material)
|
||||
currentquality = 0
|
||||
qualitymod = anvilquality
|
||||
currentquality = anvilquality
|
||||
stepsdone = ""
|
||||
currentsteps = 0
|
||||
outrightfailchance = 1
|
||||
break
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
//TODO: OBTAILABILITY, ANVIL TYPES, HAMMER TYPES, INGOTS
|
||||
|
||||
|
||||
|
||||
/obj/item/melee/smith
|
||||
name = "base class obj/item/melee/smith" //tin. handles overlay and quality and shit.
|
||||
icon = 'icons/obj/smith.dmi'
|
||||
@@ -45,6 +49,7 @@
|
||||
|
||||
/obj/item/mining_scanner/prospector/Initialize()
|
||||
..()
|
||||
var/mutable_appearance/overlay
|
||||
desc = "A handmade [name]."
|
||||
overlay = mutable_appearance(icon, "minihandle")
|
||||
overlay.appearance_flags = RESET_COLOR
|
||||
@@ -61,6 +66,7 @@
|
||||
/obj/item/pickaxe/smithed/Initialize()
|
||||
..()
|
||||
desc = "A handmade [name]."
|
||||
var/mutable_appearance/overlay
|
||||
overlay = mutable_appearance(icon, "stick")
|
||||
overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(overlay)
|
||||
@@ -76,6 +82,7 @@
|
||||
/obj/item/shovel/smithed/Initialize()
|
||||
..()
|
||||
desc = "A handmade [name]."
|
||||
var/mutable_appearance/overlay
|
||||
overlay = mutable_appearance(icon, "shovelhandle")
|
||||
overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(overlay)
|
||||
@@ -125,6 +132,8 @@
|
||||
|
||||
/obj/item/melee/smith/hammer//blacksmithing, not warhammer.
|
||||
name = "hammer"
|
||||
icon_state = "hammer"
|
||||
overlay_state = "hammerhandle"
|
||||
var/qualitymod = 0
|
||||
|
||||
/obj/item/scythe/smithed //we need to inherit scythecode, but that's about it.
|
||||
@@ -135,9 +144,13 @@
|
||||
name = "coghead club"
|
||||
|
||||
/obj/item/melee/smith/shortsword
|
||||
name = "shortsword"
|
||||
name = "gladius"
|
||||
icon_state = "gladius"
|
||||
overlay_state = "gladiushilt"
|
||||
|
||||
/obj/item/melee/smith/twohand/broadsword
|
||||
name = "broadsword"
|
||||
icon_state = "broadsword"
|
||||
overlay_state = "broadhilt"
|
||||
force = 15
|
||||
wielded_mult = 1.8
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
icon_state = "glaive"
|
||||
|
||||
/obj/item/smithing/glaive/startfinish()
|
||||
var/obj/item/melee/smith/twohand/halberd/finalforreal = new /obj/item/melee/smith/twohand/glaive(src)
|
||||
var/obj/item/melee/smith/twohand/glaive/finalforreal = new /obj/item/melee/smith/twohand/glaive(src)
|
||||
finalforreal.force += quality
|
||||
finalforreal.wield_force = finalforreal.force*finalforreal.wielded_mult
|
||||
finalforreal.throwforce = finalforreal.force
|
||||
|
||||
@@ -633,6 +633,7 @@
|
||||
#include "code\datums\skills\_skill.dm"
|
||||
#include "code\datums\skills\_skill_holder.dm"
|
||||
#include "code\datums\skills\_skill_modifier.dm"
|
||||
#include "code\datums\skills\blacksmithing.dm"
|
||||
#include "code\datums\skills\engineering.dm"
|
||||
#include "code\datums\skills\medical.dm"
|
||||
#include "code\datums\skills\modifiers\job.dm"
|
||||
|
||||
Reference in New Issue
Block a user