ok this is going to be a pain in the ass ain't it (#2458)

lets hope nothing blows up this time (Flags PR but it works!)
This commit is contained in:
kevinz000
2017-08-22 05:01:38 -07:00
committed by GitHub
parent 6a309b5996
commit 35b7b93b24
535 changed files with 2471 additions and 1486 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin())
return list(
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags_1*/
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
/client/proc/check_ai_laws, /*shows AI and borg laws*/
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
+7 -7
View File
@@ -31,11 +31,11 @@ GLOBAL_PROTECT(admin_datums)
GLOB.admin_datums[ckey] = src
/datum/admins/proc/associate(client/C)
if(IsAdminAdvancedProcCall())
var/msg = " has tried to elevate permissions!"
message_admins("[key_name_admin(usr)][msg]")
log_admin_private("[key_name(usr)][msg]")
return
if(IsAdminAdvancedProcCall())
var/msg = " has tried to elevate permissions!"
message_admins("[key_name_admin(usr)][msg]")
log_admin_private("[key_name(usr)][msg]")
return
if(istype(C))
owner = C
owner.holder = src
@@ -66,7 +66,7 @@ GLOBAL_PROTECT(admin_datums)
return FALSE //nice try trialmin
/*
checks if usr is an admin with at least ONE of the flags in rights_required. (Note, they don't need all the flags)
checks if usr is an admin with at least ONE of the flags_1 in rights_required. (Note, they don't need all the flags_1)
if rights_required == 0, then it simply checks if they are an admin.
if it doesn't return 1 and show_msg=1 it will prints a message explaining why the check has failed
generally it would be used like so:
@@ -84,7 +84,7 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
return 1
else
if(show_msg)
to_chat(usr, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>")
to_chat(usr, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags_1:[rights2text(rights_required," ")].</font>")
return 0
//probably a bit iffy - will hopefully figure out a better solution
+1 -1
View File
@@ -77,7 +77,7 @@
if (!SSipintel.enabled)
return
var/list/http[] = world.Export("http://[config.ipintel_domain]/check.php?ip=[ip]&contact=[config.ipintel_email]&format=json&flags=f")
var/list/http[] = world.Export("http://[config.ipintel_domain]/check.php?ip=[ip]&contact=[config.ipintel_email]&format=json&flags_1=f")
if (http)
var/status = text2num(http["STATUS"])
@@ -86,7 +86,7 @@
admin_id = text2num(query_get_admin.item[1])
if(new_admin)
var/datum/DBQuery/query_add_admin = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin")]` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
var/datum/DBQuery/query_add_admin = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin")]` (`id`, `ckey`, `rank`, `level`, `flags_1`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
if(!query_add_admin.warn_execute())
return
var/datum/DBQuery/query_add_admin_log = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
@@ -119,7 +119,7 @@
if(!adm_ckey || !istext(adm_ckey) || !isnum(new_permission))
return
var/datum/DBQuery/query_get_perms = SSdbcore.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
var/datum/DBQuery/query_get_perms = SSdbcore.NewQuery("SELECT id, flags_1 FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
if(!query_get_perms.warn_execute())
return
@@ -130,7 +130,7 @@
if(!admin_id)
return
var/datum/DBQuery/query_change_perms = SSdbcore.NewQuery("UPDATE `[format_table_name("admin")]` SET flags = [new_permission] WHERE id = [admin_id]")
var/datum/DBQuery/query_change_perms = SSdbcore.NewQuery("UPDATE `[format_table_name("admin")]` SET flags_1 = [new_permission] WHERE id = [admin_id]")
if(!query_change_perms.warn_execute())
return
var/datum/DBQuery/query_change_perms_log = SSdbcore.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edit permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
+1 -1
View File
@@ -410,7 +410,7 @@
H.equip_to_slot_or_del(I, slot_w_uniform)
qdel(olduniform)
if(droptype == "Yes")
I.flags |= NODROP
I.flags_1 |= NODROP_1
else
to_chat(H, "You're not kawaii enough for this.")
@@ -3,8 +3,8 @@
/proc/_abs(A)
return abs(A)
/*/proc/_animate(atom/A, set_vars, time = 10, loop = 1, easing = LINEAR_EASING, flags = null)
animate(A, set_vars, time, loop, easing, flags)
/*/proc/_animate(atom/A, set_vars, time = 10, loop = 1, easing = LINEAR_EASING, flags_1 = null)
animate(A, set_vars, time, loop, easing, flags_1)
Borked. If anyone wants to fix this be my guest.*/
/proc/_acrccos(A)
@@ -112,8 +112,8 @@
/proc/_range(Dist, Center = usr)
return range(Dist, Center)
/proc/_regex(pattern, flags)
return regex(pattern, flags)
/proc/_regex(pattern, flags_1)
return regex(pattern, flags_1)
/proc/_REGEX_QUOTE(text)
return REGEX_QUOTE(text)
+1 -1
View File
@@ -59,7 +59,7 @@ GLOBAL_VAR_INIT(highlander, FALSE)
W.access += get_all_centcom_access()
W.assignment = "Highlander"
W.registered_name = real_name
W.flags |= NODROP
W.flags_1 |= NODROP_1
W.update_label(real_name)
equip_to_slot_or_del(W, slot_wear_id)