Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions code/datums/components/crafting/_recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
/obj/item/wirecutters/cyborg,
/obj/item/wrench/cyborg,
))
// DARKPACK EDIT ADD START - STORYTELER_STATS
/// Stat define/typepath required for this recipe. No check if null
var/datum/st_stat/skill_required_for_use = STAT_CRAFTS
/// You need ATLEAST this many dots in a skill to craft.
var/skill_dots_minimum = null // Null by default means it wont even try to get stats. as if its 0 or less, it only catches people with low stats AND a debuff and i dont really care.
// DARKPACK EDIT ADD END

/datum/crafting_recipe/New()
if(!name && result)
Expand Down Expand Up @@ -133,5 +139,14 @@

// DARKPACK EDIT ADD START
/datum/crafting_recipe/proc/is_recipe_available(mob/user)
SHOULD_CALL_PARENT(TRUE)

if(skill_required_for_use && !isnull(skill_dots_minimum))
var/mob/living/living_user = astype(user)
if(!living_user)
return FALSE
if(living_user.st_get_stat(skill_required_for_use) < skill_dots_minimum)
return FALSE

return TRUE
// DARKPACK EDIT ADD END
9 changes: 6 additions & 3 deletions code/datums/components/crafting/crafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,12 @@
var/mob/living/carbon/human/human_crafter
if(ishuman(crafter))
human_crafter = crafter
if(CONFIG_GET(flag/punishing_zero_dots) && human_crafter.st_get_stat(STAT_CRAFTS) < 1)
return ", you dont know how to craft!"
recipe_time = recipe_time / max(human_crafter.st_get_stat(STAT_CRAFTS), 1)
var/datum/st_stat/recipe_skill = recipe.skill_required_for_use
var/level_required = recipe.skill_dots_minimum
if(recipe_skill)
if(!isnull(level_required) && human_crafter.st_get_stat(recipe_skill) < level_required)
return ", you dont know how to craft! You need at least [level_required] in [recipe_skill::name]!"
recipe_time = recipe_time / max(human_crafter.st_get_stat(recipe_skill), 1)
Comment on lines +255 to +260
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i notice the config check is gone but now all crafting recipes have skill dots minimum = 0? From what I can tell this allows people with crafts zero to craft like, the most simple recipes like bouquets? what about arcane/necro/abyss tomes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea. I think it makes more sense as a default, the same way i did for machines, where there is just WAY to much variance in task complexity to broadly say your incapable of making it without actually taking a second to think through each recipes complexity.
The tomes seem like a good candidate to make them an occult skill req instead? thoughts on the level? 1 seems appropriate.

// DARKPACK EDIT ADD END

if(!do_after(crafter, round(recipe_time, 0.1 SECONDS), target = crafter))
Expand Down
2 changes: 2 additions & 0 deletions code/datums/components/crafting/doors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
time = 10 SECONDS
category = CAT_DOORS
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/blast_doors
name = "Blast Door"
Expand All @@ -23,3 +24,4 @@
time = 30 SECONDS
category = CAT_DOORS
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS
5 changes: 4 additions & 1 deletion code/datums/components/crafting/entertainment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
/datum/reagent/water/holywater = 10,
)
category = CAT_ENTERTAINMENT

skill_required_for_use = STAT_OCCULT // DARKPACK EDIT ADD - STORYTELER_STATS
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/skateboard
name = "Skateboard"
Expand All @@ -94,6 +95,7 @@
/obj/item/stack/rods = 10,
)
category = CAT_ENTERTAINMENT
skill_dots_minimum = 1 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/scooter
name = "Scooter"
Expand All @@ -104,6 +106,7 @@
/obj/item/stack/rods = 12,
)
category = CAT_ENTERTAINMENT
skill_dots_minimum = 1 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/headpike
name = "Spike Head (Glass Spear)"
Expand Down
3 changes: 3 additions & 0 deletions code/datums/components/crafting/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
time = 4 SECONDS
category = CAT_EQUIPMENT

/* // DARKPACK EDIT REMOVAL
/datum/crafting_recipe/moonflowershield
name = "Moonflower Shield"
result = /obj/item/shield/buckler/moonflower
Expand All @@ -33,6 +34,7 @@
)
time = 4 SECONDS
category = CAT_EQUIPMENT
*/

