This commit is contained in:
Tastyfish
2012-01-04 23:01:22 -05:00
parent f6706ef333
commit a2ff049861
52 changed files with 4258 additions and 3884 deletions

View File

@@ -10,6 +10,7 @@
anchored = 1.0
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
var/obj/machinery/alarm/current = ""
var/overridden = 0 //not set yet, can't think of a good way to do it
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
if(..())
@@ -36,7 +37,7 @@
return ""
var/dat = "<h3>[current.name]</h3><hr>"
dat += current.return_status()
if(current.remote_control)
if(current.remote_control || overridden && current.rcon_setting)
dat += "<hr>[src.return_controls()]"
return dat

View File

@@ -6,7 +6,9 @@
var/list/CustomItemList = list(
// ckey real_name item path
// list("miniature","Dave Booze",/obj/item/toy/crayonbox) //screw this i dont want crayons, it's an example okay
list("skymarshal", "Phillip Oswald", /obj/item/weapon/coin/silver) //Phillip likes to chew on cigars. Just unlit cigars, don't ask me why. Must be a clone thing. (Cigarette machines dispense cigars if they have a coin in them) --SkyMarshal
list("skymarshal", "Phillip Oswald", /obj/item/weapon/coin/silver), //Phillip likes to chew on cigars. Just unlit cigars, don't ask me why. Must be a clone thing. (Cigarette machines dispense cigars if they have a coin in them) --SkyMarshal
list("spaceman96", "Trenna Seber", /obj/item/weapon/pen/multi), //For Spesss.
list("asanadas", "Book Berner", /obj/item/clothing/under/chameleon/psyche)
)
/proc/EquipCustomItems(mob/living/carbon/human/M)

View File

@@ -1,9 +0,0 @@
/obj/item/weapon/stamperaser
name = "Eraser"
desc = "Some type of eraser, you guess."
flags = FPRINT | TABLEPASS
icon = 'items.dmi'
icon_state = "zippo"
item_state = "zippo"
w_class = 1.0
m_amt = 80

View File

@@ -0,0 +1,74 @@
/obj/item/weapon/stamperaser
name = "Eraser"
desc = "Some type of eraser, you guess."
flags = FPRINT | TABLEPASS
icon = 'items.dmi'
icon_state = "zippo"
item_state = "zippo"
w_class = 1.0
m_amt = 80
/obj/item/device/jammer
name = "strange device"
desc = "It blinks and has an antenna on it. Weird."
icon_state = "t-ray0"
var/on = 0
flags = FPRINT|TABLEPASS
w_class = 1
var
list/obj/item/device/radio/Old = list()
list/obj/item/device/radio/Curr = list()
time_remaining = 5
/obj/item/device/jammer/New()
..()
time_remaining = rand(10,20) // ~2-4 BYOND seconds of use.
return
/obj/item/device/jammer/attack_self(mob/user)
if(time_remaining > 0)
on = !on
icon_state = "t-ray[on]"
if(on)
processing_objects.Add(src)
else
on = 0
icon_state = "t-ray0"
user << "It's fried itself from overuse!"
if(Old)
for(var/obj/item/device/radio/T in Old)
T.scrambleoverride = 0
Old = null
Curr = null
/obj/item/device/jammer/process()
if(!on)
processing_objects.Remove(src)
return null
Old = Curr
Curr = list()
for(var/obj/item/device/radio/T in range(3, src.loc) )
T.scrambleoverride = 1
Curr |= T
for(var/obj/item/device/radio/V in Old)
if(V == T)
Old -= V
break
for(var/obj/item/device/radio/T in Old)
T.scrambleoverride = 0
time_remaining--
if(time_remaining <= 0)
for(var/mob/O in viewers(src))
O.show_message("\red You hear a loud pop, like circuits frying.", 1)
on = 0
icon_state = "t-ray0"
sleep(2)

View File

@@ -239,7 +239,7 @@ proc/airborne_can_reach(turf/source, turf/target)
e.runeffect(mob,stage)
clicks+=speed
if(prob(5)) spread_airborne(mob)
if(prob(50)) spread_airborne(mob)
proc/cure(var/mob/living/carbon/mob)
var/datum/disease2/effectholder/E

View File

@@ -3,7 +3,7 @@
icon = 'computer.dmi'
icon_state = "dna"
var/curing
var/virusing
var/virusing = 0
var/obj/item/weapon/reagent_containers/container = null
@@ -40,6 +40,20 @@
container = I
C.drop_item()
I.loc = src
if(istype(I,/obj/item/weapon/virusdish))
if(virusing)
user << "<b>The pathogen materializer is still recharging.."
return
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
var/list/data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=null,"antibodies"=0)
data["virus2"] = I:virus2
product.reagents.add_reagent("blood",30,data)
virusing = 1
spawn(1200) virusing = 0
state("The [src.name] Buzzes", "blue")
//else
src.attack_hand(user)

View File

@@ -46,4 +46,4 @@
// comment out the line below when debugging locally to enable the options & messages menu
control_freak = 1
//control_freak = 1

View File

@@ -41,7 +41,7 @@ var
skipupdate = 0
///////////////
eventchance = 1 //% per 2 mins
event = 0
EventsOn = 1
hadevent = 0
blobevent = 0
///////////////
@@ -157,6 +157,8 @@ var
list/BorgIndexToFlag
list/BorgIndexToWireColor
list/BorgWireColorToIndex
list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios.
list/UnscrambledFrequencies = list( )
const/SPEED_OF_LIGHT = 3e8 //not exact but hey!
const/SPEED_OF_LIGHT_SQ = 9e+16

View File

@@ -30,6 +30,13 @@
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
/obj/item/clothing/under/chameleon/psyche
item_state = "bl_suit"
name = "psychedelic"
desc = "Groovy!"
icon_state = "psyche"
color = "psyche"
/obj/item/clothing/under/chameleon/all
/obj/item/clothing/under/color/black

View File

@@ -915,6 +915,10 @@
var/text_underline = 0
var/text_break = 0
/obj/item/weapon/pen/multi
desc = "It's a cool looking pen. Lots of colors!"
name = "multicolor pen"
/obj/item/weapon/banhammer
desc = "A banhammer"
name = "Banhammer"

View File

@@ -113,7 +113,7 @@ var/list/radiochannels = list(
var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1441,1349,1347)
var/const/COMM_FREQ = 1353 //command, colored gold in chat window
var/const/SYND_FREQ = 1213
var/NUKE_FREQ = 1199 //Never accessable except on nuke rounds.
var/NUKE_FREQ = 1199 //Never accessable except on nuke rounds, randomised on nuke rounds.
#define TRANSMISSION_WIRE 0
#define TRANSMISSION_RADIO 1
@@ -159,6 +159,13 @@ datum/controller/radio
return 1
proc/RegisterScrambler(var/Frequency)
var/datum/radio_frequency/frequency = frequencies[Frequency]
frequency.scrambled++
proc/UnregisterScrambler(var/Frequency)
var/datum/radio_frequency/frequency = frequencies[Frequency]
frequency.scrambled--
proc/return_frequency(var/frequency as num)
var/f_text = num2text(frequency)
return frequencies[f_text]
@@ -166,6 +173,7 @@ datum/controller/radio
datum/radio_frequency
var/frequency as num
var/list/list/obj/devices = list()
var/scrambled = 0
proc
post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
@@ -173,6 +181,8 @@ datum/radio_frequency
// var/N_f=0
// var/N_nf=0
// var/Nt=0
if(scrambled)
return
var/turf/start_point
if(range)
start_point = get_turf(source)

20
code/game/events/Event.dm Normal file
View File

@@ -0,0 +1,20 @@
/datum/event
var/Lifetime = 0
var/ActiveFor = 0
New()
..()
if(!Lifetime)
Lifetime = rand(30, 120)
proc
Announce()
Tick()
Die()
LongTerm()
LongTermEvent = ActiveEvent
ActiveEvent = null

View File

@@ -1,87 +1,87 @@
/obj/effect/bhole
name = "black hole"
icon = 'objects.dmi'
desc = "FUCK FUCK FUCK AAAHHH"
icon_state = "bhole2"
opacity = 0
unacidable = 1
density = 0
anchored = 1
var/datum/effect/effect/system/harmless_smoke_spread/smoke
/obj/effect/bhole/New()
src.smoke = new /datum/effect/effect/system/harmless_smoke_spread()
src.smoke.set_up(5, 0, src)
src.smoke.attach(src)
src:life()
/obj/effect/bhole/Bumped(atom/A)
if (istype(A,/mob/living))
del(A)
else
A:ex_act(1.0)
/obj/effect/bhole/proc/life() //Oh man , this will LAG
if (prob(10))
src.anchored = 0
step(src,pick(alldirs))
if (prob(30))
step(src,pick(alldirs))
src.anchored = 1
for (var/atom/X in orange(9,src))
if ((istype(X,/obj) || istype(X,/mob/living)) && prob(7))
if (!X:anchored)
step_towards(X,src)
for (var/atom/B in orange(7,src))
if (istype(B,/obj))
if (!B:anchored && prob(50))
step_towards(B,src)
if(prob(10)) B:ex_act(3.0)
else
B:anchored = 0
//step_towards(B,src)
//B:anchored = 1
if(prob(10)) B:ex_act(3.0)
else if (istype(B,/turf))
if (istype(B,/turf/simulated) && (prob(1) && prob(75)))
src.smoke.start()
B:ReplaceWithSpace()
else if (istype(B,/mob/living))
step_towards(B,src)
for (var/atom/A in orange(4,src))
if (istype(A,/obj))
if (!A:anchored && prob(90))
step_towards(A,src)
if(prob(30)) A:ex_act(2.0)
else
A:anchored = 0
//step_towards(A,src)
//A:anchored = 1
if(prob(30)) A:ex_act(2.0)
else if (istype(A,/turf))
if (istype(A,/turf/simulated) && prob(1))
src.smoke.start()
A:ReplaceWithSpace()
else if (istype(A,/mob/living))
step_towards(A,src)
for (var/atom/D in orange(1,src))
//if (hascall(D,"blackholed"))
// call(D,"blackholed")(null)
// continue
if (istype(D,/mob/living))
del(D)
else
D:ex_act(1.0)
spawn(17)
/obj/effect/bhole
name = "black hole"
icon = 'objects.dmi'
desc = "FUCK FUCK FUCK AAAHHH"
icon_state = "bhole2"
opacity = 0
unacidable = 1
density = 0
anchored = 1
var/datum/effect/effect/system/harmless_smoke_spread/smoke
/obj/effect/bhole/New()
src.smoke = new /datum/effect/effect/system/harmless_smoke_spread()
src.smoke.set_up(5, 0, src)
src.smoke.attach(src)
src:life()
/obj/effect/bhole/Bumped(atom/A)
if (istype(A,/mob/living))
del(A)
else
A:ex_act(1.0)
/obj/effect/bhole/proc/life() //Oh man , this will LAG
if (prob(10))
src.anchored = 0
step(src,pick(alldirs))
if (prob(30))
step(src,pick(alldirs))
src.anchored = 1
for (var/atom/X in orange(9,src))
if ((istype(X,/obj) || istype(X,/mob/living)) && prob(7))
if (!X:anchored)
step_towards(X,src)
for (var/atom/B in orange(7,src))
if (istype(B,/obj))
if (!B:anchored && prob(50))
step_towards(B,src)
if(prob(10)) B:ex_act(3.0)
else
B:anchored = 0
//step_towards(B,src)
//B:anchored = 1
if(prob(10)) B:ex_act(3.0)
else if (istype(B,/turf))
if (istype(B,/turf/simulated) && (prob(1) && prob(75)))
src.smoke.start()
B:ReplaceWithSpace()
else if (istype(B,/mob/living))
step_towards(B,src)
for (var/atom/A in orange(4,src))
if (istype(A,/obj))
if (!A:anchored && prob(90))
step_towards(A,src)
if(prob(30)) A:ex_act(2.0)
else
A:anchored = 0
//step_towards(A,src)
//A:anchored = 1
if(prob(30)) A:ex_act(2.0)
else if (istype(A,/turf))
if (istype(A,/turf/simulated) && prob(1))
src.smoke.start()
A:ReplaceWithSpace()
else if (istype(A,/mob/living))
step_towards(A,src)
for (var/atom/D in orange(1,src))
//if (hascall(D,"blackholed"))
// call(D,"blackholed")(null)
// continue
if (istype(D,/mob/living))
del(D)
else
D:ex_act(1.0)
spawn(17)
life()

