@@ -19,19 +19,19 @@ public abstract partial class CP14SharedMagicSystem
|
||||
SubscribeLocalEvent<CP14MagicEffectComponent, CP14DelayedEntityTargetActionDoAfterEvent>(OnDelayedEntityTargetDoAfter);
|
||||
}
|
||||
|
||||
private bool TryStartDelayedAction(ICP14DelayedMagicEffect delayedEffect, DoAfterEvent doAfter, Entity<CP14MagicEffectComponent> action, EntityUid performer)
|
||||
private bool TryStartDelayedAction(ICP14DelayedMagicEffect delayedEffect, DoAfterEvent doAfter, Entity<CP14MagicEffectComponent> action, EntityUid? target, EntityUid performer)
|
||||
{
|
||||
if (_doAfter.IsRunning(action.Comp.ActiveDoAfter))
|
||||
return false;
|
||||
|
||||
var fromItem = action.Comp.SpellStorage is not null;
|
||||
|
||||
var doAfterEventArgs = new DoAfterArgs(EntityManager, performer, MathF.Max(delayedEffect.CastDelay, 0.3f), doAfter, action, used: action.Comp.SpellStorage)
|
||||
var doAfterEventArgs = new DoAfterArgs(EntityManager, performer, MathF.Max(delayedEffect.CastDelay, 0.3f), doAfter, action, used: action.Comp.SpellStorage, target: target)
|
||||
{
|
||||
BreakOnMove = delayedEffect.BreakOnMove,
|
||||
BreakOnDamage = delayedEffect.BreakOnDamage,
|
||||
Hidden = delayedEffect.Hidden,
|
||||
DistanceThreshold = 100f,
|
||||
DistanceThreshold = delayedEffect.DistanceThreshold,
|
||||
CancelDuplicate = true,
|
||||
BlockDuplicate = true,
|
||||
BreakOnDropItem = fromItem,
|
||||
@@ -65,7 +65,7 @@ public abstract partial class CP14SharedMagicSystem
|
||||
_doAfter.Cancel(action.Comp.ActiveDoAfter);
|
||||
else
|
||||
{
|
||||
if (TryStartDelayedAction(delayedEffect, doAfter, action, performer))
|
||||
if (TryStartDelayedAction(delayedEffect, doAfter, action, target, performer))
|
||||
{
|
||||
var evStart = new CP14StartCastMagicEffectEvent(performer);
|
||||
RaiseLocalEvent(action, ref evStart);
|
||||
|
||||
@@ -72,12 +72,12 @@ public abstract partial class CP14SharedMagicSystem
|
||||
|
||||
var fromItem = action.Comp.SpellStorage is not null;
|
||||
|
||||
var doAfterEventArgs = new DoAfterArgs(EntityManager, performer, toggleable.CastTime, doAfter, action, used: action.Comp.SpellStorage)
|
||||
var doAfterEventArgs = new DoAfterArgs(EntityManager, performer, toggleable.CastTime, doAfter, action, used: action.Comp.SpellStorage, target: entityTarget)
|
||||
{
|
||||
BreakOnMove = toggleable.BreakOnMove,
|
||||
BreakOnDamage = toggleable.BreakOnDamage,
|
||||
Hidden = toggleable.Hidden,
|
||||
DistanceThreshold = 100f,
|
||||
DistanceThreshold = toggleable.DistanceThreshold,
|
||||
CancelDuplicate = true,
|
||||
BlockDuplicate = true,
|
||||
BreakOnDropItem = fromItem,
|
||||
|
||||
@@ -15,9 +15,9 @@ public interface ICP14DelayedMagicEffect
|
||||
|
||||
public bool BreakOnDamage { get; }
|
||||
|
||||
public bool Hidden{ get; }
|
||||
public float DistanceThreshold { get; }
|
||||
|
||||
public float EntityDistance { get; }
|
||||
public bool Hidden{ get; }
|
||||
}
|
||||
|
||||
public sealed partial class CP14DelayedEntityWorldTargetActionEvent : EntityWorldTargetActionEvent,
|
||||
@@ -36,10 +36,10 @@ public sealed partial class CP14DelayedEntityWorldTargetActionEvent : EntityWorl
|
||||
public bool BreakOnDamage { get; private set; } = true;
|
||||
|
||||
[DataField]
|
||||
public bool Hidden { get; private set; } = false;
|
||||
public float DistanceThreshold { get; private set; } = 100f;
|
||||
|
||||
[DataField]
|
||||
public float EntityDistance { get; private set; } = 100f;
|
||||
public bool Hidden { get; private set; } = false;
|
||||
}
|
||||
|
||||
//Entity Target
|
||||
@@ -59,10 +59,10 @@ public sealed partial class CP14DelayedEntityTargetActionEvent : EntityTargetAct
|
||||
public bool BreakOnDamage { get; private set; } = true;
|
||||
|
||||
[DataField]
|
||||
public bool Hidden { get; private set; } = false;
|
||||
public float DistanceThreshold { get; private set; } = 100f;
|
||||
|
||||
[DataField]
|
||||
public float EntityDistance { get; private set; } = 100f;
|
||||
public bool Hidden { get; private set; } = false;
|
||||
}
|
||||
|
||||
public sealed partial class CP14DelayedInstantActionEvent : InstantActionEvent, ICP14DelayedMagicEffect
|
||||
@@ -80,10 +80,10 @@ public sealed partial class CP14DelayedInstantActionEvent : InstantActionEvent,
|
||||
public bool BreakOnDamage { get; private set; } = true;
|
||||
|
||||
[DataField]
|
||||
public bool Hidden { get; private set; } = false;
|
||||
public float DistanceThreshold { get; private set; } = 100f;
|
||||
|
||||
[DataField]
|
||||
public float EntityDistance { get; private set; } = 100f;
|
||||
public bool Hidden { get; private set; } = false;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
@@ -17,9 +17,9 @@ public interface ICP14ToggleableMagicEffect
|
||||
|
||||
public bool BreakOnDamage { get; }
|
||||
|
||||
public bool Hidden{ get; }
|
||||
public float DistanceThreshold { get; }
|
||||
|
||||
public float EntityDistance { get; }
|
||||
public bool Hidden{ get; }
|
||||
}
|
||||
|
||||
public sealed partial class CP14ToggleableInstantActionEvent : InstantActionEvent, ICP14ToggleableMagicEffect
|
||||
@@ -40,10 +40,10 @@ public sealed partial class CP14ToggleableInstantActionEvent : InstantActionEven
|
||||
public bool BreakOnDamage { get; private set; } = true;
|
||||
|
||||
[DataField]
|
||||
public bool Hidden { get; private set; } = false;
|
||||
public float DistanceThreshold { get; private set; } = 100f;
|
||||
|
||||
[DataField]
|
||||
public float EntityDistance { get; private set; } = 100f;
|
||||
public bool Hidden { get; private set; } = false;
|
||||
}
|
||||
|
||||
public sealed partial class CP14ToggleableEntityWorldTargetActionEvent : EntityWorldTargetActionEvent, ICP14ToggleableMagicEffect
|
||||
@@ -64,10 +64,10 @@ public sealed partial class CP14ToggleableEntityWorldTargetActionEvent : EntityW
|
||||
public bool BreakOnDamage { get; private set; } = true;
|
||||
|
||||
[DataField]
|
||||
public bool Hidden { get; private set; } = false;
|
||||
public float DistanceThreshold { get; private set; } = 100f;
|
||||
|
||||
[DataField]
|
||||
public float EntityDistance { get; private set; } = 100f;
|
||||
public bool Hidden { get; private set; } = false;
|
||||
}
|
||||
|
||||
public sealed partial class CP14ToggleableEntityTargetActionEvent : EntityTargetActionEvent, ICP14ToggleableMagicEffect
|
||||
@@ -88,10 +88,10 @@ public sealed partial class CP14ToggleableEntityTargetActionEvent : EntityTarget
|
||||
public bool BreakOnDamage { get; private set; } = true;
|
||||
|
||||
[DataField]
|
||||
public bool Hidden { get; private set; } = false;
|
||||
public float DistanceThreshold { get; private set; } = 100f;
|
||||
|
||||
[DataField]
|
||||
public float EntityDistance { get; private set; } = 100f;
|
||||
public bool Hidden { get; private set; } = false;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
cp14-kick-emote-start = kicks in...
|
||||
cp14-kick-emote = makes a strong kick
|
||||
@@ -1 +1,2 @@
|
||||
cp14-kick-emote-start = заносит ногу...
|
||||
cp14-kick-emote = совершает сильный пинок
|
||||
@@ -37,7 +37,7 @@
|
||||
event: !type:CP14DelayedEntityTargetActionEvent
|
||||
cooldown: 50
|
||||
castDelay: 5
|
||||
entityDistance: 3
|
||||
distanceThreshold: 3
|
||||
breakOnMove: true
|
||||
|
||||
- type: entity
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
event: !type:CP14DelayedEntityTargetActionEvent
|
||||
cooldown: 5
|
||||
castDelay: 0.5
|
||||
entityDistance: 1000
|
||||
breakOnMove: false
|
||||
|
||||
- type: entity
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
cooldown: 15
|
||||
castDelay: 5
|
||||
breakOnMove: false
|
||||
entityDistance: 1000
|
||||
|
||||
- type: entity
|
||||
id: CP14RuneFireball
|
||||
|
||||
@@ -20,23 +20,32 @@
|
||||
throwPower: 9
|
||||
- !type:CP14SpellSpawnEntityOnTarget
|
||||
spawns:
|
||||
- CP14DustEffect
|
||||
- CP14DustEffectKickSound
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
startSpeech: cp14-kick-emote-start
|
||||
endSpeech: cp14-kick-emote
|
||||
emote: true
|
||||
- type: EntityTargetAction
|
||||
canTargetSelf: false
|
||||
range: 1
|
||||
itemIconStyle: BigAction
|
||||
sound: !type:SoundPathSpecifier
|
||||
path: /Audio/Effects/hit_kick.ogg
|
||||
params:
|
||||
pitch: 2
|
||||
icon:
|
||||
sprite: _CP14/Effects/Magic/spells_icons.rsi
|
||||
state: kick
|
||||
event: !type:CP14DelayedEntityTargetActionEvent
|
||||
cooldown: 5
|
||||
castDelay: 1
|
||||
entityDistance: 1
|
||||
breakOnMove: false
|
||||
castDelay: 0.5
|
||||
distanceThreshold: 1.5
|
||||
breakOnMove: false
|
||||
breakOnDamage: false
|
||||
|
||||
- type: entity
|
||||
id: CP14DustEffectKickSound
|
||||
parent: CP14DustEffect
|
||||
categories: [ HideSpawnMenu ]
|
||||
components:
|
||||
- type: EmitSoundOnSpawn
|
||||
sound: !type:SoundPathSpecifier
|
||||
path: /Audio/Effects/hit_kick.ogg
|
||||
params:
|
||||
pitch: 1
|
||||
@@ -24,12 +24,13 @@
|
||||
statusLifetime: 2
|
||||
- !type:AdjustTemperature
|
||||
amount: -12000
|
||||
- !type:ExtinguishReaction
|
||||
- type: CP14MagicEffectVerbalAspect
|
||||
startSpeech: "Vos adepto frigus..."
|
||||
- type: CP14MagicEffectCastingVisual
|
||||
proto: CP14RunePlantFreeze
|
||||
- type: EntityTargetAction
|
||||
range: 10
|
||||
range: 5
|
||||
interactOnMiss: false
|
||||
itemIconStyle: BigAction
|
||||
sound: !type:SoundPathSpecifier
|
||||
@@ -40,6 +41,7 @@
|
||||
event: !type:CP14ToggleableEntityTargetActionEvent
|
||||
cooldown: 15
|
||||
castTime: 10
|
||||
distanceThreshold: 5
|
||||
breakOnMove: false
|
||||
|
||||
- type: entity
|
||||
|
||||
@@ -117,6 +117,10 @@
|
||||
solution: drop
|
||||
- type: MixableSolution
|
||||
solution: drop
|
||||
#- type: SolutionTransfer
|
||||
# canChangeTransferAmount: false
|
||||
- type: SolutionItemStatus
|
||||
solution: drop
|
||||
- type: CP14SolutionTemperature
|
||||
- type: Appearance
|
||||
- type: Sprite
|
||||
@@ -129,6 +133,13 @@
|
||||
fillBaseName: liq-
|
||||
inHandsMaxFillLevels: 1
|
||||
inHandsFillBaseName: -fill
|
||||
- type: Injector
|
||||
solutionName: drop
|
||||
injectOnly: true
|
||||
minTransferAmount: 10
|
||||
maxTransferAmount: 10
|
||||
transferAmount: 10
|
||||
toggleState: 0
|
||||
|
||||
- type: entity
|
||||
id: CP14ImpactEffectWaterCreation
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
cooldown: 0.25
|
||||
castDelay: 0.25
|
||||
breakOnMove: false
|
||||
entityDistance: 1000
|
||||
|
||||
- type: entity
|
||||
id: CP14RuneIceShards
|
||||
|
||||
@@ -89,5 +89,4 @@
|
||||
cooldown: 0.5
|
||||
castDelay: 0.2
|
||||
breakOnMove: false
|
||||
entityDistance: 1000
|
||||
hidden: true
|
||||
Reference in New Issue
Block a user