- add: Changeling antagonist (#2)

* Changeling WIP

* UI

* Pointers fix

* Moved out abilities

* Regenerate ability

* Fixed Regenerate ability
Prevent ghosting while regenerating

* Cleanup

* Base lesser form

* Finished Lesser Form && Transform

* Transform Sting

* Blind Sting

* Mute Sting
Added OnExamine on absorbed human

* Hallucination Sting
Changeling Absorb and transfer absorbed entities to absorber

* Cryogenic Sting

* Adrenaline Sacs

* Transform now uses Polymorph

* Armblade, Shield, Armor

* Tentacle Arm ability
Tentacle Gun system

* WIP with bugs

* WiP bugs

* fix implant transfer

* Fixed bugs with shop transfer and actions transfer

* Just in case

* Vi sitter i ventrilo och spelar DotA

* Fixes and proper LesserForm tracking

* !!!!!

* Fixed empty buttons

* WIP Gamerule
Ready - shop

* nerf stun time cause its sucks

* cleaning

* just in case

* Absorb DNA Objective.

* Partial objectives with bugs

* fix

* fix pointer

* Changeling objectives

* Changeling objectives №2

* Admin verb, game rule

* Fixed empty list check
Icons for objectives

* Changeling chat, changeling names etc.

* fix some merge errors

* - fix: Fixed all bugs with changeling

---------

Co-authored-by: Y-Parvus <yevhen.parvus@gmail.com>
Co-authored-by: Y-Parvus <61109031+Y-Parvus@users.noreply.github.com>
Co-authored-by: HitPanda <104197232+EnefFlow@users.noreply.github.com>
Co-authored-by: EnefFlow <regeto90@mail.ru>
This commit is contained in:
rhailrake
2024-01-31 14:01:35 +00:00
committed by GitHub
parent 7872502bf8
commit aa8e31fa7e
127 changed files with 3747 additions and 33 deletions

View File

@@ -117,7 +117,8 @@ public abstract class SharedSubdermalImplantSystem : EntitySystem
/// <param name="target">The entity to be implanted</param>
/// <param name="implant"> The implant</param>
/// <param name="component">The implant component</param>
public void ForceImplant(EntityUid target, EntityUid implant, SubdermalImplantComponent component)
/// <param name="containerForce">Should we force inserting in container</param>
public void ForceImplant(EntityUid target, EntityUid implant, SubdermalImplantComponent component, bool containerForce = false)
{
//If the target doesn't have the implanted component, add it.
var implantedComp = EnsureComp<ImplantedComponent>(target);
@@ -175,6 +176,48 @@ public abstract class SharedSubdermalImplantSystem : EntitySystem
RaiseLocalEvent(implant, relayEv);
}
}
//Miracle edit
/// <summary>
/// Transfers all implants from one entity to another.
/// </summary>
/// <remarks>
/// This method transfers all implants from a donor entity to a recipient entity.
/// Implants are moved from the donor's implant container to the recipient's implant container.
/// </remarks>
/// <param name="donor">The entity from which implants will be transferred.</param>
/// <param name="recipient">The entity to which implants will be transferred.</param>
public void TransferImplants(EntityUid donor, EntityUid recipient)
{
// Check if the donor has an ImplantedComponent, indicating the presence of implants
if (!TryComp<ImplantedComponent>(donor, out var donorImplanted))
return;
// Get the implant containers for both the donor and recipient entities
var donorImplantContainer = donorImplanted.ImplantContainer;
// Get all implants from the donor's implant container
var donorImplants = donorImplantContainer.ContainedEntities.ToArray();
// Transfer each implant from the donor to the recipient
foreach (var donorImplant in donorImplants)
{
// Check for any conditions or filters before transferring (if needed)
// For instance, verifying if the recipient can receive specific implants, etc.
// Remove the implant from the donor's implant container
_container.Remove(donorImplant, donorImplantContainer, force: true);
if(!TryComp<SubdermalImplantComponent>(donorImplant, out var subdermal))
return;
// Insert the implant into the recipient's implant container
ForceImplant(recipient, donorImplant, subdermal, true);
}
}
//Miracle edit end
}
public sealed class ImplantRelayEvent<T> where T : notnull