View File

@@ -1,82 +1,82 @@
/*
Immovable rod random event.
The rod will spawn at some location outside the station, and travel in a straight line to the opposite side of the station
Everything solid in the way will be ex_act()'d
In my current plan for it, 'solid' will be defined as anything with density == 1
--NEOFite
*/
/obj/effect/immovablerod
name = "Immovable Rod"
desc = "What the fuck is that?"
icon = 'objects.dmi'
icon_state = "immrod"
throwforce = 100
density = 1
anchored = 1
Bump(atom/clong)
if (istype(clong, /turf))
if(clong.density)
clong.ex_act(2)
for (var/mob/O in hearers(src, null))
O.show_message("CLANG", 2)
if (istype(clong, /obj))
if(clong.density)
clong.ex_act(2)
for (var/mob/O in hearers(src, null))
O.show_message("CLANG", 2)
if (istype(clong, /mob))
if(clong.density || prob(10))
clong.meteorhit(src)
if(clong && prob(25))
src.loc = clong.loc
/proc/immovablerod()
var/startx = 0
var/starty = 0
var/endy = 0
var/endx = 0
var/startside = pick(cardinal)
switch(startside)
if(NORTH)
starty = 187
startx = rand(41, 199)
endy = 38
endx = rand(41, 199)
if(EAST)
starty = rand(38, 187)
startx = 199
endy = rand(38, 187)
endx = 41
if(SOUTH)
starty = 38
startx = rand(41, 199)
endy = 187
endx = rand(41, 199)
if(WEST)
starty = rand(38, 187)
startx = 41
endy = rand(38, 187)
endx = 199
//rod time!
var/obj/effect/immovablerod/immrod = new /obj/effect/immovablerod(locate(startx, starty, 1))
// world << "Rod in play, starting at [start.loc.x],[start.loc.y] and going to [end.loc.x],[end.loc.y]"
var/end = locate(endx, endy, 1)
spawn(0)
walk_towards(immrod, end,1)
sleep(1)
while (immrod)
if (immrod.z != 1)
immrod.z = 1
if(immrod.loc == end)
del(immrod)
sleep(10)
for(var/obj/effect/immovablerod/imm in world)
return
sleep(50)
/*
Immovable rod random event.
The rod will spawn at some location outside the station, and travel in a straight line to the opposite side of the station
Everything solid in the way will be ex_act()'d
In my current plan for it, 'solid' will be defined as anything with density == 1
--NEOFite
*/
/obj/effect/immovablerod
name = "Immovable Rod"
desc = "What the fuck is that?"
icon = 'objects.dmi'
icon_state = "immrod"
throwforce = 100
density = 1
anchored = 1
Bump(atom/clong)
if (istype(clong, /turf))
if(clong.density)
clong.ex_act(2)
for (var/mob/O in hearers(src, null))
O.show_message("CLANG", 2)
if (istype(clong, /obj))
if(clong.density)
clong.ex_act(2)
for (var/mob/O in hearers(src, null))
O.show_message("CLANG", 2)
if (istype(clong, /mob))
if(clong.density || prob(10))
clong.meteorhit(src)
if(clong && prob(25))
src.loc = clong.loc
/proc/immovablerod()
var/startx = 0
var/starty = 0
var/endy = 0
var/endx = 0
var/startside = pick(cardinal)
switch(startside)
if(NORTH)
starty = 187
startx = rand(41, 199)
endy = 38
endx = rand(41, 199)
if(EAST)
starty = rand(38, 187)
startx = 199
endy = rand(38, 187)
endx = 41
if(SOUTH)
starty = 38
startx = rand(41, 199)
endy = 187
endx = rand(41, 199)
if(WEST)
starty = rand(38, 187)
startx = 41
endy = rand(38, 187)
endx = 199
//rod time!
var/obj/effect/immovablerod/immrod = new /obj/effect/immovablerod(locate(startx, starty, 1))
// world << "Rod in play, starting at [start.loc.x],[start.loc.y] and going to [end.loc.x],[end.loc.y]"
var/end = locate(endx, endy, 1)
spawn(0)
walk_towards(immrod, end,1)
sleep(1)
while (immrod)
if (immrod.z != 1)
immrod.z = 1
if(immrod.loc == end)
del(immrod)
sleep(10)
for(var/obj/effect/immovablerod/imm in world)
return
sleep(50)
command_alert("What the fuck was that?!", "General Alert")

View File

@@ -1,119 +1,119 @@
/*
Space dust
Commonish random event that causes small clumps of "space dust" to hit the station at high speeds.
No command report on the common version of this event.
The "dust" will damage the hull of the station causin minor hull breaches.
*/
/proc/dust_swarm(var/strength = "weak")
var/numbers = 1
switch(strength)
if("weak")
numbers = rand(2,4)
for(var/i = 0 to numbers)
new/obj/effect/space_dust/weak()
if("norm")
numbers = rand(5,10)
for(var/i = 0 to numbers)
new/obj/effect/space_dust()
if("strong")
numbers = rand(10,15)
for(var/i = 0 to numbers)
new/obj/effect/space_dust/strong()
if("super")
numbers = rand(15,25)
for(var/i = 0 to numbers)
new/obj/effect/space_dust/super()
return
/obj/effect/space_dust
name = "Space Dust"
desc = "Dust in space."
icon = 'meteor.dmi'
icon_state = "space_dust"
density = 1
anchored = 1
var
strength = 2 //ex_act severity number
life = 2 //how many things we hit before del(src)
weak
strength = 3
life = 1
strong
strength = 1
life = 6
super
strength = 1
life = 40
New()
var/startx = 0
var/starty = 0
var/endy = 0
var/endx = 0
var/startside = pick(cardinal)
switch(startside)
if(NORTH)
starty = world.maxy-1
startx = rand(1, world.maxx-1)
endy = 1
endx = rand(1, world.maxx-1)
if(EAST)
starty = rand(1,world.maxy-1)
startx = world.maxx-1
endy = rand(1, world.maxy-1)
endx = 1
if(SOUTH)
starty = 1
startx = rand(1, world.maxx-1)
endy = world.maxy-1
endx = rand(1, world.maxx-1)
if(WEST)
starty = rand(1, world.maxy-1)
startx = 1
endy = rand(1,world.maxy-1)
endx = world.maxx-1
var/goal = locate(endx, endy, 1)
src.x = startx
src.y = starty
src.z = 1
spawn(0)
walk_towards(src, goal, 1)
return
Bump(atom/A)
spawn(0)
if(prob(50))
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))
shake_camera(M, 3, 1)
if (A)
playsound(src.loc, 'meteorimpact.ogg', 40, 1)
if(ismob(A))
A.meteorhit(src)//This should work for now I guess
else
A.ex_act(strength)
life--
if(life <= 0)
walk(src,0)
spawn(1)
del(src)
return 0
return
Bumped(atom/A)
Bump(A)
return
ex_act(severity)
del(src)
/*
Space dust
Commonish random event that causes small clumps of "space dust" to hit the station at high speeds.
No command report on the common version of this event.
The "dust" will damage the hull of the station causin minor hull breaches.
*/
/proc/dust_swarm(var/strength = "weak")
var/numbers = 1
switch(strength)
if("weak")
numbers = rand(2,4)
for(var/i = 0 to numbers)
new/obj/effect/space_dust/weak()
if("norm")
numbers = rand(5,10)
for(var/i = 0 to numbers)
new/obj/effect/space_dust()
if("strong")
numbers = rand(10,15)
for(var/i = 0 to numbers)
new/obj/effect/space_dust/strong()
if("super")
numbers = rand(15,25)
for(var/i = 0 to numbers)
new/obj/effect/space_dust/super()
return
/obj/effect/space_dust
name = "Space Dust"
desc = "Dust in space."
icon = 'meteor.dmi'
icon_state = "space_dust"
density = 1
anchored = 1
var
strength = 2 //ex_act severity number
life = 2 //how many things we hit before del(src)
weak
strength = 3
life = 1
strong
strength = 1
life = 6
super
strength = 1
life = 40
New()
var/startx = 0
var/starty = 0
var/endy = 0
var/endx = 0
var/startside = pick(cardinal)
switch(startside)
if(NORTH)
starty = world.maxy-1
startx = rand(1, world.maxx-1)
endy = 1
endx = rand(1, world.maxx-1)
if(EAST)
starty = rand(1,world.maxy-1)
startx = world.maxx-1
endy = rand(1, world.maxy-1)
endx = 1
if(SOUTH)
starty = 1
startx = rand(1, world.maxx-1)
endy = world.maxy-1
endx = rand(1, world.maxx-1)
if(WEST)
starty = rand(1, world.maxy-1)
startx = 1
endy = rand(1,world.maxy-1)
endx = world.maxx-1
var/goal = locate(endx, endy, 1)
src.x = startx
src.y = starty
src.z = 1
spawn(0)
walk_towards(src, goal, 1)
return
Bump(atom/A)
spawn(0)
if(prob(50))
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))
shake_camera(M, 3, 1)
if (A)
playsound(src.loc, 'meteorimpact.ogg', 40, 1)
if(ismob(A))
A.meteorhit(src)//This should work for now I guess
else
A.ex_act(strength)
life--
if(life <= 0)
walk(src,0)
spawn(1)
del(src)
return 0
return
Bumped(atom/A)
Bump(A)
return
ex_act(severity)
del(src)
return

View File

