mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #5587 from Anewbe/wind
Wind in storms slightly nerfed
This commit is contained in:
@@ -279,13 +279,13 @@ var/datum/planet/sif/planet_sif = null
|
|||||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||||
if(U.open)
|
if(U.open)
|
||||||
if(show_message)
|
if(show_message)
|
||||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella</span>")
|
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||||
continue
|
continue
|
||||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||||
if(U.open)
|
if(U.open)
|
||||||
if(show_message)
|
if(show_message)
|
||||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella</span>")
|
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
L.water_act(1)
|
L.water_act(1)
|
||||||
@@ -299,6 +299,8 @@ var/datum/planet/sif/planet_sif = null
|
|||||||
temp_low = 233.15 // -40c
|
temp_low = 233.15 // -40c
|
||||||
light_modifier = 0.3
|
light_modifier = 0.3
|
||||||
flight_failure_modifier = 10
|
flight_failure_modifier = 10
|
||||||
|
effect_message = "<span class='warning'>Rain falls on you, drenching you in water.</span>"
|
||||||
|
|
||||||
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
||||||
var/min_lightning_cooldown = 5 SECONDS
|
var/min_lightning_cooldown = 5 SECONDS
|
||||||
var/max_lightning_cooldown = 1 MINUTE
|
var/max_lightning_cooldown = 1 MINUTE
|
||||||
@@ -325,22 +327,41 @@ var/datum/planet/sif/planet_sif = null
|
|||||||
if(!T.outdoors)
|
if(!T.outdoors)
|
||||||
continue // They're indoors, so no need to rain on them.
|
continue // They're indoors, so no need to rain on them.
|
||||||
|
|
||||||
// If they have an open umbrella, it'll get stolen by the wind
|
// Lazy wind code
|
||||||
|
if(prob(10))
|
||||||
|
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||||
|
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||||
|
if(U.open)
|
||||||
|
to_chat(L, "<span class='danger'>You struggle to keep hold of your umbrella!</span>")
|
||||||
|
L.Stun(20) // This is not nearly as long as it seems
|
||||||
|
playsound(L, 'sound/effects/rustle1.ogg', 100, 1) // Closest sound I've got to "Umbrella in the wind"
|
||||||
|
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||||
|
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||||
|
if(U.open)
|
||||||
|
to_chat(L, "<span class='danger'>A gust of wind yanks the umbrella from your hand!</span>")
|
||||||
|
playsound(L, 'sound/effects/rustle1.ogg', 100, 1)
|
||||||
|
L.drop_from_inventory(U)
|
||||||
|
U.toggle_umbrella()
|
||||||
|
U.throw_at(get_edge_target_turf(U, pick(alldirs)), 8, 1, L)
|
||||||
|
|
||||||
|
// If they have an open umbrella, it'll guard from rain
|
||||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||||
if(U.open)
|
if(U.open)
|
||||||
to_chat(L, "<span class='warning'>A gust of wind yanks the umbrella from your hand!</span>")
|
if(show_message)
|
||||||
L.drop_from_inventory(U)
|
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||||
U.throw_at(get_edge_target_turf(U, pick(alldirs)), 8, 1, L)
|
continue
|
||||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||||
if(U.open)
|
if(U.open)
|
||||||
to_chat(L, "<span class='warning'>A gust of wind yanks the umbrella from your hand!</span>")
|
if(show_message)
|
||||||
L.drop_from_inventory(U)
|
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||||
U.throw_at(get_edge_target_turf(U, pick(alldirs)), 8, 1, L)
|
continue
|
||||||
|
|
||||||
|
|
||||||
L.water_act(2)
|
L.water_act(2)
|
||||||
to_chat(L, "<span class='warning'>Rain falls on you, drenching you in water.</span>")
|
if(show_message)
|
||||||
|
to_chat(L, effect_message)
|
||||||
|
|
||||||
handle_lightning()
|
handle_lightning()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user