Due to git tree being fucked up for some reason, manually reapplied many man many fixes.

Just got to tip of real tree and got zipball, then unpacked it here.
This commit is contained in:
Chinsky
2013-02-07 07:13:27 +04:00
parent 75341efb38
commit 4d7aa320cb
33 changed files with 236 additions and 156 deletions
+14 -8
View File
@@ -7,18 +7,19 @@ 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>"
log_adminwarn(msg)
admins << msg
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
/*
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
log_adminwarn(rendered)
for(var/client/C in admins)
if (C.holder.level >= 1)
if(!C.STFU_atklog)
if(R_ADMIN & C.holder.rights)
if(C.prefs.toggles & CHAT_ATTACKLOGS)
var/msg = rendered
C << msg
*/
///////////////////////////////////////////////////////////////////////////////////////////////Panels
@@ -756,10 +757,15 @@ var/global/floorIsLava = 0
/datum/admins/proc/delay()
set category = "Server"
set desc="Delay the game start"
set desc="Delay the game start/end"
set name="Delay"
if(!check_rights(R_ADMIN)) return
if (!ticker || ticker.current_state != GAME_STATE_PREGAME)
return alert("Too late... The game has already started!", null, null, null, null, null)
ticker.delay_end = !ticker.delay_end
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("\blue [key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
return //alert("Round end delayed", null, null, null, null, null)
going = !( going )
if (!( going ))
world << "<b>The game start has been delayed.</b>"
@@ -1084,4 +1090,4 @@ proc/move_alien_ship()
alien_ship_location = 0
else
alien_ship_location = 1
return
return
+28 -52
View File
@@ -7,6 +7,7 @@ var/list/admin_verbs_default = list(
/client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
/client/proc/check_antagonists, /*shows all antags*/
/client/proc/deadchat /*toggles deadchat on/off*/
)
var/list/admin_verbs_admin = list(
/client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/
@@ -46,7 +47,6 @@ var/list/admin_verbs_admin = list(
/client/proc/check_words, /*displays cult-words*/
/client/proc/check_ai_laws, /*shows AI and borg laws*/
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
/client/proc/deadchat, /*toggles deadchat on/off*/
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
/client/proc/toggleprayers, /*toggles prayers on/off*/
// /client/proc/toggle_hear_deadcast, /*toggles whether we hear deadchat*/
@@ -62,13 +62,15 @@ var/list/admin_verbs_admin = list(
/datum/admins/proc/show_player_info,
/client/proc/free_slot, /*frees slot for chosen job*/
/client/proc/cmd_admin_change_custom_event,
/client/proc/cmd_admin_rejuvenate
/client/proc/cmd_admin_rejuvenate,
/client/proc/toggleattacklogs,
/datum/admins/proc/show_skills
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
/client/proc/jobbans,
/client/proc/unjobban_panel,
/client/proc/DB_ban_panel
// /client/proc/DB_ban_panel
)
var/list/admin_verbs_sounds = list(
/client/proc/play_local_sound,
@@ -88,7 +90,8 @@ var/list/admin_verbs_fun = list(
/client/proc/cmd_admin_add_random_ai_law,
/client/proc/make_sound,
/client/proc/toggle_random_events,
/client/proc/set_ooc
/client/proc/set_ooc,
/client/proc/editappear
)
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
@@ -222,6 +225,7 @@ var/list/admin_verbs_mod = list(
/client/proc/cmd_mod_say,
/datum/admins/proc/show_player_info,
/client/proc/player_panel_new,
/datum/admins/proc/show_skills
)
/client/proc/add_admin_verbs()
if(holder)
@@ -632,12 +636,9 @@ var/list/admin_verbs_mod = list(
set name = "Edit Appearance"
set category = "Fun"
usr << "\red This proc has been temporarily disabled."
return
if(!check_rights(R_FUN)) return
//some random errors here, cbb fixing them right now
//todo
/*if(!istype(M, /mob/living/carbon/human))
if(!istype(M, /mob/living/carbon/human))
usr << "\red You can only do this to humans!"
return
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Soghun and Tajaran can result in unintended consequences.",,"Yes","No"))
@@ -668,49 +669,14 @@ var/list/admin_verbs_mod = list(
M.s_tone = -M.s_tone + 35
// hair
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
var/list/hairs = list()
// loop through potential hairs
for(var/x in all_hairs)
var/datum/sprite_accessory/hair/H = new x // create new hair datum based on type x
hairs.Add(H.name) // add hair name to hairs
del(H) // delete the hair after it's all done
var/new_style = input("Please select hair style", "Character Generation") as null|anything in hairs
// if new style selected (not cancel)
if (new_style)
M.h_style = new_style
for(var/x in all_hairs) // loop through all_hairs again. Might be slightly CPU expensive, but not significantly.
var/datum/sprite_accessory/hair/H = new x // create new hair datum
if(H.name == new_style)
M.hair_style = H // assign the hair_style variable a new hair datum
break
else
del(H) // if hair H not used, delete. BYOND can garbage collect, but better safe than sorry
var/new_hstyle = input(usr, "Select a hair style", "Grooming") as null|anything in hair_styles_list
if(new_hstyle)
M.h_style = new_hstyle
// facial hair
var/list/all_fhairs = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
var/list/fhairs = list()
for(var/x in all_fhairs)
var/datum/sprite_accessory/facial_hair/H = new x
fhairs.Add(H.name)
del(H)
new_style = input("Please select facial style", "Character Generation") as null|anything in fhairs
if(new_style)
M.f_style = new_style
for(var/x in all_fhairs)
var/datum/sprite_accessory/facial_hair/H = new x
if(H.name == new_style)
M.facial_hair_style = H
break
else
del(H)
var/new_fstyle = input(usr, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
if(new_fstyle)
M.f_style = new_fstyle
var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female")
if (new_gender)
@@ -718,10 +684,10 @@ var/list/admin_verbs_mod = list(
M.gender = MALE
else
M.gender = FEMALE
M.rebuild_appearance()
M.update_hair()
M.update_body()
M.check_dna(M)
*/
/client/proc/playernotes()
set name = "Show Player Info"
set category = "Admin"
@@ -744,3 +710,13 @@ var/list/admin_verbs_mod = list(
if (job)
job_master.FreeRole(job)
return
/client/proc/toggleattacklogs()
set name = "Toggle Attack Log Messages"
set category = "Preferences"
prefs.toggles ^= CHAT_ATTACKLOGS
if (prefs.toggles & CHAT_ATTACKLOGS)
usr << "You now will get attack log messages"
else
usr << "You now won't get attack log messages"
+2 -2
View File
@@ -83,7 +83,7 @@
body += "<a href='?src=\ref[src];subtlemessage="+ref+"'>SM</a> - "
body += "<a href='?src=\ref[src];adminplayerobservejump="+ref+"'>JMP</a><br>"
if(antagonist > 0)
body += "<font size='2'><a href='?src=\ref[src];secretsadmin=check_antagonist'><font color='red'><b>Antagonist</b></font></a></font>";
body += "<font size='2'><a href='?src=\ref[src];check_antagonist=1'><font color='red'><b>Antagonist</b></font></a></font>";
body += "</td></tr></table>";
@@ -194,7 +194,7 @@
<tr id='title_tr'>
<td align='center'>
<font size='5'><b>Player panel</b></font><br>
Hover over a line to see more information - <a href='?src=\ref[src];secretsadmin=check_antagonist'>Check antagonists</a>
Hover over a line to see more information - <a href='?src=\ref[src];check_antagonist=1'>Check antagonists</a>
<p>
</td>
</tr>
+6 -3
View File
@@ -1254,7 +1254,7 @@
show_player_panel(M)
else if(href_list["adminplayerobservejump"])
if(!check_rights(R_ADMIN|R_MOD)) return
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["adminplayerobservejump"])
@@ -1263,6 +1263,9 @@
sleep(2)
C.jumptomob(M)
else if(href_list["check_antagonist"])
check_antagonists()
else if(href_list["adminplayerobservecoodjump"])
if(!check_rights(R_ADMIN)) return
@@ -2197,8 +2200,6 @@
if(!job) continue
dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions] <BR>"
usr << browse(dat, "window=jobdebug;size=600x500")
if("check_antagonist")
check_antagonists()
if("showailaws")
output_ai_laws()
if("showgm")
@@ -2215,6 +2216,8 @@
dat += text("<tr><td>[]</td><td>[]</td></tr>", H.name, H.get_assignment())
dat += "</table>"
usr << browse(dat, "window=manifest;size=440x410")
if("check_antagonist")
check_antagonists()
if("DNA")
var/dat = "<B>Showing DNA from blood.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
+7 -6
View File
@@ -87,16 +87,17 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(!mob) return //this doesn't happen
var/ref_mob = "\ref[mob]"
msg = "\blue <b><font color=red>HELP: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
msg = "\blue <b><font color=red>HELP: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
//send this msg to all admins
var/admin_number_afk = 0
for(var/client/X in admins)
if(X.is_afk())
admin_number_afk++
if(X.prefs.toggles & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
X << msg
if((R_ADMIN|R_MOD) & X.holder.rights)
if(X.is_afk())
admin_number_afk++
if(X.prefs.toggles & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
X << msg
//show it to the person adminhelping too
src << "<font color='blue'>PM to-<b>Admins</b>: [original_msg]</font>"
+11 -23
View File
@@ -11,10 +11,9 @@
if(check_rights(R_ADMIN,0))
msg = "<span class='admin'><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>"
admins << msg
else
msg = "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]:</EM> <span class='message'>[msg]</span></span>"
admins << msg
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -23,28 +22,17 @@
set name = "Msay"
set hidden = 1
if (!src.holder)
src << "Only administrators may use this command."
return
//todo: what? why does this not compile
/*if (src.muted || src.muted_complete)
src << "You are muted."
return*/
if(!check_rights(R_ADMIN|R_MOD)) return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
log_admin("MOD: [key_name(src)] : [msg]")
if (!msg)
return
//feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/mob/M in world)
if (M.client && M.client.holder)
if (src.holder.rank == "Admin Observer")
M << "<span class='adminobserver'><span class='prefix'>MOD:</span> <EM>[key_name(usr, M,1)]:</EM> <span class='message'>[msg]</span></span>"
else if (src.holder.rank == "Moderator")
M << "<span class='mod'><span class='prefix'>MOD:</span> <EM>[key_name(usr, M,1)]</EM> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
else
M << "<span class='adminmod'><span class='prefix'>MOD:</span> <EM>[key_name(usr, M,1)]</EM> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
var/color = "mod"
if (check_rights(R_ADMIN,0))
color = "adminmod"
msg = "<span class='[color]'><span class='prefix'>MOD:</span> <EM>[key_name(src)]</EM> (<A HREF='?src=\ref[holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
for(var/client/C in admins)
if((R_ADMIN|R_MOD) & C.holder.rights)
C << msg
+1 -1
View File
@@ -474,7 +474,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(alert("Should this be announced to the general population?",,"Yes","No"))
if("Yes")
command_alert(input, maintitle=customname);
command_alert(input, customname);
if("No")
world << "\red New NanoTrasen Update available at all communication consoles."