Files
Aurora.3/code/game/objects/effects/effect_system.dm
Matt Atlas d9b79db97b Psionics Rework: Kyoushiki Murasaki (#16951)
* Your unbeatable smile wrecks the media

 We wanna know your secret, so mysterious

* Even the things she lacks end up in her area

Such a perfect liar, you are

* Miss ingenious, godly idol!

(You're my savior, you're my saving grace)

* So, what'd you eat today?

What's your favorite book?

* And if you wanna go to play, where are you gonna go?

I haven't eaten at all

* That's a secret

No matter what you ask

* She's elusive, evasive

* So nonchalant

Yet still shining bright;

* Her secret: out of sight, as if visible, has the taste of honey

There is none, none, none of this

* And also none, none, none of that

What type of guy do you like?

* Who is your partner?

Come on, answer me

* "I don't understand what falling in love with someone else is like" (Hey! Hey!)

I cannot tell what is true from what is a lie (Hey! Hey! Hey! Hey!)

* And yet again, someone falls for such words (Hey! Hey! Hey! Hey!)

Gently lulled into love

* Drawing everyone's eyes

You are the perfect, ultimate idol

* Never to appear again

A reincarnation of Venus

* With that smile, with that "I love you"

You captivate everyone

* Even if those eyes, those words, are false

They make up a perfect love (Ai)

* Yeah, yeah, that girl stands out, exceptional

We were extras from the beginning

* BS that acted as adornments for the star's leading role

Everything we've accomplished is thanks to her — no!

* How impudent

How could envy and jealousy not exist?

* examine

* This isn't some made-up drama for appearances

So I cannot forgive

* You're not perfect, I cannot forgive you

I cannot forgive myself

* I cannot accept any version of you other than the one stronger than everyone else

* Everybody trusts and worships

The very strongest, most invincible idol

* Weaknesses and whatnot are not to be found

Carrying the morning star within

* Showing any weakness is no good, no good (Hey! Hey!)

Don't let them see anything that they don't want to know (Hey! Hey! Hey! Hey!)

* Anything but being one-of-a-kind is a definite no, no (Hey! Hey! Hey! Hey!)

That is the real love (Hey!)

* can commune fixes

* can commune rename

* fix is psi blocked

* fixes agian

* My signature smile that fires up the media

The only secret that I shall keep is this:

* My career was built upon fake "I love you"s

This is love, in my own way

* Even the flowing sweats are beautiful Aqua

These eyelids that hid the Ruby within

* Sing, dance, flutter, I am Maria —

Right, lying is the most exquisite form of love

* I have never been loved by anyone

Nor have I loved anyone else

* That such lies of mine will become true someday

I trust in it

* Someday, surely, I will have it all in hand

I am such a greedy idol

* Because I wish to love everybody properly in a life-sized way

I shall lie today as well (Hey! Hey! Hey! Hey!)

* a

* b

* c

* d

* And yet, still, (Hey! Hey!)

I have been unable to tell you, and you, alone (Hey! Hey! Hey! Hey!)

* jesus christ

* Update code/controllers/subsystems/processing/psi.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/controllers/subsystems/processing/psi.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/controllers/subsystems/processing/psi.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/game/gamemodes/technomancer/spell_objs.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/human.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/mob/living/carbon/human/human_helpers.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/organs/organ_external.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/assay.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/command.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/emotional_suggestion.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/grip.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/grip.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/mend.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/mend.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/mend.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/psi_search.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/shockwave.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/shockwave.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/singularity.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/abilities/time_stop.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/events/mini_spasm.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/interface/ui_hub.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/interface/ui_hub.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/interface/ui_hub.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/interface/ui_hub.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/interface/ui_hub.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* Update code/modules/psionics/interface/ui_hub.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* cl update

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
2023-07-31 20:56:52 +02:00

405 lines
10 KiB
Plaintext

/* This is an attempt to make some easily reusable "particle" type effect, to stop the code
constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one
defined, then set up when it is created with New(). Then this same system can just be reused each time
it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam
would spawn and follow the beaker, even if it is carried or thrown.
*/
/obj/effect
name = "effect"
icon = 'icons/effects/effects.dmi'
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
unacidable = 1//So effect are not targeted by alien acid.
pass_flags = PASSTABLE | PASSGRILLE
/obj/effect/Destroy()
if(reagents)
reagents.delete()
return ..()
/datum/effect/effect/system
var/number = 3
var/cardinals = 0
var/turf/location
var/atom/holder
var/setup = 0
/datum/effect/effect/system/proc/set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
setup = 1
/datum/effect/effect/system/proc/attach(atom/atom)
holder = atom
/datum/effect/effect/system/proc/start()
/////////////////////////////////////////////
// GENERIC STEAM SPREAD SYSTEM
//Usage: set_up(number of bits of steam, use North/South/East/West only, spawn location)
// The attach(atom/atom) proc is optional, and can be called to attach the effect
// to something, like a smoking beaker, so then you can just call start() and the steam
// will always spawn at the items location, even if it's moved.
/* Example:
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system
steam.set_up(5, 0, mob.loc) -- sets up variables
OPTIONAL: steam.attach(mob)
steam.start() -- spawns the effect
*/
/////////////////////////////////////////////
/obj/effect/effect/steam
name = "steam"
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
density = 0
/datum/effect/effect/system/steam_spread
/datum/effect/effect/system/steam_spread/set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
/datum/effect/effect/system/steam_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
var/direction
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(1,2,3), i++)
sleep(5)
step(steam,direction)
QDEL_IN(steam, 20)
/////////////////////////////////////////////
//// SMOKE SYSTEMS
// direct can be optinally added when set_up, to make the smoke always travel in one direction
// in case you wanted a vent to always smoke north for example
/////////////////////////////////////////////
/obj/effect/effect/smoke
name = "smoke"
icon_state = "smoke"
opacity = 1
anchored = 0.0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/amount = 6.0
var/time_to_live = 100
//Remove this bit to use the old smoke
icon = 'icons/effects/96x96.dmi'
pixel_x = -32
pixel_y = -32
/obj/effect/effect/smoke/New(var/loc, var/duration = 0)
..()
if (duration)
time_to_live = duration
addtimer(CALLBACK(src, PROC_REF(kill)), time_to_live)
/obj/effect/effect/smoke/proc/kill()
animate(src, alpha = 0, time = 2 SECONDS, easing = QUAD_EASING)
set_opacity(FALSE)
QDEL_IN(src, 2.5 SECONDS)
/obj/effect/effect/smoke/Crossed(mob/living/carbon/M as mob )
..()
if(istype(M))
affect(M)
/obj/effect/effect/smoke/proc/affect(var/mob/living/carbon/M)
if (istype(M))
return 0
if (M.internal != null)
if(M.wear_mask && (M.wear_mask.item_flags & AIRTIGHT))
return 0
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.head && (H.head.item_flags & AIRTIGHT))
return 0
return 0
return 1
/////////////////////////////////////////////
// Illumination
/////////////////////////////////////////////
/obj/effect/effect/smoke/illumination
name = "illumination"
opacity = 0
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
time_to_live=lifetime
..()
set_light(brightness)
/////////////////////////////////////////////
// Bad smoke
/////////////////////////////////////////////
/obj/effect/effect/smoke/bad
time_to_live = 200
/obj/effect/effect/smoke/bad/Move()
..()
for(var/mob/living/carbon/M in get_turf(src))
affect(M)
/obj/effect/effect/smoke/bad/affect(var/mob/living/carbon/M)
if (!..())
return 0
M.drop_item()
M.adjustOxyLoss(1)
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn ( 20 )
M.coughedtime = 0
/obj/effect/effect/smoke/bad/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover, /obj/item/projectile/beam))
var/obj/item/projectile/beam/B = mover
B.damage = (B.damage/2)
return 1
/////////////////////////////////////////////
// Sleep smoke
/////////////////////////////////////////////
/obj/effect/effect/smoke/sleepy
/obj/effect/effect/smoke/sleepy/Move()
..()
for(var/mob/living/carbon/M in get_turf(src))
affect(M)
/obj/effect/effect/smoke/sleepy/affect(mob/living/carbon/M as mob )
if (!..())
return 0
M.drop_item()
M:sleeping += 1
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
spawn ( 20 )
M.coughedtime = 0
/////////////////////////////////////////////
// Mustard Gas
/////////////////////////////////////////////
/obj/effect/effect/smoke/mustard
name = "mustard gas"
icon_state = "mustard"
/obj/effect/effect/smoke/mustard/Move()
..()
for(var/mob/living/carbon/human/R in get_turf(src))
affect(R)
/obj/effect/effect/smoke/mustard/affect(var/mob/living/carbon/human/R)
if (!..())
return 0
if (R.wear_suit != null)
return 0
R.burn_skin(0.75)
if (R.coughedtime != 1)
R.coughedtime = 1
R.emote("gasp")
spawn (20)
R.coughedtime = 0
R.updatehealth()
return
/////////////////////////////////////////////
// Smoke spread
/////////////////////////////////////////////
/datum/effect/effect/system/smoke_spread
var/total_smoke = 0 // To stop it being spammed and lagging!
var/direction
var/smoke_type = /obj/effect/effect/smoke
var/smoke_duration
/datum/effect/effect/system/smoke_spread/set_up(n = 5, c = 0, loca, direct, duration = 0)
smoke_duration = duration
if(n > 10)
n = 10
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
if(direct)
direction = direct
/datum/effect/effect/system/smoke_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/smoke/smoke = new smoke_type(src.location)
smoke.layer = ABOVE_MOB_LAYER
src.total_smoke++
var/direction = src.direction
if(!direction)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(smoke,direction)
spawn(smoke.time_to_live*0.75+rand(10,30))
src.total_smoke--
qdel(smoke)
/datum/effect/effect/system/smoke_spread/bad
smoke_type = /obj/effect/effect/smoke/bad
/datum/effect/effect/system/smoke_spread/sleepy
smoke_type = /obj/effect/effect/smoke/sleepy
/datum/effect/effect/system/smoke_spread/mustard
smoke_type = /obj/effect/effect/smoke/mustard
/////////////////////////////////////////////
//////// Attach a steam trail to an object (eg. a reacting beaker) that will follow it
// even if it's carried of thrown.
/////////////////////////////////////////////
/datum/effect/effect/system/steam_trail_follow
var/turf/oldposition
var/processing = 1
var/on = 1
/datum/effect/effect/system/steam_trail_follow/set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
/datum/effect/effect/system/steam_trail_follow/start()
if(!src.on)
src.on = 1
src.processing = 1
if(src.processing)
src.processing = 0
spawn(0)
if(src.number < 3)
var/obj/effect/effect/steam/I = new /obj/effect/effect/steam(src.oldposition)
src.number++
src.oldposition = get_turf(holder)
I.set_dir(src.holder.dir)
spawn(10)
qdel(I)
src.number--
spawn(2)
if(src.on)
src.processing = 1
src.start()
else
spawn(2)
if(src.on)
src.processing = 1
src.start()
/datum/effect/effect/system/steam_trail_follow/proc/stop()
src.processing = 0
src.on = 0
/datum/effect/effect/system/reagents_explosion
var/amount // TNT equivalent
var/flashing = 0 // does explosion creates flash effect?
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
/datum/effect/effect/system/reagents_explosion/set_up(amt, loc, flash = 0, flash_fact = 0)
amount = amt
if(istype(loc, /turf/))
location = loc
else
location = get_turf(loc)
flashing = flash
flashing_factor = flash_fact
return
/datum/effect/effect/system/reagents_explosion/start()
if (amount <= 2)
spark(location, 2)
for(var/mob/M in viewers(5, location))
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
for(var/mob/M in viewers(1, location))
if (prob (50 * amount))
to_chat(M, "<span class='warning'>The explosion knocks you down.</span>")
M.Weaken(rand(1,5))
return
else
var/devst = -1
var/heavy = -1
var/light = -1
var/flash = -1
// Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs
if (round(amount/12) > 0)
devst = devst + amount/12
if (round(amount/6) > 0)
heavy = heavy + amount/6
if (round(amount/3) > 0)
light = light + amount/3
if (flashing && flashing_factor)
flash = (amount/4) * flashing_factor
for(var/mob/M in viewers(8, location))
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
explosion(
location,
round(min(devst, BOMBCAP_DVSTN_RADIUS)),
round(min(heavy, BOMBCAP_HEAVY_RADIUS)),
round(min(light, BOMBCAP_LIGHT_RADIUS)),
round(min(flash, BOMBCAP_FLASH_RADIUS))
)
/obj/effect/temporary_effect
name = "self deleting effect"
desc = "How are you examining what which cannot be seen?"
icon = 'icons/effects/effects.dmi'
invisibility = 0
var/time_to_die = 10 SECONDS // Afer which, it will delete itself.
/obj/effect/temporary_effect/Initialize()
. = ..()
if(time_to_die)
QDEL_IN(src, time_to_die)