This commit is contained in:
LetterJay
2017-05-10 21:59:41 -05:00
parent 181eee013e
commit 43318a88a5
5 changed files with 35 additions and 21 deletions

View File

@@ -4,18 +4,12 @@ GLOBAL_PROTECT(admin_verbs_default)
GLOBAL_LIST_INIT(admin_verbs_default, world.AVerbsDefault())
/world/proc/AVerbsDefault()
return list(
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
/client/proc/toggleannouncelogin, /*toggles if an admin's login is announced during a round*/
/client/proc/deadmin, /*destroys our own admin datum so we can play as a regular player*/
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
/client/proc/hide_verbs, /*hides all our adminverbs*/
/client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
/client/proc/deadchat, /*toggles deadchat on/off*/
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
/client/proc/toggleprayers, /*toggles prayers on/off*/
/client/verb/toggleprayersounds, /*Toggles prayer sounds (HALLELUJAH!)*/
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
/client/proc/secrets,
/client/proc/restart_controller,

View File

@@ -292,13 +292,13 @@ GLOBAL_LIST(external_rsc_urls)
set_client_age_from_db()
var/cached_player_age = player_age //we have to cache this because other shit may change it and we need it's current value now down below.
if (isnum(cached_player_age) && cached_player_age == -1) //first connection
player_age = 0
player_age = 0
if(!IsGuestKey(key) && SSdbcore.IsConnected())
findJoinDate()
sync_client_with_db(tdata)
if (isnum(cached_player_age) && cached_player_age == -1) //first connection
if (config.panic_bunker && !holder && !(ckey in GLOB.deadmins))
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
@@ -360,6 +360,27 @@ GLOBAL_LIST(external_rsc_urls)
hook_vr("client_new",list(src))
var/list/topmenus = GLOB.menulist[/datum/menu]
for (var/thing in topmenus)
var/datum/menu/topmenu = thing
var/topmenuname = "[topmenu]"
if (topmenuname == "[topmenu.type]")
var/list/tree = splittext(topmenuname, "/")
topmenuname = tree[tree.len]
winset(src, "[topmenu.type]", "parent=menu;name=[url_encode(topmenuname)]")
var/list/entries = topmenu.Generate_list(src)
for (var/child in entries)
winset(src, "[url_encode(child)]", "[entries[child]]")
if (!ispath(child, /datum/menu))
var/atom/verb/verbpath = child
if (copytext(verbpath.name,1,2) != "@")
new child(src)
for (var/thing in prefs.menuoptions)
var/datum/menu/menuitem = GLOB.menulist[thing]
if (menuitem)
menuitem.Load_checked(src)
//////////////
//DISCONNECT//
//////////////
@@ -370,7 +391,7 @@ GLOBAL_LIST(external_rsc_urls)
adminGreet(1)
holder.owner = null
GLOB.admins -= src
if (!GLOB.admins.len && SSticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
if(!GLOB.admins.len) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
var/cheesy_message = pick(
@@ -396,7 +417,7 @@ GLOBAL_LIST(external_rsc_urls)
"Sometimes when I have sex, I think about putting an entire peanut butter and jelly sandwich in the VCR.",\
"Forever alone :("\
)
send2irc("Server", "[cheesy_message] (No admins online)")
GLOB.ahelp_tickets.ClientLogout(src)

View File

@@ -168,6 +168,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/uplink_spawn_loc = UPLINK_PDA
var/list/menuoptions
//citadel code
var/arousable = TRUE //Allows players to disable arousal from the character creation menu
var/flavor_text = ""
@@ -194,6 +196,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!loaded_preferences_successfully)
save_preferences()
save_character() //let's save this new random character so it doesn't keep generating new ones.
menuoptions = list()
return
/datum/preferences/proc/ShowChoices(mob/user)
@@ -790,7 +793,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(href_list["jobbancheck"])
var/job = sanitizeSQL(href_list["jobbancheck"])
var/sql_ckey = sanitizeSQL(user.ckey)
var/datum/DBQuery/query_get_jobban = SSdbcore.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'")
var/datum/DBQuery/query_get_jobban = SSdbcore.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'")
if(!query_get_jobban.warn_execute())
return
if(query_get_jobban.NextRow())

View File

@@ -1,5 +1,5 @@
//This is the lowest supported version, anything below this is completely obsolete and the entire savefile will be wiped.
#define SAVEFILE_VERSION_MIN 10
#define SAVEFILE_VERSION_MIN 15
//This is the current version, anything below this will attempt to update (if it's not obsolete)
#define SAVEFILE_VERSION_MAX 20
@@ -167,12 +167,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["tgui_fancy"] >> tgui_fancy
S["tgui_lock"] >> tgui_lock
S["windowflash"] >> windowflashing
S["be_special"] >> be_special
if(islist(S["be_special"]))
S["be_special"] >> be_special
else //force update and store the old bitflag version of be_special
needs_update = 12
S["be_special"] >> old_be_special
S["default_slot"] >> default_slot
S["chat_toggles"] >> chat_toggles
@@ -188,6 +184,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["uses_glasses_colour"]>> uses_glasses_colour
S["clientfps"] >> clientfps
S["parallax"] >> parallax
S["menuoptions"] >> menuoptions
//citadel code
S["arousable"] >> arousable
@@ -251,6 +248,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["uses_glasses_colour"]<< uses_glasses_colour
S["clientfps"] << clientfps
S["parallax"] << parallax
S["menuoptions"] << menuoptions
//citadel code
S["arousable"] << arousable

View File

@@ -40,6 +40,7 @@
load_mode()
load_motd()
load_admins()
load_menu()
//disabled to prevent runtimes until it's fixed
// load_mentors()
if(config.usewhitelist)
@@ -335,6 +336,3 @@
/world/proc/has_round_started()
return SSticker.HasRoundStarted()
/world/proc/load_menu()
for (var/typepath in (typesof(/datum/menu)-/datum/menu))
new typepath()