Skip to content

Commit

Permalink
AAAAAAAAAH wood
Browse files Browse the repository at this point in the history
adds planks and sawmill, rehashes some of the crafting recipes so later advanced stuff is all made from planks.
  • Loading branch information
KanohaShinobi committed Feb 21, 2024
1 parent 800c68b commit 540999c
Show file tree
Hide file tree
Showing 21 changed files with 465 additions and 207 deletions.
10 changes: 5 additions & 5 deletions code/game/objects/items/stacks/stack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ obj/item/stack/Crossed(var/obj/item/stack/S)
return

else if (findtext(recipe.title, "grandfather clock"))
if (!istype(H.l_hand, /obj/item/stack/material/wood) && !istype(H.r_hand, /obj/item/stack/material/wood))
if (!istype(H.l_hand, /obj/item/stack/material/woodplank) && !istype(H.r_hand, /obj/item/stack/material/woodplank))
user << "<span class = 'warning'>You need a stack of at least 9 wood in one of your hands in order to make this.</span>"
return
else
Expand All @@ -1450,7 +1450,7 @@ obj/item/stack/Crossed(var/obj/item/stack/S)
return

else if (findtext(recipe.title, "standing clock"))
if (!istype(H.l_hand, /obj/item/stack/material/wood) && !istype(H.r_hand, /obj/item/stack/material/wood))
if (!istype(H.l_hand, /obj/item/stack/material/woodplank) && !istype(H.r_hand, /obj/item/stack/material/woodplank))
user << "<span class = 'warning'>You need a stack of at least 6 wood in one of your hands in order to make this.</span>"
return
else
Expand All @@ -1474,7 +1474,7 @@ obj/item/stack/Crossed(var/obj/item/stack/S)
return

else if (findtext(recipe.title, "wooden house door"))
if (!istype(H.l_hand, /obj/item/stack/material/wood) && !istype(H.r_hand, /obj/item/stack/material/wood))
if (!istype(H.l_hand, /obj/item/stack/material/woodplank) && !istype(H.r_hand, /obj/item/stack/material/woodplank))
user << "<span class = 'warning'>You need a stack of at least 5 wood in one of your hands in order to make this.</span>"
return
else
Expand Down Expand Up @@ -1888,7 +1888,7 @@ obj/item/stack/Crossed(var/obj/item/stack/S)
T.caliber = inpt
T.name = "[T.caliber]mm cannon casing"
return

if (istype(O, /obj/item/ammo_magazine/emptymagazine/rifle))
var/obj/item/ammo_magazine/emptymagazine/rifle/T = O
if (map.ID == MAP_NOMADS_PERSISTENCE_BETA || map.ID == MAP_NATIONSRP_COLDWAR_CAMPAIGN)
Expand All @@ -1905,7 +1905,7 @@ obj/item/stack/Crossed(var/obj/item/stack/S)
else
O.color = input
return

if (istype(O, /obj/structure/closet/crate/wall_mailbox) && !istype(O, /obj/structure/closet/crate/wall_mailbox/wood_mailbox))
var/input = WWinput(user, "Choose the color:", "Color" , "#FFFFFF", "color")
if (input == null || input == "")
Expand Down
15 changes: 15 additions & 0 deletions code/game/objects/structures/blacksmithing/refining.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
H << "You place \the [I] in \the [src], refueling it."
qdel(I)
return
else if (istype(I, /obj/item/stack/material/woodplank))
fuel += I.amount
H << "You place \the [I] in \the [src], refueling it."
qdel(I)
return

if (istype(I, /obj/item/stack/ore/iron))
iron += I.amount
Expand Down Expand Up @@ -226,6 +231,11 @@
H << "You place \the [I] in \the [src], refueling it."
qdel(I)
return
else if (istype(I, /obj/item/stack/material/woodplank))
fuel += I.amount
H << "You place \the [I] in \the [src], refueling it."
qdel(I)
return

