diff --git a/_maps/RandomRuins/StationRuins/maint/3x5/3x5_dissection.dmm b/_maps/RandomRuins/StationRuins/maint/3x5/3x5_dissection.dmm index 3797c0030f8d..81fd0e4e5d64 100644 --- a/_maps/RandomRuins/StationRuins/maint/3x5/3x5_dissection.dmm +++ b/_maps/RandomRuins/StationRuins/maint/3x5/3x5_dissection.dmm @@ -79,7 +79,7 @@ /obj/effect/decal/cleanable/blood/old, /obj/item/organ/eyes, /obj/item/organ/eyes/moth, -/obj/item/organ/eyes/preternis, +/obj/item/organ/eyes/robotic/preternis, /obj/item/organ/eyes/snail, /turf/open/floor/plasteel/white, /area/template_noop) diff --git a/code/modules/antagonists/changeling/powers/augmented_eyesight.dm b/code/modules/antagonists/changeling/powers/augmented_eyesight.dm index f3b95767f025..813a3dd1d0fe 100644 --- a/code/modules/antagonists/changeling/powers/augmented_eyesight.dm +++ b/code/modules/antagonists/changeling/powers/augmented_eyesight.dm @@ -15,7 +15,7 @@ var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES) if (E) E.flash_protect = 2 //Adjust the user's eyes' flash protection - if(istype(E, /obj/item/organ/eyes/preternis)) + if(istype(E, /obj/item/organ/eyes/robotic/preternis)) E.Remove(user, 1) var/obj/item/organ/eyes/neweyes = new(user) neweyes.Insert(user, 1) @@ -54,4 +54,4 @@ else E.flash_protect = 0 user.update_sight() - ..() \ No newline at end of file + ..() diff --git a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/organs.dm b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/organs.dm index 2206003e834d..8b1f1e69f062 100644 --- a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/organs.dm +++ b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/organs.dm @@ -1,14 +1,24 @@ -/obj/item/organ/eyes/preternis +/obj/item/organ/eyes/robotic/preternis name = "preternis eyes" - desc = "An experimental upgraded version of eyes that can see in the dark.They are designed to fit preternis" + desc = "An experimental upgraded version of eyes that can see in the dark. They are designed to fit preternis" see_in_dark = PRETERNIS_NV_ON lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE + //preternis eyes need to be powered by a preternis to function, in a non preternis they slowly power down to blindness + organ_flags = ORGAN_SYNTHETIC + + low_threshold_passed = span_info("Your Preternis eyes switch to battery saver mode.") + high_threshold_passed = span_info("Your Preternis eyes only show a sliver of battery life left!") + now_failing = span_warning("An empty battery icon is all you can see as your eyes shut off!") + now_fixed = span_info("Lines of text scroll in your vision as your eyes begin rebooting.") + high_threshold_cleared = span_info("Your Preternis eyes have recharged enough to re-enable most functionality.") + low_threshold_cleared = span_info("Your Preternis eyes have almost fully recharged.") + var/powered = TRUE actions_types = list(/datum/action/item_action/organ_action/use) var/night_vision = TRUE -/obj/item/organ/eyes/preternis/ui_action_click() - var/datum/species/preternis/S = owner.dna.species - if(S.charge < PRETERNIS_LEVEL_FED) +/obj/item/organ/eyes/robotic/preternis/ui_action_click() + if(damage > low_threshold) + //no nightvision if your eyes are hurt return sight_flags = initial(sight_flags) switch(lighting_alpha) @@ -23,17 +33,29 @@ sight_flags &= ~SEE_BLACKNESS owner.update_sight() -/obj/item/organ/eyes/preternis/on_life() +/obj/item/organ/eyes/robotic/preternis/on_life() . = ..() - if(!ispreternis(owner)) - qdel(src) //these eyes depend on being inside a preternis + if(!owner) return - var/datum/species/preternis/S = owner.dna.species - if(S.charge >= PRETERNIS_LEVEL_FED) + if(ispreternis(owner) && !powered) + powered = TRUE + to_chat(owner, span_notice("A battery icon disappears from your vision as your [src] switch to external power.")) + if(!ispreternis(owner) && powered) //these eyes depend on being inside a preternis for power + powered = FALSE + to_chat(owner, span_boldwarning("Your [src] flash warnings that they've lost their power source, and are running on emergency power!")) + if(powered) + //when powered, they recharge by healing + owner.adjustOrganLoss(ORGAN_SLOT_EYES,-0.5) + else + //to simulate running out of power, they take damage + owner.adjustOrganLoss(ORGAN_SLOT_EYES,0.5) + + if(damage < low_threshold) if(see_in_dark == PRETERNIS_NV_OFF) see_in_dark = PRETERNIS_NV_ON owner.update_sight() else + //if your eyes start getting hurt no more nightvision if(see_in_dark == PRETERNIS_NV_ON) see_in_dark = PRETERNIS_NV_OFF owner.update_sight() @@ -42,6 +64,17 @@ sight_flags &= ~SEE_BLACKNESS owner.update_sight() +/obj/item/organ/eyes/robotic/preternis/examine(mob/user) + . = ..() + if(status == ORGAN_ROBOTIC && (organ_flags & ORGAN_FAILING)) + . += span_warning("[src] appears to be completely out of charge. However, that's nothing popping them back in a Preternis wouldn't fix.") + + else if(organ_flags & ORGAN_FAILING) + . += span_warning("[src] appears to be completely out of charge. If they were put back in a Preternis they would surely recharge in time.") + + else if(damage > high_threshold) + . += span_warning("[src] seem to flicker on and off. They must be pretty low on charge without being in a Preternis") + /obj/item/organ/lungs/preternis name = "preternis lungs" desc = "An experimental set of lungs.Due to the cybernetic nature of these lungs,they are less resistant to heat and cold but are more efficent at filtering oxygen." diff --git a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm index 3752967b4080..46a8cb8dcd5d 100644 --- a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm +++ b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm @@ -25,7 +25,7 @@ adjust_charge - take a positive or negative value to adjust the charge level siemens_coeff = 1.75 //Computers REALLY don't like being shorted out payday_modifier = 0.8 //Useful to NT for engineering + very close to Human yogs_draw_robot_hair = TRUE - mutanteyes = /obj/item/organ/eyes/preternis + mutanteyes = /obj/item/organ/eyes/robotic/preternis mutantlungs = /obj/item/organ/lungs/preternis yogs_virus_infect_chance = 20 virus_resistance_boost = 10 //YEOUTCH,good luck getting it out