Updated Tools

This commit is contained in:
Florian Kinder
2014-02-11 19:59:36 +01:00
parent 7944113218
commit 36a79609b2
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ while (my $line = <CFG>) {
$cfg .= "\t\titemChance[] = {\n" if $small == 0; $cfg .= "\t\titemChance[] = {\n" if $small == 0;
$cfg .= "\t\titemChanceSmall[] = {\n" if $small == 1; $cfg .= "\t\titemChanceSmall[] = {\n" if $small == 1;
for (my $i=0; $i<scalar(@itemType); $i++) { for (my $i=0; $i<scalar(@itemType); $i++) {
$cfg .= sprintf("\t\t\t{\"%s\",\"%s\",%.3f}\n", $itemType[$i]->{Class}, $itemType[$i]->{Type}, $itemChance[$i]); $cfg .= sprintf("\t\t\t%s{\"%s\",\"%s\",%.3f}\n", ($i > 0 ? ',' : ''), $itemType[$i]->{Class}, $itemType[$i]->{Type}, $itemChance[$i]);
} }
$cfg .= "\t\t};\n"; $cfg .= "\t\t};\n";
} }

View File

@@ -3,7 +3,7 @@ use warnings;
use Data::Dumper; use Data::Dumper;
# Customize # Customize
my $configFile = '../../SQF/dayz_code/Configs/CfgBuildingLoot/cfgLoot.hpp'; my $configFile = '../../SQF/dayz_code/Configs/CfgBuildingLoot/CfgLootSmall.hpp';
# do not touch # do not touch
my $cfg = ''; my $cfg = '';