mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-20 19:43:13 +01:00
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>
57 lines
1.8 KiB
Plaintext
57 lines
1.8 KiB
Plaintext
/datum/technomancer/spell/radiance
|
|
name = "Radiance"
|
|
desc = "Causes you to be very radiant, glowing brightly in visible light, thermal energy, and deadly ionizing radiation. Note \
|
|
that this WILL affect you."
|
|
enhancement_desc = "Radiation will not affect the caster or their allies."
|
|
spell_power_desc = "Spell power increases the amount of radiation and heat radiated, as well as the radius."
|
|
cost = 100
|
|
ability_icon_state = "swarm_zeropoint"
|
|
obj_path = /obj/item/spell/radiance
|
|
category = OFFENSIVE_SPELLS
|
|
|
|
/obj/item/spell/radiance
|
|
name = "radiance"
|
|
desc = "You will glow with a radiance similar to that of Supermatter."
|
|
icon_state = "radiance"
|
|
aspect = ASPECT_LIGHT
|
|
var/power = 250
|
|
toggled = 1
|
|
|
|
/obj/item/spell/radiance/Initialize()
|
|
. = ..()
|
|
set_light_range_power_color(7, 4, "#D9D900")
|
|
set_light_on(TRUE)
|
|
START_PROCESSING(SSprocessing, src)
|
|
log_and_message_admins("has casted [src].")
|
|
|
|
/obj/item/spell/radiance/Destroy()
|
|
STOP_PROCESSING(SSprocessing, src)
|
|
log_and_message_admins("has stopped maintaining [src].")
|
|
return ..()
|
|
|
|
/obj/item/spell/radiance/process()
|
|
var/turf/T = get_turf(src)
|
|
if(!istype(T)) return
|
|
var/datum/gas_mixture/removed = null
|
|
var/datum/gas_mixture/env = null
|
|
var/adjusted_power = calculate_spell_power(power)
|
|
|
|
if(!istype(T, /turf/space))
|
|
env = T.return_air()
|
|
removed = env.remove(0.25 * env.total_moles) //Remove gas from surrounding area
|
|
|
|
var/thermal_power = 300 * adjusted_power
|
|
|
|
removed.add_thermal_energy(thermal_power)
|
|
removed.temperature = between(0, removed.temperature, 10000)
|
|
|
|
env.merge(removed)
|
|
|
|
for(var/mob/living/L in range(T, round(sqrt(adjusted_power / 2))))
|
|
if(check_for_scepter() && is_ally(L))
|
|
continue
|
|
var/radius = max(get_dist(L, src), 1)
|
|
var/rads = (adjusted_power / 10) * ( 1 / (radius**2) )
|
|
L.apply_damage(rads, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
|
adjust_instability(2)
|