if (istype(I, /obj/item/stack/ore/iron))
iron += I.amount
Expand Down Expand Up @@ -332,6 +342,11 @@
H << "You place \the [I] in \the [src], refueling it."
qdel(I)
return
else if (istype(I, /obj/item/stack/material/woodplank))
fuel += I.amount
H << "You place \the [I] in \the [src], refueling it."
qdel(I)
return

for (var/obj/item/weapon/clay/mold/MCC in contents)
H << "<span class = 'warning'>\The [name] is full.</span>"
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/structures/bookcase.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
user << "<span class='notice'>You begin dismantling \the [src].</span>"
if (do_after(user,25,src))
user << "<span class='notice'>You dismantle \the [src].</span>"
new /obj/item/stack/material/wood(get_turf(src))
new /obj/item/stack/material/woodplank(get_turf(src))
for (var/obj/item/weapon/book/b in contents)
b.loc = (get_turf(src))
qdel(src)
Expand Down Expand Up @@ -195,7 +195,7 @@
if (world.time < map.age8_timer && ( (map.custom_civs[user.civilization][1] >= map.age7_top) || (map.custom_civs[user.civilization][2] >= map.age7_top) || (map.custom_civs[user.civilization][3] >= map.age7_top)) )
user << "You are too advanced in one of these research types or are too fast. You can research again in [(map.age8_timer-world.time)/600] minutes."
return

var/current_tribesmen = (alive_civilians.len/map.availablefactions.len)
if (map.nomads == TRUE)
if (alive_civilians.len <= 12)
Expand All @@ -213,7 +213,7 @@
if (user.religious_clergy == "Monks")
modif += 0.3
user << SPAN_NOTICE("Studying these documents... This will take [displaytime] to finish.")

if (do_after(user,(studytime/user.getStatCoeff("philosophy"))/modif,src))
if (user.civilization != null && user.civilization != "none")
if(anti_abuse(user, map.custom_civs[user.civilization][1], map.custom_civs[user.civilization][2], map.custom_civs[user.civilization][3], sum_i, sum_m, sum_h))
Expand All @@ -228,7 +228,7 @@
else
user << "You don't belong to any faction."
return

if (user.civilization == civname_a)
if(anti_abuse(user, map.civa_research[1], map.civa_research[2], map.civa_research[3], sum_i, sum_m, sum_h))
sum_i = null //Throwing the unused sum away
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/crates_lockers/largecrate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/crowbar))
new /obj/item/stack/material/wood(src)
new /obj/item/stack/material/woodplank(src)
var/turf/T = get_turf(src)
for (var/atom/movable/AM in contents)
if (AM.simulated) AM.forceMove(T)
Expand Down
10 changes: 10 additions & 0 deletions code/game/objects/structures/factory/factory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
H << "You place \the [I] in \the [src], smelting it."
qdel(I)
return
else if (istype(I, /obj/item/stack/material/woodplank))
fuel += I.amount
H << "You place \the [I] in \the [src], refueling it."
qdel(I)
return
else
H << "<span class = 'warning'>You can't smelt this.</span>"
return
Expand Down Expand Up @@ -327,6 +332,11 @@
H << "You place \the [I] in \the [src], smelting it."
qdel(I)
return
else if (istype(I, /obj/item/stack/material/woodplank))
fuel += I.amount
H << "You place \the [I] in \the [src], refueling it."
qdel(I)
return

