Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -54,4 +54,4 @@
else
E.flash_protect = 0
user.update_sight()
..()
..()
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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()
Expand All @@ -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."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down