Bug fixes galore

This commit is contained in:
Markolie
2015-03-01 20:35:07 +01:00
parent 23da335c32
commit d7a2559065
18 changed files with 118 additions and 94 deletions
+7 -7
View File
@@ -49,21 +49,21 @@ proc/admin_proc()
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
*/
/proc/check_rights(rights_required, show_msg=1)
if(usr && usr.client)
/proc/check_rights(rights_required, show_msg=1, var/mob/user = usr)
if(user && user.client)
if(rights_required)
if(usr.client.holder)
if(rights_required & usr.client.holder.rights)
if(user.client.holder)
if(rights_required & user.client.holder.rights)
return 1
else
if(show_msg)
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>"
user << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
else
if(usr.client.holder)
if(user.client.holder)
return 1
else
if(show_msg)
usr << "<font color='red'>Error: You are not an admin.</font>"
user << "<font color='red'>Error: You are not an admin.</font>"
return 0
//probably a bit iffy - will hopefully figure out a better solution
+2
View File
@@ -500,6 +500,8 @@ datum/preferences
HTML += " <font color=green>\[Yes]</font>"
else
HTML += " <font color=red>\[No]</font>"
if(job.alt_titles)
HTML += "<br><b><a class='white' href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></b></td></tr>"
HTML += "</a></td></tr>"
continue
/*
@@ -6,11 +6,11 @@
if(I == r_store)
r_store = null
update_inv_pockets(0)
update_inv_pockets()
else if(I == l_store)
l_store = null
update_inv_pockets(0)
update_inv_pockets()
/mob/living/carbon/alien/humanoid/attack_ui(slot_id)
var/obj/item/W = get_active_hand()
@@ -118,7 +118,7 @@
wear_suit = null
if(I.flags_inv & HIDEJUMPSUIT)
update_inv_w_uniform()
update_inv_wear_suit(0)
update_inv_wear_suit()
else if(I == w_uniform)
if(r_store)
unEquip(r_store, 1) //Again, makes sense for pockets to drop.
@@ -129,69 +129,69 @@
if(belt)
unEquip(belt)
w_uniform = null
update_inv_w_uniform(0)
update_inv_w_uniform()
else if(I == gloves)
gloves = null
update_inv_gloves(0)
update_inv_gloves()
else if(I == glasses)
glasses = null
update_inv_glasses(0)
update_inv_glasses()
else if(I == head)
head = null
if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR)
update_hair(0) //rebuild hair
update_inv_head(0)
update_hair() //rebuild hair
update_inv_head()
else if(I == r_ear)
r_ear = null
update_inv_ears(0)
update_inv_ears()
else if (I == l_ear)
l_ear = null
update_inv_ears(0)
update_inv_ears()
else if(I == shoes)
shoes = null
update_inv_shoes(0)
update_inv_shoes()
else if(I == belt)
belt = null
update_inv_belt(0)
update_inv_belt()
else if(I == wear_mask)
wear_mask = null
if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR)
update_hair(0) //rebuild hair
update_hair() //rebuild hair
if(internal)
if(internals)
internals.icon_state = "internal0"
internal = null
update_inv_wear_mask(0)
update_inv_wear_mask()
else if(I == wear_id)
wear_id = null
update_inv_wear_id(0)
update_inv_wear_id()
else if(I == wear_pda)
wear_pda = null
update_inv_wear_pda(0)
update_inv_wear_pda()
else if(I == r_store)
r_store = null
update_inv_pockets(0)
update_inv_pockets()
else if(I == l_store)
l_store = null
update_inv_pockets(0)
update_inv_pockets()
else if(I == s_store)
s_store = null
update_inv_s_store(0)
update_inv_s_store()
else if(I == back)
back = null
update_inv_back(0)
update_inv_back()
else if(I == handcuffed)
handcuffed = null
update_inv_handcuffed(1)
update_inv_handcuffed()
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed(0)
update_inv_legcuffed()
else if(I == r_hand)
r_hand = null
update_inv_r_hand(0)
update_inv_r_hand()
else if(I == l_hand)
l_hand = null
update_inv_l_hand(0)
update_inv_l_hand()
update_action_buttons()
+1 -1
View File
@@ -13,7 +13,7 @@
return STATUS_CLOSE // By default no mob can do anything with NanoUI
/mob/dead/observer/can_use_topic()
if(check_rights(R_ADMIN, 0))
if(check_rights(R_ADMIN, 0, src))
return STATUS_INTERACTIVE // Admins are more equal
return STATUS_UPDATE // Ghosts can view updates