mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Ports TG's Weather System
This commit is contained in:
@@ -83,6 +83,9 @@
|
||||
<A href='?src=\ref[src];secretsfun=securitylevel3'>Security Level - Gamma</A>
|
||||
<A href='?src=\ref[src];secretsfun=securitylevel4'>Security Level - Epsilon</A>
|
||||
<A href='?src=\ref[src];secretsfun=securitylevel5'>Security Level - Delta</A><BR>
|
||||
<b>Create Weather</b><BR>
|
||||
<A href='?src=\ref[src];secretsfun=weatherashstorm'>Weather - Ash Storm</A>
|
||||
<A href='?src=\ref[src];secretsfun=weatherdarkness'>Weather - Advanced Darkness</A>
|
||||
<BR>
|
||||
</center>"}
|
||||
|
||||
|
||||
@@ -2548,60 +2548,11 @@
|
||||
L.fix()
|
||||
message_admins("[key_name_admin(usr)] fixed all lights", 1)
|
||||
if("floorlava")
|
||||
if(floorIsLava)
|
||||
to_chat(usr, "The floor is lava already.")
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","LF")
|
||||
|
||||
//Options
|
||||
var/length = input(usr, "How long will the lava last? (in seconds)", "Length", 180) as num
|
||||
length = min(abs(length), 1200)
|
||||
|
||||
var/damage = input(usr, "How deadly will the lava be?", "Damage", 2) as num
|
||||
damage = min(abs(damage), 100)
|
||||
|
||||
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "YES!", "Nah")
|
||||
if(sure == "Nah")
|
||||
return
|
||||
floorIsLava = 1
|
||||
|
||||
message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.", 1)
|
||||
|
||||
for(var/turf/simulated/floor/F in world)
|
||||
if((F.z in config.station_levels))
|
||||
F.name = "lava"
|
||||
F.desc = "The floor is LAVA!"
|
||||
F.overlays += "lava"
|
||||
F.lava = 1
|
||||
|
||||
spawn(0)
|
||||
for(var/i = i, i < length, i++) // 180 = 3 minutes
|
||||
if(damage)
|
||||
for(var/mob/living/carbon/L in living_mob_list)
|
||||
if(istype(L.loc, /turf/simulated/floor)) // Are they on LAVA?!
|
||||
var/turf/simulated/floor/F = L.loc
|
||||
if(F.lava)
|
||||
var/safe = 0
|
||||
for(var/obj/structure/O in F.contents)
|
||||
if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor!
|
||||
safe = 1
|
||||
break
|
||||
if(!safe)
|
||||
L.adjustFireLoss(damage)
|
||||
|
||||
|
||||
sleep(10)
|
||||
|
||||
for(var/turf/simulated/floor/F in world) // Reset everything.
|
||||
if((F.z in config.station_levels))
|
||||
F.name = initial(F.name)
|
||||
F.desc = initial(F.desc)
|
||||
F.overlays.Cut()
|
||||
F.lava = 0
|
||||
F.update_icon()
|
||||
floorIsLava = 0
|
||||
return
|
||||
weather_master.run_weather("the floor is lava")
|
||||
if("weatherashstorm")
|
||||
weather_master.run_weather("ash storm")
|
||||
if("weatherdarkness")
|
||||
weather_master.run_weather("advanced darkness")
|
||||
if("retardify")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","RET")
|
||||
|
||||
Reference in New Issue
Block a user