Files
Aurora.3/code/modules/spells/spell_projectile.dm
Lohikar 0cba68911d Lighting Overhaul & General process improvements (#1612)
This is it. The big one.
Risk: Very large. This modifies or rewrites several important systems.
Some things still need balancing, but that's probably better done if/when this hits dev.

changes:

New smooth lighting system.
Machinery split into three processes: machinery, powernet, pipenet Removed due to breakage. Refactored into multi-step process.
Mob process rewritten.
NanoUI process rewritten.
Objects process rewritten.
Tweaked color output of station lights.
Slime core lights now emit colored light.
Fixed light update frequency issue with fire alarms, hydroponics trays, and airlocks.
Increased light emission from bolted airlocks.
Miscellaneous performance improvements.
New datum pool implementation.
New lighting usage profiler.
Lighting system now tracks UV light, which is not visible to players.
Space now has a parallax effect.
Disabled Spin View verbs due to incompatibility with the new lighting system.
Disabled hallucination view spin due to incompatibility with the new lighting system.
Lighting system now initializes in the lobby before the round starts to reduce BoR deadtime.
Added UV light tracking to lighting engine; dionae now gain energy exclusively from UV light.
Added colored lighting to a few consoles that used default (white) light.
2017-01-29 01:13:54 +02:00

56 lines
1.5 KiB
Plaintext

/obj/item/projectile/spell_projectile
name = "spell"
icon = 'icons/obj/projectiles.dmi'
nodamage = 1 //Most of the time, anyways
var/spell/targeted/projectile/carried
penetrating = 0
kill_count = 10 //set by the duration of the spell
var/proj_trail = 0 //if it leaves a trail
var/proj_trail_lifespan = 0 //deciseconds
var/proj_trail_icon = 'icons/obj/wizard.dmi'
var/proj_trail_icon_state = "trail"
var/list/trails = new()
/obj/item/projectile/spell_projectile/Destroy()
for(var/trail in trails)
qdel(trail)
carried = null
return ..()
/obj/item/projectile/spell_projectile/ex_act()
return
/obj/item/projectile/spell_projectile/before_move()
if(proj_trail && src && src.loc) //pretty trails
var/obj/effect/overlay/trail = getFromPool(/obj/effect/overlay, src.loc)
trails += trail
trail.icon = proj_trail_icon
trail.icon_state = proj_trail_icon_state
trail.density = 0
spawn(proj_trail_lifespan)
trails -= trail
qdel(trail)
/obj/item/projectile/spell_projectile/proc/prox_cast(var/list/targets)
if(loc)
carried.prox_cast(targets, src)
qdel(src)
return
/obj/item/projectile/spell_projectile/Bump(var/atom/A)
if(loc && carried)
prox_cast(carried.choose_prox_targets(user = carried.holder, spell_holder = src))
return 1
/obj/item/projectile/spell_projectile/on_impact()
if(loc && carried)
prox_cast(carried.choose_prox_targets(user = carried.holder, spell_holder = src))
return 1
/obj/item/projectile/spell_projectile/seeking
name = "seeking spell"