Skip to content

Commit

Permalink
Правки
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 committed Sep 9, 2024
1 parent 4ff7914 commit 3bf2514
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Robust.Server.GameObjects;
using System.Threading;


namespace Content.Server.ComponentalActions.EntitySystems;
Expand Down Expand Up @@ -413,15 +414,17 @@ private void OnElectrionPulse(EntityUid uid, ElectrionPulseActComponent componen
{
if (args.Handled)
return;
_chat.TrySendInGameICMessage(uid, "щёлкает пальцами", InGameICChatType.Emote, ChatTransmitRange.Normal);
_chat.TrySendInGameICMessage(uid, "щёлкает пальцами", InGameICChatType.Emote, ChatTransmitRange.HideChat);

_light.SetEnabled(uid, true);
_light.SetColor(uid, Color.FromHex("#a83da8"));
_light.SetRadius(uid, 1.7f);
_light.SetEnergy(uid, 160f);
_audio.PlayPvs(component.IgniteSound, uid);

var despawn = AddComp<TimedDespawnComponent>(uid);
despawn.Lifetime = 2.1f;
Thread.Sleep(2000); //2 секунды задержка
_audio.PlayPvs(component.IgniteSound, uid);

// // Создаем таймер для задержки
// System.Timers.Timer timer = new System.Timers.Timer();
Expand All @@ -441,7 +444,7 @@ private void OnElectrionPulse(EntityUid uid, ElectrionPulseActComponent componen
// };
// timer.Start();

// args.Handled = true;
args.Handled = true;
}

// //OnElectrionPulseAction(uid, component);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed partial class ElectrionPulseActComponent : Component
/// Radius of objects that will be ignited if flammable.
/// </summary>
[DataField]
public float IgnitionRadius = 4f;
public float IgnitionRadius = 5f;

[DataField("lifetime")]
public float Lifetime = 5f;
Expand All @@ -41,19 +41,19 @@ public sealed partial class ElectrionPulseActComponent : Component
[DataField, ViewVariables(VVAccess.ReadWrite)]
public int MaxBoltCount = 5;

/// <summary>
/// The maximum radius of the passive electrocution effect
/// scales with stability
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float MaxElectrocuteRange = 7f;
// /// <summary>
// /// The maximum radius of the passive electrocution effect
// /// scales with stability
// /// </summary>
// [DataField, ViewVariables(VVAccess.ReadWrite)]
// public float MaxElectrocuteRange = 7f;

/// <summary>
/// The maximum amount of damage the electrocution can do
/// scales with severity
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float MaxElectrocuteDamage = 20f;
// /// <summary>
// /// The maximum amount of damage the electrocution can do
// /// scales with severity
// /// </summary>
// [DataField, ViewVariables(VVAccess.ReadWrite)]
// public float MaxElectrocuteDamage = 20f;

/// <summary>
/// The maximum amount of time the electrocution lasts
Expand All @@ -66,7 +66,7 @@ public sealed partial class ElectrionPulseActComponent : Component
/// Radius of objects that will be ignited if flammable.
/// </summary>
[DataField]
public SoundSpecifier IgniteSound = new SoundPathSpecifier("/Audio/Magic/rumble.ogg");
public SoundSpecifier IgniteSound = new SoundPathSpecifier("/Audio/Magic/forcewall.ogg");

[ViewVariables(VVAccess.ReadWrite)]
public float Severity = 0.3f;
Expand Down
7 changes: 2 additions & 5 deletions Resources/Prototypes/ADT/Actions/componental_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,9 @@
components:
- type: InstantAction
icon:
sprite: /Textures/ADT/Interface/alerts.rsi
state: levitation
sprite: /Textures/ADT/Interface/Alerts/evaporation.rsi
state: evaporation
itemIconStyle: BigAction
checkCanInteract: false
event: !type:CompElectrionPulseActionEvent
useDelay: 5



Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions Resources/Textures/ADT/Interface/Alerts/evaporation.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Made by discord:Schrodinger71, for Adventure Time",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "evaporation"
}
]
}

0 comments on commit 3bf2514

Please sign in to comment.