Merge remote-tracking branch 'upstream/master' into tgport-16569

Conflicts:
	.gitignore
This commit is contained in:
Tigercat2000
2016-04-02 20:29:28 -07:00
139 changed files with 738 additions and 1642 deletions
+1 -1
View File
@@ -203,7 +203,7 @@
var/heard = ""
if(prob(15))
var/list/punctuation = list(",", "!", ".", ";", "?")
var/list/messages = text2list(message, " ")
var/list/messages = splittext(message, " ")
var/R = rand(1, messages.len)
var/heardword = messages[R]
if(copytext(heardword,1, 1) in punctuation)
+1 -1
View File
@@ -102,7 +102,7 @@
. += pick(map[min_char])
message = copytext(message, min_index + 1)
return list2text(.)
return jointext(., "")
#undef AUTOHISS_OFF
#undef AUTOHISS_BASIC
@@ -67,7 +67,7 @@
return
/mob/living/carbon/alien/eyecheck()
/mob/living/carbon/alien/check_eye_prot()
return 2
/mob/living/carbon/alien/updatehealth()
@@ -52,7 +52,6 @@
for(var/mob/O in viewers(src, null))
O.show_message("<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw...", 1)
update_canmove()
if(client) blind.layer = 0
update_icons()
timeofdeath = worldtime2text()
@@ -130,77 +130,4 @@
if(druggy)
druggy = max(druggy-1, 0)
return 1
/mob/living/carbon/alien/humanoid/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
if(nightvision)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
else if(!nightvision)
see_in_dark = 4
see_invisible = 45
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
switch(health)
if(100 to INFINITY)
healths.icon_state = "health0"
if(75 to 100)
healths.icon_state = "health1"
if(50 to 75)
healths.icon_state = "health2"
if(25 to 50)
healths.icon_state = "health3"
if(0 to 25)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if (eye_blurry)
client.screen += global_hud.blurry
if (druggy)
client.screen += global_hud.druggy
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
return 1
@@ -7,7 +7,6 @@
if(!gibbed)
visible_message("<span class='name'>[src]</span> lets out a waning high-pitched cry.")
update_canmove()
if(client) blind.layer = 0
timeofdeath = worldtime2text()
if(mind) mind.store_memory("Time of death: [timeofdeath]", 0)
@@ -85,84 +85,4 @@
if(druggy)
druggy = max(druggy-1, 0)
return 1
/mob/living/carbon/alien/larva/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
if(nightvision)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
else if(!nightvision)
see_in_dark = 4
see_invisible = 45
if(see_override)
see_invisible = see_override
if (healths)
if (stat != 2)
switch(health)
if(25 to INFINITY)
healths.icon_state = "health0"
if(19 to 25)
healths.icon_state = "health1"
if(13 to 19)
healths.icon_state = "health2"
if(7 to 13)
healths.icon_state = "health3"
if(0 to 7)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
if(pullin)
if(pulling)
pullin.icon_state = "pull"
else
pullin.icon_state = "pull0"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if (eye_blurry)
client.screen += global_hud.blurry
if (druggy)
client.screen += global_hud.druggy
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
+21 -1
View File
@@ -36,4 +36,24 @@
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
fire_alert = max(fire_alert, 1)
else
fire_alert = 0
fire_alert = 0
/mob/living/carbon/alien/update_sight()
if(stat == DEAD || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if(stat != DEAD)
sight |= SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
if(nightvision)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
else if(!nightvision)
see_in_dark = 4
see_invisible = 45
if(see_override)
see_invisible = see_override
@@ -6,7 +6,6 @@
container.icon_state = "mmi_dead"
stat = DEAD
if(blind) blind.layer = 0
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
+44 -2
View File
@@ -309,9 +309,51 @@
if(H.w_uniform)
H.w_uniform.add_fingerprint(M)
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0)
. = ..()
var/damage = intensity - check_eye_prot()
if(.)
if(visual)
return
var/obj/item/organ/internal/eyes/E = get_int_organ(/obj/item/organ/internal/eyes)
if(!E)
return
switch(damage)
if(1)
src << "<span class='warning'>Your eyes sting a little.</span>"
if(prob(40)) //waiting on carbon organs
E.damage += 1
if(2)
src << "<span class='warning'>Your eyes burn.</span>"
E.damage += rand(2, 4)
else
src << "Your eyes itch and burn severely!</span>"
E.damage += rand(12, 16)
if(E.damage > E.min_bruised_damage)
eye_blind += damage
eye_blurry += damage * rand(3, 6)
if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2)
if(!(E.status & ORGAN_ROBOT))
src << "<span class='warning'>Your eyes start to burn badly!</span>"
else //snowflake conditions piss me off for the record
src << "<span class='warning'>The flash blinds you!</span>"
else if(E.damage >= E.min_broken_damage)
src << "<span class='warning'>You can't see anything!</span>"
else
src << "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>"
return 1
else if(damage == 0) // just enough protection
if(prob(20))
src << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
/mob/living/carbon/proc/eyecheck()
return 0
/mob/living/carbon/proc/tintcheck()
return 0
@@ -129,7 +129,6 @@
if(!gibbed)
update_canmove()
if(client) blind.layer = 0
timeofdeath = worldtime2text()
med_hud_set_health()
+18 -10
View File
@@ -1100,24 +1100,32 @@
. = ..()
///eyecheck()
///check_eye_prot()
///Returns a number between -1 to 2
/mob/living/carbon/human/eyecheck()
/mob/living/carbon/human/check_eye_prot()
var/number = ..()
if(istype(src.head, /obj/item/clothing/head)) //are they wearing something on their head
var/obj/item/clothing/head/HFP = src.head //if yes gets the flash protection value from that item
if(istype(head, /obj/item/clothing/head)) //are they wearing something on their head
var/obj/item/clothing/head/HFP = head //if yes gets the flash protection value from that item
number += HFP.flash_protect
if(istype(src.glasses, /obj/item/clothing/glasses)) //glasses
var/obj/item/clothing/glasses/GFP = src.glasses
if(istype(glasses, /obj/item/clothing/glasses)) //glasses
var/obj/item/clothing/glasses/GFP = glasses
number += GFP.flash_protect
if(istype(src.wear_mask, /obj/item/clothing/mask)) //mask
var/obj/item/clothing/mask/MFP = src.wear_mask
if(istype(wear_mask, /obj/item/clothing/mask)) //mask
var/obj/item/clothing/mask/MFP = wear_mask
number += MFP.flash_protect
for(var/obj/item/organ/internal/cyberimp/eyes/EFP in src.internal_organs)
for(var/obj/item/organ/internal/cyberimp/eyes/EFP in internal_organs)
number += EFP.flash_protect
return number
/mob/living/carbon/human/check_ear_prot()
if(head && (head.flags & HEADBANGPROTECT))
return 1
if(l_ear && (l_ear.flags & EARBANGPROTECT))
return 1
if(r_ear && (r_ear.flags & EARBANGPROTECT))
return 1
///tintcheck()
///Checks eye covering items for visually impairing tinting, such as welding masks
///Checked in life.dm. 0 & 1 = no impairment, 2 = welding mask overlay, 3 = You can see jack, but you can't see shit.
@@ -1887,4 +1895,4 @@
var/obj/item/clothing/under/U = w_uniform
if(U.accessories)
for(var/obj/item/clothing/accessory/A in U.accessories)
. |= A.GetAccess()
. |= A.GetAccess()
@@ -400,4 +400,4 @@ This function restores all organs.
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
return 1
return 1
@@ -1,30 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
var/global/list/unconscious_overlays = list("1" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage1"),\
"2" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage2"),\
"3" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage3"),\
"4" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage4"),\
"5" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage5"),\
"6" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage6"),\
"7" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage7"),\
"8" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage8"),\
"9" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage9"),\
"10" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage10"))
var/global/list/oxyloss_overlays = list("1" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay1"),\
"2" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay2"),\
"3" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay3"),\
"4" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay4"),\
"5" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay5"),\
"6" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay6"),\
"7" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay7"))
var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay1"),\
"2" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay2"),\
"3" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay3"),\
"4" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay4"),\
"5" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay5"),\
"6" = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay6"))
#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
@@ -51,10 +26,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
loc_as_cryobag.used++
in_stasis = 1
//if(mob_master.current_cycle % 30 == 15)
//hud_updateflag = 1022
//HudRefactor:WTF do i put here....
voice = GetVoice()
if(..() && !in_stasis)
@@ -909,7 +880,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
/mob/living/carbon/human/handle_vision()
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
if(machine)
if(!machine.check_eye(src)) reset_view(null)
else
@@ -416,125 +416,147 @@
return 0
/datum/species/proc/handle_vision(mob/living/carbon/human/H)
if( H.stat == DEAD )
if(H.stat == DEAD)
H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
H.see_in_dark = 8
if(!H.druggy) H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
else
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
if(!H.druggy)
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
return
H.see_in_dark = darksight //set their variables to default, modify them later
H.see_invisible = SEE_INVISIBLE_LIVING
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
if(H.mind && H.mind.vampire)
if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
H.see_invisible = SEE_INVISIBLE_MINIMUM
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
H.sight |= SEE_MOBS
H.see_in_dark = darksight //set their variables to default, modify them later
H.see_invisible = SEE_INVISIBLE_LIVING
if(XRAY in H.mutations)
if(H.mind && H.mind.vampire)
if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
H.see_invisible = SEE_INVISIBLE_MINIMUM
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
H.sight |= SEE_MOBS
if(H.seer == 1)
var/obj/effect/rune/R = locate() in H.loc
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
H.see_invisible = SEE_INVISIBLE_OBSERVER
else
H.see_invisible = SEE_INVISIBLE_LIVING
H.seer = 0
if(XRAY in H.mutations)
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
//This checks how much the mob's eyewear impairs their vision
if(H.tinttotal >= TINT_IMPAIR)
if(tinted_weldhelh)
if(H.tinttotal >= TINT_BLIND)
H.eye_blind = max(H.eye_blind, 1)
if(H.client)
H.client.screen += global_hud.darkMask
H.see_invisible = SEE_INVISIBLE_MINIMUM
var/minimum_darkness_view = INFINITY
if(H.glasses)
if(istype(H.glasses, /obj/item/clothing/glasses))
var/obj/item/clothing/glasses/G = H.glasses
H.sight |= G.vision_flags
if(G.darkness_view)
H.see_in_dark = G.darkness_view
minimum_darkness_view = G.darkness_view
if(H.seer == 1)
var/obj/effect/rune/R = locate() in H.loc
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
H.see_invisible = SEE_INVISIBLE_OBSERVER
else
H.see_invisible = SEE_INVISIBLE_LIVING
H.seer = 0
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
//This checks how much the mob's eyewear impairs their vision
if(H.tinttotal >= TINT_IMPAIR)
if(tinted_weldhelh)
H.overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
if(H.tinttotal >= TINT_BLIND)
H.eye_blind = max(H.eye_blind, 1)
else
H.clear_fullscreen("tint")
if(H.head)
if(istype(H.head, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = H.head
H.sight |= hat.vision_flags
var/minimum_darkness_view = INFINITY
if(H.glasses)
if(istype(H.glasses, /obj/item/clothing/glasses))
var/obj/item/clothing/glasses/G = H.glasses
H.sight |= G.vision_flags
if(hat.darkness_view && hat.darkness_view < minimum_darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
H.see_in_dark = hat.darkness_view
if(G.darkness_view)
H.see_in_dark = G.darkness_view
minimum_darkness_view = G.darkness_view
if(!hat.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
//switch(hat.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
if(H.head)
if(istype(H.head, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = H.head
H.sight |= hat.vision_flags
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
var/obj/item/weapon/rig/rig = H.back
if(rig.visor)
if(!rig.helmet || (H.head && rig.helmet == H.head))
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
if(istype(G))
H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision.
if(G.vision_flags) // MESONS
H.sight |= G.vision_flags
if(hat.darkness_view && hat.darkness_view < minimum_darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
H.see_in_dark = hat.darkness_view
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(!hat.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
//switch(G.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
//switch(hat.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
if(H.vision_type)
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
H.see_invisible = H.vision_type.see_invisible
if(H.vision_type.light_sensitive)
H.weakeyes = 1
H.sight |= H.vision_type.sight_flags
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
var/obj/item/weapon/rig/rig = H.back
if(rig.visor)
if(!rig.helmet || (H.head && rig.helmet == H.head))
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
if(istype(G))
H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision.
if(G.vision_flags) // MESONS
H.sight |= G.vision_flags
if(H.see_override) //Override all
H.see_invisible = H.see_override
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(H.blind)
if(H.blinded) H.blind.layer = 18
else H.blind.layer = 0
//switch(G.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
if(H.disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
if(H.glasses) //to every /obj/item
var/obj/item/clothing/glasses/G = H.glasses
if(!G.prescription)
H.client.screen += global_hud.vimpaired
else
H.client.screen += global_hud.vimpaired
if(H.vision_type)
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
H.see_invisible = H.vision_type.see_invisible
if(H.vision_type.light_sensitive)
H.weakeyes = 1
H.sight |= H.vision_type.sight_flags
if(H.eye_blurry) H.client.screen += global_hud.blurry
if(H.druggy) H.client.screen += global_hud.druggy
if(H.see_override) //Override all
H.see_invisible = H.see_override
if(!H.client)
return 1
if(H.blinded || H.eye_blind)
H.overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
//H.throw_alert("blind", /obj/screen/alert/blind)
else
H.clear_fullscreen("blind")
//H.clear_alert("blind")
if(H.disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
if(H.glasses) //to every /obj/item
var/obj/item/clothing/glasses/G = H.glasses
if(!G.prescription)
H.overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
else
H.overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
else
H.clear_fullscreen("nearsighted")
if(H.eye_blurry)
H.overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
else
H.clear_fullscreen("blurry")
if(H.druggy)
H.overlay_fullscreen("high", /obj/screen/fullscreen/high)
//H.throw_alert("high", /obj/screen/alert/high)
else
H.clear_fullscreen("high")
//H.clear_alert("high")
/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
if(H.healths)
+46 -74
View File
@@ -364,83 +364,55 @@
//this handles hud updates. Calls update_vision() and handle_hud_icons()
/mob/living/carbon/handle_regular_hud_updates()
if(!client) return 0
if(!client)
return 0
if(damageoverlay)
if(damageoverlay.overlays)
damageoverlay.overlays = list()
if(stat == UNCONSCIOUS)
//Critical damage passage overlay
if(health <= config.health_threshold_crit)
var/image/I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "passage0")
I.blend_mode = BLEND_OVERLAY //damageoverlay is BLEND_MULTIPLY
switch(health)
if(-20 to -10)
I.icon_state = "passage1"
if(-30 to -20)
I.icon_state = "passage2"
if(-40 to -30)
I.icon_state = "passage3"
if(-50 to -40)
I.icon_state = "passage4"
if(-60 to -50)
I.icon_state = "passage5"
if(-70 to -60)
I.icon_state = "passage6"
if(-80 to -70)
I.icon_state = "passage7"
if(-90 to -80)
I.icon_state = "passage8"
if(-95 to -90)
I.icon_state = "passage9"
if(-INFINITY to -95)
I.icon_state = "passage10"
damageoverlay.overlays += I
if(stat == UNCONSCIOUS && health <= config.health_threshold_crit)
var/severity = 0
switch(health)
if(-20 to -10) severity = 1
if(-30 to -20) severity = 2
if(-40 to -30) severity = 3
if(-50 to -40) severity = 4
if(-60 to -50) severity = 5
if(-70 to -60) severity = 6
if(-80 to -70) severity = 7
if(-90 to -80) severity = 8
if(-95 to -90) severity = 9
if(-INFINITY to -95) severity = 10
overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity)
else
clear_fullscreen("crit")
if(oxyloss)
var/severity = 0
switch(oxyloss)
if(10 to 20) severity = 1
if(20 to 25) severity = 2
if(25 to 30) severity = 3
if(30 to 35) severity = 4
if(35 to 40) severity = 5
if(40 to 45) severity = 6
if(45 to INFINITY) severity = 7
overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity)
else
//Oxygen damage overlay
if(oxyloss)
var/image/I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "oxydamageoverlay0")
switch(oxyloss)
if(10 to 20)
I.icon_state = "oxydamageoverlay1"
if(20 to 25)
I.icon_state = "oxydamageoverlay2"
if(25 to 30)
I.icon_state = "oxydamageoverlay3"
if(30 to 35)
I.icon_state = "oxydamageoverlay4"
if(35 to 40)
I.icon_state = "oxydamageoverlay5"
if(40 to 45)
I.icon_state = "oxydamageoverlay6"
if(45 to INFINITY)
I.icon_state = "oxydamageoverlay7"
damageoverlay.overlays += I
clear_fullscreen("oxy")
//Fire and Brute damage overlay (BSSR)
var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
if(hurtdamage)
var/severity = 0
switch(hurtdamage)
if(5 to 15) severity = 1
if(15 to 30) severity = 2
if(30 to 45) severity = 3
if(45 to 70) severity = 4
if(70 to 85) severity = 5
if(85 to INFINITY) severity = 6
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
else
clear_fullscreen("brute")
//Fire and Brute damage overlay (BSSR)
var/hurtdamage = src.getBruteLoss() + src.getFireLoss() + damageoverlaytemp
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
if(hurtdamage)
var/image/I = image("icon" = 'icons/mob/screen1_full.dmi', "icon_state" = "brutedamageoverlay0")
I.blend_mode = BLEND_ADD
switch(hurtdamage)
if(5 to 15)
I.icon_state = "brutedamageoverlay1"
if(15 to 30)
I.icon_state = "brutedamageoverlay2"
if(30 to 45)
I.icon_state = "brutedamageoverlay3"
if(45 to 70)
I.icon_state = "brutedamageoverlay4"
if(70 to 85)
I.icon_state = "brutedamageoverlay5"
if(85 to INFINITY)
I.icon_state = "brutedamageoverlay6"
var/image/black = image(I.icon, I.icon_state) //BLEND_ADD doesn't let us darken, so this is just to blacken the edge of the screen
black.color = "#170000"
damageoverlay.overlays += I
damageoverlay.overlays += black
..()
return 1
@@ -20,8 +20,6 @@
O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
update_canmove()
if(blind)
blind.layer = 0
if(ticker && ticker.mode)
ticker.mode.check_win()
+5
View File
@@ -0,0 +1,5 @@
/mob/living/death(gibbed)
blinded = max(blinded, 1)
clear_fullscreens()
..(gibbed)
+31 -24
View File
@@ -161,7 +161,7 @@
/mob/living/proc/handle_disabilities()
//Eyes
if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
if(sdisabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
eye_blind = max(eye_blind, 1)
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
@@ -187,33 +187,40 @@
return 1
/mob/living/proc/handle_vision()
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
update_sight()
if(stat != DEAD)
if(blind)
if(eye_blind)
blind.layer = 18
else
blind.layer = 0
if(stat == DEAD)
return
if(blinded || eye_blind)
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
//throw_alert("blind", /obj/screen/alert/blind)
else
clear_fullscreen("blind")
//clear_alert("blind")
if (disabilities & NEARSIGHTED)
client.screen += global_hud.vimpaired
if (eye_blurry)
client.screen += global_hud.blurry
if (druggy)
client.screen += global_hud.druggy
if(machine)
if (!( machine.check_eye(src) ))
reset_view(null)
if(disabilities & NEARSIGHTED)
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
else
if(!remote_view && !client.adminobs)
reset_view(null)
clear_fullscreen("nearsighted")
if(eye_blurry)
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
else
clear_fullscreen("blurry")
if(druggy)
overlay_fullscreen("high", /obj/screen/fullscreen/high)
//throw_alert("high", /obj/screen/alert/high)
else
clear_fullscreen("high")
//clear_alert("high")
if(machine)
if(!machine.check_eye(src))
reset_view(null)
else
if(!remote_view && !client.adminobs)
reset_view(null)
/mob/living/proc/update_sight()
return
+14 -3
View File
@@ -73,8 +73,7 @@
/mob/living/ex_act(severity)
..()
if(client && !eye_blind)
flick("flash", src.flash)
flash_eyes()
/mob/living/proc/updatehealth()
if(status_flags & GODMODE)
@@ -809,6 +808,18 @@
/mob/living/proc/can_use_vents()
return "You can't fit into that vent."
//called when the mob receives a bright flash
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
if(check_eye_prot() < intensity && (override_blindness_check || !(sdisabilities & BLIND)))
overlay_fullscreen("flash", type)
addtimer(src, "clear_fullscreen", 25, FALSE, "flash", 25)
return 1
/mob/living/proc/check_eye_prot()
return 0
/mob/living/proc/check_ear_prot()
// The src mob is trying to strip an item from someone
// Override if a certain type of mob should be behave differently when stripping items (can't, for example)
/mob/living/stripPanelUnequip(obj/item/what, mob/who, where, var/silent = 0)
@@ -966,4 +977,4 @@
new path(loc)
butcher_results.Remove(path) //In case you want to have things like simple_animals drop their butcher results on gib, so it won't double up below.
visible_message("<span class='notice'>[user] butchers [src].</span>")
gib()
gib()
@@ -39,8 +39,6 @@
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
flash_weak_pain()
//Being hit while using a cloaking device
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
if(C && C.active)
+2 -4
View File
@@ -288,11 +288,11 @@ var/list/ai_verbs_default = list(
return
if(!custom_sprite) //Check to see if custom sprite time, checking the appopriate file to change a var
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
var/lines = splittext(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, ":")
var/list/Entry = splittext(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
@@ -593,8 +593,6 @@ var/list/ai_verbs_default = list(
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
"<span class='userdanger'>[M] has slashed at [src]!</span>")
if(prob(8))
flick("noise", flash)
adjustBruteLoss(damage)
updatehealth()
else
+2 -3
View File
@@ -5,9 +5,8 @@
icon_state = "[ckey]-ai-crash"
else icon_state = "ai-crash"
update_canmove()
if(src.eyeobj)
src.eyeobj.setLoc(get_turf(src))
if(blind) blind.layer = 0
if(eyeobj)
eyeobj.setLoc(get_turf(src))
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
+5 -8
View File
@@ -49,22 +49,20 @@
if(aiRestorePowerRoutine == 2)
src << "Alert cancelled. Power has been restored without our assistance."
aiRestorePowerRoutine = 0
blind.layer = 0
clear_fullscreen("blind")
else if(aiRestorePowerRoutine == 3)
src << "Alert cancelled. Power has been restored."
aiRestorePowerRoutine = 0
blind.layer = 0
clear_fullscreen("blind")
else
blind.screen_loc = "1,1 to 15,15"
if(blind.layer != 18)
blind.layer = 18
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
see_in_dark = 0
see_invisible = SEE_INVISIBLE_LIVING
@@ -85,7 +83,6 @@
if(my_area && my_area.power_equip && !istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
aiRestorePowerRoutine = 0
blind.layer = 0
return
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
sleep(20)
@@ -122,7 +119,7 @@
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
aiRestorePowerRoutine = 0
blind.layer = 0
clear_fullscreen("blind")
return
switch(PRP)
+1 -13
View File
@@ -5,21 +5,9 @@
blood.override = 1
client.images += blood
regenerate_icons()
flash = new /obj/screen()
flash.icon_state = "blank"
flash.name = "flash"
flash.screen_loc = "WEST,SOUTH to EAST,NORTH"
flash.layer = 17
blind = new /obj/screen()
blind.icon_state = "black"
blind.name = " "
blind.screen_loc = "1,1 to 15,15"
blind.layer = 0
client.screen.Add( blind, flash )
if(stat != DEAD)
for(var/obj/machinery/ai_status_display/O in machines) //change status
O.mode = 1
O.emotion = "Neutral"
src.view_core()
return
view_core()
+1 -1
View File
@@ -43,7 +43,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
if(!message || announcing_vox > world.time)
return
var/list/words = text2list(trim(message), " ")
var/list/words = splittext(trim(message), " ")
var/list/incorrect_words = list()
if(words.len > 30)
@@ -12,7 +12,6 @@
card.overlays += "pai-off"
stat = DEAD
canmove = 0
if(blind) blind.layer = 0
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
+1 -1
View File
@@ -247,7 +247,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
if(prob(8))
flick("noise", src.flash)
flash_eyes(affect_silicon = 1)
src.adjustBruteLoss(damage)
src.updatehealth()
else
@@ -59,7 +59,6 @@
var/obj/machinery/recharge_station/RC = loc
RC.go_out()
if(blind) blind.layer = 0
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
@@ -338,3 +338,7 @@
/mob/living/silicon/robot/drone/update_canmove()
. = ..()
density = 0 //this is reset every canmove update otherwise
/mob/living/simple_animal/drone/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
if(affect_silicon)
return ..()
@@ -175,11 +175,11 @@ var/list/robot_verbs_default = list(
//Check for custom sprite
if(!custom_sprite)
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
var/lines = splittext(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, ";")
var/list/Entry = splittext(line, ";")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
@@ -866,7 +866,7 @@ var/list/robot_verbs_default = list(
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
"<span class='userdanger'>[M] has slashed at [src]!</span>")
if(prob(8))
flick("noise", flash)
flash_eyes(affect_silicon = 1)
adjustBruteLoss(damage)
updatehealth()
else
@@ -895,7 +895,7 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M as mob)
if(..()) //successful slime shock
flick("noise", flash)
flash_eyes(affect_silicon = 1)
var/stunprob = M.powerlevel * 7 + 10
if(prob(stunprob) && M.powerlevel >= 8)
adjustBruteLoss(M.powerlevel * rand(6,10))
+5 -1
View File
@@ -73,7 +73,7 @@
if(2)
src.take_organ_damage(10)
Stun(3)
flick("noise", src:flash)
flash_eyes(affect_silicon = 1)
src << "\red <B>*BZZZT*</B>"
src << "\red Warning: Electromagnetic pulse detected."
..()
@@ -351,3 +351,7 @@
/mob/living/silicon/get_access()
return IGNORE_ACCESS //silicons always have access
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash/noise)
if(affect_silicon)
return ..()
@@ -49,7 +49,6 @@
//if we're chasing someone, get a little bit angry
if(target_mob && prob(10))
feral++
M.flash_pain()
//calm down a little bit
if(feral > 0)
-3
View File
@@ -1169,9 +1169,6 @@ var/list/slot_equipment_priority = list( \
/mob/proc/get_species()
return ""
/mob/proc/flash_weak_pain()
flick("weak_pain",pain)
/mob/proc/get_visible_implants(var/class = 0)
var/list/visible_implants = list()
for(var/obj/item/O in embedded)
-4
View File
@@ -11,8 +11,6 @@
//Not in use yet
var/obj/effect/organstructure/organStructure = null
var/obj/screen/flash = null
var/obj/screen/blind = null
var/obj/screen/hands = null
var/obj/screen/pullin = null
var/obj/screen/internals = null
@@ -26,8 +24,6 @@
var/obj/screen/throw_icon = null
var/obj/screen/nutrition_icon = null
var/obj/screen/pressure = null
var/obj/screen/damageoverlay = null
var/obj/screen/pain = null
var/obj/screen/gun/item/item_use_icon = null
var/obj/screen/gun/move/gun_move_icon = null
var/obj/screen/gun/run/gun_run_icon = null