Merge remote-tracking branch 'upstream/dev' into RoboCircuit

Conflicts:
	code/modules/mob/living/carbon/brain/posibrain.dm
	maps/exodus-1.dmm
This commit is contained in:
PsiOmega
2014-11-30 10:47:36 +01:00
71 changed files with 2069 additions and 644 deletions

View File

@@ -5,7 +5,7 @@ var/global/floorIsLava = 0
////////////////////////////////
/proc/message_admins(var/msg)
msg = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
msg = "<span class=\"log_message\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
log_adminwarn(msg)
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
@@ -13,7 +13,7 @@ var/global/floorIsLava = 0
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
log_attack(text)
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ATTACK:</span> <span class=\"message\">[text]</span></span>"
var/rendered = "<span class=\"log_message\"><span class=\"prefix\">ATTACK:</span> <span class=\"message\">[text]</span></span>"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
if(C.prefs.toggles & CHAT_ATTACKLOGS)

View File

@@ -377,7 +377,8 @@ var/list/admin_verbs_mentor = list(
else
//ghostize
var/mob/body = mob
body.ghostize(1)
var/mob/dead/observer/ghost = body.ghostize(1)
ghost.admin_ghosted = 1
if(body && !body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -3,7 +3,7 @@
//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE!
var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","alien","as")
/client/verb/adminhelp()
/client/verb/adminhelp(msg as null|text)
set category = "Admin"
set name = "Adminhelp"
@@ -16,7 +16,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
src << "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>"
return
adminhelped = 1 //Determines if they get the message to reply by clicking the name.
/**src.verbs -= /client/verb/adminhelp
@@ -25,26 +24,29 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps
src.verbs += /client/verb/adminhelp // 2 minute cool-down for adminhelps//Go to hell
**/
var/msg
var/list/type = list ("Gameplay/Roleplay question", "Rule/Gameplay issue", "Bug report")
var/selected_type = input("Pick a category.", "Admin Help", null, null) as null|anything in type
if(selected_type)
if(!selected_type)
return
if(!msg)
msg = input("Please enter your message:", "Admin Help", null, null) as text
if(!msg || alert("The following message will be sent to staff that administers\n the '[selected_type]' category:\n\n[msg]\n", "Admin Help", "Ok", "Cancel") == "Cancel")
return
var/selected_upper = uppertext(selected_type)
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
//clean the input msg
if(!msg) return
if(!msg)
return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
if(!msg)
return
var/original_msg = msg
//explode the input msg into a list
var/list/msglist = text2list(msg, " ")
@@ -98,14 +100,15 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
continue
msg += "[original_word] "
if(!mob) return //this doesn't happen
var/ref_mob = "\ref[mob]"
var/mentor_msg = "\blue <b><font color=red>[selected_upper]: </font>[get_options_bar(mob, 0, 0, 1, 0)][ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
var/dev_msg = "\blue <b><font color=red>[selected_upper]: </font>[get_options_bar(mob, 3, 0, 1, 0)][ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
msg = "\blue <b><font color=red>[selected_upper]: </font>[get_options_bar(mob, 2, 1, 1)][ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
if(!mob) //this doesn't happen
return
var/ai_cl
if(ai_found)
ai_cl = " (<A HREF='?_src_=holder;adminchecklaws=\ref[mob]'>CL</A>)"
var/mentor_msg = "\blue <b><font color=red>[selected_upper]: </font>[get_options_bar(mob, 0, 0, 1, 0)][ai_cl]:</b> [msg]"
var/dev_msg = "\blue <b><font color=red>[selected_upper]: </font>[get_options_bar(mob, 3, 0, 1, 0)][ai_cl]:</b> [msg]"
msg = "\blue <b><font color=red>[selected_upper]: </font>[get_options_bar(mob, 2, 1, 1)][ai_cl]:</b> [msg]"
var/admin_number_afk = 0
@@ -158,10 +161,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
X << 'sound/effects/adminhelp.ogg'
X << dev_msg
/*for(var/client/X in admins)
if((R_ADMIN|R_MOD|R_MENTOR) & X.holder.rights)
if(X.is_afk())
@@ -179,10 +178,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
var/admin_number_present = admins.len - admin_number_afk
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
if(admin_number_present <= 0)
if(!admin_number_afk)
send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(original_msg)] - !!No admins online!!")
else
send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(original_msg)] - !!All admins AFK ([admin_number_afk])!!")
send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(original_msg)] - !![admin_number_afk ? "All admins AFK ([admin_number_afk])" : "No admins online"]!!")
else
send2adminirc("[selected_upper] from [key_name(src)]: [html_decode(original_msg)]")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -64,20 +64,11 @@
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
var/recieve_color = "purple"
var/send_pm_type = " "
var/recieve_pm_type = "Player"
if(holder)
//mod PMs are maroon
//PMs sent from admins and mods display their rank
if(holder)
if( holder.rights & R_ADMIN )
recieve_color = "red"
else
recieve_color = "maroon"
send_pm_type = holder.rank + " "
if(!C.holder && holder && holder.fakekey)
recieve_pm_type = "Admin"
else
@@ -87,10 +78,10 @@
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
return
var/recieve_message = ""
var/recieve_message
if(holder && !C.holder)
recieve_message = "<font color='[recieve_color]' size='3'><b>-- Click the [recieve_pm_type]'s name to reply --</b></font>\n"
recieve_message = "<span class='pm'><span class='howto'><b>-- Click the [recieve_pm_type]'s name to reply --</b></span></span>\n"
if(C.adminhelped)
C << recieve_message
C.adminhelped = 0
@@ -100,17 +91,15 @@
spawn(0) //so we don't hold the caller proc up
var/sender = src
var/sendername = key
var/reply = input(C, msg,"[recieve_pm_type] PM from-[sendername]", "") as text|null //show message and await a reply
var/reply = input(C, msg,"[recieve_pm_type] PM from [sendername]", "") as text|null //show message and await a reply
if(C && reply)
if(sender)
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
else
adminhelp(reply) //sender has left, adminhelp instead
return
recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[get_options_bar(src, C.holder ? 1 : 0, C.holder ? 1 : 0, 1)]</b>: [msg]</font>"
C << recieve_message
src << "<font color='blue'>[send_pm_type]PM to-<b>[get_options_bar(C, holder ? 1 : 0, holder ? 1 : 0, 1)]</b>: [msg]</font>"
src << "<span class='pm'><span class='out'>" + create_text_tag("pm_out_alt", "PM", src) + " to <span class='name'>[get_options_bar(C, holder ? 1 : 0, holder ? 1 : 0, 1)]</span>: <span class='message'>[msg]</span></span></span>"
C << "<span class='pm'><span class='in'>" + create_text_tag("pm_in", "", C) + " <b>\[[recieve_pm_type] PM\]</b> <span class='name'>[get_options_bar(src, C.holder ? 1 : 0, C.holder ? 1 : 0, 1)]</span>: <span class='message'>[msg]</span></span></span>"
//play the recieving admin the adminhelp sound (if they have them enabled)
//non-admins shouldn't be able to disable this
@@ -124,8 +113,8 @@
//check client/X is an admin and isn't the sender or recipient
if(X == C || X == src)
continue
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & (R_MOD|R_MENTOR)) )
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
if(X.key != key && X.key != C.key && (X.holder.rights & R_ADMIN|R_MOD|R_MENTOR))
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>[key_name(C, X, 0)]</span>: <span class='message'>[msg]</span></span></span>"
/client/proc/cmd_admin_irc_pm()
if(prefs.muted & MUTE_ADMINHELP)
@@ -146,12 +135,11 @@
send2adminirc("PlayerPM from [key_name(src)]: [html_decode(msg)]")
src << "<font color='blue'>IRC PM to-<b>IRC-Admins</b>: [msg]</font>"
src << "<span class='pm'><span class='out'>" + create_text_tag("pm_out_alt", "", src) + " to <span class='name'Admin IRC</span>: <span class='message'>[msg]</span></span></span>"
log_admin("PM: [key_name(src)]->IRC: [msg]")
for(var/client/X in admins)
if(X == src)
continue
if((X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD))
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;IRC-Admins:</B> \blue [msg]</font>"
if(X.holder.rights & R_ADMIN|R_MOD)
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>Admin IRC</span>: <span class='message'>[msg]</span></span></span>"

View File

@@ -9,15 +9,10 @@
log_admin("[key_name(src)] : [msg]")
var/color = "adminsay"
if(ishost(usr))
color = "headminsay"
if(check_rights(R_ADMIN,0))
msg = "<span class='[color]'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
C << "<span class='admin_channel'>" + create_text_tag("admin", "ADMIN:", C) + " <span class='name'>[key_name(usr, 1)]</span>(<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -33,15 +28,11 @@
if (!msg)
return
var/color = "mod"
if (check_rights(R_ADMIN,0))
color = "adminmod"
var/channel = "MOD:"
if(config.mods_are_mentors)
channel = "MENTOR:"
var/sender_name = src.key
if(check_rights(R_ADMIN, 0))
sender_name = "<span class='admin'>[sender_name]</span>"
for(var/client/C in admins)
if((R_ADMIN|R_MOD) & C.holder.rights)
C << "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
else // Mentors get same message without fancy coloring of name if special_role.
C << "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1,1,0)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
C << "<span class='mod_channel'>" + create_text_tag("mod", "MOD:", C) + " <span class='name'>[sender_name]</span>(<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -35,16 +35,6 @@
if (!msg)
return
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[stafftype]([src.holder.fakekey ? pick("BADMIN", "hornigranny", "TLF", "scaredforshadows", "KSI", "Silnazi", "HerpEs", "BJ69", "SpoofedEdd", "Uhangay", "Wario90900", "Regarity", "MissPhareon", "LastFish", "unMportant", "Deurpyn", "Fatbeaver") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
for (var/mob/M in player_list)
if (istype(M, /mob/new_player))
continue
if(M.client && M.client.holder && (M.client.prefs.toggles & CHAT_DEAD)) // show the message to admins who have deadchat toggled on
M.show_message(rendered, 2)
else if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD)) // show the message to regular ghosts who have deadchat toggled on
M.show_message(rendered, 2)
say_dead_direct("<span class='name'>[stafftype]([src.holder.fakekey ? src.holder.fakekey : src.key])</span> says, <span class='message'>\"[msg]\"</span>")
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -11,13 +11,14 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"malf AI" = IS_MODE_COMPILED("malfunction"), // 4
"revolutionary" = IS_MODE_COMPILED("revolution"), // 5
"alien candidate" = 1, //always show // 6
"pAI candidate" = 1, // -- TLE // 7
"positronic brain" = 1, // 7
"cultist" = IS_MODE_COMPILED("cult"), // 8
"infested monkey" = IS_MODE_COMPILED("monkey"), // 9
"ninja" = "true", // 10
"vox raider" = IS_MODE_COMPILED("heist"), // 11
"diona" = 1, // 12
"mutineer" = IS_MODE_COMPILED("mutiny"), // 13
"pAI candidate" = 1, // -- TLE // 14
)
//used for alternate_option
@@ -430,11 +431,8 @@ datum/preferences
var/n = 0
for (var/i in special_roles)
if(special_roles[i]) //if mode is available on the server
if(jobban_isbanned(user, i))
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
else if(i == "pai candidate")
if(jobban_isbanned(user, "pAI"))
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
if(jobban_isbanned(user, i) || (i == "positronic brain" && jobban_isbanned(user, "AI") && jobban_isbanned(user, "Cyborg")) || (i == "pAI candidate" && jobban_isbanned(user, "pAI")))
dat += "<b>Be [i]:<b> <font color=red><b> \[BANNED]</b></font><br>"
else
dat += "<b>Be [i]:</b> <a href='?_src_=prefs;preference=be_special;num=[n]'><b>[src.be_special&(1<<n) ? "Yes" : "No"]</b></a><br>"
n++

View File

@@ -121,6 +121,16 @@
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggle_chattags()
set name = "Show/Hide Chat Tags"
set category = "Preferences"
set desc = "Toggles seeing chat tags/icons"
prefs.toggles ^= CHAT_NOICONS
prefs.save_preferences()
src << "You will [!(prefs.toggles & CHAT_NOICONS) ? "now" : "no longer"] see chat tag icons."
feedback_add_details("admin_verb","TCTAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
set name = "Hear/Silence Ambience"

View File

@@ -21,6 +21,7 @@
var/antagHUD = 0
universal_speak = 1
var/atom/movable/following = null
var/admin_ghosted = 0
/mob/dead/observer/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
@@ -165,17 +166,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set desc = "Relinquish your life and enter the land of the dead."
if(stat == DEAD)
ghostize(1)
announce_ghost_joinleave(ghostize(1))
else
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to play this round for another 30 minutes! You can't change your mind so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost") return //didn't want to ghost after-all
if(response != "Ghost")
return
resting = 1
var/turf/location = get_turf(src)
message_admins("[key_name_admin(usr)] has ghosted. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
log_game("[key_name_admin(usr)] has ghosted.")
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
return
announce_ghost_joinleave(ghost)
/mob/dead/observer/Move(NewLoc, direct)
@@ -237,6 +239,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
mind.current.ajourn=0
mind.current.key = key
if(!admin_ghosted)
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
return 1
/mob/dead/observer/verb/toggle_medHUD()
@@ -280,7 +284,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
M.antagHUD = 1
src << "\blue <B>AntagHUD Enabled</B>"
/mob/dead/observer/proc/dead_tele()
/mob/dead/observer/proc/dead_tele(A in ghostteleportlocs)
set category = "Ghost"
set name = "Teleport"
set desc= "Teleport to a location"
@@ -290,8 +294,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
usr.verbs -= /mob/dead/observer/proc/dead_tele
spawn(30)
usr.verbs += /mob/dead/observer/proc/dead_tele
var/A
A = input("Area to jump to", "BOOYEA", A) as null|anything in ghostteleportlocs
var/area/thearea = ghostteleportlocs[A]
if(!thearea) return
@@ -305,14 +307,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
usr.loc = pick(L)
following = null
/mob/dead/observer/verb/follow()
/mob/dead/observer/verb/follow(input in getmobs())
set category = "Ghost"
set name = "Follow" // "Haunt"
set desc = "Follow and haunt a mob."
var/list/mobs = getmobs()
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
var/mob/target = mobs[input]
var/target = getmobs()[input]
if(!target) return
ManualFollow(target)
// This is the ghost's follow verb with an argument
@@ -332,32 +333,24 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
loc = T
sleep(15)
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
/mob/dead/observer/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost"
set name = "Jump to Mob"
set desc = "Teleport to a mob"
if(istype(usr, /mob/dead/observer)) //Make sure they're an observer!
var/list/dest = list() //List of possible destinations (mobs)
var/target = null //Chosen target.
dest += getmobs() //Fill list, prompt user with list
target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in dest
if (!target)//Make sure we actually have a target
return
else
var/mob/M = dest[target] //Destination mob
var/mob/A = src //Source mob
var/mob/M = getmobs()[target] //Destination mob
var/turf/T = get_turf(M) //Turf of the destination mob
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
A.loc = T
src.loc = T
following = null
else
A << "This mob is not located in the game world."
src << "This mob is not located in the game world."
/*
/mob/dead/observer/verb/boo()
set category = "Ghost"
@@ -405,7 +398,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(total_moles)
for(var/g in environment.gas)
src << "\blue [gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)"
src << "\blue Temperature: [round(environment.temperature-T0C,0.1)]&deg;C"
src << "\blue Temperature: [round(environment.temperature-T0C,0.1)]&deg;C ([round(environment.temperature,0.1)]K)"
src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]"
@@ -460,6 +453,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
host.universal_understand = 0
host.ckey = src.ckey
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
announce_ghost_joinleave(host, 0, "They are now a mouse.")
/mob/dead/observer/verb/view_manfiest()
set name = "View Crew Manifest"

View File

@@ -90,20 +90,5 @@
input = message
if(input)
message = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <b>[src]</b> [message]</span>"
else
return
if(message)
log_emote("Ghost/[src.key] : [message]")
for(var/mob/M in player_list)
if(istype(M, /mob/new_player))
continue
if(M.client && M.client.holder && (M.client.holder.rights & R_ADMIN|R_MOD) && (M.client.prefs.toggles & CHAT_DEAD)) // Show the emote to admins/mods
M << message
else if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD)) // Show the emote to regular ghosts with deadchat toggled on
M.show_message(message, 2)
log_emote("Ghost/[src.key] : [input]")
say_dead_direct(input, src)

View File

@@ -28,21 +28,23 @@
for(var/mob/dead/observer/O in player_list)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
continue
if(jobban_isbanned(O, "pAI"))
if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg"))
continue
if(O.client)
if(O.client.prefs.be_special & BE_PAI)
if(O.client.prefs.be_special & BE_AI)
question(O.client)
/obj/item/device/mmi/digital/posibrain/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
if(response == "Yes")
response = alert(C, "Are you sure you want to play as a positronic brain?", "Positronic brain request", "Yes", "No")
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PAI
C.prefs.be_special ^= BE_AI
/obj/item/device/mmi/digital/posibrain/transfer_identity(var/mob/living/carbon/H)
@@ -54,7 +56,7 @@
return
/obj/item/device/mmi/digital/posibrain/proc/transfer_personality(var/mob/candidate)
announce_ghost_joinleave(candidate, 0, "They are occupying a positronic brain now.")
src.searching = 0
src.brainmob.mind = candidate.mind
src.brainmob.ckey = candidate.ckey

View File

@@ -45,6 +45,7 @@ var/list/ai_verbs_default = list(
anchored = 1 // -- TLE
density = 1
status_flags = CANSTUN|CANPARALYSE
shouldnt_see = list(/obj/effect/rune)
var/list/network = list("SS13")
var/obj/machinery/camera/camera = null
var/list/connected_robots = list()

View File

@@ -371,8 +371,4 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")
var/warning = alert(C, "Are you sure? This action will be undoable and you will need to wait until next round.", "You sure?", "Yes", "No")
if(warning == "Yes")
asked[C.key] = INFINITY
else
question(C)
C.prefs.be_special ^= BE_PAI

View File

@@ -66,6 +66,7 @@
if(!player || !istype(player.mob,/mob/dead))
return
announce_ghost_joinleave(player, 0, "They have taken control over a maintenance drone.")
visible_message("\The [src] churns and grinds as it lurches into motion, disgorging a shiny new drone after a few moments.")
flick("h_lathe_leave",src)

View File

@@ -51,6 +51,7 @@
if (client)
client.screen -= module_state_1
contents -= module_state_1
module_state_1:loc = module
module_state_1 = null
inv1.icon_state = "inv1"
if(module_state_2)
@@ -59,6 +60,7 @@
if (client)
client.screen -= module_state_2
contents -= module_state_2
module_state_2:loc = module
module_state_2 = null
inv2.icon_state = "inv2"
if(module_state_3)
@@ -67,6 +69,7 @@
if (client)
client.screen -= module_state_3
contents -= module_state_3
module_state_3:loc = module
module_state_3 = null
inv3.icon_state = "inv3"
updateicon()

View File

@@ -437,6 +437,8 @@ var/list/slot_equipment_priority = list( \
log_game("[usr.key] AM failed due to disconnect.")
return
announce_ghost_joinleave(client, 0)
var/mob/new_player/M = new /mob/new_player()
if(!client)
log_game("[usr.key] AM failed due to disconnect.")
@@ -821,6 +823,8 @@ note dizziness decrements automatically in the mob's Life() proc.
for(var/atom/A in listed_turf)
if(A.invisibility > see_invisible)
continue
if(is_type_in_list(A, shouldnt_see))
continue
statpanel(listed_turf.name, null, A)
if(spell_list && spell_list.len)

View File

@@ -217,6 +217,7 @@
var/immune_to_ssd = 0
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
var/list/active_genes=list()

View File

@@ -465,3 +465,66 @@ proc/is_blind(A)
if(get_area(M) == A)
mobs += M
return mobs
//Direct dead say used both by emote and say
//It is somewhat messy. I don't know what to do.
//I know you can't see the change, but I rewrote the name code. It is significantly less messy now
/proc/say_dead_direct(var/message, var/mob/subject = null)
var/name
if(subject && subject.client)
var/client/C = subject.client
var/keyname = (C.holder && C.holder.fakekey) ? C.holder.fakekey : C.key
if(C.mob) //Most of the time this is the dead/observer mob; we can totally use him if there is no better name
var/mindname
var/realname = C.mob.real_name
if(C.mob.mind)
mindname = C.mob.mind.name
if(C.mob.mind.original && C.mob.mind.original.real_name)
realname = C.mob.mind.original.real_name
if(mindname && mindname != realname)
name = "[realname] died as [mindname]"
else
name = realname
name = "<span class='name'>[keyname] ([name])</span> "
for(var/mob/M in player_list)
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && !is_mentor(M.client))) && (M.client.prefs.toggles & CHAT_DEAD))
var/follow = ""
if(subject)
if(subject != M)
follow = "(<a href='byond://?src=\ref[M];track=\ref[subject]'>follow</a>) "
if(M.stat != DEAD && M.client.holder)
follow = "(<a href='?src=\ref[M.client.holder];adminplayerobservejump=\ref[subject]'>JMP</a>) "
M << "<span class='deadsay'>" + create_text_tag("dead", "DEAD:", M.client) + " [name][follow][message]</span>"
//Announces that a ghost has joined/left, mainly for use with wizards
/proc/announce_ghost_joinleave(O, var/joined_ghosts = 1, var/message = "")
var/client/C
//Accept any type, sort what we want here
if(istype(O, /mob))
var/mob/M = O
if(M.client)
C = M.client
else if(istype(O, /client))
C = O
else if(istype(O, /datum/mind))
var/datum/mind/M = O
if(M.current && M.current.client)
C = M.current.client
else if(M.original && M.original.client)
C = M.original.client
if(C)
var/name
if(C.mob)
var/mob/M = C.mob
if(M.mind && M.mind.name)
name = M.mind.name
if(M.real_name && M.real_name != name)
name += " ([M.real_name])"
if(!name)
name = (C.holder && C.holder.fakekey) ? C.holder.fakekey : C.key
if(joined_ghosts)
say_dead_direct("The ghost of <span class='name'>[name]</span> now [pick("skulks","lurks","prowls","creeps","stalks")] among the dead. [message]")
else
say_dead_direct("<span class='name'>[name]</span> no longer [pick("skulks","lurks","prowls","creeps","stalks")] in the realm of the dead. [message]")

View File

@@ -29,8 +29,11 @@
output += "<p><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A></p>"
if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
if(!ready) output += "<p><a href='byond://?src=\ref[src];ready=1'>Declare Ready</A></p>"
else output += "<p><b>You are ready</b> (<a href='byond://?src=\ref[src];ready=2'>Cancel</A>)</p>"
var/readylink = "<a href='byond://?src=\ref[src];ready=[ready ? "2" : "1"]'>[ready ? "Not Ready" : "Ready"]</a>"
if(ready)
output += "<p>\[ <b>Ready</b> | [readylink] \]</p>"
else
output += "<p>\[ [readylink] | <b>Not Ready</b> \]</p>"
else
output += "<a href='byond://?src=\ref[src];manifest=1'>View the Crew Manifest</A><br><br>"
@@ -59,7 +62,7 @@
output += "</div>"
src << browse(output,"window=playersetup;size=210x240;can_close=0")
src << browse(output,"window=playersetup;size=210x280;can_close=0")
return
Stat()
@@ -121,6 +124,7 @@
observer.loc = O.loc
observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
announce_ghost_joinleave(src)
client.prefs.update_preview_icon()
observer.icon = client.prefs.preview_icon
observer.alpha = 127
@@ -371,7 +375,10 @@
var/mins = (mills % 36000) / 600
var/hours = mills / 36000
var/name = client.prefs.be_random_name ? "friend" : client.prefs.real_name
var/dat = "<html><body><center>"
dat += "<b>Welcome, [name].<br></b>"
dat += "Round Duration: [round(hours)]h [round(mins)]m<br>"
if(emergency_shuttle) //In case Nanotrasen decides reposess CentComm's shuttles.

View File

@@ -12,6 +12,16 @@
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
return
//Let's try to make users fix their errors - we try to detect single, out-of-place letters and 'unintended' words
var/first_letter = copytext(message,1,2)
if((copytext(message,2,3) == " " && first_letter != "I" && first_letter != "A" && first_letter != ";") || cmptext(copytext(message,1,5), "say ") || cmptext(copytext(message,1,4), "me ") || cmptext(copytext(message,1,6), "looc ") || cmptext(copytext(message,1,5), "ooc ") || cmptext(copytext(message,2,6), "say "))
var/response = alert(usr, "Do you really want to say this using the *say* verb?\n\n[message]\n", "Confirm your message", "Yes", "Edit message", "No")
if(response == "Edit message")
message = input(usr, "Please edit your message carefully:", "Edit message", message)
if(!message)
return
else if(response == "No")
return
set_typing_indicator(0)
usr.say(message)
@@ -33,8 +43,6 @@
usr.emote(message)
/mob/proc/say_dead(var/message)
var/name = src.real_name
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
return
@@ -48,23 +56,7 @@
usr << "\red You have deadchat muted."
return
if(mind && mind.name)
name = "[mind.name]"
else
name = real_name
if(name != real_name)
name += " (died as [real_name])"
for(var/mob/M in player_list)
if(istype(M, /mob/new_player))
continue
if(M.client && (M.stat == DEAD || (M.client.holder && !is_mentor(M.client)) && (M.client.prefs.toggles & CHAT_DEAD)))
var/follow = ""
if(src != M)
follow = " (<a href='byond://?src=\ref[M];track=\ref[src]'>follow</a>)"
if(M.stat != DEAD && M.client.holder)
follow = " (<a href='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</a>)"
M << "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[follow] [pick("complains","moans","whines","laments","blubbers")], <span class='message'>\"[message]\"</span></span>"
say_dead_direct("[pick("complains","moans","whines","laments","blubbers")], <span class='message'>\"[message]\"</span>", src)
/mob/proc/say_understands(var/mob/other,var/datum/language/speaking = null)

View File

@@ -231,7 +231,7 @@
t = replacetext(t, "\[/grid\]", "</td></tr></table>")
t = replacetext(t, "\[row\]", "</td><tr>")
t = replacetext(t, "\[cell\]", "<td>")
t = replacetext(t, "\[logo\]", "<img src = html/images/ntlogo.png>")
t = replacetext(t, "\[logo\]", "<img src = ntlogo.png>")
t = "<font face=\"[deffont]\" color=[P ? P.colour : "black"]>[t]</font>"
else // If it is a crayon, and he still tries to use these, make them empty!

View File

@@ -5,18 +5,20 @@
/obj/machinery/power/fractal_reactor
name = "Fractal Energy Reactor"
desc = "This thing drains power from fractal-subspace. (DEBUG ITEM: INFINITE POWERSOURCE FOR MAP TESTING. CONTACT DEVELOPERS IF FOUND.)"
desc = "This thing drains power from fractal-subspace." // (DEBUG ITEM: INFINITE POWERSOURCE FOR MAP TESTING. CONTACT DEVELOPERS IF FOUND.)"
icon = 'icons/obj/power.dmi'
icon_state = "tracker" //ICON stolen from solar tracker. There is no need to make new texture for debug item
anchored = 1
density = 1
var/power_generation_rate = 2000000 //Defaults to 2MW of power. Should be enough to run SMES charging on full 2 times.
var/power_generation_rate = 1000000 //Defaults to 1MW of power.
var/powernet_connection_failed = 0
var/mapped_in = 0 //Do not announce creation when it's mapped in.
// This should be only used on Dev for testing purposes.
/obj/machinery/power/fractal_reactor/New()
..()
world << "<b>\red WARNING: \black Map testing power source activated at: X:[src.loc.x] Y:[src.loc.y] Z:[src.loc.z]</b>"
if(!mapped_in)
world << "<b>\red WARNING: \black Map testing power source activated at: X:[src.loc.x] Y:[src.loc.y] Z:[src.loc.z]</b>"
/obj/machinery/power/fractal_reactor/process()
if(!powernet && !powernet_connection_failed)

View File

@@ -31,6 +31,7 @@
var/cur_coils = 1 // Current amount of installed coils
var/safeties_enabled = 1 // If 0 modifications can be done without discharging the SMES, at risk of critical failure.
var/failing = 0 // If 1 critical failure has occured and SMES explosion is imminent.
charge = 0
/obj/machinery/power/smes/buildable/New()
component_parts = list()

View File

@@ -27,16 +27,6 @@
if(!height || air_group) return 0
else return ..()
//Looks like copy/pasted code... I doubt 'need_rebuild' is even used here - Nodrak
/obj/machinery/shield/proc/update_nearby_tiles(need_rebuild)
if(!air_master)
return 0
air_master.mark_for_update(get_turf(src))
return 1
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return
@@ -357,4 +347,4 @@
src.icon_state = malfunction ? "shieldonbr":"shieldon"
else
src.icon_state = malfunction ? "shieldoffbr":"shieldoff"
return
return

View File

@@ -13,6 +13,14 @@
var/strength = 0
var/ticks_recovering = 10
/obj/effect/energy_field/New()
..()
update_nearby_tiles()
/obj/effect/energy_field/Del()
update_nearby_tiles()
..()
/obj/effect/energy_field/ex_act(var/severity)
Stress(0.5 + severity)
@@ -44,12 +52,16 @@
strength = 0
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
var/old_density = density
if(strength >= 1)
invisibility = 0
density = 1
else if(strength < 1)
invisibility = 101
density = 0
if (density != old_density)
update_nearby_tiles()
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.

View File

@@ -242,6 +242,7 @@
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
..()
update_nearby_tiles()
src.gen_primary = A
src.gen_secondary = B
if(A && B && A.active && B.active)
@@ -253,6 +254,10 @@
else
del(src) //need at least two generator posts
/obj/machinery/shieldwall/Del()
update_nearby_tiles()
..()
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
return
@@ -321,4 +326,4 @@
if (istype(mover, /obj/item/projectile))
return prob(10)
else
return !src.density
return !src.density

View File

@@ -6,4 +6,4 @@
/obj/machinery/computer/shuttle_control/multi/syndicate
name = "Syndicate control console"
req_access = list(access_syndicate)
shuttle_tag = "Syndicate"
shuttle_tag = "Mercenary"