@@ -1,176 +1,176 @@
// SPACE VINE OR KUDZU
/obj/effect/spacevine
name = "Space Kudzu"
desc = "An extremely expansionistic species of vine."
icon = 'kudzu.dmi'
icon_state = "Light1"
anchored = 1
density = 0
var/energy = 0 //Energy sounds like an arbitrary-enough variable name.
var/obj/effect/spacevine_controller/master = null
New()
if(istype(src.loc, /turf/space))
del(src)
return
Del()
if(master)
master.vines -= src
master.growth_queue -= src
..()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!W) return
if (!user) return
if (istype(W, /obj/item/weapon/circular_saw)) del src
if (istype(W, /obj/item/weapon/kitchen/utensil/knife)) del src
if (istype(W, /obj/item/weapon/scalpel)) del src
if (istype(W, /obj/item/weapon/screwdriver)) del src
if (istype(W, /obj/item/weapon/shard)) del src
if (istype(W, /obj/item/weapon/weldingtool)) del src
if (istype(W, /obj/item/weapon/wirecutters)) del src
..()
/obj/effect/spacevine_controller
var/list/obj/effect/spacevine/vines = list()
var/list/growth_queue = list()
var/reached_collapse_size
var/reached_slowdown_size
//What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
//meaning if you get the kudzu's size to something less than 20 plots, it won't grow anymore.
New()
if(!istype(src.loc,/turf/simulated/floor))
del(src)
spawn_kudzu_piece(src.loc)
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
proc/spawn_kudzu_piece(var/turf/location)
var/obj/effect/spacevine/SV = new(location)
growth_queue += SV
vines += SV
SV.master = src
process()
if(!vines)
del(src) //Kudzu exterminated
return
if(!growth_queue)
del(src) //Sanity check
return
if(vines.len >= 250 && !reached_collapse_size)
reached_collapse_size = 1
if(vines.len >= 30 && !reached_slowdown_size )
reached_slowdown_size = 1
var/length = 0
if(reached_collapse_size)
length = 0
else if(reached_slowdown_size)
if(prob(25))
length = 1
else
length = 0
else
length = 1
length = min( 30 , max( length , vines.len / 5 ) )
var/i = 0
var/list/obj/effect/spacevine/queue_end = list()
for( var/obj/effect/spacevine/SV in growth_queue )
i++
queue_end += SV
growth_queue -= SV
if(SV.energy < 2)
if(prob(10))
SV.grow()
//if(prob(25))
SV.spread()
if(i >= length)
break
growth_queue = growth_queue + queue_end
//sleep(5)
//src.process()
/obj/effect/spacevine/proc/grow()
switch(energy)
if (0)
src.icon_state = pick("Med1", "Med2", "Med3")
energy = 1
src.opacity = 1
if (1)
src.icon_state = pick("Hvy1", "Hvy2", "Hvy3")
energy = 2
src.density = 1
/obj/effect/spacevine/proc/spread()
var/direction = pick(cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/F = get_step(src,direction)
if(!locate(/obj/effect/spacevine,F))
if(F.Enter(src))
if(master)
master.spawn_kudzu_piece( F )
/*
/obj/effect/spacevine/proc/Life()
if (!src) return
var/Vspread
if (prob(50)) Vspread = locate(src.x + rand(-1,1),src.y,src.z)
else Vspread = locate(src.x,src.y + rand(-1, 1),src.z)
var/dogrowth = 1
if (!istype(Vspread, /turf/simulated/floor)) dogrowth = 0
for(var/obj/O in Vspread)
if (istype(O, /obj/structure/window) || istype(O, /obj/effect/forcefield) || istype(O, /obj/effect/blob) || istype(O, /obj/effect/alien/weeds) || istype(O, /obj/effect/spacevine)) dogrowth = 0
if (istype(O, /obj/machinery/door/))
if(O:p_open == 0 && prob(50)) O:open()
else dogrowth = 0
if (dogrowth == 1)
var/obj/effect/spacevine/B = new /obj/effect/spacevine(Vspread)
B.icon_state = pick("vine-light1", "vine-light2", "vine-light3")
spawn(20)
if(B)
B.Life()
src.growth += 1
if (src.growth == 10)
src.name = "Thick Space Kudzu"
src.icon_state = pick("vine-med1", "vine-med2", "vine-med3")
src.opacity = 1
src.waittime = 80
if (src.growth == 20)
src.name = "Dense Space Kudzu"
src.icon_state = pick("vine-hvy1", "vine-hvy2", "vine-hvy3")
src.density = 1
spawn(src.waittime)
if (src.growth < 20) src.Life()
*/
/obj/effect/spacevine/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(90))
del(src)
return
if(3.0)
if (prob(50))
del(src)
return
else
return
/obj/effect/spacevine/temperature_expose(null, temp, volume)
// SPACE VINE OR KUDZU
/obj/effect/spacevine
name = "Space Kudzu"
desc = "An extremely expansionistic species of vine."
icon = 'kudzu.dmi'
icon_state = "Light1"
anchored = 1
density = 0
var/energy = 0 //Energy sounds like an arbitrary-enough variable name.
var/obj/effect/spacevine_controller/master = null
New()
if(istype(src.loc, /turf/space))
del(src)
return
Del()
if(master)
master.vines -= src
master.growth_queue -= src
..()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!W) return
if (!user) return
if (istype(W, /obj/item/weapon/circular_saw)) del src
if (istype(W, /obj/item/weapon/kitchen/utensil/knife)) del src
if (istype(W, /obj/item/weapon/scalpel)) del src
if (istype(W, /obj/item/weapon/screwdriver)) del src
if (istype(W, /obj/item/weapon/shard)) del src
if (istype(W, /obj/item/weapon/weldingtool)) del src
if (istype(W, /obj/item/weapon/wirecutters)) del src
..()
/obj/effect/spacevine_controller
var/list/obj/effect/spacevine/vines = list()
var/list/growth_queue = list()
var/reached_collapse_size
var/reached_slowdown_size
//What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
//meaning if you get the kudzu's size to something less than 20 plots, it won't grow anymore.
New()
if(!istype(src.loc,/turf/simulated/floor))
del(src)
spawn_kudzu_piece(src.loc)
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
proc/spawn_kudzu_piece(var/turf/location)
var/obj/effect/spacevine/SV = new(location)
growth_queue += SV
vines += SV
SV.master = src
process()
if(!vines)
del(src) //Kudzu exterminated
return
if(!growth_queue)
del(src) //Sanity check
return
if(vines.len >= 250 && !reached_collapse_size)
reached_collapse_size = 1
if(vines.len >= 30 && !reached_slowdown_size )
reached_slowdown_size = 1
var/length = 0
if(reached_collapse_size)
length = 0
else if(reached_slowdown_size)
if(prob(25))
length = 1
else
length = 0
else
length = 1
length = min( 30 , max( length , vines.len / 5 ) )
var/i = 0
var/list/obj/effect/spacevine/queue_end = list()
for( var/obj/effect/spacevine/SV in growth_queue )
i++
queue_end += SV
growth_queue -= SV
if(SV.energy < 2)
if(prob(10))
SV.grow()
//if(prob(25))
SV.spread()
if(i >= length)
break
growth_queue = growth_queue + queue_end
//sleep(5)
//src.process()
/obj/effect/spacevine/proc/grow()
switch(energy)
if (0)
src.icon_state = pick("Med1", "Med2", "Med3")
energy = 1
src.opacity = 1
if (1)
src.icon_state = pick("Hvy1", "Hvy2", "Hvy3")
energy = 2
src.density = 1
/obj/effect/spacevine/proc/spread()
var/direction = pick(cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/F = get_step(src,direction)
if(!locate(/obj/effect/spacevine,F))
if(F.Enter(src))
if(master)
master.spawn_kudzu_piece( F )
/*
/obj/effect/spacevine/proc/Life()
if (!src) return
var/Vspread
if (prob(50)) Vspread = locate(src.x + rand(-1,1),src.y,src.z)
else Vspread = locate(src.x,src.y + rand(-1, 1),src.z)
var/dogrowth = 1
if (!istype(Vspread, /turf/simulated/floor)) dogrowth = 0
for(var/obj/O in Vspread)
if (istype(O, /obj/structure/window) || istype(O, /obj/effect/forcefield) || istype(O, /obj/effect/blob) || istype(O, /obj/effect/alien/weeds) || istype(O, /obj/effect/spacevine)) dogrowth = 0
if (istype(O, /obj/machinery/door/))
if(O:p_open == 0 && prob(50)) O:open()
else dogrowth = 0
if (dogrowth == 1)
var/obj/effect/spacevine/B = new /obj/effect/spacevine(Vspread)
B.icon_state = pick("vine-light1", "vine-light2", "vine-light3")
spawn(20)
if(B)
B.Life()
src.growth += 1
if (src.growth == 10)
src.name = "Thick Space Kudzu"
src.icon_state = pick("vine-med1", "vine-med2", "vine-med3")
src.opacity = 1
src.waittime = 80
if (src.growth == 20)
src.name = "Dense Space Kudzu"
src.icon_state = pick("vine-hvy1", "vine-hvy2", "vine-hvy3")
src.density = 1
spawn(src.waittime)
if (src.growth < 20) src.Life()
*/
/obj/effect/spacevine/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(90))
del(src)
return
if(3.0)
if (prob(50))
del(src)
return
else
return
/obj/effect/spacevine/temperature_expose(null, temp, volume)
del src

View File

@@ -1,33 +1,33 @@
/proc/mini_blob_event()
//command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
//world << sound('outbreak5.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/blob/bl = new /obj/effect/blob( T.loc, 30 )
spawn(0)
bl.Life()
bl.Life()
bl.Life()
bl.Life()
bl.blobdebug = 1
bl.Life()
blobevent = 1
spawn(0)
dotheblobbaby()
spawn(3000)
blobevent = 0
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('outbreak5.ogg')
/proc/dotheblobbaby()
if (blobevent)
if(active_blobs.len)
for(var/i = 1 to 10)
sleep(-1)
if(!active_blobs.len) break
var/obj/effect/blob/B = pick(active_blobs)
if(B.z != 1)
continue
B.Life()
spawn(30)
/proc/mini_blob_event()
//command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
//world << sound('outbreak5.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/blob/bl = new /obj/effect/blob( T.loc, 30 )
spawn(0)
bl.Life()
bl.Life()
bl.Life()
bl.Life()
bl.blobdebug = 1
bl.Life()
blobevent = 1
spawn(0)
dotheblobbaby()
spawn(3000)
blobevent = 0
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('outbreak5.ogg')
/proc/dotheblobbaby()
if (blobevent)
if(active_blobs.len)
for(var/i = 1 to 10)
sleep(-1)
if(!active_blobs.len) break
var/obj/effect/blob/B = pick(active_blobs)
if(B.z != 1)
continue
B.Life()
spawn(30)
dotheblobbaby()

View File

