mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Darkness handling update
This commit is contained in:
@@ -666,14 +666,32 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set desc = "Toggles your ability to see things only ghosts can see, like other ghosts"
|
||||
set category = "Ghost"
|
||||
ghostvision = !(ghostvision)
|
||||
updateghostsight()
|
||||
update_sight()
|
||||
to_chat(usr, "You [(ghostvision?"now":"no longer")] have ghost vision.")
|
||||
|
||||
/mob/dead/observer/verb/toggle_darkness()
|
||||
set name = "Toggle Darkness"
|
||||
set category = "Ghost"
|
||||
seedarkness = !(seedarkness)
|
||||
updateghostsight()
|
||||
switch(lighting_alpha)
|
||||
if (LIGHTING_PLANE_ALPHA_VISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
|
||||
else
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
|
||||
|
||||
update_sight()
|
||||
|
||||
/mob/dead/observer/update_sight()
|
||||
if (!ghostvision)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
else
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
|
||||
updateghostimages()
|
||||
..()
|
||||
|
||||
/mob/dead/observer/proc/updateghostsight()
|
||||
if(!seedarkness)
|
||||
@@ -681,7 +699,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
else
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
if(!ghostvision)
|
||||
see_invisible = SEE_INVISIBLE_LIVING;
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
updateghostimages()
|
||||
|
||||
/proc/updateallghostimages()
|
||||
|
||||
Reference in New Issue
Block a user