Added a "lights out" event.
 Flashlights
Red toolboxes now have only a 50% chance to spawn a flashlight (to add diversity and make the lights out event less easy to circumvent).
 Explosions
Explosions are now round. This is quite a big balance change, so it's subject to change in the future.
 Hydroponics
Hopefully fixed the bug with invading weeds etc being unharvestable.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1516 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
uporotiy
2011-05-02 12:22:31 +00:00
parent f05a9843af
commit a2f55ddf6c
6 changed files with 6631 additions and 6583 deletions

View File

@@ -11,9 +11,10 @@
start_events()
/proc/event()
switch(pick(1,2,4,5,6,7,8,9,10))
event = 1
switch(pick(1,2,4,5,6,7,8,9,10,11))
if(1)
event = 1
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('meteors.ogg')
spawn(100)
@@ -24,7 +25,6 @@
meteor_wave()
if(2)
event = 1
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('granomalies.ogg')
var/turf/T = pick(blobstart)
@@ -33,7 +33,6 @@
del(bh)
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
event = 1
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('spanomalies.ogg')
var/list/turfs = new
@@ -55,7 +54,6 @@
spawn(rand(300,600))
del(P)
if(4)
event = 1
command_alert("Confirmed anomaly type SPC-MGM-152 aboard [station_name()]. All personnel must destroy the anomaly.", "Anomaly Alert")
world << sound('outbreak5.ogg')
var/turf/T = pick(blobstart)
@@ -73,23 +71,19 @@
//start loop here
if(5)
event = 1
high_radiation_event()
if(6)
event = 1
viral_outbreak()
if(7)
event = 1
alien_infestation()
if(8)
event = 1
prison_break()
if(9)
event = 1
carp_migration()
if(10)
event = 1
immovablerod()
if(11)
lightsout(1,2)
/proc/dotheblobbaby()
if (blobevent)
@@ -339,4 +333,34 @@
new /obj/livestock/spesscarp/elite(C.loc)
sleep(100)
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
world << sound('commandreport.ogg')
world << sound('commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
command_alert("In order to help fight Space Global Warming and conserve power, the lighting will be deactivated in some areas. Thank you for your understanding.","Budget Cuts Alert")
if(lightsoutAmount)
var/list/epicentreList = list()
for(var/i=1,i<=lightsoutAmount,i++)
var/list/possibleEpicentres = list()
for(var/obj/landmark/newEpicentre in world)
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
possibleEpicentres += newEpicentre
if(possibleEpicentres.len)
epicentreList += pick(possibleEpicentres)
else
break
if(!epicentreList.len)
return
for(var/obj/landmark/epicentre in epicentreList)
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
apc.overload_lighting()
else
for(var/obj/machinery/power/apc/apc in world)
apc.overload_lighting()
return

View File

@@ -25,6 +25,9 @@
obj/machinery/hydroponics/process()
if(myseed && !(myseed in contents))
contents += myseed
if(world.time > (src.lastcycle + src.cycledelay))
src.lastcycle = world.time
if(src.planted && !src.dead)
@@ -309,8 +312,6 @@ obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant!
else
return
contents += myseed
src.dead = 0
src.hardmutate()
src.planted = 1

View File

@@ -1,3 +1,5 @@
var/roundExplosions = 1
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
if(!epicenter) return
spawn(0)
@@ -15,7 +17,16 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
E.set_up(epicenter)
E.start()
for(var/turf/T in range(light_impact_range, epicenter))
var/list/exTurfs = list()
if(roundExplosions)
for(var/turf/T in circlerange(epicenter,light_impact_range))
exTurfs += T
else
for(var/turf/T in range(light_impact_range, epicenter))
exTurfs += T
for(var/turf/T in exTurfs)
var/distance = get_dist(epicenter, T)
if(distance < 0)
distance = 0

View File

@@ -8,7 +8,8 @@
..()
new /obj/item/weapon/crowbar/red(src)
new /obj/item/weapon/extinguisher(src)
new /obj/item/device/flashlight(src)
if(prob(50))
new /obj/item/device/flashlight(src)
new /obj/item/device/radio(src)
/obj/item/weapon/storage/toolbox/mechanical/New()

View File

@@ -1140,6 +1140,12 @@ var/showadminmessages = 1
if("prison_break")
message_admins("[key_name_admin(usr)] has allowed a prison break", 1)
prison_break()
if("lightsout")
message_admins("[key_name_admin(usr)] has broke a lot of lights", 1)
lightsout(1,2)
if("blackout")
message_admins("[key_name_admin(usr)] broke all lights", 1)
lightsout(0,0)
if("virus")
if(alert("Do you want this to be a random disease or do you have something in mind?",,"Random","Choose")=="Random")
viral_outbreak()
@@ -1611,6 +1617,7 @@ var/showadminmessages = 1
<A href='?src=\ref[src];secretsfun=prison_break'>Trigger a Prison Break</A><BR>
<A href='?src=\ref[src];secretsfun=virus'>Trigger a Virus Outbreak</A><BR>
<A href='?src=\ref[src];secretsfun=immovable'>Spawn an Immovable Rod</A><BR>
<A href='?src=\ref[src];secretsfun=lightsout'>Toggle a "lights out" event</A><BR>
<BR>
<B>Fun Secrets</B><BR>
<BR>
@@ -1633,7 +1640,8 @@ var/showadminmessages = 1
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
<A href='?src=\ref[src];secretsfun=moveadminshuttle'>Move Administration Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR><BR>"}
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR><BR>"}
//<A href='?src=\ref[src];secretsfun=shockwave'>Station Shockwave</A><BR>
if(lvl >= 5)

File diff suppressed because it is too large Load Diff