Merge pull request #13174 from reaperrr/ts-floater

Add Tiberium Floater to TS
This commit is contained in:
atlimit8
2017-04-23 21:38:27 -05:00
committed by GitHub
15 changed files with 265 additions and 170 deletions

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits.Sound
class AmbientSoundInfo : ConditionalTraitInfo class AmbientSoundInfo : ConditionalTraitInfo
{ {
[FieldLoader.Require] [FieldLoader.Require]
public readonly string SoundFile = null; public readonly string[] SoundFiles = null;
[Desc("Initial delay (in ticks) before playing the sound for the first time.", [Desc("Initial delay (in ticks) before playing the sound for the first time.",
"Two values indicate a random delay range.")] "Two values indicate a random delay range.")]
@@ -74,16 +74,18 @@ namespace OpenRA.Mods.Common.Traits.Sound
void StartSound(Actor self) void StartSound(Actor self)
{ {
var sound = Info.SoundFiles.RandomOrDefault(Game.CosmeticRandom);
ISound s; ISound s;
if (self.OccupiesSpace != null) if (self.OccupiesSpace != null)
{ {
cachedPosition = self.CenterPosition; cachedPosition = self.CenterPosition;
s = loop ? Game.Sound.PlayLooped(SoundType.World, Info.SoundFile, cachedPosition) : s = loop ? Game.Sound.PlayLooped(SoundType.World, sound, cachedPosition) :
Game.Sound.Play(SoundType.World, Info.SoundFile, self.CenterPosition); Game.Sound.Play(SoundType.World, sound, self.CenterPosition);
} }
else else
s = loop ? Game.Sound.PlayLooped(SoundType.World, Info.SoundFile) : s = loop ? Game.Sound.PlayLooped(SoundType.World, sound) :
Game.Sound.Play(SoundType.World, Info.SoundFile); Game.Sound.Play(SoundType.World, sound);
currentSounds.Add(s); currentSounds.Add(s);
} }

View File

@@ -596,6 +596,11 @@ namespace OpenRA.Mods.Common.UtilityCommands
RenameNodeKey(node, "-AcceptsDeliveredCash"); RenameNodeKey(node, "-AcceptsDeliveredCash");
} }
// Add random sound support to AmbientSound
if (engineVersion < 20170422)
if (node.Key == "SoundFile" && parent.Key.StartsWith("AmbientSound", StringComparison.Ordinal))
RenameNodeKey(node, "SoundFiles");
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
} }

View File

@@ -773,7 +773,7 @@ OBLI:
ChargingCondition: charging ChargingCondition: charging
AmbientSound: AmbientSound:
RequiresCondition: charging RequiresCondition: charging
SoundFile: obelpowr.aud SoundFiles: obelpowr.aud
Interval: 30, 40 Interval: 30, 40
-EmitInfantryOnSell: -EmitInfantryOnSell:
DetectCloaked: DetectCloaked:

View File

@@ -82,7 +82,7 @@ sandworm:
Sequences: lightninga, lightningb, lightningc, lightningd, lightninge, lightningf Sequences: lightninga, lightningb, lightningc, lightningd, lightninge, lightningf
RequiresCondition: !attacking RequiresCondition: !attacking
AmbientSound: AmbientSound:
SoundFile: WRMSIGN1.WAV SoundFiles: WRMSIGN1.WAV
Interval: 160 Interval: 160
RequiresCondition: !attacking RequiresCondition: !attacking
WithAttackOverlay@mouth: WithAttackOverlay@mouth:

View File

