+
+ +
+
+ + +
+
+ If you need more metal for your work, stop being lazy and smelt the ores in a furnace then keep going!
+ Now go and make things of metal!
+
+
+
+ "}
+
+/* COPIED TO BASE CODE
+// ------------ METALWORKING BENCH ------------------ Part of the module, for metalworking that doesnt need a whole forge setup
+
+/obj/machinery/workbench/forge // should be repathed to worbench/metal
+ name = "metalworking bench"
+ desc = "A workbench with a drill press, a makeshift blowtorch setup, and various tools for making crude weapons and tools."
+ icon = 'modular_BD2/blacksmith/icons/workbench64x32.dmi'
+ icon_state = "bench_metal"
+*/
+
+
+/*
+// Stacking craftin items visual updater
+/obj/item/stack/crafting/update_icon_state()
+ var/amount = get_amount()
+ if(amount <= 5)
+ icon_state = initial(icon_state)
+ else if(amount <= 25)
+ icon_state = "[initial(icon_state)]_2"
+ else
+ icon_state = "[initial(icon_state)]_3"
+
+// Adapted for the specific bullet remnant stacking
+/obj/item/stack/crafting/powder/update_icon_state()
+ var/amount = get_amount()
+ if(amount <= 80)
+ icon_state = initial(icon_state)
+ else if(amount <= 160)
+ icon_state = "[initial(icon_state)]_2"
+ else
+ icon_state = "[initial(icon_state)]_3"
+*/
+
+// ------------ COAL & COKE ------------------ New base material and the sheet that can be used as fuel or ground for charcoal
+
+/datum/material/coal
+ name = "coal"
+ desc = "coal"
+ color = "#0a0a0a"
+ alpha = 150
+ categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = FALSE)
+ sheet_type = /obj/item/stack/ore/coal
+ value_per_unit = 0.0050
+
+/obj/item/stack/ore/coal // turns to coke when heated in a Furnace or ORM
+ name = "coal"
+ desc = "Pure coal needs heat-processing to become good fuel."
+ icon_state = "ore_coal"
+ singular_name = "lump of coal"
+ points = 2
+ custom_materials = null
+ refined_type = /obj/item/stack/sheet/coke
+ merge_type = /obj/item/stack/ore/coal
+ resistance_flags = FLAMMABLE
+
+/obj/item/stack/sheet/coke // Can be used to fuel Furnaces, Campfires, Barrel Fires, Potbelly stoves, Fireplaces, or grind for charcoal
+ name = "coke"
+ desc = "Coke is what you get when you heat-treat coal. It's a good fuel for burning."
+ singular_name = "bag of coke"
+ icon_state = "sheet_coke"
+ custom_materials = null
+ throwforce = 2
+ grind_results = list(/datum/reagent/medicine/charcoal = 5)
+ material_type = /datum/material/coal
+ merge_type = /obj/item/stack/sheet/coke
+ resistance_flags = FLAMMABLE
+
+/obj/item/stack/sheet/coke/twenty
+ amount = 20
+
+/turf/closed/mineral/coal
+ mineralType = /obj/item/stack/ore/coal
+ spreadChance = 5
+ spread = 1
+ scan_state = "rock_Coal"
+
+// woodenrod production made, in sheet_types.dm /obj/item/stack/sheet/mineral/wood/attackby(obj/item/W, mob/user, params)
diff --git a/code/modules/smithing/anvil.dm b/modular_BD2/blacksmith/code/anvil.dm
similarity index 63%
rename from code/modules/smithing/anvil.dm
rename to modular_BD2/blacksmith/code/anvil.dm
index 16957a532e5..0da17fd723f 100644
--- a/code/modules/smithing/anvil.dm
+++ b/modular_BD2/blacksmith/code/anvil.dm
@@ -3,45 +3,50 @@
#define WORKPIECE_FINISHED 3
#define WORKPIECE_SLAG 5
-//bend start\tools, maybe add more tools?
-#define RECIPE_PICKAXE "bff" //bend fold fold
-#define RECIPE_SHOVEL "buu" //bend upset upset
#define RECIPE_HAMMER "bpp" //bend punch punch
+#define RECIPE_SHOVEL "buu" //bend upset upset
+#define RECIPE_PICKAXE "bff" //bend fold fold
#define RECIPE_PROSPECTPICK "bfs" //bend fold shrink
#define RECIPE_KITCHENKNIFE "bsd" //bend shrink draw
#define RECIPE_CROWBAR "bbb" //bend bend bend
#define RECIPE_UNITOOL "bbu" //bend bend upset
+#define RECIPE_SCRAPSAW "ffsu" //fold fold shrink upset
-//shrink start \maybe add armor here?
#define RECIPE_RING "sss" //shrink shrink shrink
-
-//punch start \maybe add armor here?
#define RECIPE_BALLANDCHAIN "pbu" //punch bend upset
+#define RECIPE_ARMOR_PIECE "pup" //punch upset punch
+
+#define RECIPE_BOWIE "dfs" //draw fold shrink
+#define RECIPE_DAGGER "dds" //draw draw shrink
-//fold start \Swords need a buff or need their math exposed to players \ Will also add more comments later
#define RECIPE_MACHETE "fdf" //fold draw fold
-#define RECIPE_SABRE "ffdd" //fold fold draw draw
+#define RECIPE_MACHREFORG "fuf" //fold upset fold lawnmower classic
+
#define RECIPE_SWORD "ffdf" // fold fold draw fold
-#define RECIPE_WAKI "fffd" //fold fold fold draw
+#define RECIPE_SABRE "ffdd" //fold fold draw draw
+
+#define RECIPE_LONGSWORD "fffdd" //fold fold fold draw draw
#define RECIPE_KATANA "fffff" //fold fold fold fold fold
-#define RECIPE_MACHREFORG "fddf" //fold draw draw fold
+#define RECIPE_WAKI "fffs" //fold fold fold shrink
-//upset start \Mostly 2h weapons, save for the mace
#define RECIPE_MACE "upu" //upset punch upset
+#define RECIPE_SCRAP "udpp" //upset draw shrink punch
#define RECIPE_AXE "udsp" //upset draw shrink punch
-#define RECIPE_SCRAP "udpp" //upset draw shrink punch \2h sword
+#define RECIPE_CRUSHER "uupp" //upset upset punch punch
+
+#define RECIPE_SPEAR "dddf" //draw draw draw fold
+#define RECIPE_TRIDENT "ddbf" //draw draw bend fold
-//draw start \Maybe add a shield here?
-#define RECIPE_DAGGER "dfs" //draw fold shrink
-#define RECIPE_SPEAR "ddbf" //draw draw bend fold
-#define RECIPE_JAVELIN "dbf" //draw bend fold
-#define RECIPE_THROWING "dbd" //draw bend draw
+#define RECIPE_JAVELIN "sdu" //shrink draw upset
+#define RECIPE_THROWING "sdd" //shrink draw draw
+#define RECIPE_BOLA "suu" //shrink upset upset
-//Legion themed\ not exclusive to any anvil
-#define RECIPE_LANCE "ddfp" //draw draw fold punch \spear reskin
-#define RECIPE_GLADIUS "fbf" //fold bend fold \Machete reskin
-#define RECIPE_SPATHA "ffbf" // fold fold bend fold \Sword Reskin
-#define RECIPE_WARHONED "udup" //upset draw upset punch\ 2H axe reskin
+
+// LEGION SPECIFIC
+#define RECIPE_GLADIUS "fbf" //fold bend fold
+#define RECIPE_LANCE "dbdf" //draw bend fold fold LEGION
+#define RECIPE_SPATHA "ffbf" // fold fold bend fold LEGION
+#define RECIPE_WARAXE "udup" //upset draw upset punch LEGION
GLOBAL_LIST_INIT(anvil_recipes, list(
RECIPE_HAMMER = /obj/item/smithing/hammerhead,
@@ -50,40 +55,49 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
RECIPE_PROSPECTPICK = /obj/item/smithing/prospectingpickhead,
RECIPE_KITCHENKNIFE = /obj/item/smithing/knifeblade,
RECIPE_CROWBAR = /obj/item/smithing/crowbar,
+ RECIPE_UNITOOL = /obj/item/smithing/unitool,
RECIPE_RING = /obj/item/smithing/special/jewelry/ring,
RECIPE_BALLANDCHAIN = /obj/item/smithing/ballandchain,
+ RECIPE_ARMOR_PIECE = /obj/item/smithing/armor_piece,
RECIPE_DAGGER = /obj/item/smithing/daggerblade,
+ RECIPE_BOWIE = /obj/item/smithing/bowieblade,
RECIPE_MACHETE = /obj/item/smithing/macheteblade,
+ RECIPE_MACHREFORG = /obj/item/smithing/macheterblade,
RECIPE_SWORD = /obj/item/smithing/swordblade,
RECIPE_SABRE = /obj/item/smithing/sabreblade,
- RECIPE_WAKI = /obj/item/smithing/wakiblade,
+ RECIPE_LONGSWORD = /obj/item/smithing/longswordblade,
RECIPE_KATANA = /obj/item/smithing/katanablade,
+ RECIPE_WAKI = /obj/item/smithing/wakiblade,
+ RECIPE_SCRAPSAW = /obj/item/smithing/scrapsaw,
RECIPE_MACE = /obj/item/smithing/macehead,
+ RECIPE_SCRAP = /obj/item/smithing/scrapblade,
RECIPE_AXE = /obj/item/smithing/axehead,
+ RECIPE_CRUSHER = /obj/item/smithing/crusherhead,
RECIPE_SPEAR = /obj/item/smithing/spearhead,
+ RECIPE_TRIDENT = /obj/item/smithing/tridenthead,
RECIPE_JAVELIN = /obj/item/smithing/javelinhead,
RECIPE_THROWING = /obj/item/smithing/throwingknife,
- RECIPE_UNITOOL = /obj/item/smithing/unitool,
- RECIPE_MACHREFORG = /obj/item/smithing/macheterblade,
- RECIPE_SCRAP = /obj/item/smithing/scrapblade,
+ RECIPE_BOLA = /obj/item/smithing/bola,
RECIPE_GLADIUS = /obj/item/smithing/gladiusblade,
RECIPE_SPATHA = /obj/item/smithing/spathablade,
- RECIPE_WARHONED = /obj/item/smithing/warhonedhead,
- RECIPE_LANCE = /obj/item/smithing/lancehead))
+ RECIPE_WARAXE = /obj/item/smithing/waraxehead,
+ RECIPE_LANCE = /obj/item/smithing/lancehead,
+ ))
+
// Logic of smithing recipes: Tools start with bend and have 3 steps. 1h weapons have 3-4 steps. 2h weapons have 4-5 steps. Bigger bladed stuff start with a fold. Pointy stuff generally start with a draw. Unusual stuff migth start with upset.
// Point of having a structure is obviously to help remember, not just keeping every recipe as pure rote memory with no internal logic. If you add more stuff and fuck this up and don't read comments I hope you get a prolapse. - Pebbles
-/obj/structure/anvil
- name = "anvil"
- desc = "Base class of anvil. This shouldn't exist, but is useable."
- icon = 'icons/fallout/objects/crafting/blacksmith.dmi'
- icon_state = "anvil"
+/obj/structure/blacksmith/anvil
+ name = "anvil template"
+ desc = "This should not be visible - please file a bug report."
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
density = TRUE
anchored = TRUE
+ max_integrity = 1000
light_system = MOVABLE_LIGHT
light_range = 2
- light_power = 0.75
+ light_power = GLOW_MODERATE
light_color = LIGHT_COLOR_FIRE
light_on = FALSE
var/busy = FALSE //If someone is already interacting with this anvil
@@ -92,21 +106,20 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
var/anvilquality = 0
var/currentquality = 0 //lolman? what the fuck do these vars do?
var/currentsteps = 0 //even i don't know
- var/outrightfailchance = 1 //todo: document this shit
+ var/outrightfailchance = 5 //todo: document this shit
var/stepsdone = ""
- var/rng = FALSE
+ var/rng = TRUE
var/debug = FALSE //vv this if you want an artifact
var/artifactrolled = FALSE
- var/itemqualitymax = 20 //A quality 8 bronze spear does less damage than a regular bone spear from craftmenu, lol
-
+ var/itemqualitymax = 10
-/obj/structure/anvil/Initialize(mapload)
+/obj/structure/blacksmith/anvil/Initialize(mapload)
. = ..()
- RegisterSignal(src, COMSIG_CLICK_ALT, PROC_REF(ResetAnvil)) // emergency way to reset the anvil incase something goes wrong.
+ RegisterSignal(src, COMSIG_CLICK_ALT, .proc/ResetAnvil) // emergency way to reset the anvil incase something goes wrong.
currentquality = anvilquality
-/obj/structure/anvil/attackby(obj/item/I, mob/user)
- if(istype(I, /obj/item/ingot)) // That's it we're refactoring this code because I can't im literally crying rn ; _;
+/obj/structure/blacksmith/anvil/attackby(obj/item/I, mob/user)
+ if(istype(I, /obj/item/blacksmith/ingot)) // That's it we're refactoring this code because I can't im literally crying rn ; _;
return HandleIngot(I, user)
if(istype(I, /obj/item/melee/smith/hammer) || istype(I, /obj/item/twohanded/sledgehammer/simple)) // Hammer interactions:
@@ -126,17 +139,17 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
return ..()
-/obj/structure/anvil/proc/CheckBusy(mob/user)
+/obj/structure/blacksmith/anvil/proc/CheckBusy(mob/user)
var/mob/living/carbon/human/F = user
return F.busy || busy
-/obj/structure/anvil/proc/SetBusy(value, mob/living/carbon/human/H)
+/obj/structure/blacksmith/anvil/proc/SetBusy(value, mob/living/carbon/human/H)
if(H)
H.busy = value
busy = value
-/obj/structure/anvil/proc/ResetAnvil()
+/obj/structure/blacksmith/anvil/proc/ResetAnvil()
set_light_on(FALSE)
currentquality = initial(currentquality)
stepsdone = ""
@@ -144,23 +157,22 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
outrightfailchance = initial(outrightfailchance)
artifactrolled = FALSE
workpiece_state = FALSE
-
- cut_overlay(image(icon= 'icons/fallout/objects/crafting/blacksmith.dmi',icon_state="workpiece"))
+ cut_overlay(image(icon= 'modular_BD2/blacksmith/icons/blacksmith.dmi',icon_state="workpiece"))
SetBusy(FALSE, null)
-/obj/structure/anvil/proc/HandleIngot(obj/item/ingot/notsword, mob/user)
+/obj/structure/blacksmith/anvil/proc/HandleIngot(obj/item/blacksmith/ingot/workpiece, mob/user)
if(workpiece_state)
to_chat(user, "There's already a workpiece! Finish it or take it off.")
return FALSE
- if(notsword.workability == "shapeable")
+ if(workpiece.workability == "shapeable")
workpiece_state = WORKPIECE_PRESENT
- workpiece_material = notsword.custom_materials
- to_chat(user, "You place the [notsword] on the [src].")
+ workpiece_material = workpiece.custom_materials
+ to_chat(user, "You place the [workpiece] on the [src].")
currentquality = initial(currentquality)
if(workpiece_state == WORKPIECE_PRESENT)
- add_overlay(image(icon= 'icons/fallout/objects/crafting/blacksmith.dmi',icon_state="workpiece"))
+ add_overlay(image(icon= 'modular_BD2/blacksmith/icons/blacksmith.dmi',icon_state="workpiece"))
set_light_on(TRUE)
var/skillmod = 0
@@ -168,24 +180,24 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
skillmod = user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/2
currentquality += skillmod
- qdel(notsword)
+ qdel(workpiece)
else
to_chat(user, "The ingot isn't workable yet!")
return FALSE
-/obj/structure/anvil/proc/do_shaping(mob/user, qualitychange)
+/obj/structure/blacksmith/anvil/proc/do_shaping(mob/user, qualitychange)
if(!iscarbon(user))
return
-
+
SetBusy(TRUE, user)
currentquality += qualitychange
workpiece_state = WORKPIECE_INPROGRESS // set it so we're working on it.
-
+
// Present choice selection.
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.
var/stepdone = input(user, "How would you like to work the metal?") in shapingsteps
-
+
// if user is not in range, remove business.
if(!locate(src) in range(1, user))
@@ -193,74 +205,75 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
// Time it takes for us to uh...forge..?
- var/steptime = 50
- switch(stepdone)
+ var/steptime = 45 // sounds edited to fit 4.5 seconds
+ switch(stepdone) // Have some more then
if("weak hit")
- playsound(src, 'code/modules/smithing/sound/anvil_weak.ogg',45)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_weak.ogg',100)
user.visible_message("[user] carefully hammers out imperfections in the metal.", \
"You carefully hammer out imperfections in the metal.")
if("strong hit")
- playsound(src, 'code/modules/smithing/sound/anvil_strong.ogg',45)
- do_smithing_sparks(1, TRUE, src)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_strong.ogg',100)
+ do_smithing_sparks(1, TRUE, src)
user.visible_message("[user] hammers out imperfections in the metal.", \
"You hammer out imperfections in the metal.")
if("heavy hit")
- playsound(src, 'code/modules/smithing/sound/anvil_heavy.ogg',45)
- do_smithing_sparks(2, TRUE, src)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_heavy.ogg',100)
+ do_smithing_sparks(2, TRUE, src)
user.visible_message("[user] forcefully hammers out imperfections in the metal.", \
"You forcefuly hammer out imperfections in the metal.")
if("fold")
- playsound(src, 'code/modules/smithing/sound/anvil_double1.ogg',45)
- do_smithing_sparks(1, TRUE, src)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_double1.ogg',95)
+ do_smithing_sparks(1, TRUE, src)
user.visible_message("[user] folds the metal.", \
"You fold the metal.")
if("draw")
- playsound(src, 'code/modules/smithing/sound/anvil_double2.ogg',45)
- do_smithing_sparks(1, TRUE, src)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_double2.ogg',80)
+ do_smithing_sparks(1, TRUE, src)
user.visible_message("[user] hammers both sides of the metal, drawing it out.", \
"You hammer both sides of the metal, drawing it out.")
if("shrink")
- playsound(src, 'code/modules/smithing/sound/anvil_rapid.ogg',45)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_rapid.ogg',100)
do_smithing_sparks(1, TRUE, src)
user.visible_message("[user] flattens the metal, shrinking it.", \
"You flatten the metal, shrinking it.")
if("bend")
- playsound(src, 'code/modules/smithing/sound/anvil_single1.ogg',45)
- do_smithing_sparks(1, TRUE, src)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_single1.ogg',75)
+ do_smithing_sparks(1, TRUE, src)
user.visible_message("[user] bends the metal, using the rounded end of the anvil.", \
"You bend the metal, using the rounded end of the anvil.")
if("punch")
- playsound(src, 'code/modules/smithing/sound/anvil_single2.ogg',45)
- do_smithing_sparks(1, TRUE, src)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_single2.ogg',95)
+ do_smithing_sparks(1, TRUE, src)
user.visible_message("[user] uses the puncher to make holes in the metal.", \
"You use the puncher to make holes in the metal.")
if("upset")
- playsound(src, 'code/modules/smithing/sound/anvil_double3.ogg',45)
- do_smithing_sparks(1, TRUE, src)
+ playsound(src, 'modular_BD2/blacksmith/sound/anvil_double3.ogg',100)
+ do_smithing_sparks(1, TRUE, src)
user.visible_message("[user] upsets the metal by hammering the thick end.", \
"You upset the metal by hammering the thick end.")
- if(user.mind.skill_holder) // Skill modifier to make it faster at blacksmithing.
- var/skillmod = user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/8 + 1 //Makes this faster as EXP gain was lowered
+ if(user.mind.skill_holder) // Skill modifier to make it faster at blacksmithing. Limited to avoid going too far out of step with sounds.
+ var/skillmod = user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/15 + 1
steptime = 50 / skillmod
+
if(!do_after(user, steptime, target = src))
return SetBusy(FALSE, user)
-
+
// I hate this.
// I'd rather die.
switch(stepdone)
if("weak hit")
currentsteps += 1
- outrightfailchance += 5
+ outrightfailchance += 4
currentquality += 1
if("strong hit")
currentsteps += 2
- outrightfailchance += 9.5
+ outrightfailchance += 8.5
currentquality += 2
if("heavy hit")
currentsteps += 3
- outrightfailchance += 12.5
+ outrightfailchance += 13
currentquality += 3
if("fold")
stepsdone += "f"
@@ -286,29 +299,23 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
stepsdone += "u"
currentsteps += 1
currentquality -= 1
-
- // Display message
- user.show_message(span_notice("You [stepdone] the metal."))
-
- // more sounds... uhhh...
- //playsound(src, 'sound/effects/clang2.ogg',40, 2) - Keeping it commented for now.
// sparkles~
- do_smithing_sparks(1, TRUE, src)
-
+ do_smithing_sparks(1, TRUE, src)
+
// the stepsdone is a string of characters which are actions made.
// Once it is more or equal to 3, call try finish.
if(length(stepsdone) >= 3)
tryfinish(user)
-
+
SetBusy(FALSE, user) // Set it to false, cause we're done now some how.
-/obj/structure/anvil/proc/tryfinish(mob/user) // Oh god before I prettify this code I just feel like I'm having a stroke at all this word garble.
+/obj/structure/blacksmith/anvil/proc/tryfinish(mob/user) // Oh god before I prettify this code I just feel like I'm having a stroke at all this word garble.
var/artifactchance = 0
- var/combinedqualitymax = user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/4 + itemqualitymax //This is no longer as good. /2 divisor to /4 to make the max ~12
+ var/combinedqualitymax = user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/4 + itemqualitymax //This is no longer as good. /2 divisor to /4 to make the max ~12
if(!artifactrolled) // if there has not been a roll chance, do it now..?
- artifactchance = (1+(user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/2))/1500 //Bumps this up as removal of high-tier smithing items and a decrease to their balance makes artifacts neccessary and worthwhile
+ artifactchance = (1+(user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing)/4))/2000 //Reduced. Artifacts are silly, fun on occasion but not meant be a balance crutch. Adjust base values until sweet spot instead ffs.
//artifactrolled = TRUE --Disabled because this is a shitty mechanic.
var/artifact = max(prob(artifactchance), debug) // If there is an artifact..?
@@ -318,7 +325,7 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
if(user.mind.skill_holder) // Divide the failing chance based on the skillmodifier
var/skillmod = user.mind.get_skill_level(/datum/skill/level/dwarfy/blacksmithing) / 10 + 1
finalfailchance = max(0, finalfailchance / skillmod) //lv 2 gives 20% less to fail, 3 30%, etc
-
+
///////
// The two main conditionals
@@ -326,9 +333,9 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
// I hate this. If you hit more than 10 times, or the final piece failed and you have no artifact. Why it gotta look so awkward.
if((currentsteps > 10 || (rng && prob(finalfailchance))) && !artifact)
-
+
to_chat(user, span_warning("You overwork the metal, causing it to turn into useless slag!"))
-
+
new /obj/item/stack/ore/slag(get_turf(src)) // Spawn some slag
ResetAnvil() // Resets it to be default.
@@ -336,11 +343,11 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
if(user.mind.skill_holder) // give them some experience
user.mind.auto_gain_experience(/datum/skill/level/dwarfy/blacksmithing, 50, 500000, silent = FALSE) //This shouldn't give you a full level until 3+
- return SetBusy(FALSE, user)
-
+ return SetBusy(FALSE, user)
+
// IF YOU DIDN'T FUCK UP THE RECIPE
for(var/i in GLOB.anvil_recipes) // for each recipes.
- if(i == stepsdone) // if... "cum" == "bbu" idfk what the fuck am I looking at why isnt this a GLOB recipe list...
+ if(i == stepsdone)
var/obj/item/smithing/finisheditem = GLOB.anvil_recipes[stepsdone]
finisheditem = new finisheditem(get_turf(src)) // Lets just spawn the item in immediately!
@@ -358,24 +365,12 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
else
finisheditem.quality = min(currentquality, itemqualitymax)
- // more switcheronies~ Adds a description
- switch(finisheditem.quality)
- if(-1000 to -8)
- finisheditem.desc += "\nIt looks to be the most awfully made object you've ever seen."
- if(-8)
- finisheditem.desc += "\nIt looks to be the second most awfully made object you've ever seen."
- if(-8 to 0)
- finisheditem.desc += "\nIt looks to be barely passable as... whatever it's trying to pass for."
- if(0 to 10)
- finisheditem.desc += "\nIt looks to be totally average."
- if(10 to INFINITY)
- finisheditem.desc += "\nIt looks to be better than average."
finisheditem.set_custom_materials(workpiece_material)
var/stepexperience = currentsteps + finisheditem.quality
- var/finalexperience = (150 *(stepexperience + finisheditem.quality))/6 //Makes powerlevelling late-game harder as it gives more bonuses here
+ var/finalexperience = (150 *(stepexperience + finisheditem.quality))/8 //Makes powerlevelling late-game harder as it gives more bonuses here
if(user.mind.skill_holder) // give them some experience!
if(currentquality <= 1)
- user.mind.auto_gain_experience(/datum/skill/level/dwarfy/blacksmithing, 250, 500000, silent = FALSE) //Fixes speedleveling by just making hammers, somewhat.
+ user.mind.auto_gain_experience(/datum/skill/level/dwarfy/blacksmithing, 400, 500000, silent = FALSE) //Incentivises not spamming Slag
else
user.mind.auto_gain_experience(/datum/skill/level/dwarfy/blacksmithing, finalexperience, 500000, silent = FALSE) //Made more forgiving for lower levels and terrible anvils.
@@ -390,112 +385,56 @@ GLOBAL_LIST_INIT(anvil_recipes, list(
break
+
//////////////////////
// //
// ANVILS //
// //
//////////////////////
-// Template
-/obj/structure/anvil/obtainable
- name = "anvil template. Punish those who makes this appear."
- anvilquality = 0
- outrightfailchance = 5
- rng = TRUE
-
-// Best anvil, should be hard to find or make more
-/obj/structure/anvil/obtainable/basic
+// A proper steel anvil
+/obj/structure/blacksmith/anvil/obtainable
name = "anvil"
desc = "Made from solid steel, you wont be moving this around any time soon."
+ icon_state = "anvil"
anvilquality = -1 //This was causing balance problems to where you could get high levels of blacksmithing in 1-2 items
- itemqualitymax = 6 //Do not change this.
-// Don't make this craftable.
-/obj/structure/anvil/obtainable/legion
+// Best anvil
+/obj/structure/blacksmith/anvil/obtainable/legion
name = "anvil"
desc = "A solid steel anvil with a stamped bull on it."
icon_state = "legvil"
anvilquality = 0 //DO NOT GIVE A +1 BONUS TO ANVILS WHEN THEY HAVE A MAXQAL OF 8, THIS ONLY ASKS FOR MAX TIER FORGED ITEMS
- itemqualitymax = 8 //The legion and tribe rely mostly on melee weapons, so they should have the best anvil
- anchored = TRUE
-// Decent makeshift anvil, can break, mobile. Gets the exclusive scrap version of the machete and 2h chopper, as well as the universal tool instead of a crowbar
-/obj/structure/anvil/obtainable/table
+// Decent makeshift anvil, mobile.
+/obj/structure/blacksmith/anvil/obtainable/table
name = "table anvil"
desc = "A reinforced table. Usable as an anvil, favored by mad wastelanders and the dregs of the wasteland. Can be loosened from its bolts and moved."
icon_state = "tablevil"
- anvilquality = -2 //WE SHOULD NOT HAVE CHANGED THIS.
- itemqualitymax = 4
+ anvilquality = -2
-/obj/structure/anvil/obtainable/table/wrench_act(mob/living/user, obj/item/I)
+/obj/structure/blacksmith/anvil/obtainable/table/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 5)
return TRUE
-/obj/structure/anvil/obtainable/table/do_shaping(mob/user, qualitychange)
- if(prob(2))
- to_chat(user, "The [src] breaks under the strain!")
- take_damage(max_integrity, attacked_by = user)
- return FALSE
- else
- ..()
-
-// Worst craftable anvil, sturdy but limits the quality
-/obj/structure/anvil/obtainable/sandstone
+// Sandstone anvil
+/obj/structure/blacksmith/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_state = "sandvil"
- anvilquality = 0
- itemqualitymax = 4
+ anvilquality = -2
// Debug anvil for some reason
-/obj/structure/anvil/debugsuper
+/obj/structure/blacksmith/anvil/debugsuper
name = "super ultra epic anvil of debugging."
desc = "WOW. A DEBUG ITEM STRUCTURE. EPIC."
icon_state = "anvil"
anvilquality = 10
itemqualitymax = 9001
outrightfailchance = 0
-
-// Remnant trash
-/obj/structure/anvil/obtainable/bronze
- name = "slab of bronze"
- desc = "A big block of bronze. Useable as an anvil."
- icon = 'icons/obj/smith.dmi'
- custom_materials = list(/datum/material/bronze=8000)
- icon_state = "ratvaranvil"
- anvilquality = 0
- itemqualitymax = 5 //Its too easy to obtain it
-
-/obj/structure/anvil/obtainable/ratvar
- name = "brass anvil"
- desc = "A big block of what appears to be brass. Useable as an anvil, if whatever's holding the brass together lets you."
- icon = 'icons/obj/smith.dmi'
- custom_materials = list(/datum/material/bronze=8000)
- icon_state = "ratvaranvil"
- currentquality = 1
- itemqualitymax = 8
-/obj/structure/anvil/obtainable/ratvar/attackby(obj/item/I, mob/user)
- if(is_servant_of_ratvar(user))
- return ..()
- else
- to_chat(user, span_neovgre("KNPXWN, QNJCQNW!")) //rot13 then rot22 if anyone wants to decode
-
-/obj/structure/anvil/obtainable/narsie
- name = "runic anvil"
- desc = "An anvil made of a strange, runic metal."
- custom_materials = list(/datum/material/runedmetal=8000)
- icon = 'icons/obj/smith.dmi'
- icon_state = "evil"
- currentquality = 1
- itemqualitymax = 8
-
-/obj/structure/anvil/obtainable/narsie/attackby(obj/item/I, mob/user)
- if(iscultist(user))
- return ..()
- else
- to_chat(user, span_narsiesmall("That is not yours to use!"))
+ rng = FALSE
#undef WORKPIECE_PRESENT
#undef WORKPIECE_INPROGRESS
diff --git a/modular_BD2/blacksmith/code/finished_items.dm b/modular_BD2/blacksmith/code/finished_items.dm
new file mode 100644
index 00000000000..a6312234a50
--- /dev/null
+++ b/modular_BD2/blacksmith/code/finished_items.dm
@@ -0,0 +1,844 @@
+//////////////////////////////////////////
+// //
+// SMITHED ITEMS BASE CODE //
+// //
+//////////////////////////////////////////
+// Values in brackets [37/39 (40) AP 0.2 Parry] are one handed/wielded (thrown) armour piercing, and abilities, for quality 12 Iron weapons.
+
+
+/obj/item/melee/smith
+ name = "base class obj/item/melee/smith"
+ desc = "cringe"
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ force = FORCE_SMITH_LOW
+ throwforce = THROWING_DECENT
+ wound_bonus = WOUNDING_BONUS_MODEST
+ wielded_mult = 1
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
+ slot_flags = ITEM_SLOT_BELT
+ w_class = WEIGHT_CLASS_NORMAL
+ obj_flags = UNIQUE_RENAME
+ flags_1 = CONDUCT_1
+ var/quality
+ var/overlay_state = "woodenrod"
+ var/mutable_appearance/overlay
+ var/wield_force = 15
+
+/obj/item/melee/smith/Initialize()
+ . = ..()
+ if(desc == "cringe")
+ desc = "A handmade [name]."
+ overlay = mutable_appearance(icon, overlay_state)
+ overlay.appearance_flags = RESET_COLOR
+ add_overlay(overlay)
+ if(force < 0)
+ force = 0
+
+
+/obj/item/twohanded/smithed // compatible with the Eris wield stuff
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ attack_speed = MELEE_SPEED_SLOW
+ force = FORCE_SMITH_LOW
+ throwforce = THROWING_POOR
+ sharpness = SHARP_EDGED
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+ w_class = WEIGHT_CLASS_BULKY
+ wielded = FALSE
+ total_mass = (TOTAL_MASS_MEDIEVAL_WEAPON * 1.5)
+ max_integrity = 200
+ flags_1 = CONDUCT_1
+ var/wield_force
+ wielded_mult = 1.5
+ var/mutable_appearance/overlay
+ var/overlay_state = "woodenrod"
+ var/x_offset = null
+ var/y_offset = null
+
+/obj/item/twohanded/smithed/Initialize()
+ . = ..()
+ overlay = mutable_appearance(icon, overlay_state)
+ overlay.appearance_flags = RESET_COLOR
+ add_overlay(overlay)
+ if(force < 0)
+ force = 0
+
+
+
+//////////////////////
+// //
+// SMITHED TOOLS //
+// //
+//////////////////////
+
+// -------- BLACKSMITHING HAMMER -------- //
+/obj/item/melee/smith/hammer
+ name = "smithing hammer"
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "hammer"
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ item_state = "hammer"
+ overlay_state = "hammerhandle"
+ attack_speed = MELEE_SPEED_SLOWEST
+ force = WEAPON_FORCE_CLUB
+ slot_flags = ITEM_SLOT_BELT
+ wound_bonus = WOUNDING_BONUS_SMALL
+ var/qualitymod = 0
+
+/obj/item/melee/smith/hammer/premade
+ quality = 3
+ qualitymod = 1
+ custom_materials = list(/datum/material/iron = 1000)
+
+// Debugging Hammer
+/obj/item/melee/smith/hammer/debug
+ name = "debugging hammer"
+ desc = "A DEBUGGING HAMMER!! EPIC!!."
+ qualitymod = 10
+
+
+// -------- PROSPECTORS PICK -------- // Knock on rock to scan for minerals. Lowest quality too shitty to test.
+/obj/item/mining_scanner/prospector
+ name = "prospectors pick"
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+ obj_flags = UNIQUE_RENAME
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "prospect_smith"
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ item_state = "prospect_smith"
+ sharpness = SHARP_POINTY
+ slot_flags = ITEM_SLOT_BELT
+
+/obj/item/mining_scanner/prospector/Initialize()
+ ..()
+ var/mutable_appearance/overlay
+ desc = "A sounding pick, by tapping the rockface and listening to the reverberation, a skilled user can determine where to dig to find deposits of minerals."
+ overlay = mutable_appearance(icon, "handle_prospect")
+ overlay.appearance_flags = RESET_COLOR
+ add_overlay(overlay)
+
+/obj/item/mining_scanner/prospector/afterattack(atom/A, mob/living/user, proximity)
+ . = ..()
+ if(!proximity || IS_STAMCRIT(user))
+ return
+ if(istype(A, /turf/closed/mineral))
+ mineral_scan_pulse(get_turf(user), range)
+ playsound(src, 'modular_BD2/blacksmith/sound/pickaxe_2.ogg', 70, 1)
+
+/obj/item/mining_scanner/prospector/attack_self(mob/user)
+ return
+
+
+// -------- SMITHED PICKAXE -------- //
+/obj/item/pickaxe/smithed
+ name = "pickaxe"
+ desc = "A handmade pickaxe."
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+ obj_flags = UNIQUE_RENAME
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "pickaxe"
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ item_state = "pickaxe"
+ slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK
+ sharpness = SHARP_POINTY
+
+/obj/item/pickaxe/smithed/Initialize()
+ ..()
+ desc = "A handmade [name]."
+ var/mutable_appearance/overlay
+ overlay = mutable_appearance(icon, "handle_pickaxe")
+ overlay.appearance_flags = RESET_COLOR
+ add_overlay(overlay)
+ if(force < 0)
+ force = 0
+
+/obj/item/pickaxe/smithed/attack_self(mob/user)
+ to_chat(user, "Tool does not have a configureable dig range.")
+
+
+// -------- SMITHED SHOVEL -------- //
+/obj/item/shovel/smithed
+ name = "shovel"
+ desc = "A shovel."
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "shovel"
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ item_state = "shovel"
+ obj_flags = UNIQUE_RENAME
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+ sharpness = SHARP_EDGED //it cuts through the earth
+
+/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)
+ if(force < 0)
+ force = 0
+
+
+// -------- SMITHED CROWBAR -------- // Tops out at 0.2 Toolspeed, which while very fast, is for a crowbar, so meh. TO DO Force qualmod
+/obj/item/crowbar/smithed
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "crowbar_smith"
+ item_state = "crowbar"
+ obj_flags = UNIQUE_RENAME
+ toolspeed = 0.8
+ force = 15
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+
+/obj/item/crowbar/smithed/Initialize()
+ ..()
+ desc = "A handmade [name]."
+ var/mutable_appearance/overlay
+ overlay = mutable_appearance(icon, "handle_crowbar")
+ overlay.appearance_flags = RESET_COLOR
+ add_overlay(overlay)
+
+
+// -------- UNIVERSAL TOOL -------- // Crowbar with more force, wood chopping and butchering
+/obj/item/crowbar/smithedunitool
+ name = "universal tool"
+ desc = "A bizarre combination of a crowbar and some sort of blade."
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "unitool_smith"
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ item_state = "unitool_smith"
+ obj_flags = UNIQUE_RENAME
+ sharpness = SHARP_POINTY
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+ force = WEAPON_FORCE_CLUB
+
+/obj/item/crowbar/smithedunitool/Initialize()
+ ..()
+ var/mutable_appearance/overlay
+ overlay = mutable_appearance(icon, "handle_unitool")
+ overlay.appearance_flags = RESET_COLOR
+ add_overlay(overlay)
+
+/obj/item/crowbar/smithedunitool/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/butchering, 150, 80) //terrible. just terrible.
+
+// -------- KITCHEN KNIFE -------- //
+/obj/item/kitchen/knife/smithed
+ name = "kitchen knife"
+ desc = "A handmade kitchen knife, best suited to cut stuff that doesn't cut back."
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "knife_smith"
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ item_state = "knife_smith"
+ obj_flags = UNIQUE_RENAME
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+ force = WEAPON_FORCE_KNIFE-2
+
+/obj/item/kitchen/knife/smithed/Initialize()
+ . = ..()
+ AddComponent(/datum/component/butchering, 70, 100, 40)
+ var/mutable_appearance/overlay
+ overlay = mutable_appearance(icon, "hilt_knife")
+ overlay.appearance_flags = RESET_COLOR
+ add_overlay(overlay)
+
+
+
+//////////////////////////
+// //
+// OTHER ITEMS //
+// //
+//////////////////////////
+
+// ------------ BALL AND CHAIN ------------ //
+
+/obj/item/restraints/legcuffs/ballandchain
+ name = "ball and chain"
+ desc = "Use this to keep prisoners in line."
+ gender = PLURAL
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "ballandchain"
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ item_state = "ballandchain"
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ throwforce = 10
+ w_class = WEIGHT_CLASS_BULKY
+ slowdown = 4
+ breakouttime = 1200 //Deciseconds = 30s = 0.5 minute
+ strip_delay = 100
+ var/cuffsound = 'modular_BD2/blacksmith/sound/chain.ogg'
+ var/trashtype = null //for disposable cuffs
+
+/obj/item/restraints/legcuffs/ballandchain/attack(mob/living/carbon/C, mob/living/user)
+ if(!istype(C))
+ return
+
+ if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)))
+ to_chat(user, span_warning("Somehow I can't lock this..."))
+ return
+
+ if(!C.legcuffed)
+ if(C.get_num_legs(FALSE) >= 1 || C.get_leg_ignore())
+ C.visible_message(span_danger("[user] is trying to put [src.name] on [C]!"), \
+ span_userdanger("[user] is trying to put [src.name] on [C]!"))
+
+ playsound(loc, cuffsound, 50, 1, -2)
+ if(do_mob(user, C, 30) && (C.get_num_legs(FALSE) >= 1 || C.get_leg_ignore()))
+ if(iscyborg(user))
+ apply_legcuffs(C, user, TRUE)
+ else
+ apply_legcuffs(C, user)
+ to_chat(user, span_notice("You clamp irons on [C]."))
+ SSblackbox.record_feedback("tally", "handcuffs", 1, type)
+
+ log_combat(user, C, "clamped in irons")
+ else
+ to_chat(user, span_warning("You fail to clamp irons on [C]!"))
+ else
+ to_chat(user, span_warning("[C] doesn't have a leg..."))
+
+/obj/item/restraints/legcuffs/ballandchain/proc/apply_legcuffs(mob/living/carbon/target, mob/user, dispense = 0)
+ if(target.legcuffed)
+ return
+
+ if(!user.temporarilyRemoveItemFromInventory(src) && !dispense)
+ return
+
+ var/obj/item/restraints/legcuffs/ballandchain/cuffs = src
+ if(trashtype)
+ cuffs = new trashtype()
+ else if(dispense)
+ cuffs = new type()
+
+ target.equip_to_slot(cuffs, SLOT_LEGCUFFED)
+
+ if(trashtype && !dispense)
+ qdel(src)
+ return
+
+
+
+//////////////////////////////////
+// //
+// KNIVES //
+// //
+//////////////////////////////////
+
+// ------------ DAGGER ------------ // [Eyestab]
+/obj/item/melee/smith/dagger
+ name = "dagger"
+ icon_state = "dagger_smith"
+ overlay_state = "hilt_dagger"
+ attack_speed = MELEE_SPEED_FAST
+ force = FORCE_SMITH_LOW
+ armour_penetration = PIERCING_MINOR
+ throwforce = THROWING_EFFECTIVE
+ w_class = WEIGHT_CLASS_SMALL
+ sharpness = SHARP_EDGED
+ hitsound = 'modular_BD2/blacksmith/sound/hit_knife.ogg'
+
+
+// go for the eyes Boo
+/obj/item/melee/smith/dagger/attack(mob/living/carbon/M, mob/living/carbon/user)
+ if(!istype(M))
+ return ..()
+ if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
+ M.apply_damage(7, BRUTE, BODY_ZONE_HEAD)
+ playsound(M, 'modular_BD2/blacksmith/sound/meatslap.ogg', 80, 1)
+ return eyestab(M,user)
+ else
+ return ..()
+
+/obj/item/melee/smith/dagger/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/butchering, 100, 100, 10)
+
+// ------------ BOWIE KNIFE ------------ // [Eyestab]
+/obj/item/melee/smith/dagger/bowie
+ name = "bowie knife"
+ icon_state = "bowie_smith"
+ overlay_state = "hilt_bowie"
+ force = (FORCE_SMITH_LOW+2)
+
+
+
+//////////////////////////////////
+// //
+// ONE HANDED SWORDS //
+// //
+//////////////////////////////////
+
+// ------------ MACHETE ------------ // [AP 0.1]
+/obj/item/melee/smith/machete
+ name = "machete"
+ icon_state = "machete_smith"
+ overlay_state = "hilt_machete"
+ force = FORCE_SMITH_HIGH
+ armour_penetration = PIERCING_MINOR
+ wound_bonus = WOUNDING_BONUS_BIG
+ block_chance = 20
+ sharpness = SHARP_EDGED
+
+/obj/item/melee/smith/machete/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/butchering, 100, 85, 10) //decent in a pinch.
+ AddElement(/datum/element/sword_point)
+
+// ------------ GLADIUS ------------ // [AP 0.1]
+/obj/item/melee/smith/machete/gladius
+ name = "gladius"
+ icon_state = "gladius_smith"
+ overlay_state = "hilt_gladius"
+
+// ------------ REFORGED MACHETE ------------ // [AP 0.1]
+/obj/item/melee/smith/machete/reforged
+ name = "reforged machete"
+ icon_state = "macheter_smith"
+ overlay_state = "hilt_macheter"
+
+
+
+//////////////////////////////////
+// //
+// MIXED ONEHANDERS //
+// //
+//////////////////////////////////
+
+// ------------ WAKIZASHI ------------ // [Parry]
+/obj/item/melee/smith/wakizashi
+ name = "wakizashi"
+ icon_state = "waki_smith"
+ overlay_state = "hilt_waki"
+ force = (FORCE_SMITH_HIGH-2)
+ block_chance = 5
+ block_parry_data = /datum/block_parry_data/waki
+ sharpness = SHARP_EDGED
+ item_flags = ITEM_CAN_PARRY
+ hitsound = 'modular_BD2/blacksmith/sound/hit_sword.ogg'
+
+/datum/block_parry_data/waki
+ parry_stamina_cost = 50
+ parry_time_windup = 0
+ parry_time_active = 15
+ parry_time_spindown = 0
+ parry_time_perfect = 2
+ parry_time_perfect_leeway = 0.75
+ parry_imperfect_falloff_percent = 7.5
+ parry_efficiency_to_counterattack = 100
+ parry_efficiency_considered_successful = 80
+ parry_efficiency_perfect = 120
+ parry_failed_stagger_duration = 2 SECONDS
+ parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 1)
+
+/obj/item/melee/smith/wakizashi/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/butchering, 110, 70) //decent in a pinch, but pretty bad.
+
+
+// ------------ SCRAP SAW ------------ // [Parry, stack damage experimental]
+/obj/item/melee/smith/wakizashi/scrapsaw
+ name = "scrap saw"
+ icon_state = "saw_smith"
+ overlay_state = "handle_saw"
+ force = (FORCE_SMITH_HIGH-3)
+ wound_bonus = WOUNDING_BONUS_TINY
+ bare_wound_bonus = WOUNDING_BONUS_BIG
+ tool_behaviour = TOOL_SAW
+ toolspeed = 1
+ hitsound = 'sound/effects/butcher.ogg'
+ var/bleed_stacks_per_hit = 3
+
+/obj/item/melee/smith/wakizashi/scrapsaw/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+ if(!isliving(target) || !proximity_flag)
+ return
+ var/mob/living/M = target
+ if(!(M.mob_biotypes & MOB_ORGANIC))
+ return
+ if(user.a_intent != INTENT_HARM)
+ var/datum/status_effect/stacking/saw_bleed/bloodletting/B = M.has_status_effect(/datum/status_effect/stacking/saw_bleed/bloodletting)
+ if(!B)
+ M.apply_status_effect(/datum/status_effect/stacking/saw_bleed/bloodletting, bleed_stacks_per_hit)
+ else
+ B.add_stacks(bleed_stacks_per_hit)
+
+
+// ------------ MACE ------------ //
+/obj/item/melee/smith/mace
+ name = "mace"
+ icon_state = "mace_smith"
+ overlay_state = "shaft_mace"
+ attack_speed = MELEE_SPEED_SLOW
+ force = (FORCE_SMITH_LOW+1)
+ armour_penetration = PIERCING_MAJOR
+ throwforce = THROWING_POOR
+ wound_bonus = WOUNDING_BONUS_HUGE
+ total_mass = (TOTAL_MASS_MEDIEVAL_WEAPON*1.2)
+ hitsound = 'modular_BD2/blacksmith/sound/hit_mace.ogg'
+
+/obj/item/melee/smith/mace/afterattack(mob/living/M, mob/living/user)
+ . = ..()
+ if(!istype(M))
+ return
+ M.apply_damage(15, STAMINA, "chest", M.run_armor_check("chest", "melee"))
+
+
+
+//////////////////////////////////
+// //
+// ONE HANDED SWORDS //
+// //
+//////////////////////////////////
+
+// ------------ SWORD ------------ // [AP 0.1 Parry]
+/obj/item/melee/smith/sword
+ name = "sword"
+ icon_state = "sword_smith"
+ item_state = "sword_smith"
+ overlay_state = "hilt_sword"
+ force = FORCE_SMITH_HIGH
+ armour_penetration = PIERCING_MINOR
+ wound_bonus = WOUNDING_BONUS_BIG
+ item_flags = ITEM_CAN_PARRY
+ block_chance = 10
+ block_parry_data = /datum/block_parry_data/sword
+ w_class = WEIGHT_CLASS_BULKY
+ sharpness = SHARP_EDGED
+
+/datum/block_parry_data/sword
+ parry_stamina_cost = 50
+ parry_time_windup = 0.5
+ parry_time_active = 4
+ parry_time_spindown = 1
+ parry_time_perfect = 0.75
+ parry_time_perfect_leeway = 0.75
+ parry_imperfect_falloff_percent = 30
+ parry_efficiency_perfect = 100
+ parry_failed_stagger_duration = 3 SECONDS
+ parry_failed_clickcd_duration = 2 SECONDS
+
+/obj/item/melee/smith/sword/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/butchering, 120, 70) //decent in a pinch, but pretty bad.
+ AddElement(/datum/element/sword_point)
+
+
+// ------------ SPATHA ------------ // [AP 0.1 Parry]
+/obj/item/melee/smith/sword/spatha
+ name = "spatha"
+ icon_state = "spatha_smith"
+ item_state = "spatha_smith"
+ overlay_state = "hilt_spatha"
+ block_chance = 14
+
+
+// ------------ SABRE ------------ // [AP 0.1 Parry]
+/obj/item/melee/smith/sword/sabre
+ name = "sabre"
+ icon_state = "sabre_smith"
+ item_state = "sabre_smith"
+ overlay_state = "hilt_sabre"
+ force = (FORCE_SMITH_HIGH-1)
+ block_chance = 18
+ block_parry_data = /datum/block_parry_data/smithsaber
+
+/datum/block_parry_data/smithsaber
+ parry_stamina_cost = 50
+ parry_time_active = 8
+ parry_time_perfect = 2
+ parry_time_perfect_leeway = 2
+ parry_failed_stagger_duration = 3 SECONDS
+ parry_failed_clickcd_duration = 3 SECONDS
+ parry_time_windup = 0
+ parry_time_spindown = 0
+ parry_imperfect_falloff_percent = 0
+ parry_efficiency_to_counterattack = 100
+ parry_efficiency_considered_successful = 100
+ parry_efficiency_perfect = 120
+ parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 1)
+
+
+
+//////////////////////////////////
+// //
+// LONG SWORDS //
+// //
+//////////////////////////////////
+
+// ------------ KATANA ------------ // [AP 0.2 Parry]
+/obj/item/twohanded/smithed/katana
+ name = "katana"
+ icon_state = "katana_smith"
+ icon_prefix = "katana_smith"
+ wielded_icon = "katana_smith"
+ overlay_state = "hilt_katana"
+ force = (FORCE_SMITH_HIGH-1)
+ armour_penetration = PIERCING_MODERATE
+ throwforce = THROWING_POOR
+ wound_bonus = WOUNDING_BONUS_BIG
+ wielded_mult = 1.25
+ item_flags = ITEM_CAN_PARRY
+ block_chance = 15
+ block_parry_data = /datum/block_parry_data/smithkatana
+ slot_flags = ITEM_SLOT_BELT
+ hitsound = 'modular_BD2/blacksmith/sound/hit_sword.ogg'
+
+/datum/block_parry_data/smithkatana
+ parry_stamina_cost = 50
+ parry_time_active = 6
+ parry_time_perfect = 3
+ parry_time_perfect_leeway = 3
+ parry_failed_stagger_duration = 3 SECONDS
+ parry_failed_clickcd_duration = 3 SECONDS
+ parry_time_windup = 0
+ parry_time_spindown = 0
+ parry_imperfect_falloff_percent = 0
+ parry_efficiency_to_counterattack = 100
+ parry_efficiency_considered_successful = 120
+ parry_efficiency_perfect = 120
+ parry_data = list(PARRY_COUNTERATTACK_MELEE_ATTACK_CHAIN = 1)
+
+/obj/item/twohanded/smithed/katana/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/butchering, 130, 60) //pretty bad.
+ AddElement(/datum/element/sword_point)
+
+
+// ------------ LONGSWORD ------------ // [AP 0.2 Parry]
+/obj/item/twohanded/smithed/katana/longsword
+ name = "longsword"
+ icon_state = "longsword_smith"
+ icon_prefix = "longsword_smith"
+ wielded_icon = "longsword_smith"
+ overlay_state = "hilt_longsword"
+
+
+// ------------ SCRAP BLADE ------------ // [AP 0.2 Parry]
+/obj/item/twohanded/smithed/katana/scrapblade
+ name = "scrap blade"
+ icon_state = "scrap_smith"
+ icon_prefix = "scrap_smith"
+ wielded_icon = "scrap_smith"
+ overlay_state = "hilt_scrap"
+ attack_speed = MELEE_SPEED_SLOW
+ force = FORCE_SMITH_HIGH
+
+/obj/item/twohanded/smithed/katana/scrapblade/ComponentInitialize()
+ . = ..()
+ AddComponent(/datum/component/butchering, 110, 75) //decent in a pinch, but pretty bad.
+
+
+
+//////////////////////////////////
+// //
+// AXES //
+// //
+//////////////////////////////////
+
+// ------------ HEAVY AXE ------------ // [AP 0.1 Doorbusting]
+/obj/item/twohanded/smithed/axe
+ name = "heavy axe"
+ icon_state = "axe_smith"
+ wielded_icon = "axe_smith"
+ icon_prefix = "axe_smith"
+ overlay_state = "shaft_axe"
+ force = FORCE_SMITH_LOW
+ armour_penetration = PIERCING_MODERATE
+ throwforce = THROWING_POOR
+ wound_bonus = WOUNDING_BONUS_BIG
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON * 2
+ slot_flags = ITEM_SLOT_BACK
+
+/obj/item/twohanded/smithed/axe/afterattack(atom/A, mob/living/user, proximity)
+ . = ..()
+ if(!proximity || !wielded || IS_STAMCRIT(user))
+ return
+ if(istype(A, /obj/machinery/door))
+ var/obj/machinery/door/D = A
+ D.take_damage(20, BRUTE, "melee", 0)
+ else if(istype(A, /obj/structure/simple_door))
+ var/obj/structure/simple_door/M = A
+ M.take_damage(20, BRUTE, "melee", 0)
+
+
+// ------------ LEGION WAR AXE ------------ // [AP 0.1 Doorbusting]
+/obj/item/twohanded/smithed/axe/waraxe
+ name = "war axe"
+ icon_state = "waraxe_smith"
+ icon_prefix = "waraxe_smith"
+ wielded_icon = "waraxe_smith"
+ icon_prefix = "waraxe_smith"
+ overlay_state = "shaft_waraxe"
+ throwforce = THROWING_GOOD
+
+/obj/item/twohanded/smithed/axe/waraxe/afterattack(atom/A, mob/living/user, proximity)
+ . = ..()
+ if(!proximity || !wielded || IS_STAMCRIT(user))
+ return
+ if(istype(A, /obj/machinery/door))
+ var/obj/machinery/door/D = A
+ D.take_damage(20, BRUTE, "melee", 0)
+ else if(istype(A, /obj/structure/simple_door))
+ var/obj/structure/simple_door/M = A
+ M.take_damage(20, BRUTE, "melee", 0)
+
+
+// ------------ GHOUL CRUSHER ------------ // [Ghoul bonus] - for those dry twig like limbs, snap snap..(was meant to dislocate PC ghouls but code did not work properly so removed)
+/obj/item/twohanded/smithed/crusher
+ name = "crusher"
+ desc = "Affectionally known as the ghoul crusher, this club is easiest to swing two handed."
+ icon_state = "crusher_smith"
+ icon_prefix = "crusher_smith"
+ wielded_icon = "crusher_smith"
+ icon_prefix = "crusher_smith"
+ overlay_state = "shaft_crusher"
+ attack_speed = MELEE_SPEED_SLOWER
+ force = FORCE_SMITH_LOW
+ armour_penetration = PIERCING_MAJOR
+ throwforce = THROWING_PATHETIC
+ wound_bonus = WOUNDING_BONUS_HUGE
+ sharpness = SHARP_NONE
+ slot_flags = ITEM_SLOT_BACK
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON * 2
+ hitsound = 'modular_BD2/blacksmith/sound/hit_mace.ogg'
+
+/obj/item/twohanded/smithed/crusher/afterattack(atom/A, mob/living/user, proximity)
+ . = ..()
+ if(!proximity || !wielded || IS_STAMCRIT(user))
+ return
+ if(istype(A, /mob/living/simple_animal/hostile/ghoul))
+ var/mob/living/simple_animal/hostile/ghoul/D = A
+ D.apply_damage(25, BRUTE)
+
+
+
+//////////////////////////////////////
+// //
+// POLEARMS //
+// //
+//////////////////////////////////////
+
+// ------------ SPEAR ------------ // [Reach]
+/obj/item/twohanded/smithed/spear
+ name = "spear"
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/64x64_lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/64x64_righthand.dmi'
+ icon_state = "spear_smith"
+ wielded_icon = "spear_smith"
+ icon_prefix = "spear_smith"
+ overlay_state = "shaft_spear"
+ force = FORCE_SMITH_REACH
+ throwforce = THROWING_GOOD
+ wielded_mult = 1.3
+ max_reach = 2
+ sharpness = SHARP_POINTY
+ inhand_x_dimension = 64
+ inhand_y_dimension = 64
+
+
+// ------------ TRIDENT ------------ // [Reach Embed]
+/obj/item/twohanded/smithed/spear/trident
+ name = "trident"
+ desc = "Made for spearing small lizard and fish, able to pin down the prey if thrown."
+ icon_state = "trident_smith"
+ wielded_icon = "trident_smith"
+ icon_prefix = "trident_smith"
+ overlay_state = "shaft_trident"
+ attack_speed = MELEE_SPEED_SLOW
+ force = (FORCE_SMITH_REACH+1)
+ embedding = list("pain_mult" = 2, "embed_chance" = 40, "fall_chance" = 30, "ignore_throwspeed_threshold" = TRUE)
+ armour_penetration = 0
+
+
+// ------------ LEGION LANCE ------------ // [Reach]
+/obj/item/twohanded/smithed/spear/lance
+ name = "legion lance"
+ icon_state = "lance_smith"
+ wielded_icon = "lance_smith_wield"
+ icon_prefix = "lance_smith"
+ overlay_state = "shaft_lance"
+
+
+
+//////////////////////////////////////////////////
+// //
+// THROWING WEAPONS //
+// //
+//////////////////////////////////////////////////
+
+// ------------ JAVELIN ------------ // [Embed]
+/obj/item/melee/smith/javelin
+ name = "javelin"
+ icon_state = "javelin_smith"
+ overlay_state = "shaft_javelin"
+ item_state = "javelin_smith"
+ force = FORCE_SMITH_REACH
+ armour_penetration = PIERCING_MODERATE
+ sharpness = SHARP_POINTY
+ embedding = list("pain_mult" = 2, "embed_chance" = 62, "fall_chance" = 20, "ignore_throwspeed_threshold" = TRUE)
+
+// ------------ THROWING KNIFE ------------ // [Embed]
+/obj/item/melee/smith/throwingknife
+ name = "throwing knife"
+ icon_state = "throwing_smith"
+ overlay_state = "handle_throwing"
+ item_state = "dagger_smith"
+ force = FORCE_SMITH_REACH
+ armour_penetration = PIERCING_MINOR
+ embedding = list("pain_mult" = 2, "embed_chance" = 65, "fall_chance" = 20, "ignore_throwspeed_threshold" = TRUE)
+ w_class = WEIGHT_CLASS_SMALL
+
+// ------------ METAL BOLA ------------ //
+/obj/item/restraints/legcuffs/bola/smithed
+ name = "bola"
+ desc = "All-metal bola for strong prey."
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "bola_smith"
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ item_state = "bola_smith"
+ breakouttime = 40//5 more deciseconds than regular bola
+ material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+
+/obj/item/restraints/legcuffs/bola/smithed/Initialize()
+ ..()
+ desc = "All-metal bola for strong prey."
+ var/mutable_appearance/overlay
+ overlay = mutable_appearance(icon, "chain_bola")
+ overlay.appearance_flags = RESET_COLOR
+ add_overlay(overlay)
+
+
+
+//////////////////////////////////////////////
+// //
+// SMITHED ARMOR //
+// //
+//////////////////////////////////////////////
+
+/obj/item/clothing/suit/armor/heavy/metal/smithed
+ name = "smithed metal armor"
+ desc = "A set of plates with leather straps, protecting some vital areas."
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ icon_state = "smithed_armor_metal"
+ item_state = "smithed_armor_metal"
diff --git a/modular_BD2/blacksmith/code/furnace.dm b/modular_BD2/blacksmith/code/furnace.dm
new file mode 100644
index 00000000000..5822a6444cb
--- /dev/null
+++ b/modular_BD2/blacksmith/code/furnace.dm
@@ -0,0 +1,109 @@
+// ----------------------- FURNACE -------------------------------
+
+/obj/structure/blacksmith/furnace
+ name = "furnace"
+ desc = "A furnace with fume protection and good ventilation for stoking the fire. Used for heating metal ingots or smelting ores into sheets."
+ icon = 'modular_BD2/blacksmith/icons/furnace32x64.dmi'
+ icon_state = "furnace"
+ density = TRUE
+ anchored = TRUE
+ max_integrity = 700
+ light_system = MOVABLE_LIGHT
+ light_range = 2
+ light_power = GLOW_BRIGHT
+ light_color = LIGHT_COLOR_FIRE
+ light_on = FALSE
+ plane = GAME_PLANE // so the smoke isnt hidden by objects
+ var/debug = FALSE //debugging only
+ var/working = TRUE
+ var/fueluse = 1
+ var/datum/looping_sound/furnace/soundloop
+
+/obj/structure/blacksmith/furnace/Initialize()
+ . = ..()
+ create_reagents(250, TRANSPARENT)
+ START_PROCESSING(SSobj, src)
+ soundloop = new(list(src))
+
+/obj/structure/blacksmith/furnace/Destroy()
+ STOP_PROCESSING(SSobj, src)
+ return ..()
+
+/obj/structure/blacksmith/furnace/process()
+ if(debug)
+ reagents.add_reagent(/datum/reagent/fuel, 1)
+ return TRUE
+ if(reagents.remove_reagent(/datum/reagent/fuel, fueluse))
+ working = TRUE
+ soundloop.start()
+ set_light_on(TRUE)
+ if(icon_state == "furnace")
+ icon_state = "furnace_stoked"
+
+ else
+ working = FALSE
+ soundloop.stop()
+ set_light_on(FALSE)
+ icon_state = "furnace"
+
+/obj/structure/blacksmith/furnace/attackby(obj/item/I, mob/user)
+ if(istype(I, /obj/item/blacksmith/ingot))
+ var/obj/item/blacksmith/ingot/workpiece = I
+ if(working)
+ if(do_after(user, 2 SECONDS, target = src))
+ to_chat(user, "You heat the [workpiece] in the [src].")
+ workpiece.workability = "shapeable"
+ workpiece.icon_state = "hot_ingot"
+ workpiece.set_light_on(TRUE)
+ I.on_attack_hand(user)
+ else
+ to_chat(user, "The furnace isn't working!.")
+ return
+ if(istype(I, /obj/item/stack/ore))
+ var/obj/item/stack/ore/G = I
+ if(working)
+ playsound(src, 'modular_BD2/blacksmith/sound/steam_short.ogg',80, 1)
+ if(do_after(user, 3 SECONDS, target = src))
+ G.furnace_smelt()
+ else
+ to_chat(user, "The furnace isn't working!.")
+ return
+ if(I.reagents)
+ I.reagents.trans_to(src, 250)
+ return
+ if(istype(I, /obj/item/stack/sheet/coke/))
+ var/obj/item/stack/sheet/coke/C = I
+ src.reagents.add_reagent(/datum/reagent/fuel, 5)
+ C.use(1)
+ to_chat(user, "You add some lumps of coke to the furnace.")
+ return
+ else
+ return ..()
+
+/obj/structure/blacksmith/furnace/plunger_act(obj/item/plunger/P, mob/living/user, reinforced)
+ to_chat(user, "You start furiously plunging [name].")
+ if(do_after(user, 3 SECONDS, target = src))
+ to_chat(user, "You finish plunging the [name].")
+ reagents.reaction(get_turf(src), TOUCH) //splash on the floor
+ reagents.clear_reagents()
+
+/datum/looping_sound/furnace
+ mid_sounds = list('modular_BD2/blacksmith/sound/furnace1.ogg'=1)
+ mid_length = 7 SECONDS
+ volume = 80
+
+/obj/item/stack/ore/proc/furnace_smelt()
+ if(isnull(refined_type))
+ return
+ else
+ new refined_type(drop_location(),amount)
+ qdel(src)
+
+
+// ----------------------- SANDSTONE FURNACE -------------------------------
+
+/obj/structure/blacksmith/furnace/sandstone // can be built from sandstone, less economical but same effect
+ name = "sandstone furnace"
+ desc = "A simply made furnace, not as fuel-efficient as more advanced ones. Used for heating metal ingots."
+ icon = 'modular_BD2/blacksmith/icons/furnace_sandstone32x64.dmi'
+ fueluse = 2
diff --git a/modular_BD2/blacksmith/code/smithed_items.dm b/modular_BD2/blacksmith/code/smithed_items.dm
new file mode 100644
index 00000000000..c51e0a2cb93
--- /dev/null
+++ b/modular_BD2/blacksmith/code/smithed_items.dm
@@ -0,0 +1,818 @@
+//////////////////////////////////////////
+// //
+// SMITHED ITEMS BASE CODE //
+// //
+//////////////////////////////////////////
+
+/obj/item/blacksmith
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ righthand_file = 'modular_BD2/blacksmith/icons/onmob/righthand.dmi'
+ lefthand_file = 'modular_BD2/blacksmith/icons/onmob/lefthand.dmi'
+ force = WEAPON_FORCE_BIG_TOOL
+ max_integrity = 40
+ w_class = WEIGHT_CLASS_SMALL
+
+/obj/item/smithing
+ name = "base class /obj/item/smithing"
+ desc = "Attach a wooden rod."
+ icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ icon_state = "unfinished"
+ material_flags = MATERIAL_COLOR | MATERIAL_ADD_PREFIX
+ light_system = MOVABLE_LIGHT
+ light_range = 1
+ light_power = GLOW_WEAK
+ light_color = LIGHT_COLOR_FIRE
+ light_on = FALSE
+ var/quality = 0 //quality. Changed by the smithing process.
+ var/obj/item/finishingitem = WOODEN_ROD //What this item needs to be hit by to create finalitem
+ var/obj/item/finalitem
+ var/artifact = FALSE
+ var/toohot = TRUE // Too hot to touch with bare hands, not tempered yet
+
+/obj/item/smithing/Initialize()
+ add_overlay(image(icon= 'modular_BD2/blacksmith/icons/blacksmith.dmi',icon_state="[icon_state]_hot"))
+ set_light_on(TRUE)
+ update_icon()
+ return ..()
+
+/obj/item/smithing/proc/istempered()
+ cut_overlay(image(icon= 'modular_BD2/blacksmith/icons/blacksmith.dmi',icon_state="[icon_state]_hot"))
+ set_light_on(FALSE)
+ update_icon()
+ return
+
+/obj/item/smithing/on_attack_hand(mob/user)
+ var/mob/living/carbon/human/H
+ if(toohot != TRUE)
+ 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 = 0
+ if(prot > 0 || HAS_TRAIT(user, TRAIT_RESISTHEAT) || HAS_TRAIT(user, TRAIT_RESISTHEATHANDS))
+ to_chat(user, "You pick up the [src].")
+ return ..()
+ else
+ to_chat(user, "You try to move the [src], but you burn your hand on it!")
+ 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()
+ playsound(src, 'modular_BD2/blacksmith/sound/burned.ogg', 15, 1)
+ var/list/hand_items = list(H.get_active_held_item(),H.get_inactive_held_item())
+ if(src in hand_items)
+ H.dropItemToGround(src)
+
+
+/obj/item/smithing/attackby(obj/item/I, mob/user)
+ if(toohot == TRUE)
+ to_chat(user, "You need to quench the [src] before finishing it!")
+ return
+ if(istype(I, LEATHER_STRIP))
+ to_chat(user, "You start to wrap the leather strip around the [src].")
+ I.use(1)
+ playsound(src, 'modular_BD2/blacksmith/sound/latex.ogg', 70, 1)
+ if(!do_after(user, 30, TRUE, src))
+ return
+ startfinish()
+ else if(istype(I, finishingitem))
+ qdel(I)
+ to_chat(user, "You start to attach the handle and fittings to the [src].")
+ playsound(src, 'modular_BD2/blacksmith/sound/craft_3.ogg', 90, 1)
+ if(!do_after(user, 30, TRUE, src))
+ return
+ startfinish()
+ user.put_in_hands(finalitem)
+ else
+ return ..()
+
+
+/obj/item/smithing/proc/startfinish()
+ dofinish()
+
+/obj/item/smithing/proc/dofinish()
+ var/qualname
+ switch(quality)
+ if(-1000 to -5)
+ qualname = "awful"
+ if(-1000 to -2)
+ qualname = "shoddy"
+ if(-1000 to -1)
+ qualname = "poor"
+ if(-1 to 1)
+ qualname = "normal"
+ if(13 to INFINITY)
+ qualname = "legendary"
+ if(11 to 13)
+ qualname = "masterwork"
+ if(8 to 11)
+ qualname = "excellent"
+ if(5 to 8)
+ qualname = "good"
+ if(0 to 5)
+ qualname = "above-average"
+ var/datum/material/mat = custom_materials[1]
+ finalitem.set_custom_materials(custom_materials)
+ mat = mat.name
+ if(artifact)
+ dwarfyartifact(finalitem, mat)
+ else
+ finalitem.name = "[qualname] [mat] [initial(finalitem.name)]"
+ finalitem.forceMove(get_turf(src))
+ qdel(src)
+
+// Artifcats. Still a Frankenstein uncurated mutated TG remnant with memery but whatever.
+/obj/item/smithing/proc/dwarfyartifact(obj/item/finalitem, mat)
+ var/finaldesc = "A [initial(finalitem.name)] made of [mat], all craftsmanship is of the highest quality. It "
+ switch(pick(1,2,3,4,5))
+ if(1)
+ finaldesc += "is encrusted with [pick("","fake ","multi-faceted ","radioactive ","plastic ") + pick("stickers","emeralds","jade","bottle caps","diamonds")]."
+ if(2)
+ finaldesc += "is laced with studs of [pick("gold","silver","aluminium","titanium")]."
+ if(3)
+ finaldesc += "is etched with pictographs of [pick("nuclear bombs","power-armored men","pinup-girls","the president","a hognose snake")]."
+ if(4)
+ finaldesc += "menaces with spikes of [pick("ceramite","uranium","plastic","blued steel")]."
+ if(5)
+ finaldesc += "is encrusted with [pick("","synthetic ","multi-faceted ","radioactive ","plastic ") + pick("rubies","dice","jade","opals","bottle caps")],laced with studs of [pick("gold","silver","aluminium","titanium")], encircled with bands of [pick("durasteel","metallic hydrogen","ferritic-alloy","plasteel","duranium")] and menaces with spikes of [pick("ytterbium","uranium","white pearl","black steel")]."
+ finalitem.desc = finaldesc
+ finalitem.name = pick("Mutants Choice", "Nuka Smash", "Gallius Rex","Fist of Fury", "The Big Bad", "Good Old Boy", "Serial Crusher", "Caesars Own", "Kiloton Deluxe", "Lämp", "Cosmic Knife Deluxe", "Master Superior", "Even Better", "The Mackintosh", "Oltud", "Deleratîs", "Nökornomal") //one of these is literally BLOOD POOL CREATE.iirc its Nazushagsaldôbar.
+
+
+//////////////////////////////////
+// //
+// INGOTS //
+// //
+//////////////////////////////////
+
+/obj/item/blacksmith/ingot
+ name = "ingot"
+ icon_state = "ingot"
+ material_flags = MATERIAL_COLOR | MATERIAL_ADD_PREFIX
+ light_system = MOVABLE_LIGHT
+ light_range = 1
+ light_power = GLOW_WEAK
+ light_color = LIGHT_COLOR_FIRE
+ light_on = FALSE
+ var/workability = FALSE
+
+
+/obj/item/blacksmith/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 = 0
+ if(prot > 0 || HAS_TRAIT(user, TRAIT_RESISTHEAT) || HAS_TRAIT(user, TRAIT_RESISTHEATHANDS))
+ to_chat(user, "You pick up the [src].")
+ return ..()
+ else
+ to_chat(user, "You try to move the [src], but you burn your hand on it!")
+ playsound(src, 'modular_BD2/blacksmith/sound/burned.ogg', 15, 1)
+ 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()
+ var/list/hand_items = list(H.get_active_held_item(),H.get_inactive_held_item())
+ if(src in hand_items)
+ H.dropItemToGround(src)
+
+/obj/item/blacksmith/ingot/iron
+ custom_materials = list(/datum/material/iron=12000)
+
+/obj/item/blacksmith/ingot/uranium
+ custom_materials = list(/datum/material/uranium=12000)
+
+/obj/item/blacksmith/ingot/gold
+ custom_materials = list(/datum/material/gold=12000)
+
+/obj/item/blacksmith/ingot/silver
+ custom_materials = list(/datum/material/silver=12000)
+
+/obj/item/blacksmith/ingot/titanium
+ custom_materials = list(/datum/material/titanium=12000)
+
+/obj/item/blacksmith/ingot/adamantine
+ custom_materials = list(/datum/material/adamantine=12000)
+ name = "pre-war steel ingot"
+ desc = "Top quality alloyed steel from the old world."
+ material_flags = MATERIAL_COLOR
+
+/obj/item/blacksmith/ingot/bronze
+ custom_materials = list(/datum/material/bronze=12000)
+ name = "bronze ingot"
+ desc = "Softer than iron."
+
+
+//////////////////////////////////
+// //
+// BLACKSMITH FINISHERS //
+// //
+//////////////////////////////////
+
+// -------- WOODEN ROD -------- //
+/obj/item/blacksmith/woodenrod
+ name = "wooden rod"
+ desc = "It's a rod, suitable for use of a handle of a tool. Also could serve as a weapon, in a pinch."
+ icon_state = "woodenrod"
+ resistance_flags = FLAMMABLE
+
+// Make a sword handle by wrapping leather strips on a rod
+/obj/item/blacksmith/woodenrod/attackby/(obj/item/W, mob/user, params)
+ if (istype(W, LEATHER_STRIP))
+ user.visible_message("[user] begins finishing the [src] into a sword handle.", \
+ "You begin wrapping the [src] with leather strips, and shaping the wood into a sword handle.", \
+ "You hear faint sounds of handcrafting.")
+ playsound(src, 'modular_BD2/blacksmith/sound/craft_3.ogg', 50, 1)
+ // 6 Second Timer
+ if(!do_after(user, 40, TRUE, src))
+ return
+ // Make stick
+ var/obj/item/blacksmith/swordhandle/new_item = new(user.loc)
+ user.put_in_hands(new_item)
+ user.visible_message("[user] finishes making a sword handle from the [src].", \
+ "You finish making a sword handle from the [src].")
+ qdel(src)
+ // Use up the strips
+ W.use(1)
+ else
+ . = ..()
+
+// -------- SWORD HANDLE -------- //
+/obj/item/blacksmith/swordhandle
+ name = "sword handle"
+ desc = "It's a wooden handle with leather strips, making it comfortable to hold."
+ icon_state = "swordhandle"
+ resistance_flags = FLAMMABLE
+
+// -------- CHAIN -------- //
+/obj/item/blacksmith/chain
+ name = "length of chain"
+ desc = "It rattles and is pretty useless when not attached to stuff"
+ icon_state = "chain"
+ hitsound = 'modular_BD2/blacksmith/sound/chain.ogg'
+
+
+//////////////////////////////
+// //
+// SMITHED TOOLS //
+// //
+////////////////////////////// - Known issues - force not modified correctly by quality. Toolspeed works though.
+
+// -------- BLACKSMITH HAMMER -------- //
+/obj/item/smithing/hammerhead
+ name = "smithed hammer head"
+ finalitem = /obj/item/melee/smith/hammer
+ icon_state = "hammer"
+
+/obj/item/smithing/hammerhead/startfinish()
+ var/obj/item/melee/smith/hammer/finalforreal = new /obj/item/melee/smith/hammer(src)
+ finalforreal.force += quality/4
+ finalforreal.qualitymod = quality/2.5
+ finalitem = finalforreal
+ ..()
+
+// -------- SHOVEL -------- //
+/obj/item/smithing/shovelhead
+ name = "smithed shovel head"
+ finalitem = /obj/item/shovel/smithed
+ icon_state = "shovel"
+
+/obj/item/smithing/shovelhead/startfinish()
+ finalitem = new /obj/item/shovel/smithed(src)
+ finalitem.force += quality/2
+ if(quality > 0)
+ finalitem.toolspeed = max(0.05,(1-(quality/10)))
+ else
+ finalitem.toolspeed *= max(1, (quality * -1))
+ ..()
+
+// -------- PICKAXE -------- //
+/obj/item/smithing/pickaxehead
+ name = "smithed pickaxe head"
+ finalitem = /obj/item/pickaxe/smithed
+ icon_state = "pickaxe"
+
+/obj/item/smithing/pickaxehead/startfinish()
+ var/obj/item/pickaxe/smithed/finalforreal = new /obj/item/pickaxe/smithed(src)
+ finalforreal.force += quality/2
+ if(quality > 0)
+ finalforreal.toolspeed = max(0.05,(1-(quality/15)))
+ else
+ finalforreal.toolspeed *= max(1, (quality * -1))
+ switch(quality)
+ if(13 to INFINITY)
+ finalforreal.digrange = 2
+ if(3 to 13)
+ finalforreal.digrange = 1
+ else
+ finalforreal.digrange = 1
+ finalitem = finalforreal
+ ..()
+
+// -------- PROSPECTORS PICK -------- //
+/obj/item/smithing/prospectingpickhead
+ name = "smithed prospector's pick head"
+ icon_state = "prospect_smith"
+ finalitem = /obj/item/mining_scanner/prospector
+ var/cooldown = null
+ var/range = null
+
+/obj/item/smithing/prospectingpickhead/startfinish()
+ var/obj/item/mining_scanner/prospector/finalforreal = new /obj/item/mining_scanner/prospector(src)
+ finalforreal.range = 2 + QUALITY_MODIFIER
+ if(quality)
+ finalforreal.cooldown = 100/quality
+ finalforreal.force += QUALITY_MODIFIER
+ finalitem = finalforreal
+ ..()
+
+// -------- CROWBAR -------- //
+/obj/item/smithing/crowbar
+ name = "unwrapped crowbar"
+ desc = "Wrap with leather strips."
+ icon_state = "crowbar_smith"
+ finishingitem = LEATHER_STRIP
+ finalitem = /obj/item/crowbar/smithed
+
+/obj/item/smithing/crowbar/startfinish()
+ var/obj/item/crowbar/smithed/finalforreal = new /obj/item/crowbar/smithed(src)
+ finalforreal.force += QUALITY_MODIFIER
+ if(quality > 0)
+ finalforreal.toolspeed = max(0.05,(1-(quality/10)))
+ else
+ finalforreal.toolspeed *= max(1, (quality * -1))
+ finalitem = finalforreal
+ ..()
+
+// -------- UNIVERSAL TOOL -------- //
+/obj/item/smithing/unitool
+ name = "unwrapped universal tool"
+ desc = "Wrap with leather strips."
+ icon_state = "unitool_smith"
+ finishingitem = LEATHER_STRIP
+ finalitem = /obj/item/crowbar/smithedunitool
+
+/obj/item/smithing/unitool/startfinish()
+ var/obj/item/crowbar/smithedunitool/finalforreal = new /obj/item/crowbar/smithedunitool(src)
+ finalforreal.force += QUALITY_MODIFIER
+ finalitem = finalforreal
+ ..()
+
+// -------- KITCHEN KNIFE -------- //
+/obj/item/smithing/knifeblade
+ name = "smithed knife blade"
+ desc = "Attach a sword handle."
+ icon_state = "knife_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/kitchen/knife/smithed
+
+/obj/item/smithing/knifeblade/startfinish()
+ var/obj/item/kitchen/knife/smithed/finalforreal = new /obj/item/kitchen/knife/smithed(src)
+ finalforreal.force = QUALITY_MODIFIER*3
+ finalitem = finalforreal
+ ..()
+
+
+//////////////////////////////////////////////////
+// //
+// BLING - smithed and finished both //
+// //
+//////////////////////////////////////////////////
+
+/obj/item/smithing/special
+ mob_overlay_icon = 'modular_BD2/blacksmith/icons/onmob/slot.dmi'
+ gender = NEUTER
+ w_class = WEIGHT_CLASS_SMALL
+
+/obj/item/smithing/special/jewelry
+ icon_state = "ring"
+ item_state = "ring"
+ obj_flags = UNIQUE_RENAME
+ strip_delay = 20
+ equip_delay_other = 40
+ var/strip_mod = 1 //how much they alter stripping items time by, higher is quicker
+ var/strip_silence = TRUE
+ var/mood_event_on_equip = /datum/mood_event/equipped_ring/gold
+
+// ------------ RING ------------ //
+/obj/item/smithing/special/jewelry/ring
+ name = "ring"
+ desc = "A ring."
+ w_class = WEIGHT_CLASS_TINY
+ slot_flags = ITEM_SLOT_GLOVES
+ attack_verb = list("proposed")
+
+/obj/item/smithing/special/jewelry/ring/equipped(mob/user, slot)
+ . = ..()
+ if (slot == SLOT_GLOVES && istype(user))
+ SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "ringbuff", mood_event_on_equip)
+ else
+ SEND_SIGNAL(user, COMSIG_CLEAR_MOOD_EVENT, "ringbuff")
+
+/obj/item/smithing/special/jewelry/ring/dropped(mob/user)
+ . = ..()
+ SEND_SIGNAL(user, COMSIG_CLEAR_MOOD_EVENT, "ringbuff")
+
+
+// ------------ BALL AND CHAIN ------------ //
+/obj/item/smithing/ballandchain
+ name = "unchained ball"
+ desc = "Finish by attaching a chain to it."
+ icon_state = "ball"
+ finishingitem = CHAIN
+ finalitem = /obj/item/restraints/legcuffs/ballandchain
+ throwforce = 15
+ throw_range = 2
+
+/obj/item/smithing/ballandchain/startfinish()
+ var/obj/item/smithing/ballandchain/finalforreal = new /obj/item/restraints/legcuffs/ballandchain(src)
+ finalitem = new /obj/item/restraints/legcuffs/ballandchain(src)
+ finalforreal.force += QUALITY_MODIFIER*2
+ finalitem = finalforreal
+ finalitem.icon = 'modular_BD2/blacksmith/icons/blacksmith.dmi'
+ finalitem.icon_state = "ballandchain"
+ finalitem.name = "ball and chain"
+ finalitem.desc = "Clamp it on the prisoners feet. They will need a long time to remove it themselves."
+ finalitem.material_flags = MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+ ..()
+
+
+// ------------ ARMOR PIECES ------------ // - Obviously meant to be included in recipes to build metal armor instead of generic metal parts, at least for the less "scrap metal salvage" styled metal armors. Make it inherit material would be amusing.
+/obj/item/smithing/armor_piece
+ name = "metal armor parts"
+ desc = "Metal worked to be used in making some sort of simple armor."
+ icon_state = "armor_piece_smith"
+
+
+//////////////////////////////////////////////////
+// //
+// ONEHANDED WEAPONS //
+// //
+//////////////////////////////////////////////////
+
+// ------------ DAGGER ------------ //
+/obj/item/smithing/daggerblade
+ name = "smithed dagger blade"
+ desc = "Attach a sword handle."
+ icon_state = "dagger_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/dagger
+
+/obj/item/smithing/daggerblade/startfinish()
+ finalitem = new /obj/item/melee/smith/dagger(src)
+ finalitem.force += QUALITY_MODIFIER
+ finalitem.armour_penetration += QUALITY_MODIFIER*0.01
+ ..()
+
+// ------------ BOWIE KNIFE ------------ //
+/obj/item/smithing/bowieblade
+ name = "smithed bowie blade"
+ desc = "Attach a sword handle."
+ icon_state = "bowie_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/dagger/bowie
+
+/obj/item/smithing/bowieblade/startfinish()
+ finalitem = new /obj/item/melee/smith/dagger/bowie(src)
+ finalitem.force += QUALITY_MODIFIER
+ finalitem.armour_penetration += QUALITY_MODIFIER*0.01
+ ..()
+
+
+// ------------ MACHETE ------------ //
+/obj/item/smithing/macheteblade
+ name = "smithed machete blade"
+ desc = "Attach a sword handle."
+ icon_state = "machete_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/machete
+
+/obj/item/smithing/macheteblade/startfinish()
+ finalitem = new /obj/item/melee/smith/machete(src)
+ finalitem.force += QUALITY_MODIFIER
+ ..()
+
+// ------------ GLADIUS ------------ //
+/obj/item/smithing/gladiusblade
+ name = "smithed gladius blade"
+ desc = "Attach a sword handle."
+ icon_state = "gladius_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/machete/gladius
+
+/obj/item/smithing/gladiusblade/startfinish()
+ finalitem = new /obj/item/melee/smith/machete/gladius(src)
+ finalitem.force += QUALITY_MODIFIER
+ ..()
+
+// ------------ REFORGED MACHETE ------------ //
+/obj/item/smithing/macheterblade
+ name = "reforged machete blade"
+ desc = "Attach a sword handle."
+ icon_state = "macheter_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/machete/reforged
+
+/obj/item/smithing/macheterblade/startfinish()
+ finalitem = new /obj/item/melee/smith/machete/reforged(src)
+ finalitem.force += QUALITY_MODIFIER
+ ..()
+
+
+// ------------ WAKIZASHI ------------ //
+/obj/item/smithing/wakiblade
+ name = "smithed wakizashi blade"
+ desc = "Attach a sword handle."
+ icon_state = "waki_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/wakizashi
+
+/obj/item/smithing/wakiblade/startfinish()
+ finalitem = new /obj/item/melee/smith/wakizashi(src)
+ finalitem.force += QUALITY_MODIFIER
+ ..()
+
+// ------------ SCRAP SAW ------------ //
+/obj/item/smithing/scrapsaw
+ name = "unfinished scrap saw"
+ desc = "Wrap it in leather strips."
+ icon_state = "saw_smith"
+ finishingitem = LEATHER_STRIP
+ finalitem = /obj/item/melee/smith/wakizashi/scrapsaw
+
+/obj/item/smithing/scrapsaw/startfinish()
+ finalitem = new /obj/item/melee/smith/wakizashi/scrapsaw(src)
+ finalitem.force += QUALITY_MODIFIER
+ ..()
+
+
+// ------------ MACE ------------ //
+/obj/item/smithing/macehead
+ name = "smithed macehead"
+ icon_state = "mace_smith"
+ finalitem = /obj/item/melee/smith/mace
+
+/obj/item/smithing/macehead/startfinish()
+ finalitem = new /obj/item/melee/smith/mace(src)
+ finalitem.force += QUALITY_MODIFIER
+ finalitem.armour_penetration += QUALITY_MODIFIER*0.01
+ ..()
+
+
+// ------------ SWORD ------------ //
+/obj/item/smithing/swordblade
+ name = "smithed swordblade"
+ desc = "Attach a sword handle."
+ icon_state = "sword_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/sword
+
+/obj/item/smithing/swordblade/startfinish()
+ finalitem = new /obj/item/melee/smith/sword(src)
+ finalitem.force += QUALITY_MODIFIER
+ finalitem.armour_penetration += QUALITY_MODIFIER*0.01
+ ..()
+
+// ------------ SPATHA ------------ //
+/obj/item/smithing/spathablade
+ name = "smithed spathablade"
+ desc = "Attach a sword handle."
+ icon_state = "spatha_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/sword/spatha
+
+/obj/item/smithing/spathablade/startfinish()
+ finalitem = new /obj/item/melee/smith/sword/spatha(src)
+ finalitem.force += QUALITY_MODIFIER
+ finalitem.armour_penetration += QUALITY_MODIFIER*0.01
+ ..()
+
+// ------------ SABRE ------------ //
+/obj/item/smithing/sabreblade
+ name = "smithed sabre blade"
+ desc = "Attach a sword handle."
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/melee/smith/sword/sabre
+ icon_state = "sabre_smith"
+
+/obj/item/smithing/sabreblade/startfinish()
+ finalitem = new /obj/item/melee/smith/sword/sabre(src)
+ finalitem.force += QUALITY_MODIFIER
+ finalitem.armour_penetration += QUALITY_MODIFIER*0.01
+ ..()
+
+
+//////////////////////////////////////////////////
+// //
+// TWOHANDED WEAPONS //
+// //
+//////////////////////////////////////////////////
+
+// ------------ KATANA ------------ //
+/obj/item/smithing/katanablade
+ name = "smithed katana blade"
+ desc = "Attach a sword handle."
+ icon_state = "katana_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/twohanded/smithed/katana
+
+/obj/item/smithing/katanablade/startfinish()
+ var/obj/item/twohanded/smithed/katana/finalforreal = new /obj/item/twohanded/smithed/katana(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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") // - icon_wielded basically makes the wield icon for direct click wield, sort of redundant if you change it to shift-x only
+ finalitem = finalforreal
+ ..()
+
+// ------------ LONG SWORDS ------------ //
+/obj/item/smithing/longswordblade
+ name = "smithed longsword blade"
+ desc = "Attach a sword handle."
+ icon_state = "longsword_smith"
+ finishingitem = SWORD_HANDLE
+ finalitem = /obj/item/twohanded/smithed/katana/longsword
+
+/obj/item/smithing/longswordblade/startfinish()
+ var/obj/item/twohanded/smithed/katana/longsword/finalforreal = new /obj/item/twohanded/smithed/katana/longsword(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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
+ ..()
+
+// ------------ SCRAP BLADE ------------ //
+/obj/item/smithing/scrapblade
+ name = "smithed scrap blade"
+ desc = "Wrap in leather strips."
+ icon_state = "scrap_smith"
+ finishingitem = LEATHER_STRIP
+ finalitem = /obj/item/twohanded/smithed/katana/scrapblade
+
+/obj/item/smithing/scrapblade/startfinish()
+ var/obj/item/twohanded/smithed/katana/scrapblade/finalforreal = new /obj/item/twohanded/smithed/katana/scrapblade(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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
+ ..()
+
+
+// ------------ HEAVY AXE ------------ //
+/obj/item/smithing/axehead
+ name = "smithed axehead"
+ icon_state = "axe_smith"
+ finalitem = /obj/item/twohanded/smithed/axe
+
+/obj/item/smithing/axehead/startfinish()
+ var/obj/item/twohanded/smithed/axe/finalforreal = new /obj/item/twohanded/smithed/axe(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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
+ ..()
+ finalitem.force += QUALITY_MODIFIER
+
+// ------------ WAR AXE ------------ //
+/obj/item/smithing/waraxehead
+ name = "smithed war-axehead"
+ icon_state = "waraxe_smith"
+ finalitem = /obj/item/twohanded/smithed/axe/waraxe
+
+/obj/item/smithing/waraxehead/startfinish()
+ var/obj/item/twohanded/smithed/axe/waraxe/finalforreal = new /obj/item/twohanded/smithed/axe/waraxe(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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
+ ..()
+
+// ------------ GHOUL CRUSHER ------------ // - for those dry twig like limbs, snap snap.
+/obj/item/smithing/crusherhead
+ name = "smithed crusher head"
+ finalitem = /obj/item/twohanded/smithed/crusher
+ icon_state = "crusher_smith"
+
+/obj/item/smithing/crusherhead/startfinish()
+ var/obj/item/twohanded/smithed/crusher/finalforreal = new /obj/item/twohanded/smithed/crusher(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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
+ ..()
+
+
+// ------------ SPEAR ------------ //
+/obj/item/smithing/spearhead
+ name = "smithed spearhead"
+ finalitem = /obj/item/twohanded/smithed/spear
+ icon_state = "spear_smith"
+
+/obj/item/smithing/spearhead/startfinish()
+ var/obj/item/twohanded/smithed/spear/finalforreal = new /obj/item/twohanded/smithed/spear(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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.throwforce = finalforreal.force
+ finalitem = finalforreal
+ ..()
+
+// ------------ TRIDENT ------------ //
+/obj/item/smithing/tridenthead
+ name = "smithed tridenthead"
+ finalitem = /obj/item/twohanded/smithed/spear/trident
+ icon_state = "trident_smith"
+
+/obj/item/smithing/tridenthead/startfinish()
+ var/obj/item/twohanded/smithed/spear/trident/finalforreal = new /obj/item/twohanded/smithed/spear/trident(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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.throwforce = finalforreal.force
+ finalitem = finalforreal
+ ..()
+
+// ------------ LEGION LANCE ------------ //
+/obj/item/smithing/lancehead
+ name = "smithed lancehead"
+ finalitem = /obj/item/twohanded/smithed/spear/lance
+ icon_state = "lance_smith"
+
+/obj/item/smithing/lancehead/startfinish()
+ var/obj/item/twohanded/smithed/spear/lance/finalforreal = new /obj/item/twohanded/smithed/spear/lance(src)
+ finalforreal.force += QUALITY_MODIFIER
+ 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.throwforce = finalforreal.force
+ finalitem = finalforreal
+ ..()
+
+
+//////////////////////////////////////////////////
+// //
+// THROWING WEAPONS //
+// //
+//////////////////////////////////////////////////
+
+// ------------ THROWING KNIFE ------------ //
+/obj/item/smithing/throwingknife
+ name = "unfinished throwing knife"
+ desc = "Add leather strips."
+ icon_state = "throwing_smith"
+ finishingitem = LEATHER_STRIP
+ finalitem = /obj/item/melee/smith/throwingknife
+
+/obj/item/smithing/throwingknife/startfinish()
+ var/obj/item/melee/smith/throwingknife/finalforreal = new /obj/item/melee/smith/throwingknife(src)
+ finalforreal.force += QUALITY_MODIFIER
+ finalforreal.throwforce = finalforreal.force*1.4
+ finalitem = finalforreal
+ ..()
+
+// ------------ JAVELIN ------------ //
+/obj/item/smithing/javelinhead
+ name = "smithed javelin head"
+ icon_state = "javelin_smith"
+ finalitem = /obj/item/melee/smith/javelin
+
+/obj/item/smithing/javelinhead/startfinish()
+ var/obj/item/melee/smith/javelin/finalforreal = new /obj/item/melee/smith/javelin(src)
+ finalforreal.force += QUALITY_MODIFIER
+ finalforreal.throwforce = finalforreal.force*1.5
+ finalitem = finalforreal
+ ..()
+
+// ------------ METAL BOLA ------------ //
+/obj/item/smithing/bola
+ name = "unfinished bola pieces"
+ desc = "Add a chain."
+ icon_state = "bola_smith"
+ finishingitem = CHAIN
+ finalitem = /obj/item/restraints/legcuffs/bola/smithed
+
+/obj/item/smithing/bola/startfinish()
+ var/obj/item/restraints/legcuffs/bola/smithed/finalforreal = new /obj/item/restraints/legcuffs/bola/smithed(src)
+ finalforreal.breakouttime+= QUALITY_MODIFIER
+ finalitem = finalforreal
+ ..()
+
+#undef WOODEN_ROD
+#undef SWORD_HANDLE
+#undef LEATHER_STRIP
+#undef CHAIN
+#undef QUALITY_MODIFIER
+#undef GLOW_BRIGHT
+#undef GLOW_MODERATE
+#undef GLOW_WEAK
diff --git a/modular_BD2/blacksmith/icons/blacksmith.dmi b/modular_BD2/blacksmith/icons/blacksmith.dmi
new file mode 100644
index 00000000000..855e49b704d
Binary files /dev/null and b/modular_BD2/blacksmith/icons/blacksmith.dmi differ
diff --git a/modular_BD2/blacksmith/icons/furnace32x64.dmi b/modular_BD2/blacksmith/icons/furnace32x64.dmi
new file mode 100644
index 00000000000..25d82a6971e
Binary files /dev/null and b/modular_BD2/blacksmith/icons/furnace32x64.dmi differ
diff --git a/modular_BD2/blacksmith/icons/furnace_sandstone32x64.dmi b/modular_BD2/blacksmith/icons/furnace_sandstone32x64.dmi
new file mode 100644
index 00000000000..0ab922a21d0
Binary files /dev/null and b/modular_BD2/blacksmith/icons/furnace_sandstone32x64.dmi differ
diff --git a/modular_BD2/blacksmith/icons/onmob/64x64_lefthand.dmi b/modular_BD2/blacksmith/icons/onmob/64x64_lefthand.dmi
new file mode 100644
index 00000000000..bddbae1582c
Binary files /dev/null and b/modular_BD2/blacksmith/icons/onmob/64x64_lefthand.dmi differ
diff --git a/modular_BD2/blacksmith/icons/onmob/64x64_righthand.dmi b/modular_BD2/blacksmith/icons/onmob/64x64_righthand.dmi
new file mode 100644
index 00000000000..cb9c824a3df
Binary files /dev/null and b/modular_BD2/blacksmith/icons/onmob/64x64_righthand.dmi differ
diff --git a/modular_BD2/blacksmith/icons/onmob/lefthand.dmi b/modular_BD2/blacksmith/icons/onmob/lefthand.dmi
new file mode 100644
index 00000000000..0f4a0224612
Binary files /dev/null and b/modular_BD2/blacksmith/icons/onmob/lefthand.dmi differ
diff --git a/modular_BD2/blacksmith/icons/onmob/righthand.dmi b/modular_BD2/blacksmith/icons/onmob/righthand.dmi
new file mode 100644
index 00000000000..e588e230f49
Binary files /dev/null and b/modular_BD2/blacksmith/icons/onmob/righthand.dmi differ
diff --git a/modular_BD2/blacksmith/icons/onmob/slot.dmi b/modular_BD2/blacksmith/icons/onmob/slot.dmi
new file mode 100644
index 00000000000..fc2072e6ce1
Binary files /dev/null and b/modular_BD2/blacksmith/icons/onmob/slot.dmi differ
diff --git a/modular_BD2/blacksmith/sound/anvil_double1.ogg b/modular_BD2/blacksmith/sound/anvil_double1.ogg
new file mode 100644
index 00000000000..b4dfce5df2d
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_double1.ogg differ
diff --git a/modular_BD2/blacksmith/sound/anvil_double2.ogg b/modular_BD2/blacksmith/sound/anvil_double2.ogg
new file mode 100644
index 00000000000..06440a4e13b
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_double2.ogg differ
diff --git a/modular_BD2/blacksmith/sound/anvil_double3.ogg b/modular_BD2/blacksmith/sound/anvil_double3.ogg
new file mode 100644
index 00000000000..1982d02ccb0
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_double3.ogg differ
diff --git a/modular_BD2/blacksmith/sound/anvil_heavy.ogg b/modular_BD2/blacksmith/sound/anvil_heavy.ogg
new file mode 100644
index 00000000000..bf524d3451d
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_heavy.ogg differ
diff --git a/modular_BD2/blacksmith/sound/anvil_rapid.ogg b/modular_BD2/blacksmith/sound/anvil_rapid.ogg
new file mode 100644
index 00000000000..89ba5ee960c
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_rapid.ogg differ
diff --git a/modular_BD2/blacksmith/sound/anvil_single1.ogg b/modular_BD2/blacksmith/sound/anvil_single1.ogg
new file mode 100644
index 00000000000..55b07e0c702
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_single1.ogg differ
diff --git a/modular_BD2/blacksmith/sound/anvil_single2.ogg b/modular_BD2/blacksmith/sound/anvil_single2.ogg
new file mode 100644
index 00000000000..1336cdc1c09
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_single2.ogg differ
diff --git a/modular_BD2/blacksmith/sound/anvil_strong.ogg b/modular_BD2/blacksmith/sound/anvil_strong.ogg
new file mode 100644
index 00000000000..9f805f84fa5
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_strong.ogg differ
diff --git a/modular_BD2/blacksmith/sound/anvil_weak.ogg b/modular_BD2/blacksmith/sound/anvil_weak.ogg
new file mode 100644
index 00000000000..9cb8768cf9c
Binary files /dev/null and b/modular_BD2/blacksmith/sound/anvil_weak.ogg differ
diff --git a/modular_BD2/blacksmith/sound/burned.ogg b/modular_BD2/blacksmith/sound/burned.ogg
new file mode 100644
index 00000000000..832320ea01a
Binary files /dev/null and b/modular_BD2/blacksmith/sound/burned.ogg differ
diff --git a/modular_BD2/blacksmith/sound/chain.ogg b/modular_BD2/blacksmith/sound/chain.ogg
new file mode 100644
index 00000000000..b836737da71
Binary files /dev/null and b/modular_BD2/blacksmith/sound/chain.ogg differ
diff --git a/modular_BD2/blacksmith/sound/craft_3.ogg b/modular_BD2/blacksmith/sound/craft_3.ogg
new file mode 100644
index 00000000000..907c8d338ab
Binary files /dev/null and b/modular_BD2/blacksmith/sound/craft_3.ogg differ
diff --git a/modular_BD2/blacksmith/sound/craft_4.ogg b/modular_BD2/blacksmith/sound/craft_4.ogg
new file mode 100644
index 00000000000..e170af29e0c
Binary files /dev/null and b/modular_BD2/blacksmith/sound/craft_4.ogg differ
diff --git a/modular_BD2/blacksmith/sound/furnace1.ogg b/modular_BD2/blacksmith/sound/furnace1.ogg
new file mode 100644
index 00000000000..ad8030797c9
Binary files /dev/null and b/modular_BD2/blacksmith/sound/furnace1.ogg differ
diff --git a/modular_BD2/blacksmith/sound/hit_knife.ogg b/modular_BD2/blacksmith/sound/hit_knife.ogg
new file mode 100644
index 00000000000..7588e0151c7
Binary files /dev/null and b/modular_BD2/blacksmith/sound/hit_knife.ogg differ
diff --git a/modular_BD2/blacksmith/sound/hit_mace.ogg b/modular_BD2/blacksmith/sound/hit_mace.ogg
new file mode 100644
index 00000000000..1314612cfe2
Binary files /dev/null and b/modular_BD2/blacksmith/sound/hit_mace.ogg differ
diff --git a/modular_BD2/blacksmith/sound/hit_sword.ogg b/modular_BD2/blacksmith/sound/hit_sword.ogg
new file mode 100644
index 00000000000..79ed5f47beb
Binary files /dev/null and b/modular_BD2/blacksmith/sound/hit_sword.ogg differ
diff --git a/modular_BD2/blacksmith/sound/latex.ogg b/modular_BD2/blacksmith/sound/latex.ogg
new file mode 100644
index 00000000000..d9a602244e2
Binary files /dev/null and b/modular_BD2/blacksmith/sound/latex.ogg differ
diff --git a/modular_BD2/blacksmith/sound/meatslap.ogg b/modular_BD2/blacksmith/sound/meatslap.ogg
new file mode 100644
index 00000000000..3d8ea7df1ac
Binary files /dev/null and b/modular_BD2/blacksmith/sound/meatslap.ogg differ
diff --git a/modular_BD2/blacksmith/sound/pickaxe_2.ogg b/modular_BD2/blacksmith/sound/pickaxe_2.ogg
new file mode 100644
index 00000000000..cab14d54747
Binary files /dev/null and b/modular_BD2/blacksmith/sound/pickaxe_2.ogg differ
diff --git a/modular_BD2/blacksmith/sound/ripped.ogg b/modular_BD2/blacksmith/sound/ripped.ogg
new file mode 100644
index 00000000000..e42e36ce97d
Binary files /dev/null and b/modular_BD2/blacksmith/sound/ripped.ogg differ
diff --git a/modular_BD2/blacksmith/sound/steam_short.ogg b/modular_BD2/blacksmith/sound/steam_short.ogg
new file mode 100644
index 00000000000..1069f276767
Binary files /dev/null and b/modular_BD2/blacksmith/sound/steam_short.ogg differ
diff --git a/modular_BD2/blacksmith/sound/steam_whoosh.ogg b/modular_BD2/blacksmith/sound/steam_whoosh.ogg
new file mode 100644
index 00000000000..21c7975c084
Binary files /dev/null and b/modular_BD2/blacksmith/sound/steam_whoosh.ogg differ
diff --git a/modular_BD2/blacksmith/sound/water_splash2.ogg b/modular_BD2/blacksmith/sound/water_splash2.ogg
new file mode 100644
index 00000000000..7ba705f4991
Binary files /dev/null and b/modular_BD2/blacksmith/sound/water_splash2.ogg differ
diff --git a/modular_BD2/fashion/README.md b/modular_BD2/fashion/README.md
new file mode 100644
index 00000000000..05e8b70695a
--- /dev/null
+++ b/modular_BD2/fashion/README.md
@@ -0,0 +1,39 @@
+# Fashion Fallout Edition
+## Who made this module?
+Pebbles the 2nd. Credits at the end.
+
+## What is this module?
+All FO servers used the same old ancient set of hairs, parts going back 11 years and without any real direction. This module curates the content, adds some new hairstyles, removes some old ones, and redoes the majority of the existing ones to improve their quality and make them consistent.
+
+Core principles:
+- Hair sorted like facial hair always has been, in categories. Makes it easier to find suitable hair for your character than looking through a long alphabetical list of arbitrarily named hairs.
+- Entire lineup redone, old stuff kept when decent, redone if not, tons of edits, new stuff added. Hairs as well as facial hairs.
+- Order, same in icon files as in .dms, no duplicates, no unused stuff.
+- Collects cosmetics items
+- Adds combs/brushes (mood boost, more for longer hairs)
+- Adds handheld mirrors (applies makeup, small mood boost)
+- Adds straight razor (shaves like a electric razor, only more post apoc, and slower so harder to grief with. Also can cut people up and generally fun)
+
+## Is it complete?
+Yes.
+Implementing the module might affect saved character profiles, it will certainly mess up any saved hairs and facial hairstyles 100% since the code saves user profiles by bitflags or something, so changing the order of the hairs in any way causes some annoyances. Something to be aware of, players can just reselect their hair and save and its fine so its no biggie.
+Clothing will be affected by repaths/reorgs up-path to some degree. The reason to have them in the module is to keep the sets together, so it does not get spread out and lost.
+
+The Angel Eyes, Blondie, and Tuco sets are just spawners at the moment, can be added where appropriate.
+
+## Who dunnit
+Some are my own concepts, others edited from minor to total reworks of legacy or other hairstyles from bay and elsewhere, names have been changed when needed to fit the system. Basically, 90% of the hairs got minor to major edits, but also build on the older work of various unknown people.
+Comb/Brush code - sparklingsheep
+Lipstick/razor code - AffectedArc07
+Handheld mirror & makeup, curating and redoing sprites and the rest- Pebbles the 2nd
+Straight razor - Pebbles
+Clothing: Burgundy suit minor edits for sleeves, a tiny bit of shade, jacket off state and brand new icon added. Credit to the original creator, its a very nice onmob.
+Laceup shoes already has a perfect icon, but the onmobs were not good, so just made new ones.
+Some recolors, Tucos hat is heavily edited Vaquero hat, the stetson is a recolored drillhat.
+Angel Eyes uniform, shoes, suit, Tuco uniform, suit, shoes, Blondie uniform, shoes, suit, Outcast uniform, patched leather cloak, suit, 50s dress, picnic dress, Benny uniform, nurse uniform & hat - Pebbles.
+
+v.1.1 notes - Peb
+* Added clothing sets & some spawners. Picnic dress, 50s dress, Nurse, Scarecrow, Angel Eyes, Blondie, Tuco, Benny, Burgundy, Tribal outcast
+* Added new dynamic hair state: +hood (suitable for hoods/helmets that cover the back of the head but you want longer hairs to peek out.)
+* Added new dynamic facial hair prefix: + hood (for where the chin is exposed), done in species.dm
+
diff --git a/modular_BD2/fashion/icons/clothing_fashion.dmi b/modular_BD2/fashion/icons/clothing_fashion.dmi
new file mode 100644
index 00000000000..89c922188f5
Binary files /dev/null and b/modular_BD2/fashion/icons/clothing_fashion.dmi differ
diff --git a/modular_BD2/fashion/icons/cosmetics.dmi b/modular_BD2/fashion/icons/cosmetics.dmi
new file mode 100644
index 00000000000..c9e26322ec8
Binary files /dev/null and b/modular_BD2/fashion/icons/cosmetics.dmi differ
diff --git a/modular_BD2/fashion/icons/onmob.dmi b/modular_BD2/fashion/icons/onmob.dmi
new file mode 100644
index 00000000000..a03ea707ae1
Binary files /dev/null and b/modular_BD2/fashion/icons/onmob.dmi differ
diff --git a/modular_BD2/fashion/icons/onmobleft.dmi b/modular_BD2/fashion/icons/onmobleft.dmi
new file mode 100644
index 00000000000..c55105a3d3b
Binary files /dev/null and b/modular_BD2/fashion/icons/onmobleft.dmi differ
diff --git a/modular_BD2/fashion/icons/onmobright.dmi b/modular_BD2/fashion/icons/onmobright.dmi
new file mode 100644
index 00000000000..88e94b12511
Binary files /dev/null and b/modular_BD2/fashion/icons/onmobright.dmi differ
diff --git a/modular_BD2/fashion/sound/shaving.ogg b/modular_BD2/fashion/sound/shaving.ogg
new file mode 100644
index 00000000000..22cf4d4ed9d
Binary files /dev/null and b/modular_BD2/fashion/sound/shaving.ogg differ
diff --git a/modular_BD2/general/code/modular_BD2.dm b/modular_BD2/general/code/modular_BD2.dm
new file mode 100644
index 00000000000..24d34fe80d2
--- /dev/null
+++ b/modular_BD2/general/code/modular_BD2.dm
@@ -0,0 +1,1064 @@
+/* IN THIS FILE
+ * MATERIALS
+ * AUTOLATHES
+ * FALLOUT TOOLS
+ * WORKBENCHES
+ * STRUCTURES
+ * ITEMS
+*/
+
+//////////////////////////////////////////////////
+// //
+// //
+// MATERIALS //
+// //
+// //
+//////////////////////////////////////////////////
+
+// ------------ COAL & COKE ------------------ New base material and the sheet that can be used as fuel or ground for charcoal
+
+/datum/material/coal
+ name = "coal"
+ desc = "coal"
+ color = "#0a0a0a"
+ alpha = 150
+ categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = FALSE)
+ sheet_type = /obj/item/stack/ore/coal
+ value_per_unit = 0.0050
+
+/obj/item/stack/ore/coal // turns to coke when heated in a Furnace or ORM
+ name = "coal"
+ desc = "Pure coal needs heat-processing to become good fuel."
+ icon = 'modular_BD2/general/icons/stackable_items.dmi'
+ icon_state = "ore_coal"
+ singular_name = "lump of coal"
+ points = 2
+ custom_materials = null
+ refined_type = /obj/item/stack/sheet/coke
+ merge_type = /obj/item/stack/ore/coal
+ resistance_flags = FLAMMABLE
+
+/obj/item/stack/sheet/coke // Can be used to fuel Furnaces, Campfires, Barrel Fires, Potbelly stoves, Fireplaces, or grind for charcoal
+ name = "coke"
+ desc = "Coke is what you get when you heat-treat coal. It's a good fuel for burning."
+ singular_name = "bag of coke"
+ icon = 'modular_BD2/general/icons/stackable_items.dmi'
+ icon_state = "sheet_coke"
+ custom_materials = null
+ throwforce = 2
+ grind_results = list(/datum/reagent/medicine/charcoal = 5)
+ material_type = /datum/material/coal
+ merge_type = /obj/item/stack/sheet/coke
+ resistance_flags = FLAMMABLE
+
+/obj/item/stack/sheet/coke/twenty
+ amount = 20
+
+/turf/closed/mineral/coal
+ mineralType = /obj/item/stack/ore/coal
+ spreadChance = 5
+ spread = 1
+ scan_state = "rock_Coal"
+/*
+UPDATED CODE TO ALLOW FOR COKE AS FUEL
+/obj/machinery/grill/attackby(obj/item/I, mob/user)
+ if(istype(I, /obj/item/stack/sheet/mineral/coal) || I, /obj/item/stack/sheet/mineral/coke) || istype(I, /obj/item/stack/sheet/mineral/wood))
+ var/obj/item/stack/S = I
+ var/stackamount = S.get_amount()
+ to_chat(user, span_notice("You put [stackamount] [I]s in [src]."))
+ if(istype(I, /obj/item/stack/sheet/mineral/coal) || I, /obj/item/stack/sheet/mineral/coke))
+ grill_fuel += (500 * stackamount)
+ else
+ grill_fuel += (50 * stackamount)
+ S.use(stackamount)
+ update_icon()
+ return
+ if(I.resistance_flags & INDESTRUCTIBLE)
+ to_chat(user, span_warning("You don't feel it would be wise to grill [I]..."))
+ return ..()
+ if(istype(I, /obj/item/reagent_containers))
+ if(istype(I, /obj/item/reagent_containers/food) && !istype(I, /obj/item/reagent_containers/food/drinks))
+ if(HAS_TRAIT(I, TRAIT_NODROP) || (I.item_flags & (ABSTRACT | DROPDEL)))
+ return ..()
+ else if(!grill_fuel)
+ to_chat(user, span_notice("There is not enough fuel."))
+ return
+ else if(!grilled_item && user.transferItemToLoc(I, src))
+ grilled_item = I
+ to_chat(user, span_notice("You put the [grilled_item] on [src]."))
+ update_icon()
+ grill_loop.start()
+ return
+ else
+ if(I.reagents.has_reagent(/datum/reagent/consumable/monkey_energy))
+ grill_fuel += (20 * (I.reagents.get_reagent_amount(/datum/reagent/consumable/monkey_energy)))
+ to_chat(user, span_notice("You pour the Monkey Energy in [src]."))
+ I.reagents.remove_reagent("monkey_energy", I.reagents.get_reagent_amount(/datum/reagent/consumable/monkey_energy))
+ update_icon()
+ return
+ ..()
+*/
+/* Added
+ icon = 'modular_BD2/general/icons/stackable_items.dmi'
+to the below
+/obj/item/stack/sheet/gold
+/obj/item/stack/sheet/silver
+/obj/item/stack/sheet/lead
+/obj/item/stack/sheet/metal
+/obj/item/stack/sheet/plasteel
+/obj/item/stack/sheet/mineral/wood
+/obj/item/stack/medical/gauze/improvised
+/obj/item/stack/sheet/cloth
+/obj/item/stack/sheet/plastic
+/obj/item/stack/sheet/glass
+/obj/item/stack/sheet/leatherstrips
+/obj/item/stack/sheet/mineral/limestone
+/obj/item/stack/sheet/mineral/concrete
+/obj/item/stack/ore/blackpowder
+/obj/item/stack/crafting/armor_plate
+/obj/item/stack/crafting/metalparts
+/obj/item/stack/crafting/goodparts
+/obj/item/stack/crafting/electronicparts
+/obj/item/stack/crafting/powder
+*/
+
+//////////////////////////////////////////////////
+// //
+// //
+// AUTOLATHES //
+// //
+// //
+//////////////////////////////////////////////////
+/*
+// ------------------------------- MANUAL AUTOLATHE ------------------------------
+
+/obj/machinery/autolathe/manual
+ name = "manual lathe"
+ desc = "Produce simple items with manually cranked tools."
+ icon = 'modular_BD2/general/icons/autolathe_primitive.dmi'
+ icon_state = "autolathe"
+ use_power = NO_POWER_USE
+ circuit = /obj/item/circuitboard/machine/autolathe/manual
+ tooadvanced = FALSE
+ categories = list(
+ "Tools",
+ "Construction",
+ "Equipment",
+ "Medical",
+ "Misc",
+ "Dinnerware",
+ )
+ base_print_speed = 30
+ allowed_materials = list(
+ /datum/material/iron,
+ /datum/material/glass,
+ /datum/material/titanium,
+ /datum/material/bone,
+ /datum/material/lead
+ )
+ stored_research = /datum/techweb/specialized/autounlocking/autolathe/manual
+
+
+/obj/item/circuitboard/machine/autolathe/manual // not reinventing machine building entirely even if its dorky
+ name = "manual lathe kit"
+
+/datum/techweb/specialized/autounlocking/autolathe/manual
+ design_autounlock_buildtypes = AUTOLATHE_PRIMITIVE
+ allowed_buildtypes = AUTOLATHE_PRIMITIVE
+
+
+// ------------------------------- MANUAL AUTOLATHE DESIGNS ------------------------------
+
+/datum/design/hemostat_primitive
+ name = "Hemostat (primitive)"
+ id = "hemostat_primitive"
+ materials = list(/datum/material/iron = ONE_SHEET*2, /datum/material/bone = HALF_SHEET)
+ build_path = /obj/item/hemostat/tribal
+ category = list("initial", "Medical")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/cautery_primitive
+ name = "Cautery (primitive)"
+ id = "cautery_primitive"
+ materials = list(/datum/material/iron = ONE_SHEET*2, /datum/material/glass = HALF_SHEET)
+ build_path = /obj/item/cautery/primitive
+ category = list("initial", "Medical")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/razor
+ name = "Straight razor"
+ id = "straigth_razor"
+ materials = list(/datum/material/iron = ONE_SHEET*2, /datum/material/bone = HALF_SHEET)
+ build_path = /obj/item/melee/onehanded/straight_razor
+ category = list("initial", "Medical")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/retractor_primitive
+ name = "Retractor (primitive)"
+ id = "retractor_primitive"
+ materials = list(/datum/material/iron = ONE_SHEET*2, /datum/material/bone = HALF_SHEET)
+ build_path = /obj/item/retractor/tribal
+ category = list("initial", "Medical")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/bonesetter_primitive
+ name = "Bonesetter (primitive)"
+ id = "bonesetter_primitive"
+ materials = list(/datum/material/iron = ONE_SHEET*2, /datum/material/bone = HALF_SHEET)
+ build_path = /obj/item/bonesetter
+ category = list("initial", "Medical")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/handsaw
+ name = "Hand saw"
+ id = "handsaw"
+ materials = list(/datum/material/iron = ONE_SHEET*3)
+ build_path = /obj/item/circular_saw/primitive
+ category = list("initial", "Medical")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/lantern
+ name = "Lantern"
+ id = "lantern"
+ materials = list(/datum/material/lead = QUARTER_SHEET, /datum/material/glass = ONE_SHEET)
+ build_path = /obj/item/flashlight/lantern
+ category = list("initial","Equipment")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/binoculars
+ name = "Binoculars"
+ id = "binoculars"
+ materials = list(/datum/material/lead = ONE_SHEET*2, /datum/material/glass = ONE_SHEET*10) // leaded glass
+ build_path = /obj/item/binoculars
+ category = list("initial","Equipment")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/weldingtool_basic
+ name = "Welding tool"
+ id = "weldingtool_basic"
+ materials = list(/datum/material/iron = ONE_SHEET, /datum/material/glass = QUARTER_SHEET)
+ build_path = /obj/item/weldingtool/basic
+ category = list("initial","Tools")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/screwdriver_basic
+ name = "Screwdriver"
+ id = "screwdriver_basic"
+ materials = list(/datum/material/iron = QUARTER_SHEET)
+ build_path = /obj/item/screwdriver/basic
+ category = list("initial","Tools")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/wirecutters_basic
+ name = "Wirecutters"
+ id = "wirecutters_basic"
+ materials = list(/datum/material/iron = QUARTER_SHEET)
+ build_path = /obj/item/wirecutters/basic
+ category = list("initial","Tools")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/wrench_basic
+ name = "Wrench"
+ id = "wrench_basic"
+ materials = list(/datum/material/iron = HALF_SHEET)
+ build_path = /obj/item/wrench/basic
+ category = list("initial","Tools")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/crowbar_basic
+ name = "Crowbar"
+ id = "crowbar_basic"
+ materials = list(/datum/material/iron = HALF_SHEET)
+ build_path = /obj/item/crowbar/basic
+ category = list("initial","Tools")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/metal_parts
+ name = "Metal parts"
+ id = "metalparts"
+ materials = list(/datum/material/iron = ONE_SHEET*5)
+ build_path = /obj/item/stack/crafting/metalparts
+ category = list("initial","Construction")
+ build_type = AUTOLATHE_PRIMITIVE
+ maxstack = 50
+
+/datum/design/hq_parts
+ name = "High quality parts"
+ id = "hqparts"
+ materials = list(/datum/material/titanium = ONE_SHEET*5)
+ build_path = /obj/item/stack/crafting/goodparts
+ category = list("initial","Construction")
+ build_type = AUTOLATHE_PRIMITIVE
+ maxstack = 50
+
+/datum/design/titanium
+ name = "Titanium sheet"
+ id = "titanium_sheet"
+ build_type = AUTOLATHE_PRIMITIVE
+ materials = list(/datum/material/titanium = ONE_SHEET)
+ build_path = /obj/item/stack/sheet/metal
+ category = list("initial","Construction")
+ maxstack = 50
+
+/datum/design/lead
+ name = "Lead sheet"
+ id = "lead"
+ build_type = AUTOLATHE | AUTOLATHE_PRIMITIVE
+ materials = list(/datum/material/lead = ONE_SHEET)
+ build_path = /obj/item/stack/sheet/lead
+ category = list("initial","Construction")
+ maxstack = 50
+
+/datum/design/chain
+ name = "Length of chain"
+ id = "chain"
+ materials = list(/datum/material/iron = ONE_SHEET)
+ build_path = /obj/item/blacksmith/chain
+ category = list("initial","Construction")
+ build_type = AUTOLATHE_PRIMITIVE
+
+/datum/design/lunchbox
+ name = "Lunchbox"
+ id = "lunchbox"
+ build_type = AUTOLATHE_PRIMITIVE
+ materials = list(/datum/material/iron = ONE_SHEET)
+ build_path = /obj/item/crafting/lunchbox
+ category = list("initial", "Misc")
+
+/datum/design/beartrap
+ name = "Beartrap"
+ id = "beartrap"
+ build_type = AUTOLATHE_PRIMITIVE
+ materials = list(/datum/material/titanium = ONE_SHEET)
+ build_path = /obj/item/restraints/legcuffs/beartrap
+ category = list("initial", "Misc")
+
+/datum/design/coffeepot
+ name = "Coffeepot"
+ id = "coffeepot"
+ build_type = AUTOLATHE_PRIMITIVE
+ materials = list(/datum/material/iron = ONE_SHEET)
+ build_path = /obj/item/crafting/coffee_pot
+ category = list("initial", "Misc")
+
+// Also the following recipes has [] | AUTOLATHE_PRIMITIVE } added to build_type: /datum/design/lead, /datum/design/titanium, /datum/design/rods, /datum/design/metal, /datum/design/glass, /datum/design/rglass
+// /datum/design/handlabeler, /datum/design/kitchen_knife, /datum/design/fork, /datum/design/beaker, /datum/design/large_beaker, /datum/design/bonesetter
+// /datum/design/handcuffs, /datum/design/syringe, /datum/design/igniter, /datum/design/spraycan, /datum/design/extinguisher, /datum/design/welding_helmet, /datum/design/cable_coil
+// /datum/design/toolbox, /datum/design/spraybottle, /datum/design/bucket, /datum/design/timer, /datum/design/tray, /datum/design/bowl, /datum/design/drinking_glass, /datum/design/shot_glass
+// /datum/design/shaker, /datum/design/earmuffs
+// #define AUTOLATHE_PRIMITIVE (1<<13) // ADD to defines machines.dm
+
+
+// ------------------------------- MILITARY AUTOLATHE ------------------------------
+
+/obj/machinery/autolathe/military
+ name = "military autolathe"
+ desc = "Ancient technology, still works."
+ icon = 'modular_BD2/general/icons/autolathe_military.dmi'
+ circuit = /obj/item/circuitboard/machine/autolathe/military
+
+/obj/item/circuitboard/machine/autolathe/military
+ name = "army lathe circuit board"
+
+
+// ------------------------------- AMMOLATHE ------------------------------
+
+/obj/machinery/autolathe/ammo
+ name = "reloading bench"
+ icon = 'modular_BD2/general/icons/ammo_lathe.dmi'
+
+/obj/machinery/autolathe/ammo/attackby(obj/item/O, mob/user, params)
+ if(!busy && !stat)
+ if(istype(O, /obj/item/storage/bag/casings))
+ insert_things_from_bag(user, O)
+ return
+ if(istype(O, /obj/item/ammo_box))
+ if(pre_insert_check(user, O))
+ if(!insert_bullets_from_box(user, O))
+ return
+ if(istype(O, /obj/item/gun/ballistic))
+ if(pre_insert_check(user, O))
+ if(!insert_magazine_from_gun(user, O))
+ return
+ if(panel_open && accepts_books)
+ if(!simple && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_one))
+ to_chat(user, "You upgrade [src] with simple ammunition schematics.")
+ simple = TRUE
+ add_overlay("book1")
+ qdel(O)
+ return
+ if(!basic && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_two))
+ to_chat(user, "You upgrade [src] with basic ammunition schematics.")
+ basic = TRUE
+ add_overlay("book2")
+ qdel(O)
+ return
+ else if(!intermediate && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_three))
+ to_chat(user, "You upgrade [src] with intermediate ammunition schematics.")
+ intermediate = TRUE
+ add_overlay("book3")
+ qdel(O)
+ return
+ else if(!advanced && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_four))
+ to_chat(user, "You upgrade [src] with advanced ammunition schematics.")
+ advanced = TRUE
+ add_overlay("book4")
+ qdel(O)
+ return
+ return ..()
+
+/obj/machinery/autolathe/ammo/on_deconstruction()
+ ..()
+ if(simple)
+ new /obj/item/book/granter/crafting_recipe/gunsmith_one(src)
+ if(basic)
+ new /obj/item/book/granter/crafting_recipe/gunsmith_two(src)
+ if(intermediate)
+ new /obj/item/book/granter/crafting_recipe/gunsmith_three(src)
+ if(advanced)
+ new /obj/item/book/granter/crafting_recipe/gunsmith_four(src)
+ cut_overlays()
+ return
+
+/obj/machinery/autolathe/ammo/unlocked_basic/Initialize()
+ . = ..()
+ add_overlay("book2")
+
+/obj/machinery/autolathe/ammo/unlocked
+ simple = TRUE
+ basic = TRUE
+ intermediate = TRUE
+ advanced = TRUE
+
+/obj/machinery/autolathe/ammo/unlocked/Initialize()
+ . = ..()
+ add_overlay("book4")
+
+
+//////////////////////////////////////////////////
+// //
+// //
+// FALLOUT TOOLS //
+// //
+// //
+//////////////////////////////////////////////////
+
+// ------------------------------- BASIC TOOLS ------------------------------
+
+/obj/item/screwdriver/basic
+ name = "basic screwdriver"
+ desc = "Shoddy workmanship, but the tool is fully functional."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "screwdriver_basic"
+ item_state = "screwdriver_basic"
+ toolspeed = 1.1
+ random_color = FALSE
+
+/obj/item/wrench/basic
+ name = "wrench (basic)"
+ desc = "No movable parts, just a simple wrench."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "wrench_basic"
+ item_state = "wrench_basic"
+ toolspeed = 1.2
+
+/obj/item/crowbar/basic
+ name = "crowbar"
+ desc = "Made of poor quality steel and has a rough finish, but it does get the job done."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "crowbar_basic"
+ item_state = "crowbar_basic"
+ toolspeed = 1.5
+
+/obj/item/wirecutters/basic
+ name = "basic wirecutters"
+ desc = "Almost sharp cutters, maded of various bits of scrap metal."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "wirecutters_basic"
+ item_state = "wirecutters_basic"
+ toolspeed = 1.3
+ random_color = FALSE
+
+/obj/item/weldingtool/basic
+ name = "basic welding tool"
+ desc = "Has some small fuel leaks and looks like its just some rusty piece of junk, but somehow it works."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "welder_basic"
+ item_state = "welder_basic"
+ toolspeed = 1.1
+
+
+// ------------------------------- PRE-WAR TOOLS ------------------------------ Idea is not buildable, obviously, and about 50% better than standard tools.
+
+/obj/item/wirecutters/prewar
+ name = "wirecutters (prewar)"
+ desc = "High quality steel and precise mechanism."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "wirecutters_prewar"
+ item_state = "wirecutters_prewar"
+ toolspeed = 0.4
+ random_color = FALSE
+
+/obj/item/wrench/prewar // obsolete due to power drill
+ name = "wrench (prewar)"
+ desc = "An torque locking tool thats very good for wrenching."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "wrench_prewar"
+ item_state = "wrench_prewar"
+ toolspeed = 0.5
+
+/obj/item/screwdriver/prewar
+ name = "screwdriver (prewar)"
+ desc = "Polymer handle, blackened steel finish, its a high-quality tool for sure.""
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "screwdriver_prewar"
+ item_state = "screwdriver_prewar"
+ toolspeed = 0.5
+ random_color = FALSE
+
+/obj/item/crowbar/prewar
+ name = "crowbar (prewar)"
+ desc = "Heat-resistant powder coating, smooth steel surfaces, its a high-quality tool for sure.""
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "crowbar_prewar"
+ item_state = "crowbar_prewar"
+ toolspeed = 0.8
+
+/obj/item/screwdriver/power // obsolete due to power drill
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ icon_state = "drill_screw"
+ item_state = "drill"
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+
+/obj/item/wrench/power
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ icon_state = "drill_bolt"
+ item_state = "drill"
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+
+/obj/item/weldingtool/prewar
+ name = "welding tool (pre-war)"
+ desc = "Comfortable grip, large tank and precise cutting."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "welder_prewar"
+ item_state = "welder_prewar"
+ toolspeed = 0.7
+ max_fuel = 40
+
+/obj/item/metaldetector
+ name = "metal detector"
+ desc = "Detects buried metals in a 50 metre radius when activated."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "metaldetect"
+
+
+
+//////////////////////////////////////////////////
+// //
+// //
+// WORKBENCHES //
+// //
+// //
+//////////////////////////////////////////////////
+
+// ------------ METALWORKING BENCH ------------------
+
+/obj/machinery/workbench/forge // should be repathed to worbench/metal
+ name = "metalworking bench"
+ desc = "A workbench with a drill press, a makeshift blowtorch setup, and various tools for making crude weapons and tools."
+ icon = 'modular_BD2/blacksmith/icons/workbench64x32.dmi'
+ icon_state = "bench_metal"
+
+
+// ------------ WORKBENCH ------------------
+
+/obj/machinery/workbench
+ desc = "A basic workbench with a full set of tools for simple to intermediate projects."
+ icon = 'modular_BD2/general/icons/workbench.dmi'
+ machine_tool_behaviour = list(TOOL_WORKBENCH, TOOL_CROWBAR, TOOL_SCREWDRIVER, TOOL_WIRECUTTER, TOOL_WRENCH)
+ drag_delay = 0.4 SECONDS // Heavy, slow to drag
+
+
+// ------------ ADVANCED WORKBENCH ------------------
+
+/obj/machinery/workbench/advanced
+ desc = "A large and advanced pre-war workbench to tackle any project! Comes with a full set of basic tools and a digital multitool."
+ icon = 'modular_BD2/general/icons/workbench.dmi'
+ machine_tool_behaviour = list(TOOL_AWORKBENCH, TOOL_WORKBENCH, TOOL_CROWBAR, TOOL_SCREWDRIVER, TOOL_WIRECUTTER, TOOL_WRENCH, TOOL_MULTITOOL)
+
+*/
+
+
+//////////////////////////////////////////////////
+// //
+// //
+// STRUCTURES //
+// //
+// //
+//////////////////////////////////////////////////
+
+/* Copied to base code
+
+/obj/structure/closet/crate/basic
+ icon = 'modular_BD2/general/icons/crates.dmi'
+
+// ------------ CRATES ------------------
+
+/obj/structure/closet/crate/wicker
+ icon = 'icons/fallout/farming/farming_tools.dmi'
+ open_sound = 'sound/effects/rustle3.ogg'
+ close_sound = 'sound/effects/rustle3.ogg'
+ material_drop = /obj/item/stack/sheet/hay
+
+/obj/structure/closet/crate/footchest
+ icon = 'modular_BD2/general/icons/crates.dmi'
+ open_sound = 'modular_BD2/sound/creak.ogg'
+ close_sound = 'modular_BD2/sound/creak.ogg'
+ dense_when_open = FALSE
+*/
+
+
+/*
+
+//////////////////////////////////////////////////
+// //
+// //
+// ITEMS //
+// //
+// //
+//////////////////////////////////////////////////
+
+// -------------------- TOOLBOX (PREWAR) ------------------ Meant to be loot possible to find in well preserved high tech places
+
+/obj/item/storage/toolbox/prewar
+ name = "toolbox (pre-war)"
+ desc = "Plastic toolbox, made long ago."
+ icon = 'modular_BD2/general/icons/tools.dmi'
+ righthand_file = 'modular_BD2/general/icons/righthand.dmi'
+ lefthand_file = 'modular_BD2/general/icons/lefthand.dmi'
+ icon_state = "toolbox_prewar"
+ item_state = "toolbox_prewar"
+ custom_materials = list(/datum/material/plastic = 500)
+
+/obj/item/storage/toolbox/prewar/PopulateContents()
+ new /obj/item/crowbar/prewar(src)
+ new /obj/item/wirecutters/prewar(src)
+ new /obj/item/wrench/prewar(src)
+ new /obj/item/weldingtool/prewar(src)
+ new /obj/item/screwdriver/prewar(src)
+ new /obj/item/multitool(src)
+
+
+// ------------------------------- ABRAXO SPRAYBOTTLE ------------------------------
+// Abraxo spray is now made by adding Abraxo to a spray bottle, not taking a pinch of glass and snap your fingers.
+// Abraxo my beloved. Slap it on spray bottle, clean away.
+
+/obj/item/reagent_containers/spray/empty/attackby(obj/item/C, mob/user, params)
+ if(istype(C, /obj/item/crafting/abraxo))
+ user.visible_message("[user] begins filling the[src] with Abraxo solution.", \
+ span_notice("You begin filling he [src] with Abraxo. Smells nice."), \
+ span_italic("You hear faint bubbling sounds."))
+ playsound(get_turf(src), 'modular_BD2/sound/abraxo.ogg', 100, TRUE)
+ if(!do_after(user, 40, TRUE, src))
+ return
+ new /obj/item/reagent_containers/spray/cleaner(drop_location())
+ qdel(src)
+ qdel(C)
+ return
+ return ..()
+
+/obj/item/reagent_containers/spray/empty
+ desc = "A spray bottle, with an unscrewable top. Meant to be filled with Abraxo for superior cleanliness."
+ icon = 'modular_BD2/general/icons/cleaning.dmi'
+
+
+// ------------------------------- MATCHBOX FIX ------------------------------
+
+/obj/item/storage/box/matches/attackby(obj/item/match/W as obj, mob/user as mob, params)
+ if(istype(W, /obj/item/match))
+ if(prob(50))
+ playsound(src, 'sound/f13items/matchstick_hit.ogg', 80, TRUE)
+ return
+ else
+ W.matchignite()
+ playsound(src, 'sound/f13items/matchstick_lit.ogg', 80, TRUE)
+
+
+
+// ------------ CRAFING STACKABLE ICON UPDATERS ------------------
+/obj/item/stack/crafting/update_icon_state()
+ var/amount = get_amount()
+ if(amount <= 5)
+ icon_state = initial(icon_state)
+ else if(amount <= 25)
+ icon_state = "[initial(icon_state)]_2"
+ else
+ icon_state = "[initial(icon_state)]_3"
+
+// Adapted for the specific bullet remnant stacking
+/obj/item/stack/crafting/powder/update_icon_state()
+ var/amount = get_amount()
+ if(amount <= 80)
+ icon_state = initial(icon_state)
+ else if(amount <= 160)
+ icon_state = "[initial(icon_state)]_2"
+ else
+ icon_state = "[initial(icon_state)]_3"
+
+
+// -------------------- CRAFTING RECIPES ------------------
+
+/datum/crafting_recipe/broom
+ name = "Broom"
+ result = /obj/item/broom
+ time = 50
+ reqs = list(/obj/item/stack/sheet/hay = 2,
+ /obj/item/stack/sheet/mineral/wood = 4)
+ category = CAT_CRAFTING
+ subcategory = CAT_TOOL
+
+/datum/crafting_recipe/mop
+ name = "Mop"
+ result = /obj/item/mop
+ time = 50
+ reqs = list(/obj/item/stack/sheet/cloth = 2,
+ /obj/item/stack/sheet/mineral/wood = 4)
+ category = CAT_CRAFTING
+ subcategory = CAT_TOOL
+
+
+// -------------------- ARMOR KIT CUSTOMIZATION ------------------ Because I like slapcrafting and Id like for my shoulder kit to be craftable
+
+/obj/item/clothing/suit/armor/light/kit/attackby(obj/item/C, mob/user, params)
+ if(istype(C, /obj/item/crafting/duct_tape))
+ user.visible_message("[user] begins taping on some punky bits to the the [src].", \
+ span_notice("You begin taping some punkish item on the [src]."), \
+ span_italic("You hear someone tape stuff together."))
+ playsound(src, 'sound/f13items/craft_2.ogg', 100, TRUE)
+ if(!do_after(user, 40, TRUE, src))
+ return
+ new /obj/item/clothing/suit/armor/light/kit/punk(drop_location())
+ qdel(src)
+ qdel(C)
+ return
+ if(istype(C, /obj/item/stack/sheet/metal))
+ user.visible_message("[user] begins adding metal sheet to the the [src].", \
+ span_notice("You begin attaching some metal sheet on the [src]."), \
+ span_italic("You hear grunts as someone tries to bend metal with their hands."))
+ playsound(src, 'sound/f13items/craft_2.ogg', 100, TRUE)
+ if(!do_after(user, 40, TRUE, src))
+ return
+ new /obj/item/clothing/suit/armor/light/kit/plates(drop_location())
+ qdel(src)
+ C.use(1)
+ return
+ if(C.tool_behaviour == TOOL_WIRECUTTER)
+ user.visible_message("[user] begins cutting new straps to wear [src] differently.", \
+ span_notice("You begin cutting straps and readjusting the [src]."), \
+ span_italic("You hear the snips of a wirecutter on fabric."))
+ playsound(src, 'sound/weapons/slice.ogg', 50, TRUE)
+ if(!do_after(user, 40, TRUE, src))
+ return
+ new /obj/item/clothing/suit/armor/light/kit/shoulder(drop_location())
+ qdel(src)
+ return
+ return ..()
+
+
+// -------------------- HAIR & BEARDS ------------------
+Files edited to make the new hair icon set work:
+species.dm adjusted for new hair an beard suffixes + changed names.
+hair_head.dm
+hair_face.dm
+*/
+
+/obj/structure/rack/shelf_wood
+ name = "BUGGED VERSION, MURDER"
+ desc = "NO!!!."
+
+// TEMP FOR PORTING AND FUNCTIOANLITY
+
+// ------------------------ STRAIGHT RAZOR ------------------------------- // Pebbles straight razor. It borrows the razor code, edits some timers, adds sounds and slaps it on a melee weapon.
+/obj/item/melee/onehanded/straight_razor
+ name = "straight razor"
+ desc = "For those smooth close shaves. Better aim for the mouth or the head, or else things might get messy. Could be used as a scalpel in a pinch."
+ icon = 'modular_BD2/fashion/icons/cosmetics.dmi'
+ righthand_file = 'modular_BD2/fashion/icons/onmobright.dmi'
+ lefthand_file = 'modular_BD2/fashion/icons/onmobleft.dmi'
+ icon_state = "straight_razor"
+ force = WEAPON_FORCE_BIG_TOOL
+ throwforce = THROWING_PATHETIC
+ wound_bonus = WOUNDING_MALUS_SHALLOW // crap against armor
+ bare_wound_bonus = WOUNDING_BONUS_BIG // bleeds a lot, despite its low damage
+ sharpness = SHARP_EDGED
+ total_mass = TOTAL_MASS_TINY_ITEM
+ w_class = WEIGHT_CLASS_TINY
+ tool_behaviour = TOOL_SCALPEL //ghetto surgery yay
+ toolspeed = 1.2
+
+/obj/item/melee/onehanded/straight_razor/proc/manual_shave(mob/living/carbon/human/H, location = BODY_ZONE_PRECISE_MOUTH)
+ if(location == BODY_ZONE_PRECISE_MOUTH)
+ H.facial_hair_style = "Clean shave (Hairless)"
+ else
+ H.hair_style = "Skinhead"
+
+ H.update_hair()
+
+/obj/item/melee/onehanded/straight_razor/attack(mob/M, mob/user)
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ var/location = user.zone_selected
+ if((location in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_HEAD)) && !H.get_bodypart(BODY_ZONE_HEAD))
+ to_chat(user, span_warning("[H] doesn't have a head!"))
+ return
+ if(location == BODY_ZONE_PRECISE_MOUTH)
+ if(!(FACEHAIR in H.dna.species.species_traits))
+ to_chat(user, span_warning("There is no facial hair to shave!"))
+ return
+ if(!get_location_accessible(H, location))
+ to_chat(user, span_warning("The mask is in the way!"))
+ return
+ if(H.facial_hair_style == "Clean shave (Hairless)")
+ to_chat(user, span_warning("Already clean-shaven!"))
+ return
+
+ if(H == user) //shaving yourself
+ playsound(loc, 'modular_BD2/fashion/sound/shaving.ogg', 100, 1) // added
+ user.visible_message("[user] starts to shave [user.p_their()] facial hair with [src].", \
+ span_notice("You take a moment to shave your facial hair with [src]..."))
+ if(do_after(user, 150, target = H))
+ user.visible_message("[user] shaves [user.p_their()] facial hair clean with [src].", \
+ span_notice("You finish shaving with [src]. Fast and clean!"))
+ manual_shave(H, location)
+ else
+ var/turf/H_loc = H.loc
+ playsound(loc, 'modular_BD2/fashion/sound/shaving.ogg', 100, 1) // added
+ user.visible_message(span_warning("[user] tries to shave [H]'s facial hair with [src]."), \
+ span_notice("You start shaving [H]'s facial hair..."))
+ if(do_after(user, 100, target = H))
+ if(H_loc == H.loc)
+ user.visible_message(span_warning("[user] shaves off [H]'s facial hair with [src]."), \
+ span_notice("You shave [H]'s facial hair clean off."))
+ manual_shave(H, location)
+
+ else if(location == BODY_ZONE_HEAD)
+ if(!(HAIR in H.dna.species.species_traits))
+ to_chat(user, span_warning("There is no hair to shave!"))
+ return
+ if(!get_location_accessible(H, location))
+ to_chat(user, span_warning("The headgear is in the way!"))
+ return
+ if(H.hair_style == "Bald" || H.hair_style == "Mature (Balding)" || H.hair_style == "Clean shave (Hairless)")
+ to_chat(user, span_warning("There is not enough hair left to shave!"))
+ return
+
+ if(H == user) //shaving yourself
+ playsound(loc, 'modular_BD2/fashion/sound/shaving.ogg', 100, 1) // added
+ user.visible_message("[user] starts to shave [user.p_their()] head with [src].", \
+ span_notice("You start to shave your head with [src]..."))
+ if(do_after(user, 150, target = H)) //edited time
+ user.visible_message("[user] shaves [user.p_their()] head with [src].", \
+ span_notice("You finish shaving with [src]."))
+ manual_shave(H, location)
+ else
+ var/turf/H_loc = H.loc
+ playsound(loc, 'modular_BD2/fashion/sound/shaving.ogg', 100, 1) // added
+ user.visible_message(span_warning("[user] tries to shave [H]'s head with [src]!"), \
+ span_notice("You start shaving [H]'s head..."))
+ if(do_after(user, 150, target = H)) //edited time
+ if(H_loc == H.loc)
+ user.visible_message(span_warning("[user] shaves [H]'s head bald with [src]!"), \
+ span_notice("You shave [H]'s head bald."))
+ manual_shave(H, location)
+ else
+ ..()
+ else
+ ..()
+
+
+//////////////////////////////////////////
+// //
+// //
+// PRIMITIVE MEDICAL //
+// //
+// //
+//////////////////////////////////////////
+
+// ------------------- BUTCHERS TABLE -----------------------------
+
+/obj/structure/table/optable/primitive
+ name = "butchers table"
+ desc = "Used for painful, primitive medical procedures."
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+
+
+// ------------------- PRIMITIVE SURGERY STUFF ----------------------------- Could use more janky ghetto stuff feeling, messing about in the wound datums maybe or whatnot. Currently basically reskins with a bit slower speed.
+
+/obj/item/cautery/primitive
+ name = "primitive cautery"
+ desc = "A welding device tuned down to cauterize wounds. Not very precise."
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "cautery_primitive"
+ toolspeed = 1.5
+
+/obj/item/circular_saw/primitive
+ name = "handsaw"
+ desc = "For sawing through wood or possibly bones."
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ icon_state = "saw"
+ item_state = "saw"
+ lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
+ hitsound = 'sound/effects/shovel_dig.ogg'
+ usesound = 'sound/effects/shovel_dig.ogg'
+ custom_materials = list(/datum/material/iron=2000)
+ toolspeed = 1.2
+ wound_bonus = 0
+ bare_wound_bonus = 10
+ attack_verb = list("sawed", "scratched")
+
+/obj/item/stack/medical/bone_gel/superglue
+ name = "superglue (bonegel)"
+ singular_name = "superglue"
+ desc = "Good for gluing together broken bones!"
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ icon_state = "superglue"
+ lefthand_file = NONE
+ righthand_file = NONE
+ grind_results = NONE
+
+/obj/item/reagent_containers/medspray/sterilizine/honey
+ name = "medical honey (sterilizer)"
+ desc = "Pure honey has antiseptic properties, and probably works just as a sterilizing agent."
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ icon_state = "sterilizer_honey"
+ apply_method = "smear"
+// sound_squirt = 'modular_BD2/general/sound/honey.ogg' FIX LATER MARKED FOR DEATH
+
+/* Added to base code
+sound_squirt
+Added to proc/attempt_spray
+ playsound(src, sound_squirt, 50, 1, -6)
+*/
+
+// ------------------- PRIMITIVE MEDICAL BAG -----------------------------
+
+/obj/item/storage/backpack/duffelbag/med/surgery/primitive
+ name = "surgical duffel bag"
+ desc = "A large duffel bag for holding extra medical supplies - this one seems to be designed for holding surgical tools."
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "toolbag_primitive"
+
+/obj/item/storage/backpack/duffelbag/med/surgery/primitive/PopulateContents()
+ new /obj/item/melee/onehanded/straight_razor(src)
+ new /obj/item/hemostat/tribal(src)
+ new /obj/item/retractor/tribal(src)
+ new /obj/item/circular_saw/primitive(src)
+ new /obj/item/cautery/primitive(src)
+ new /obj/item/bonesetter(src)
+ new /obj/item/bedsheet/blanket(src)
+ new /obj/item/reagent_containers/medspray/sterilizine/honey(src)
+ new /obj/item/stack/sticky_tape/surgical(src)
+ new /obj/item/stack/medical/bone_gel/superglue(src)
+
+/obj/item/storage/backpack/duffelbag/med/surgery/primitive/anchored
+ name = "surgical toolset"
+ desc = "Large piece of felt with various surgical tools laid out."
+ icon_state = "surgicalset_primitive"
+ anchored = TRUE
+
+
+// ------------------- PRIMITIVE IV DRIP -----------------------------
+
+/obj/machinery/iv_drip/primitive
+ name = "wooden IV drip"
+ desc = "Simple frame for infusing liquids using gravity. Can't suck out fluids."
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ anchored = TRUE
+ plane = GAME_PLANE
+
+/*
+/obj/machinery/iv_drip/verb/toggle_mode() updated
+added this to make the overlay actually work
+ var/mutable_appearance/filling_overlay = mutable_appearance('modular_BD2/icons/primitive_medical.dmi', "reagent")
+*/
+
+
+// ------------------- PRIMITIVE DEFIB MOUNT -----------------------------
+
+/obj/machinery/defibrillator_mount/primitive
+ desc = "Holds a primitive defibrillator."
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ icon_state = "defibrillator_mount"
+ density = FALSE
+ use_power = FALSE
+ clamps_locked = TRUE
+ plane = GAME_PLANE
+
+/obj/machinery/defibrillator_mount/primitive/Initialize() //loaded subtype for mapping use
+ . = ..()
+ defib = new/obj/item/defibrillator/primitive(src)
+ update_overlays()
+
+
+// ------------------- PRIMITIVE MEDICAL TOOLBELT -----------------------------
+
+obj/item/storage/belt/medical/primitive
+ name = "primitive medical toolbelt"
+ desc = "This might look a bit like a toolbelt for a carpenter, but the items inside are meant to be used in surgery. No really."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "belt_blacksmith"
+ item_state = "belt_blacksmith"
+
+/obj/item/storage/belt/medical/primitive/PopulateContents()
+ new /obj/item/surgical_drapes(src)
+ new /obj/item/melee/onehanded/straight_razor(src)
+ new /obj/item/circular_saw/primitive(src)
+ new /obj/item/retractor/tribal(src)
+ new /obj/item/hemostat/tribal(src)
+ new /obj/item/cautery/primitive(src)
+ new /obj/item/bonesetter(src)
+
+/obj/item/hemostat/tribal
+ name = "primitive hemostat (flesh-poker)"
+ desc = "A pinching device made from bone to clamp bleedings with"
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ icon_state = "hemostat_primitive"
+
+/obj/item/retractor/tribal
+ name = "primitive retractor (skin-puller)"
+ desc = "Pries the flesh and bones open."
+ icon = 'modular_BD2/general/icons/primitive_medical.dmi'
+ icon_state = "retractor_primitive"
+
diff --git a/modular_BD2/general/icons/alchemy.dmi b/modular_BD2/general/icons/alchemy.dmi
new file mode 100644
index 00000000000..5ee4427505c
Binary files /dev/null and b/modular_BD2/general/icons/alchemy.dmi differ
diff --git a/modular_BD2/general/icons/autolathe_military.dmi b/modular_BD2/general/icons/autolathe_military.dmi
new file mode 100644
index 00000000000..f4b2edaddda
Binary files /dev/null and b/modular_BD2/general/icons/autolathe_military.dmi differ
diff --git a/modular_BD2/general/icons/autolathe_primitive.dmi b/modular_BD2/general/icons/autolathe_primitive.dmi
new file mode 100644
index 00000000000..07807f80b3b
Binary files /dev/null and b/modular_BD2/general/icons/autolathe_primitive.dmi differ
diff --git a/modular_BD2/general/icons/door_barred.dmi b/modular_BD2/general/icons/door_barred.dmi
new file mode 100644
index 00000000000..a47b46fdde3
Binary files /dev/null and b/modular_BD2/general/icons/door_barred.dmi differ
diff --git a/modular_BD2/general/icons/primitive_medical.dmi b/modular_BD2/general/icons/primitive_medical.dmi
new file mode 100644
index 00000000000..54976d5dc96
Binary files /dev/null and b/modular_BD2/general/icons/primitive_medical.dmi differ
diff --git a/modular_BD2/general/icons/stackable_items.dmi b/modular_BD2/general/icons/stackable_items.dmi
new file mode 100644
index 00000000000..58bd8e34276
Binary files /dev/null and b/modular_BD2/general/icons/stackable_items.dmi differ
diff --git a/modular_BD2/general/icons/tileset_gravel.dmi b/modular_BD2/general/icons/tileset_gravel.dmi
new file mode 100644
index 00000000000..ecbeca29802
Binary files /dev/null and b/modular_BD2/general/icons/tileset_gravel.dmi differ
diff --git a/modular_BD2/general/icons/tileset_sonora.dmi b/modular_BD2/general/icons/tileset_sonora.dmi
new file mode 100644
index 00000000000..e7ae0e6fd4c
Binary files /dev/null and b/modular_BD2/general/icons/tileset_sonora.dmi differ
diff --git a/modular_BD2/general/sound/abraxo.ogg b/modular_BD2/general/sound/abraxo.ogg
new file mode 100644
index 00000000000..45640e91c38
Binary files /dev/null and b/modular_BD2/general/sound/abraxo.ogg differ
diff --git a/modular_BD2/general/sound/creak.ogg b/modular_BD2/general/sound/creak.ogg
new file mode 100644
index 00000000000..017c94e2d1e
Binary files /dev/null and b/modular_BD2/general/sound/creak.ogg differ
diff --git a/modular_BD2/general/sound/doorchainsoft_close.ogg b/modular_BD2/general/sound/doorchainsoft_close.ogg
new file mode 100644
index 00000000000..22ec134833d
Binary files /dev/null and b/modular_BD2/general/sound/doorchainsoft_close.ogg differ
diff --git a/modular_BD2/general/sound/doorchainsoft_open.ogg b/modular_BD2/general/sound/doorchainsoft_open.ogg
new file mode 100644
index 00000000000..f12c402e1ba
Binary files /dev/null and b/modular_BD2/general/sound/doorchainsoft_open.ogg differ
diff --git a/modular_BD2/general/sound/honey.ogg b/modular_BD2/general/sound/honey.ogg
new file mode 100644
index 00000000000..d72e48177da
Binary files /dev/null and b/modular_BD2/general/sound/honey.ogg differ
diff --git a/modular_BD2/legio_invicta/README.md b/modular_BD2/legio_invicta/README.md
new file mode 100644
index 00000000000..d22031a5025
--- /dev/null
+++ b/modular_BD2/legio_invicta/README.md
@@ -0,0 +1,22 @@
+# Legio Invicta v.1.0
+
+## Who made this module?
+Pebbles the 2nd. Credits at the end.
+
+## What is this module?
+Legion art/assets, to improve quality and make maintaining it easier.
+
+Core principles:
+- Icon, onmob sprites, inhands for all items, palette created and enforced, focus on the final coordinated appearance, not each item in a vacuum.
+
+## Is it complete?
+Its as complete as I ever will make it, its my last thing I do for FO13 so enjoy.
+
+## Who dunnit
+Vast majority of the content are my orignals, a portion is originally based on legacy concepts though, like the bandana general design, the base legion tunic also has to be included here.
+
+* The Legion cloak is based on a existing sprite and re-uses parts of two different sprites. Credit for the concept goes to the creators, who I sadly do not know the name of.
+* couple melee weapons borrowing partly from legacy in either onmobs or icon (goliath icon partly, thermic lance onmob almost unchanged)
+* medallions, legion belt, bandanas, leather boots, legion mantle based on legacy art, medallions and mantle borrows the most.
+* 100& original (rugged holster, rocket hammer, ripper, spatha, gladius, machete, lawnmower machete, lance, training machete, marching satchel, survival package, medical kit, goggles, plated & fingerless gloves, plated boots, armors: recruit, prime, veteran, vex, praetorian, helmets: recruit, prime, vet, vex). Some are upgrades of my old stuff, reused a couple solutions I used on my khan spriteset for example.
+* Vex helmet onmob reuses much of the legacy sprite, leather sandals too, even if onmob very different
diff --git a/modular_BD2/legio_invicta/code/legio_invicta.dm b/modular_BD2/legio_invicta/code/legio_invicta.dm
new file mode 100644
index 00000000000..97aa07ad21d
--- /dev/null
+++ b/modular_BD2/legio_invicta/code/legio_invicta.dm
@@ -0,0 +1,1273 @@
+// This file basically redirects the art here without changing the rest of the values. If you reformat the armors or something obviously you will need to copy these paths to the new items for the correct art to display.
+// Commented out stuff has been edited in the base files to redirect the art already.
+
+
+// --------------------- ID & MEDALLIONS -------------------------
+
+// /obj/item/card/id/dogtag/legrecruit obsolete
+/obj/item/card/id/dogtag/legion
+ name = "recruit medallion"
+ desc = "A cheap metal disc stamped with the Legion's bull insignia."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "medallion_recruit"
+ item_state = null
+ assignment = "recruit medallion"
+
+// /obj/item/card/id/dogtag/legprime obsolete
+/obj/item/card/id/dogtag/legion/prime
+ name = "prime medallion"
+ desc = "A silver disc stamped with the Legion's bull insignia."
+ icon_state = "medallion_prime"
+ assignment = "prime medallion"
+
+// /obj/item/card/id/dogtag/legveteran obsolete
+/obj/item/card/id/dogtag/legion/veteran
+ name = "veteran medallion"
+ desc = "A silver disc stamped with the Legion's bull insignia and red honorific markings."
+ icon_state = "medallion_veteran"
+ assignment = "veteran medallion"
+
+// -/obj/item/card/id/dogtag/legcenturion obsolete
+/obj/item/card/id/dogtag/legion/centurion
+ name = "centurion medallion"
+ desc = "A golden disc awarded to the most fierce men in the whole legion. If you are close enough to read the insignia you won't be alive much longer."
+ icon_state = "medallion_centurion"
+ assignment = "centurion medallion"
+
+// /obj/item/card/id/dogtag/legforgemaster obsolete
+/obj/item/card/id/dogtag/legion/follower
+ name = "camp follower medallion"
+ desc = "A silver disc stamped with the Legion's Bull insignia."
+ icon_state = "medallion_recruit"
+ assignment = "camp follower medallion"
+
+// /obj/item/card/id/dogtag/legauxilia obsolete
+/obj/item/card/id/dogtag/legion/follower/auxilia
+ name = "auxilia medallion"
+ desc = "A silver disc stamped with the Legion's Bull insignia."
+ icon_state = "medallion_prime"
+ assignment = "auxilia medallion"
+
+// /obj/item/card/id/dogtag/legorator obsolete
+/obj/item/card/id/dogtag/legion/orator
+ name = "orator medallion"
+ desc = "A golden disc awarded to the one who is a dedicated ambassador for Caesar's Legion."
+ icon_state = "medallion_centurion"
+ assignment = "orator medallion"
+
+/obj/item/card/id/dogtag/legion/offduty
+ name = "off-duty medallion"
+ desc = "The wearer is free from his military duties this week."
+
+
+// - /obj/item/card/id/legionbrand obsolete
+/obj/item/card/id/legion_slave
+ name = "Legion slave brand"
+ desc = "Property of the Legion. Burned into the flesh with a cattle-iron."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "brand_slave"
+ assignment = "Slave brand"
+ uses_overlays = FALSE
+
+/obj/item/card/id/legion_slave/Initialize()
+ . = ..()
+ ADD_TRAIT(src, TRAIT_NODROP, TRAIT_GENERIC)
+
+// obsolete /obj/item/card/id/rusted/rustedmedallion
+/obj/item/card/id/rusted/legion_exile
+ name = "rusted medallion"
+ desc = "This Legion medallion is rusted and worn, kept as a memento."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "medallion_exile"
+
+
+// --------------------- GLOVES -----------------------------
+/* Already copied to main
+/obj/item/clothing/gloves/legion
+ name = "fingerless gloves"
+ desc = "Improves the grip on a machete even when slick with blood, widely used by Legion warriors."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "gloves_fingerless"
+ item_state = "gloves_fingerless"
+
+/obj/item/clothing/gloves/legion/plated
+ name = "plated gloves"
+ desc = "Leather gloves with metal reinforcements."
+ icon_state = "gloves_plated"
+ item_state = "gloves_plated"
+*/
+
+
+// --------------------- BANDANA -----------------------------
+
+/obj/item/clothing/mask/bandana/legion
+ name = "red bandana"
+ desc = "Simple cloth bandana dyed red. Very common in the Legion."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "bandana_legion"
+ flags_inv = HIDEFACE
+ visor_flags_inv = HIDEFACE
+ adjusted_flags = null
+ actions_types = list(/datum/action/item_action/adjust)
+
+// /obj/item/clothing/mask/bandana/legion/legrecruit obsolete
+/obj/item/clothing/mask/bandana/legion/recruit
+ name = "recruit bandana"
+ desc = "Bandana made from cheap cloth."
+ icon_state = "bandana_recruit"
+
+// /obj/item/clothing/mask/bandana/legion/camp obsolete
+/obj/item/clothing/mask/bandana/legion/dark
+ name = "dark bandana"
+ desc = "Plain cotton bandana."
+ icon_state = "bandana_dark"
+
+/obj/item/clothing/mask/bandana/legion/centurion
+ name = "centurions bandana"
+ desc = "Made from fine cloth with a distinctive pattern."
+ icon_state = "bandana_centurion"
+
+
+
+// ------------------- GOGGLES -----------------------------
+
+// Polarizing goggles. togglable, Nightvision goggles basically
+/obj/item/clothing/glasses/night/polarizing // possibly it would be better to make this just flash protect or such, and keep NVG to NVG looking goggle thingies. Dunno.
+ name = "polarizing goggles"
+ desc = "Fancy goggles with rare polarizing glass from some old cache, usually reserved for commanders."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "goggles_polarizing"
+ item_state = "goggles_polarizing"
+ darkness_view = 12
+ lighting_alpha = LIGHTING_PLANE_ALPHA_NV_TRAIT
+ glass_colour_type = /datum/client_colour/glass_colour/lightorange
+ actions_types = list(/datum/action/item_action/toggle)
+ visor_flags_inv = HIDEEYES
+ visor_flags_cover = MASKCOVERSEYES
+ visor_vars_to_toggle = VISOR_TINT | VISOR_DARKNESSVIEW
+ alternate_worn_layer = (HEAD_LAYER-0.1) // so its not hidden
+
+/obj/item/clothing/glasses/night/polarizing/attack_self(mob/user)
+ weldingvisortoggle(user)
+
+// /obj/item/clothing/glasses/legiongoggles obsolete. Togglable, gives some slight environment armor bonus I believe.
+/obj/item/clothing/glasses/f13/goggles_sandstorm
+ name = "sandstorm goggles"
+ desc = "Simple, tight-fitting goggles that protect your eyes from dust and sand."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "goggles"
+ item_state = "goggles"
+ toggle_message = "You pull down the"
+ alt_toggle_message = "You push up the"
+ actions_types = list(/datum/action/item_action/toggle)
+ visor_flags_inv = HIDEEYES
+ visor_flags_cover = MASKCOVERSEYES
+ visor_vars_to_toggle = VISOR_TINT | VISOR_DARKNESSVIEW
+ alternate_worn_layer = (HEAD_LAYER-0.1) // so its not hidden
+
+/obj/item/clothing/glasses/f13/goggles_sandstorm/attack_self(mob/user)
+ weldingvisortoggle(user)
+
+
+// ------------------- BELT -----------------------------
+
+/obj/item/storage/belt/military/legion
+ name = "legion marching belt"
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "belt_legion"
+ item_state = "belt_legion"
+
+
+// ------------------- WEAPONS -----------------------------
+
+/* Already copied to main
+/obj/item/melee/onehanded/machete
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/beltslot.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "machete_lawnmower"
+ item_state = "machete_lawnmower"
+
+/obj/item/melee/onehanded/machete/spatha
+/obj/item/melee/onehanded/machete/gladius
+/obj/item/melee/onehanded/machete/training
+
+/obj/item/melee/onehanded/machete/forgedmachete
+ icon_state = "machete"
+ item_state = "machete"
+
+/obj/item/twohanded/sledgehammer/supersledge
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/backslot.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+
+/obj/item/twohanded/spear/lance
+ name = "legion lance"
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/64x64_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/64x64_lefthand.dmi'
+ icon_state = "lance"
+ icon_prefix = "lance"
+ wielded_icon = "lance_wield"
+ inhand_x_dimension = 64
+ inhand_y_dimension = 64
+
+/obj/item/melee/unarmed/powerfist/goliath
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+
+/obj/item/twohanded/thermic_lance
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/backslot.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/64x64_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/64x64_lefthand.dmi'
+
+/obj/item/twohanded/sledgehammer/rockethammer
+/obj/item/twohanded/fireaxe
+/obj/item/melee/powered/ripper
+
+/obj/item/twohanded/chainsaw
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/backslot.dmi'
+
+/obj/item/clothing/glasses/f13/sunglasses
+ name = "sunglasses"
+ desc = "Makes the strong desert sun a lot more bearable. Some protection against blinding lights is a bonus."
+ icon = 'icons/fallout/clothing/glasses.dmi'
+ icon_state = "sun"
+ item_state = "sunglasses"
+ darkness_view = 1
+ flash_protect = 1
+ tint = 1
+ glass_colour_type = /datum/client_colour/glass_colour/gray
+
+/obj/item/clothing/glasses/f13/sunglasses/big
+ icon_state = "bigsunglasses"
+ item_state = "bigsunglasses"
+ layer = (FACEMASK_LAYER-0.1) // only reason for this is to make it look good over bandana masks.
+ alternate_worn_layer = (FACEMASK_LAYER-0.1)
+*/
+
+
+
+
+// ------------------- APRONS & MANTLES -----------------------------
+// same as medical apron but visually unique
+/obj/item/clothing/neck/apron/medicus_legion
+ name = "medicus apron"
+ desc = "Waxed cotton apron with a red bull on it. Marks the wearer as a healer following the wisdom of Caesar. Has pockets for some small medical equipment."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "apron_medicus"
+ pocket_storage_component_path = /datum/component/storage/concrete/pockets/medical
+
+// same as normal labor apron but visually unique
+/obj/item/clothing/neck/apron/labor/blacksmith_legion
+ name = "blacksmith's apron"
+ desc = "A heavy leather apron designed for protecting the user when metalforging and help carry some minor tools. Marked with a yellow bull."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "apron_blacksmith"
+ pocket_storage_component_path = /datum/component/storage/concrete/pockets/small
+/*
+/obj/item/clothing/neck/mantle/legion/treasurer
+ name = "treasurers mantle"
+ desc = "The grey and black mantle with gold thread trimming shows the wearer is entrusted with matters of money and records. Hidden inner pockets can store money, keys and documents safely, and a discrete sheath for a knife for self defence is also attached."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "mantle_treasurer"
+ item_state = "mantle_treasurer"
+ pocket_storage_component_path = /datum/component/storage/concrete/pockets/treasurer
+*/
+
+// Mantle for the Orator, also works as a holster since it occupies the accessory slot
+/obj/item/clothing/neck/mantle/legion
+ name = "legion mantle"
+ desc = "A bull flag adapted to be worn, a honor not given to every warrior. Comes with a holster for a handgun."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "mantle_legion"
+ item_state = "mantle_legion"
+ layer = NECK_LAYER
+
+/obj/item/clothing/neck/mantle/legion/ComponentInitialize()
+ . = ..()
+ var/datum/component/storage/STR = GetComponent(/datum/component/storage)
+ STR.max_items = 1
+ STR.max_w_class = WEIGHT_CLASS_NORMAL
+ STR.can_hold = typecacheof(list(
+ /obj/item/gun/ballistic/automatic/pistol,
+ /obj/item/gun/ballistic/revolver,
+ /obj/item/gun/energy/laser/solar,
+ /obj/item/gun/energy/laser/pistol,
+ /obj/item/gun/energy/laser/plasma/pistol,
+ /obj/item/gun/energy/laser/plasma/glock,
+ /obj/item/gun/energy/laser/plasma/glock/extended,
+ /obj/item/gun/energy/laser/wattz,
+ /obj/item/gun/energy/laser/wattz/magneto,
+ ))
+
+
+// ------------------- KITS & BAGS & HOLSTERS -----------------------------
+
+// Ration package is a paper container for food/misc survival stuff
+/obj/item/storage/survivalkit/legion_rations
+ name = "ration package"
+ desc = "Waxed paper package with food and some minor accessories a warrior might need."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "survival_legion"
+
+/obj/item/storage/survivalkit/legion_rations/PopulateContents()
+ new /obj/item/storage/box/matches(src)
+ new /obj/item/reagent_containers/food/snacks/meatsalted(src)
+ new /obj/item/reagent_containers/food/snacks/breadhard(src)
+ new /obj/item/reagent_containers/food/drinks/flask/survival(src)
+
+// proc to make the quiver look empty when empty
+/obj/item/storage/survivalkit/legion_rations/update_icon_state()
+ . = ..()
+ if(!contents.len)
+ icon_state = "[icon_state]_empty"
+ else
+ icon_state = initial(icon_state)
+
+// Leather pouch for medicines
+/obj/item/storage/survivalkit/medical/legion
+ name = "medicine bag"
+ desc = "Medical kit compliant with the laws of Caesar."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "survival_medical"
+
+/obj/item/storage/survivalkit/medical/legion/PopulateContents()
+ new /obj/item/stack/medical/gauze/improvised(src)
+ new /obj/item/stack/medical/suture(src)
+ new /obj/item/stack/medical/mesh/aloe(src)
+ new /obj/item/reagent_containers/pill/patch/healpoultice(src)
+
+// proc to make the quiver look empty when empty
+/obj/item/storage/survivalkit/medical/legion/update_icon_state()
+ . = ..()
+ if(!contents.len)
+ icon_state = "[icon_state]_empty"
+ else
+ icon_state = initial(icon_state)
+
+/obj/item/storage/survivalkit/medical/legion/advanced
+ desc = "Medical kit compliant with the laws of Caesar, of higher than average quality."
+
+/obj/item/storage/survivalkit/medical/legion/adv/PopulateContents()
+ new /obj/item/stack/medical/gauze(src)
+ new /obj/item/stack/medical/suture(src)
+ new /obj/item/stack/medical/mesh(src)
+ new /obj/item/reagent_containers/pill/bitterdrink(src)
+
+// new satchel style that doesnt clutter up the mob so much
+/obj/item/storage/backpack/marching_satchel
+ name = "marching satchel"
+ desc = "A sturdy leather bag attacked to the belt, for carrying necessary supplies."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "satchel_marching"
+ item_state = "satchel_marching"
+
+/obj/item/storage/backpack/marching_satchel/update_icon_state()
+ . = ..()
+ if(!contents.len)
+ icon_state = "[icon_state]_empty"
+ else
+ icon_state = initial(icon_state)
+
+// new style of holsters that show when occupied
+/obj/item/storage/belt/holster/rugged // some sort of overlay system for the filled holsters would be better naturally but lack the time to figure it out.
+ name = "rugged holster"
+ desc = "A plain holster for a revolver."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "holster_rugged"
+ item_state = "holster_rugged"
+
+// proc to make the holster look empty when empty
+/obj/item/storage/belt/holster/rugged/update_icon_state()
+ . = ..()
+ if(!contents.len)
+ icon_state = "[icon_state]_empty"
+ else
+ icon_state = initial(icon_state)
+
+// some prefilled holsters
+/obj/item/storage/belt/holster/rugged/revolver_357
+ icon_state = "holster_rugged"
+
+/obj/item/storage/belt/holster/rugged/revolver_357/PopulateContents()
+ new /obj/item/gun/ballistic/revolver/colt357(src)
+
+/obj/item/storage/belt/holster/rugged/revolver_45
+ icon_state = "holster_rugged_45"
+
+/obj/item/storage/belt/holster/rugged/revolver_45/PopulateContents()
+ new /obj/item/gun/ballistic/revolver/revolver45(src)
+
+/obj/item/storage/belt/holster/rugged/revolver_hunting
+ icon_state = "holster_rugged_hunting"
+
+/obj/item/storage/belt/holster/rugged/revolver_hunting/PopulateContents()
+ new /obj/item/gun/ballistic/revolver/hunting(src)
+
+/* copy pasted to base files
+/obj/item/storage/belt/utility/waster
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "belt_blacksmith"
+ item_state = "belt_blacksmith"
+
+/obj/item/storage/backpack/spearquiver
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+*/
+
+// proc to make the quiver look empty when empty
+/obj/item/storage/backpack/spearquiver/update_icon_state()
+ . = ..()
+ if(!contents.len)
+ icon_state = "[icon_state]_empty"
+ else
+ icon_state = initial(icon_state)
+
+
+// ------------------- CRAFTING -----------------------------
+
+/datum/crafting_recipe/blacksmith/smithed_armor_legion
+ name = "Legion metal armor set"
+ result = /obj/item/clothing/suit/armor/heavy/metal/smithed/legion
+ reqs = list(
+ /obj/item/smithing/armor_piece = 2,
+ /obj/item/stack/sheet/leather = 2,
+ )
+ time = 200
+ tools = list(TOOL_FORGE)
+ category = CAT_CRAFTING
+ subcategory = CAT_FORGING
+ always_available = FALSE
+
+
+
+//////////////////////////////////////////
+// //
+// //
+// ARMOR //
+// //
+// //
+//////////////////////////////////////////
+
+// ------------------- SUIT -----------------------------
+
+/obj/item/clothing/suit/armor/light/legion
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+
+
+/obj/item/clothing/suit/armor/light/legion/recruit
+ icon_state = "armor_recruit"
+
+/obj/item/clothing/suit/armor/light/legion/prime
+ icon_state = "armor_prime"
+
+/obj/item/clothing/suit/armor/light/legion/explorer
+ icon_state = "armor_explorer"
+
+/obj/item/clothing/suit/armor/medium/legion
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+
+/obj/item/clothing/suit/armor/medium/legion/vet
+ icon_state = "armor_veteran"
+
+/obj/item/clothing/suit/armor/medium/legion/vexil
+ icon_state = "armor_vexillarius"
+
+/obj/item/clothing/suit/armor/medium/legion/orator
+ name = "legion orator armor"
+ desc = "Similar in style to the armor praetorians wear."
+ icon_state = "armor_praetorian"
+/* Not ready yet
+/obj/item/clothing/suit/armor/medium/legion/centurion
+ icon_state = "armor_centurion"
+
+/obj/item/clothing/suit/armor/medium/legion/rangercent
+ icon_state = "armor_rangerhunter"
+
+/obj/item/clothing/suit/armor/heavy/legion
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+
+/obj/item/clothing/suit/armor/heavy/legion/palacent
+ icon_state = "armor_paladinslayer"
+
+/obj/item/clothing/suit/armor/heavy/legion/legate
+ icon_state = "armor_legate"
+*/
+/obj/item/clothing/suit/armor/heavy/metal/smithed/legion
+ name = "smithed legion armor"
+ desc = "A set of plates with leather straps, protecting some vital areas. This one is combined with football shoulder pads and marked with the red X of Caesars Legion."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "armor_smithed"
+ item_state = "armor_smithed"
+
+
+// ------------------- HELMETS -----------------------------
+
+/obj/item/clothing/head/helmet/f13/legion
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+
+/obj/item/clothing/head/f13/servant
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ icon_state = "hat_servant"
+ item_state = "hat_servant"
+ dynamic_hair_suffix = "+generic"
+ flags_inv = null
+ flags_cover = null
+
+/obj/item/clothing/head/f13/servant/auxilia
+ name = "auxilia headwear"
+ desc = "A soft red cap with a black band, used by Auxilia outside camp."
+ icon_state = "hat_auxilia"
+ item_state = "hat_auxilia"
+
+/obj/item/clothing/head/helmet/f13/legion/recruit
+ icon_state = "helmet_recruit"
+
+/obj/item/clothing/head/helmet/f13/legion/prime
+ icon_state = "helmet_prime"
+
+/obj/item/clothing/head/helmet/f13/legion/explorer
+ icon_state = "helmet_explorer"
+
+/obj/item/clothing/head/helmet/f13/legion/vet
+ icon_state = "helmet_veteran"
+
+/obj/item/clothing/head/helmet/f13/legion/vet/vexil
+ icon_state = "helmet_vexillarius"
+
+
+
+//////////////////////////////////////////
+// //
+// //
+// LEGION FURNITURE //
+// //
+// //
+//////////////////////////////////////////
+
+// --------------------- RADIO CONTROL --------------------------- -meant to be wall mounted so not solid, and pixel shifted until it looks good on the specific wall
+
+/obj/machinery/radioterminal/legion/wallmounted
+ name = "Legion radio control"
+ desc = "Cobbled together radio master set for disabling lost radios."
+ icon = 'modular_BD2/legio_invicta/icons/icons_64x32_legion.dmi'
+ icon_state = "radio_wall_legion"
+
+
+// ------------------- WARDROBE -----------------------------
+
+/obj/machinery/smartfridge/bottlerack/wardrobe
+ name = "large clothing rack"
+ desc = "holds clothing and various acessories."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "wardrobe"
+ layer = ABOVE_OBJ_LAYER
+ max_n_of_items = 30
+
+/obj/machinery/smartfridge/bottlerack/wardrobe/accept_check(obj/item/O)
+ if(istype(O, /obj/item/clothing/shoes) || istype(O, /obj/item/clothing/head) || istype(O, /obj/item/clothing/mask) || istype(O, /obj/item/clothing/under) || istype(O, /obj/item/clothing/glasses) || istype(O, /obj/item/clothing/gloves) || istype(O, /obj/item/storage/belt) || istype(O, /obj/item/clothing/neck))
+ return TRUE
+ return FALSE
+
+/obj/machinery/smartfridge/bottlerack/wardrobe/update_icon_state()
+ SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
+ if(!stat)
+ if(visible_contents)
+ switch(contents.len)
+ if(0)
+ icon_state = "[initial(icon_state)]"
+ if(1 to 5)
+ icon_state = "[initial(icon_state)]-1"
+ if(6 to 10)
+ icon_state = "[initial(icon_state)]-2"
+ if(11 to 16)
+ icon_state = "[initial(icon_state)]-3"
+ if(17 to 22)
+ icon_state = "[initial(icon_state)]-4"
+ if(23 to 30)
+ icon_state = "[initial(icon_state)]-5"
+ else
+ icon_state = "[initial(icon_state)]"
+ else
+ icon_state = "[initial(icon_state)]"
+
+// Preloaded Legion wardrobe
+/obj/machinery/smartfridge/bottlerack/wardrobe/legion
+ initial_contents = list(
+ /obj/item/clothing/under/f13/legskirt = 3,
+ /obj/item/clothing/mask/bandana/legion/dark = 2,
+ /obj/item/clothing/head/f13/servant/auxilia = 1,
+ /obj/item/clothing/head/f13/servant = 1,
+ /obj/item/clothing/gloves/legion = 2,
+ /obj/item/clothing/gloves/blacksmith_mittens = 1,
+ /obj/item/clothing/neck/apron/labor = 1,
+ /obj/item/clothing/shoes/f13/military/legion = 3,
+ /obj/item/clothing/shoes/sandals_leather = 1,
+ /obj/item/storage/belt/military/legion = 1,
+ /obj/item/clothing/glasses/f13/goggles_sandstorm = 1)
+
+
+// -------------- ARMORDROBE -----------------
+
+/obj/machinery/smartfridge/bottlerack/wardrobe/armor
+ name = "armor hanging rack"
+ desc = "a place to hang your armor and helmet."
+ icon_state = "armordrobe"
+ max_n_of_items = 20
+
+/obj/machinery/smartfridge/bottlerack/wardrobe/armor/accept_check(obj/item/O)
+ if(istype(O, /obj/item/clothing/shoes) || istype(O, /obj/item/clothing/suit/armor) || istype(O, /obj/item/clothing/head/helmet))
+ return TRUE
+ return FALSE
+
+/obj/machinery/smartfridge/bottlerack/wardrobe/armor/update_icon_state()
+ SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
+ if(!stat)
+ if(visible_contents)
+ switch(contents.len)
+ if(0)
+ icon_state = "[initial(icon_state)]"
+ if(1 to 3)
+ icon_state = "[initial(icon_state)]-1"
+ if(4 to 6)
+ icon_state = "[initial(icon_state)]-2"
+ if(7 to 10)
+ icon_state = "[initial(icon_state)]-3"
+ if(11 to 14)
+ icon_state = "[initial(icon_state)]-4"
+ if(15 to 20)
+ icon_state = "[initial(icon_state)]-5"
+ else
+ icon_state = "[initial(icon_state)]"
+ else
+ icon_state = "[initial(icon_state)]"
+
+// Preloaded Legion armor rack
+/obj/machinery/smartfridge/bottlerack/wardrobe/armor/legion
+ initial_contents = list(
+ /obj/item/clothing/suit/armor/light/legion/recruit = 2,
+ /obj/item/clothing/head/helmet/f13/legion/recruit = 2)
+
+
+// -------------- MELEE RACK -----------------
+
+/obj/machinery/smartfridge/bottlerack/rack_melee
+ name = "melee weapon rack"
+ desc = "holds most melee and throwing weapons."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "rack_melee"
+ layer = ABOVE_OBJ_LAYER
+ max_n_of_items = 15
+
+/obj/machinery/smartfridge/bottlerack/rack_melee/accept_check(obj/item/O)
+ if(istype(O, /obj/item/melee) || istype(O, /obj/item/shishkebabpack) || istype(O, /obj/item/throwing_star) || istype(O, /obj/item/restraints/legcuffs/bola) || istype(O, /obj/item/shovel) || istype(O, /obj/item/twohanded))
+ return TRUE
+ return FALSE
+
+/obj/machinery/smartfridge/bottlerack/rack_melee/update_icon_state()
+ SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
+ if(!stat)
+ if(visible_contents)
+ switch(contents.len)
+ if(0)
+ icon_state = "[initial(icon_state)]"
+ if(1 to 2)
+ icon_state = "[initial(icon_state)]-1"
+ if(3 to 5)
+ icon_state = "[initial(icon_state)]-2"
+ if(6 to 8)
+ icon_state = "[initial(icon_state)]-3"
+ if(9 to 12)
+ icon_state = "[initial(icon_state)]-4"
+ if(13 to 15)
+ icon_state = "[initial(icon_state)]-5"
+ else
+ icon_state = "[initial(icon_state)]"
+ else
+ icon_state = "[initial(icon_state)]"
+
+// Preloaded Legion melee rack
+/obj/machinery/smartfridge/bottlerack/rack_melee/legion
+ initial_contents = list(
+ /obj/item/melee/onehanded/machete = 1,
+ /obj/item/restraints/legcuffs/bola = 1)
+
+
+// -------------- OFFERING RACK-----------------
+// Trophy rack for dogtags
+/obj/machinery/smartfridge/bottlerack/legion_offering
+ name = "offerings to Mars"
+ desc = "Hang the dogtags of slain enemies and fallen brothers here so Mars can keep track."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "rack_trophy"
+ max_n_of_items = 12
+
+/obj/machinery/smartfridge/bottlerack/legion_offering/accept_check(obj/item/O)
+ if(istype(O, /obj/item/card/id/dogtag))
+ return TRUE
+ return FALSE
+
+/obj/machinery/smartfridge/bottlerack/legion_offering/update_icon_state()
+ SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
+ if(!stat)
+ if(visible_contents)
+ switch(contents.len)
+ if(0)
+ icon_state = "[initial(icon_state)]"
+ if(1)
+ icon_state = "[initial(icon_state)]-1"
+ if(2)
+ icon_state = "[initial(icon_state)]-2"
+ if(3)
+ icon_state = "[initial(icon_state)]-3"
+ if(4)
+ icon_state = "[initial(icon_state)]-4"
+ if(5)
+ icon_state = "[initial(icon_state)]-5"
+ if(6)
+ icon_state = "[initial(icon_state)]-6"
+ if(7)
+ icon_state = "[initial(icon_state)]-7"
+ if(8)
+ icon_state = "[initial(icon_state)]-8"
+ if(9)
+ icon_state = "[initial(icon_state)]-9"
+ if(10)
+ icon_state = "[initial(icon_state)]-10"
+ if(11)
+ icon_state = "[initial(icon_state)]-11"
+ if(12)
+ icon_state = "[initial(icon_state)]-12"
+ else
+ icon_state = "[initial(icon_state)]"
+ else
+ icon_state = "[initial(icon_state)]"
+
+
+// ------------------- BUST OF CAESAR -----------------------------
+
+/obj/item/statuebust/legion
+ name = "a bust of the great leader"
+ desc = "Caesar, a magnificent man, depicted in some tacky imitation of marble."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "bust_legion"
+
+
+// -------------- BATHTUB ----------------- - only mood function, just for RP. Would be better if mood boost just fired if not weaing anything in uniform slot, or unable to buckle if dressed.
+
+/obj/structure/chair/comfy/bathtub
+ name = "bathtub"
+ desc = "A relaxing bath in hot water, or a endurance test in freezing water, depending on how lazy you are."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "bathtub"
+ max_integrity = 200
+ item_chair = null
+ resistance_flags = NONE
+ flags_1 = NODECONSTRUCT_1
+
+/obj/structure/chair/comfy/bathtub/GetArmrest()
+ return mutable_appearance('modular_BD2/legio_invicta/icons/icons_legion.dmi', "bathtub_bathing")
+
+/obj/structure/chair/comfy/bathtub/post_buckle_mob(mob/living/M)
+ . = ..()
+ SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "bathed", /datum/mood_event/bathed)
+ handle_layer()
+ playsound(src, 'modular_BD2/blacksmith/sound/water_splash2.ogg',50, 1)
+
+/obj/structure/chair/comfy/bathtub/post_unbuckle_mob()
+ . = ..()
+ handle_layer()
+ playsound(src, 'modular_BD2/blacksmith/sound/water_splash2.ogg',50, 1)
+
+/datum/mood_event/bathed
+ description = span_nicegreen("A warm bath felt nice.")
+ mood_change = 4
+ timeout = 9000
+
+
+// ------------------- SIGNS -----------------------------
+
+/obj/structure/sign/legion
+ name = "war room"
+ desc = "For planning the next great victory!"
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "sign"
+ layer = SIGN_LAYER
+
+/obj/structure/sign/legion/radio
+ name = "radio room"
+ desc = "Spare radios and radio linking equipment are kept here"
+
+/obj/structure/sign/legion/medicus
+ name = "medicus tent"
+ desc = "Caesar approves the methods used here. Degenerates not welcome."
+ icon_state = "sign_medicus"
+ layer = BELOW_MOB_LAYER
+
+/obj/structure/sign/legion/recruit
+ name = "recruit barracks"
+ desc = "The decanus sleeps with his men and keeps track of them." // Theyre definitively straight
+ icon_state = "sign_ground"
+
+/obj/structure/sign/legion/smithy
+ name = "smithy"
+ desc = "Where weapons are forged and tools stored"
+
+/obj/structure/sign/legion/armory
+ name = "armory"
+ desc = "Great amounts of weapons and equipment are stored here"
+
+/obj/structure/sign/legion/prime
+ name = "prime barracks"
+ desc = "Primes and their decanus live here"
+ icon_state = "sign_ground"
+
+/obj/structure/sign/legion/veteran
+ name = "veteran barracks"
+ desc = "Experienced troops live here in comparable comfort."
+
+/obj/structure/sign/legion/mess
+ name = "mess pavillion"
+ desc = "Food and a place to talk to brothers in arms."
+ icon_state = "sign_ground"
+
+/obj/structure/sign/legion/gym
+ name = "the temple"
+ desc = "Build your body or use it as a speaking platform."
+
+/obj/structure/sign/legion/latrine
+ name = "latrine"
+ desc = "Has a certain odor."
+ icon_state = "sign_ground"
+
+/obj/structure/sign/legion/mines
+ name = "mines"
+ desc = "Put slave here"
+ icon_state = "sign_chain"
+
+/obj/structure/sign/legion/prison
+ name = "prison"
+ desc = "Lets the prisoner enjoy the local climate without interfering roofing."
+ icon_state = "sign_ground"
+
+/obj/structure/sign/legion/storeroom
+ name = "storeroom"
+ desc = "a place to store low-value goods and slaving equipment."
+
+/obj/structure/sign/legion/records
+ name = "office of records"
+ desc = "Where the Treasurer and other nerds store paperwork about stores and payrolls, and maybe the treasury."
+
+/obj/structure/sign/legion/stronghold
+ name = "stronghold"
+ desc = "Main building, fortified."
+
+/obj/structure/sign/legion/guardhouse
+ name = "guardhouse"
+ desc = "Sit in the gloom and wait for something to happen."
+
+
+// -------------- ID LOCKED DOORS BY RANK -----------------
+
+/obj/machinery/door/unpowered/securedoor/legion/warroom
+ name = "war room"
+ req_access_txt = "254" // ACCESS_LEGION_CPMMAND
+
+/obj/machinery/door/unpowered/securedoor/legion/centurion
+ name = "centurions quarters"
+ req_access_txt = "264" // ACCESS_LEGION4
+
+
+
+// -------------- STATUE OF MARS -----------------
+// more fitting mars statue for the Legion players
+/obj/structure/statue/mars
+ name = "statue of mars"
+ desc = "A monument to masculine virtue, made out of plaster and wood with a thin bronze outer layer."
+ icon = 'modular_BD2/legio_invicta/icons/64x64_icons.dmi'
+ icon_state = "statue_mars"
+ anchored = TRUE
+ max_integrity = 1000
+ material_drop_type = /obj/item/stack/sheet/bronze
+ impressiveness = 30
+ plane = GAME_PLANE
+ layer = ABOVE_ALL_MOB_LAYER
+
+/obj/structure/statue/mars/examine(mob/user)
+ . = ..()
+ SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "inspired_art", /datum/mood_event/inspired_art)
+ . += "What a inspiring sight."
+
+/datum/mood_event/inspired_art
+ description = span_nicegreen("I have seen something inspiring.")
+ mood_change = 1
+ timeout = 9000
+
+
+// -------------- DECALS -----------------
+
+/obj/structure/decoration/legion
+ name = "legion bull flag of high quality"
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "decal_bull"
+
+/obj/structure/decoration/legion/spears
+ name = "decorative weapons"
+ icon_state = "decal_wallweapons"
+
+/obj/structure/decoration/legion/chains
+ name = "chains"
+ icon_state = "decal_chain1"
+
+/obj/structure/decoration/legion/chains2
+ name = "chains"
+ icon_state = "decal_chain2"
+
+/obj/structure/decoration/legion/tentpole
+ name = "tentpole"
+ icon_state = "decal_tentpole"
+
+/obj/structure/decoration/legion/tentpole/rope
+ icon_state = "decal_tentpole_rope"
+
+
+// -------------- HANDRAIL -----------------
+
+/obj/structure/railing/handrail/legion
+ name = "handrail"
+ desc = "Wooden posts with connecting chain."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "handrail_legion"
+
+/obj/structure/railing/handrail/legion/underlayer
+ layer = BELOW_MOB_LAYER
+
+/obj/structure/railing/handrail/legion/overlayer
+ plane = GAME_PLANE
+
+/obj/structure/railing/handrail/legion/end
+ icon_state = "handrail_legion_end"
+ density = FALSE
+
+/obj/structure/railing/handrail/legion/entrance
+ icon_state = "handrail_legion_entrance"
+ layer = BELOW_MOB_LAYER // comment for underlayer effect
+
+/obj/structure/railing/handrail/legion/entrance/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
+ user.visible_message("[user] begins moving the chain of the [src].")
+ if(!do_after(user, 20, TRUE, src))
+ return
+ else
+ playsound(get_turf(src), 'modular_BD2/general/sound/doorchainsoft_open.ogg', 60, TRUE)
+ if(density)
+ icon_state = "handrail_legion_entrance_open"
+ src.density = 0
+ else
+ icon_state = "handrail_legion_entrance_close"
+ src.density = 1
+ return ..()
+
+
+//////////////////////////////////////////
+// //
+// //
+// GENERIC MAPPING STUFF //
+// //
+// //
+//////////////////////////////////////////
+
+/obj/structure/fireplace/preloaded
+ fuel_added = 1000
+
+/* Added to base code
+/obj/structure/campfire/stove
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+
+added to end of campfire/attackby
+ else if(fired && istype(P, /obj/item/stack/medical/gauze/improvised))
+ if(!ishuman(user))
+ return
+ if(istype(P, /obj/item/stack/medical/gauze/improvised))
+ var/obj/item/stack/medical/gauze/improvised/F = P
+ to_chat(user, "You start baking the [F.name].")
+ if(do_after(user, 30, target = src))
+ F.microwave_act()
+*/
+
+// Finally time to add my old dirt alternative, ploughed dirt
+/obj/machinery/hydroponics/soil/plowed //Just looks different
+ icon_state = "soil_plowexperiment"
+
+/obj/effect/overlay/darkwoodfancyedge
+ name = "wood edge"
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "darkwood_fancyedge"
+ layer = WALL_PLANE
+
+// Matrix for slaves/prison
+/turf/closed/indestructible/f13/matrix/slave //Less obtrusive matrix for prison
+ name = "mattress of despair"
+ desc = "This is incredibly filthy. Sleeping here means your spirit is broken, and you submit to be taken far away to a bleak future as a prisoner. Count as dead for respawning rules."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "despair"
+
+
+// New roof for tent
+/turf/open/floor/plating/f13/outside/roof/tent_leather
+ name = "leather tent roof"
+ icon = 'icons/fallout/turfs/walls/tents.dmi'
+ icon_state = "leather_roof"
+
+// shading under the pavillon
+/obj/effect/turf_decal/shadow
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "shadow"
+
+// Floorshading testing
+/obj/effect/turf_decal/shadow/floor
+ icon_state = "shadow_floor"
+ plane = GAME_PLANE
+
+// Wallshading testing
+/obj/effect/shadow_wall
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "shadow_wall"
+ plane = GAME_PLANE
+ pixel_y = 32
+
+// stairs platform to make it prettier
+/turf/open/floor/f13/stairs_platform
+ name = "stairs"
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ icon_state = "stairs_platform"
+ color = "#A47449"
+
+
+
+// -------------- DOUBLE BARRED DOORS -----------------
+
+/obj/structure/simple_door/metal/barred/left
+ icon = 'modular_BD2/general/icons/door_barred.dmi'
+ icon_state = "barred_left"
+ door_type = "barred_left"
+ open_sound = 'modular_BD2/general/sound/doorchainsoft_open.ogg'
+ close_sound = 'modular_BD2/general/sound/doorchainsoft_close.ogg'
+
+/obj/structure/simple_door/metal/barred/right
+ icon = 'modular_BD2/general/icons/door_barred.dmi'
+ icon_state = "barred_right"
+ door_type = "barred_right"
+ open_sound = 'modular_BD2/general/sound/doorchainsoft_open.ogg'
+ close_sound = 'modular_BD2/general/sound/doorchainsoft_close.ogg'
+
+
+// -------------- PRE-STONE RINGED BONFIRE -----------------
+
+/obj/structure/bonfire/safe
+ stones = TRUE // maybe this needs porting from Atom
+ density = TRUE
+
+/obj/structure/bonfire/safe/Initialize()
+ . = ..()
+ add_overlay("bonfire_stones")
+
+
+/obj/structure/closet/crate/footlocker
+ dense_when_open = FALSE
+
+/obj/structure/closet/crate/footchest
+ dense_when_open = FALSE
+
+
+// -------------- TURF STUFF -----------------
+
+// // -------------- OUTSIDE DEAD DIRT ----------------- the shade used in the map, nature free, stamped dirt flooring
+/turf/open/indestructible/ground/inside/dirt/stamped
+ icon = 'icons/fallout/turfs/dirt.dmi'
+ slowdown = 0.1
+ flags_1 = null
+
+/turf/open/indestructible/ground/inside/dirt/stamped/outside // criminal solution but whatever. To have dead dirt outside.
+ sunlight_state = SUNLIGHT_SOURCE
+
+/turf/open/indestructible/ground/inside/dirt/stamped/outside/sand // ugly solution but whatever. To have undiggable sand for flooring in a pavillon
+ name = "packed sand"
+ icon = 'modular_BD2/general/icons/tileset_sonora.dmi'
+ icon_state = "desertsmooth"
+
+/obj/structure/flora/tree/wasteland/dark
+ color = "#5c5a57"
+ plane = GAME_PLANE
+ layer = ABOVE_ALL_MOB_LAYER
+
+/obj/structure/flora/tree/wasteland/dark/Initialize()
+ . = ..()
+ AddComponent(/datum/component/largetransparency, y_offset = 1)
+
+/obj/structure/flora/tree/african_acacia_dead
+ plane = GAME_PLANE
+
+/obj/structure/flora/tree/african_acacia_dead/Initialize()
+ . = ..()
+ AddComponent(/datum/component/largetransparency, y_offset = 1)
+
+// -------------- GRAVEL TILESET STUFF -----------------
+
+/turf/open/indestructible/ground/outside/gravel
+ name = "gravel"
+ icon_state = "gravel"
+ icon = 'modular_BD2/general/icons/tileset_gravel.dmi'
+
+/turf/open/indestructible/ground/outside/gravel/edge
+ icon_state = "graveledge"
+
+/turf/open/indestructible/ground/outside/gravel/corner
+ icon_state = "gravelcorner"
+
+/obj/effect/turf_decal/gravel_edge
+ icon = 'modular_BD2/general/icons/tileset_gravel.dmi'
+ icon_state = "gravel_edge"
+
+/obj/effect/turf_decal/gravel_edge/corner // outer corner
+ icon_state = "gravel_corner"
+
+/obj/effect/turf_decal/gravel_edge/diagonal // inner corner alt
+ icon_state = "gravel_diagonal"
+
+// -------------- SONORA TILESET STUFF -----------------
+
+/obj/effect/overlay/desert/sonora/edge
+ icon = 'modular_BD2/general/icons/tileset_sonora.dmi'
+ icon_state = "desertedge"
+
+/obj/effect/overlay/desert/sonora/edge/corner
+ icon_state = "desertcorner"
+
+/obj/effect/overlay/desert/sonora/edge/fade
+ icon_state = "desertfade"
+
+/turf/open/indestructible/ground/outside/desert/sonora
+ icon = 'modular_BD2/general/icons/tileset_sonora.dmi'
+ icon_state = "desertsmooth"
+ slowdown = 0.3
+ footstep = FOOTSTEP_LOOSE_SAND
+ barefootstep = FOOTSTEP_LOOSE_SAND
+ clawfootstep = FOOTSTEP_LOOSE_SAND
+
+/turf/open/indestructible/ground/outside/desert/sonora/Initialize()
+ . = ..()
+ icon_state = "desertsmooth[rand(1,8)]"
+
+/turf/open/indestructible/ground/outside/desert/sonora/coarse
+ icon_state = "desertcoarse1"
+ slowdown = 0.4
+
+/turf/open/indestructible/ground/outside/desert/sonora/coarse/Initialize()
+ . = ..()
+ icon_state = "desertcoarse[rand(1,16)]"
+
+/turf/open/indestructible/ground/outside/desert/sonora/rough
+ icon_state = "desertcracked1"
+ slowdown = 0.6
+
+
+/turf/open/floor/f13/wood/outside // outside platform with sunlight
+ sunlight_state = SUNLIGHT_SOURCE
+
+/obj/item/bedsheet/blanket
+ name = "blanket"
+ desc = "A undyed rough blanket."
+ icon_state = "blanket1"
+
+/obj/item/bedsheet/blanket2
+ icon_state = "blanket2"
+
+/obj/item/storage/belt/military/legion
+ name = "legion marching belt"
+ desc = "A belt capable of holding various supplies a warrior might need. Comes with a red sash."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "belt_legion"
+ item_state = "belt_legion"
+
+
+/obj/item/clothing/shoes/sandals_leather
+ name = "leather sandals"
+ desc = "Sandals with buckled leather straps on it. Good workmanship."
+ icon = 'modular_BD2/legio_invicta/icons/icons_legion.dmi'
+ mob_overlay_icon = 'modular_BD2/legio_invicta/icons/onmob_legion.dmi'
+ righthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi'
+ lefthand_file = 'modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi'
+ icon_state = "shoes_sandals"
+ item_state = "shoes_sandals"
+// icon = 'icons/fallout/clothing/shoes.dmi'
+// mob_overlay_icon = 'icons/fallout/onmob/clothes/shoe.dmi'
+// icon_state = "legion_sandals"
+// item_state = "legion_sandals"
+ strip_delay = 100
+ equip_delay_other = 100
+ permeability_coefficient = 0.9
+ can_be_tied = FALSE
diff --git a/modular_BD2/legio_invicta/icons/64x64_icons.dmi b/modular_BD2/legio_invicta/icons/64x64_icons.dmi
new file mode 100644
index 00000000000..14714947cfc
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/64x64_icons.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/64x64_lefthand.dmi b/modular_BD2/legio_invicta/icons/64x64_lefthand.dmi
new file mode 100644
index 00000000000..62683e11d3d
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/64x64_lefthand.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/64x64_righthand.dmi b/modular_BD2/legio_invicta/icons/64x64_righthand.dmi
new file mode 100644
index 00000000000..a052b382ed4
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/64x64_righthand.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/backslot.dmi b/modular_BD2/legio_invicta/icons/backslot.dmi
new file mode 100644
index 00000000000..fad5ec1b0b0
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/backslot.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/beltslot.dmi b/modular_BD2/legio_invicta/icons/beltslot.dmi
new file mode 100644
index 00000000000..3036ffbe17d
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/beltslot.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/icons_64x32_legion.dmi b/modular_BD2/legio_invicta/icons/icons_64x32_legion.dmi
new file mode 100644
index 00000000000..c0a8828d484
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/icons_64x32_legion.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/icons_legion.dmi b/modular_BD2/legio_invicta/icons/icons_legion.dmi
new file mode 100644
index 00000000000..59f66301062
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/icons_legion.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/onmob_legion.dmi b/modular_BD2/legio_invicta/icons/onmob_legion.dmi
new file mode 100644
index 00000000000..b162f0ff981
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/onmob_legion.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi b/modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi
new file mode 100644
index 00000000000..b107b56dc82
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/onmob_legion_lefthand.dmi differ
diff --git a/modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi b/modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi
new file mode 100644
index 00000000000..7c15e6b7dec
Binary files /dev/null and b/modular_BD2/legio_invicta/icons/onmob_legion_righthand.dmi differ
diff --git a/modular_big-iron/code/game/machinery/radio_station.dm b/modular_big-iron/code/game/machinery/radio_station.dm
new file mode 100644
index 00000000000..96f31222836
--- /dev/null
+++ b/modular_big-iron/code/game/machinery/radio_station.dm
@@ -0,0 +1,156 @@
+//******************************************
+//WHEN ADDING NEW MUSIC, ADD THE MUSIC'S NAME TO _globalvars/lists/objects.dm global_music_list and then scroll down to the switch(music_name) part
+//Make sure you put it in alphabetical order and also update the switch(music_file) part at the disk burner's attack_hand proc with whatever music you added
+//******************************************
+
+/obj/machinery/radio_station
+ name = "radio station"
+ desc = "A specially equipped radio station to broadcast music to every radio in a the waste. Comes pre-coded with over 30 songs!"
+ icon = 'icons/fallout/machines/radio.dmi'
+ icon_state = "gannets_machine21"
+ max_integrity = 150
+ anchored = TRUE
+ density = TRUE
+ use_power = IDLE_POWER_USE
+ idle_power_usage = 2
+ armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 20)
+ circuit = /obj/item/circuitboard/machine/radio_station
+ light_color = LIGHT_COLOR_GREEN
+ var/datum/track/selectedtrack = "None" //File path to the music's audio file
+ var/selectedtrackname = "none"
+// var/datum/track = null //This is the name of the song, not the file name. This is what shows up at the top of the music selection.
+ var/list/music_list //List of music that can be played. Only the most based songs may be added.
+ var/cooldowntime
+ var/obj/item/record_disk/R //The record disk that's currently playing music
+ var/can_eject_disk = 1
+ var/ready_to_delete = 0 //For Destroy()
+ var/brightness_on = 1
+ var/volume = 35 //the volume that music plays at
+
+/obj/machinery/radio_station/Initialize()
+ . = ..()
+ music_list = SSjukeboxes.songs
+ update_icon()
+
+/obj/machinery/radio_station/attack_hand(mob/living/user)
+ ..()
+ var/machinesound = 'sound/machines/doorclick.ogg'
+ playsound(src, machinesound, 100, 1)
+ if(R)
+ if(can_eject_disk)
+ update_icon()
+ playsound(src, 'sound/effects/plastic_click.ogg', 100, 0)
+ R.forceMove(get_turf(src))
+ R = null
+ stopRadioMusic()
+ return
+ else
+ to_chat(user, "You must wait to eject the record disk!")
+ return
+
+ if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
+ update_icon()
+ return
+ if(cooldowntime > world.time)
+ to_chat(user, "The broadcasting antenna needs time to recharge! It will be ready in [DisplayTimeText(cooldowntime - world.time)].")
+ return
+ var/list/songnames = list()
+ if(music_list.len)
+ for(var/i = 1, i <= music_list.len, i++)
+ var/datum/track/CT = music_list[i]
+ var/ctsn = "[CT.song_name]"
+ songnames += ctsn
+ var/datum/track/cooming = input(user, "Last played music: [selectedtrackname]", "Available Music") as null|anything in songnames
+ if(!user.Adjacent(src))
+ to_chat(user, "You are too far away!")
+ return
+ if(!cooming)
+ return
+ if(cooldowntime > world.time)
+ to_chat(user, "The broadcasting antenna needs time to recharge! It will be ready in [DisplayTimeText(cooldowntime - world.time)].")
+ return
+ for(var/datum/track/S in music_list)
+ if(S.song_name == cooming)//agghggagaghaghah
+ selectedtrack = S.song_path
+ selectedtrackname = S.song_name
+ continue
+ playsound(src, machinesound, 100, 1)
+ playMusicToRadios(user)
+
+/obj/machinery/radio_station/attackby(obj/item/I, mob/living/user)
+ if(istype(I, /obj/item/record_disk))
+ if(cooldowntime > world.time)
+ to_chat(user, "The broadcasting antenna needs time to recharge! It will be ready in [DisplayTimeText(cooldowntime - world.time)].")
+ return
+ if(!R)
+ R = I
+ I.forceMove(src)
+ playsound(src, 'sound/effects/plastic_click.ogg', 100, 0)
+ selectedtrack = R.R.song_path
+ if(R.R.song_name != "CUSTOM")
+ selectedtrack = R.R.song_path
+ selectedtrackname = R.R.song_name
+ else
+ selectedtrack = R.R.song_path
+ selectedtrackname = "A custom song!f"
+ playMusicToRadios(user)
+ return
+ else
+ to_chat(user, "There is already a record disk in the [src]!")
+ return
+ ..()
+
+/obj/machinery/radio_station/proc/playMusicToRadios(mob/living/user)
+ if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
+ update_icon()
+ return
+ if(cooldowntime > world.time)
+ to_chat(user, "The broadcasting antenna needs time to recharge! It will be ready in [DisplayTimeText(cooldowntime - world.time)].")
+ return
+
+ var/store_resistance_flags = resistance_flags
+ resistance_flags = INDESTRUCTIBLE //Need to do this so that it can't be destroyed before the music starts playing.
+
+ can_eject_disk = 0
+ cooldowntime = world.time + 500
+ for(var/obj/item/radio/R in GLOB.radio_list) //Calls the playmusic() proc for every radio in radio_list (everyone)
+ R.playmusic(selectedtrack, selectedtrackname, volume)
+ for(var/obj/item/pda/R in GLOB.radio_list) //Calls the playmusic() proc for every radio in radio_list (everyone)
+ R.playmusic(selectedtrack, selectedtrackname, volume)
+
+ src.audible_message("[src] beeps, 'Now broadcasting: [selectedtrackname]' ")
+
+ resistance_flags = store_resistance_flags
+
+ can_eject_disk = 1
+ if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF) //Need to check again in case the radio station is destroyed while this proc is in progress
+ update_icon()
+ stopRadioMusic()
+ return
+
+
+/obj/machinery/radio_station/proc/stopRadioMusic()
+ var/i
+ for(i = 1; i <= GLOB.radio_list.len; i++) //This time it will stop the music for every radio listening to this radio station.
+ if(!istype(GLOB.radio_list[i], /obj/item/pda))
+ GLOB.radio_list[i].stopmusic(GLOB.radio_list[i].radio_holder, 3)
+
+/obj/machinery/radio_station/Destroy()
+ stopRadioMusic()
+ ..()
+
+/obj/machinery/radio_station/update_icon()
+ ..()
+ if(!(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF))
+ luminosity = 1
+ set_light(brightness_on)
+ return
+ luminosity = 0
+ set_light(0)
+
+/obj/machinery/radio_station/power_change()
+ . = ..()
+ if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
+ set_light(0)
+ else
+ set_light(brightness_on)
diff --git a/modular_big-iron/code/game/objects/circuitboards/radio_station.dm b/modular_big-iron/code/game/objects/circuitboards/radio_station.dm
new file mode 100644
index 00000000000..76af946c429
--- /dev/null
+++ b/modular_big-iron/code/game/objects/circuitboards/radio_station.dm
@@ -0,0 +1,6 @@
+/obj/item/circuitboard/machine/radio_station
+ name = "circuit board (radio station)"
+ build_path = /obj/machinery/radio_station
+ req_components = list(
+ /obj/item/stock_parts/cell = 1,
+ /obj/item/stock_parts/capacitor = 2)
diff --git a/sound/effects/disk_tray.ogg b/sound/effects/disk_tray.ogg
new file mode 100644
index 00000000000..ecbcba7195b
Binary files /dev/null and b/sound/effects/disk_tray.ogg differ
diff --git a/sound/effects/plastic_click.ogg b/sound/effects/plastic_click.ogg
new file mode 100644
index 00000000000..cd30e3a549b
Binary files /dev/null and b/sound/effects/plastic_click.ogg differ
diff --git a/sound/effects/record_shatter.ogg b/sound/effects/record_shatter.ogg
new file mode 100644
index 00000000000..1b122c1bf95
Binary files /dev/null and b/sound/effects/record_shatter.ogg differ
diff --git a/tgui/packages/tgui/interfaces/Jukebox.js b/tgui/packages/tgui/interfaces/Jukebox.js
index b23e55469b1..bc19343683d 100644
--- a/tgui/packages/tgui/interfaces/Jukebox.js
+++ b/tgui/packages/tgui/interfaces/Jukebox.js
@@ -11,12 +11,19 @@ export const Jukebox = (props, context) => {
track_selected,
track_length,
track_beat,
+ disk_selected,
+ disk_selected_length,
+ disk_selected_beat,
volume,
} = data;
const songs = flow([
sortBy(
song => song.name),
])(data.songs || []);
+ const disks = flow([
+ sortBy(
+ disk => disk.name),
+ ])(data.disks || []);
return (