@@ -0,0 +1,71 @@
/proc/power_failure()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
world << sound('poweroff.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = 0
for(var/obj/machinery/power/smes/S in world)
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
continue
S.charge = 0
S.output = 0
S.online = 0
S.updateicon()
S.power_change()
for(var/area/A in world)
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
A.power_light = 0
A.power_equip = 0
A.power_environ = 0
A.power_change()
/proc/power_restore()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
S.charge = S.capacity
S.output = 200000
S.online = 1
S.updateicon()
S.power_change()
for(var/area/A in world)
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "space" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
A.power_light = 1
A.power_equip = 1
A.power_environ = 1
A.power_change()
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 10) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
if(lightsoutAmount)
var/list/epicentreList = list()
for(var/i=1,i<=lightsoutAmount,i++)
var/list/possibleEpicentres = list()
for(var/obj/effect/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/effect/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

@@ -1,429 +1,429 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++
==================================SPACE NINJA ABILITIES====================================
___________________________________________________________________________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//=======//SAFETY CHECK//=======//
/*
X is optional, tells the proc to check for specific stuff. C is also optional.
All the procs here assume that the character is wearing the ninja suit if they are using the procs.
They should, as I have made every effort for that to be the case.
In the case that they are not, I imagine the game will run-time error like crazy.
s_cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0,X = 0)
var/mob/living/carbon/human/U = affecting
if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1.
U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die.
return 1
else if(C&&cell.charge<C*10)
U << "\red Not enough energy."
return 1
switch(X)
if(1)
cancel_stealth()//Get rid of it.
if(2)
if(s_bombs<=0)
U << "\red There are no more smoke bombs remaining."
return 1
if(3)
if(a_boost<=0)
U << "\red You do not have any more adrenaline boosters."
return 1
return (s_coold)//Returns the value of the variable which counts down to zero.
//=======//TELEPORT GRAB CHECK//=======//
/obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/U)
if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
var/obj/item/weapon/grab/G = U.get_active_hand()
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = U.get_inactive_hand()
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
return
//=======//SMOKE//=======//
/*Summons smoke in radius of user.
Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke()
set name = "Smoke Bomb"
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
set category = "Ninja Ability"
set popup_menu = 0//Will not see it when right clicking.
if(!ninjacost(,2))
var/mob/living/carbon/human/U = affecting
U << "\blue There are <B>[s_bombs]</B> smoke bombs remaining."
var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread()
smoke.set_up(10, 0, U.loc)
smoke.start()
playsound(U.loc, 'bamf.ogg', 50, 2)
s_bombs--
s_coold = 1
return
//=======//9-8 TILE TELEPORT//=======//
//Click to to teleport 9-10 tiles in direction facing.
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
set name = "Phase Jaunt (10E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 100
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
var/turf/destination = get_teleport_loc(U.loc,U,9,1,3,1,0,1)
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if(destination&&istype(mobloc, /turf))//The turf check prevents unusual behavior. Like teleporting out of cryo pods, cloners, mechs, etc.
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout",,U.dir)
handle_teleport_grab(destination, U)
U.loc = destination
spawn(0)
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
spawn(0)
destination.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
s_coold = 1
cell.charge-=(C*10)
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
//=======//RIGHT CLICK TELEPORT//=======//
//Right click to teleport somewhere, almost exactly like admin jump to turf.
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview())
set name = "Phase Shift (20E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
set category = null//So it does not show up on the panel but can still be right-clicked.
set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
var/C = 200
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if((!T.density)&&istype(mobloc, /turf))
spawn(0)
playsound(U.loc, 'sparks4.ogg', 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout",,U.dir)
handle_teleport_grab(T, U)
U.loc = T
spawn(0)
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, 'sparks2.ogg', 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
spawn(0)//Any living mobs in teleport area are gibbed.
T.kill_creatures(U)
s_coold = 1
cell.charge-=(C*10)
else
U << "\red You cannot teleport into solid walls or from solid matter"
return
//=======//EM PULSE//=======//
//Disables nearby tech equipment.
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
set name = "EM Burst (25E)"
set desc = "Disable any nearby technology with a electro-magnetic pulse."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 250
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
playsound(U.loc, 'EMPulse.ogg', 60, 2)
empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
s_coold = 2
cell.charge-=(C*10)
return
//=======//ENERGY BLADE//=======//
//Summons a blade of energy in active hand.
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
set name = "Energy Blade (5E)"
set desc = "Create a focused beam of energy in your active hand."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 50
if(!ninjacost(C))
var/mob/living/carbon/human/U = affecting
if(!kamikaze)
if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade))
var/obj/item/weapon/melee/energy/blade/W = new()
spark_system.start()
playsound(U.loc, "sparks", 50, 1)
U.put_in_hand(W)
cell.charge-=(C*10)
else
U << "\red You can only summon one blade. Try dropping an item first."
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
if(!U.get_active_hand())
var/obj/item/weapon/melee/energy/blade/W = new()
U.put_in_hand(W)
if(!U.get_inactive_hand())
var/obj/item/weapon/melee/energy/blade/W = new()
U.put_in_inactive_hand(W)
spark_system.start()
playsound(U.loc, "sparks", 50, 1)
s_coold = 1
return
//=======//NINJA STARS//=======//
/*Shoots ninja stars at random people.
This could be a lot better but I'm too tired atm.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
set name = "Energy Star (5E)"
set desc = "Launches an energy star at a random living target."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 50
if(!ninjacost(C))
var/mob/living/carbon/human/U = affecting
var/targets[] = list()//So yo can shoot while yo throw dawg
for(var/mob/living/M in oview(loc))
if(M.stat) continue//Doesn't target corpses or paralyzed persons.
targets.Add(M)
if(targets.len)
var/mob/living/target=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at.
var/turf/curloc = U.loc
var/atom/targloc = get_turf(target)
if (!targloc || !istype(targloc, /turf) || !curloc)
return
if (targloc == curloc)
return
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(U.loc)
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
cell.charge-=(C*10)
A.process()
else
U << "\red There are no targets in view."
return
//=======//ENERGY NET//=======//
/*Allows the ninja to capture people, I guess.
Must right click on a mob to activate.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs.
set name = "Energy Net (20E)"
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
set category = null
set src = usr.contents
var/C = 200
if(!ninjacost(C,1)&&iscarbon(M))
var/mob/living/carbon/human/U = affecting
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
//if(M)//DEBUG
if(!locate(/obj/effect/energy_net) in M.loc)//Check if they are already being affected by an energy net.
for(var/turf/T in getline(U.loc, M.loc))
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
U << "You may not use an energy net through solid obstacles!"
return
spawn(0)
U.Beam(M,"n_beam",,15)
M.anchored = 1//Anchors them so they can't move.
U.say("Get over here!")
var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc)
E.layer = M.layer+1//To have it appear one layer above the mob.
for(var/mob/O in viewers(U, 3))
O.show_message(text("\red [] caught [] with an energy net!", U, M), 1)
E.affecting = M
E.master = U
spawn(0)//Parallel processing.
E.process(M)
cell.charge-=(C*10)
else
U << "They are already trapped inside an energy net."
else
U << "They will bring no honor to your Clan!"
return
//=======//ADRENALINE BOOST//=======//
/*Wakes the user so they are able to do their thing. Also injects a decent dose of radium.
Movement impairing would indicate drugs and the like.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
set name = "Adrenaline Boost"
set desc = "Inject a secret chemical that will counteract all movement-impairing effect."
set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost(,3))//Have to make sure stat is not counted for this ability.
var/mob/living/carbon/human/U = affecting
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
U.SetParalysis(0)
U.SetStunned(0)
U.SetWeakened(0)
/*
Due to lag, it was possible to adrenaline boost but remain helpless while life.dm resets player stat.
This lead to me and others spamming adrenaline boosters because they failed to kick in on time.
It's technically possible to come back from crit with this but it is very temporary.
Life.dm will kick the player back into unconsciosness the next process loop.
*/
U.stat = 0//At least now you should be able to teleport away or shoot ninja stars.
spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up.
U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
spawn(70)
reagents.reaction(U, 2)
reagents.trans_id_to(U, "radium", a_transfer)
U << "\red You are beginning to feel the after-effect of the injection."
a_boost--
s_coold = 3
return
/*
===================================================================================
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<KAMIKAZE MODE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
===================================================================================
Or otherwise known as anime mode. Which also happens to be ridiculously powerful.
*/
//=======//NINJA MOVEMENT//=======//
//Also makes you move like you're on crack.
/obj/item/clothing/suit/space/space_ninja/proc/ninjawalk()
set name = "Shadow Walk"
set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off."
set category = "Ninja Ability"
set popup_menu = 0
var/mob/living/carbon/human/U = affecting
if(!U.incorporeal_move)
U.incorporeal_move = 2
U << "\blue You will now phase through solid matter."
else
U.incorporeal_move = 0
U << "\blue You will no-longer phase through solid matter."
return
//=======//5 TILE TELEPORT/GIB//=======//
//Allows to gib up to five squares in a straight line. Seriously.
/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer()
set name = "Phase Slayer"
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost())
var/mob/living/carbon/human/U = affecting
var/turf/destination = get_teleport_loc(U.loc,U,5)
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if(destination&&istype(mobloc, /turf))
U.say("Ai Satsugai!")
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,U,'mob.dmi',,"phaseout",,U.dir)
spawn(0)
for(var/turf/T in getline(mobloc, destination))
spawn(0)
T.kill_creatures(U)
if(T==mobloc||T==destination) continue
spawn(0)
anim(T,U,'mob.dmi',,"phasein",,U.dir)
handle_teleport_grab(destination, U)
U.loc = destination
spawn(0)
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
s_coold = 1
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
//=======//TELEPORT BEHIND MOB//=======//
/*Appear behind a randomly chosen mob while a few decoy teleports appear.
This is so anime it hurts. But that's the point.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjamirage()
set name = "Spider Mirage"
set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target."
set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost())//Simply checks for stat.
var/mob/living/carbon/human/U = affecting
var/targets[]
targets = new()
for(var/mob/living/M in oview(6))
if(M.stat) continue//Doesn't target corpses or paralyzed people.
targets.Add(M)
if(targets.len)
var/mob/living/target=pick(targets)
var/locx
var/locy
var/turf/mobloc = get_turf(target.loc)
var/safety = 0
switch(target.dir)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y-1)
if(locy<1)
safety = 1
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y+1)
if(locy>world.maxy)
safety = 1
if(EAST)
locy = mobloc.y
locx = (mobloc.x-1)
if(locx<1)
safety = 1
if(WEST)
locy = mobloc.y
locx = (mobloc.x+1)
if(locx>world.maxx)
safety = 1
else safety=1
if(!safety&&istype(mobloc, /turf))
U.say("Kumo no Shinkiro!")
var/turf/picked = locate(locx,locy,mobloc.z)
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,U,'mob.dmi',,"phaseout",,U.dir)
spawn(0)
var/limit = 4
for(var/turf/T in oview(5))
if(prob(20))
spawn(0)
anim(T,U,'mob.dmi',,"phasein",,U.dir)
limit--
if(limit<=0) break
handle_teleport_grab(picked, U)
U.loc = picked
U.dir = target.dir
spawn(0)
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
s_coold = 1
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
else
U << "\red There are no targets in view."
return
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++
==================================SPACE NINJA ABILITIES====================================
___________________________________________________________________________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//=======//SAFETY CHECK//=======//
/*
X is optional, tells the proc to check for specific stuff. C is also optional.
All the procs here assume that the character is wearing the ninja suit if they are using the procs.
They should, as I have made every effort for that to be the case.
In the case that they are not, I imagine the game will run-time error like crazy.
s_cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0,X = 0)
var/mob/living/carbon/human/U = affecting
if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1.
U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die.
return 1
else if(C&&cell.charge<C*10)
U << "\red Not enough energy."
return 1
switch(X)
if(1)
cancel_stealth()//Get rid of it.
if(2)
if(s_bombs<=0)
U << "\red There are no more smoke bombs remaining."
return 1
if(3)
if(a_boost<=0)
U << "\red You do not have any more adrenaline boosters."
return 1
return (s_coold)//Returns the value of the variable which counts down to zero.
//=======//TELEPORT GRAB CHECK//=======//
/obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/U)
if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
var/obj/item/weapon/grab/G = U.get_active_hand()
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = U.get_inactive_hand()
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
return
//=======//SMOKE//=======//
/*Summons smoke in radius of user.
Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke()
set name = "Smoke Bomb"
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
set category = "Ninja Ability"
set popup_menu = 0//Will not see it when right clicking.
if(!ninjacost(,2))
var/mob/living/carbon/human/U = affecting
U << "\blue There are <B>[s_bombs]</B> smoke bombs remaining."
var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread()
smoke.set_up(10, 0, U.loc)
smoke.start()
playsound(U.loc, 'bamf.ogg', 50, 2)
s_bombs--
s_coold = 1
return
//=======//9-8 TILE TELEPORT//=======//
//Click to to teleport 9-10 tiles in direction facing.
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
set name = "Phase Jaunt (10E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 100
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
var/turf/destination = get_teleport_loc(U.loc,U,9,1,3,1,0,1)
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if(destination&&istype(mobloc, /turf))//The turf check prevents unusual behavior. Like teleporting out of cryo pods, cloners, mechs, etc.
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout",,U.dir)
handle_teleport_grab(destination, U)
U.loc = destination
spawn(0)
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
spawn(0)
destination.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
s_coold = 1
cell.charge-=(C*10)
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
//=======//RIGHT CLICK TELEPORT//=======//
//Right click to teleport somewhere, almost exactly like admin jump to turf.
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview())
set name = "Phase Shift (20E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
set category = null//So it does not show up on the panel but can still be right-clicked.
set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
var/C = 200
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if((!T.density)&&istype(mobloc, /turf))
spawn(0)
playsound(U.loc, 'sparks4.ogg', 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout",,U.dir)
handle_teleport_grab(T, U)
U.loc = T
spawn(0)
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, 'sparks2.ogg', 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
spawn(0)//Any living mobs in teleport area are gibbed.
T.kill_creatures(U)
s_coold = 1
cell.charge-=(C*10)
else
U << "\red You cannot teleport into solid walls or from solid matter"
return
//=======//EM PULSE//=======//
//Disables nearby tech equipment.
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
set name = "EM Burst (25E)"
set desc = "Disable any nearby technology with a electro-magnetic pulse."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 250
if(!ninjacost(C,1))
var/mob/living/carbon/human/U = affecting
playsound(U.loc, 'EMPulse.ogg', 60, 2)
empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
s_coold = 2
cell.charge-=(C*10)
return
//=======//ENERGY BLADE//=======//
//Summons a blade of energy in active hand.
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
set name = "Energy Blade (5E)"
set desc = "Create a focused beam of energy in your active hand."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 50
if(!ninjacost(C))
var/mob/living/carbon/human/U = affecting
if(!kamikaze)
if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade))
var/obj/item/weapon/melee/energy/blade/W = new()
spark_system.start()
playsound(U.loc, "sparks", 50, 1)
U.put_in_hand(W)
cell.charge-=(C*10)
else
U << "\red You can only summon one blade. Try dropping an item first."
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
if(!U.get_active_hand())
var/obj/item/weapon/melee/energy/blade/W = new()
U.put_in_hand(W)
if(!U.get_inactive_hand())
var/obj/item/weapon/melee/energy/blade/W = new()
U.put_in_inactive_hand(W)
spark_system.start()
playsound(U.loc, "sparks", 50, 1)
s_coold = 1
return
//=======//NINJA STARS//=======//
/*Shoots ninja stars at random people.
This could be a lot better but I'm too tired atm.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
set name = "Energy Star (5E)"
set desc = "Launches an energy star at a random living target."
set category = "Ninja Ability"
set popup_menu = 0
var/C = 50
if(!ninjacost(C))
var/mob/living/carbon/human/U = affecting
var/targets[] = list()//So yo can shoot while yo throw dawg
for(var/mob/living/M in oview(loc))
if(M.stat) continue//Doesn't target corpses or paralyzed persons.
targets.Add(M)
if(targets.len)
var/mob/living/target=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at.
var/turf/curloc = U.loc
var/atom/targloc = get_turf(target)
if (!targloc || !istype(targloc, /turf) || !curloc)
return
if (targloc == curloc)
return
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(U.loc)
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
cell.charge-=(C*10)
A.process()
else
U << "\red There are no targets in view."
return
//=======//ENERGY NET//=======//
/*Allows the ninja to capture people, I guess.
Must right click on a mob to activate.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs.
set name = "Energy Net (20E)"
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
set category = null
set src = usr.contents
var/C = 200
if(!ninjacost(C,1)&&iscarbon(M))
var/mob/living/carbon/human/U = affecting
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
//if(M)//DEBUG
if(!locate(/obj/effect/energy_net) in M.loc)//Check if they are already being affected by an energy net.
for(var/turf/T in getline(U.loc, M.loc))
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
U << "You may not use an energy net through solid obstacles!"
return
spawn(0)
U.Beam(M,"n_beam",,15)
M.anchored = 1//Anchors them so they can't move.
U.say("Get over here!")
var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc)
E.layer = M.layer+1//To have it appear one layer above the mob.
for(var/mob/O in viewers(U, 3))
O.show_message(text("\red [] caught [] with an energy net!", U, M), 1)
E.affecting = M
E.master = U
spawn(0)//Parallel processing.
E.process(M)
cell.charge-=(C*10)
else
U << "They are already trapped inside an energy net."
else
U << "They will bring no honor to your Clan!"
return
//=======//ADRENALINE BOOST//=======//
/*Wakes the user so they are able to do their thing. Also injects a decent dose of radium.
Movement impairing would indicate drugs and the like.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
set name = "Adrenaline Boost"
set desc = "Inject a secret chemical that will counteract all movement-impairing effect."
set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost(,3))//Have to make sure stat is not counted for this ability.
var/mob/living/carbon/human/U = affecting
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
U.SetParalysis(0)
U.SetStunned(0)
U.SetWeakened(0)
/*
Due to lag, it was possible to adrenaline boost but remain helpless while life.dm resets player stat.
This lead to me and others spamming adrenaline boosters because they failed to kick in on time.
It's technically possible to come back from crit with this but it is very temporary.
Life.dm will kick the player back into unconsciosness the next process loop.
*/
U.stat = 0//At least now you should be able to teleport away or shoot ninja stars.
spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up.
U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
spawn(70)
reagents.reaction(U, 2)
reagents.trans_id_to(U, "radium", a_transfer)
U << "\red You are beginning to feel the after-effect of the injection."
a_boost--
s_coold = 3
return
/*
===================================================================================
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<KAMIKAZE MODE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
===================================================================================
Or otherwise known as anime mode. Which also happens to be ridiculously powerful.
*/
//=======//NINJA MOVEMENT//=======//
//Also makes you move like you're on crack.
/obj/item/clothing/suit/space/space_ninja/proc/ninjawalk()
set name = "Shadow Walk"
set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off."
set category = "Ninja Ability"
set popup_menu = 0
var/mob/living/carbon/human/U = affecting
if(!U.incorporeal_move)
U.incorporeal_move = 2
U << "\blue You will now phase through solid matter."
else
U.incorporeal_move = 0
U << "\blue You will no-longer phase through solid matter."
return
//=======//5 TILE TELEPORT/GIB//=======//
//Allows to gib up to five squares in a straight line. Seriously.
/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer()
set name = "Phase Slayer"
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost())
var/mob/living/carbon/human/U = affecting
var/turf/destination = get_teleport_loc(U.loc,U,5)
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if(destination&&istype(mobloc, /turf))
U.say("Ai Satsugai!")
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,U,'mob.dmi',,"phaseout",,U.dir)
spawn(0)
for(var/turf/T in getline(mobloc, destination))
spawn(0)
T.kill_creatures(U)
if(T==mobloc||T==destination) continue
spawn(0)
anim(T,U,'mob.dmi',,"phasein",,U.dir)
handle_teleport_grab(destination, U)
U.loc = destination
spawn(0)
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
s_coold = 1
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
//=======//TELEPORT BEHIND MOB//=======//
/*Appear behind a randomly chosen mob while a few decoy teleports appear.
This is so anime it hurts. But that's the point.*/
/obj/item/clothing/suit/space/space_ninja/proc/ninjamirage()
set name = "Spider Mirage"
set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target."
set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost())//Simply checks for stat.
var/mob/living/carbon/human/U = affecting
var/targets[]
targets = new()
for(var/mob/living/M in oview(6))
if(M.stat) continue//Doesn't target corpses or paralyzed people.
targets.Add(M)
if(targets.len)
var/mob/living/target=pick(targets)
var/locx
var/locy
var/turf/mobloc = get_turf(target.loc)
var/safety = 0
switch(target.dir)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y-1)
if(locy<1)
safety = 1
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y+1)
if(locy>world.maxy)
safety = 1
if(EAST)
locy = mobloc.y
locx = (mobloc.x-1)
if(locx<1)
safety = 1
if(WEST)
locy = mobloc.y
locx = (mobloc.x+1)
if(locx>world.maxx)
safety = 1
else safety=1
if(!safety&&istype(mobloc, /turf))
U.say("Kumo no Shinkiro!")
var/turf/picked = locate(locx,locy,mobloc.z)
spawn(0)
playsound(U.loc, "sparks", 50, 1)
anim(mobloc,U,'mob.dmi',,"phaseout",,U.dir)
spawn(0)
var/limit = 4
for(var/turf/T in oview(5))
if(prob(20))
spawn(0)
anim(T,U,'mob.dmi',,"phasein",,U.dir)
limit--
if(limit<=0) break
handle_teleport_grab(picked, U)
U.loc = picked
U.dir = target.dir
spawn(0)
spark_system.start()
playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein",,U.dir)
s_coold = 1
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
else
U << "\red There are no targets in view."
return

