mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
You can now cut down trees! You can use anything sharp to do so, and it will produce 10 logs. The more force the item has, the faster it cuts.
This commit is contained in:
@@ -13,7 +13,25 @@
|
||||
var/log_amount = 10
|
||||
|
||||
/obj/structure/flora/tree/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.sharpness ==
|
||||
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("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "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("<span class='notice'>[user] falls [src] with the [W].</span>","<span class='notice'>You fall [src] with the [W].</span>", "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"
|
||||
|
||||
@@ -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("<span class='notice'>You make [plank_name] out of \the [src]!</span>", 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 << "<span class ='warning'>You must dry this first!</span>"
|
||||
|
||||
/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"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Reference in New Issue
Block a user