/datum/crafting_recipe/radio_containing
abstract_type = /datum/crafting_recipe/radio_containing
Expand Down Expand Up @@ -88,6 +90,7 @@
tool_behaviors = list(TOOL_WELDER, TOOL_SCREWDRIVER, TOOL_WRENCH)
time = 20 SECONDS
category = CAT_EQUIPMENT
skill_dots_minimum = 3 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/secured_freezer_cabinet
name = "Secure Freezer Cabinet"
Expand Down
13 changes: 10 additions & 3 deletions code/datums/components/crafting/melee_weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
skill_dots_minimum = 2 // DARKPACK EDIT ADD - STORYTELER_STATS
/* // DARKPACK EDIT REMOVE
/datum/crafting_recipe/teleprod
name = "Teleprod"
Expand Down Expand Up @@ -124,7 +125,7 @@
*/
/datum/crafting_recipe/chainsaw
name = "Chainsaw"
result = /obj/item/chainsaw
result = /obj/item/chainsaw/vamp // DARKPACK EDIT CHANGE
reqs = list(
/obj/item/circular_saw = 1,
/obj/item/stack/cable_coil = 3,
Expand All @@ -133,6 +134,7 @@
tool_behaviors = list(TOOL_WELDER)
time = 5 SECONDS
category = CAT_WEAPON_MELEE
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/spear
name = "Spear"
Expand All @@ -144,6 +146,7 @@
)
time = 4 SECONDS
category = CAT_WEAPON_MELEE
skill_dots_minimum = 1 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/wireprod
name = "Wireprod assembly"
Expand Down Expand Up @@ -172,6 +175,7 @@
time = 2 SECONDS
reqs = list(/obj/item/stack/sheet/bone = 2)
category = CAT_WEAPON_MELEE
skill_dots_minimum = 2 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/bonespear
name = "Bone Spear"
Expand All @@ -182,6 +186,7 @@
/obj/item/stack/sheet/sinew = 1,
)
category = CAT_WEAPON_MELEE
skill_dots_minimum = 2 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/boneaxe
name = "Bone Axe"
Expand All @@ -192,6 +197,7 @@
/obj/item/stack/sheet/sinew = 3,
)
category = CAT_WEAPON_MELEE
skill_dots_minimum = 2 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/house_edge
name = "House Edge"
Expand Down Expand Up @@ -253,6 +259,8 @@
)
time = 8 SECONDS
category = CAT_WEAPON_MELEE
skill_dots_minimum = 2 // DARKPACK EDIT ADD - STORYTELER_STATS

/* // DARKPACK EDIT REMOVE
/datum/crafting_recipe/sm_sword
name = "Supermatter Sword"
Expand All @@ -265,7 +273,6 @@
)
time = 120 SECONDS
category = CAT_WEAPON_MELEE
*/

/datum/crafting_recipe/dragonator_spear_untreated
name = "Untreated Giant-Killer Spear"
Expand All @@ -277,4 +284,4 @@
)
time = 5 SECONDS
category = CAT_WEAPON_MELEE

*/
3 changes: 2 additions & 1 deletion code/datums/components/crafting/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
)
tool_behaviors = list(TOOL_WIRECUTTER)
category = CAT_MISC
/* // DARKPACK EDIT REMOVE

/datum/crafting_recipe/cardboard_id
name = "Cardboard ID Card"
tool_behaviors = list(TOOL_WIRECUTTER)
Expand All @@ -56,6 +56,7 @@
)
category = CAT_MISC

/* // DARKPACK EDIT REMOVE
/datum/crafting_recipe/battery_match
name = "Battery Match"
result = /obj/item/match/battery
Expand Down
23 changes: 18 additions & 5 deletions code/datums/components/crafting/ranged_weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)
time = 4 SECONDS
category = CAT_WEAPON_RANGED

*/
/datum/crafting_recipe/receiver
name = "Modular Rifle Receiver"
tool_behaviors = list(TOOL_WRENCH, TOOL_WELDER)
Expand All @@ -31,6 +31,7 @@
)
time = 10 SECONDS
category = CAT_WEAPON_RANGED
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/riflestock
name = "Wooden Rifle Stock"
Expand All @@ -42,6 +43,7 @@
)
time = 5 SECONDS
category = CAT_WEAPON_RANGED
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/gun_maint_kit
name = "Makeshift Gun Maintenance Kit"
Expand All @@ -55,7 +57,9 @@
)
time = 5 SECONDS
category = CAT_WEAPON_RANGED
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/* // DARKPACK EDIT REMOVAL
/datum/crafting_recipe/advancedegun
name = "Advanced Energy Gun"
result = /obj/item/gun/energy/e_gun/nuclear
Expand Down Expand Up @@ -158,7 +162,7 @@
)
time = 10 SECONDS
category = CAT_WEAPON_RANGED

*/
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
name = "Pneumatic Cannon"
result = /obj/item/pneumatic_cannon/ghetto
Expand All @@ -170,7 +174,8 @@
)
time = 5 SECONDS
category = CAT_WEAPON_RANGED

