Finishes thunderstorms.

This commit is contained in:
Neerti
2018-07-31 14:45:26 -04:00
parent 8639d49c34
commit 6bdf355e6d
21 changed files with 138 additions and 34 deletions
+7 -3
View File
@@ -52,12 +52,12 @@
animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING)
// Used when the tree gets hurt.
/obj/structure/flora/tree/proc/adjust_health(var/amount, var/is_ranged = FALSE)
/obj/structure/flora/tree/proc/adjust_health(var/amount, var/damage_wood = FALSE)
if(is_stump)
return
// Bullets and lasers ruin some of the wood
if(is_ranged && product_amount > 0)
if(damage_wood && product_amount > 0)
var/wood = initial(product_amount)
product_amount -= round(wood * (abs(amount)/max_health))
@@ -90,12 +90,16 @@
set_light(0)
/obj/structure/flora/tree/ex_act(var/severity)
adjust_health(-(max_health / severity))
adjust_health(-(max_health / severity), TRUE)
/obj/structure/flora/tree/bullet_act(var/obj/item/projectile/Proj)
if(Proj.get_structure_damage())
adjust_health(-Proj.get_structure_damage(), TRUE)
/obj/structure/flora/tree/tesla_act(power, explosive)
adjust_health(-power / 100, TRUE) // Kills most trees in one lightning strike.
..()
/obj/structure/flora/tree/get_description_interaction()
var/list/results = list()