@@ -111,7 +111,7 @@ thumper:
Sequence: thump-sand Sequence: thump-sand
RequiresCondition: deployed RequiresCondition: deployed
AmbientSound: AmbientSound:
SoundFile: THUMPER1.WAV SoundFiles: THUMPER1.WAV
Interval: 60 Interval: 60
RequiresCondition: deployed RequiresCondition: deployed
AttractsWorms: AttractsWorms:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -2548,6 +2548,22 @@ Actors:
Actor735: trock02 Actor735: trock02
Location: 125,41 Location: 125,41
Owner: Neutral Owner: Neutral
Actor736: jfish
Owner: Creeps
Location: 121,-90
Facing: 92
Actor739: jfish
Owner: Creeps
Location: 74,60
Facing: 92
Actor740: jfish
Owner: Creeps
Location: 170,-38
Facing: 92
Actor737: jfish
Owner: Creeps
Location: 58,23
Facing: 92
Rules: rules.yaml Rules: rules.yaml

View File

@@ -59,6 +59,7 @@ Rules:
ts|rules/aircraft.yaml ts|rules/aircraft.yaml
ts|rules/husks.yaml ts|rules/husks.yaml
ts|rules/civilian-infantry.yaml ts|rules/civilian-infantry.yaml
ts|rules/critters.yaml
ts|rules/civilian-structures.yaml ts|rules/civilian-structures.yaml
ts|rules/civilian-vehicles.yaml ts|rules/civilian-vehicles.yaml
ts|rules/gdi-infantry.yaml ts|rules/gdi-infantry.yaml
@@ -95,6 +96,7 @@ Sequences:
ts|sequences/vehicles.yaml ts|sequences/vehicles.yaml
ts|sequences/trees.yaml ts|sequences/trees.yaml
ts|sequences/bridges.yaml ts|sequences/bridges.yaml
ts|sequences/critters.yaml
VoxelSequences: VoxelSequences:
ts|sequences/voxels.yaml ts|sequences/voxels.yaml

View File

@@ -34,7 +34,7 @@ CABHUT:
^LowBridge: ^LowBridge:
Inherits: ^LowBridgeRamp Inherits: ^LowBridgeRamp
Targetable: Targetable:
TargetTypes: Ground, Building TargetTypes: Ground, Building, Bridge
RequiresForceFire: true RequiresForceFire: true
Health: Health:
HP: 500 HP: 500

View File

@@ -212,86 +212,6 @@ SLAV:
WithInfantryBody: WithInfantryBody:
DefaultAttackSequence: attack DefaultAttackSequence: attack
DOGGIE:
Inherits@1: ^Infantry
Inherits@2: ^RegularInfantryDeath
Inherits@3: ^HealsOnTiberium
Tooltip:
Name: Tiberian Fiend
Health:
HP: 250
Shape: Circle
Radius: 213
Selectable:
Bounds: 24,24
Valued:
Cost: 100
Armor:
Type: Light
RevealsShroud:
Range: 4c0
Mobile:
Speed: 113
Voiced:
VoiceSet: Fiend
Targetable:
TargetTypes: Ground
Armament:
Weapon: FiendShard
AttackFrontal:
Voice: Attack
AttackWander:
WanderMoveRadius: 2
MinMoveDelay: 200
MaxMoveDelay: 600
-SpawnActorOnDeath@FLAMEGUY:
WithDeathAnimation@fire:
DeathSequence: die-
DeathTypes:
FireDeath: burning
VISC_SML:
Inherits: ^Visceroid
Tooltip:
Name: Baby Visceroid
Health:
HP: 200
AttackWander:
WanderMoveRadius: 2
MinMoveDelay: 30
MaxMoveDelay: 60
RenderSprites:
Image: vissml
VISC_LRG:
Inherits: ^Visceroid
Inherits@CRATESTATS: ^CrateStatModifiers
Tooltip:
Name: Adult Visceroid
Health:
HP: 500
Armor:
Type: Heavy
RevealsShroud:
Range: 4c0
Armament:
Weapon: SlimeAttack
FireDelay: 10
AutoTarget:
ScanRadius: 5
AttackFrontal:
Voice: Attack
AttackWander:
WanderMoveRadius: 2
MinMoveDelay: 25
MaxMoveDelay: 50
WithAttackAnimation:
AttackSequence: attack
Mobile:
Crushes: crate, infantry
RenderSprites:
Image: vislrg
CIV1: CIV1:
Inherits: ^CivilianInfantry Inherits: ^CivilianInfantry
WithInfantryBody: WithInfantryBody:

