Files
94d92803b4 Replaces our lighting system with CM's. (#21465)
Depends on #21458.

Ports https://github.com/cmss13-devs/cmss13/pull/4229, with the original
authors as:

- https://github.com/tgstation/TerraGov-Marine-Corps/pull/1964 for the
lighting controller (A-lexa)
- https://github.com/tgstation/TerraGov-Marine-Corps/pull/4747 and
https://github.com/tgstation/TerraGov-Marine-Corps/pull/7263 for the
lighting (TiviPlus)
- https://github.com/tgstation/tgstation/pull/54520 for the dir lighting
component
- https://github.com/tgstation/tgstation/pull/75018 for the out of
bounds fix in lighting
- https://github.com/tgstation/TerraGov-Marine-Corps/pull/6678 for the
emissives (TiviPlus)

The main driving reason behind this is that current lighting consumes
way too much processing power, especially for things like odysseys/away
sites where a billion light sources are processing/moving at once and
the game slows down to a crawl. Hopefully this improves the situation by
a good margin, but we will need some testmerging to confirm that.
<img width="1349" height="1349" alt="image"
src="https://github.com/user-attachments/assets/1059ba2b-c0c5-495a-9c76-2d75d0c42bf2"
/>
<img width="1349" height="1349" alt="image"
src="https://github.com/user-attachments/assets/9704b0f6-4cf6-4dfd-a6cb-5702ad07d677"
/>


- [x] Resolve todos
- [x] Look into open space fuckery (border objects)

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: JohnWildkins <john.wildkins@gmail.com>
2025-11-04 21:27:42 +00:00

48 lines
1.5 KiB
Plaintext

/datum/technomancer/spell/chroma
name = "Chroma"
desc = "Creates light around you, or in a location of your choosing. You can choose what color the light is. This could be \
useful to trick someone into believing you're casting a different spell, or perhaps just for fun."
cost = 25
ability_icon_state = "const_ambush"
obj_path = /obj/item/spell/chroma
category = UTILITY_SPELLS
/obj/item/spell/chroma
name = "chroma"
desc = "The colors are dazzling."
icon_state = "darkness"
cast_methods = CAST_RANGED | CAST_USE
aspect = ASPECT_LIGHT
var/color_to_use = "#FFFFFF"
/obj/item/spell/chroma/Initialize()
. = ..()
set_light_range_power_color(6, 5, color_to_use)
set_light_on(TRUE)
/obj/effect/temporary_effect/chroma
name = "chroma"
desc = "How are you examining what which cannot be seen?"
invisibility = 101
time_to_die = 2 MINUTES //Despawn after this time, if set.
/obj/effect/temporary_effect/chroma/Initialize(var/mapload, var/new_color = "#FFFFFF")
. = ..()
set_light_range_power_color(6, 5, new_color)
set_light_on(TRUE)
/obj/item/spell/chroma/on_ranged_cast(atom/hit_atom, mob/user)
. = ..()
var/turf/T = get_turf(hit_atom)
if(T)
new /obj/effect/temporary_effect/chroma(T, color_to_use)
to_chat(user, SPAN_NOTICE("You shift the light onto \the [T]."))
qdel(src)
/obj/item/spell/chroma/on_use_cast(mob/user)
. = ..()
var/new_color = input(user, "Choose the color you want your light to be.", "Color selection") as null|color
if(new_color)
color_to_use = new_color
set_light_range_power_color(6, 5, new_color)