Merge pull request #748 from Zuhayr/prosthetics

Blindness fix.
This commit is contained in:
Datraen
2016-01-08 23:09:03 -05:00
9 changed files with 28 additions and 15 deletions

View File

@@ -147,6 +147,7 @@
#define O_BRAIN "brain"
#define O_LIVER "liver"
#define O_KIDNEYS "kidneys"
#define O_APPENDIX "appendix"
#define O_PLASMA "plasma vessel"
#define O_HIVE "hive node"
#define O_NUTRIENT "nutrient vessel"

View File

@@ -3,7 +3,7 @@
//please preference put stuff where it's easy to find - C
/obj/item/weapon/autopsy_scanner
name = "autopsy scanner"
name = "biopsy scanner"
desc = "Extracts information on wounds."
icon = 'icons/obj/autopsy_scanner.dmi'
icon_state = ""

View File

@@ -59,7 +59,7 @@
if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src))
message = "<b>[message]</b>"
if(sdisabilities & DEAF || ear_deaf)
if((sdisabilities & DEAF) || ear_deaf)
if(!language || !(language.flags & INNATE)) // INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set
if(speaker == src)
src << "<span class='warning'>You cannot hear yourself speak!</span>"
@@ -187,7 +187,7 @@
formatted = language.format_message_radio(message, verb)
else
formatted = "[verb], <span class=\"body\">\"[message]\"</span>"
if(sdisabilities & DEAF || ear_deaf)
if((sdisabilities & DEAF) || ear_deaf)
if(prob(20))
src << "<span class='warning'>You feel your headset vibrate but can hear nothing from it!</span>"
else

View File

@@ -45,7 +45,7 @@
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
blinded = null
blinded = 0
fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it.
//TODO: seperate this out

View File

@@ -114,9 +114,9 @@
src.density = !( src.lying )
if ((src.sdisabilities & BLIND))
if (src.sdisabilities & BLIND)
src.blinded = 1
if ((src.sdisabilities & DEAF))
if (src.sdisabilities & DEAF)
src.ear_deaf = 1
if (src.eye_blurry > 0)

View File

@@ -56,19 +56,19 @@
if(!client) return
if (type)
if(type & 1 && (sdisabilities & BLIND || 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 & DEAF || 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 & BLIND))
if ((type & 1) && (sdisabilities & BLIND))
return
// Added voice muffling for Issue 41.
if(stat == UNCONSCIOUS || sleeping > 0)

View File

@@ -256,9 +256,13 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
if(E && istype(E))
if(istype(E))
if(E.status & ORGAN_ROBOT)
return
if(E.damage > 0)
E.damage = max(E.damage - 5 * removed, 0)
if(E.damage <= 5 && E.organ_tag == O_EYES)
H.sdisabilities &= ~BLIND
/datum/reagent/peridaxon
name = "Peridaxon"
@@ -272,10 +276,13 @@
/datum/reagent/peridaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(ishuman(M))
var/mob/living/carbon/human/H = M
for(var/obj/item/organ/I in H.internal_organs)
if((I.damage > 0) && !(I.status & ORGAN_ROBOT)) //Peridaxon heals only non-robotic organs
if(I.status & ORGAN_ROBOT)
continue
if(I.damage > 0) //Peridaxon heals only non-robotic organs
I.damage = max(I.damage - removed, 0)
if(I.damage <= 5 && I.organ_tag == O_EYES)
H.sdisabilities &= ~BLIND
/datum/reagent/ryetalyn
name = "Ryetalyn"

View File

@@ -87,6 +87,7 @@
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/obj/item/organ/I in affected.internal_organs)
@@ -109,12 +110,14 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
for(var/obj/item/organ/I in affected.internal_organs)
for(var/obj/item/organ/internal/I in affected.internal_organs)
if(I && I.damage > 0)
if(!(I.status & ORGAN_ROBOT))
user.visible_message("<span class='notice'>[user] treats damage to [target]'s [I.name] with [tool_name].</span>", \
"<span class='notice'>You treat damage to [target]'s [I.name] with [tool_name].</span>" )
I.damage = 0
if(I.organ_tag == O_EYES)
target.sdisabilities &= ~BLIND
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)

View File

@@ -246,6 +246,8 @@
user.visible_message("<span class='notice'>[user] repairs [target]'s [I.name] with [tool].</span>", \
"<span class='notice'>You repair [target]'s [I.name] with [tool].</span>" )
I.damage = 0
if(I.organ_tag == O_EYES)
target.sdisabilities &= ~BLIND
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)