mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +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>
64 lines
2.0 KiB
Plaintext
64 lines
2.0 KiB
Plaintext
/datum/technomancer/spell/flame_tongue
|
|
name = "Flame Tongue"
|
|
desc = "Creates a miniaturized flamethrower in your hand. Acts as a welder and lights enemies on fire on contact."
|
|
cost = 50
|
|
obj_path = /obj/item/spell/flame_tongue
|
|
ability_icon_state = "tech_flametongue"
|
|
category = OFFENSIVE_SPELLS
|
|
|
|
/obj/item/spell/flame_tongue
|
|
name = "flame tongue"
|
|
icon_state = "flame_tongue"
|
|
desc = "Burn!"
|
|
cast_methods = CAST_MELEE
|
|
aspect = ASPECT_FIRE
|
|
var/obj/item/weldingtool/spell/welder = null
|
|
|
|
/obj/item/spell/flame_tongue/Initialize()
|
|
. = ..()
|
|
set_light_range_power_color(6, 5, "#FF6A00")
|
|
set_light_on(TRUE)
|
|
visible_message(SPAN_WARNING("\The [loc]'s hand begins to emit a flame."))
|
|
welder = new /obj/item/weldingtool/spell(src)
|
|
welder.setWelding(1)
|
|
|
|
/obj/item/spell/flame_tongue/Destroy()
|
|
QDEL_NULL(welder)
|
|
return ..()
|
|
|
|
/obj/item/weldingtool/spell
|
|
name = "flame"
|
|
produces_flash = FALSE
|
|
|
|
/obj/item/weldingtool/spell/process()
|
|
return
|
|
|
|
//Needed to make the spell welder have infinite fuel. Don't worry, it uses energy instead.
|
|
/obj/item/weldingtool/spell/use(var/amount = 1, var/mob/M = null, var/colourChange = TRUE)
|
|
return TRUE
|
|
|
|
/obj/item/spell/flame_tongue/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
|
|
. = ..()
|
|
if(isliving(hit_atom) && user.a_intent != I_HELP)
|
|
var/mob/living/L = hit_atom
|
|
if(pay_energy(1000))
|
|
visible_message(SPAN_DANGER("\The [user] reaches out towards \the [L] with the flaming hand, and they ignite!"))
|
|
to_chat(L, SPAN_DANGER("You ignite!"))
|
|
L.fire_act()
|
|
log_and_message_admins("has ignited [L] with [src].")
|
|
adjust_instability(12)
|
|
else
|
|
//This is needed in order for the welder to work, and works similarly to grippers.
|
|
welder.loc = user
|
|
var/resolved = hit_atom.attackby(welder, user)
|
|
if(!resolved && welder && ismob(hit_atom))
|
|
if(pay_energy(500))
|
|
welder.attack(hit_atom, user, def_zone)
|
|
adjust_instability(4)
|
|
if(welder && user && (welder.loc == user))
|
|
welder.loc = src
|
|
else
|
|
welder = null
|
|
qdel(src)
|
|
return
|