Ling stuff (#245)

* - fix: Absorb is transfered on transform.

* - fix: Transfer absorbed count on transform.

* - fix: Transfer rev roles on transform.

* - add: Ling mood effect.

* - tweak: Buff armblade.

* - fix: Transfer mood on transform.

* - tweak: Better absorbed desc.

* - add: Hive head.

* - remove: No popup.
This commit is contained in:
Aviu00
2024-03-25 21:57:32 +09:00
committed by GitHub
parent c60f37788a
commit da0f192444
20 changed files with 310 additions and 19 deletions

View File

@@ -0,0 +1,20 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Changeling;
[RegisterComponent]
public sealed partial class HiveHeadComponent : Component
{
[DataField]
public int BeesAmount = 4;
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string BeeProto = "MobTemporaryAngryBee";
[DataField(customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string Action = "ActionReleaseBees";
[DataField]
public EntityUid? ActionEntity;
}

View File

@@ -86,6 +86,14 @@ public sealed partial class ChitinousArmorActionEvent : InstantActionEvent
{
}
public sealed partial class HiveHeadActionEvent : InstantActionEvent
{
}
public sealed partial class ReleaseBeesEvent : InstantActionEvent
{
}
public sealed partial class TentacleArmActionEvent : InstantActionEvent
{
}

View File

@@ -1,6 +1,7 @@
using System.Numerics;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Humanoid;
using Content.Shared.Mobs.Components;
using Content.Shared.Physics;
using Content.Shared.Projectiles;
using Content.Shared.Stunnable;
@@ -11,6 +12,7 @@ using Content.Shared.Weapons.Ranged.Systems;
using Robust.Shared.Input;
using Robust.Shared.Network;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Events;
using Robust.Shared.Random;
using Robust.Shared.Serialization;
using Robust.Shared.Timing;
@@ -36,6 +38,22 @@ public abstract class SharedTentacleGun : EntitySystem
SubscribeLocalEvent<TentacleGunComponent, GunShotEvent>(OnTentacleShot);
SubscribeLocalEvent<TentacleProjectileComponent, MapInitEvent>(OnMapInit); // WD
SubscribeLocalEvent<TentacleProjectileComponent, ProjectileEmbedEvent>(OnTentacleCollide);
SubscribeLocalEvent<TentacleProjectileComponent, PreventCollideEvent>(PreventCollision);
}
private void PreventCollision(Entity<TentacleProjectileComponent> ent, ref PreventCollideEvent args)
{
if (HasComp<MobStateComponent>(args.OtherEntity) && !HasComp<HumanoidAppearanceComponent>(args.OtherEntity))
{
args.Cancelled = true;
return;
}
if (!TryComp(ent, out ProjectileComponent? projectile))
return;
if (args.OtherEntity == projectile.Shooter || args.OtherEntity == projectile.Weapon)
args.Cancelled = true;
}
// WD EDIT START