121
mods/ts/rules/critters.yaml Normal file
View File

@@ -0,0 +1,121 @@
DOGGIE:
Inherits@1: ^Infantry
Inherits@2: ^RegularInfantryDeath
Inherits@3: ^HealsOnTiberium
Tooltip:
Name: Tiberian Fiend
Health:
HP: 250
Shape: Circle
Radius: 213
Selectable:
Bounds: 24,24
Valued:
Cost: 100
Armor:
Type: Light
RevealsShroud:
Range: 4c0
Mobile:
Speed: 113
Voiced:
VoiceSet: Fiend
Targetable:
TargetTypes: Ground
Armament:
Weapon: FiendShard
AttackFrontal:
Voice: Attack
AttackWander:
WanderMoveRadius: 2
MinMoveDelay: 200
MaxMoveDelay: 600
-SpawnActorOnDeath@FLAMEGUY:
WithDeathAnimation@fire:
DeathSequence: die-
DeathTypes:
FireDeath: burning
VISC_SML:
Inherits: ^Visceroid
Tooltip:
Name: Baby Visceroid
Health:
HP: 200
AttackWander:
WanderMoveRadius: 2
MinMoveDelay: 30
MaxMoveDelay: 60
RenderSprites:
Image: vissml
VISC_LRG:
Inherits: ^Visceroid
Inherits@CRATESTATS: ^CrateStatModifiers
Tooltip:
Name: Adult Visceroid
Health:
HP: 500
Armor:
Type: Heavy
RevealsShroud:
Range: 4c0
Armament:
Weapon: SlimeAttack
FireDelay: 10
AutoTarget:
ScanRadius: 5
AttackFrontal:
Voice: Attack
AttackWander:
WanderMoveRadius: 2
MinMoveDelay: 25
MaxMoveDelay: 50
WithAttackAnimation:
AttackSequence: attack
Mobile:
Crushes: crate, infantry
RenderSprites:
Image: vislrg
JFISH:
Inherits: ^Visceroid
Inherits@CRATESTATS: ^CrateStatModifiers
Tooltip:
Name: Tiberium Floater
Health:
HP: 500
Shape: Circle
Radius: 363
VerticalTopOffset: 768
RevealsShroud:
Range: 5c0
Mobile:
Speed: 72
Crushes: crate
TerrainSpeeds:
Clear: 100
Rail: 100
DirtRoad: 100
Rough: 100
Water: 100
Armament:
Weapon: Tentacle
FireDelay: 10
AutoTarget:
ScanRadius: 5
AttackFrontal:
AttackWander:
WanderMoveRadius: 6
MinMoveDelay: 250
MaxMoveDelay: 600
WithAttackAnimation:
AttackSequence: attack
RenderSprites:
Image: floater
Selectable:
Bounds: 32,32,0,-5
AmbientSound:
SoundFiles: floatmov.aud, flotmov2.aud, flotmov3.aud, flotmov4.aud
Delay: 150, 450
Interval: 300, 800

View File

@@ -218,7 +218,7 @@ NAOBEL:
ChargingCondition: charging ChargingCondition: charging
AmbientSound: AmbientSound:
RequiresCondition: charging RequiresCondition: charging
SoundFile: obelpowr.aud SoundFiles: obelpowr.aud
Interval: 30, 40 Interval: 30, 40
WithChargeOverlay: WithChargeOverlay:
Palette: player Palette: player

View File

