mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
Finishes thunderstorms.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user