Merge branch 'bleeding-edge-freeze' into tentacles

This commit is contained in:
Chinsky
2013-05-26 05:02:34 +04:00
33 changed files with 862 additions and 741 deletions
+8
View File
@@ -20,6 +20,8 @@
sleep(2400)
*/
var/list/event_last_fired = list()
//Always triggers an event when called, dynamically chooses events based on job population
/proc/spawn_dynamic_event()
if(!config.allow_random_events)
@@ -86,8 +88,14 @@
if(!sent_ninja_to_station && toggle_space_ninja)
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
for(var/event_type in event_last_fired) if(possibleEvents[event_type])
var/time_passed = world.time - event_last_fired[event_type]
var/weight_modifier = max(0, 60 * 60 - time_passed / 100)
possibleEvents[event_type] = max(possibleEvents[event_type] - weight_modifier, 0)
var/picked_event = pickweight(possibleEvents)
event_last_fired[picked_event] = world.time
// Debug code below here, very useful for testing so don't delete please.
var/debug_message = "Firing random event. "
+2 -2
View File
@@ -2,8 +2,8 @@ var/list/allEvents = typesof(/datum/event) - /datum/event
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
//var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation
var/eventTimeLower = 10000 //15 minutes
var/eventTimeUpper = 25000 //30 minutes
var/eventTimeLower = 6000 //10 minutes
var/eventTimeUpper = 12000 //15 minutes
var/scheduledEvent = null
+1 -1
View File
@@ -13,7 +13,7 @@ datum/event/organ_failure/announce()
datum/event/organ_failure/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70))
if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
@@ -48,9 +48,6 @@
/mob/living/carbon/human/death(gibbed)
if(halloss > 0 && !gibbed)
halloss = 0
return
if(stat == DEAD) return
if(healths) healths.icon_state = "health5"
stat = DEAD
+10 -1
View File
@@ -439,7 +439,7 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/datum/organ/external/head/head = get_organ("head")
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name ) //disfigured. use id-name if possible
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown"
return real_name
@@ -823,6 +823,15 @@
else if(src.dna.mutantrace == "tajaran")
return "Tajaran"
/mob/living/carbon/proc/update_mutantrace_languages()
if(src.dna)
if(src.dna.mutantrace == "lizard")
src.soghun_talk_understand = 1
else if(src.dna.mutantrace == "skrell")
src.skrell_talk_understand = 1
else if(src.dna.mutantrace == "tajaran")
src.tajaran_talk_understand = 1
/mob/living/carbon/human/proc/play_xylophone()
if(!src.xylophone)
visible_message("\red [src] begins playing his ribcage like a xylophone. It's quite spooky.","\blue You begin to play a spooky refrain on your ribcage.","\red You hear a spooky xylophone melody.")
+3 -3
View File
@@ -402,7 +402,7 @@ var/list/department_radio_keys = list(
var/deaf_message = ""
var/deaf_type = 1
if(M != src)
deaf_message = "<span class='name'>[name][alt_name]</span> talks but you cannot hear them."
deaf_message = "<span class='name'>[name]</span>[alt_name] talks but you cannot hear them."
else
deaf_message = "<span class='notice'>You cannot hear yourself!</span>"
deaf_type = 2 // Since you should be able to hear yourself without looking
@@ -416,12 +416,12 @@ var/list/department_radio_keys = list(
message_b = voice_message
else
message_b = stars(message)
message_b = say_quote(message_b)
message_b = say_quote(message,is_speaking_soghun,is_speaking_skrell,is_speaking_taj)
if (italics)
message_b = "<i>[message_b]</i>"
rendered = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
rendered = "<span class='game say'><span class='name'>[name]</span>[alt_name] <span class='message'>[message_b]</span></span>" //Voice_name isn't too useful. You'd be able to tell who was talking presumably.
for (var/M in heard_b)
@@ -210,14 +210,14 @@
/mob/living/silicon/robot/verb/Namepick()
if(custom_name)
return 0
spawn(0)
var/newname
newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text
if (newname != "")
custom_name = newname
var/newname
newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text
if (newname != "")
custom_name = newname
updatename("Default")
updateicon()
updatename("Default")
updateicon()
/mob/living/silicon/robot/verb/cmd_robot_alerts()
set category = "Robot Commands"
+13 -1
View File
@@ -236,7 +236,8 @@
if(href_list["write"])
var/id = href_list["write"]
//var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as message
var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_MESSAGE_LEN)
//var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_MESSAGE_LEN)
var/t = input("Enter what you want to write:", "Write", null, null) as message
var/obj/item/i = usr.get_active_hand() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen))
@@ -248,6 +249,17 @@
if((!in_range(src, usr) && loc != usr && !( istype(loc, /obj/item/weapon/clipboard) ) && loc.loc != usr && usr.get_active_hand() != i)) // Some check to see if he's allowed to write
return
t = checkhtml(t)
// check for exploits
for(var/bad in paper_blacklist)
if(findtext(t,bad))
usr << "\blue You think to yourself, \"Hm.. this is only paper...\""
log_admin("PAPER: [usr] ([usr.ckey]) tried to use forbidden word in [src]: [bad].")
message_admins("PAPER: [usr] ([usr.ckey]) tried to use forbidden word in [src]: [bad].")
return
t = replacetext(t, "\n", "<BR>")
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
if(id!="end")
@@ -42,9 +42,9 @@
icon_state = "chocolateglass"
name = "Glass of chocolate"
desc = "Tasty"
if("lemon")
if("lemonjuice")
icon_state = "lemonglass"
name = "Glass of lemon"
name = "Glass of lemonjuice"
desc = "Sour..."
if("cola")
icon_state = "glass_brown"