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

View File

@@ -312,32 +312,6 @@ datum/weather/sif
var/turf/T = pick(holder.our_planet.planet_floors) // This has the chance to 'strike' the sky, but that might be a good thing, to scare reckless pilots.
lightning_strike(T)
// This is global until I can figure out a better place for it.
// T is the turf that is being struck. If cosmetic is true, the lightning won't actually hurt anything.
/proc/lightning_strike(turf/T, cosmetic = FALSE)
world << "Going to strike turf [T] ([T.x],[T.y],[T.z])."
// First, visuals.
// Do a lightning flash for the whole planet, if the turf belongs to a planet.
var/datum/planet/P = null
P = SSplanets.z_to_planet[T.z]
if(P)
world << "Planet [P] ([P.name]) is hopefully not null."
var/datum/weather_holder/holder = P.weather_holder
world << "Weather holder is hopefully not null."
flick("lightning_flash", holder.special_visuals)
// Now make the lightning strike sprite. It will delete itself in a second.
new /obj/effect/temporary_effect/lightning_strike(T)
// Todo: Thunder.
if(cosmetic) // Everything beyond here involves damaging things. If we don't want to do that, stop now.
return
// Test verb
/mob/verb/test_lightning()
lightning_strike(get_turf(src))
/datum/weather/sif/hail
name = "hail"
icon_state = "hail"

View File

@@ -93,5 +93,4 @@
// This is for special effects for specific types of weather, such as lightning flashes in a storm.
// It's a seperate object to allow the use of flick().
/atom/movable/weather_visuals/special
plane = PLANE_LIGHTING_ABOVE
alpha = 127
plane = PLANE_LIGHTING_ABOVE