Removed the last dependency on buildings.txt et al, and removed those ".txt" files.
This commit is contained in:
@@ -44,9 +44,11 @@ namespace OpenRa.Game
|
||||
spriteRenderer = new SpriteRenderer(renderer, false);
|
||||
clockRenderer = new SpriteRenderer(renderer, true);
|
||||
|
||||
LoadSprites("buildings.txt");
|
||||
LoadSprites("vehicles.txt");
|
||||
LoadSprites("infantry.txt");
|
||||
LoadSprites( "BuildingTypes", "building" );
|
||||
LoadSprites( "VehicleTypes", "vehicle" );
|
||||
LoadSprites( "InfantryTypes", "infantry" );
|
||||
LoadSprites( "ShipTypes", "boat" );
|
||||
LoadSprites( "PlaneTypes", "plane" );
|
||||
|
||||
foreach (string s in groups)
|
||||
{
|
||||
@@ -64,18 +66,15 @@ namespace OpenRa.Game
|
||||
game.controller.orderGenerator = new PlaceBuilding(game.LocalPlayer, item.techTreeItem.tag.ToLowerInvariant());
|
||||
}
|
||||
|
||||
void LoadSprites(string filename)
|
||||
void LoadSprites( string category, string group )
|
||||
{
|
||||
foreach (string l in Util.ReadAllLines(FileSystem.Open(filename)))
|
||||
foreach( var u in Rules.AllRules.GetSection( category ) )
|
||||
{
|
||||
var line = l.ToLowerInvariant();
|
||||
string key = line.Substring(0, line.IndexOf(','));
|
||||
int secondComma = line.IndexOf(',', line.IndexOf(',') + 1);
|
||||
string group = line.Substring(secondComma + 1, line.Length - secondComma - 1);
|
||||
var unit = Rules.UnitInfo[ u.Key ];
|
||||
|
||||
if( Rules.UnitInfo[ key ].TechLevel != -1 )
|
||||
sprites.Add( key, SpriteSheetBuilder.LoadSprite( key + "icon", ".shp" ) );
|
||||
itemGroups.Add(key, group);
|
||||
if( unit.TechLevel != -1 )
|
||||
sprites.Add( unit.Name, SpriteSheetBuilder.LoadSprite( unit.Name + "icon", ".shp" ) );
|
||||
itemGroups.Add( unit.Name, group );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
IRON,Iron Curtain,building
|
||||
ATEK,Allied Tech Center,building
|
||||
PDOX,Chronosphere,building
|
||||
WEAP,War Factory,building
|
||||
SYRD,Shipyard,building
|
||||
SPEN,Sub Pen,building
|
||||
PBOX,Pillbox,building
|
||||
HBOX,Camo Pillbox,building
|
||||
TSLA,Tesla Coil,building
|
||||
GUN,Turret,building
|
||||
AGUN,AA Gun,building
|
||||
FTUR,Flame Turret,building
|
||||
FACT,Construction Yard,building
|
||||
PROC,Ore Refinery,building
|
||||
SILO,Silo,building
|
||||
HPAD,Helipad,building
|
||||
DOME,Radar Dome,building
|
||||
GAP,Gap Generator,building
|
||||
SAM,SAM Site,building
|
||||
MSLO,Missile Silo,building
|
||||
AFLD,Airstrip,building
|
||||
POWR,Power Plant,building
|
||||
APWR,Advanced Power Plant,building
|
||||
STEK,Soviet Tech Center,building
|
||||
BARR,Soviet Barracks,building
|
||||
TENT,Allied Barracks,building
|
||||
KENN,Kennel,building
|
||||
FIX,Service Depot,building
|
||||
SBAG,Sandbags,building
|
||||
BRIK,Concrete Wall,building
|
||||
FENC,Wire Fence,building
|
||||
FACF,Fake Construction Yard,building
|
||||
WEAF,Fake War Factory,building
|
||||
SYRF,Fake Shipyard,building
|
||||
SPEF,Fake Sub Pen,building
|
||||
DOMF,Fake Radar Dome,building
|
||||
FCOM,Forward Command Post,building
|
||||
|
||||
17
infantry.txt
17
infantry.txt
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# The infantry that we (currently) support.
|
||||
#
|
||||
|
||||
DOG,Attack Dog,infantry
|
||||
E1,Rifle Infantry,infantry
|
||||
E2,Grenadier,infantry
|
||||
E3,Rocket Soldier,infantry
|
||||
E4,Flamethrower,infantry
|
||||
E6,Engineer,infantry
|
||||
SPY,Spy,infantry
|
||||
THF,Thief,infantry
|
||||
E7,Tanya,infantry
|
||||
MEDI,Medic,infantry
|
||||
|
||||
# TODO: civilians, special (campaign) units
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
Invisible
|
||||
LeapDog
|
||||
Cannon
|
||||
Ack
|
||||
Torpedo
|
||||
FROG
|
||||
HeatSeeker
|
||||
LaserGuided
|
||||
AAMissile
|
||||
Lobbed
|
||||
Catapult
|
||||
Bomblet
|
||||
Ballistic
|
||||
Parachute
|
||||
GPSSatellite
|
||||
NukeUp
|
||||
NukeDown
|
||||
Fireball
|
||||
33
vehicles.txt
33
vehicles.txt
@@ -1,33 +0,0 @@
|
||||
#
|
||||
# The vehicles that we (currently) support.
|
||||
#
|
||||
|
||||
V2RL,V2 Rocket,vehicle
|
||||
1TNK,Light Tank,vehicle
|
||||
3TNK,Heavy Tank,vehicle
|
||||
2TNK,Medium Tank,vehicle
|
||||
4TNK,Mammoth Tank,vehicle
|
||||
MRJ,Radar Jammer,vehicle
|
||||
MGG,Mobile Gap Generator,vehicle
|
||||
ARTY,Artillery,vehicle
|
||||
HARV,Ore Truck,vehicle
|
||||
MCV,Mobile Construction Vehicle,vehicle
|
||||
JEEP,Ranger,vehicle
|
||||
APC,Armored Personnel Carrier,vehicle
|
||||
MNLY,Minelayer,vehicle
|
||||
|
||||
# TODO: move ships and planes into their own files
|
||||
|
||||
SS,Submarine,boat
|
||||
DD,Destroyer,boat
|
||||
CA,Cruiser,boat
|
||||
LST,Transport,boat
|
||||
PT,Gunboat,boat
|
||||
|
||||
MIG,Mig Attack Plane,plane
|
||||
YAK,Yak Attack Plane,plane
|
||||
TRAN,Transport Helicopter,plane
|
||||
HELI,Longbow,plane
|
||||
HIND,Hind,plane
|
||||
# TODO: U2 (spyplane), BADR (paratrooper/paradrop plane)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
SA
|
||||
HE
|
||||
AP
|
||||
Fire
|
||||
HollowPoint
|
||||
Super
|
||||
Organic
|
||||
Nuke
|
||||
35
weapons.txt
35
weapons.txt
@@ -1,35 +0,0 @@
|
||||
Colt45
|
||||
ZSU-23
|
||||
Vulcan
|
||||
Maverick
|
||||
Camera
|
||||
FireballLauncher
|
||||
Flamer
|
||||
Sniper
|
||||
ChainGun
|
||||
Pistol
|
||||
M1Carbine
|
||||
Dragon
|
||||
Hellfire
|
||||
Grenade
|
||||
75mm
|
||||
90mm
|
||||
105mm
|
||||
120mm
|
||||
TurretGun
|
||||
MammothTusk
|
||||
155mm
|
||||
M60mg
|
||||
Napalm
|
||||
TeslaZap
|
||||
Nike
|
||||
RedEye
|
||||
8Inch
|
||||
Stinger
|
||||
TorpTube
|
||||
2Inch
|
||||
DepthCharge
|
||||
ParaBomb
|
||||
DogJaw
|
||||
Heal
|
||||
SCUD
|
||||
Reference in New Issue
Block a user