mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Resolves issue 499. Blood runes are now totally invisible to AIs.
Created defines for disabilities and sdisabilities bitflags. Thos areas of code really need attention. Why are there so many blind variables/flags D= disability bitflags are located in setup.dm Handcuff overlays now update when beepsky/ed-209s cuff you. Resolves issue 628. Took a stab at tidying up handle_regular_hud_updates() for humans. If it's all working perfectly as it appears to be I'll start doing the same for other mobs. Whomever started 'fixing' this and then just abandoned it with redundant and heavily-broken code should be ashamed :[ It was/is in a real sorry state. Resolves issue 617. Shades can no longer be weakened (stunbatons etc). Fixed an issue with one of the antag deaf-sting/rune/whatever-it-was-I-forget causing nearsightedness rather than deafness :P git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3985 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -643,16 +643,19 @@ datum
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.wear_mask)
|
||||
del (H.wear_mask)
|
||||
H.update_inv_wear_mask()
|
||||
H << "\red Your mask melts away but protects you from the acid!"
|
||||
return
|
||||
if(H.head)
|
||||
del (H.head)
|
||||
H.update_inv_head()
|
||||
H << "\red Your helmet melts into uselessness but protects you from the acid!"
|
||||
return
|
||||
if(istype(M, /mob/living/carbon/monkey))
|
||||
else if(istype(M, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/MK = M
|
||||
if(MK.wear_mask)
|
||||
del (MK.wear_mask)
|
||||
MK.update_inv_wear_mask()
|
||||
MK << "\red Your mask melts away but protects you from the acid!"
|
||||
return
|
||||
if(!M.unacidable)
|
||||
@@ -662,6 +665,7 @@ datum
|
||||
if(affecting)
|
||||
if(affecting.take_damage(25, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.status_flags |= DISFIGURED
|
||||
H.emote("scream")
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl
|
||||
@@ -704,6 +708,7 @@ datum
|
||||
if(H.head)
|
||||
if(prob(15))
|
||||
del(H.head)
|
||||
H.update_inv_head()
|
||||
H << "\red Your helmet melts from the acid!"
|
||||
else
|
||||
H << "\red Your helmet protects you from the acid!"
|
||||
@@ -719,6 +724,7 @@ datum
|
||||
var/mob/living/carbon/monkey/MK = M
|
||||
if(MK.wear_mask)
|
||||
del (MK.wear_mask)
|
||||
MK.update_inv_wear_mask()
|
||||
MK << "\red Your mask melts away but protects you from the acid!"
|
||||
return
|
||||
if(!MK.unacidable)
|
||||
@@ -731,6 +737,7 @@ datum
|
||||
if(affecting.take_damage(15, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.emote("scream")
|
||||
H.status_flags |= DISFIGURED
|
||||
else
|
||||
M.take_organ_damage(min(15, volume * 4))
|
||||
|
||||
@@ -1259,8 +1266,8 @@ datum
|
||||
M.sdisabilities = 0
|
||||
M.eye_blurry = 0
|
||||
M.eye_blind = 0
|
||||
M.disabilities &= ~1
|
||||
M.sdisabilities &= ~1
|
||||
// M.disabilities &= ~NEARSIGHTED //doesn't even do anythig cos of the disabilities = 0 bit
|
||||
// M.sdisabilities &= ~BLIND //doesn't even do anythig cos of the sdisabilities = 0 bit
|
||||
M.SetWeakened(0)
|
||||
M.SetStunned(0)
|
||||
M.SetParalysis(0)
|
||||
@@ -1368,7 +1375,7 @@ datum
|
||||
if(!M) M = holder.my_atom
|
||||
M.eye_blurry = max(M.eye_blurry-5 , 0)
|
||||
M.eye_blind = max(M.eye_blind-5 , 0)
|
||||
M.disabilities &= ~1
|
||||
M.disabilities &= ~NEARSIGHTED
|
||||
M.eye_stat = max(M.eye_stat-5, 0)
|
||||
// M.sdisabilities &= ~1 Replaced by eye surgery
|
||||
..()
|
||||
@@ -2126,7 +2133,7 @@ datum
|
||||
//nothing
|
||||
if(21 to INFINITY)
|
||||
if (prob(data-10))
|
||||
M.disabilities &= ~1
|
||||
M.disabilities &= ~NEARSIGHTED
|
||||
data++
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -95,9 +95,9 @@
|
||||
if(M.glasses == src)
|
||||
M.eye_blind = 3
|
||||
M.eye_blurry = 5
|
||||
M.disabilities |= 1
|
||||
M.disabilities |= NEARSIGHTED
|
||||
spawn(100)
|
||||
M.disabilities &= ~1
|
||||
M.disabilities &= ~NEARSIGHTED
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete
|
||||
|
||||
@@ -71,23 +71,23 @@
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
proc/handle_disabilities()
|
||||
if (disabilities & 2)
|
||||
if (disabilities & EPILEPSY)
|
||||
if ((prob(1) && paralysis < 10))
|
||||
src << "\red You have a seizure!"
|
||||
Paralyse(10)
|
||||
if (disabilities & 4)
|
||||
if (disabilities & COUGHING)
|
||||
if ((prob(5) && paralysis <= 1))
|
||||
drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (disabilities & 8)
|
||||
if (disabilities & TOURETTES)
|
||||
if ((prob(10) && paralysis <= 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
emote("twitch")
|
||||
return
|
||||
if (disabilities & 16)
|
||||
if (disabilities & NERVOUS)
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & 1) //disabled-blind, doesn't get better on its own
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
@@ -421,7 +421,7 @@
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(sdisabilities & 4) //disabled-deaf, doesn't get better on its own
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
@@ -501,7 +501,7 @@
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & 1)
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
|
||||
@@ -64,15 +64,9 @@
|
||||
//TODO
|
||||
wear_suit.screen_loc = ui_alien_oclothing
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
if (handcuffed)
|
||||
handcuffed.loc = loc
|
||||
handcuffed.layer = initial(handcuffed.layer)
|
||||
handcuffed = null
|
||||
if ((l_hand || r_hand))
|
||||
drop_item()
|
||||
hand = !hand
|
||||
drop_item()
|
||||
hand = !hand
|
||||
drop_from_inventory(handcuffed)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
|
||||
overlays_lying[X_SUIT_LAYER] = lying
|
||||
overlays_standing[X_SUIT_LAYER] = standing
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & 1) //disabled-blind, doesn't get better on its own
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
@@ -345,7 +345,7 @@
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(sdisabilities & 4) //disabled-deaf, doesn't get better on its own
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
@@ -426,7 +426,7 @@
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & 1)
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
|
||||
@@ -172,16 +172,16 @@
|
||||
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & 1) //disabled-blind, doesn't get better on its own
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(sdisabilities & 4) //disabled-deaf, doesn't get better on its own
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
@@ -256,7 +256,7 @@
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & 1)
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in view()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.sdisabilities & 1) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -522,22 +522,22 @@
|
||||
|
||||
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
|
||||
/mob/living/carbon/human/proc/get_visible_name()
|
||||
if ((wear_mask && !(wear_mask.see_face))) //Making this work -Sieve
|
||||
if( wear_mask && !wear_mask.see_face ) //Wearing a mask which covers our face, use id-name if possible
|
||||
return get_id_name("Unknown")
|
||||
else
|
||||
var/face_name = get_face_name()
|
||||
var/id_name = get_id_name("")
|
||||
if(id_name && (id_name != face_name))
|
||||
return "[face_name] as ([id_name])"
|
||||
return face_name
|
||||
|
||||
var/face_name = get_face_name()
|
||||
var/id_name = get_id_name("")
|
||||
if(id_name && (id_name != face_name))
|
||||
return "[face_name] as ([id_name])"
|
||||
return face_name
|
||||
|
||||
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
|
||||
/mob/living/carbon/human/proc/get_face_name()
|
||||
var/datum/organ/external/head/head = get_organ("head")
|
||||
if(!head) //no face!
|
||||
var/datum/organ/external/O = get_organ("head")
|
||||
|
||||
if( (status_flags&DISFIGURED) || (O.brutestate+O.burnstate)>2 ) //disfigured. use id-name if possible
|
||||
return "Unknown"
|
||||
else
|
||||
return "[real_name]"
|
||||
return real_name
|
||||
|
||||
//gets name from ID or PDA itself, ID inside PDA doesn't matter
|
||||
//Useful when player is being seen by other mobs
|
||||
|
||||
@@ -75,8 +75,7 @@
|
||||
//Update our name based on whether our face is obscured/disfigured
|
||||
name = get_visible_name() //TODO: this was broken by the dismemberment revert ~Carn
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
handle_regular_hud_updates()
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
@@ -111,7 +110,7 @@
|
||||
|
||||
|
||||
proc/handle_disabilities()
|
||||
if (disabilities & 2)
|
||||
if (disabilities & EPILEPSY)
|
||||
if ((prob(1) && paralysis < 1))
|
||||
src << "\red You have a seizure!"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
@@ -120,13 +119,13 @@
|
||||
O.show_message(text("\red <B>[src] starts having a seizure!"), 1)
|
||||
Paralyse(10)
|
||||
make_jittery(1000)
|
||||
if (disabilities & 4)
|
||||
if (disabilities & COUGHING)
|
||||
if ((prob(5) && paralysis <= 1))
|
||||
drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (disabilities & 8)
|
||||
if (disabilities & TOURETTES)
|
||||
if ((prob(10) && paralysis <= 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
@@ -143,7 +142,7 @@
|
||||
pixel_x = old_x
|
||||
pixel_y = old_y
|
||||
return
|
||||
if (disabilities & 16)
|
||||
if (disabilities & NERVOUS)
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
if (getBrainLoss() >= 60 && stat != 2)
|
||||
@@ -747,7 +746,7 @@
|
||||
stat = CONSCIOUS
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & 1) //disabled-blind, doesn't get better on its own
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
@@ -759,7 +758,7 @@
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(sdisabilities & 4) //disabled-deaf, doesn't get better on its own
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
@@ -786,287 +785,188 @@
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
proc/handle_regular_hud_updates()
|
||||
|
||||
if(!client) return 0
|
||||
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
del(hud)
|
||||
|
||||
if (stat == 2 || (XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
if(!druggy)
|
||||
see_invisible = 2
|
||||
client.screen.Remove(hud_used.blurry, hud_used.druggy, hud_used.vimpaired, hud_used.darkMask)
|
||||
|
||||
else if (seer)
|
||||
var/obj/effect/rune/R = locate() in loc
|
||||
if (istype(R) && R.word1 == wordsee && R.word2 == wordhell && R.word3 == wordjoin)
|
||||
see_invisible = 15
|
||||
else
|
||||
seer = 0
|
||||
see_invisible = 0
|
||||
else if (istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
|
||||
switch(wear_mask:mode)
|
||||
if(0)
|
||||
if(client)
|
||||
if( stat == DEAD )
|
||||
sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
see_in_dark = 8
|
||||
if(!druggy) see_invisible = 2
|
||||
if(healths) healths.icon_state = "health7" //DEAD healthmeter
|
||||
else
|
||||
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
switch(mutantrace)
|
||||
if("lizard","metroid")
|
||||
see_in_dark = 3
|
||||
see_invisible = 1
|
||||
else
|
||||
see_in_dark = 2
|
||||
|
||||
if(XRAY in mutations)
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
if(!druggy) see_invisible = 2
|
||||
|
||||
if(seer)
|
||||
var/obj/effect/rune/R = locate() in loc
|
||||
if(R && R.word1 == wordsee && R.word2 == wordhell && R.word3 == wordjoin)
|
||||
see_invisible = 15
|
||||
else
|
||||
see_invisible = 0
|
||||
seer = 0
|
||||
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
|
||||
var/obj/item/clothing/mask/gas/voice/space_ninja/O = wear_mask
|
||||
switch(O.mode)
|
||||
if(0)
|
||||
var/target_list[] = list()
|
||||
for(var/mob/living/target in oview(src))
|
||||
if( target.mind&&(target.mind.special_role||issilicon(target)) )//They need to have a mind.
|
||||
target_list += target
|
||||
if(target_list.len)//Everything else is handled by the ninja mask proc.
|
||||
wear_mask:assess_targets(target_list, src)
|
||||
if (!druggy)
|
||||
see_invisible = 0
|
||||
if(1)
|
||||
see_in_dark = 5
|
||||
if(!druggy)
|
||||
see_invisible = 0
|
||||
if(2)
|
||||
sight |= SEE_MOBS
|
||||
if(!druggy)
|
||||
see_invisible = 2
|
||||
if(3)
|
||||
O.assess_targets(target_list, src)
|
||||
if(!druggy) see_invisible = 0
|
||||
if(1)
|
||||
see_in_dark = 5
|
||||
if(!druggy) see_invisible = 0
|
||||
if(2)
|
||||
sight |= SEE_MOBS
|
||||
if(!druggy) see_invisible = 2
|
||||
if(3)
|
||||
sight |= SEE_TURFS
|
||||
if(!druggy) see_invisible = 0
|
||||
|
||||
if(glasses)
|
||||
if(istype(glasses, /obj/item/clothing/glasses/meson))
|
||||
sight |= SEE_TURFS
|
||||
if(!druggy)
|
||||
see_invisible = 0
|
||||
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/meson))
|
||||
sight |= SEE_TURFS
|
||||
if(!druggy)
|
||||
see_invisible = 0
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/night))
|
||||
see_in_dark = 5
|
||||
if(!druggy)
|
||||
see_invisible = 0
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/thermal))
|
||||
sight |= SEE_MOBS
|
||||
if(!druggy)
|
||||
see_invisible = 2
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/material))
|
||||
sight |= SEE_OBJS
|
||||
if (!druggy)
|
||||
see_invisible = 0
|
||||
|
||||
else if(stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
if (mutantrace == "lizard" || mutantrace == "metroid")
|
||||
see_in_dark = 3
|
||||
see_invisible = 1
|
||||
else if (druggy) // If drugged~
|
||||
see_in_dark = 2
|
||||
//see_invisible regulated by drugs themselves.
|
||||
else
|
||||
see_in_dark = 2
|
||||
|
||||
var/seer = 0
|
||||
var/obj/effect/rune/R = locate() in loc
|
||||
if (istype(R) && R.word1 == wordsee && R.word2 == wordhell && R.word3 == wordjoin)
|
||||
seer = 1
|
||||
if(!seer)
|
||||
see_invisible = 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else if(istype(head, /obj/item/clothing/head/welding)) // wat. This is never fucking called.
|
||||
if(!head:up && tinted_weldhelh)
|
||||
see_in_dark = 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(!druggy) see_invisible = 0
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/night))
|
||||
see_in_dark = 5
|
||||
if(!druggy) see_invisible = 0
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/thermal))
|
||||
sight |= SEE_MOBS
|
||||
if(!druggy) see_invisible = 2
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/material))
|
||||
sight |= SEE_OBJS
|
||||
if(!druggy) see_invisible = 0
|
||||
|
||||
/* HUD shit goes here, as long as it doesn't modify sight flags */
|
||||
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
|
||||
if(istype(glasses, /obj/item/clothing/glasses/hud/health))
|
||||
if(client)
|
||||
glasses:process_hud(src)
|
||||
if (!druggy)
|
||||
see_invisible = 0
|
||||
|
||||
if(istype(glasses, /obj/item/clothing/glasses/hud/security))
|
||||
if(client)
|
||||
glasses:process_hud(src)
|
||||
if (!druggy)
|
||||
see_invisible = 0
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses))
|
||||
see_in_dark = 1
|
||||
if(istype(glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
var/obj/item/clothing/glasses/sunglasses/sechud/O = glasses
|
||||
if(O.hud) O.hud.process_hud(src)
|
||||
if(!druggy) see_invisible = 0
|
||||
|
||||
if(istype(glasses, /obj/item/clothing/glasses/sunglasses))
|
||||
see_in_dark = 1
|
||||
if(istype(glasses, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
if(client)
|
||||
if(glasses:hud)
|
||||
glasses:hud:process_hud(src)
|
||||
if (!druggy)
|
||||
see_invisible = 0
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/hud))
|
||||
var/obj/item/clothing/glasses/hud/health/O = glasses
|
||||
|
||||
/*
|
||||
if (istype(glasses, /obj/item/clothing/glasses))
|
||||
sight = glasses.vision_flags
|
||||
see_in_dark = 2 + glasses.darkness_view
|
||||
see_invisible = invisa_view
|
||||
if(istype(O, /obj/item/clothing/glasses/hud/health))
|
||||
O.process_hud(src)
|
||||
if(!druggy) see_invisible = 0
|
||||
|
||||
if(istype(glasses, /obj/item/clothing/glasses/hud))
|
||||
if(client)
|
||||
glasses:process_hud(src)
|
||||
*/
|
||||
//Should finish this up later
|
||||
else if(istype(O, /obj/item/clothing/glasses/hud/security))
|
||||
O.process_hud(src)
|
||||
if(!druggy) see_invisible = 0
|
||||
|
||||
if(sleep && !hal_crit) sleep.icon_state = "sleep[sleeping]" //used?
|
||||
|
||||
|
||||
if (sleep && !hal_crit) sleep.icon_state = text("sleep[]", sleeping)
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health - halloss)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
healths.icon_state = "health5"
|
||||
if(healths)
|
||||
switch(hal_screwyhud)
|
||||
if(1) healths.icon_state = "health6"
|
||||
if(2) healths.icon_state = "health7"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
if(hal_screwyhud == 1)
|
||||
healths.icon_state = "health6"
|
||||
if(hal_screwyhud == 2)
|
||||
healths.icon_state = "health7"
|
||||
switch(health - halloss)
|
||||
if(100 to INFINITY) healths.icon_state = "health0"
|
||||
if(80 to 100) healths.icon_state = "health1"
|
||||
if(60 to 80) healths.icon_state = "health2"
|
||||
if(40 to 60) healths.icon_state = "health3"
|
||||
if(20 to 40) healths.icon_state = "health4"
|
||||
if(0 to 20) healths.icon_state = "health5"
|
||||
else healths.icon_state = "health6"
|
||||
|
||||
if (nutrition_icon)
|
||||
switch(nutrition)
|
||||
if(450 to INFINITY)
|
||||
nutrition_icon.icon_state = "nutrition0"
|
||||
if(350 to 450)
|
||||
nutrition_icon.icon_state = "nutrition1"
|
||||
if(250 to 350)
|
||||
nutrition_icon.icon_state = "nutrition2"
|
||||
if(150 to 250)
|
||||
nutrition_icon.icon_state = "nutrition3"
|
||||
if(nutrition_icon)
|
||||
switch(nutrition)
|
||||
if(450 to INFINITY) nutrition_icon.icon_state = "nutrition0"
|
||||
if(350 to 450) nutrition_icon.icon_state = "nutrition1"
|
||||
if(250 to 350) nutrition_icon.icon_state = "nutrition2"
|
||||
if(150 to 250) nutrition_icon.icon_state = "nutrition3"
|
||||
else nutrition_icon.icon_state = "nutrition4"
|
||||
|
||||
if(pressure)
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space)||istype(wear_suit, /obj/item/clothing/suit/armor/captain))
|
||||
pressure.icon_state = "pressure0"
|
||||
else
|
||||
nutrition_icon.icon_state = "nutrition4"
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
switch(environment.return_pressure())
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY) pressure.icon_state = "pressure2"
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE) pressure.icon_state = "pressure1"
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE) pressure.icon_state = "pressure0"
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE) pressure.icon_state = "pressure-1"
|
||||
else pressure.icon_state = "pressure-2"
|
||||
|
||||
if (pressure)
|
||||
if(pullin)
|
||||
if(pulling) pullin.icon_state = "pull1"
|
||||
else pullin.icon_state = "pull0"
|
||||
// if(rest) //Not used with new UI
|
||||
// if(resting || lying || sleeping) rest.icon_state = "rest1"
|
||||
// else rest.icon_state = "rest0"
|
||||
if(toxin)
|
||||
if(hal_screwyhud == 4 || toxins_alert) toxin.icon_state = "tox1"
|
||||
else toxin.icon_state = "tox0"
|
||||
if(oxygen)
|
||||
if(hal_screwyhud == 3 || oxygen_alert) oxygen.icon_state = "oxy1"
|
||||
else oxygen.icon_state = "oxy0"
|
||||
if(fire)
|
||||
if(fire_alert) fire.icon_state = "fire1"
|
||||
else fire.icon_state = "fire0"
|
||||
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space)||istype(wear_suit, /obj/item/clothing/suit/armor/captain))
|
||||
pressure.icon_state = "pressure0"
|
||||
if(bodytemp)
|
||||
switch(bodytemperature) //310.055 optimal body temp
|
||||
if(370 to INFINITY) bodytemp.icon_state = "temp4"
|
||||
if(350 to 370) bodytemp.icon_state = "temp3"
|
||||
if(335 to 350) bodytemp.icon_state = "temp2"
|
||||
if(320 to 335) bodytemp.icon_state = "temp1"
|
||||
if(300 to 320) bodytemp.icon_state = "temp0"
|
||||
if(295 to 300) bodytemp.icon_state = "temp-1"
|
||||
if(280 to 295) bodytemp.icon_state = "temp-2"
|
||||
if(260 to 280) bodytemp.icon_state = "temp-3"
|
||||
else bodytemp.icon_state = "temp-4"
|
||||
|
||||
if(blind)
|
||||
if(blinded) blind.layer = 18
|
||||
else blind.layer = 0
|
||||
|
||||
if( disabilities & NEARSIGHTED && !istype(glasses, /obj/item/clothing/glasses/regular) )
|
||||
client.screen += hud_used.vimpaired
|
||||
if(eye_blurry) client.screen += hud_used.blurry
|
||||
if(druggy) client.screen += hud_used.druggy
|
||||
|
||||
if( istype(head, /obj/item/clothing/head/welding) )
|
||||
var/obj/item/clothing/head/welding/O = head
|
||||
if(!O.up && tinted_weldhelh)
|
||||
client.screen += hud_used.darkMask
|
||||
|
||||
if(eye_stat > 20)
|
||||
if(eye_stat > 30) client.screen += hud_used.darkMask
|
||||
else client.screen += hud_used.vimpaired
|
||||
|
||||
if(machine)
|
||||
if(!machine.check_eye(src)) reset_view(null)
|
||||
else
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
switch(environment.return_pressure())
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
pressure.icon_state = "pressure2"
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
pressure.icon_state = "pressure1"
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
|
||||
pressure.icon_state = "pressure0"
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
|
||||
pressure.icon_state = "pressure-1"
|
||||
else
|
||||
pressure.icon_state = "pressure-2"
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
if(rest) rest.icon_state = "rest[(resting || lying || sleeping) ? 1 : 0]"
|
||||
|
||||
|
||||
if (toxin || hal_screwyhud == 4) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen || hal_screwyhud == 3) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]" //NOTE: INVESTIGATE NUKE BURNINGS
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
if(bodytemp)
|
||||
switch(bodytemperature) //310.055 optimal body temp
|
||||
if(370 to INFINITY)
|
||||
bodytemp.icon_state = "temp4"
|
||||
if(350 to 370)
|
||||
bodytemp.icon_state = "temp3"
|
||||
if(335 to 350)
|
||||
bodytemp.icon_state = "temp2"
|
||||
if(320 to 335)
|
||||
bodytemp.icon_state = "temp1"
|
||||
if(300 to 320)
|
||||
bodytemp.icon_state = "temp0"
|
||||
if(295 to 300)
|
||||
bodytemp.icon_state = "temp-1"
|
||||
if(280 to 295)
|
||||
bodytemp.icon_state = "temp-2"
|
||||
if(260 to 280)
|
||||
bodytemp.icon_state = "temp-3"
|
||||
else
|
||||
bodytemp.icon_state = "temp-4"
|
||||
|
||||
if(!client) return 0 //Wish we did not need these
|
||||
client.screen.Remove(hud_used.blurry, hud_used.druggy, hud_used.vimpaired, hud_used.darkMask)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if(blinded)
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if( disabilities & 1 && !istype(glasses, /obj/item/clothing/glasses/regular) )
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if(eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
|
||||
if(druggy)
|
||||
client.screen += hud_used.druggy
|
||||
|
||||
if( istype(head, /obj/item/clothing/head/welding) )
|
||||
if(!head:up && tinted_weldhelh)
|
||||
client.screen += hud_used.darkMask
|
||||
|
||||
if(eye_stat > 20)
|
||||
if((eye_stat > 30))
|
||||
client.screen += hud_used.darkMask
|
||||
else
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
if(!client.adminobs) reset_view(null)
|
||||
return 1
|
||||
|
||||
proc/handle_random_events()
|
||||
/* // probably stupid -- Doohl
|
||||
if (prob(1) && prob(2))
|
||||
spawn(0)
|
||||
emote("sneeze")
|
||||
return
|
||||
*/
|
||||
|
||||
// Puke if toxloss is too high
|
||||
if(!stat)
|
||||
if (getToxLoss() >= 45 && nutrition > 20)
|
||||
|
||||
@@ -521,18 +521,10 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
standing = null
|
||||
|
||||
else
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) ) //TODO
|
||||
if (handcuffed) //
|
||||
handcuffed.loc = loc //
|
||||
handcuffed.layer = initial(handcuffed.layer) //
|
||||
handcuffed = null //
|
||||
if (l_hand || r_hand) //
|
||||
var/h = hand //
|
||||
hand = 1 //
|
||||
drop_item() //
|
||||
hand = 0 //
|
||||
drop_item() //
|
||||
hand = h //
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
|
||||
drop_from_inventory(handcuffed)
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/t_state
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
// Mute disability
|
||||
if (src.sdisabilities & 2)
|
||||
if (src.sdisabilities & MUTE)
|
||||
return
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.sdisabilities & 1) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -461,9 +461,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if (src.sdisabilities & 1)
|
||||
if (src.sdisabilities & BLIND)
|
||||
src.blinded = 1
|
||||
if (src.sdisabilities & 4)
|
||||
if (src.sdisabilities & DEAF)
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.sdisabilities & 1) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -81,23 +81,23 @@
|
||||
|
||||
proc/handle_disabilities()
|
||||
|
||||
if (disabilities & 2)
|
||||
if (disabilities & EPILEPSY)
|
||||
if ((prob(1) && paralysis < 10))
|
||||
src << "\red You have a seizure!"
|
||||
Paralyse(10)
|
||||
if (disabilities & 4)
|
||||
if (disabilities & COUGHING)
|
||||
if ((prob(5) && paralysis <= 1))
|
||||
drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (disabilities & 8)
|
||||
if (disabilities & TOURETTES)
|
||||
if ((prob(10) && paralysis <= 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
emote("twitch")
|
||||
return
|
||||
if (disabilities & 16)
|
||||
if (disabilities & NERVOUS)
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
@@ -426,16 +426,16 @@
|
||||
stat = CONSCIOUS
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & 1) //disabled-blind, doesn't get better on its own
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(sdisabilities & 4) //disabled-deaf, doesn't get better on its own
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
@@ -554,7 +554,7 @@
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & 1)
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
|
||||
@@ -242,6 +242,7 @@
|
||||
buckled = initial(src.buckled)
|
||||
handcuffed = initial(src.handcuffed)
|
||||
stat = CONSCIOUS
|
||||
regenerate_icons()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ var/list/department_radio_keys = list(
|
||||
return
|
||||
|
||||
// Mute disability
|
||||
if (sdisabilities & 2)
|
||||
if (sdisabilities & MUTE)
|
||||
return
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
|
||||
@@ -28,14 +28,9 @@
|
||||
verbs += /mob/living/silicon/ai/proc/show_laws_verb
|
||||
|
||||
if (istype(loc, /turf))
|
||||
verbs += /mob/living/silicon/ai/proc/ai_call_shuttle
|
||||
verbs += /mob/living/silicon/ai/proc/ai_camera_track
|
||||
verbs += /mob/living/silicon/ai/proc/ai_camera_list
|
||||
//Added ai_network_change by Mord_Sith
|
||||
verbs += /mob/living/silicon/ai/proc/ai_network_change
|
||||
verbs += /mob/living/silicon/ai/proc/ai_statuschange
|
||||
//Hologram verb./N
|
||||
verbs += /mob/living/silicon/ai/proc/ai_hologram_change
|
||||
verbs.Add(/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \
|
||||
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change)
|
||||
|
||||
if(!safety)//Only used by AIize() to successfully spawn an AI.
|
||||
if (!B)//If there is no player/brain inside.
|
||||
@@ -61,12 +56,6 @@
|
||||
spawn(0)
|
||||
ainame(src)
|
||||
|
||||
if(client)
|
||||
for(var/obj/effect/rune/rune in world)
|
||||
var/image/blood = image('blood.dmi', loc = rune, icon_state = "floor[rand(1,7)]")
|
||||
blood.override = 1
|
||||
client.images += blood
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.sdisabilities & 1) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/silicon/ai/Login()
|
||||
for(var/obj/effect/rune/rune in world)
|
||||
var/image/blood = image('blood.dmi', loc = rune, icon_state = "floor[rand(1,7)]")
|
||||
var/image/blood = image(loc = rune)
|
||||
blood.override = 1
|
||||
client.images += blood
|
||||
..()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if(((usr.sdisabilities & 1) || usr.blinded || usr.stat) && !(istype(usr,/mob/dead/observer/)))
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -128,9 +128,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.sdisabilities & 1))
|
||||
if ((src.sdisabilities & BLIND))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & 4))
|
||||
if ((src.sdisabilities & DEAF))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
@@ -259,7 +259,7 @@
|
||||
else
|
||||
src.blind.layer = 0
|
||||
|
||||
if (src.disabilities & 1)
|
||||
if (src.disabilities & NEARSIGHTED)
|
||||
src.client.screen += src.hud_used.vimpaired
|
||||
|
||||
if (src.eye_blurry)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
max_tox = 0
|
||||
speed = -1
|
||||
stop_automated_movement = 1
|
||||
status_flags = 0
|
||||
|
||||
|
||||
Life()
|
||||
|
||||
@@ -43,22 +43,22 @@
|
||||
/mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||
if(!client) return
|
||||
if (type)
|
||||
if ((type & 1 && (sdisabilities & 1 || (blinded || paralysis))))//Vision related
|
||||
if(type & 1 && (sdisabilities & BLIND || blinded || paralysis) )//Vision related
|
||||
if (!( alt ))
|
||||
return
|
||||
else
|
||||
msg = alt
|
||||
type = alt_type
|
||||
if ((type & 2 && (sdisabilities & 4 || ear_deaf)))//Hearing related
|
||||
if (type & 2 && (sdisabilities & DEAF || ear_deaf))//Hearing related
|
||||
if (!( alt ))
|
||||
return
|
||||
else
|
||||
msg = alt
|
||||
type = alt_type
|
||||
if ((type & 1 && sdisabilities & 1))
|
||||
if ((type & 1 && sdisabilities & BLIND))
|
||||
return
|
||||
// Added voice muffling for Issue 41.
|
||||
if (stat == 1 || sleeping > 0)
|
||||
if(stat == UNCONSCIOUS || sleeping > 0)
|
||||
src << "<I>... You can almost hear someone talking ...</I>"
|
||||
else
|
||||
src << msg
|
||||
|
||||
Reference in New Issue
Block a user