mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-19 19:10:05 +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>
76 lines
1.8 KiB
Plaintext
76 lines
1.8 KiB
Plaintext
/datum/technomancer/spell/pulsar
|
|
name = "Pulsar"
|
|
desc = "Emits electronic pulses to destroy, disable, or otherwise harm devices and machines. Be sure to not hit yourself with this."
|
|
cost = 100
|
|
ability_icon_state = "wiz_tech"
|
|
obj_path = /obj/item/spell/spawner/pulsar
|
|
category = OFFENSIVE_SPELLS
|
|
|
|
/obj/item/spell/spawner/pulsar
|
|
name = "pulsar"
|
|
desc = "Be sure to not hit yourself!"
|
|
icon_state = "radiance"
|
|
cast_methods = CAST_RANGED | CAST_THROW
|
|
aspect = ASPECT_EMP
|
|
spawner_type = /obj/effect/temporary_effect/pulse/pulsar
|
|
|
|
/obj/item/spell/spawner/pulsar/New()
|
|
..()
|
|
set_light_range_power_color(3, 2, "#2ECCFA")
|
|
set_light_on(TRUE)
|
|
|
|
/obj/item/spell/spawner/pulsar/on_ranged_cast(atom/hit_atom, mob/user)
|
|
if(within_range(hit_atom) && pay_energy(4000))
|
|
adjust_instability(8)
|
|
..()
|
|
|
|
/obj/item/spell/spawner/pulsar/on_throw_cast(atom/hit_atom, mob/user)
|
|
. = ..()
|
|
empulse(hit_atom, 1, 1, 1, 1, log=1)
|
|
|
|
// Does something every so often. Deletes itself when pulses_remaining hits zero.
|
|
/obj/effect/temporary_effect/pulse
|
|
var/pulses_remaining = 3
|
|
var/pulse_delay = 2 SECONDS
|
|
|
|
/obj/effect/temporary_effect/pulse/Initialize()
|
|
..()
|
|
return INITIALIZE_HINT_LATELOAD
|
|
|
|
/obj/effect/temporary_effect/pulse/LateInitialize()
|
|
pulse_loop()
|
|
|
|
/obj/effect/temporary_effect/pulse/proc/pulse_loop()
|
|
set waitfor = FALSE
|
|
|
|
while(pulses_remaining)
|
|
sleep(pulse_delay)
|
|
on_pulse()
|
|
pulses_remaining--
|
|
qdel(src)
|
|
|
|
// Override for specific effects.
|
|
/obj/effect/temporary_effect/pulse/proc/on_pulse()
|
|
|
|
|
|
|
|
/obj/effect/temporary_effect/pulse/pulsar
|
|
name = "pulsar"
|
|
desc = "Not a real pulsar, but still emits loads of EMP."
|
|
icon_state = "shield2"
|
|
time_to_die = null
|
|
light_range = 4
|
|
light_power = 5
|
|
light_color = "#2ECCFA"
|
|
pulses_remaining = 3
|
|
|
|
/obj/effect/temporary_effect/pulse/pulsar/on_pulse()
|
|
empulse(src, 1, 1, 2, 2, log = 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|