mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Overlay lighting component (#469)
* Overlay lighting component (#52413) Sparks no longer lag, projectile beams move super smoothly, same with mobs and whatnot. This also allows for easy expansion into directional lights, field-of-view, wee-woo rotating lights or whatever. It does have a downside: things right-clicked or checked through the alt+click tab will show the light overlay: This is a BYOND limitation, very well worth it IMO. 🆑 add: Smooth movable lighting system implemented. Projectiles, sparks, thrown flashlights or moving mobs with lights should be much smoother and less laggy. balance: Light sources no longer stack in range, though they still do in intensity. /🆑 * Overlay lighting component Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
@@ -17,6 +17,10 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
hud_type = /datum/hud/ghost
|
||||
movement_type = GROUND | FLYING
|
||||
light_system = MOVABLE_LIGHT
|
||||
light_range = 1
|
||||
light_power = 2
|
||||
light_on = FALSE
|
||||
var/can_reenter_corpse
|
||||
var/datum/hud/living/carbon/hud = null // hud
|
||||
var/bootime = 0
|
||||
@@ -144,6 +148,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
show_data_huds()
|
||||
data_huds_on = 1
|
||||
|
||||
|
||||
/mob/dead/observer/get_photo_description(obj/item/camera/camera)
|
||||
if(!invisibility || camera.see_ghosts)
|
||||
return "You can also see a g-g-g-g-ghooooost!"
|
||||
@@ -901,12 +906,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
. = list("<span class='notice'><i>You examine [src] closer, and note the following...</i></span>")
|
||||
. += list("\t><span class='admin'>[ADMIN_FULLMONTY(src)]</span>")
|
||||
|
||||
|
||||
/mob/dead/observer/proc/set_invisibility(value)
|
||||
invisibility = value
|
||||
if(!value)
|
||||
set_light(1, 2)
|
||||
else
|
||||
set_light(0, 0)
|
||||
set_light_on(!value ? TRUE : FALSE)
|
||||
|
||||
|
||||
// Ghosts have no momentum, being massless ectoplasm
|
||||
/mob/dead/observer/Process_Spacemove(movement_dir)
|
||||
|
||||
Reference in New Issue
Block a user