skill_dots_minimum = 5 // DARKPACK EDIT ADD - STORYTELER_STATS
/*
/datum/crafting_recipe/flamethrower
name = "Flamethrower"
result = /obj/item/flamethrower
Expand All @@ -186,6 +191,7 @@
tool_behaviors = list(TOOL_SCREWDRIVER)
time = 1 SECONDS
category = CAT_WEAPON_RANGED
*/

/datum/crafting_recipe/pipegun
name = "Pipegun"
Expand All @@ -200,6 +206,7 @@
tool_behaviors = list(TOOL_SCREWDRIVER)
time = 5 SECONDS
category = CAT_WEAPON_RANGED
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/pipepistol
name = "Pipe Pistol"
Expand All @@ -216,6 +223,7 @@
tool_behaviors = list(TOOL_SCREWDRIVER)
time = 5 SECONDS
category = CAT_WEAPON_RANGED
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/rebarxbow
name = "Heated Rebar Crossbow"
Expand All @@ -231,6 +239,7 @@
tool_behaviors = list(TOOL_WELDER)
time = 5 SECONDS
category = CAT_WEAPON_RANGED
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/rebarxbowforced
name = "Forced Rebar Crossbow"
Expand All @@ -246,7 +255,8 @@
tool_behaviors = list(TOOL_CROWBAR)
time = 1 SECONDS
category = CAT_WEAPON_RANGED
*/
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/pipegun_prime
name = "Regal Pipegun"
result = /obj/item/gun/ballistic/rifle/boltaction/pipegun/prime
Expand Down Expand Up @@ -311,7 +321,7 @@
time = 5 SECONDS
category = CAT_WEAPON_RANGED
crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_MUST_BE_LEARNED
/* // DARKPACK EDIT REMOVE

/datum/crafting_recipe/pipe_organ_gun
name = "Pipe Organ Gun"
tool_behaviors = list(TOOL_WELDER, TOOL_SCREWDRIVER)
Expand All @@ -327,7 +337,9 @@
time = 15 SECONDS
category = CAT_WEAPON_RANGED
crafting_flags = CRAFT_CHECK_DENSITY
skill_dots_minimum = 5 // DARKPACK EDIT ADD - STORYTELER_STATS

/* // DARKPACK EDIT REMOVAL
/datum/crafting_recipe/ratvarian_repeater
name = "Emplaced Ratvarian Repeater"
tool_behaviors = list(TOOL_SCREWDRIVER,TOOL_WRENCH)
Expand Down Expand Up @@ -368,6 +380,7 @@
time = 8 SECONDS
category = CAT_WEAPON_RANGED
crafting_flags = CRAFT_CHECK_DENSITY
skill_dots_minimum = 4 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/trash_cannon
name = "Trash Cannon"
Expand Down
3 changes: 2 additions & 1 deletion code/datums/components/crafting/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
/obj/item/reagent_containers/syringe = 1,
)
category = CAT_ROBOT
*/

/datum/crafting_recipe/mod_core_soul
name = "MOD core (Soul)"
result = /obj/item/mod/core/soul
Expand All @@ -192,3 +192,4 @@
/obj/item/soulstone = 1,
)
category = CAT_ROBOT
*/
3 changes: 2 additions & 1 deletion code/datums/components/crafting/weapon_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
tool_behaviors = list(TOOL_SCREWDRIVER)
time = 0.5 SECONDS
category = CAT_WEAPON_AMMO
*/

/datum/crafting_recipe/improvisedslug
name = "Junk Shell"
Expand All @@ -103,7 +104,7 @@
time = 1.2 SECONDS
category = CAT_WEAPON_AMMO
crafting_flags = CRAFT_SKIP_MATERIALS_PARITY
*/
skill_dots_minimum = 3 // DARKPACK EDIT ADD - STORYTELER_STATS

/datum/crafting_recipe/trashball
name = "Trashball"
Expand Down
Loading
Loading