Skip to content

Commit

Permalink
пупупу
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 committed Sep 7, 2024
1 parent bbc82ab commit d01fd91
Show file tree
Hide file tree
Showing 23 changed files with 315 additions and 530 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
using Content.Server.Body.Components;
using Content.Server.Chat.Systems;
using Content.Server.Doors.Systems;
using Content.Server.Magic.Components;
using Content.Server.Weapons.Ranged.Systems;
using Content.Shared.Actions;
using Content.Shared.Body.Components;
Expand Down Expand Up @@ -392,7 +391,7 @@ private void ToggleLevitation(EntityUid uid, LevitationActComponent component)

if (component.Active)
{
_alerts.ShowAlert(uid, AlertType.ADTLevitation);
_alerts.ShowAlert(uid, _proto.Index(component.Alert));
AddComp<MovementIgnoreGravityComponent>(uid);
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(uid);
var sprintSpeed = component.SpeedModifier;
Expand All @@ -402,7 +401,7 @@ private void ToggleLevitation(EntityUid uid, LevitationActComponent component)
}
else
{
_alerts.ClearAlert(uid, AlertType.ADTLevitation);
_alerts.ShowAlert(uid, _proto.Index(component.Alert));
RemComp<MovementIgnoreGravityComponent>(uid);
var movementSpeed = EnsureComp<MovementSpeedModifierComponent>(uid);
var sprintSpeed = component.BaseSprintSpeed;
Expand Down Expand Up @@ -447,37 +446,37 @@ private void OnElectrionPulse(EntityUid uid, ElectrionPulseActComponent componen
// if (_container.IsEntityOrParentInContainer(uid))
// return;

var xform = Transform(uid);
var ignitionRadius = component.IgnitionRadius;
IgniteNearby(uid, xform.Coordinates, component.Severity, ignitionRadius, component);
// var xform = Transform(uid);
// var ignitionRadius = component.IgnitionRadius;
// IgniteNearby(uid, xform.Coordinates, component.Severity, ignitionRadius, component);
//_audio.PlayPvs(component.IgniteSound, uid);

//args.Handled = true;
}


/// <summary>
/// Ignites flammable objects within range.
/// </summary>
public void IgniteNearby(EntityUid uid, EntityCoordinates coordinates, float severity, float radius, ElectrionPulseActComponent component)
{
//_flammables.Clear();
//_lookup.GetEntitiesInRange(coordinates, radius, _electrocution);
var range = component.MaxElectrocuteRange * component.Severity; //component.Stability;
var damage = (int) (component.MaxElectrocuteDamage * component.Severity);
var duration = component.MaxElectrocuteDuration * component.Severity;

foreach (var flammable in _electrocutio)
{
var ent = flammable.Owner;
if (ent != uid)
{
var stackAmount = 2 + (int) (severity / 0.15f);
//_flammable.AdjustFireStacks(ent, stackAmount, flammable);
//_flammable.Ignite(ent, uid, flammable);
_electrocution.TryDoElectrocution(ent, uid, damage, duration, true, statusEffects: comp, ignoreInsulation: true);
}

}
}
// public void IgniteNearby(EntityUid uid, EntityCoordinates coordinates, float severity, float radius, ElectrionPulseActComponent component)
// {
// //_flammables.Clear();
// //_lookup.GetEntitiesInRange(coordinates, radius, _electrocution);
// var range = component.MaxElectrocuteRange * component.Severity; //component.Stability;
// var damage = (int) (component.MaxElectrocuteDamage * component.Severity);
// var duration = component.MaxElectrocuteDuration * component.Severity;

// foreach (var flammable in _electrocutio)
// {
// var ent = flammable.Owner;
// if (ent != uid)
// {
// var stackAmount = 2 + (int) (severity / 0.15f);
// //_flammable.AdjustFireStacks(ent, stackAmount, flammable);
// //_flammable.Ignite(ent, uid, flammable);
// _electrocution.TryDoElectrocution(ent, uid, damage, duration, true, statusEffects: comp, ignoreInsulation: true);
// }

// }
// }

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private void ItemUsed(EntityUid uid, MindFlushComponent component, UseInHandEven
return;

var transform = EntityManager.GetComponent<TransformComponent>(uid);
var flashableQuery = GetEntityQuery<FlashableComponent>();
var flashableQuery = GetEntityQuery<EyeComponent>();

foreach (var entity in _entityLookup.GetEntitiesInRange(transform.Coordinates, component.Range))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace Content.Shared.ComponentalActions;

[ImplicitDataDefinitionForInheritors]
public abstract partial class ComponentalActionsSpawnData
{

}

/// <summary>
/// Spawns 1 at the caster's feet.
/// </summary>
public sealed partial class TargetCasterPos : ComponentalActionsSpawnData { }

/// <summary>
/// Targets the 3 tiles in front of the caster.
/// </summary>
public sealed partial class TargetInFront : ComponentalActionsSpawnData
{
[DataField("width")] public int Width = 3;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;

namespace Content.Shared.ComponentalActions.Components;

[RegisterComponent]
[AutoGenerateComponentState(true)]
public sealed partial class HealActComponent : Component
{
[DataField("healSound")]
public SoundSpecifier HealSound = new SoundPathSpecifier("/Audio/Effects/blobattack.ogg");

/// <summary>
/// Volume control for the spell.
/// </summary>
[DataField("healVolume")]
public float HealVolume = 1f;

[DataField]
public float RegenerateBurnHealAmount = -50f;

[DataField]
public float RegenerateBruteHealAmount = -75f;

[DataField]
public float RegenerateBloodVolumeHealAmount = 100f;

[DataField]
public float RegenerateBleedReduceAmount = -100f;

[DataField("healAction")]
public EntProtoId Action = "CompActionHeal";

[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;

namespace Content.Shared.ComponentalActions.Components;

[RegisterComponent]
[AutoGenerateComponentState(true)]
public sealed partial class InvisibilityActComponent : Component
{
[DataField]
public bool Active = false;

[DataField("passiveVisibilityRate")]
public float PassiveVisibilityRate = -0.10f;

[DataField("movementVisibilityRate")]
public float MovementVisibilityRate = 0.10f;

[DataField("minVisibility")]
public float MinVisibility = -1f;

[DataField("maxVisibility")]
public float MaxVisibility = 1.5f;

[DataField("stealthAction")]
public EntProtoId Action = "CompActionStealth";

[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;

namespace Content.Shared.ComponentalActions.Components;

[RegisterComponent]
[AutoGenerateComponentState(true)]
public sealed partial class JumpActComponent : Component
{
[DataField("jumpSound")]
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Effects/Footsteps/suitstep2.ogg");

/// <summary>
/// Volume control for the spell.
/// </summary>
[DataField("jumpVolume")]
public float Volume = 1f;

[DataField("jumpStrength")]
public float Strength = 13f;

[DataField("jumpAction")]
public EntProtoId Action = "CompActionJump";

[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Robust.Shared.Prototypes;
using Content.Shared.Alert;

namespace Content.Shared.ComponentalActions.Components;

[RegisterComponent]
[AutoGenerateComponentState(true)]
public sealed partial class LevitationActComponent : Component
{
[DataField]
public float SpeedModifier = 2f;

[DataField]
public float BaseSprintSpeed = 4.5f;

[DataField]
public float BaseWalkSpeed = 2.5f;

[DataField]
public bool Active = false;

[DataField("blinkAction")]
public EntProtoId Action = "CompLevitationAction";

[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;

[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public ProtoId<AlertPrototype> Alert = "ADTLevitation";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Shared.ComponentalActions.Components;

[RegisterComponent]
[AutoGenerateComponentState(true)]
public sealed partial class ProjectileActComponent : Component
{
/// <summary>
/// What entity should be spawned.
/// </summary>
[DataField("prototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string Prototype = "BulletKinetic";

/// <summary>
/// Gets the targeted spawn positions; may lead to multiple entities being spawned.
/// </summary>
[DataField("posData")]
public ComponentalActionsSpawnData Pos = new TargetCasterPos();

[DataField]
public SoundSpecifier ShootSound = new SoundPathSpecifier("/Audio/Weapons/Xeno/alien_spitacid.ogg");

[DataField("shootVolume")]
public float ShootVolume = 5f;

[DataField("projAction")]
public EntProtoId Action = "CompActionShoot";

[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;

namespace Content.Shared.ComponentalActions.Components;

[RegisterComponent]
[AutoGenerateComponentState(true)]
public sealed partial class StasisHealActComponent : Component
{
[DataField]
public bool Active = false;

[DataField]
public float SpeedModifier = 1f;

[DataField]
public float BaseSprintSpeed = 3f;

[DataField]
public float BaseWalkSpeed = 3f;

[DataField]
public float RegenerateBurnHealAmount = -0.05f;

[DataField]
public float RegenerateBruteHealAmount = -0.1f;

[DataField]
public float RegenerateBloodVolumeHealAmount = 0.25f;

[DataField]
public float RegenerateBleedReduceAmount = -0.01f;

[DataField("healAction")]
public EntProtoId Action = "CompActionStasisHeal";

[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;

namespace Content.Shared.ComponentalActions.Components;

[RegisterComponent]
[AutoGenerateComponentState(true)]
public sealed partial class TeleportActComponent : Component
{
[DataField("blinkSound")]
public SoundSpecifier BlinkSound = new SoundPathSpecifier("/Audio/Magic/blink.ogg");

/// <summary>
/// Volume control for the spell.
/// </summary>
[DataField("blinkVolume")]
public float BlinkVolume = 5f;

[DataField("blinkAction")]
public EntProtoId Action = "CompActionTeleport";

[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;

}
2 changes: 1 addition & 1 deletion Content.Shared/Stealth/Components/StealthComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Content.Shared.Stealth.Components;
/// Use other components (like StealthOnMove) to modify this component's visibility based on certain conditions.
/// </summary>
[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedStealthSystem))]
//[Access(typeof(SharedStealthSystem))]
public sealed partial class StealthComponent : Component
{
/// <summary>
Expand Down
Loading

0 comments on commit d01fd91

Please sign in to comment.