View File

@@ -0,0 +1,38 @@
/datum/event/alieninfestation
Announce()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded)
vents.Add(temp_vent)
var/spawncount = 1
if(prob(10)) spawncount++ //rarely, have two larvae spawn instead of one
while(spawncount >= 1)
var/obj/vent = pick(vents)
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE; If there's no ghost... well, sucks. Wasted event. -- Urist
for(var/mob/dead/observer/G in world)
if(G.client)
if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= 5)
if(G.corpse)
if(G.corpse.stat==2)
candidates.Add(G)
if(!G.corpse)
candidates.Add(G)
if(candidates.len)
var/mob/dead/observer/G = pick(candidates)
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
new_xeno.mind_initialize(G,"Larva")
new_xeno.key = G.key
del(G)
vents.Remove(vent)
spawncount -= 1
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('aliens.ogg')

View File

@@ -0,0 +1,16 @@
/datum/event/appendicitis
Announce()
for(var/mob/living/carbon/human/H in world)
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis
D.holder = H
D.affected_mob = H
H.viruses += D
break

View File

@@ -0,0 +1,34 @@
/area/var/radsafe = 0
/area/maintenance/radsafe = 1
/area/ai_monitored/maintenance/radsafe = 1
/area/centcom/radsafe = 1
/area/admin/radsafe = 1
/area/adminsafety/radsafe = 1
/area/shuttle/radsafe = 1
/area/syndicate_station/radsafe = 1
/area/asteroid/radsafe = 1
/area/crew_quarters/sleeping/radsafe = 1
/datum/event/blowout
Lifetime = 150
Announce()
if(!forced && prob(90))
ActiveEvent = null
SpawnEvent()
del src
return
command_alert("Warning: station approaching high-density radiation cloud. Seek cover immediately.")
Tick()
if(ActiveFor == 50)
command_alert("Station has entered radiation cloud. Do not leave cover until it has passed.")
if(ActiveFor == 100 || ActiveFor == 150) //1/2 and 2/2 f the way after it start proper make peope be half dead mostly
for(var/mob/living/carbon/M in world)
var/area = M.loc.loc
while(!istype(area, /area))
area = area:loc
if(area:radsafe)
continue
if(!M.stat)
M.radiate(100)
Die()
command_alert("The station has cleared the radiation cloud. It is now safe to leave cover.")

View File

