diff --git a/OpenRA.Game/Graphics/PlayerColorRemap.cs b/OpenRA.Game/Graphics/PlayerColorRemap.cs
index 2aa9ddda69..78cd48b9f3 100755
--- a/OpenRA.Game/Graphics/PlayerColorRemap.cs
+++ b/OpenRA.Game/Graphics/PlayerColorRemap.cs
@@ -41,7 +41,7 @@ namespace OpenRA.Graphics
for (var i = 15; i > 0; i--)
remapRamp = ramp.Select(r => r - ramp[15]).ToArray();
}
-
+
remapColors = remapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / 16f, c1, c2)))
.ToDictionary(u => u.First, u => u.Second);
}
diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj
index 1e3083e1e6..ff68b5a815 100644
--- a/OpenRA.Game/OpenRA.Game.csproj
+++ b/OpenRA.Game/OpenRA.Game.csproj
@@ -244,6 +244,7 @@
+
diff --git a/OpenRA.Game/Traits/Player/FixedColorPalette.cs b/OpenRA.Game/Traits/Player/FixedColorPalette.cs
new file mode 100644
index 0000000000..dd2abc304d
--- /dev/null
+++ b/OpenRA.Game/Traits/Player/FixedColorPalette.cs
@@ -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);
+ }
+ }
+}
diff --git a/OpenRA.Game/Traits/World/ResourceType.cs b/OpenRA.Game/Traits/World/ResourceType.cs
index d477f25c5e..fc41e476b3 100644
--- a/OpenRA.Game/Traits/World/ResourceType.cs
+++ b/OpenRA.Game/Traits/World/ResourceType.cs
@@ -1,6 +1,6 @@
#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
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -16,7 +16,7 @@ namespace OpenRA.Traits
{
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[] Variants = { };
public readonly string Palette = "terrain";
diff --git a/mods/ts/maps/blank-conquest.oramap b/mods/ts/maps/blank-conquest.oramap
index 53e2bef0f1..512fdbb8fb 100644
Binary files a/mods/ts/maps/blank-conquest.oramap and b/mods/ts/maps/blank-conquest.oramap differ
diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml
index be67fd7cbb..2042f4a465 100644
--- a/mods/ts/mod.yaml
+++ b/mods/ts/mod.yaml
@@ -92,6 +92,7 @@ Chrome:
Assemblies:
mods/d2k/OpenRA.Mods.D2k.dll
mods/ra/OpenRA.Mods.RA.dll
+ mods/cnc/OpenRA.Mods.Cnc.dll
mods/ts/OpenRA.Mods.TS.dll
ChromeLayout:
diff --git a/mods/ts/rules/defaults.yaml b/mods/ts/rules/defaults.yaml
index 62fc46a939..0d963ff86e 100644
--- a/mods/ts/rules/defaults.yaml
+++ b/mods/ts/rules/defaults.yaml
@@ -10,7 +10,7 @@
Dimensions: 1,1
Footprint: x
BuildSounds: place2.aud
- TerrainTypes: Clear,Road
+ TerrainTypes: Clear, Road
GivesBuildableArea:
Capturable:
SoundOnDamageTransition:
@@ -48,7 +48,7 @@
Footprint: x
BuildSounds: place2.aud
Adjacent: 7
- TerrainTypes: Clear,Road
+ TerrainTypes: Clear, Road
SoundOnDamageTransition:
DamagedSound: expnew01.aud
DestroyedSound: crmble2.aud
@@ -95,8 +95,7 @@
Clear: 90
Rough: 80
Road: 100
- Ore: 80
- Gems: 80
+ Tiberium: 80
Beach: 80
SelectionDecorations:
Palette: pips
@@ -124,6 +123,9 @@
GivesBounty:
CrushableInfantry:
CrushSound: squish6.aud
+ PoisonedByTiberium:
+ SpawnViceroid:
+ ViceroidActor: vissml
UpdatesPlayerStatistics:
CombatDebugOverlay:
Guard:
@@ -172,6 +174,7 @@
Rough: 40
Road: 100
Beach: 40
+ Tiberium: 40
ROT: 5
SelectionDecorations:
Palette: pips
diff --git a/mods/ts/rules/structures.yaml b/mods/ts/rules/structures.yaml
index 135820928e..e23b3a9d2e 100644
--- a/mods/ts/rules/structures.yaml
+++ b/mods/ts/rules/structures.yaml
@@ -111,6 +111,41 @@ GAPILE:
WithIdleOverlay@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:
Inherits: ^Building
Valued:
diff --git a/mods/ts/rules/world.yaml b/mods/ts/rules/world.yaml
index 13759eea64..3fe037c8ef 100644
--- a/mods/ts/rules/world.yaml
+++ b/mods/ts/rules/world.yaml
@@ -82,17 +82,23 @@ World:
Race: nod
ResourceLayer:
ResourceClaimLayer:
- ResourceType@gem:
- ResourceType: 2
- Palette: player
- EditorSprite: shadow
- Variants: fake
+ FixedColorPalette@GreenTiberium:
+ Base: player
+ Name: greentiberium
+ Color: 57, 201, 128
+ 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
- Name: Gems
- PipColor: Red
- AllowedTerrainTypes: Clear,Road
+ Name: Tiberium
+ PipColor: Green
+ AllowedTerrainTypes: Clear
AllowUnderActors: false
- TerrainType: Gems
+ TerrainType: Tiberium
PathfinderDebugOverlay:
SpawnMapActors:
CreateMPPlayers:
diff --git a/mods/ts/sequences/misc.yaml b/mods/ts/sequences/misc.yaml
index e5d763e0c0..d09e628123 100644
--- a/mods/ts/sequences/misc.yaml
+++ b/mods/ts/sequences/misc.yaml
@@ -268,10 +268,87 @@ moveflsh:
Length: *
Tick: 30
-# TODO: placeholder
resources:
- fake: shadow
- Length: *
+ tib01: tib01
+ 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: shadow
diff --git a/mods/ts/sequences/structures.yaml b/mods/ts/sequences/structures.yaml
index 1dc543c348..9f21d10f8b 100644
--- a/mods/ts/sequences/structures.yaml
+++ b/mods/ts/sequences/structures.yaml
@@ -613,4 +613,36 @@ nahpad:
Length: 20
ShadowStart: 20
icon: nhpdicon
+ 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
\ No newline at end of file
diff --git a/mods/ts/tilesets/interior.yaml b/mods/ts/tilesets/interior.yaml
index 3c6184d0b9..a6ec53d092 100644
--- a/mods/ts/tilesets/interior.yaml
+++ b/mods/ts/tilesets/interior.yaml
@@ -11,6 +11,11 @@ Terrain:
AcceptsSmudgeType: Crater, Scorch
Color: 0, 0, 0
TargetTypes: Ground
+ TerrainType@Tiberium:
+ Type: Tiberium
+ AcceptsSmudgeType: Crater, Scorch
+ Color: 161, 226, 28
+ TargetTypes: Ground
Templates:
Template@255:
diff --git a/mods/ts/weapons.yaml b/mods/ts/weapons.yaml
index e2bfdcba8d..868a31546f 100644
--- a/mods/ts/weapons.yaml
+++ b/mods/ts/weapons.yaml
@@ -693,3 +693,10 @@ Pistola:
InfDeath: 1
Damage: 2
+Tiberium:
+ ROF: 16
+ Warhead:
+ Spread: 42
+ InfDeath: 6
+ Damage: 2
+ PreventProne: yes