Skip to content

Commit

Permalink
Gives ethereals special eyes (#21130)
Browse files Browse the repository at this point in the history
* Update eyes.dm

* Update eyes.dm

* ethereals

* updatesight

* sprite

* proper vision update
  • Loading branch information
Moltijoe authored Jan 3, 2024
1 parent 11a9937 commit 1f5a7ee
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,9 @@
sight |= E.sight_flags
if(!isnull(E.lighting_alpha))
lighting_alpha = E.lighting_alpha
if(istype(E, /obj/item/organ/eyes/ethereal) && client) //special view range ethereal eyes
client.view_size.resetToDefault(getScreenSize(client.prefs.read_preference(/datum/preference/toggle/widescreen)))
client.view_size.addTo("2x2")

for(var/image/I in infra_images)
if(client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
mutantlungs = /obj/item/organ/lungs/ethereal
mutantstomach = /obj/item/organ/stomach/cell/ethereal
mutantheart = /obj/item/organ/heart/ethereal
mutanteyes = /obj/item/organ/eyes/ethereal
exotic_blood = /datum/reagent/consumable/liquidelectricity //Liquid Electricity. fuck you think of something better gamer
siemens_coeff = 0.5 //They thrive on energy
brutemod = 1.25 //Don't rupture their membranes
Expand Down Expand Up @@ -72,6 +73,9 @@
var/obj/item/organ/heart/ethereal/ethereal_heart = ethereal.getorganslot(ORGAN_SLOT_HEART)
if(ethereal_heart)
ethereal_heart.ethereal_color = default_color
var/obj/item/organ/eyes/ethereal/ethereal_eyes = ethereal.getorganslot(ORGAN_SLOT_EYES)
if(ethereal_eyes)
ethereal_eyes.ethereal_color = default_color

/datum/species/ethereal/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
QDEL_NULL(ethereal_light)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

update_damage_hud()
update_health_hud()
update_sight()

var/turf/T = get_turf(src)
if (isturf(T))
Expand Down
26 changes: 25 additions & 1 deletion code/modules/surgery/organs/eyes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@

/obj/item/organ/eyes/moth
name = "moth eyes"
desc = "These eyes seem to have increased sensitivity to bright light, with no improvement to low light vision."
desc = "These eyes can see just a little too well, light doesn't entirely agree with them."
flash_protect = -1

/obj/item/organ/eyes/snail
Expand All @@ -456,3 +456,27 @@
desc = "Eyes from a polysmorph, capable of retaining slightly more vision in low light environments"
lighting_alpha = LIGHTING_PLANE_ALPHA_NV_TRAIT
see_in_dark = 5

/obj/item/organ/eyes/ethereal
name = "fractal eyes"
desc = "Crystalline eyes from an Ethereal. Seeing with them should feel like using a kaleidoscope, but somehow it isn't."
icon_state = "ethereal_eyes"
///Color of the eyes, is set by the species on gain
var/ethereal_color = "#9c3030"

/obj/item/organ/eyes/ethereal/Initialize(mapload)
. = ..()
add_atom_colour(ethereal_color, FIXED_COLOUR_PRIORITY)

/obj/item/organ/eyes/ethereal/Insert(mob/living/carbon/M, special, drop_if_replaced, initialising)
. = ..()
var/client/dude = M.client
if(dude)
dude.view_size.resetToDefault(getScreenSize(dude.prefs.read_preference(/datum/preference/toggle/widescreen)))
dude.view_size.addTo("2x2")

/obj/item/organ/eyes/ethereal/Remove(mob/living/carbon/M, special)
var/client/dude = M.client
if(dude)
dude.view_size.resetToDefault(getScreenSize(dude.prefs.read_preference(/datum/preference/toggle/widescreen)))
. = ..()
Binary file modified icons/obj/surgery.dmi
Binary file not shown.

0 comments on commit 1f5a7ee

Please sign in to comment.