mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-22 08:01:16 +00:00
Merge pull request #5459 from Neerti/storm_enhancements
Makes Storms Thunderous
This commit is contained in:
@@ -46,4 +46,21 @@
|
||||
|
||||
/obj/effect/temporary_effect/shuttle_landing/initialize()
|
||||
flick("shuttle_warning", src) // flick() forces the animation to always begin at the start.
|
||||
. = ..()
|
||||
|
||||
// The manifestation of Zeus's might. Or just a really unlucky day.
|
||||
// This is purely a visual effect, this isn't the part of the code that hurts things.
|
||||
/obj/effect/temporary_effect/lightning_strike
|
||||
name = "lightning"
|
||||
desc = "How <i>shocked</i> you must be, to see this text. You must have <i>lightning</i> reflexes. \
|
||||
The humor in this description is just so <i>electrifying</i>."
|
||||
icon = 'icons/effects/96x256.dmi'
|
||||
icon_state = "lightning_strike"
|
||||
plane = PLANE_LIGHTING_ABOVE
|
||||
time_to_die = 1 SECOND
|
||||
pixel_x = -32
|
||||
|
||||
/obj/effect/temporary_effect/lightning_strike/initialize()
|
||||
icon_state += "[rand(1,2)]" // To have two variants of lightning sprites.
|
||||
animate(src, alpha = 0, time = time_to_die - 1)
|
||||
. = ..()
|
||||
@@ -4,7 +4,7 @@
|
||||
anchored = 1
|
||||
density = 1
|
||||
pixel_x = -16
|
||||
plane = MOB_LAYER // You know what, let's play it safe.
|
||||
plane = MOB_PLANE // You know what, let's play it safe.
|
||||
layer = ABOVE_MOB_LAYER
|
||||
var/base_state = null // Used for stumps.
|
||||
var/health = 200 // Used for chopping down trees.
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -130,6 +130,9 @@
|
||||
if ("mechstep") soundin = pick('sound/mecha/mechstep1.ogg', 'sound/mecha/mechstep2.ogg')
|
||||
if ("geiger") soundin = pick('sound/items/geiger1.ogg', 'sound/items/geiger2.ogg', 'sound/items/geiger3.ogg', 'sound/items/geiger4.ogg', 'sound/items/geiger5.ogg')
|
||||
if ("geiger_weak") soundin = pick('sound/items/geiger_weak1.ogg', 'sound/items/geiger_weak2.ogg', 'sound/items/geiger_weak3.ogg', 'sound/items/geiger_weak4.ogg')
|
||||
if ("thunder") soundin = pick('sound/effects/thunder/thunder1.ogg', 'sound/effects/thunder/thunder2.ogg', 'sound/effects/thunder/thunder3.ogg', 'sound/effects/thunder/thunder4.ogg',
|
||||
'sound/effects/thunder/thunder5.ogg', 'sound/effects/thunder/thunder6.ogg', 'sound/effects/thunder/thunder7.ogg', 'sound/effects/thunder/thunder8.ogg', 'sound/effects/thunder/thunder9.ogg',
|
||||
'sound/effects/thunder/thunder10.ogg')
|
||||
return soundin
|
||||
|
||||
//Are these even used?
|
||||
|
||||
Reference in New Issue
Block a user