Refactor actions to be entities with components (#19900)

This commit is contained in:
DrSmugleaf
2023-09-08 18:16:05 -07:00
committed by GitHub
parent e18f731b91
commit c71f97e3a2
210 changed files with 10693 additions and 11714 deletions

View File

@@ -1,15 +1,18 @@
- type: instantAction
id: ForceWall
- type: entity
id: ActionForceWall
name: action-name-spell-forcewall
description: action-description-spell-forcewall
useDelay: 10
itemIconStyle: BigAction
sound: !type:SoundPathSpecifier
path: /Audio/Magic/forcewall.ogg
icon:
sprite: Objects/Magic/magicactions.rsi
state: shield
serverEvent: !type:InstantSpawnSpellEvent
prototype: WallForce
posData: !type:TargetInFront
speech: action-speech-spell-forcewall
noSpawn: true
components:
- type: InstantAction
useDelay: 10
itemIconStyle: BigAction
sound: !type:SoundPathSpecifier
path: /Audio/Magic/forcewall.ogg
icon:
sprite: Objects/Magic/magicactions.rsi
state: shield
event: !type:InstantSpawnSpellEvent
prototype: WallForce
posData: !type:TargetInFront
speech: action-speech-spell-forcewall

View File

@@ -1,11 +1,14 @@
- type: instantAction
id: Knock
- type: entity
id: ActionKnock
name: action-name-spell-knock
description: action-description-spell-knock
useDelay: 10
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: knock
serverEvent: !type:KnockSpellEvent
speech: action-speech-spell-knock
noSpawn: true
components:
- type: InstantAction
useDelay: 10
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: knock
event: !type:KnockSpellEvent
speech: action-speech-spell-knock

View File

@@ -1,17 +1,20 @@
- type: worldTargetAction
id: Fireball
- type: entity
id: ActionFireball
name: action-name-spell-fireball
description: action-description-spell-fireball
useDelay: 30
itemIconStyle: BigAction
checkCanAccess: false
range: 60
sound: !type:SoundPathSpecifier
path: /Audio/Magic/fireball.ogg
icon:
sprite: Objects/Magic/magicactions.rsi
state: fireball
serverEvent: !type:ProjectileSpellEvent
prototype: ProjectileFireball
posData: !type:TargetCasterPos
speech: action-speech-spell-fireball
noSpawn: true
components:
- type: WorldTargetAction
useDelay: 30
itemIconStyle: BigAction
checkCanAccess: false
range: 60
sound: !type:SoundPathSpecifier
path: /Audio/Magic/fireball.ogg
icon:
sprite: Objects/Magic/magicactions.rsi
state: fireball
event: !type:ProjectileSpellEvent
prototype: ProjectileFireball
posData: !type:TargetCasterPos
speech: action-speech-spell-fireball

View File

@@ -1,47 +1,59 @@
- type: instantAction
id: FlashRune
- type: entity
id: ActionFlashRune
name: action-name-spell-rune-flash
description: action-description-spell-rune-flash
useDelay: 10
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
serverEvent: !type:InstantSpawnSpellEvent
prototype: FlashRune
noSpawn: true
components:
- type: InstantAction
useDelay: 10
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
event: !type:InstantSpawnSpellEvent
prototype: FlashRune
- type: instantAction
id: ExplosionRune
- type: entity
id: ActionExplosionRune
name: action-name-spell-rune-explosion
description: action-description-spell-rune-explosion
useDelay: 20
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
serverEvent: !type:InstantSpawnSpellEvent
prototype: ExplosionRune
noSpawn: true
components:
- type: InstantAction
useDelay: 20
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
event: !type:InstantSpawnSpellEvent
prototype: ExplosionRune
- type: instantAction
id: IgniteRune
- type: entity
id: ActionIgniteRune
name: action-name-spell-rune-ignite
description: action-description-spell-rune-ignite
useDelay: 15
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
serverEvent: !type:InstantSpawnSpellEvent
prototype: IgniteRune
noSpawn: true
components:
- type: InstantAction
useDelay: 15
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
event: !type:InstantSpawnSpellEvent
prototype: IgniteRune
- type: instantAction
id: StunRune
- type: entity
id: ActionStunRune
name: action-name-spell-rune-stun
description: action-description-spell-rune-stun
useDelay: 10
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
serverEvent: !type:InstantSpawnSpellEvent
prototype: StunRune
noSpawn: true
components:
- type: InstantAction
useDelay: 10
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
event: !type:InstantSpawnSpellEvent
prototype: StunRune

View File

@@ -1,18 +1,21 @@
- type: entityTargetAction
id: Smite
- type: entity
id: ActionSmite
name: action-name-spell-smite
description: action-description-spell-smite
useDelay: 60
itemIconStyle: BigAction
whitelist:
components:
- Body
canTargetSelf: false
interactOnMiss: false
sound: !type:SoundPathSpecifier
path: /Audio/Magic/disintegrate.ogg
icon:
sprite: Objects/Magic/magicactions.rsi
state: gib
serverEvent: !type:SmiteSpellEvent
speech: action-speech-spell-smite
noSpawn: true
components:
- type: EntityTargetAction
useDelay: 60
itemIconStyle: BigAction
whitelist:
components:
- Body
canTargetSelf: false
interactOnMiss: false
sound: !type:SoundPathSpecifier
path: /Audio/Magic/disintegrate.ogg
icon:
sprite: Objects/Magic/magicactions.rsi
state: gib
event: !type:SmiteSpellEvent
speech: action-speech-spell-smite

View File

@@ -1,16 +1,19 @@
- type: worldTargetAction
id: SpawnMagicarpSpell
- type: entity
id: ActionSpawnMagicarpSpell
name: action-name-spell-summon-magicarp
description: action-description-spell-summon-magicarp
useDelay: 10
range: 4
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
serverEvent: !type:WorldSpawnSpellEvent
prototypes:
noSpawn: true
components:
- type: WorldTargetAction
useDelay: 10
range: 4
itemIconStyle: BigAction
icon:
sprite: Objects/Magic/magicactions.rsi
state: spell_default
event: !type:WorldSpawnSpellEvent
prototypes:
- id: MobCarpMagic
amount: 3
offsetVector2: 0, 1
speech: action-speech-spell-summon-magicarp
offset: 0, 1
speech: action-speech-spell-summon-magicarp

View File

@@ -14,13 +14,8 @@
- state: nothing-unshaded
shader: unshaded
- type: ActionOnInteract
entityActions:
- whitelist: { components: [ PointLight ] }
charges: 25
sound: /Audio/Magic/blink.ogg
event: !type:ChangeComponentsSpellEvent
toAdd:
- type: RgbLightController
actions:
- ActionRgbLight
- type: Item
inhandVisuals:
left:
@@ -34,4 +29,16 @@
- type: RgbLightController
- type: PointLight
enabled: true
radius: 2
radius: 2
- type: entity
id: ActionRgbLight
noSpawn: true
components:
- type: EntityTargetAction
whitelist: { components: [ PointLight ] }
charges: 25
sound: /Audio/Magic/blink.ogg
event: !type:ChangeComponentsSpellEvent
toAdd:
- type: RgbLightController

View File

@@ -1,14 +1,17 @@
- type: worldTargetAction
id: Blink
- type: entity
id: ActionBlink
name: action-name-spell-blink
description: action-description-spell-blink
useDelay: 10
range: 16 # default examine-range.
# ^ should probably add better validation that the clicked location is on the users screen somewhere,
itemIconStyle: BigAction
checkCanAccess: false
repeat: true
icon:
sprite: Objects/Magic/magicactions.rsi
state: blink
serverEvent: !type:TeleportSpellEvent
noSpawn: true
components:
- type: WorldTargetAction
useDelay: 10
range: 16 # default examine-range.
# ^ should probably add better validation that the clicked location is on the users screen somewhere,
itemIconStyle: BigAction
checkCanAccess: false
repeat: true
icon:
sprite: Objects/Magic/magicactions.rsi
state: blink
event: !type:TeleportSpellEvent