Merge pull request #5155 from Mailaender/ts-tiberium
Added Tiberium crystals and refinery to Tiberian Sun
This commit is contained in:
@@ -244,6 +244,7 @@
|
|||||||
<Compile Include="Scripting\ScriptMemberWrapper.cs" />
|
<Compile Include="Scripting\ScriptMemberWrapper.cs" />
|
||||||
<Compile Include="Scripting\ScriptMemberExts.cs" />
|
<Compile Include="Scripting\ScriptMemberExts.cs" />
|
||||||
<Compile Include="Scripting\ScriptPlayerInterface.cs" />
|
<Compile Include="Scripting\ScriptPlayerInterface.cs" />
|
||||||
|
<Compile Include="Traits\Player\FixedColorPalette.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="FileSystem\D2kSoundResources.cs" />
|
<Compile Include="FileSystem\D2kSoundResources.cs" />
|
||||||
|
|||||||
50
OpenRA.Game/Traits/Player/FixedColorPalette.cs
Normal file
50
OpenRA.Game/Traits/Player/FixedColorPalette.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.Graphics;
|
||||||
|
|
||||||
|
namespace OpenRA.Traits
|
||||||
|
{
|
||||||
|
[Desc("Add this to the World actor definition.")]
|
||||||
|
public class FixedColorPaletteInfo : ITraitInfo
|
||||||
|
{
|
||||||
|
[Desc("The name of the palette to base off.")]
|
||||||
|
public readonly string Base = "terrain";
|
||||||
|
[Desc("The name of the resulting palette")]
|
||||||
|
public readonly string Name = "resources";
|
||||||
|
[Desc("Remap these indices to pre-defined colors.")]
|
||||||
|
public readonly int[] RemapIndex = { };
|
||||||
|
[Desc("The fixed color to remap.")]
|
||||||
|
public readonly HSLColor Color;
|
||||||
|
[Desc("Luminosity range to span.")]
|
||||||
|
public readonly float Ramp = 0.05f;
|
||||||
|
[Desc("Allow palette modifiers to change the palette.")]
|
||||||
|
public readonly bool AllowModifiers = true;
|
||||||
|
|
||||||
|
public object Create(ActorInitializer init) { return new FixedColorPalette(this); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class FixedColorPalette : IPalette
|
||||||
|
{
|
||||||
|
readonly FixedColorPaletteInfo info;
|
||||||
|
|
||||||
|
public FixedColorPalette(FixedColorPaletteInfo info)
|
||||||
|
{
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitPalette(WorldRenderer wr)
|
||||||
|
{
|
||||||
|
var remap = new PlayerColorRemap(info.RemapIndex, info.Color, info.Ramp);
|
||||||
|
wr.AddPalette(info.Name, new Palette(wr.Palette(info.Base).Palette, remap), info.AllowModifiers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
* available to you under the terms of the GNU General Public License
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -16,7 +16,7 @@ namespace OpenRA.Traits
|
|||||||
{
|
{
|
||||||
public class ResourceTypeInfo : ITraitInfo
|
public class ResourceTypeInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
// Hack: The editor is getting really unmaintanable...
|
// HACK: The editor is getting really unmaintanable...
|
||||||
public readonly string EditorSprite;
|
public readonly string EditorSprite;
|
||||||
public readonly string[] Variants = { };
|
public readonly string[] Variants = { };
|
||||||
public readonly string Palette = "terrain";
|
public readonly string Palette = "terrain";
|
||||||
|
|||||||
Binary file not shown.
@@ -92,6 +92,7 @@ Chrome:
|
|||||||
Assemblies:
|
Assemblies:
|
||||||
mods/d2k/OpenRA.Mods.D2k.dll
|
mods/d2k/OpenRA.Mods.D2k.dll
|
||||||
mods/ra/OpenRA.Mods.RA.dll
|
mods/ra/OpenRA.Mods.RA.dll
|
||||||
|
mods/cnc/OpenRA.Mods.Cnc.dll
|
||||||
mods/ts/OpenRA.Mods.TS.dll
|
mods/ts/OpenRA.Mods.TS.dll
|
||||||
|
|
||||||
ChromeLayout:
|
ChromeLayout:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
Dimensions: 1,1
|
Dimensions: 1,1
|
||||||
Footprint: x
|
Footprint: x
|
||||||
BuildSounds: place2.aud
|
BuildSounds: place2.aud
|
||||||
TerrainTypes: Clear,Road
|
TerrainTypes: Clear, Road
|
||||||
GivesBuildableArea:
|
GivesBuildableArea:
|
||||||
Capturable:
|
Capturable:
|
||||||
SoundOnDamageTransition:
|
SoundOnDamageTransition:
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
Footprint: x
|
Footprint: x
|
||||||
BuildSounds: place2.aud
|
BuildSounds: place2.aud
|
||||||
Adjacent: 7
|
Adjacent: 7
|
||||||
TerrainTypes: Clear,Road
|
TerrainTypes: Clear, Road
|
||||||
SoundOnDamageTransition:
|
SoundOnDamageTransition:
|
||||||
DamagedSound: expnew01.aud
|
DamagedSound: expnew01.aud
|
||||||
DestroyedSound: crmble2.aud
|
DestroyedSound: crmble2.aud
|
||||||
@@ -95,8 +95,7 @@
|
|||||||
Clear: 90
|
Clear: 90
|
||||||
Rough: 80
|
Rough: 80
|
||||||
Road: 100
|
Road: 100
|
||||||
Ore: 80
|
Tiberium: 80
|
||||||
Gems: 80
|
|
||||||
Beach: 80
|
Beach: 80
|
||||||
SelectionDecorations:
|
SelectionDecorations:
|
||||||
Palette: pips
|
Palette: pips
|
||||||
@@ -124,6 +123,9 @@
|
|||||||
GivesBounty:
|
GivesBounty:
|
||||||
CrushableInfantry:
|
CrushableInfantry:
|
||||||
CrushSound: squish6.aud
|
CrushSound: squish6.aud
|
||||||
|
PoisonedByTiberium:
|
||||||
|
SpawnViceroid:
|
||||||
|
ViceroidActor: vissml
|
||||||
UpdatesPlayerStatistics:
|
UpdatesPlayerStatistics:
|
||||||
CombatDebugOverlay:
|
CombatDebugOverlay:
|
||||||
Guard:
|
Guard:
|
||||||
@@ -172,6 +174,7 @@
|
|||||||
Rough: 40
|
Rough: 40
|
||||||
Road: 100
|
Road: 100
|
||||||
Beach: 40
|
Beach: 40
|
||||||
|
Tiberium: 40
|
||||||
ROT: 5
|
ROT: 5
|
||||||
SelectionDecorations:
|
SelectionDecorations:
|
||||||
Palette: pips
|
Palette: pips
|
||||||
|
|||||||
@@ -111,6 +111,41 @@ GAPILE:
|
|||||||
WithIdleOverlay@FLAG:
|
WithIdleOverlay@FLAG:
|
||||||
Sequence: idle-flag
|
Sequence: idle-flag
|
||||||
|
|
||||||
|
PROC:
|
||||||
|
Inherits: ^Building
|
||||||
|
Valued:
|
||||||
|
Cost: 2000
|
||||||
|
Tooltip:
|
||||||
|
Name: Tiberium Refinery
|
||||||
|
Description: Processes raw Tiberium\ninto useable resources
|
||||||
|
Buildable:
|
||||||
|
Queue: Building
|
||||||
|
BuildPaletteOrder: 20
|
||||||
|
Prerequisites: anypower
|
||||||
|
Owner: gdi,nod
|
||||||
|
Building:
|
||||||
|
Power: -30
|
||||||
|
Footprint: xxx xxx x==
|
||||||
|
Dimensions: 3,3
|
||||||
|
Health:
|
||||||
|
HP: 900
|
||||||
|
RevealsShroud:
|
||||||
|
Range: 6
|
||||||
|
# Bib:
|
||||||
|
TiberiumRefinery:
|
||||||
|
StoresOre:
|
||||||
|
PipColor: Green
|
||||||
|
PipCount: 15
|
||||||
|
Capacity: 1500
|
||||||
|
CustomSellValue:
|
||||||
|
Value: 600
|
||||||
|
FreeActor:
|
||||||
|
Actor: HARV
|
||||||
|
SpawnOffset: 1,2
|
||||||
|
Facing: 64
|
||||||
|
WithIdleOverlay@REDLIGHTS:
|
||||||
|
Sequence: idle-redlights
|
||||||
|
|
||||||
GAWEAP:
|
GAWEAP:
|
||||||
Inherits: ^Building
|
Inherits: ^Building
|
||||||
Valued:
|
Valued:
|
||||||
|
|||||||
@@ -82,17 +82,23 @@ World:
|
|||||||
Race: nod
|
Race: nod
|
||||||
ResourceLayer:
|
ResourceLayer:
|
||||||
ResourceClaimLayer:
|
ResourceClaimLayer:
|
||||||
ResourceType@gem:
|
FixedColorPalette@GreenTiberium:
|
||||||
ResourceType: 2
|
Base: player
|
||||||
Palette: player
|
Name: greentiberium
|
||||||
EditorSprite: shadow
|
Color: 57, 201, 128
|
||||||
Variants: fake
|
RemapIndex: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
|
||||||
|
ResourceType@Tiberium:
|
||||||
|
ResourceType: 1
|
||||||
|
Palette: greentiberium
|
||||||
|
EditorSprite: waypoint # TODO: editor can't handle the real ones
|
||||||
|
Variants: tib01, tib02, tib03, tib04, tib05, tib06, tib07, tib08, tib09, tib10, tib11, tib12, tib13, tib14, tib15, tib16, tib17, tib18, tib19, tib20
|
||||||
|
MaxDensity: 12
|
||||||
ValuePerUnit: 50
|
ValuePerUnit: 50
|
||||||
Name: Gems
|
Name: Tiberium
|
||||||
PipColor: Red
|
PipColor: Green
|
||||||
AllowedTerrainTypes: Clear,Road
|
AllowedTerrainTypes: Clear
|
||||||
AllowUnderActors: false
|
AllowUnderActors: false
|
||||||
TerrainType: Gems
|
TerrainType: Tiberium
|
||||||
PathfinderDebugOverlay:
|
PathfinderDebugOverlay:
|
||||||
SpawnMapActors:
|
SpawnMapActors:
|
||||||
CreateMPPlayers:
|
CreateMPPlayers:
|
||||||
|
|||||||
@@ -268,10 +268,87 @@ moveflsh:
|
|||||||
Length: *
|
Length: *
|
||||||
Tick: 30
|
Tick: 30
|
||||||
|
|
||||||
# TODO: placeholder
|
|
||||||
resources:
|
resources:
|
||||||
fake: shadow
|
tib01: tib01
|
||||||
Length: *
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib02: tib02
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib03: tib03
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib04: tib04
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib05: tib05
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib06: tib06
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib07: tib07
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib08: tib08
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib09: tib09
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib10: tib10
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib11: tib11
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib12: tib12
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib13: tib13
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib14: tib14
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib15: tib15
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib16: tib16
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib17: tib17
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib18: tib18
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib19: tib19
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
tib20: tib20
|
||||||
|
Start: 0
|
||||||
|
Length: 12
|
||||||
|
ShadowStart: 12
|
||||||
|
|
||||||
shroud:
|
shroud:
|
||||||
shroud: shadow
|
shroud: shadow
|
||||||
|
|||||||
@@ -614,3 +614,35 @@ nahpad:
|
|||||||
ShadowStart: 20
|
ShadowStart: 20
|
||||||
icon: nhpdicon
|
icon: nhpdicon
|
||||||
Start: 0
|
Start: 0
|
||||||
|
|
||||||
|
proc: # TODO: unused narefn_a, narefn_b
|
||||||
|
idle: narefn
|
||||||
|
Start: 0
|
||||||
|
ShadowStart: 3
|
||||||
|
damaged-idle: narefn
|
||||||
|
Start: 1
|
||||||
|
ShadowStart: 4
|
||||||
|
critical-idle: narefn
|
||||||
|
Start: 2
|
||||||
|
ShadowStart: 5
|
||||||
|
make: narefnmk
|
||||||
|
Start: 0
|
||||||
|
Length: 20
|
||||||
|
ShadowStart: 20
|
||||||
|
idle-redlights: narefn_c
|
||||||
|
Start: 0
|
||||||
|
Length: 16
|
||||||
|
Tick: 120
|
||||||
|
damaged-idle-redlights: narefn_c
|
||||||
|
Start: 0
|
||||||
|
Length: 16
|
||||||
|
Tick: 120
|
||||||
|
critical-idle-redlights: narefn_c
|
||||||
|
Start: 16
|
||||||
|
Length: 16
|
||||||
|
Tick: 200
|
||||||
|
# bib: narefnbb
|
||||||
|
# Start: 0
|
||||||
|
# Length: *
|
||||||
|
icon: reficon
|
||||||
|
Start: 0
|
||||||
@@ -11,6 +11,11 @@ Terrain:
|
|||||||
AcceptsSmudgeType: Crater, Scorch
|
AcceptsSmudgeType: Crater, Scorch
|
||||||
Color: 0, 0, 0
|
Color: 0, 0, 0
|
||||||
TargetTypes: Ground
|
TargetTypes: Ground
|
||||||
|
TerrainType@Tiberium:
|
||||||
|
Type: Tiberium
|
||||||
|
AcceptsSmudgeType: Crater, Scorch
|
||||||
|
Color: 161, 226, 28
|
||||||
|
TargetTypes: Ground
|
||||||
|
|
||||||
Templates:
|
Templates:
|
||||||
Template@255:
|
Template@255:
|
||||||
|
|||||||
@@ -693,3 +693,10 @@ Pistola:
|
|||||||
InfDeath: 1
|
InfDeath: 1
|
||||||
Damage: 2
|
Damage: 2
|
||||||
|
|
||||||
|
Tiberium:
|
||||||
|
ROF: 16
|
||||||
|
Warhead:
|
||||||
|
Spread: 42
|
||||||
|
InfDeath: 6
|
||||||
|
Damage: 2
|
||||||
|
PreventProne: yes
|
||||||
|
|||||||
Reference in New Issue
Block a user