mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
SANITY: Created a series of generalised sanity procs. They can be found in code/__HELPERS/sanitize_values.dm
They include such procs as sanitize_integer(num, min, max, default) which will check num is a number, round num to make it an integer, then check if it is between min and max (inclusive). If it fails the bound-checks it will return default. There are others, have a look.
PERSISTENT PREFERENCES: Every ckey which connects to the game gets its own persistent /datum/preferences datum.
It is archived in var/list/preferences_datums = list("ckey" = datum)
At connect it is automatically associated with the client defines.dm (or a new one is created if it can't find an archived prefs datum). This means clients will ALWAYS have a var/datum/preferences/prefs which references this datum. So you can use it without checking if(client.prefs)
This has simplified only a few bits of code. It will however, allow us to make preferences like see_deadchat ghost_ears etc, persistent. So they will not reset when you DC.
SAVEFILES: Changed the player savefile code a lot. Hopefully I've not fucked it up too much. Every single variable loaded from saves is now sanity checked using the new sanity procs. This should help prevent savefiles becomming obsolete by sanitizing input to meet current requirements, without deleting all the ok variables and making you start from scratch >_> NOTE: I still need to sort out the savefile version stuff. I'll probably figure it out before the server updates anyway. It sees to be fine without it.
You can no longer choose your blood type. It is randomised (with each bloodtype having a realistic probability of occuring). This is to make blood analysis (detective/medical) less pointless. It is chosen as soon as you connect. It remains persistent throughout each round so you won't be able to change it by logging in/out over and over.
Replaces some copypasta code with is_afk() (still a fair bit to do)
There are new hyperlink shortcut things. _src_=vars will direct your hyperlink to viewvars. _src_=prefs to your preferences datum. (These are the only way to access those bits of code via links). This means that the overall amount of operations in almost every Topic has pretty much halved and is much prettier.
Replaced and removed adminplayervars from datum/admins/Topic. It was superfluous. They now all point directly to the viewvars code using _src_=vars
Removed the changelog popup at round start. Instead a button on your game-window will glow white if there are new updates. To peruse at your convenience. This will speed up connect times.
Removed the AFK_THRESHOLD define. It is integrated into is_afk() now.
TODO: remove the prefs stuff from mobs and clients and update code to use client.prefs to access that info.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5121 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
50
code/__HELPERS/sanitize_values.dm
Normal file
50
code/__HELPERS/sanitize_values.dm
Normal file
@@ -0,0 +1,50 @@
|
||||
//general stuff
|
||||
/proc/sanitize_integer(number, min=0, max=1, default=0)
|
||||
if(isnum(number))
|
||||
number = round(number)
|
||||
if(min <= number && number <= max)
|
||||
return number
|
||||
return default
|
||||
|
||||
/proc/sanitize_text(text, default="")
|
||||
if(istext(text))
|
||||
return text
|
||||
return default
|
||||
|
||||
/proc/sanitize_inlist(value, list/List, default)
|
||||
if(value in List) return value
|
||||
if(default) return default
|
||||
if(List && List.len)return List[1]
|
||||
|
||||
|
||||
|
||||
//more specialised stuff
|
||||
/proc/sanitize_gender(gender,neuter=0,plural=0, default="male")
|
||||
switch(gender)
|
||||
if(MALE, FEMALE)return gender
|
||||
if(NEUTER)
|
||||
if(neuter) return gender
|
||||
else return default
|
||||
if(PLURAL)
|
||||
if(plural) return gender
|
||||
else return default
|
||||
return default
|
||||
|
||||
/proc/sanitize_hexcolor(color, default="#000000")
|
||||
if(!istext(color)) return default
|
||||
var/len = length(color)
|
||||
if(len != 7 && len !=4) return default
|
||||
if(text2ascii(color,1) != 35) return default //35 is the ascii code for "#"
|
||||
. = "#"
|
||||
for(var/i=2,i<=len,i++)
|
||||
var/ascii = text2ascii(color,i)
|
||||
switch(ascii)
|
||||
if(48 to 57) . += ascii2text(ascii) //numbers 0 to 9
|
||||
if(97 to 102) . += ascii2text(ascii) //letters a to f
|
||||
if(65 to 70) . += ascii2text(ascii+32) //letters A to F - translates to lowercase
|
||||
else return default
|
||||
return .
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -173,27 +173,27 @@ client
|
||||
if(istype(D,/atom))
|
||||
var/atom/A = D
|
||||
if(isliving(A))
|
||||
body += "<a href='byond://?src=\ref[src];rename=\ref[D]'><b>[D]</b></a>"
|
||||
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
var/mob/living/M = A
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += {"
|
||||
<br><font size='1'>
|
||||
BRUTE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
</font>
|
||||
|
||||
|
||||
"}
|
||||
else
|
||||
body += "<a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
|
||||
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
else
|
||||
body += "<b>[D]</b>"
|
||||
|
||||
@@ -219,10 +219,10 @@ client
|
||||
|
||||
body += "</div></td>"
|
||||
|
||||
body += "<td width='50%'><div align='center'><a href='byond://?src=\ref[src];datumrefresh=\ref[D]'>Refresh</a>"
|
||||
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
|
||||
|
||||
//if(ismob(D))
|
||||
// body += "<br><a href='byond://?src=\ref[src];mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
|
||||
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
|
||||
|
||||
body += {" <form>
|
||||
<select name="file" size="1"
|
||||
@@ -237,37 +237,37 @@ client
|
||||
"}
|
||||
|
||||
|
||||
body += "<option value='byond://?src=\ref[src];mark_object=\ref[D]'>Mark Object</option>"
|
||||
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
|
||||
if(ismob(D))
|
||||
body += "<option value='byond://?src=\ref[src];mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
|
||||
body += "<option value>---</option>"
|
||||
|
||||
if(ismob(D))
|
||||
body += "<option value='byond://?src=\ref[src];give_spell=\ref[D]'>Give Spell</option>"
|
||||
body += "<option value='byond://?src=\ref[src];give_disease=\ref[D]'>Give Disease</option>"
|
||||
body += "<option value='byond://?src=\ref[src];ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='byond://?src=\ref[src];godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='byond://?src=\ref[src];make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
body += "<option value='byond://?src=\ref[src];drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
body += "<option value='byond://?src=\ref[src];regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
|
||||
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give Disease</option>"
|
||||
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
if(ishuman(D))
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='byond://?src=\ref[src];setmutantrace=\ref[D]'>Set Mutantrace</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makemonkey=\ref[D]'>Make monkey</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makealien=\ref[D]'>Make alien</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makemetroid=\ref[D]'>Make metroid</option>"
|
||||
body += "<option value='?_src_=vars;setmutantrace=\ref[D]'>Set Mutantrace</option>"
|
||||
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
|
||||
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
|
||||
body += "<option value='?_src_=vars;makemetroid=\ref[D]'>Make metroid</option>"
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='byond://?src=\ref[src];gib=\ref[D]'>Gib</option>"
|
||||
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
|
||||
if(isobj(D))
|
||||
body += "<option value='byond://?src=\ref[src];delall=\ref[D]'>Delete all of type</option>"
|
||||
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
|
||||
if(isobj(D) || ismob(D) || isturf(D))
|
||||
body += "<option value='byond://?src=\ref[src];explode=\ref[D]'>Trigger explosion</option>"
|
||||
body += "<option value='byond://?src=\ref[src];emp=\ref[D]'>Trigger EM pulse</option>"
|
||||
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
|
||||
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
|
||||
|
||||
body += "</select></form>"
|
||||
|
||||
@@ -327,7 +327,7 @@ client
|
||||
var/html = ""
|
||||
|
||||
if(DA)
|
||||
html += "<li style='backgroundColor:white'>(<a href='byond://?src=\ref[src];datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='byond://?src=\ref[src];datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='byond://?src=\ref[src];datummass=\ref[DA];varnamemass=[name]'>M</a>) "
|
||||
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
|
||||
else
|
||||
html += "<li>"
|
||||
|
||||
@@ -364,11 +364,11 @@ client
|
||||
|
||||
else if (istype(value, /datum))
|
||||
var/datum/D = value
|
||||
html += "<a href='byond://?src=\ref[src];Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
|
||||
else if (istype(value, /client))
|
||||
var/client/C = value
|
||||
html += "<a href='byond://?src=\ref[src];Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
//
|
||||
else if (istype(value, /list))
|
||||
var/list/L = value
|
||||
@@ -398,393 +398,390 @@ client
|
||||
|
||||
return html
|
||||
|
||||
/client/proc/view_var_Topic(href,href_list,hsrc)
|
||||
/client/proc/view_var_Topic(href, href_list, hsrc)
|
||||
//This should all be moved over to datum/admins/Topic() or something ~Carn
|
||||
if( (usr.client == src) && src.holder )
|
||||
. = 1 //default return
|
||||
if(href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if(href_list["rename"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
return
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
|
||||
else if(href_list["mob_player_panel"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_ninjafy(M)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_admin_drop_everything(M)
|
||||
|
||||
else if(href_list["direct_control"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
H.makeSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
return
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
|
||||
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
var/O_type = O.type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
|
||||
else if(href_list["explode"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
|
||||
else if(href_list["mark_object"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
if("right") A.dir = turn(A.dir, -45)
|
||||
if("left") A.dir = turn(A.dir, 45)
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
|
||||
else if(href_list["makemetroid"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setmutantrace"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant")
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = new_mutantrace
|
||||
H.update_mutantrace()
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
M.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
else
|
||||
. = 0
|
||||
|
||||
if(href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!istype(DAT, /datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
. = 1
|
||||
|
||||
if( (usr.client != src) || !src.holder )
|
||||
return
|
||||
if(href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if(href_list["rename"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
return
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
|
||||
else if(href_list["mob_player_panel"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_ninjafy(M)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_admin_drop_everything(M)
|
||||
|
||||
else if(href_list["direct_control"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
H.makeSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
return
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
|
||||
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
var/O_type = O.type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
|
||||
else if(href_list["explode"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
|
||||
else if(href_list["mark_object"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
if("right") A.dir = turn(A.dir, -45)
|
||||
if("left") A.dir = turn(A.dir, 45)
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
|
||||
else if(href_list["makemetroid"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setmutantrace"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant")
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = new_mutantrace
|
||||
H.update_mutantrace()
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
M.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
|
||||
if(href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!istype(DAT, /datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client && !G.client.holder && ((G.client.inactivity/10)/60) <= 5)
|
||||
if(G.client && !G.client.holder && !G.client.is_afk())
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
if(!candidates.len) return
|
||||
|
||||
@@ -262,7 +262,7 @@ Whitespace:Seperator;
|
||||
|
||||
for(var/mob/new_player/player in players)
|
||||
if(player.client && player.ready)
|
||||
if(player.preferences.be_special & role)
|
||||
if(player.client.prefs.be_special & role)
|
||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
|
||||
|
||||
@@ -274,8 +274,8 @@ Whitespace:Seperator;
|
||||
|
||||
if(candidates.len < recommended_enemies)
|
||||
for(var/mob/new_player/player in players)
|
||||
if (player.client && player.ready)
|
||||
if(!(player.preferences.be_special & role)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
|
||||
if(player.client && player.ready)
|
||||
if(!(player.client.prefs.be_special & role)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
|
||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
drafted += player.mind
|
||||
|
||||
@@ -325,12 +325,12 @@ Whitespace:Seperator;
|
||||
// recommended_enemies if the number of people with that role set to yes is less than recomended_enemies,
|
||||
// Less if there are not enough valid players in the game entirely to make recommended_enemies.
|
||||
|
||||
|
||||
/*
|
||||
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)
|
||||
if(player.preferences.be_special & role)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
*/
|
||||
|
||||
/datum/game_mode/proc/num_players()
|
||||
. = 0
|
||||
|
||||
@@ -71,10 +71,10 @@ var/global/datum/controller/occupations/job_master
|
||||
if(jobban_isbanned(player, job.title))
|
||||
Debug("FOC isbanned failed, Player: [player]")
|
||||
continue
|
||||
if(flag && (!player.preferences.be_special & flag))
|
||||
if(flag && (!player.client.prefs.be_special & flag))
|
||||
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
|
||||
continue
|
||||
if(player.preferences.GetJobDepartment(job, level) & job.flag)
|
||||
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
|
||||
Debug("FOC pass, Player: [player], Level:[level]")
|
||||
candidates += player
|
||||
return candidates
|
||||
@@ -184,7 +184,7 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
//Get the players who are ready
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role))
|
||||
if(player.ready && player.mind && !player.mind.assigned_role)
|
||||
unassigned += player
|
||||
|
||||
Debug("DO, Len: [unassigned.len]")
|
||||
@@ -243,7 +243,7 @@ var/global/datum/controller/occupations/job_master
|
||||
continue
|
||||
|
||||
// If the player wants that job on this level, then try give it to him.
|
||||
if(player.preferences.GetJobDepartment(job, level) & job.flag)
|
||||
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
|
||||
|
||||
// If the job isn't filled
|
||||
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
|
||||
@@ -255,7 +255,7 @@ var/global/datum/controller/occupations/job_master
|
||||
// Hand out random jobs to the people who didn't get any in the last check
|
||||
// Also makes sure that they got their preference correct
|
||||
for(var/mob/new_player/player in unassigned)
|
||||
if(player.preferences.userandomjob)
|
||||
if(player.client.prefs.userandomjob)
|
||||
GiveRandomJob(player)
|
||||
|
||||
/*
|
||||
@@ -424,16 +424,16 @@ var/global/datum/controller/occupations/job_master
|
||||
var/level4 = 0 //never
|
||||
var/level5 = 0 //banned
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if(!((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role)))
|
||||
if(!(player.ready && player.mind && !player.mind.assigned_role))
|
||||
continue //This player is not ready
|
||||
if(jobban_isbanned(player, job.title))
|
||||
level5++
|
||||
continue
|
||||
if(player.preferences.GetJobDepartment(job, 1) & job.flag)
|
||||
if(player.client.prefs.GetJobDepartment(job, 1) & job.flag)
|
||||
level1++
|
||||
else if(player.preferences.GetJobDepartment(job, 2) & job.flag)
|
||||
else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag)
|
||||
level2++
|
||||
else if(player.preferences.GetJobDepartment(job, 3) & job.flag)
|
||||
else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag)
|
||||
level3++
|
||||
else level4++ //not selected
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
else
|
||||
msg += " - Playing"
|
||||
|
||||
if(C.inactivity > AFK_THRESHOLD)
|
||||
if(C.is_afk())
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
else
|
||||
|
||||
@@ -51,6 +51,7 @@ var/diaryofmeanpeople = null
|
||||
var/href_logfile = null
|
||||
var/station_name = null
|
||||
var/game_version = "/tg/ Station 13"
|
||||
var/changelog_hash = ""
|
||||
|
||||
var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
|
||||
var/going = 1.0
|
||||
|
||||
@@ -38,7 +38,7 @@ var/global/floorIsLava = 0
|
||||
body += " \[<A href='?src=\ref[src];revive=\ref[M]'>Heal</A>\] "
|
||||
|
||||
body += "<br><br>\[ "
|
||||
body += "<a href='?src=\ref[src];adminplayervars=\ref[M]'>VV</a> - "
|
||||
body += "<a href='?_src_=vars;Vars=\ref[M]'>VV</a> - "
|
||||
body += "<a href='?src=\ref[src];traitor=\ref[M]'>TP</a> - "
|
||||
body += "<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> - "
|
||||
body += "<a href='?src=\ref[src];subtlemessage=\ref[M]'>SM</a> - "
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
body += "<a href='?src=\ref[src];adminplayeropts="+ref+"'>PP</a> - "
|
||||
body += "<a href='?src=\ref[src];notes=show;mob="+ref+"'>N</a> - "
|
||||
body += "<a href='?src=\ref[src];adminplayervars="+ref+"'>VV</a> - "
|
||||
body += "<a href='?_src_=vars;Vars="+ref+"'>VV</a> - "
|
||||
body += "<a href='?src=\ref[src];traitor="+ref+"'>TP</a> - "
|
||||
body += "<a href='?src=\ref[usr];priv_msg=\ref"+ref+"'>PM</a> - "
|
||||
body += "<a href='?src=\ref[src];subtlemessage="+ref+"'>SM</a> - "
|
||||
|
||||
@@ -1206,10 +1206,6 @@
|
||||
var/mob/M = locate(href_list["adminplayeropts"])
|
||||
show_player_panel(M)
|
||||
|
||||
else if(href_list["adminplayervars"])
|
||||
var/mob/M = locate(href_list["adminplayervars"])
|
||||
usr.client.debug_variables(M)
|
||||
|
||||
else if(href_list["adminplayerobservejump"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
@@ -1283,7 +1279,7 @@
|
||||
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;"
|
||||
src.owner << "Location = [location_description];"
|
||||
src.owner << "[special_role_description]"
|
||||
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?src=\ref[src];adminplayervars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservejump=\ref[M]'>JMP</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
|
||||
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservejump=\ref[M]'>JMP</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
|
||||
|
||||
else if(href_list["adminspawncookie"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
@@ -81,7 +81,7 @@ 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_=holder;adminplayervars=[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;secretsadmin=check_antagonist'>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
|
||||
|
||||
@@ -63,17 +63,13 @@ client/proc/one_click_antag()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
var/datum/preferences/preferences = new
|
||||
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(applicant.client)
|
||||
if(preferences.savefile_load(applicant, 0))
|
||||
if(preferences.be_special & BE_TRAITOR)
|
||||
candidates += applicant
|
||||
if(applicant.client.prefs.be_special & BE_TRAITOR)
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numTratiors = min(candidates.len, 3)
|
||||
@@ -99,18 +95,13 @@ client/proc/one_click_antag()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
|
||||
var/datum/preferences/preferences = new
|
||||
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(applicant.client)
|
||||
if(preferences.savefile_load(applicant, 0))
|
||||
if(preferences.be_special & BE_CHANGELING)
|
||||
candidates += applicant
|
||||
if(applicant.client.prefs.be_special & BE_CHANGELING)
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numChanglings = min(candidates.len, 3)
|
||||
@@ -134,18 +125,13 @@ client/proc/one_click_antag()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
|
||||
var/datum/preferences/preferences = new
|
||||
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(applicant.client)
|
||||
if(preferences.savefile_load(applicant, 0))
|
||||
if(preferences.be_special & BE_REV)
|
||||
candidates += applicant
|
||||
if(applicant.client.prefs.be_special & BE_REV)
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numRevs = min(candidates.len, 3)
|
||||
@@ -204,18 +190,13 @@ client/proc/one_click_antag()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
|
||||
var/datum/preferences/preferences = new
|
||||
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
if(applicant.client)
|
||||
if(preferences.savefile_load(applicant, 0))
|
||||
if(preferences.be_special & BE_CULTIST)
|
||||
candidates += applicant
|
||||
if(applicant.client.prefs.be_special & BE_CULTIST)
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numCultists = min(candidates.len, 4)
|
||||
|
||||
@@ -13,22 +13,22 @@
|
||||
return
|
||||
|
||||
var/image/cross = image('icons/obj/storage.dmi',"bible")
|
||||
msg = "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=holder;adminplayervars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
|
||||
msg = "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(C.seeprayers)
|
||||
C << msg
|
||||
usr << "Your prayers have been received by the gods."
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=holder;adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
admins << msg
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=holder;adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
admins << msg
|
||||
|
||||
@@ -48,7 +48,7 @@ var/global/sent_strike_team = 0
|
||||
var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world.
|
||||
var/list/commandos = list() //actual commando ghosts as picked by the user.
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list.
|
||||
if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list.
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected.
|
||||
|
||||
@@ -54,7 +54,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world.
|
||||
var/list/commandos = list() //actual commando ghosts as picked by the user.
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list.
|
||||
if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list.
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
for(var/i=commandos_possible,(i>0&&candidates.len),i--)//Decrease with every commando selected.
|
||||
|
||||
@@ -15,17 +15,16 @@
|
||||
/////////
|
||||
//OTHER//
|
||||
/////////
|
||||
var/datum/preferences/prefs = null
|
||||
var/listen_ooc = 1
|
||||
var/move_delay = 1
|
||||
var/moving = null
|
||||
var/adminobs = null
|
||||
var/deadchat = 1
|
||||
var/changes = 0
|
||||
var/area = null
|
||||
var/played = 0
|
||||
var/be_alien = 0 //Check if that guy wants to be an alien
|
||||
var/be_pai = 1 //Consider client when searching for players to recruit as a pAI
|
||||
var/activeslot = 1 //Default active slot!
|
||||
var/STFU_ghosts //80+ people rounds are fun to admin when text flies faster than airport security
|
||||
var/STFU_radio //80+ people rounds are fun to admin when text flies faster than airport security
|
||||
|
||||
|
||||
@@ -50,11 +50,10 @@
|
||||
href_logfile << "<small>[time2text(world.timeofday,"hh:mm")] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
|
||||
|
||||
switch(href_list["_src_"])
|
||||
if("holder") hsrc = usr.client.holder
|
||||
if("usr") hsrc = usr
|
||||
|
||||
if(view_var_Topic(href,href_list,hsrc)) //Until viewvars can be rewritten as datum/admins/Topic()
|
||||
return
|
||||
if("holder") hsrc = holder
|
||||
if("usr") hsrc = mob
|
||||
if("prefs") return prefs.process_link(usr,href_list)
|
||||
if("vars") return view_var_Topic(href,href_list,hsrc)
|
||||
|
||||
..() //redirect to hsrc.Topic()
|
||||
|
||||
@@ -108,6 +107,12 @@
|
||||
admins += src
|
||||
holder.owner = src
|
||||
|
||||
//preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = preferences_datums[ckey]
|
||||
if(!prefs)
|
||||
prefs = new /datum/preferences(src)
|
||||
preferences_datums[ckey] = prefs
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
|
||||
if( (world.address == address || !address) && !host )
|
||||
@@ -120,7 +125,10 @@
|
||||
|
||||
log_client_to_db()
|
||||
|
||||
getFiles('html/search.js','html/panels.css')
|
||||
send_resources()
|
||||
|
||||
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates.
|
||||
winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold")
|
||||
|
||||
|
||||
//////////////
|
||||
@@ -185,6 +193,51 @@
|
||||
|
||||
//checks if a client is afk
|
||||
//3000 frames = 5 minutes
|
||||
/client/proc/is_afk(duration=AFK_THRESHOLD)
|
||||
/client/proc/is_afk(duration=3000)
|
||||
if(inactivity > duration) return inactivity
|
||||
return 0
|
||||
return 0
|
||||
|
||||
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
|
||||
/client/proc/send_resources()
|
||||
getFiles(
|
||||
'html/search.js',
|
||||
'html/panels.css',
|
||||
'icons/pda_icons/pda_atmos.png',
|
||||
'icons/pda_icons/pda_back.png',
|
||||
'icons/pda_icons/pda_bell.png',
|
||||
'icons/pda_icons/pda_blank.png',
|
||||
'icons/pda_icons/pda_boom.png',
|
||||
'icons/pda_icons/pda_bucket.png',
|
||||
'icons/pda_icons/pda_crate.png',
|
||||
'icons/pda_icons/pda_cuffs.png',
|
||||
'icons/pda_icons/pda_eject.png',
|
||||
'icons/pda_icons/pda_exit.png',
|
||||
'icons/pda_icons/pda_flashlight.png',
|
||||
'icons/pda_icons/pda_honk.png',
|
||||
'icons/pda_icons/pda_mail.png',
|
||||
'icons/pda_icons/pda_medical.png',
|
||||
'icons/pda_icons/pda_menu.png',
|
||||
'icons/pda_icons/pda_mule.png',
|
||||
'icons/pda_icons/pda_notes.png',
|
||||
'icons/pda_icons/pda_power.png',
|
||||
'icons/pda_icons/pda_rdoor.png',
|
||||
'icons/pda_icons/pda_reagent.png',
|
||||
'icons/pda_icons/pda_refresh.png',
|
||||
'icons/pda_icons/pda_scanner.png',
|
||||
'icons/pda_icons/pda_signaler.png',
|
||||
'icons/pda_icons/pda_status.png',
|
||||
'icons/spideros_icons/sos_1.png',
|
||||
'icons/spideros_icons/sos_2.png',
|
||||
'icons/spideros_icons/sos_3.png',
|
||||
'icons/spideros_icons/sos_4.png',
|
||||
'icons/spideros_icons/sos_5.png',
|
||||
'icons/spideros_icons/sos_6.png',
|
||||
'icons/spideros_icons/sos_7.png',
|
||||
'icons/spideros_icons/sos_8.png',
|
||||
'icons/spideros_icons/sos_9.png',
|
||||
'icons/spideros_icons/sos_10.png',
|
||||
'icons/spideros_icons/sos_11.png',
|
||||
'icons/spideros_icons/sos_12.png',
|
||||
'icons/spideros_icons/sos_13.png',
|
||||
'icons/spideros_icons/sos_14.png'
|
||||
)
|
||||
@@ -45,7 +45,7 @@
|
||||
if(prev_gender != gender)
|
||||
prev_gender = gender
|
||||
if(gender in list(PLURAL, NEUTER))
|
||||
message_admins("[src] ([ckey]) gender has been changed to plural or neuter. Please record what has happened recently to the person and then notify coders. (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayervars=\ref[src]'>VV</A>) (<A HREF='?priv_msg=\ref[src]'>PM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>)")
|
||||
message_admins("[src] ([ckey]) gender has been changed to plural or neuter. Please record what has happened recently to the person and then notify coders. (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?priv_msg=\ref[src]'>PM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>)")
|
||||
*/
|
||||
//Apparently, the person who wrote this code designed it so that
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
/mob/living/Life()
|
||||
|
||||
..()
|
||||
|
||||
// While I'm doing a terriblly lazy way of initalizing things, why don't I make it so people's preferences tag along with them. This could be useful in fixing the fucking cloned-as-unknown thing, making me not have to dynamically load them during tensioner, and of course, storing metadata.
|
||||
|
||||
if(!src.storedpreferences)
|
||||
src.storedpreferences = new
|
||||
storedpreferences.savefile_load(src, 0)
|
||||
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/verb/succumb()
|
||||
set hidden = 1
|
||||
@@ -289,11 +274,8 @@
|
||||
return
|
||||
|
||||
/mob/living/proc/UpdateDamageIcon()
|
||||
return
|
||||
return
|
||||
|
||||
/*CARN: Deprecated. Please use update_canmove()
|
||||
/mob/living/proc/check_if_buckled()
|
||||
*/
|
||||
|
||||
/mob/living/proc/Examine_OOC()
|
||||
set name = "Examine Meta-Info (OOC)"
|
||||
@@ -301,14 +283,10 @@
|
||||
set src in view()
|
||||
|
||||
if(config.allow_Metadata)
|
||||
usr << "[src]'s Metainfo:"
|
||||
|
||||
if(src.storedpreferences)
|
||||
usr << "[src]'s OOC Notes: [src.storedpreferences.metadata]"
|
||||
|
||||
if(client)
|
||||
usr << "[src]'s Metainfo:<br>[client.prefs.metadata]"
|
||||
else
|
||||
usr << "[src] does not have any stored infomation!"
|
||||
|
||||
else
|
||||
usr << "OOC Metadata is not supported by this server!"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
return "data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/pai.sav"
|
||||
|
||||
/datum/paiCandidate/proc/savefile_save(mob/user)
|
||||
if (IsGuestKey(user.key))
|
||||
if(IsGuestKey(user.key))
|
||||
return 0
|
||||
|
||||
var/savefile/F = new /savefile(src.savefile_path(user))
|
||||
|
||||
@@ -372,31 +372,35 @@ var/list/slot_equipment_priority = list( \
|
||||
// M.Login() //wat
|
||||
return
|
||||
|
||||
/mob/verb/changes()
|
||||
/client/verb/changes()
|
||||
set name = "Changelog"
|
||||
set category = "OOC"
|
||||
if (client)
|
||||
client.getFiles('html/postcardsmall.jpg',
|
||||
'html/somerights20.png',
|
||||
'html/88x31.png',
|
||||
'html/bug-minus.png',
|
||||
'html/cross-circle.png',
|
||||
'html/hard-hat-exclamation.png',
|
||||
'html/image-minus.png',
|
||||
'html/image-plus.png',
|
||||
'html/music-minus.png',
|
||||
'html/music-plus.png',
|
||||
'html/tick-circle.png',
|
||||
'html/wrench-screwdriver.png',
|
||||
'html/spell-check.png',
|
||||
'html/burn-exclamation.png',
|
||||
'html/chevron.png',
|
||||
'html/chevron-expand.png',
|
||||
'html/changelog.css',
|
||||
'html/changelog.js'
|
||||
)
|
||||
src << browse('html/changelog.html', "window=changes;size=675x650")
|
||||
client.changes = 1
|
||||
getFiles(
|
||||
'html/postcardsmall.jpg',
|
||||
'html/somerights20.png',
|
||||
'html/88x31.png',
|
||||
'html/bug-minus.png',
|
||||
'html/cross-circle.png',
|
||||
'html/hard-hat-exclamation.png',
|
||||
'html/image-minus.png',
|
||||
'html/image-plus.png',
|
||||
'html/music-minus.png',
|
||||
'html/music-plus.png',
|
||||
'html/tick-circle.png',
|
||||
'html/wrench-screwdriver.png',
|
||||
'html/spell-check.png',
|
||||
'html/burn-exclamation.png',
|
||||
'html/chevron.png',
|
||||
'html/chevron-expand.png',
|
||||
'html/changelog.css',
|
||||
'html/changelog.js',
|
||||
'html/changelog.html'
|
||||
)
|
||||
src << browse('html/changelog.html', "window=changes;size=675x650")
|
||||
if(prefs.lastchangelog != changelog_hash)
|
||||
prefs.lastchangelog = changelog_hash
|
||||
prefs.save_preferences()
|
||||
winset(src, "rpane.changelog", "background-color=none;font-style=;")
|
||||
|
||||
/client/var/ghost_ears = 0
|
||||
/client/verb/toggle_ghost_ears()
|
||||
|
||||
@@ -201,9 +201,6 @@
|
||||
|
||||
var/digitalcamo = 0 // Can they be tracked by the AI?
|
||||
|
||||
var/datum/preferences/storedpreferences = null
|
||||
|
||||
|
||||
var/list/radar_blips = list() // list of screen objects, radar blips
|
||||
var/radar_open = 0 // nonzero is radar is open
|
||||
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
/mob/new_player/Login()
|
||||
update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying
|
||||
if (join_motd)
|
||||
if(join_motd)
|
||||
src << "<div class=\"motd\">[join_motd]</div>"
|
||||
|
||||
if(!preferences)
|
||||
preferences = new
|
||||
|
||||
if(!mind)
|
||||
mind = new /datum/mind(key)
|
||||
mind.active = 1
|
||||
mind.current = src
|
||||
|
||||
//spawn() Playmusic() // git some tunes up in heeyaa~
|
||||
|
||||
var/starting_loc = pick(newplayer_start)
|
||||
if(!starting_loc) starting_loc = locate(1,1,1)
|
||||
loc = starting_loc
|
||||
lastarea = starting_loc
|
||||
if(length(newplayer_start))
|
||||
loc = pick(newplayer_start)
|
||||
else
|
||||
loc = locate(1,1,1)
|
||||
lastarea = loc
|
||||
|
||||
sight |= SEE_TURFS
|
||||
player_list |= src
|
||||
|
||||
/*
|
||||
var/list/watch_locations = list()
|
||||
for(var/obj/effect/landmark/landmark in landmarks_list)
|
||||
if(landmark.tag == "landmark*new_player")
|
||||
@@ -28,71 +25,10 @@
|
||||
|
||||
if(watch_locations.len>0)
|
||||
loc = pick(watch_locations)
|
||||
|
||||
|
||||
|
||||
spawn(30)
|
||||
*/
|
||||
new_player_panel()
|
||||
spawn(40)
|
||||
if(client)
|
||||
if(!preferences.savefile_load(src, 0))
|
||||
preferences.ShowChoices(src)
|
||||
if(!client.changes)
|
||||
changes()
|
||||
else
|
||||
if(client.activeslot != preferences.default_slot)//Loads default slot
|
||||
client.activeslot = preferences.default_slot
|
||||
preferences.savefile_load(src)
|
||||
var/lastchangelog = length('html/changelog.html')
|
||||
if(!client.changes && preferences.lastchangelog!=lastchangelog)
|
||||
changes()
|
||||
preferences.lastchangelog = lastchangelog
|
||||
preferences.savefile_save(src)
|
||||
handle_privacy_poll()
|
||||
new_player_panel()
|
||||
if(preferences.lobby_music)
|
||||
if(client.prefs.lobby_music)
|
||||
Playmusic()
|
||||
//PDA Resource Initialisation =======================================================>
|
||||
/*
|
||||
Quick note: local dream daemon instances don't seem to cache images right. Might be
|
||||
a local problem with my machine but it's annoying nontheless.
|
||||
*/
|
||||
//load the PDA iconset into the client
|
||||
src << browse_rsc('icons/pda_icons/pda_atmos.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_back.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_bell.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_blank.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_boom.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_bucket.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_crate.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_cuffs.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_eject.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_exit.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_flashlight.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_honk.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_mail.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_medical.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_menu.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_mule.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_notes.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_power.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_rdoor.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_reagent.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_refresh.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_scanner.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_signaler.png')
|
||||
src << browse_rsc('icons/pda_icons/pda_status.png')
|
||||
//Loads icons for SpiderOS into client
|
||||
src << browse_rsc('icons/spideros_icons/sos_1.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_2.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_3.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_4.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_5.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_6.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_7.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_8.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_9.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_10.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_11.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_12.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_13.png')
|
||||
src << browse_rsc('icons/spideros_icons/sos_14.png')
|
||||
//End PDA Resource Initialisation =====================================================>
|
||||
@@ -1,7 +1,6 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
/mob/new_player
|
||||
var/datum/preferences/preferences = null
|
||||
var/ready = 0
|
||||
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
|
||||
var/totalPlayers = 0 //Player counts for the Lobby tab
|
||||
@@ -105,14 +104,11 @@
|
||||
if(!client) return 0
|
||||
|
||||
if(href_list["show_preferences"])
|
||||
preferences.ShowChoices(src)
|
||||
client.prefs.ShowChoices(src)
|
||||
return 1
|
||||
|
||||
if(href_list["ready"])
|
||||
if(!ready)
|
||||
ready = 1
|
||||
else
|
||||
ready = 0
|
||||
ready = !ready
|
||||
|
||||
if(href_list["refresh"])
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
@@ -121,6 +117,7 @@
|
||||
if(href_list["observe"])
|
||||
|
||||
if(alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") == "Yes")
|
||||
if(!client) return 1
|
||||
var/mob/dead/observer/observer = new()
|
||||
|
||||
spawning = 1
|
||||
@@ -132,12 +129,12 @@
|
||||
src << "\blue Now teleporting."
|
||||
observer.loc = O.loc
|
||||
observer.key = key
|
||||
if(preferences.be_random_name)
|
||||
preferences.randomize_name()
|
||||
observer.name = preferences.real_name
|
||||
if(client.prefs.be_random_name)
|
||||
client.prefs.randomize_name()
|
||||
observer.name = client.prefs.real_name
|
||||
observer.real_name = observer.name
|
||||
|
||||
preferences.copy_to_observer(observer)
|
||||
client.prefs.copy_to_observer(observer)
|
||||
|
||||
del(src)
|
||||
return 1
|
||||
@@ -196,14 +193,11 @@
|
||||
usr << browse(null,"window=privacypoll")
|
||||
|
||||
if(!ready && href_list["preference"])
|
||||
preferences.process_link(src, href_list)
|
||||
if(client)
|
||||
client.prefs.process_link(src, href_list)
|
||||
else if(!href_list["late_join"])
|
||||
new_player_panel()
|
||||
|
||||
if(href_list["priv_msg"])
|
||||
..() //pass PM calls along to /mob/Topic
|
||||
return
|
||||
|
||||
if(href_list["showpoll"])
|
||||
handle_player_polling()
|
||||
return
|
||||
@@ -319,10 +313,10 @@
|
||||
|
||||
if(ticker.random_players)
|
||||
new_character.gender = pick(MALE, FEMALE)
|
||||
preferences.randomize_name()
|
||||
preferences.randomize_appearance_for(new_character)
|
||||
client.prefs.randomize_name()
|
||||
client.prefs.randomize_appearance_for(new_character)
|
||||
else
|
||||
preferences.copy_to(new_character)
|
||||
client.prefs.copy_to(new_character)
|
||||
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
|
||||
|
||||
@@ -336,7 +330,7 @@
|
||||
|
||||
new_character.name = real_name
|
||||
new_character.dna.ready_dna(new_character)
|
||||
new_character.dna.b_type = preferences.b_type
|
||||
new_character.dna.b_type = client.prefs.b_type
|
||||
|
||||
new_character.key = key //Manually transfer the key to log them in
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
var/list/preferences_datums = list()
|
||||
|
||||
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf
|
||||
//some autodetection here.
|
||||
"traitor" = IS_MODE_COMPILED("traitor"), // 0
|
||||
@@ -34,25 +36,27 @@ var/const/MAX_SAVE_SLOTS = 3
|
||||
|
||||
|
||||
datum/preferences
|
||||
var/path
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
var/savefile_version = 0
|
||||
|
||||
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
||||
var/ooccolor = "#b82e00"
|
||||
var/midis = 1 //Play admin midis
|
||||
var/ghost_ears = 1 //Toggle ghost ears
|
||||
var/ghost_sight = 1
|
||||
var/be_special = 0 //Special role selection
|
||||
var/UI_style = "Midnight"
|
||||
var/sound_adminhelp = 0
|
||||
var/lobby_music = 1 //Whether or not to play the lobby music(Defaults yes)
|
||||
|
||||
|
||||
var/real_name
|
||||
var/be_random_name = 0
|
||||
var/gender = MALE
|
||||
var/age = 30.0
|
||||
var/b_type = "A+"
|
||||
|
||||
//Special role selection
|
||||
var/be_special = 0
|
||||
//Play admin midis
|
||||
var/midis = 1
|
||||
//Toggle ghost ears
|
||||
var/ghost_ears = 1
|
||||
var/ghost_sight = 1
|
||||
//Saved changlog filesize to detect if there was a change
|
||||
var/lastchangelog = 0
|
||||
|
||||
//Just like it sounds
|
||||
var/ooccolor = "#b82e00"
|
||||
var/underwear = 1
|
||||
var/backbag = 2
|
||||
|
||||
@@ -78,8 +82,6 @@ datum/preferences
|
||||
var/g_eyes = 0
|
||||
var/b_eyes = 0
|
||||
|
||||
var/UI_style = "Midnight"
|
||||
|
||||
//Mob preview
|
||||
var/icon/preview_icon_front = null
|
||||
var/icon/preview_icon_side = null
|
||||
@@ -99,22 +101,21 @@ datum/preferences
|
||||
|
||||
// Want randomjob if preferences already filled - Donkie
|
||||
var/userandomjob = 1 // Defaults to 1 for less assistants!
|
||||
var/default_slot = 1//Holder so it doesn't default to slot 1, rather the last one used
|
||||
var/slot_name = ""
|
||||
|
||||
// OOC Metadata:
|
||||
var/metadata = ""
|
||||
|
||||
var/sound_adminhelp = 0
|
||||
var/lobby_music = 1//Whether or not to play the lobby music(Defaults yes)
|
||||
|
||||
|
||||
|
||||
New()
|
||||
randomize_name()
|
||||
..()
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
|
||||
if(istype(C))
|
||||
if(!IsGuestKey(C.key))
|
||||
load_path(C.ckey)
|
||||
if(load_preferences())
|
||||
load_character()
|
||||
return
|
||||
randomize_name()
|
||||
|
||||
/datum/preferences
|
||||
proc/ShowChoices(mob/user)
|
||||
if(!user || !user.client) return
|
||||
update_preview_icon()
|
||||
@@ -123,82 +124,65 @@ datum/preferences
|
||||
var/dat = "<html><body><center>"
|
||||
|
||||
|
||||
if(!IsGuestKey(user.key))
|
||||
var/list/saves = list()
|
||||
var/n = null
|
||||
for(var/i = 1; i <= MAX_SAVE_SLOTS; i += 1)
|
||||
var/savefile/F = new /savefile("data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/preferences[i].sav")
|
||||
F["slotname"] >> n
|
||||
if(!n)
|
||||
saves += "<a href=\"byond://?src=\ref[user];preference=changeslot;num=[i]\">Save Slot [i]</a>"
|
||||
else
|
||||
saves += "<a href=\"byond://?src=\ref[user];preference=changeslot;num=[i]\">[n]</a>"
|
||||
|
||||
for(var/i = 1; i <= MAX_SAVE_SLOTS; i += 1)
|
||||
if(i == user.client.activeslot)
|
||||
if((slot_name == "") || (!slot_name))
|
||||
dat += "Save Slot [i]"
|
||||
else
|
||||
dat += "[slot_name]"
|
||||
else
|
||||
dat += "[saves[i]]"
|
||||
if(i == default_slot)
|
||||
dat += "(D)"
|
||||
else
|
||||
dat += "<a href=\"byond://?src=\ref[user];preference=defaultslot;num=[i]\">(D)</a>"
|
||||
|
||||
if(i != MAX_SAVE_SLOTS)
|
||||
dat += " / "
|
||||
dat += "<br>"
|
||||
dat += "<a href=\"byond://?src=\ref[user];preference=slotname;task=input\">*</a>"
|
||||
|
||||
if(path)
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(S)
|
||||
var/name
|
||||
for(var/i=1, i<=MAX_SAVE_SLOTS, i++)
|
||||
S.cd = "/character[i]"
|
||||
S["real_name"] >> name
|
||||
if(!name) name = "Character[i]"
|
||||
if(i!=1) dat += " | "
|
||||
if(i==default_slot)
|
||||
name = "<b>[name]</b>"
|
||||
dat += "<a href='?_src_=prefs;preference=changeslot;num=[i];'>[name]</a>"
|
||||
else
|
||||
dat += "Please create an account to save your preferences."
|
||||
|
||||
dat += "</center><hr><table><tr><td width='300px' height='300px'>"
|
||||
dat += "</center><hr><table><tr><td width='340px' height='320px'>"
|
||||
|
||||
dat += "<b>Name:</b> "
|
||||
dat += "<a href=\"byond://?src=\ref[user];preference=name;task=input\"><b>[real_name]</b></a> "
|
||||
dat += "(<a href=\"byond://?src=\ref[user];preference=name;task=random\">®</A>) "
|
||||
dat += "(® = <a href=\"byond://?src=\ref[user];preference=name\">[be_random_name ? "Yes" : "No"]</a>)"
|
||||
dat += "<a href='?_src_=prefs;preference=name;task=input'><b>[real_name]</b></a><br>"
|
||||
dat += "(<a href='?_src_=prefs;preference=name;task=random'>Random Name</A>) "
|
||||
dat += "(<a href='?_src_=prefs;preference=name'>Always Random Name: [be_random_name ? "Yes" : "No"]</a>)"
|
||||
dat += "<br>"
|
||||
|
||||
dat += "<b>Gender:</b> <a href=\"byond://?src=\ref[user];preference=gender\"><b>[gender == MALE ? "Male" : "Female"]</b></a><br>"
|
||||
dat += "<b>Age:</b> <a href='byond://?src=\ref[user];preference=age;task=input'>[age]</a>"
|
||||
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'><b>[gender == MALE ? "Male" : "Female"]</b></a><br>"
|
||||
dat += "<b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preference=ui\"><b>[UI_style]</b></a><br>"
|
||||
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preference=hear_midis\"><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Play lobby music:</b> <a href=\"byond://?src=\ref[user];preference=lobby_music\"><b>[lobby_music == 1 ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Ghost ears:</b> <a href=\"byond://?src=\ref[user];preference=ghost_ears\"><b>[ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
||||
dat += "<b>Ghost sight:</b> <a href=\"byond://?src=\ref[user];preference=ghost_sight\"><b>[ghost_sight == 0 ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
|
||||
dat += "<b>UI Style:</b> <a href='?_src_=prefs;preference=ui'><b>[UI_style]</b></a><br>"
|
||||
dat += "<b>Play admin midis:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Play lobby music:</b> <a href='?_src_=prefs;preference=lobby_music'><b>[lobby_music == 1 ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
||||
dat += "<b>Ghost sight:</b> <a href='?_src_=prefs;preference=ghost_sight'><b>[ghost_sight == 0 ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
|
||||
|
||||
if(config.allow_Metadata)
|
||||
dat += "<b>OOC Notes:</b> <a href='byond://?src=\ref[user];preference=metadata;task=input'> Edit </a><br>"
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'> Edit </a><br>"
|
||||
|
||||
if(user.client && user.client.holder)
|
||||
dat += "<b>Adminhelp sound</b>: "
|
||||
dat += "[(sound_adminhelp)?"On":"Off"] <a href='byond://?src=\ref[user];preference=hear_adminhelps'>toggle</a><br>"
|
||||
dat += "[(sound_adminhelp)?"On":"Off"] <a href='?_src_=prefs;preference=hear_adminhelps'>toggle</a><br>"
|
||||
|
||||
if(config.allow_admin_ooccolor && check_rights(R_ADMIN,0))
|
||||
dat += "<br><b>OOC</b><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];preference=ooccolor;task=input'>Change color</a> <font face=\"fixedsys\" size=\"3\" color=\"[ooccolor]\"><table style='display:inline;' bgcolor=\"[ooccolor]\"><tr><td>__</td></tr></table></font><br>"
|
||||
dat += "<a href='?_src_=prefs;preference=ooccolor;task=input'>Change color</a> <font face='fixedsys' size='3' color='[ooccolor]'><table style='display:inline;' bgcolor='[ooccolor]'><tr><td>__</td></tr></table></font><br>"
|
||||
|
||||
dat += "<br><b>Occupation Choices</b><br>"
|
||||
dat += "\t<a href=\"byond://?src=\ref[user];preference=job;task=menu\"><b>Set Preferences</b></a><br>"
|
||||
dat += "\t<a href='?_src_=prefs;preference=job;task=menu'><b>Set Preferences</b></a><br>"
|
||||
|
||||
dat += "<br><table><tr><td><b>Body</b> "
|
||||
dat += "(<a href=\"byond://?src=\ref[user];preference=all;task=random\">®</A>)"
|
||||
dat += "(<a href='?_src_=prefs;preference=all;task=random'>®</A>)"
|
||||
dat += "<br>"
|
||||
dat += "Blood Type: <a href='byond://?src=\ref[user];preference=b_type;task=input'>[b_type]</a><br>"
|
||||
dat += "Skin Tone: <a href='byond://?src=\ref[user];preference=s_tone;task=input'>[-s_tone + 35]/220<br></a>"
|
||||
dat += "Blood Type: [b_type]<br>"
|
||||
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220<br></a>"
|
||||
|
||||
if(gender == MALE)
|
||||
dat += "Underwear: <a href =\"byond://?src=\ref[user];preference=underwear;task=input\"><b>[underwear_m[underwear]]</b></a><br>"
|
||||
dat += "Underwear: <a href ='?_src_=prefs;preference=underwear;task=input'><b>[underwear_m[underwear]]</b></a><br>"
|
||||
else
|
||||
dat += "Underwear: <a href =\"byond://?src=\ref[user];preference=underwear;task=input\"><b>[underwear_f[underwear]]</b></a><br>"
|
||||
dat += "Underwear: <a href ='?_src_=prefs;preference=underwear;task=input'><b>[underwear_f[underwear]]</b></a><br>"
|
||||
|
||||
dat += "Backpack Type:<br><a href =\"byond://?src=\ref[user];preference=bag;task=input\"><b>[backbaglist[backbag]]</b></a><br>"
|
||||
dat += "Backpack Type:<br><a href ='?_src_=prefs;preference=bag;task=input'><b>[backbaglist[backbag]]</b></a><br>"
|
||||
|
||||
dat += "</td><td><b>Preview</b><br><img src=previewicon.png height=64 width=64><img src=previewicon2.png height=64 width=64></td></tr></table>"
|
||||
|
||||
@@ -206,18 +190,18 @@ datum/preferences
|
||||
|
||||
dat += "<br><b>Hair</b><br>"
|
||||
|
||||
dat += "<a href='byond://?src=\ref[user];preference=hair;task=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair, 2)]\"><table style='display:inline;' bgcolor=\"#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair)]\"><tr><td>__</td></tr></table></font> "
|
||||
dat += "<a href='?_src_=prefs;preference=hair;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair)]'><tr><td>__</td></tr></table></font> "
|
||||
|
||||
dat += "Style: <a href='byond://?src=\ref[user];preference=h_style;task=input'>[h_style]</a><br>"
|
||||
dat += "Style: <a href='?_src_=prefs;preference=h_style;task=input'>[h_style]</a><br>"
|
||||
|
||||
dat += "<br><b>Facial</b><br>"
|
||||
|
||||
dat += "<a href='byond://?src=\ref[user];preference=facial;task=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial, 2)]\"><table style='display:inline;' bgcolor=\"#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial)]\"><tr><td>__</td></tr></table></font> "
|
||||
dat += "<a href='?_src_=prefs;preference=facial;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial)]'><tr><td>__</td></tr></table></font> "
|
||||
|
||||
dat += "Style: <a href='byond://?src=\ref[user];preference=f_style;task=input'>[f_style]</a><br>"
|
||||
dat += "Style: <a href='?_src_=prefs;preference=f_style;task=input'>[f_style]</a><br>"
|
||||
|
||||
dat += "<br><b>Eyes</b><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];preference=eyes;task=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes, 2)]\"><table style='display:inline;' bgcolor=\"#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes)]\"><tr><td>__</td></tr></table></font>"
|
||||
dat += "<a href='?_src_=prefs;preference=eyes;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes)]'><tr><td>__</td></tr></table></font>"
|
||||
|
||||
dat += "<br><br>"
|
||||
if(jobban_isbanned(user, "Syndicate"))
|
||||
@@ -233,18 +217,18 @@ datum/preferences
|
||||
if(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=\"byond://?src=\ref[user];preference=be_special;num=[n]\"><b>[src.be_special&(1<<n) ? "Yes" : "No"]</b></a><br>"
|
||||
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++
|
||||
dat += "</td></tr></table><hr><center>"
|
||||
|
||||
if(!IsGuestKey(user.key))
|
||||
dat += "<a href='byond://?src=\ref[user];preference=load'>Undo</a> - "
|
||||
dat += "<a href='byond://?src=\ref[user];preference=save'>Save Setup</a> - "
|
||||
dat += "<a href='?_src_=prefs;preference=load'>Undo</a> - "
|
||||
dat += "<a href='?_src_=prefs;preference=save'>Save Setup</a> - "
|
||||
|
||||
dat += "<a href='byond://?src=\ref[user];preference=reset_all'>Reset Setup</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=reset_all'>Reset Setup</a>"
|
||||
dat += "</center></body></html>"
|
||||
|
||||
user << browse(dat, "window=preferences;size=550x545")
|
||||
user << browse(dat, "window=preferences;size=560x560")
|
||||
|
||||
proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), width = 550, height = 500)
|
||||
//limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice.
|
||||
@@ -256,7 +240,7 @@ datum/preferences
|
||||
var/HTML = "<body>"
|
||||
HTML += "<tt><center>"
|
||||
HTML += "<b>Choose occupation chances</b><br>Unavailable occupations are in red.<br><br>"
|
||||
HTML += "<a align='center' href=\"byond://?src=\ref[user];preference=job;task=close\">\[Done\]</a><br><br>" // Easier to press up here.
|
||||
HTML += "<a align='center' href='?_src_=prefs;preference=job;task=close'>\[Done\]</a><br><br>" // Easier to press up here.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
var/index = -1
|
||||
@@ -292,7 +276,7 @@ datum/preferences
|
||||
|
||||
HTML += "</td><td width='40%'>"
|
||||
|
||||
HTML += "<a href=\"byond://?src=\ref[user];preference=job;task=input;text=[rank]\">"
|
||||
HTML += "<a href='?_src_=prefs;preference=job;task=input;text=[rank]'>"
|
||||
|
||||
if(rank == "Assistant")//Assistant is special
|
||||
if(job_civilian_low & ASSISTANT)
|
||||
@@ -316,7 +300,7 @@ datum/preferences
|
||||
|
||||
HTML += "</center></table>"
|
||||
|
||||
HTML += "<center><br><u><a href=\"byond://?src=\ref[user];preference=job;task=random\"><font color=[userandomjob ? "green>Get random job if preferences unavailable" : "red>Be assistant if preference unavailable"]</font></a></u></center>"
|
||||
HTML += "<center><br><u><a href='?_src_=prefs;preference=job;task=random'><font color=[userandomjob ? "green>Get random job if preferences unavailable" : "red>Be assistant if preference unavailable"]</font></a></u></center>"
|
||||
|
||||
HTML += "</tt>"
|
||||
|
||||
@@ -435,6 +419,7 @@ datum/preferences
|
||||
|
||||
proc/process_link(mob/user, list/href_list)
|
||||
if(!user) return
|
||||
if(!istype(user, /mob/new_player)) return
|
||||
|
||||
if(href_list["preference"] == "job")
|
||||
switch(href_list["task"])
|
||||
@@ -459,8 +444,8 @@ datum/preferences
|
||||
if("age")
|
||||
age = rand(17, 85)
|
||||
|
||||
if("b_type")
|
||||
b_type = pick( 31;"A+", 7;"A-", 8;"B+", 2;"B-", 2;"AB+", 1;"AB-", 40;"O+", 9;"O-" )
|
||||
// if("b_type")
|
||||
// b_type = pick( 31;"A+", 7;"A-", 8;"B+", 2;"B-", 2;"AB+", 1;"AB-", 40;"O+", 9;"O-" )
|
||||
|
||||
if("hair")
|
||||
randomize_hair_color("hair")
|
||||
@@ -498,8 +483,6 @@ datum/preferences
|
||||
randomize_facial(gender)
|
||||
randomize_eyes_color()
|
||||
randomize_skin_tone()
|
||||
b_type = pick( 31;"A+", 7;"A-", 8;"B+", 2;"B-", 2;"AB+", 1;"AB-", 40;"O+", 9;"O-" )
|
||||
|
||||
job_civilian_high = 0
|
||||
job_civilian_med = 0
|
||||
job_civilian_low = 0
|
||||
@@ -535,10 +518,10 @@ datum/preferences
|
||||
if(new_metadata)
|
||||
metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN))
|
||||
|
||||
if("b_type")
|
||||
var/new_b_type = input(user, "Choose your character's blood-type:", "Character Preference") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" )
|
||||
if(new_b_type)
|
||||
b_type = new_b_type
|
||||
// if("b_type")
|
||||
// var/new_b_type = input(user, "Choose your character's blood-type:", "Character Preference") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" )
|
||||
// if(new_b_type)
|
||||
// b_type = new_b_type
|
||||
|
||||
if("hair")
|
||||
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as color|null
|
||||
@@ -597,12 +580,6 @@ datum/preferences
|
||||
var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in backbaglist
|
||||
if(new_backbag)
|
||||
backbag = backbaglist.Find(new_backbag)
|
||||
|
||||
if("slotname")
|
||||
var/new_slotname = input(user, "Please name this savefile:", "Save Slot Name") as text|null
|
||||
if(ckey(new_slotname))//Checks to make sure there is one letter
|
||||
slot_name = strip_html_simple(new_slotname,16)
|
||||
|
||||
else
|
||||
switch(href_list["preference"])
|
||||
if("gender")
|
||||
@@ -647,21 +624,15 @@ datum/preferences
|
||||
ghost_sight = !ghost_sight
|
||||
|
||||
if("save")
|
||||
if(!IsGuestKey(user.key))
|
||||
savefile_save(user)
|
||||
save_preferences()
|
||||
save_character()
|
||||
|
||||
if("load")
|
||||
if(!IsGuestKey(user.key))
|
||||
savefile_load(user)
|
||||
load_preferences()
|
||||
load_character()
|
||||
|
||||
if("changeslot")
|
||||
savefile_save(user)
|
||||
user.client.activeslot = min(max(text2num(href_list["num"]), 1), MAX_SAVE_SLOTS)
|
||||
savefile_load(user)
|
||||
|
||||
if("defaultslot")
|
||||
default_slot = min(max(text2num(href_list["num"]), 1), MAX_SAVE_SLOTS)
|
||||
savefile_saveslot(user,default_slot)//Mirrors choice across all saves
|
||||
load_character(text2num(href_list["num"]))
|
||||
|
||||
ShowChoices(user)
|
||||
return 1
|
||||
|
||||
@@ -14,7 +14,6 @@ datum/preferences
|
||||
randomize_eyes_color()
|
||||
underwear = 1
|
||||
backbag = 2
|
||||
b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
|
||||
age = rand(19,35)
|
||||
copy_to(H,1)
|
||||
|
||||
|
||||
@@ -1,237 +1,201 @@
|
||||
#define SAVEFILE_VERSION_MIN 7
|
||||
#define SAVEFILE_VERSION_MAX 7
|
||||
|
||||
datum/preferences/proc/savefile_path(mob/user)
|
||||
if(!user.client)
|
||||
return null
|
||||
else
|
||||
return "data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/preferences[user.client.activeslot].sav"
|
||||
/datum/preferences/proc/load_path(ckey)
|
||||
if(!ckey) return
|
||||
path = "data/player_saves/[copytext(ckey,1,2)]/[ckey]/preferences.sav"
|
||||
|
||||
datum/preferences/proc/savefile_saveslot(mob/user,var/slot)//Mirrors default slot across each save
|
||||
if(!user.client)
|
||||
return null
|
||||
else
|
||||
for(var/i = 1; i <= MAX_SAVE_SLOTS; i += 1)
|
||||
var/savefile/F = new /savefile("data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/preferences[i].sav")
|
||||
F["default_slot"] << slot
|
||||
return 1
|
||||
/datum/preferences/proc/load_preferences()
|
||||
if(!path) return 0
|
||||
if(!fexists(path)) return 0
|
||||
|
||||
datum/preferences/proc/savefile_save(mob/user)
|
||||
if (IsGuestKey(user.key))
|
||||
return 0
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(!S) return 0
|
||||
|
||||
var/savefile/F = new /savefile(src.savefile_path(user))
|
||||
// var/version
|
||||
// F["version"] >> version
|
||||
S["version"] >> savefile_version
|
||||
|
||||
F["version"] << SAVEFILE_VERSION_MAX
|
||||
//general preferences
|
||||
S["ooccolor"] >> ooccolor
|
||||
S["lastchangelog"] >> lastchangelog
|
||||
S["UI_style"] >> UI_style
|
||||
S["be_special"] >> be_special
|
||||
S["default_slot"] >> default_slot
|
||||
|
||||
F["real_name"] << src.real_name
|
||||
F["name_is_always_random"] << src.be_random_name
|
||||
//to be consolidated into a bitfield
|
||||
S["sound_adminhelp"] >> sound_adminhelp
|
||||
S["lobby_music"] >> lobby_music
|
||||
S["midis"] >> midis
|
||||
S["ghost_ears"] >> ghost_ears
|
||||
S["ghost_sight"] >> ghost_sight
|
||||
|
||||
F["gender"] << src.gender
|
||||
F["age"] << src.age
|
||||
//Conversion
|
||||
/* if(!savefile_version || savefile_version < SAVEFILE_VERSION_MIN || savefile_version > SAVEFILE_VERSION_MAX)
|
||||
if(!savefile_update())
|
||||
fdel(path)
|
||||
C << "<font color='red'>Error: savefile_load(): Your savefile was not compatible and had to be deleted.</font>"
|
||||
return 0 */
|
||||
|
||||
//Job data
|
||||
F["job_civilian_high"] << src.job_civilian_high
|
||||
F["job_civilian_med"] << src.job_civilian_med
|
||||
F["job_civilian_low"] << src.job_civilian_low
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
UI_style = sanitize_inlist(UI_style, list("Midnight","Orange","old"), initial(UI_style))
|
||||
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
|
||||
default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
|
||||
|
||||
F["job_medsci_high"] << src.job_medsci_high
|
||||
F["job_medsci_med"] << src.job_medsci_med
|
||||
F["job_medsci_low"] << src.job_medsci_low
|
||||
|
||||
F["job_engsec_high"] << src.job_engsec_high
|
||||
F["job_engsec_med"] << src.job_engsec_med
|
||||
F["job_engsec_low"] << src.job_engsec_low
|
||||
|
||||
F["userandomjob"] << src.userandomjob
|
||||
|
||||
//Body data
|
||||
F["hair_red"] << src.r_hair
|
||||
F["hair_green"] << src.g_hair
|
||||
F["hair_blue"] << src.b_hair
|
||||
F["facial_red"] << src.r_facial
|
||||
F["facial_green"] << src.g_facial
|
||||
F["facial_blue"] << src.b_facial
|
||||
F["skin_tone"] << src.s_tone
|
||||
F["hair_style_name"] << src.h_style
|
||||
F["facial_style_name"] << src.f_style
|
||||
F["eyes_red"] << src.r_eyes
|
||||
F["eyes_green"] << src.g_eyes
|
||||
F["eyes_blue"] << src.b_eyes
|
||||
F["blood_type"] << src.b_type
|
||||
F["underwear"] << src.underwear
|
||||
F["backbag"] << src.backbag
|
||||
F["backbag"] << src.backbag
|
||||
|
||||
|
||||
|
||||
F["be_special"] << src.be_special
|
||||
//F["UI"] << src.UI
|
||||
if(isnull(UI_style))
|
||||
UI_style = "Midnight"
|
||||
F["UI_style"] << UI_style
|
||||
F["midis"] << src.midis
|
||||
F["ghost_ears"] << src.ghost_ears
|
||||
F["ghost_sight"] << src.ghost_sight
|
||||
F["ooccolor"] << src.ooccolor
|
||||
F["lastchangelog"] << src.lastchangelog
|
||||
|
||||
F["OOC_Notes"] << src.metadata
|
||||
|
||||
F["sound_adminhelp"] << src.sound_adminhelp
|
||||
F["default_slot"] << src.default_slot
|
||||
F["slotname"] << src.slot_name
|
||||
F["lobby_music"] << src.lobby_music
|
||||
sound_adminhelp = sanitize_integer(sound_adminhelp, 0, 1, initial(sound_adminhelp))
|
||||
lobby_music = sanitize_integer(lobby_music, 0, 1, initial(lobby_music))
|
||||
midis = sanitize_integer(midis, 0, 1, initial(midis))
|
||||
ghost_ears = sanitize_integer(ghost_ears, 0, 1, initial(ghost_ears))
|
||||
ghost_sight = sanitize_integer(ghost_sight, 0, 1, initial(ghost_sight))
|
||||
|
||||
return 1
|
||||
|
||||
// loads the savefile corresponding to the mob's ckey
|
||||
// if silent=true, report incompatible savefiles
|
||||
// returns 1 if loaded (or file was incompatible)
|
||||
// returns 0 if savefile did not exist
|
||||
/datum/preferences/proc/save_preferences()
|
||||
if(!path) return 0
|
||||
|
||||
datum/preferences/proc/savefile_load(mob/user)
|
||||
if(IsGuestKey(user.key)) return 0
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(!S) return 0
|
||||
|
||||
var/path = savefile_path(user)
|
||||
//general preferences
|
||||
S["ooccolor"] << ooccolor
|
||||
S["lastchangelog"] << lastchangelog
|
||||
S["UI_style"] << UI_style
|
||||
S["be_special"] << be_special
|
||||
S["default_slot"] << default_slot
|
||||
|
||||
if(!fexists(path))
|
||||
//Is there a preference file before this was committed?
|
||||
path = "data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/preferences.sav"
|
||||
if(!fexists(path))
|
||||
//No there is not
|
||||
return 0
|
||||
else
|
||||
//Yes there is. Let's rename it.
|
||||
var/savefile/oldsave = new/savefile(path)
|
||||
fcopy(oldsave, savefile_path(user))
|
||||
fdel(path) // We don't need the old file anymore
|
||||
path = savefile_path(user)
|
||||
// Did nothing break?
|
||||
if(!fexists(path))
|
||||
return 0
|
||||
|
||||
var/savefile/F = new /savefile(path)
|
||||
|
||||
var/version = null
|
||||
F["version"] >> version
|
||||
|
||||
if(isnull(version) || version < SAVEFILE_VERSION_MIN || version > SAVEFILE_VERSION_MAX)
|
||||
fdel(path)
|
||||
if(version)
|
||||
alert(user, "Your savefile was incompatible with this version and was deleted.")
|
||||
return 0
|
||||
|
||||
F["real_name"] >> src.real_name
|
||||
F["gender"] >> src.gender
|
||||
F["age"] >> src.age
|
||||
|
||||
F["hair_red"] >> src.r_hair
|
||||
F["hair_green"] >> src.g_hair
|
||||
F["hair_blue"] >> src.b_hair
|
||||
F["facial_red"] >> src.r_facial
|
||||
F["facial_green"] >> src.g_facial
|
||||
F["facial_blue"] >> src.b_facial
|
||||
F["skin_tone"] >> src.s_tone
|
||||
F["hair_style_name"] >> src.h_style
|
||||
F["facial_style_name"] >> src.f_style
|
||||
F["eyes_red"] >> src.r_eyes
|
||||
F["eyes_green"] >> src.g_eyes
|
||||
F["eyes_blue"] >> src.b_eyes
|
||||
F["blood_type"] >> src.b_type
|
||||
F["underwear"] >> src.underwear
|
||||
if(underwear == 0) underwear = 12 //For old players who have 0 in their savefile
|
||||
F["backbag"] >> src.backbag
|
||||
if(isnull(backbag)) backbag = 2
|
||||
F["name_is_always_random"] >> src.be_random_name
|
||||
F["midis"] >> src.midis
|
||||
F["ghost_ears"] >> src.ghost_ears
|
||||
if(isnull(ghost_ears)) ghost_ears = 1 //Hotfix
|
||||
F["ghost_sight"] >> src.ghost_sight
|
||||
if(isnull(ghost_sight)) ghost_sight = 1 //Hotfix
|
||||
F["ooccolor"] >> src.ooccolor
|
||||
F["lastchangelog"] >> src.lastchangelog
|
||||
//F["UI"] >> src.UI
|
||||
F["UI_style"] >> src.UI_style
|
||||
if(isnull(UI_style))
|
||||
UI_style = "Midnight"
|
||||
F["be_special"] >> src.be_special
|
||||
|
||||
F["job_civilian_high"] >> src.job_civilian_high
|
||||
F["job_civilian_med"] >> src.job_civilian_med
|
||||
F["job_civilian_low"] >> src.job_civilian_low
|
||||
|
||||
F["job_medsci_high"] >> src.job_medsci_high
|
||||
F["job_medsci_med"] >> src.job_medsci_med
|
||||
F["job_medsci_low"] >> src.job_medsci_low
|
||||
|
||||
F["job_engsec_high"] >> src.job_engsec_high
|
||||
F["job_engsec_med"] >> src.job_engsec_med
|
||||
F["job_engsec_low"] >> src.job_engsec_low
|
||||
|
||||
F["userandomjob"] >> src.userandomjob
|
||||
|
||||
F["OOC_Notes"] >> src.metadata
|
||||
|
||||
F["sound_adminhelp"] >> src.sound_adminhelp
|
||||
F["default_slot"] >> src.default_slot
|
||||
if(isnull(default_slot))
|
||||
default_slot = 1
|
||||
F["slotname"] >> src.slot_name
|
||||
F["lobby_music"] >> src.lobby_music
|
||||
if(isnull(lobby_music))
|
||||
lobby_music = 1
|
||||
|
||||
if(isnull(metadata))
|
||||
metadata = ""
|
||||
|
||||
//NOTE: Conversion things go inside this if statement
|
||||
//When updating the save file remember to add 1 to BOTH the savefile constants
|
||||
//Also take the old conversion things that no longer apply out of this if
|
||||
if(version && version < SAVEFILE_VERSION_MAX)
|
||||
convert_hairstyles() // convert version 4 hairstyles to version 5
|
||||
//to be consolidated into a bitfield
|
||||
S["sound_adminhelp"] << sound_adminhelp
|
||||
S["lobby_music"] << lobby_music
|
||||
S["midis"] << midis
|
||||
S["ghost_ears"] << ghost_ears
|
||||
S["ghost_sight"] << ghost_sight
|
||||
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/load_character(slot)
|
||||
if(!path) return 0
|
||||
if(!fexists(path)) return 0
|
||||
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(!S) return 0
|
||||
if(!slot) slot = default_slot
|
||||
slot = sanitize_integer(slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
S["default_slot"] << slot
|
||||
S.cd = "/character[slot]"
|
||||
|
||||
//Character
|
||||
S["OOC_Notes"] >> metadata
|
||||
S["real_name"] >> real_name
|
||||
S["name_is_always_random"] >> be_random_name
|
||||
S["gender"] >> gender
|
||||
S["age"] >> age
|
||||
//colors to be consolidated into hex strings (requires some work with dna code)
|
||||
S["hair_red"] >> r_hair
|
||||
S["hair_green"] >> g_hair
|
||||
S["hair_blue"] >> b_hair
|
||||
S["facial_red"] >> r_facial
|
||||
S["facial_green"] >> g_facial
|
||||
S["facial_blue"] >> b_facial
|
||||
S["skin_tone"] >> s_tone
|
||||
S["hair_style_name"] >> h_style
|
||||
S["facial_style_name"] >> f_style
|
||||
S["eyes_red"] >> r_eyes
|
||||
S["eyes_green"] >> g_eyes
|
||||
S["eyes_blue"] >> b_eyes
|
||||
S["underwear"] >> underwear
|
||||
S["backbag"] >> backbag
|
||||
|
||||
//Jobs
|
||||
S["userandomjob"] >> userandomjob
|
||||
S["job_civilian_high"] >> job_civilian_high
|
||||
S["job_civilian_med"] >> job_civilian_med
|
||||
S["job_civilian_low"] >> job_civilian_low
|
||||
S["job_medsci_high"] >> job_medsci_high
|
||||
S["job_medsci_med"] >> job_medsci_med
|
||||
S["job_medsci_low"] >> job_medsci_low
|
||||
S["job_engsec_high"] >> job_engsec_high
|
||||
S["job_engsec_med"] >> job_engsec_med
|
||||
S["job_engsec_low"] >> job_engsec_low
|
||||
|
||||
//Sanitize
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
if(!real_name) randomize_name()
|
||||
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
|
||||
gender = sanitize_gender(gender)
|
||||
age = sanitize_integer(age, 17, 85, initial(age))
|
||||
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
|
||||
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
|
||||
b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair))
|
||||
r_facial = sanitize_integer(r_facial, 0, 255, initial(r_facial))
|
||||
g_facial = sanitize_integer(g_facial, 0, 255, initial(g_facial))
|
||||
b_facial = sanitize_integer(b_facial, 0, 255, initial(b_facial))
|
||||
s_tone = sanitize_integer(s_tone, -185, 34, initial(s_tone))
|
||||
h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style))
|
||||
f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style))
|
||||
r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes))
|
||||
g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes))
|
||||
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
|
||||
underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear))
|
||||
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
|
||||
|
||||
userandomjob = sanitize_integer(userandomjob, 0, 1, initial(userandomjob))
|
||||
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
||||
job_civilian_med = sanitize_integer(job_civilian_med, 0, 65535, initial(job_civilian_med))
|
||||
job_civilian_low = sanitize_integer(job_civilian_low, 0, 65535, initial(job_civilian_low))
|
||||
job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high))
|
||||
job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med))
|
||||
job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low))
|
||||
job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high))
|
||||
job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med))
|
||||
job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low))
|
||||
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/save_character()
|
||||
if(!path) return 0
|
||||
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(!S) return 0
|
||||
S.cd = "/character[default_slot]"
|
||||
|
||||
//Character
|
||||
S["OOC_Notes"] << metadata
|
||||
S["real_name"] << real_name
|
||||
S["name_is_always_random"] << be_random_name
|
||||
S["gender"] << gender
|
||||
S["age"] << age
|
||||
S["hair_red"] << r_hair
|
||||
S["hair_green"] << g_hair
|
||||
S["hair_blue"] << b_hair
|
||||
S["facial_red"] << r_facial
|
||||
S["facial_green"] << g_facial
|
||||
S["facial_blue"] << b_facial
|
||||
S["skin_tone"] << s_tone
|
||||
S["hair_style_name"] << h_style
|
||||
S["facial_style_name"] << f_style
|
||||
S["eyes_red"] << r_eyes
|
||||
S["eyes_green"] << g_eyes
|
||||
S["eyes_blue"] << b_eyes
|
||||
S["underwear"] << underwear
|
||||
S["backbag"] << backbag
|
||||
|
||||
//Jobs
|
||||
S["userandomjob"] << userandomjob
|
||||
S["job_civilian_high"] << job_civilian_high
|
||||
S["job_civilian_med"] << job_civilian_med
|
||||
S["job_civilian_low"] << job_civilian_low
|
||||
S["job_medsci_high"] << job_medsci_high
|
||||
S["job_medsci_med"] << job_medsci_med
|
||||
S["job_medsci_low"] << job_medsci_low
|
||||
S["job_engsec_high"] << job_engsec_high
|
||||
S["job_engsec_med"] << job_engsec_med
|
||||
S["job_engsec_low"] << job_engsec_low
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
#undef SAVEFILE_VERSION_MAX
|
||||
#undef SAVEFILE_VERSION_MIN
|
||||
|
||||
|
||||
|
||||
datum/preferences/proc/convert_hairstyles()
|
||||
// convert hairstyle names from old savefiles
|
||||
switch(h_style)
|
||||
if("Balding")
|
||||
h_style = "Balding Hair"
|
||||
if("Fag")
|
||||
h_style = "Flow Hair"
|
||||
if("Jensen Hair")
|
||||
h_style = "Adam Jensen Hair"
|
||||
if("Kusangi Hair")
|
||||
h_style = "Kusanagi Hair"
|
||||
|
||||
switch(f_style)
|
||||
if("Watson")
|
||||
f_style = "Watson Mustache"
|
||||
if("Chaplin")
|
||||
f_style = "Square Mustache"
|
||||
if("Selleck")
|
||||
f_style = "Selleck Mustache"
|
||||
if("Van Dyke")
|
||||
f_style = "Van Dyke Mustache"
|
||||
if("Elvis")
|
||||
f_style = "Elvis Sideburns"
|
||||
if("Abe")
|
||||
f_style = "Abraham Lincoln Beard"
|
||||
if("Hipster")
|
||||
f_style = "Hipster Beard"
|
||||
if("Hogan")
|
||||
f_style = "Hulk Hogan Mustache"
|
||||
if("Jensen Goatee")
|
||||
f_style = "Adam Jensen Beard"
|
||||
return
|
||||
|
||||
#undef SAVEFILE_VERSION_MIN
|
||||
#undef SAVEFILE_VERSION_MAX
|
||||
|
||||
@@ -482,11 +482,6 @@ var/list/liftable_structures = list(\
|
||||
#define BANTYPE_JOB_TEMP 4
|
||||
#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
|
||||
|
||||
//The number of deciseconds which someone needs to be inactive to be classified as AFK:
|
||||
#define AFK_THRESHOLD 3000
|
||||
|
||||
|
||||
|
||||
#define SEE_INVISIBLE_MINIMUM 5
|
||||
|
||||
#define SEE_INVISIBLE_OBSERVER_NOLIGHTING 15
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define RECOMMENDED_VERSION 494
|
||||
/world/New()
|
||||
..()
|
||||
|
||||
changelog_hash = md5('html/changelog.html')
|
||||
src.load_configuration()
|
||||
|
||||
if (config && config.server_name != null && config.server_suffix && world.port > 0)
|
||||
@@ -172,14 +172,16 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
|
||||
#define INACTIVITY_KICK 6000 //10 minutes in ticks (approx.)
|
||||
/world/proc/KickInactiveClients()
|
||||
for(var/client/C)
|
||||
if( !C.holder && (C.inactivity >= INACTIVITY_KICK) )
|
||||
if(C.mob)
|
||||
if(!istype(C.mob, /mob/dead/))
|
||||
log_access("AFK: [key_name(C)]")
|
||||
C << "\red You have been inactive for more than 10 minutes and have been disconnected."
|
||||
del(C)
|
||||
spawn(3000) KickInactiveClients()//more or less five minutes
|
||||
spawn(-1)
|
||||
set background = 1
|
||||
while(1)
|
||||
sleep(INACTIVITY_KICK)
|
||||
for(var/client/C in clients)
|
||||
if(C.is_afk(INACTIVITY_KICK))
|
||||
if(!istype(C.mob, /mob/dead))
|
||||
log_access("AFK: [key_name(C)]")
|
||||
C << "\red You have been inactive for more than 10 minutes and have been disconnected."
|
||||
del(C)
|
||||
#undef INACTIVITY_KICK
|
||||
|
||||
|
||||
|
||||
@@ -1433,7 +1433,7 @@ window "rpane"
|
||||
lock = none
|
||||
elem "rulesb"
|
||||
type = BUTTON
|
||||
pos = 289,0
|
||||
pos = 278,0
|
||||
size = 60x16
|
||||
anchor1 = none
|
||||
anchor2 = none
|
||||
@@ -1459,9 +1459,37 @@ window "rpane"
|
||||
is-checked = false
|
||||
group = "rpanemode"
|
||||
button-type = pushbutton
|
||||
elem "changelog"
|
||||
type = BUTTON
|
||||
pos = 341,0
|
||||
size = 67x16
|
||||
anchor1 = none
|
||||
anchor2 = none
|
||||
font-family = ""
|
||||
font-size = 0
|
||||
font-style = ""
|
||||
text-color = #000000
|
||||
background-color = none
|
||||
is-visible = true
|
||||
is-disabled = false
|
||||
is-transparent = false
|
||||
is-default = false
|
||||
border = none
|
||||
drop-zone = false
|
||||
right-click = false
|
||||
saved-params = "is-checked"
|
||||
on-size = ""
|
||||
text = "Changelog"
|
||||
image = ""
|
||||
command = "Changelog"
|
||||
is-flat = false
|
||||
stretch = false
|
||||
is-checked = false
|
||||
group = "rpanemode"
|
||||
button-type = pushbutton
|
||||
elem "forumb"
|
||||
type = BUTTON
|
||||
pos = 224,0
|
||||
pos = 215,0
|
||||
size = 60x16
|
||||
anchor1 = none
|
||||
anchor2 = none
|
||||
@@ -1489,7 +1517,7 @@ window "rpane"
|
||||
button-type = pushbutton
|
||||
elem "wikib"
|
||||
type = BUTTON
|
||||
pos = 160,0
|
||||
pos = 152,0
|
||||
size = 60x16
|
||||
anchor1 = none
|
||||
anchor2 = none
|
||||
|
||||
223
tgstation.dme
223
tgstation.dme
@@ -6,228 +6,6 @@
|
||||
|
||||
// BEGIN_FILE_DIR
|
||||
#define FILE_DIR .
|
||||
#define FILE_DIR "code"
|
||||
#define FILE_DIR "code/__HELPERS"
|
||||
#define FILE_DIR "code/ATMOSPHERICS"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices"
|
||||
#define FILE_DIR "code/ATMOSPHERICS/components/unary"
|
||||
#define FILE_DIR "code/controllers"
|
||||
#define FILE_DIR "code/datums"
|
||||
#define FILE_DIR "code/datums/diseases"
|
||||
#define FILE_DIR "code/datums/diseases/advance"
|
||||
#define FILE_DIR "code/datums/diseases/advance/symptoms"
|
||||
#define FILE_DIR "code/datums/helper_datums"
|
||||
#define FILE_DIR "code/datums/organs"
|
||||
#define FILE_DIR "code/datums/spells"
|
||||
#define FILE_DIR "code/defines"
|
||||
#define FILE_DIR "code/defines/obj"
|
||||
#define FILE_DIR "code/defines/procs"
|
||||
#define FILE_DIR "code/FEA"
|
||||
#define FILE_DIR "code/game"
|
||||
#define FILE_DIR "code/game/area"
|
||||
#define FILE_DIR "code/game/gamemodes"
|
||||
#define FILE_DIR "code/game/gamemodes/blob"
|
||||
#define FILE_DIR "code/game/gamemodes/blob/blobs"
|
||||
#define FILE_DIR "code/game/gamemodes/changeling"
|
||||
#define FILE_DIR "code/game/gamemodes/cult"
|
||||
#define FILE_DIR "code/game/gamemodes/events"
|
||||
#define FILE_DIR "code/game/gamemodes/events/holidays"
|
||||
#define FILE_DIR "code/game/gamemodes/extended"
|
||||
#define FILE_DIR "code/game/gamemodes/malfunction"
|
||||
#define FILE_DIR "code/game/gamemodes/meteor"
|
||||
#define FILE_DIR "code/game/gamemodes/nuclear"
|
||||
#define FILE_DIR "code/game/gamemodes/revolution"
|
||||
#define FILE_DIR "code/game/gamemodes/sandbox"
|
||||
#define FILE_DIR "code/game/gamemodes/traitor"
|
||||
#define FILE_DIR "code/game/gamemodes/wizard"
|
||||
#define FILE_DIR "code/game/jobs"
|
||||
#define FILE_DIR "code/game/jobs/job"
|
||||
#define FILE_DIR "code/game/machinery"
|
||||
#define FILE_DIR "code/game/machinery/atmoalter"
|
||||
#define FILE_DIR "code/game/machinery/bots"
|
||||
#define FILE_DIR "code/game/machinery/camera"
|
||||
#define FILE_DIR "code/game/machinery/computer"
|
||||
#define FILE_DIR "code/game/machinery/doors"
|
||||
#define FILE_DIR "code/game/machinery/embedded_controller"
|
||||
#define FILE_DIR "code/game/machinery/kitchen"
|
||||
#define FILE_DIR "code/game/machinery/pipe"
|
||||
#define FILE_DIR "code/game/machinery/telecomms"
|
||||
#define FILE_DIR "code/game/mecha"
|
||||
#define FILE_DIR "code/game/mecha/combat"
|
||||
#define FILE_DIR "code/game/mecha/equipment"
|
||||
#define FILE_DIR "code/game/mecha/equipment/tools"
|
||||
#define FILE_DIR "code/game/mecha/equipment/weapons"
|
||||
#define FILE_DIR "code/game/mecha/medical"
|
||||
#define FILE_DIR "code/game/mecha/working"
|
||||
#define FILE_DIR "code/game/objects"
|
||||
#define FILE_DIR "code/game/objects/effects"
|
||||
#define FILE_DIR "code/game/objects/effects/decals"
|
||||
#define FILE_DIR "code/game/objects/effects/decals/Cleanable"
|
||||
#define FILE_DIR "code/game/objects/effects/spawners"
|
||||
#define FILE_DIR "code/game/objects/items"
|
||||
#define FILE_DIR "code/game/objects/items/devices"
|
||||
#define FILE_DIR "code/game/objects/items/devices/PDA"
|
||||
#define FILE_DIR "code/game/objects/items/devices/radio"
|
||||
#define FILE_DIR "code/game/objects/items/robot"
|
||||
#define FILE_DIR "code/game/objects/items/stacks"
|
||||
#define FILE_DIR "code/game/objects/items/stacks/sheets"
|
||||
#define FILE_DIR "code/game/objects/items/stacks/tiles"
|
||||
#define FILE_DIR "code/game/objects/items/weapons"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/grenades"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/implants"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/secstorage"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/storage"
|
||||
#define FILE_DIR "code/game/objects/items/weapons/tanks"
|
||||
#define FILE_DIR "code/game/objects/structures"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets"
|
||||
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure"
|
||||
#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest"
|
||||
#define FILE_DIR "code/game/turfs"
|
||||
#define FILE_DIR "code/game/turfs/simulated"
|
||||
#define FILE_DIR "code/game/turfs/space"
|
||||
#define FILE_DIR "code/game/turfs/unsimulated"
|
||||
#define FILE_DIR "code/game/vehicles"
|
||||
#define FILE_DIR "code/game/vehicles/airtight"
|
||||
#define FILE_DIR "code/game/verbs"
|
||||
#define FILE_DIR "code/js"
|
||||
#define FILE_DIR "code/modules"
|
||||
#define FILE_DIR "code/modules/admin"
|
||||
#define FILE_DIR "code/modules/admin/DB ban"
|
||||
#define FILE_DIR "code/modules/admin/permissionverbs"
|
||||
#define FILE_DIR "code/modules/admin/verbs"
|
||||
#define FILE_DIR "code/modules/assembly"
|
||||
#define FILE_DIR "code/modules/awaymissions"
|
||||
#define FILE_DIR "code/modules/awaymissions/maploader"
|
||||
#define FILE_DIR "code/modules/client"
|
||||
#define FILE_DIR "code/modules/clothing"
|
||||
#define FILE_DIR "code/modules/clothing/glasses"
|
||||
#define FILE_DIR "code/modules/clothing/gloves"
|
||||
#define FILE_DIR "code/modules/clothing/head"
|
||||
#define FILE_DIR "code/modules/clothing/masks"
|
||||
#define FILE_DIR "code/modules/clothing/shoes"
|
||||
#define FILE_DIR "code/modules/clothing/spacesuits"
|
||||
#define FILE_DIR "code/modules/clothing/suits"
|
||||
#define FILE_DIR "code/modules/clothing/under"
|
||||
#define FILE_DIR "code/modules/clothing/under/jobs"
|
||||
#define FILE_DIR "code/modules/critters"
|
||||
#define FILE_DIR "code/modules/critters/hivebots"
|
||||
#define FILE_DIR "code/modules/detectivework"
|
||||
#define FILE_DIR "code/modules/flufftext"
|
||||
#define FILE_DIR "code/modules/food"
|
||||
#define FILE_DIR "code/modules/library"
|
||||
#define FILE_DIR "code/modules/liquid"
|
||||
#define FILE_DIR "code/modules/mining"
|
||||
#define FILE_DIR "code/modules/mob"
|
||||
#define FILE_DIR "code/modules/mob/dead"
|
||||
#define FILE_DIR "code/modules/mob/dead/observer"
|
||||
#define FILE_DIR "code/modules/mob/living"
|
||||
#define FILE_DIR "code/modules/mob/living/blob"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/larva"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/alien/special"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/brain"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/human"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/metroid"
|
||||
#define FILE_DIR "code/modules/mob/living/carbon/monkey"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/ai"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/decoy"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/pai"
|
||||
#define FILE_DIR "code/modules/mob/living/silicon/robot"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/friendly"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/hostile"
|
||||
#define FILE_DIR "code/modules/mob/new_player"
|
||||
#define FILE_DIR "code/modules/paperwork"
|
||||
#define FILE_DIR "code/modules/power"
|
||||
#define FILE_DIR "code/modules/power/antimatter"
|
||||
#define FILE_DIR "code/modules/power/singularity"
|
||||
#define FILE_DIR "code/modules/power/singularity/particle_accelerator"
|
||||
#define FILE_DIR "code/modules/projectiles"
|
||||
#define FILE_DIR "code/modules/projectiles/ammunition"
|
||||
#define FILE_DIR "code/modules/projectiles/guns"
|
||||
#define FILE_DIR "code/modules/projectiles/guns/energy"
|
||||
#define FILE_DIR "code/modules/projectiles/guns/projectile"
|
||||
#define FILE_DIR "code/modules/projectiles/projectile"
|
||||
#define FILE_DIR "code/modules/reagents"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks/bottle"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/food/snacks"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/glass"
|
||||
#define FILE_DIR "code/modules/reagents/reagent_containers/glass/bottle"
|
||||
#define FILE_DIR "code/modules/recycling"
|
||||
#define FILE_DIR "code/modules/research"
|
||||
#define FILE_DIR "code/modules/scripting"
|
||||
#define FILE_DIR "code/modules/scripting/AST"
|
||||
#define FILE_DIR "code/modules/scripting/AST/Operators"
|
||||
#define FILE_DIR "code/modules/scripting/Implementations"
|
||||
#define FILE_DIR "code/modules/scripting/Interpreter"
|
||||
#define FILE_DIR "code/modules/scripting/Parser"
|
||||
#define FILE_DIR "code/modules/scripting/Scanner"
|
||||
#define FILE_DIR "code/modules/security levels"
|
||||
#define FILE_DIR "code/unused"
|
||||
#define FILE_DIR "code/unused/beast"
|
||||
#define FILE_DIR "code/unused/computer2"
|
||||
#define FILE_DIR "code/unused/disease2"
|
||||
#define FILE_DIR "code/unused/gamemodes"
|
||||
#define FILE_DIR "code/unused/hivebot"
|
||||
#define FILE_DIR "code/unused/mining"
|
||||
#define FILE_DIR "code/unused/optics"
|
||||
#define FILE_DIR "code/unused/pda2"
|
||||
#define FILE_DIR "code/unused/powerarmor"
|
||||
#define FILE_DIR "code/unused/spacecraft"
|
||||
#define FILE_DIR "code/WorkInProgress"
|
||||
#define FILE_DIR "code/WorkInProgress/carn"
|
||||
#define FILE_DIR "code/WorkInProgress/mapload"
|
||||
#define FILE_DIR "code/WorkInProgress/organs"
|
||||
#define FILE_DIR "code/WorkInProgress/virus2"
|
||||
#define FILE_DIR "html"
|
||||
#define FILE_DIR "icons"
|
||||
#define FILE_DIR "icons/effects"
|
||||
#define FILE_DIR "icons/mecha"
|
||||
#define FILE_DIR "icons/misc"
|
||||
#define FILE_DIR "icons/mob"
|
||||
#define FILE_DIR "icons/obj"
|
||||
#define FILE_DIR "icons/obj/assemblies"
|
||||
#define FILE_DIR "icons/obj/atmospherics"
|
||||
#define FILE_DIR "icons/obj/clothing"
|
||||
#define FILE_DIR "icons/obj/doors"
|
||||
#define FILE_DIR "icons/obj/flora"
|
||||
#define FILE_DIR "icons/obj/machines"
|
||||
#define FILE_DIR "icons/obj/pipes"
|
||||
#define FILE_DIR "icons/pda_icons"
|
||||
#define FILE_DIR "icons/spideros_icons"
|
||||
#define FILE_DIR "icons/Testing"
|
||||
#define FILE_DIR "icons/turf"
|
||||
#define FILE_DIR "icons/vehicles"
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/RandomZLevels"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
#define FILE_DIR "sound/effects"
|
||||
#define FILE_DIR "sound/hallucinations"
|
||||
#define FILE_DIR "sound/items"
|
||||
#define FILE_DIR "sound/machines"
|
||||
#define FILE_DIR "sound/mecha"
|
||||
#define FILE_DIR "sound/misc"
|
||||
#define FILE_DIR "sound/piano"
|
||||
#define FILE_DIR "sound/violin"
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
#define FILE_DIR "tools"
|
||||
#define FILE_DIR "tools/Redirector"
|
||||
// END_FILE_DIR
|
||||
|
||||
// BEGIN_PREFERENCES
|
||||
@@ -247,6 +25,7 @@
|
||||
#include "code\__HELPERS\lists.dm"
|
||||
#include "code\__HELPERS\logging.dm"
|
||||
#include "code\__HELPERS\names.dm"
|
||||
#include "code\__HELPERS\sanitize_values.dm"
|
||||
#include "code\__HELPERS\text.dm"
|
||||
#include "code\__HELPERS\time.dm"
|
||||
#include "code\__HELPERS\type2type.dm"
|
||||
|
||||
Reference in New Issue
Block a user