mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
-PDA notes and uplink notes are working again.
-Added light flickering -Ghosts can now make lights flicker a little bit with a minute cooldown. (People voted for it http://www.kamletos.si/tgdb/ingamepolls.php) -PDAs are sorted correctly on the Message Monitor -Added some light flickering to the following events: High levels of radiation, Grey Tide virus. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4143 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -11,3 +11,4 @@
|
|||||||
anchored = 1 // don't get pushed around
|
anchored = 1 // don't get pushed around
|
||||||
var/mob/corpse = null // observer mode
|
var/mob/corpse = null // observer mode
|
||||||
var/datum/hud/living/carbon/hud = null // hud
|
var/datum/hud/living/carbon/hud = null // hud
|
||||||
|
var/bootime = 0
|
||||||
@@ -141,6 +141,7 @@
|
|||||||
C.cell.charge = 0
|
C.cell.charge = 0
|
||||||
|
|
||||||
/proc/power_restore()
|
/proc/power_restore()
|
||||||
|
|
||||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||||
world << sound('poweron.ogg')
|
world << sound('poweron.ogg')
|
||||||
for(var/obj/machinery/power/apc/C in world)
|
for(var/obj/machinery/power/apc/C in world)
|
||||||
@@ -273,6 +274,11 @@
|
|||||||
world << sound('aliens.ogg')
|
world << sound('aliens.ogg')
|
||||||
|
|
||||||
/proc/high_radiation_event()
|
/proc/high_radiation_event()
|
||||||
|
|
||||||
|
for(var/obj/machinery/light/L in world)
|
||||||
|
if(L.z != 1) continue
|
||||||
|
L.flicker(50)
|
||||||
|
sleep(100)
|
||||||
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
|
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')
|
world << sound('radiation.ogg')
|
||||||
for(var/mob/living/carbon/human/H in world)
|
for(var/mob/living/carbon/human/H in world)
|
||||||
@@ -289,9 +295,19 @@
|
|||||||
domutcheck(H,null,1)
|
domutcheck(H,null,1)
|
||||||
for(var/mob/living/carbon/monkey/M in world)
|
for(var/mob/living/carbon/monkey/M in world)
|
||||||
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||||
|
sleep(300)
|
||||||
|
command_alert("High levels of radiation has ceased. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Changing this to affect the main station. Blame Urist. --Pete
|
//Changing this to affect the main station. Blame Urist. --Pete
|
||||||
/proc/prison_break() // -- Callagan
|
/proc/prison_break() // -- Callagan
|
||||||
|
|
||||||
|
for(var/obj/machinery/light/L in world)
|
||||||
|
if(!istype(get_area(L), /area/security/prison) && !istype(get_area(L), /area/security/brig)) continue
|
||||||
|
L.flicker(10)
|
||||||
|
sleep(100)
|
||||||
|
|
||||||
for (var/obj/machinery/power/apc/temp_apc in world)
|
for (var/obj/machinery/power/apc/temp_apc in world)
|
||||||
if(istype(get_area(temp_apc), /area/security/prison))
|
if(istype(get_area(temp_apc), /area/security/prison))
|
||||||
temp_apc.overload_lighting()
|
temp_apc.overload_lighting()
|
||||||
|
|||||||
@@ -402,7 +402,7 @@
|
|||||||
if(!P.owner || P.toff) continue
|
if(!P.owner || P.toff) continue
|
||||||
sendPDAs += P
|
sendPDAs += P
|
||||||
if(PDAs && PDAs.len > 0)
|
if(PDAs && PDAs.len > 0)
|
||||||
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortNames(sendPDAs)
|
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortAtom(sendPDAs)
|
||||||
else
|
else
|
||||||
customrecepient = null
|
customrecepient = null
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
var/ttone = "beep" //The ringtone!
|
var/ttone = "beep" //The ringtone!
|
||||||
var/honkamt = 0 //How many honks left when infected with honk.exe
|
var/honkamt = 0 //How many honks left when infected with honk.exe
|
||||||
var/mimeamt = 0 //How many silence left when infected with mime.exe
|
var/mimeamt = 0 //How many silence left when infected with mime.exe
|
||||||
var/note = "" //Current note in the notepad function, without HTML.
|
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function
|
||||||
var/notehtml = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function, with HTML.
|
var/notehtml = ""
|
||||||
var/cart = "" //A place to stick cartridge menu information
|
var/cart = "" //A place to stick cartridge menu information
|
||||||
var/detonate = 1 // Can the PDA be blown up?
|
var/detonate = 1 // Can the PDA be blown up?
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
dat += "<a href='byond://?src=\ref[src];choice=Lock'> Lock</a><br>"
|
dat += "<a href='byond://?src=\ref[src];choice=Lock'> Lock</a><br>"
|
||||||
else
|
else
|
||||||
dat += "<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>"
|
dat += "<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>"
|
||||||
dat += notehtml
|
dat += note
|
||||||
|
|
||||||
if (2)
|
if (2)
|
||||||
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
|
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.4</h4>"
|
||||||
@@ -533,12 +533,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
//MESSENGER/NOTE FUNCTIONS===================================
|
//MESSENGER/NOTE FUNCTIONS===================================
|
||||||
|
|
||||||
if ("Edit")
|
if ("Edit")
|
||||||
var/n = input(U, "Please enter message", name, note) as message
|
var/n = input(U, "Please enter message", name, notehtml) as message
|
||||||
if (in_range(src, U) && loc == U)
|
if (in_range(src, U) && loc == U)
|
||||||
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
|
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
|
||||||
if (mode == 1)
|
if (mode == 1)
|
||||||
notehtml = dd_replacetext(n, "\n", "<BR>")
|
note = dd_replacetext(n, "\n", "<BR>")
|
||||||
note = n
|
notehtml = n
|
||||||
else
|
else
|
||||||
U << browse(null, "window=pda")
|
U << browse(null, "window=pda")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
|||||||
L+=T
|
L+=T
|
||||||
usr.loc = pick(L)
|
usr.loc = pick(L)
|
||||||
|
|
||||||
|
|
||||||
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||||
set category = "Ghost"
|
set category = "Ghost"
|
||||||
set name = "Jump to Mob"
|
set name = "Jump to Mob"
|
||||||
@@ -182,6 +183,19 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
|||||||
else
|
else
|
||||||
A << "This mob is not located in the game world."
|
A << "This mob is not located in the game world."
|
||||||
|
|
||||||
|
/mob/dead/observer/verb/boo()
|
||||||
|
set category = "Ghost"
|
||||||
|
set name = "Boo!"
|
||||||
|
set desc= "Scare your crew members because of boredom!"
|
||||||
|
|
||||||
|
if(bootime > world.time) return
|
||||||
|
var/obj/machinery/light/L = locate(/obj/machinery/light) in view(1, src)
|
||||||
|
if(L)
|
||||||
|
L.flicker()
|
||||||
|
bootime = world.time + 600
|
||||||
|
return
|
||||||
|
//Maybe in the future we can add more <i>spooky</i> code here!
|
||||||
|
return
|
||||||
|
|
||||||
/mob/dead/observer/verb/toggle_alien_candidate()
|
/mob/dead/observer/verb/toggle_alien_candidate()
|
||||||
set name = "Toggle Be Alien Candidate"
|
set name = "Toggle Be Alien Candidate"
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
var/on_gs = 0
|
var/on_gs = 0
|
||||||
var/brightness = 8 // luminosity when on, also used in power calculation
|
var/brightness = 8 // luminosity when on, also used in power calculation
|
||||||
var/status = LIGHT_OK // LIGHT_OK, _EMPTY, _BURNED or _BROKEN
|
var/status = LIGHT_OK // LIGHT_OK, _EMPTY, _BURNED or _BROKEN
|
||||||
|
var/flickering = 0
|
||||||
var/light_type = /obj/item/weapon/light/tube // the type of light item
|
var/light_type = /obj/item/weapon/light/tube // the type of light item
|
||||||
var/fitting = "tube"
|
var/fitting = "tube"
|
||||||
var/switchcount = 0 // count of number of times switched on/off
|
var/switchcount = 0 // count of number of times switched on/off
|
||||||
@@ -280,9 +280,7 @@
|
|||||||
// A.update_lights()
|
// A.update_lights()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
/obj/machinery/light/update_icon()
|
||||||
// update the icon_state and luminosity of the light depending on its state
|
|
||||||
/obj/machinery/light/proc/update()
|
|
||||||
|
|
||||||
switch(status) // set icon_states
|
switch(status) // set icon_states
|
||||||
if(LIGHT_OK)
|
if(LIGHT_OK)
|
||||||
@@ -296,6 +294,12 @@
|
|||||||
if(LIGHT_BROKEN)
|
if(LIGHT_BROKEN)
|
||||||
icon_state = "[base_state]-broken"
|
icon_state = "[base_state]-broken"
|
||||||
on = 0
|
on = 0
|
||||||
|
return
|
||||||
|
|
||||||
|
// update the icon_state and luminosity of the light depending on its state
|
||||||
|
/obj/machinery/light/proc/update(var/trigger = 1)
|
||||||
|
|
||||||
|
update_icon()
|
||||||
if(!on)
|
if(!on)
|
||||||
use_power = 1
|
use_power = 1
|
||||||
else
|
else
|
||||||
@@ -310,7 +314,7 @@
|
|||||||
switchcount++
|
switchcount++
|
||||||
|
|
||||||
// now check to see if the bulb is burned out
|
// now check to see if the bulb is burned out
|
||||||
if(status == LIGHT_OK)
|
if(status == LIGHT_OK && trigger)
|
||||||
if(on && rigged)
|
if(on && rigged)
|
||||||
explode()
|
explode()
|
||||||
if( prob( min(60, switchcount*switchcount*0.01) ) )
|
if( prob( min(60, switchcount*switchcount*0.01) ) )
|
||||||
@@ -447,10 +451,24 @@
|
|||||||
var/area/A = src.loc.loc
|
var/area/A = src.loc.loc
|
||||||
return A.master.lightswitch && A.master.power_light
|
return A.master.lightswitch && A.master.power_light
|
||||||
|
|
||||||
|
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||||
|
if(flickering) return
|
||||||
|
flickering = 1
|
||||||
|
spawn(0)
|
||||||
|
if(on && status == LIGHT_OK)
|
||||||
|
for(var/i = 0; i < amount; i++)
|
||||||
|
if(status != LIGHT_OK) break
|
||||||
|
on = !on
|
||||||
|
update(0)
|
||||||
|
sleep(rand(5, 15))
|
||||||
|
on = (status == LIGHT_OK)
|
||||||
|
update(0)
|
||||||
|
flickering = 0
|
||||||
|
|
||||||
// ai attack - do nothing
|
// ai attack - make lights flicker, because why not
|
||||||
|
|
||||||
/obj/machinery/light/attack_ai(mob/user)
|
/obj/machinery/light/attack_ai(mob/user)
|
||||||
|
src.flicker(1)
|
||||||
return
|
return
|
||||||
|
|
||||||
// Aliens smash the bulb but do not get electrocuted./N
|
// Aliens smash the bulb but do not get electrocuted./N
|
||||||
|
|||||||
Reference in New Issue
Block a user