else
H << "<span class = 'warning'>You can't smelt this.</span>"
Expand Down
16 changes: 11 additions & 5 deletions code/game/objects/structures/key_doors/key_door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,11 @@ var/list/nonbreaking_types = list(
if (!user.hitting_key_door)
user.hitting_key_door = TRUE
visible_message(SPAN_DANGER("[user] hits the door with [W]!"))
if (istype(material, /material/wood))
if (istype(material, /material/wood || /material/wood/soft))
playsound(get_turf(src), 'sound/effects/wooddoorhit.ogg', 100)
else
playsound(get_turf(src), 'sound/effects/grillehit.ogg', 100)

update_damage(-W.force)
spawn (7)
user.hitting_key_door = FALSE
Expand Down Expand Up @@ -228,7 +229,7 @@ var/list/nonbreaking_types = list(
if (!user.hitting_key_door)
user.hitting_key_door = TRUE
visible_message(SPAN_DANGER("[user] hits the door with [W]!"))
if (istype(material, /material/wood))
if (istype(material, /material/wood || /material/wood/soft))
playsound(get_turf(src), 'sound/effects/wooddoorhit.ogg', 100)
if (istype(material, /material/paper))
playsound(get_turf(src), 'sound/effects/cardboardpunch.ogg', 100)
Expand Down Expand Up @@ -270,7 +271,7 @@ var/list/nonbreaking_types = list(
playsound(get_turf(src), "doorknock", 100, TRUE)
else
user.visible_message(SPAN_DANGER("[user] kicks the door!"))
if (istype(material, /material/wood))
if (istype(material, /material/wood || /material/wood/soft))
playsound(get_turf(src), 'sound/effects/wooddoorhit.ogg', 100)
else
playsound(get_turf(src), 'sound/effects/grillehit.ogg', 100)
Expand Down Expand Up @@ -299,7 +300,7 @@ var/list/nonbreaking_types = list(
playsound(get_turf(src), "doorknock", 100, TRUE)
else
user.visible_message(SPAN_DANGER("[user] kicks the door!"))
if (istype(material, /material/wood))
if (istype(material, /material/wood) || istype(material, /material/wood/soft))
playsound(get_turf(src), 'sound/effects/wooddoorhit.ogg', 100)
if (istype(material, /material/paper))
playsound(get_turf(src), 'sound/effects/cardboardpunch.ogg', 100)
Expand Down Expand Up @@ -328,11 +329,16 @@ var/list/nonbreaking_types = list(
if (health <= 0)
if (istype(src, /obj/structure/simple_door/key_door/anyone/shoji))
visible_message(SPAN_DANGER("The shoji door is torn apart!"))
else if (istype(src, /obj/structure/simple_door/key_door/anyone/doubledoor/wood || /obj/structure/simple_door/key_door/anyone/nordic || /obj/structure/simple_door/key_door/anyone/wood || /obj/structure/simple_door/key_door/anyone/rustic || /obj/structure/simple_door/key_door/anyone/aztec|| /obj/structure/simple_door/key_door/anyone/singledoor/privacy || /obj/structure/simple_door/key_door/anyone/singledoor/housedoor))
else if (istype(src, /obj/structure/simple_door/key_door/anyone/nordic || /obj/structure/simple_door/key_door/anyone/wood || /obj/structure/simple_door/key_door/anyone/rustic || /obj/structure/simple_door/key_door/anyone/aztec|| /obj/structure/simple_door/key_door/anyone/singledoor/privacy || /obj/structure/simple_door/key_door/anyone/singledoor/housedoor))
visible_message(SPAN_DANGER("[src] collapses into a pile of wood splinters!"))
new /obj/item/stack/material/wood(loc)
new /obj/item/stack/material/wood(loc)
qdel(src)
else if (istype(src, /obj/structure/simple_door/key_door/anyone/doubledoor/wood || /obj/structure/simple_door/key_door/anyone/nordic || /obj/structure/simple_door/key_door/anyone/wood || /obj/structure/simple_door/key_door/anyone/rustic || /obj/structure/simple_door/key_door/anyone/aztec|| /obj/structure/simple_door/key_door/anyone/singledoor/privacy || /obj/structure/simple_door/key_door/anyone/singledoor/housedoor))
visible_message(SPAN_DANGER("[src] collapses into a pile of wood splinters!"))
new /obj/item/stack/material/woodplank(loc)
new /obj/item/stack/material/woodplank(loc)
qdel(src)
else if (istype(src, /obj/structure/simple_door/key_door/anyone/doubledoor/bamboo))
visible_message(SPAN_DANGER("[src] collapses into a pile of bamboo splinters!"))
new /obj/item/stack/material/bamboo(loc)
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/structures/table.dm
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@
icon_state = "woodtable"
flipped_icon = "woodtable-flipped"
frame = /obj/structure/table_frame/wood
framestack = /obj/item/stack/material/wood
buildstack = /obj/item/stack/material/wood
framestack = /obj/item/stack/material/woodplank
buildstack = /obj/item/stack/material/woodplank
flammable = TRUE

/obj/structure/table/modern/table/flipped
Expand Down Expand Up @@ -546,7 +546,7 @@
icon = 'icons/obj/modern_structures.dmi'
icon_state = "billard"
frame = /obj/structure/table_frame/wood
framestack = /obj/item/stack/material/wood
framestack = /obj/item/stack/material/woodplank
buildstack = /obj/item/stack/material/cloth
flammable = TRUE
flipped = FALSE
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/transports.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
user << SPAN_NOTICE("You begin dismantling \the [src].")
if (do_after(user,25,src))
user << SPAN_NOTICE("You dismantle \the [src].") //We lose some materials in the process. Some wood and rope is no longer useful as raw.
var /obj/item/stack/material/wood/W = new /obj/item/stack/material/wood(get_turf(src))
var /obj/item/stack/material/woodplank/W = new /obj/item/stack/material/woodplank(get_turf(src))
new /obj/item/stack/material/rope(get_turf(src))
W.amount += 4 //adds 4 boards to the stack, making it 5
qdel(src)
Expand Down Expand Up @@ -554,7 +554,7 @@
if (do_after(user,25,src))
user << SPAN_NOTICE("You dismantle \the [src].") //We lose some materials in the process. Some wood is no longer useful as raw.
new /obj/item/sail(get_turf(src))
var /obj/item/stack/material/wood/W = new /obj/item/stack/material/wood(get_turf(src))
var /obj/item/stack/material/woodplank/W = new /obj/item/stack/material/woodplank(get_turf(src))
W.amount += 9 //adds 9 boards to the stack, making it 10
qdel(src)
return
Expand Down
20 changes: 10 additions & 10 deletions code/modules/1713/gunsmithing/gunsmith.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
desc = "A large wooden workbench. The gunsmith's main work tool. It has [steel_amt] steel and [wood_amt] wood on it."

/obj/structure/gunbench/attackby(obj/item/P as obj, mob/living/human/user as mob)
if (istype(P, /obj/item/stack/material/wood))
if (istype(P, /obj/item/stack/material/woodplank))
user << "You begin cutting the wood..."
playsound(loc, 'sound/effects/woodfile.ogg', 100, TRUE)
if (do_after(user,15*P.amount,src))
Expand Down Expand Up @@ -135,7 +135,7 @@
if ("6.5x50mm small rifle")
P.caliber = "a65x50"
P.ammo_type = /obj/item/ammo_casing/a65x50

if (".45 Colt")
P.caliber = "a45"
P.ammo_type = /obj/item/ammo_casing/a45
Expand Down Expand Up @@ -203,7 +203,7 @@
if (!found)
user << "You don't have enough money to make a new blueprint! You need 50 gold coins or equivalent in one of your hands."
return FALSE

////////////////STOCK///////////////////////////////
var/list/display = list("Cancel")
if (map.ordinal_age == 5)
Expand All @@ -212,7 +212,7 @@
display = list("Rifle Wooden Stock","Carbine Wooden Stock", "Pistol Grip", "Steel Stock", "Cancel")
else if (map.ordinal_age >= 7)
display = list("Rifle Wooden Stock","Carbine Wooden Stock", "Pistol Grip", "Steel Stock", "Folding Stock", "Cancel")

var/choice_stock = WWinput(user, "Choose the Stock:", "Gunsmith - [steel_amt] steel, [wood_amt] wood", "Cancel", display)
current_gun = new /obj/item/weapon/gun/projectile/custom(src)
switch (choice_stock)
Expand Down Expand Up @@ -308,7 +308,7 @@
if (choice_receiver == "Open-Bolt (large)" && map.ordinal_age >= 6)
display3 = list("Internal Magazine", "External Magazine", "Large External Magazine", "Open (Belt-Fed)")
if (choice_receiver == "Bolt-Action" || choice_receiver =="Semi-Auto (large)" && map.ordinal_age >= 6)
display3 = list("Internal Magazine", "Tubular", "External Magazine", "Large External Magazine")
display3 = list("Internal Magazine", "Tubular", "External Magazine", "Large External Magazine")
display3 += "Cancel"
var/choice_feeding = WWinput(user, "Choose the feeding system:", "Gunsmith - [using_steel]/[steel_amt] steel, [using_wood]/[wood_amt] wood", "Cancel", display3)
switch (choice_feeding)
Expand Down Expand Up @@ -400,7 +400,7 @@

if ("Open-Bolt (small)","Revolver","Semi-Auto (small)")
caliberlist = list("9x19 Parabellum","9x18 Makarov","8x22mmB nambu","9x22mm nambu","7.62x38mmR",".45 Colt")

if ("Open-Bolt (large)")
caliberlist = list("7.7x58mm arisaka","6.5x50mm arisaka","7.62x54mmR")

Expand All @@ -424,7 +424,7 @@

if ("Open-Bolt (small)","Revolver","Semi-Auto (small)")
caliberlist = list("9x19 Parabellum", "9x18 Makarov", ".45 Colt")

if ("Open-Bolt (large)")
caliberlist = list("7.62x39mm intermediate rifle", "5.56x45mm intermediate rifle")

Expand Down Expand Up @@ -536,7 +536,7 @@
if ("Triple Selective Fire")
current_gun.override_icon = 'icons/obj/guns/assault_rifles.dmi'
possible_list = list("Cancel", "m16","m16a2","m16a4","m4", "m4mws", "hk417", "scarl", "scarh", "ar15", "mk18", "mk18tan", "sigsauer")

var/dst = WWinput(user, "Choose the gun's look:", "Gunsmithing", "Cancel", possible_list)
if (dst != "Cancel" && dst != null)
current_gun.override_sprite = dst
Expand Down Expand Up @@ -1400,7 +1400,7 @@
good_mags = list(/obj/item/ammo_magazine/emptymagazine/rifle,/obj/item/ammo_magazine/emptymagazine/rifle/m16/filled)
else if (caliber == "a762x39")
good_mags = list(/obj/item/ammo_magazine/emptymagazine/rifle,/obj/item/ammo_magazine/emptymagazine/rifle/ak47/filled)
else
else
good_mags = list(/obj/item/ammo_magazine/emptymagazine/rifle)
if ("Large External Magazine")
load_method = MAGAZINE
Expand Down Expand Up @@ -1486,7 +1486,7 @@
stock_img = image("icon" = src.icon, "icon_state" = "[src.stock_type]")
else
stock_img = image("icon" = src.icon, "icon_state" = "none")

if (!bolt_open)
receiver_img = image("icon" = src.icon, "icon_state" = "[src.receiver_type]")
else
Expand Down
2 changes: 1 addition & 1 deletion code/modules/1713/machinery/engines/heatsource.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
user << "You place \the [W] in \the [src], refueling it."
qdel(W)
return
else if (istype(W, /obj/item/stack/material/wood))
else if (istype(W, /obj/item/stack/material/wood) || istype(W, /obj/item/stack/material/woodplank))
fuel += (60)*W.amount
user << "You place \the [W] in \the [src], refueling it."
qdel(W)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/obj/structure/vehicleparts/frame/ship/attackby(var/obj/item/I, var/mob/living/human/H)
if (!I || !H)
return
if (((istype (I, /obj/item/stack/material/wood) && !istype(src, /obj/structure/vehicleparts/frame/ship/steel)) || (istype (I, /obj/item/stack/material/steel) && istype(src, /obj/structure/vehicleparts/frame/ship/steel))) && !axis)
if (((istype (I, /obj/item/stack/material/wood || /obj/item/stack/material/woodplank) && !istype(src, /obj/structure/vehicleparts/frame/ship/steel)) || (istype (I, /obj/item/stack/material/steel) && istype(src, /obj/structure/vehicleparts/frame/ship/steel))) && !axis)
var/obj/item/stack/material/S = I
var/list/optlist = list("Cancel")
if (w_left[1] == "")
Expand Down
Loading

0 comments on commit 540999c

Please sign in to comment.