mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Adds woodcutting mechanics (#15906)
* we out there cutting * Fix * changelog * more wood cutting * stump * cool icons * suggestions * the log
This commit is contained in:
@@ -294,3 +294,13 @@
|
||||
new /datum/stack_recipe("leather briefcase", /obj/item/storage/briefcase/real, 4, 1, time = 20),
|
||||
new /datum/stack_recipe("leather whip", /obj/item/melee/whip, 15, 1, time = 20)
|
||||
))
|
||||
|
||||
/material/wood/log/generate_recipes()
|
||||
recipes = list()
|
||||
recipes += new/datum/stack_recipe("bonfire", /obj/structure/bonfire, 3, time = 50, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("log bench", /obj/structure/flora/log_bench, 2, time = 20, one_per_turf = 1, on_floor = 1)
|
||||
|
||||
/material/wood/branch/generate_recipes()
|
||||
recipes = list()
|
||||
recipes += new/datum/stack_recipe("bonfire", /obj/structure/bonfire, 10, time = 50, one_per_turf = 1, on_floor = 1)
|
||||
recipes += new/datum/stack_recipe("torch handle", /obj/item/torch, 1, time = 15, one_per_turf = 0, on_floor = 0)
|
||||
@@ -374,22 +374,44 @@
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/material/woodlog
|
||||
/obj/item/stack/material/wood/log
|
||||
name = "log"
|
||||
icon_state = "sheet-wood"
|
||||
icon_state = "sheet-log"
|
||||
default_type = MATERIAL_WOOD_LOG
|
||||
max_amount = 25
|
||||
icon_has_variants = TRUE
|
||||
var/chopping
|
||||
|
||||
/obj/item/stack/material/woodlog/full/Initialize()
|
||||
/obj/item/stack/material/wood/log/full/Initialize()
|
||||
. = ..()
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/material/woodbranch
|
||||
name = "branch"
|
||||
icon_state = "sheet-wood"
|
||||
default_type = MATERIAL_WOOD_BRANCH
|
||||
/obj/item/stack/material/wood/log/attackby(obj/item/I, mob/user)
|
||||
if(I.can_woodcut() && isturf(loc) && !chopping)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
chopping = TRUE
|
||||
visible_message(SPAN_NOTICE("\The [user] begins chopping \the [src] into planks."),
|
||||
SPAN_NOTICE("You begin chopping \the [src] into planks."))
|
||||
playsound(get_turf(src), 'sound/effects/woodcutting.ogg', 50, 1)
|
||||
if(do_after(user, 70))
|
||||
if(amount && Adjacent(user))
|
||||
use(1)
|
||||
var/obj/item/stack/material/wood/W = new(get_turf(user))
|
||||
W.amount = rand(2,3)
|
||||
chopping = FALSE
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/stack/material/woodbranch/full/Initialize()
|
||||
/obj/item/stack/material/wood/branch
|
||||
name = "branch"
|
||||
icon_state = "sheet-branch"
|
||||
default_type = MATERIAL_WOOD_BRANCH
|
||||
max_amount = 25
|
||||
icon_has_variants = TRUE
|
||||
|
||||
/obj/item/stack/material/wood/branch/full/Initialize()
|
||||
. = ..()
|
||||
amount = max_amount
|
||||
update_icon()
|
||||
|
||||
@@ -763,7 +763,7 @@
|
||||
|
||||
/material/wood/log //This is gonna replace wood planks in a way for NBT, leaving it here for now
|
||||
name = MATERIAL_WOOD_LOG
|
||||
stack_type = /obj/item/stack/material/woodlog
|
||||
stack_type = /obj/item/stack/material/wood/log
|
||||
icon_colour = "#824B28"
|
||||
integrity = 50
|
||||
icon_base = "solid"
|
||||
@@ -774,22 +774,22 @@
|
||||
melting_point = T0C+380
|
||||
ignition_point = T0C+328
|
||||
destruction_desc = "splinters"
|
||||
sheet_singular_name = "log"
|
||||
sheet_plural_name = "logs"
|
||||
sheet_singular_name = "pice"
|
||||
sheet_plural_name = "piles"
|
||||
|
||||
/material/wood/branch
|
||||
name = MATERIAL_WOOD_BRANCH
|
||||
stack_type = /obj/item/stack/material/woodbranch
|
||||
stack_type = /obj/item/stack/material/wood/branch
|
||||
icon_colour = "#824B28"
|
||||
integrity = 50
|
||||
integrity = 10
|
||||
icon_base = "solid"
|
||||
explosion_resistance = 0
|
||||
hardness = 0.1
|
||||
weight = 7
|
||||
melting_point = T0C+220
|
||||
ignition_point = T0C+218
|
||||
sheet_singular_name = "branch"
|
||||
sheet_plural_name = "branch"
|
||||
sheet_singular_name = "bundle"
|
||||
sheet_plural_name = "bundle"
|
||||
|
||||
/material/rust
|
||||
name = MATERIAL_RUST
|
||||
|
||||
Reference in New Issue
Block a user