Sanity check for jobban_isbanned() to prevent any antag jobban resulting in a ban from any antag jobs that may be added or renamed or whatever.

Tidied human/examine.dm a bit more.
Can no longer examine mobs while unconscious/blind/whatever. A more extensive fix is in the works.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3313 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-03-16 22:56:29 +00:00
parent bf061913c7
commit 6ba52d7a0d
6 changed files with 50 additions and 24 deletions

View File

@@ -14,8 +14,8 @@ var
//returns a reason if M is banned from rank, returns 0 otherwise //returns a reason if M is banned from rank, returns 0 otherwise
/proc/jobban_isbanned(mob/M, rank) /proc/jobban_isbanned(mob/M, rank)
if(_jobban_isbanned(M, rank)) return "Reason Unspecified" //for old jobban if(M && rank)
if(M) if(_jobban_isbanned(M, rank)) return "Reason Unspecified" //for old jobban
if (guest_jobbans(rank)) if (guest_jobbans(rank))
if(config.guest_jobban && IsGuestKey(M.key)) if(config.guest_jobban && IsGuestKey(M.key))
return "Guest Job-ban" return "Guest Job-ban"

View File

@@ -1,6 +1,11 @@
/mob/living/carbon/human/examine() /mob/living/carbon/human/examine()
set src in oview() set src in oview()
if(!usr || !src) return
if((usr.sdisabilities & 1) || usr.blinded || usr.stat)
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/skipgloves = 0 var/skipgloves = 0
var/skipsuitstorage = 0 var/skipsuitstorage = 0
var/skipjumpsuit = 0 var/skipjumpsuit = 0
@@ -145,12 +150,12 @@
//ID //ID
if (src.wear_id) if (src.wear_id)
var/id var/id
if(istype(src:wear_id, /obj/item/device/pda)) if(istype(src.wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = src:wear_id var/obj/item/device/pda/pda = src.wear_id
id = pda.owner id = pda.owner
else else if(istype(src.wear_id, /obj/item/weapon/card/id)) //just in case something other than a PDA/ID card somehow gets in the ID slot :[
id = src.wear_id.registered id = src.wear_id.registered
if (id != src.real_name && in_range(src, usr) && prob(10)) if (id && (id != src.real_name) && (get_dist(src, usr) <= 1) && prob(10))
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[src.wear_id] \a [src.wear_id] yet something doesn't seem right...</span>\n" msg += "<span class='warning'>[t_He] [t_is] wearing \icon[src.wear_id] \a [src.wear_id] yet something doesn't seem right...</span>\n"
else else
msg += "[t_He] [t_is] wearing \icon[src.wear_id] \a [src.wear_id].\n" msg += "[t_He] [t_is] wearing \icon[src.wear_id] \a [src.wear_id].\n"
@@ -158,38 +163,37 @@
//Jitters //Jitters
if (src.is_jittery) if (src.is_jittery)
if(src.jitteriness >= 300) if(src.jitteriness >= 300)
msg += "<span class='warning'>[t_He] [t_is] convulsing violently!</span>\n" msg += "<span class='warning'><B>[t_He] [t_is] convulsing violently!</B></span>\n"
else if(src.jitteriness >= 200) else if(src.jitteriness >= 200)
msg += "<span class='warning'>[t_He] [t_is] extremely jittery.</span>\n" msg += "<span class='warning'>[t_He] [t_is] extremely jittery.</span>\n"
else if(src.jitteriness >= 100) else if(src.jitteriness >= 100)
msg += "<span class='warning'>[t_He] [t_is] twitching ever so slightly.</span>\n" msg += "<span class='warning'>[t_He] [t_is] twitching ever so slightly.</span>\n"
if (src.suiciding == 1) if (src.suiciding)
msg += "<span class='warning'>[t_He] [t_has] bitten off [t_his] own tongue and suffered major bloodloss!</span>\n" msg += "<span class='warning'>[t_He] [t_has] bitten off [t_his] own tongue and [t_has] suffered major bloodloss!</span>\n"
if (src.stat == DEAD || (changeling && changeling.changeling_fakedeath == 1)) if (src.stat == DEAD || (changeling && (changeling.changeling_fakedeath == 1)))
msg += "<span class='deadsay'>[t_He] [t_is] limp and unresponsive" msg += "<span class='deadsay'>[t_He] [t_is] limp and unresponsive; there are no signs of life...</span>\n"
//Carn: yes I'm a pedant, you aren't seeing their lifeless eyes unless you can see their eyes in the first place.
if(!skipeyes)
msg += ", with a dull lifeless look in [t_his] eyes...</span>\n"
else
msg += "...</span>\n"
else else
msg += "<span class='warning'>" msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < 30) var/temp = src.getBruteLoss() //no need to calculate each of these twice
if(temp)
if (temp < 30)
msg += "[t_He] [t_has] minor bruising.\n" msg += "[t_He] [t_has] minor bruising.\n"
else else
msg += "<B>[t_He] [t_has] severe bruising!</B>\n" msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
if (src.getFireLoss()) temp = src.getFireLoss()
if (src.getFireLoss() < 30) if (temp)
if (temp < 30)
msg += "[t_He] [t_has] minor burns.\n" msg += "[t_He] [t_has] minor burns.\n"
else else
msg += "<B>[t_He] [t_has] severe burns!</B>\n" msg += "<B>[t_He] [t_has] severe burns!</B>\n"
if (src.getCloneLoss()) temp = src.getCloneLoss()
if (src.getCloneLoss() < 30) if (temp)
if (temp < 30)
msg += "[t_He] [t_has] minor genetic deformities.\n" msg += "[t_He] [t_has] minor genetic deformities.\n"
else else
msg += "<B>[t_He] [t_has] severe genetic deformities.</B>\n" msg += "<B>[t_He] [t_has] severe genetic deformities.</B>\n"
@@ -202,11 +206,12 @@
else else
msg += "[t_He] [t_is] quite chubby.\n" msg += "[t_He] [t_is] quite chubby.\n"
msg += "</span>"
if (src.stat == UNCONSCIOUS) if (src.stat == UNCONSCIOUS)
msg += "[t_He] [t_is]n't responding to anything around [t_him]; [t_his] eyes are closed as though asleep.\n" msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n"
else if (src.getBrainLoss() >= 60) else if (src.getBrainLoss() >= 60)
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n" msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
msg += "</span>"
if (!src.client) if (!src.client)
msg += "[t_He] [t_has] a vacant, braindead stare...\n" msg += "[t_He] [t_has] a vacant, braindead stare...\n"

View File

@@ -1,6 +1,11 @@
/mob/living/carbon/metroid/examine() /mob/living/carbon/metroid/examine()
set src in oview() set src in oview()
if(!usr || !src) return
if((usr.sdisabilities & 1) || usr.blinded || usr.stat)
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n" var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.stat == DEAD) if (src.stat == DEAD)
msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n" msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n"

View File

@@ -1,6 +1,11 @@
/mob/living/carbon/monkey/examine() /mob/living/carbon/monkey/examine()
set src in oview() set src in oview()
if(!usr || !src) return
if((usr.sdisabilities & 1) || usr.blinded || usr.stat)
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n" var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.handcuffed) if (src.handcuffed)

View File

@@ -1,6 +1,11 @@
/mob/living/silicon/ai/examine() /mob/living/silicon/ai/examine()
set src in oview() set src in oview()
if(!usr || !src) return
if((usr.sdisabilities & 1) || usr.blinded || usr.stat)
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <EM>[src]</EM>!\n" var/msg = "<span class='info'>*---------*\nThis is \icon[src] <EM>[src]</EM>!\n"
if (src.stat == DEAD) if (src.stat == DEAD)
msg += "<span class='deadsay'>It appears to be powered-down.</span>\n" msg += "<span class='deadsay'>It appears to be powered-down.</span>\n"

View File

@@ -1,5 +1,11 @@
/mob/living/silicon/robot/examine() /mob/living/silicon/robot/examine()
set src in oview() set src in oview()
if(!usr || !src) return
if((usr.sdisabilities & 1) || usr.blinded || usr.stat)
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n" var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
msg += "<span class='warning'>" msg += "<span class='warning'>"
if (src.getBruteLoss()) if (src.getBruteLoss())