@@ -0,0 +1,92 @@
doggie:
Defaults:
Tick: 80
Offset: 0, 0, 16
stand:
Facings: 8
ShadowStart: 119
run:
Start: 8
Length: 6
Facings: 8
ShadowStart: 127
attack:
Start: 56
Length: 4
Facings: 8
ShadowStart: 175
laydown: # TODO: Implement hiding when on a tiberium patch
Start: 88
Length: 2
ShadowStart: 207
hide: # TODO: Implement hiding when on a tiberium patch
Start: 90
ShadowStart: 209
idle1:
Start: 91
Length: 8
ShadowStart: 210
die-twirling:
Start: 99
Length: 10
ShadowStart: 218
die-flying:
Start: 99
Length: 10
ShadowStart: 218
die-exploding: s_bang34
Length: *
die-crushed:
Start: 105
Length: 4
ShadowStart: 224
Tick: 800
ZOffset: -511
die-burning:
Start: 109
Length: 10
ShadowStart: 228
die-melting:
Start: 109
Length: 10
ShadowStart: 228
vissml:
idle:
Length: 90
ShadowStart: 90
Tick: 80
Offset: 0, 0, 16
vislrg:
idle:
Length: 90
ShadowStart: 90
Tick: 80
Offset: 0, 0, 16
attack:
Combine:
vislgatk:
Start: 5
Length: 35
vislgatk:
Start: 0
Length: 5
Facings: -8
Length: 5
Tick: 80
Offset: 0, 0, 16
# ShadowStart: 40 # TODO: enable shadow frames
floater:
idle:
Length: 16
ShadowStart: 32
Tick: 100
Offset: 0, 0, 16
attack:
Length: 16
Start: 16
ShadowStart: 48
Tick: 100
Offset: 0, 0, 16

View File

@@ -474,86 +474,6 @@ weedguy:
ShadowStart: 376 ShadowStart: 376
Tick: 1000 Tick: 1000
doggie:
Defaults:
Tick: 80
Offset: 0, 0, 16
stand:
Facings: 8
ShadowStart: 119
run:
Start: 8
Length: 6
Facings: 8
ShadowStart: 127
attack:
Start: 56
Length: 4
Facings: 8
ShadowStart: 175
laydown: # TODO: Implement hiding when on a tiberium patch
Start: 88
Length: 2
ShadowStart: 207
hide: # TODO: Implement hiding when on a tiberium patch
Start: 90
ShadowStart: 209
idle1:
Start: 91
Length: 8
ShadowStart: 210
die-twirling:
Start: 99
Length: 10
ShadowStart: 218
die-flying:
Start: 99
Length: 10
ShadowStart: 218
die-exploding: s_bang34
Length: *
die-crushed:
Start: 105
Length: 4
ShadowStart: 224
Tick: 800
ZOffset: -511
die-burning:
Start: 109
Length: 10
ShadowStart: 228
die-melting:
Start: 109
Length: 10
ShadowStart: 228
vissml:
idle:
Length: 90
ShadowStart: 90
Tick: 80
Offset: 0, 0, 16
vislrg:
idle:
Length: 90
ShadowStart: 90
Tick: 80
Offset: 0, 0, 16
attack:
Combine:
vislgatk:
Start: 5
Length: 35
vislgatk:
Start: 0
Length: 5
Facings: -8
Length: 5
Tick: 80
Offset: 0, 0, 16
# ShadowStart: 40 # TODO: enable shadow frames
flameguy: flameguy:
Defaults: Defaults:
Facings: 8 Facings: 8

View File

@@ -99,6 +99,23 @@ SlimeAttack:
Concrete: 20 Concrete: 20
DamageTypes: Prone100Percent, TriggerProne, SmallExplosionDeath DamageTypes: Prone100Percent, TriggerProne, SmallExplosionDeath
Tentacle:
ReloadDelay: 80
Range: 1c384
Report: floatk1.aud
Projectile: InstantHit
InvalidTargets: Wall, Bridge
Warhead@1Dam: TargetDamage
Damage: 160
InvalidTargets: Wall, Bridge
Versus:
None: 60
Wood: 45
Light: 90
Heavy: 55
Concrete: 10
DamageTypes: Prone50Percent, TriggerProne, SmallExplosionDeath
Veins: Veins:
ReloadDelay: 16 ReloadDelay: 16
Warhead@Damage: TargetDamage Warhead@Damage: TargetDamage