Files
Aurora.3/code/modules/psionics/abilities/_ability.dm
AlaunusLux 6bf406067c Various Borer fixes (#18969)
I changed add_antag to add_antag_mind in borer/LateLogin because the
former proc re-created the borer, causing it to drop the src/client
reference. The only notable difference I observe is the antag noise
doesn't play, which could be added manually if needed. Alternative
methods to solve this would be welcome, though. I did have an
alternative method
[here](5d4157588b),
but that only "fixed" the ghost spawner, not admin possession. I also
say "fixed" because that method does not give the post ghost-spawn
message.


Fixes #18600 

- The implant check was only checking for objs, which the borer implant
is not. The borer was also erroneously being removed from the implants
list when releasing control back to their host.

Fixes #18281 

- This had a few pain points. psi was null, so it made the callback for
activating powers fail. Once that was fixed, it caused many RTEs when
trying to draw the HUD/screen for the powers. Refactoring a few
encoding/decoding procs fixed that.
Fixing these issues fixed borer monkeys not being able to speak TCB,
which is strange because I thought I'd seen a borer monkey speaking TCB
during a round where the psychic bug existed.

Fixes #9621 

- For this, I switched rejuvenate to revive. This lets them move, and
also does not kill them again due to brain damage. If it proves to be
too strong, it can be tweaked, but I did want to get brain devouring
working for this PR.

- There's also the jumpstart verb, which seems will never be used with
this revive in place (or even before, with the rejuvenate). I suppose it
can be used if they die again after reviving.

- Should a message be added to the revive given during the devouring
process? Jumpstart gives one:

`visible_message(SPAN_WARNING("With a hideous, rattling moan, [src]
shudders back to life!"))`

Fixes #9523


Also fixes borers not being able to infest someone they are being held
by.

Existing Issues not addressed by this PR:
- Infesting a monkey does not give you the monkey's health HUD (because
it doesn't exist?). Assuming and releasing control will show it, though.
- Borer antag overlay icons on Mobs seems inconsistent. potentially due
to testing methods with clientless mobs
- Borers cannot use psychic lance while being held
- Psi aura on first receiving powers. Equip first ability and drop to
fix.

---------

Signed-off-by: AlaunusLux <89751433+AlaunusLux@users.noreply.github.com>
2024-06-08 16:54:28 +00:00

30 lines
1.1 KiB
Plaintext

/singleton/psionic_power
/// Ability name.
var/name
/// Description of what the ability does.
var/desc
/// Spell object to spawn. Must be a path.
var/spell_path
/// Spell icon state.
var/icon_state
/// Ability flags define who can pick an ability - ship characters, adminspawn characters, antags.
var/ability_flags
/// Minimum required rank to use an ability.
var/minimum_rank = PSI_RANK_SENSITIVE
/// Point shop cost.
var/point_cost = 1
/// Called when a power is given to a mob.
/singleton/psionic_power/proc/apply(var/mob/living/carbon/human/H)
if(H.ability_master)
var/obj/spellbutton/spell = new(H, spell_path, name, icon_state)
H.ability_master.add_psionic_ability(spell, icon_state, src, H)
H.psi.psionic_powers |= type
return TRUE
else
log_debug("Psionic power [src.name] given to mob [H] without ability master!")
return FALSE
/// A psionic power is made up of two elements: the psionic power singleton (which defines the ability metadata such as its name, description, and cost)
/// and the physical spell object, which defines its behaviour when used. Keep in mind that ALL psionic abilities MUST have the ASPECT_PSIONIC aspect!