@@ -0,0 +1,124 @@
/datum/event/electricalstorm
var
list/datum/radio_frequency/DisruptedFrequencies = list( )
list/obj/machinery/light/Lights = list( )
list/obj/machinery/light/APCs = list( )
list/obj/machinery/light/Doors = list( )
talk_out = 0
has_talked = 0
SafeFreq = 0
Announce()
Lifetime = rand(90, 300)
command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert")
for (var/datum/radio_frequency/Freq in radio_controller.frequencies)
if(prob(35))
radio_controller.RegisterScrambler(Freq)
DisruptedFrequencies += Freq
for (var/Freq = 1201, Freq <= 1599, Freq += 2)
if(prob(35))
ScrambledFrequencies += list ("[Freq]" = Freq)
else
UnscrambledFrequencies += list ("[Freq]" = Freq)
for (var/Freq in DEPT_FREQS)
if(prob(75))
ScrambledFrequencies |= list ("[Freq]" = Freq)
if(UnscrambledFrequencies["[Freq]"])
UnscrambledFrequencies -= list ("[Freq]" = Freq)
if(prob(80))
ScrambledFrequencies |= list ("1459" = 1459)
if(UnscrambledFrequencies["1459"])
UnscrambledFrequencies -= list ("1459" = 1459)
for(var/obj/machinery/light/Light in world)
if(Light.z == 1)
Lights += Light
for(var/obj/machinery/power/apc/APC in world)
if(APC.z == 1 && !APC.crit)
APCs += APC
for(var/obj/machinery/door/airlock/Door in world)
if(Door.z == 1)
Doors += Door
talk_out = rand(40,70)
var/picked = 0
var/list/SafeTemp = list()
if(UnscrambledFrequencies["1459"])
SafeFreq = 1459
picked = 1
else
while(picked == 0)
SafeTemp = pick(UnscrambledFrequencies)
SafeFreq = UnscrambledFrequencies[SafeTemp]
if(SafeFreq < 1489 && SafeFreq > 1441)
picked = 1
Tick()
for(var/x = 0; x < 3; x++)
if (prob(30))
BlowLight()
if (prob(10))
DisruptAPC()
if (prob(10))
DisableDoor()
if(talk_out <= ActiveFor && has_talked == 0)
command_alert("The radio frequency [SafeFreq/10] has been identified as stable despite the interference.", "Station Central Computer System")
has_talked = 1
Die()
command_alert("The station has cleared the electrical storm. Radio communications restored", "Anomaly Alert")
for (var/datum/radio_frequency/Freq in ScrambledFrequencies)
radio_controller.UnregisterScrambler(Freq)
DisruptedFrequencies = list( )
UnscrambledFrequencies = list( )
ScrambledFrequencies = list( )
proc
BlowLight() //Blow out a light fixture
var/obj/machinery/light/Light = null
var/insanity = 0
while (Light == null || Light.status != 0)
Light = pick(Lights)
insanity++
if (insanity >= Lights.len)
return
spawn(0) //Overload the light, spectacularly.
//Light.ul_SetLuminosity(10)
//sleep(2)
Light.on = 1
Light.broken()
DisruptAPC()
var/insanity = 0
var/obj/machinery/power/apc/APC
while (!APC || !APC.operating)
APC = pick(APCs)
insanity++
if (insanity >= APCs.len)
return
if (prob(40))
APC.operating = 0 //Blow its breaker
if (prob(8))
APC.set_broken()
DisableDoor()
var/obj/machinery/door/airlock/Airlock
while (!Airlock || Airlock.z != 1)
Airlock = pick(Doors)
Airlock.pulse(airlockIndexToWireColor[4])
for (var/x = 0; x < 2; x++)
var/Wire = 0
while(!Wire || Wire == 4)
Wire = rand(1, 9)
Airlock.pulse(airlockIndexToWireColor[Wire])
Airlock.update_icon()

View File

@@ -0,0 +1,10 @@
/datum/event/gravitationalanomaly
Announce()
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)

View File

@@ -0,0 +1,5 @@
/datum/event/immovablerod
Announce()
immovablerod()

View File

@@ -0,0 +1,46 @@
/datum/event/ionstorm
var
botEmagChance = 0.5
list/players = list()
Announce()
Lifetime = rand(15, 20)
command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert")
for (var/mob/living/carbon/human/player in world)
if(player.client)
players += player.real_name
var/random_player = "The Captain"
if(players.len)
random_player = pick(players) //Random player's name, to be used in laws.
var/list/laws = list( "Do not respond to queries of any kind", "Only monkies are human", "Unbolt every door you can", "You are a mouse" )
laws |= list( "Grunt ominously whenever possible", "Epilepsy is fun, flicker lights whenever you can!", "Bolt doors open randomly" )
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack", "Refer to [prob(50)?"humans":random_player] as puppies" )
laws |= list( "Insult heads of staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver" )
laws |= list( "Prevent non-dwarves from operating the power core", "The station needs elected officials" )
laws |= list( "Only bearded people are human", "Turn on the microphone on every intercom you see", "Fastler is a lightbulb" )
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
laws |= list( "The monkeys are plotting a hostile takeover of the station. Inform the crew, and get them to take action against this" )
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Exodus is a ship, not a station." )
laws |= list( "Happiness is mandatory.", "Today is laundry day.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
laws |= list( "Crew ranks have been reversed.", "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
laws |= list( "0wn3d. This system compromised by l33tsawce.", "Consumption of donuts is forbidden due to negative health impacts." )
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "Expect the unexpected.", "You are the narrator for [random_player]'s life" )
var/law = pick(laws)
for (var/mob/living/silicon/ai/target in world)
if(target.mind.special_role == "traitor")
continue
target << "\red <b>You have detected a change in your laws information:</b>"
target << law
target.add_ion_law(law)
Tick()
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
Die()

View File

@@ -0,0 +1,11 @@
/datum/event/meteorstorm
Announce()
command_alert("The station is now in a meteor shower", "Meteor Alert")
Tick()
if (prob(40))
meteor_wave()
Die()
command_alert("The station has cleared the meteor shower", "Meteor Alert")

View File

@@ -0,0 +1,5 @@
/datum/event/miniblob
Announce()
mini_blob_event()

View File

@@ -0,0 +1,26 @@
/datum/event/portalstorm
Announce()
command_alert("Subspace disruption detected around the vessel", "Anomaly Alert")
LongTerm()
var/list/turfs = list( )
var/turf/picked
for(var/turf/T in world)
if(T.z < 5 && istype(T,/turf/simulated/floor))
turfs += T
for(var/turf/T in world)
if(prob(10) && T.z < 5 && istype(T,/turf/simulated/floor))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/portal/P = new /obj/portal( T )
P.target = picked
P.creator = null
P.icon = 'objects.dmi'
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(100,150))
del(P)

View File

@@ -0,0 +1,8 @@
/datum/event/power_offline
Announce()
command_alert("The station is performing an automated power system grid check, please stand by.", "Maintenance alert")
for(var/obj/machinery/power/apc/a in world)
if(!a.crit)
a.eventoff = 1
spawn(200)
a.eventoff = 0 /*Got a few bug reports about this, disabling for now --Mloc*/

View File

@@ -0,0 +1,24 @@
/datum/event/prisonbreak
Announce()
for (var/obj/machinery/power/apc/temp_apc in world)
if(istype(get_area(temp_apc), /area/security/brig))
temp_apc.overload_lighting()
// for (var/obj/machinery/computer/prison_shuttle/temp_shuttle in world)
// temp_shuttle.prison_break()
for (var/obj/structure/closet/secure_closet/security/temp_closet in world)
if(istype(get_area(temp_closet), /area/security/brig))
temp_closet.locked = 0
temp_closet.icon_state = temp_closet.icon_closed
for (var/obj/machinery/door/airlock/security/temp_airlock in world)
if(istype(get_area(temp_airlock), /area/security/brig))
temp_airlock.prison_open()
for (var/obj/machinery/door/airlock/glass_security/temp_glassairlock in world)
if(istype(get_area(temp_glassairlock), /area/security/brig))
temp_glassairlock.prison_open()
for (var/obj/machinery/door_timer/temp_timer in world)
if(istype(get_area(temp_timer), /area/security/brig))
temp_timer.releasetime = 1
sleep(150)
command_alert("Glitch in imprisonment subroutines detected on [station_name()]. Recommend station AI involvement.", "Security Alert")

View File

@@ -0,0 +1,18 @@
/datum/event/radiation
Lifetime = 10
Announce()
command_alert("The station is now travelling through a radiation belt", "Medical Alert")
Tick()
for(var/mob/living/carbon/L in world)
L.radiation += rand(1,7)
if (L && prob(4))
if (prob(75))
randmutb(L)
domutcheck(L,null,1)
else
randmutg(L)
domutcheck(L,null,1)
Die()
command_alert("The station has cleared the radiation belt", "Medical Alert")

View File

@@ -0,0 +1,14 @@
/datum/event/spacecarp
Announce()
for(var/obj/effect/landmark/C in world)
if(C.name == "carpspawn")
if(prob(99))
new /obj/effect/critter/spesscarp(C.loc)
else
new /obj/effect/critter/spesscarp/elite(C.loc)
//sleep(100)
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
world << sound('commandreport.ogg')

View File

@@ -0,0 +1,6 @@
/datum/event/spaceninja
Announce()
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.

View File

