Files
Paradise/code/datums/spells/night_vision.dm
Contrabang 48d7b00a0d CI now bans the use of weird spacing in conditionals (#22777)
* no more spaces

* Matthew 10:22

* fixes

* dgamerl review

* Update code/modules/hydroponics/plant_genes.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/bot/ed209bot.dm

* Update code/modules/mob/mob.dm

* Update code/modules/mob/mob.dm

* Update code/modules/mob/mob.dm

* Update code/modules/mob/mob.dm

* Update code/modules/mob/mob.dm

* Update code/modules/pda/PDA.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* fuck

* bah

* Update tools/ci/check_grep2.py

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* oops

* guh

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
2023-11-12 20:59:43 +00:00

29 lines
1.0 KiB
Plaintext

/obj/effect/proc_holder/spell/night_vision
name = "Toggle Nightvision"
desc = "Toggle your nightvision mode."
base_cooldown = 10
clothes_req = FALSE
message = "<span class='notice'>You toggle your night vision!</span>"
/obj/effect/proc_holder/spell/night_vision/create_new_targeting()
return new /datum/spell_targeting/self
/obj/effect/proc_holder/spell/night_vision/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
switch(target.lighting_alpha)
if(LIGHTING_PLANE_ALPHA_VISIBLE)
target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
name = "Toggle Nightvision \[More]"
if(LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
name = "Toggle Nightvision \[Full]"
if(LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
target.lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
name = "Toggle Nightvision \[OFF]"
else
target.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
name = "Toggle Nightvision \[ON]"
target.update_sight()