mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-23 04:22:13 +03:00
Updated Converter
This commit is contained in:
@@ -30,7 +30,7 @@ while (my $line = <CFG>) {
|
||||
$collect = 0;
|
||||
|
||||
for (my $i=0; $i<scalar(@itemType); $i++) {
|
||||
$cfg .= sprintf("\t\t%s{\"%s\",%.3f}\n", ($i > 0 ? ',' : ''), $itemType[$i], $itemChance[$i]);
|
||||
$cfg .= sprintf("\t\t%s{\"%s\",%.2f}\n", ($i > 0 ? ',' : ''), $itemType[$i], $itemChance[$i]);
|
||||
}
|
||||
|
||||
$cfg .= "\t};\n";
|
||||
@@ -41,6 +41,8 @@ while (my $line = <CFG>) {
|
||||
}
|
||||
close(CFG);
|
||||
|
||||
$cfg =~ s/(\d+\.\d+)[0]+\}\s*$/$1}/gm;
|
||||
|
||||
open(NEWCFG,'>', $configFile) or die $!;
|
||||
print NEWCFG $cfg;
|
||||
close(NEWCFG);
|
||||
|
||||
Reference in New Issue
Block a user