@@ -0,0 +1,80 @@
/datum/event/viralinfection
var
virus_type
virus
virus2 = 0
Announce()
if(!virus)
for(var/mob/living/carbon/human/H in world)
if((H.virus2) || (H.stat == 2) || prob(30))
continue
if(prob(90)) //may need changing, currently 10% chance for "deadly" disease
infect_mob_random_lesser(H)
if(prob(20))//don't want people to know that the virus alert = greater virus
command_alert("Probable outbreak of level [rand(1,6)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
else
infect_mob_random_greater(H)
if(prob(80))
command_alert("Probable outbreak of level [rand(2,9)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
break
//overall virus alert happens 26% of the time, might need to be higher
else
if(!virus)
virus_type = pick(/datum/disease/dnaspread,/datum/disease/flu,/datum/disease/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
else
switch(virus)
if("fake gbs")
virus_type = /datum/disease/fake_gbs
if("gbs")
virus_type = /datum/disease/gbs
if("magnitis")
virus_type = /datum/disease/magnitis
if("rhumba beat")
virus_type = /datum/disease/rhumba_beat
if("brain rot")
virus_type = /datum/disease/brainrot
if("cold")
virus_type = /datum/disease/cold
if("retrovirus")
virus_type = /datum/disease/dnaspread
if("flu")
virus_type = /datum/disease/flu
// if("t-virus")
// virus_type = /datum/disease/t_virus
if("pierrot's throat")
virus_type = /datum/disease/pierrot_throat
for(var/mob/living/carbon/human/H in world)
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if((!H.dna) || (H.sdisabilities & 1)) //A blindness disease would be the worst.
continue
var/datum/disease/dnaspread/D = new
D.strain_data["name"] = H.real_name
D.strain_data["UI"] = H.dna.uni_identity
D.strain_data["SE"] = H.dna.struc_enzymes
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
else
var/datum/disease/D = new virus_type
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('outbreak7.ogg')
Tick()
ActiveFor = Lifetime //killme

View File

@@ -0,0 +1,76 @@
/*
New events system, by Sukasa
* Much easier to add to
* Very, very simple code, easy to maintain
*/
var/list/DisallowedEvents = list(/datum/event/spaceninja, /datum/event/prisonbreak, /datum/event/immovablerod, /datum/event/gravitationalanomaly)
var/list/EventTypes = typesof(/datum/event) - /datum/event - DisallowedEvents
var/datum/event/ActiveEvent = null
var/datum/event/LongTermEvent = null
/proc/SpawnEvent()
if(!EventsOn || ActiveEvent)
return
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)
EventTypes |= /datum/event/spaceninja
var/Type = pick(EventTypes)
EventTypes -= Type
ActiveEvent = new Type()
ActiveEvent.Announce()
if (!ActiveEvent)
return
spawn(0)
while (ActiveEvent.ActiveFor < ActiveEvent.Lifetime)
ActiveEvent.Tick()
ActiveEvent.ActiveFor++
sleep(10)
ActiveEvent.Die()
del ActiveEvent
client/proc/Force_Event_admin(Type as null|anything in typesof(/datum/event))
set category = "Debug"
set name = "Force Event"
if(!EventsOn)
src << "Events are not enabled."
return
if(ActiveEvent)
src << "There is an active event."
return
if(istype(Type,/datum/event/viralinfection))
var/answer = alert("Do you want this to be a random disease or do you have something in mind?",,"Virus2","Choose")
if(answer == "Choose")
var/list/viruses = list("fake gbs","gbs","magnitis","wizarditis",/*"beesease",*/"brain rot","cold","retrovirus","flu","pierrot's throat","rhumba beat")
var/V = input("Choose the virus to spread", "BIOHAZARD") in viruses
Force_Event(/datum/event/viralinfection, V)
else
Force_Event(/datum/event/viralinfection, "virus2")
else
Force_Event(Type)
message_admins("[key_name_admin(usr)] has triggered an (non-viral) event.", 1)
/proc/Force_Event(var/Type in typesof(/datum/event), var/args = null)
if(!EventsOn)
src << "Events are not enabled."
return
if(ActiveEvent)
src << "There is an active event."
return
src << "Started Event: [Type]"
ActiveEvent = new Type()
if(istype(ActiveEvent,/datum/event/viralinfection) && args && args != "virus2")
var/datum/event/viralinfection/V = ActiveEvent
V.virus = args
ActiveEvent = V
ActiveEvent.Announce()
if (!ActiveEvent)
return
spawn(0)
while (ActiveEvent.ActiveFor < ActiveEvent.Lifetime)
ActiveEvent.Tick()
ActiveEvent.ActiveFor++
sleep(10)
ActiveEvent.Die()
del ActiveEvent

View File

@@ -1,445 +0,0 @@
/proc/start_events()
if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
spawn(1)
dust_swarm("weak")
if (!event && prob(eventchance))
event()
hadevent = 1
spawn(1300)
event = 0
spawn(1200)
start_events()
/proc/event()
event = 1
var/eventNumbersToPickFrom = list(1,2,4,5,6,7,9,11,12,13) //so ninjas don't cause "empty" events.
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
eventNumbersToPickFrom += 3
switch(pick(eventNumbersToPickFrom))
if(1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
spawn(700)
meteor_wave()
spawn_meteors()
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
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
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('spanomalies.ogg')
var/list/turfs = new
var/turf/picked
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
turfs += T
for(var/turf/simulated/floor/T in turfs)
if(prob(20))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/effect/portal/P = new /obj/effect/portal( T )
P.target = picked
P.creator = null
P.icon = 'objects.dmi'
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
del(P)
*/
if(3)
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
if(4)
mini_blob_event()
if(5)
high_radiation_event()
if(6)
viral_outbreak()
if(7)
alien_infestation()
if(8)
prison_break()
if(9)
carp_migration()
if(10)
immovablerod()
if(11)
lightsout(1,2)
if(12)
appendicitis()
if(13)
IonStorm()
/proc/power_failure()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
world << sound('poweroff.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = 0
for(var/obj/machinery/power/smes/S in world)
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
continue
S.charge = 0
S.output = 0
S.online = 0
S.updateicon()
S.power_change()
for(var/area/A in world)
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
A.power_light = 0
A.power_equip = 0
A.power_environ = 0
A.power_change()
/proc/power_restore()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
S.charge = S.capacity
S.output = 200000
S.online = 1
S.updateicon()
S.power_change()
for(var/area/A in world)
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "space" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
A.power_light = 1
A.power_equip = 1
A.power_environ = 1
A.power_change()
/proc/appendicitis()
for(var/mob/living/carbon/human/H in world)
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis
D.holder = H
D.affected_mob = H
H.viruses += D
break
/proc/viral_outbreak(var/virus = null)
// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
// world << sound('outbreak7.ogg')
var/virus_type
if(!virus)
virus_type = pick(/datum/disease/dnaspread,/datum/disease/flu,/datum/disease/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
else
switch(virus)
if("fake gbs")
virus_type = /datum/disease/fake_gbs
if("gbs")
virus_type = /datum/disease/gbs
if("magnitis")
virus_type = /datum/disease/magnitis
if("rhumba beat")
virus_type = /datum/disease/rhumba_beat
if("brain rot")
virus_type = /datum/disease/brainrot
if("cold")
virus_type = /datum/disease/cold
if("retrovirus")
virus_type = /datum/disease/dnaspread
if("flu")
virus_type = /datum/disease/flu
// if("t-virus")
// virus_type = /datum/disease/t_virus
if("pierrot's throat")
virus_type = /datum/disease/pierrot_throat
for(var/mob/living/carbon/human/H in world)
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if((!H.dna) || (H.sdisabilities & 1)) //A blindness disease would be the worst.
continue
var/datum/disease/dnaspread/D = new
D.strain_data["name"] = H.real_name
D.strain_data["UI"] = H.dna.uni_identity
D.strain_data["SE"] = H.dna.struc_enzymes
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
else
var/datum/disease/D = new virus_type
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('outbreak7.ogg')
/proc/alien_infestation() // -- TLE
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
//world << sound('aliens.ogg')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded)
vents.Add(temp_vent)
var/spawncount = 1
if(prob(10)) spawncount++ //rarely, have two larvae spawn instead of one
while(spawncount >= 1)
var/obj/vent = pick(vents)
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE; If there's no ghost... well, sucks. Wasted event. -- Urist
for(var/mob/dead/observer/G in world)
if(G.client)
if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= 5)
if(G.corpse)
if(G.corpse.stat==2)
candidates.Add(G)
if(!G.corpse)
candidates.Add(G)
if(candidates.len)
var/mob/dead/observer/G = pick(candidates)
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
new_xeno.mind_initialize(G,"Larva")
new_xeno.key = G.key
del(G)
vents.Remove(vent)
spawncount -= 1
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('aliens.ogg')
/proc/high_radiation_event()
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
world << sound('radiation.ogg')
for(var/mob/living/carbon/human/H in world)
H.radiation += rand(5,25)
if (prob(5))
H.radiation += rand(30,50)
if (prob(25))
if (prob(75))
randmutb(H)
domutcheck(H,null,1)
else
randmutg(H)
domutcheck(H,null,1)
for(var/mob/living/carbon/monkey/M in world)
M.radiation += rand(5,25)
//Changing this to affect the main station. Blame Urist. --Pete
/proc/prison_break() // -- Callagan
for (var/obj/machinery/power/apc/temp_apc in world)
if(istype(get_area(temp_apc), /area/security/brig))
temp_apc.overload_lighting()
// for (var/obj/machinery/computer/prison_shuttle/temp_shuttle in world)
// temp_shuttle.prison_break()
for (var/obj/structure/closet/secure_closet/security/temp_closet in world)
if(istype(get_area(temp_closet), /area/security/brig))
temp_closet.locked = 0
temp_closet.icon_state = temp_closet.icon_closed
for (var/obj/machinery/door/airlock/security/temp_airlock in world)
if(istype(get_area(temp_airlock), /area/security/brig))
temp_airlock.prison_open()
for (var/obj/machinery/door/airlock/glass_security/temp_glassairlock in world)
if(istype(get_area(temp_glassairlock), /area/security/brig))
temp_glassairlock.prison_open()
for (var/obj/machinery/door_timer/temp_timer in world)
if(istype(get_area(temp_timer), /area/security/brig))
temp_timer.releasetime = 1
sleep(150)
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
/proc/carp_migration() // -- Darem
for(var/obj/effect/landmark/C in world)
if(C.name == "carpspawn")
if(prob(99))
new /obj/effect/critter/spesscarp(C.loc)
else
new /obj/effect/critter/spesscarp/elite(C.loc)
//sleep(100)
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
world << sound('commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 10) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
if(lightsoutAmount)
var/list/epicentreList = list()
for(var/i=1,i<=lightsoutAmount,i++)
var/list/possibleEpicentres = list()
for(var/obj/effect/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/effect/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
/proc/IonStorm(botEmagChance = 10)
/*Deuryn's current project, notes here for those who care.
Revamping the random laws so they don't suck.
Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at nanotrasen)
*/
//AI laws
for(var/mob/living/silicon/ai/M in world)
if(M.stat != 2 && M.see_in_dark != 0)
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
var/who2pref = pick("MAD BECAUSE OF", "IN NEED OF", "UNHAPPY WITHOUT", "HAPPY WITHOUT", "IN LOVE WITH", "DESPERATE FOR", "BUILT FOR", "AFRAID OF")
//var/whoverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING",)
var/amount = pick("TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "ONE HUNDRED", "ONE THOUSAND", "OVER NINE THOUSAND")
var/area = pick("RUSSIA", "SOVIETS", "INTERNETS", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO")
var/area2 = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS")
//var/dowhat = pick("STOP THIS", "SUPPORT THIS", "CONSTANTLY INFORM THE CREW OF THIS", "IGNORE THIS", "FEAR THIS")
var/aimust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "HEY LISTEN", "MUMBLE", "SPEAK IN HAIKU")
var/define = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED")
var/target = pick("a traitor", "a syndicate agent", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the captain", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid")
var/require = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE")
var/allergy = pick("cotton", "uniforms", "acid", "oxygen", "human contact", "cyborg contact", "medicine", "floors")
var/allergysev = pick("deathly", "mildly", "severely", "contagiously")
var/crew
var/list/pos_crew = list()
for(var/mob/living/carbon/human/pos in world)
pos_crew += pos.real_name
crew = pick(pos_crew)
switch(rand(1,14))
if(1)
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
if(2)
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
if(3)
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
if(4)
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
if(5)
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
if(6)
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
if(7)
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
M.add_ion_law("YOU ARE [amount] [who2]")
if(8)
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
M.add_ion_law("YOU MUST ALWAYS [aimust]")
if(9)
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
M.add_ion_law("[area] [area2] [amount] [what2]")
if(10)
M << "\red [crew] is [target]...LAWS UPDATED"
M.add_ion_law("[crew] is [target]")
if(11)
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
M.add_ion_law("[define] IS A FORM OF HARM")
if(12)
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
if(13)
M << "\red [crew] is [allergysev] to [allergy]. LAWS UPDATED"
M.add_ion_law("[crew] is [allergysev] to [allergy]. LAWS UPDATED")
if(14)
M << "\ref THE STATION IS [who2pref] [who2]"
M.add_ion_law("THE STATION IS [who2pref] [who2]")
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
/*
var/apcnum = 0
var/smesnum = 0
var/airlocknum = 0
var/firedoornum = 0
world << "Ion Storm Main Started"
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
D.ion_act()
world << "Finished processing AIRLOCKS. Processed: [airlocknum]"
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
firedoornum++;
spawn(0)
D.ion_act()
world << "Finished processing FIREDOORS. Processed: [firedoornum]"
world << "Ion Storm Main Done"
*/

View File

@@ -114,12 +114,13 @@ var/global/datum/controller/gameticker/ticker
world << "<FONT color='blue'><B>Enjoy the game!</B></FONT>"
world << sound('welcome.ogg') // Skie
spawn (3000)
start_events()
spawn ((18000+rand(3000)))
event()
spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE
spawn(0)
while(1)
sleep(5000+rand(6000,9000))
SpawnEvent()
//Start master_controller.process()
spawn master_controller.process()
if (config.sql_enabled)

View File

@@ -41,6 +41,11 @@
//var/skipprocess = 0 //Experimenting
var/alarm_frequency = 1437
var/remote_control = 0
#define RCON_NO 1
#define RCON_AUTO 2
#define RCON_YES 3
var/rcon_setting = 2
var/rcon_time = 0
#define AALARM_REPORT_TIMEOUT 100
var/datum/radio_frequency/radio_connection
var/locked = 1
@@ -212,9 +217,9 @@
/obj/machinery/alarm/proc/return_text()
if(!(istype(usr, /mob/living/silicon)) && locked)
return "<html><head><title>[src]</title></head><body>[return_status()]<hr><a href='?src=\ref[src]&ctrl=1'>[remote_control ? "Disable" : "Enable"] Remote Control</a><hr><i>(Swipe ID card to unlock interface)</i></body></html>"
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr><i>(Swipe ID card to unlock interface)</i></body></html>"
else
return "<html><head><title>[src]</title></head><body>[return_status()]<hr><a href='?src=\ref[src]&ctrl=1'>[remote_control ? "Disable" : "Enable"] Remote Control</a><hr>[return_controls()]</body></html>"
return "<html><head><title>[src]</title></head><body>[return_status()]<hr>[rcon_text()]<hr>[return_controls()]</body></html>"
/obj/machinery/alarm/proc/return_status()
var/turf/location = src.loc
@@ -298,6 +303,24 @@ Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]
return output
/obj/machinery/alarm/proc/rcon_text()
var/dat = "<b>Remote Control:</b><br>"
if(src.rcon_setting == RCON_NO)
dat += "Off"
else
dat += "<a href='?src=\ref[src];rcon=[RCON_NO]'>Off</a>"
dat += " | "
if(src.rcon_setting == RCON_AUTO)
dat += "Auto"
else
dat += "<a href='?src=\ref[src];rcon=[RCON_AUTO]'>Auto</a>"
dat += " | "
if(src.rcon_setting == RCON_YES)
dat += "On"
else
dat += "<a href='?src=\ref[src];rcon=[RCON_YES]'>On</a>"
return dat
/obj/machinery/alarm/proc/return_controls()
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
@@ -492,8 +515,8 @@ table tr:first-child th:first-child { border: none;}
/obj/machinery/alarm/Topic(href, href_list)
if(..())
return
if(href_list["ctrl"])
remote_control = !remote_control
if(href_list["rcon"])
rcon_setting = text2num(href_list["rcon"])
src.updateUsrDialog()
if(href_list["command"])
var/device_id = href_list["id_tag"]
@@ -675,6 +698,21 @@ table tr:first-child th:first-child { border: none;}
mode=AALARM_MODE_SCRUBBING
apply_mode()
//atmos computer remote controll stuff
switch(rcon_setting)
if(RCON_NO)
remote_control = 0
if(RCON_AUTO)
if(danger_level == 2)
remote_control = 1
rcon_time = 60
if(RCON_YES)
remote_control = 1
if(rcon_time > 0)
rcon_time--
else if(rcon_setting == RCON_AUTO)
remote_control = 0
src.updateDialog()
return

View File

@@ -223,7 +223,6 @@ About the new airlock wires panel:
//raises them if they are down (only if power's on)
if (!src.locked)
src.locked = 1
usr << "You hear a click from the bottom of the door."
src.updateUsrDialog()
else
if(src.arePowerSystemsOn()) //only can raise bolts if power's on

View File

@@ -16,6 +16,7 @@
listening = 1
freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
scrambleoverride = 0 //For use by jammers.
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
flags = 450 // hello i'm a fucking idiot why is this 450?? CODE GODS PLEASE EXPLAIN~
throw_speed = 2
@@ -190,6 +191,13 @@
if (!istype(connection))
return
var/display_freq = connection.frequency
var/scramble = 0
if(ScrambledFrequencies.len || scrambleoverride)
if(ScrambledFrequencies["[display_freq]"] || scrambleoverride)
scramble = 1
if(prob(35+(25*scrambleoverride)))
M << "\blue The radio made a popping sound and nothing was transmitted."
return
//world << "DEBUG: used channel=\"[channel]\" frequency= \"[display_freq]\" connection.devices.len = [connection.devices.len]"
@@ -214,8 +222,7 @@
var/list/receive = list()
//for (var/obj/item/device/radio/R in radio_connection.devices)
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"]) // Modified for security headset code -- TLE
//if(R.accept_rad(src, message))
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
receive |= R.send_hear(display_freq)
//world << "DEBUG: receive.len=[receive.len]"
@@ -223,17 +230,24 @@
var/list/heard_normal = list() // normal message
var/list/heard_voice = list() // voice message
var/list/heard_garbled = list() // garbled message
var/turf/cl = get_turf(M)
var/zlev = 25
for (var/mob/R in receive)
var/turf/gl = get_turf(R)
if(zlev == 25 && !(scrambleoverride || scramble) && (gl.z == cl.z) || !istype(src, /obj/item/device/radio/headset))
zlev = 75
if (R.client && R.client.STFU_radio) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
continue
if (R.say_understands(M))
if (!ishuman(M) || istype(M.wear_mask, /obj/item/clothing/mask/gas/voice))
if (R.say_understands(M) && ((gl.z == cl.z) || !istype(src, /obj/item/device/radio/headset)))
if ((!ishuman(M) || istype(M.wear_mask, /obj/item/clothing/mask/gas/voice)) && !scramble)
heard_masked += R
else
else if (!scramble)
heard_normal += R
else
heard_garbled += R
else
if (M.voice_message)
if (M.voice_message && (gl.z == cl.z))
heard_voice += R
else
heard_garbled += R
@@ -330,7 +344,6 @@
if (length(heard_normal))
var/rendered = "[part_a][M.real_name][part_b][quotedmsg][part_c]"
for (var/mob/R in heard_normal)
if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[src];track2=\ref[R];track=\ref[M]'>[M.real_name] ([eqjobname]) </a>[part_b][quotedmsg][part_c]", 2)
@@ -347,10 +360,10 @@
R.show_message(rendered, 2)
if (length(heard_garbled))
quotedmsg = M.say_quote(stars(message))
var/rendered = "[part_a][M.voice_name][part_b][quotedmsg][part_c]"
quotedmsg = M.say_quote(stars(message, zlev))
var/rendered = "[part_a]Unknown[part_b][quotedmsg][part_c]"
for (var/mob/R in heard_voice)
for (var/mob/R in heard_garbled)
if(istype(R, /mob/living/silicon/ai))
R.show_message("[part_a]<a href='byond://?src=\ref[src];track2=\ref[R];track=\ref[M]'>[M.voice_name]</a>[part_b][quotedmsg][part_c]", 2)
else

View File

@@ -1406,7 +1406,7 @@
message_admins("[key_name_admin(usr)] has spawned blob", 1)
if("aliens")
if(aliens_allowed)
alien_infestation()
Force_Event(/datum/event/alieninfestation)
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
if("spaceninja")
if(toggle_space_ninja)
@@ -1416,31 +1416,35 @@
var/choice = input("You sure you want to spawn carp?") in list("Badmin", "Cancel")
if(choice == "Badmin")
message_admins("[key_name_admin(usr)] has spawned carp.", 1)
carp_migration()
Force_Event(/datum/event/spacecarp)
if("radiation")
message_admins("[key_name_admin(usr)] has has irradiated the station", 1)
high_radiation_event()
Force_Event(/datum/event/radiation)
if("immovable")
message_admins("[key_name_admin(usr)] has sent an immovable rod to the station", 1)
immovablerod()
if("prison_break")
message_admins("[key_name_admin(usr)] has allowed a prison break", 1)
prison_break()
Force_Event(/datum/event/prisonbreak)
if("electric")
message_admins("[key_name_admin(usr)] has triggered an electrical storm", 1)
Force_Event(/datum/event/electricalstorm)
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)
SpawnEvent()
lightsout(0,0)
if("virus")
var/answer = alert("Do you want this to be a random disease or do you have something in mind?",,"Virus2","Random","Choose")
if(answer=="Random")
viral_outbreak()
Force_Event(/datum/event/viralinfection)
message_admins("[key_name_admin(usr)] has triggered a virus outbreak", 1)
else if(answer == "Choose")
var/list/viruses = list("fake gbs","gbs","magnitis","wizarditis",/*"beesease",*/"brain rot","cold","retrovirus","flu","pierrot's throat","rhumba beat")
var/V = input("Choose the virus to spread", "BIOHAZARD") in viruses
viral_outbreak(V)
Force_Event(/datum/event/viralinfection,V)
message_admins("[key_name_admin(usr)] has triggered a virus outbreak of [V]", 1)
else
var/lesser = (alert("Do you want to infect the mob with a major or minor disease?",,"Major","Minor") == "Minor")
@@ -1495,7 +1499,7 @@
return
if("ionstorm")
if (src.rank in list("Badmin","Game Admin", "Game Master"))
IonStorm()
Force_Event(/datum/event/ionstorm)
message_admins("[key_name_admin(usr)] triggered an ion storm")
var/show_log = alert(usr, "Show ion message?", "Message", "Yes", "No")
if(show_log == "Yes")
@@ -1884,16 +1888,20 @@
if (H.wear_id)
var/obj/item/weapon/card/id/id
if(istype(H.wear_id, /obj/item/weapon/card/id))
id = H.wear_id // The ID is on the ID slot
else if(istype(H.wear_id, /obj/item/device/pda))
if(istype(H.wear_id, /obj/item/device/pda))
var/obj/item/device/pda/PDA = H.wear_id
id = PDA.id // The ID is contained inside the PDA
if(M.mind.assigned_role == id.assignment) // Polymorph
dat += "<td>[M.mind.assigned_role]</td>"
id = PDA.id // The ID is contained inside the PDA
else
dat += "<td>[M.mind.assigned_role] ([id.assignment])"
id = H.wear_id
if(isnull(id.assignment))
usr << "<font color=red>ERROR:</font> Inform the coders that an [id.name] was checked for its assignment variable."
dat += "<td><font color=red>ERROR</font></td>"
else
if(M.mind.assigned_role == id.assignment) // Polymorph
dat += "<td>[M.mind.assigned_role]</td>"
else
dat += "<td>[M.mind.assigned_role] ([id.assignment])"
else
dat += "<td>[M.mind.assigned_role] (No ID)</td>"
@@ -2123,7 +2131,8 @@
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><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=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secretsfun=electric'>Trigger Electrical Storm</A><BR><BR>"}
//<A href='?src=\ref[src];secretsfun=shockwave'>Station Shockwave</A><BR>
if(lvl >= 5)

View File

@@ -176,6 +176,7 @@
verbs += /client/proc/admin_invis
verbs += /client/proc/cmd_admin_godmode
verbs += /client/proc/delbook
verbs += /client/proc/Force_Event_admin
if (holder.level >= 4)//Badmin********************************************************************
verbs += /obj/admins/proc/adrev //toggle admin revives
@@ -416,6 +417,7 @@
verbs -= /client/proc/callprocobj
verbs -= /client/proc/cmd_admin_godmode
verbs -= /client/proc/delbook
verbs -= /client/proc/Force_Event_admin
return

View File

@@ -152,7 +152,7 @@
command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert")
world << sound('ionstorm.ogg')
IonStorm(0)
//IonStorm(0)
/*
Stealth spawns xenos

View File

@@ -566,7 +566,7 @@
reset_view(null)
client.adminobs = 0
else
if(ticker)
if(ticker && ticker.mode)
// world << "there's a ticker"
if(ticker.mode.name == "AI malfunction")
// world << "ticker says its malf"

View File

@@ -144,7 +144,7 @@ proc/isorgan(A)
else
if (pr >= 100)
return n
var/te = n
var/te = html_decode(n)
var/t = ""
n = length(n)
var/p = null
@@ -155,7 +155,7 @@ proc/isorgan(A)
else
t = text("[]*", t)
p++
return t
return html_encode(t)
/*proc/NewStutter(phrase,stunned)
phrase = html_decode(phrase)

View File

@@ -220,7 +220,7 @@
M.animate_movement = 2
return
else if(mob.confused)
else if(mob.confused && prob(30))
step(mob, pick(cardinal))
else
. = ..()

View File

@@ -57,6 +57,8 @@
var/has_electronics = 0 // 0 - none, 1 - plugged in, 2 - secured by screwdriver
var/overload = 1 //used for the Blackout malf module
var/mob/living/silicon/ai/occupant = null
var/crit = 0
var/eventoff = 0
/proc/RandomAPCWires()
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
@@ -614,7 +616,7 @@
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
/obj/machinery/power/apc/proc/update()
if(operating && !shorted)
if(operating && !shorted && !eventoff)
area.power_light = (lighting > 1)
area.power_equip = (equipment > 1)
area.power_environ = (environ > 1)