mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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:
@@ -10,4 +10,5 @@
|
||||
blinded = 0
|
||||
anchored = 1 // don't get pushed around
|
||||
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
|
||||
|
||||
/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)
|
||||
@@ -273,6 +274,11 @@
|
||||
world << sound('aliens.ogg')
|
||||
|
||||
/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")
|
||||
world << sound('radiation.ogg')
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
@@ -289,9 +295,19 @@
|
||||
domutcheck(H,null,1)
|
||||
for(var/mob/living/carbon/monkey/M in world)
|
||||
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
|
||||
/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)
|
||||
if(istype(get_area(temp_apc), /area/security/prison))
|
||||
temp_apc.overload_lighting()
|
||||
|
||||
@@ -402,7 +402,7 @@
|
||||
if(!P.owner || P.toff) continue
|
||||
sendPDAs += P
|
||||
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
|
||||
customrecepient = null
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/ttone = "beep" //The ringtone!
|
||||
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/note = "" //Current note in the notepad function, without HTML.
|
||||
var/notehtml = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function, with HTML.
|
||||
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function
|
||||
var/notehtml = ""
|
||||
var/cart = "" //A place to stick cartridge menu information
|
||||
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>"
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Edit'> Edit</a><br>"
|
||||
dat += notehtml
|
||||
dat += note
|
||||
|
||||
if (2)
|
||||
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===================================
|
||||
|
||||
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)
|
||||
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
|
||||
if (mode == 1)
|
||||
notehtml = dd_replacetext(n, "\n", "<BR>")
|
||||
note = n
|
||||
note = dd_replacetext(n, "\n", "<BR>")
|
||||
notehtml = n
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
@@ -156,6 +156,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
L+=T
|
||||
usr.loc = pick(L)
|
||||
|
||||
|
||||
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
set category = "Ghost"
|
||||
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
|
||||
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()
|
||||
set name = "Toggle Be Alien Candidate"
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
var/on_gs = 0
|
||||
var/brightness = 8 // luminosity when on, also used in power calculation
|
||||
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/fitting = "tube"
|
||||
var/switchcount = 0 // count of number of times switched on/off
|
||||
@@ -280,9 +280,7 @@
|
||||
// A.update_lights()
|
||||
..()
|
||||
|
||||
|
||||
// update the icon_state and luminosity of the light depending on its state
|
||||
/obj/machinery/light/proc/update()
|
||||
/obj/machinery/light/update_icon()
|
||||
|
||||
switch(status) // set icon_states
|
||||
if(LIGHT_OK)
|
||||
@@ -296,6 +294,12 @@
|
||||
if(LIGHT_BROKEN)
|
||||
icon_state = "[base_state]-broken"
|
||||
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)
|
||||
use_power = 1
|
||||
else
|
||||
@@ -310,7 +314,7 @@
|
||||
switchcount++
|
||||
|
||||
// now check to see if the bulb is burned out
|
||||
if(status == LIGHT_OK)
|
||||
if(status == LIGHT_OK && trigger)
|
||||
if(on && rigged)
|
||||
explode()
|
||||
if( prob( min(60, switchcount*switchcount*0.01) ) )
|
||||
@@ -447,10 +451,24 @@
|
||||
var/area/A = src.loc.loc
|
||||
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)
|
||||
src.flicker(1)
|
||||
return
|
||||
|
||||
// Aliens smash the bulb but do not get electrocuted./N
|
||||
|
||||
Reference in New Issue
Block a user