diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index 57677bdfec9..5614b8ef4c4 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -9,6 +9,29 @@ density = 1 pixel_x = -16 layer = 9 + var/cut = FALSE + var/log_amount = 10 + +/obj/structure/flora/tree/attackby(obj/item/weapon/W, mob/user, params) + if(!cut && log_amount) + if(W.sharpness && W.force > 0) + if(W.hitsound) + playsound(get_turf(src), W.hitsound, 100, 0, 0) + user.visible_message("[user] begins to cut down [src] with [W].","You begin to cut down [src] with [W].", "You hear the sound of cutting a tree.") + if(do_after(user, 1000/W.force, target = user)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard. + user.visible_message("[user] falls [src] with the [W].","You fall [src] with the [W].", "You hear the sound of a tree falling.") + playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0) + icon_state = "tree_stump" + name = "stump" + cut = TRUE + for(var/i=1 to log_amount) + new /obj/item/weapon/grown/log/tree(get_turf(src)) + + else + ..() + + + /obj/structure/flora/tree/pine name = "pine tree" @@ -21,7 +44,6 @@ /obj/structure/flora/tree/pine/xmas name = "xmas tree" - icon = 'icons/obj/flora/pinetrees.dmi' icon_state = "pine_c" /obj/structure/flora/tree/pine/xmas/New() @@ -32,7 +54,7 @@ icon = 'icons/obj/flora/deadtrees.dmi' icon_state = "tree_1" -/obj/structure/flora/tree/festivus +/obj/structure/festivus name = "festivus pole" icon = 'icons/obj/flora/pinetrees.dmi' icon_state = "festivus_pole" diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index 4e23cbc7172..7a6a83b28ea 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -68,7 +68,7 @@ /obj/item/weapon/grown/log/attackby(obj/item/weapon/W, mob/user, params) ..() - if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy) || istype(W, /obj/item/weapon/twohanded/required/chainsaw)) + if(W.sharpness) user.show_message("You make [plank_name] out of \the [src]!", 1) var/obj/item/stack/plank = new plank_type(user.loc, 1 + round(potency / 25)) var/old_plank_amount = plank.amount @@ -92,6 +92,11 @@ else usr << "You must dry this first!" +/obj/item/weapon/grown/log/tree + seed = null + name = "wood log" + desc = "TIMMMMM-BERRRRRRRRRRR!" + /obj/item/weapon/grown/log/steel seed = /obj/item/seeds/steelmycelium name = "steel-cap log" diff --git a/icons/obj/flora/deadtrees.dmi b/icons/obj/flora/deadtrees.dmi index f76ffd442f9..25494901afc 100644 Binary files a/icons/obj/flora/deadtrees.dmi and b/icons/obj/flora/deadtrees.dmi differ diff --git a/icons/obj/flora/pinetrees.dmi b/icons/obj/flora/pinetrees.dmi index 600c0354bf8..e7fa58cb1a9 100644 Binary files a/icons/obj/flora/pinetrees.dmi and b/icons/obj/flora/pinetrees.dmi differ