diff options
author | mota23 <mota23@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-29 16:57:11 +0000 |
---|---|---|
committer | mota23 <mota23@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-05-29 16:57:11 +0000 |
commit | 2648bf52507205e7b00898cf2f5b6a3eb40e2229 (patch) | |
tree | 84f8be1faeac3269df1fd2f35a09926ef03ec94f /Game/Code/Classes | |
parent | 0bb302b56187c6435ae78bee7901765dbf72e89d (diff) | |
download | usdx-2648bf52507205e7b00898cf2f5b6a3eb40e2229.tar.gz usdx-2648bf52507205e7b00898cf2f5b6a3eb40e2229.tar.xz usdx-2648bf52507205e7b00898cf2f5b6a3eb40e2229.zip |
Added: Support for Player Name Templates. Set Names in config.ini ([NameTemplate], Name1..12=text and recall in Name-Screens with F1..F12.
Fix: All 12 player- and 3 teamnames are now saved in config.ini
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@237 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UIni.pas | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas index f3ea84ac..c92a7a50 100644 --- a/Game/Code/Classes/UIni.pas +++ b/Game/Code/Classes/UIni.pas @@ -5,7 +5,11 @@ uses IniFiles, ULog, SysUtils; type
TIni = class
- Name: array[0..5] of string;
+ Name: array[0..11] of string;
+
+ // Templates for Names Mod
+ NameTeam: array[0..2] of string;
+ NameTemplate: array[0..11] of string;
// Game
Players: integer;
@@ -174,9 +178,16 @@ begin IniFile := TMemIniFile.Create(GamePath + 'config.ini');
// Name
- for I := 0 to 5 do
+ for I := 0 to 11 do
Ini.Name[I] := IniFile.ReadString('Name', 'P'+IntToStr(I+1), 'Player'+IntToStr(I+1));
+
+ // Templates for Names Mod
+ for I := 0 to 2 do
+ Ini.NameTeam[I] := IniFile.ReadString('NameTeam', 'T'+IntToStr(I+1), 'Team'+IntToStr(I+1));
+ for I := 0 to 11 do
+ Ini.NameTemplate[I] := IniFile.ReadString('NameTemplate', 'Name'+IntToStr(I+1), 'Template'+IntToStr(I+1));
+
// Players
Tekst := IniFile.ReadString('Game', 'Players', IPlayers[0]);
for Pet := 0 to High(IPlayers) do
@@ -665,8 +676,13 @@ begin IniFile := TIniFile.Create(GamePath + 'config.ini');
//Name
- for I := 1 to 6 do
+ // Templates for Names Mod
+ for I := 1 to 12 do
IniFile.WriteString('Name', 'P' + IntToStr(I), Ini.Name[I-1]);
+ for I := 1 to 3 do
+ IniFile.WriteString('NameTeam', 'T' + IntToStr(I), Ini.NameTeam[I-1]);
+ for I := 1 to 12 do
+ IniFile.WriteString('NameTemplate', 'Name' + IntToStr(I), Ini.NameTemplate[I-1]);
IniFile.Free;
end;
|