mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 07:31:21 +02:00
added support for 'percent multiplier' in the techtree docummentation tools
This commit is contained in:
Submodule data/glest_game updated: fa2a0cac9e...07aca95635
@@ -82,7 +82,6 @@ our $version = "0.8.1 beta";
|
|||||||
|
|
||||||
# strange stuff in the techtrees:
|
# strange stuff in the techtrees:
|
||||||
# - persian magician splash radius 0?
|
# - persian magician splash radius 0?
|
||||||
# - tech workers move faster with load?
|
|
||||||
# - tech upgrades piercing/blade weapon don't work for battle machine?
|
# - tech upgrades piercing/blade weapon don't work for battle machine?
|
||||||
# - f.e. battle machine with "hold" will only attack land units
|
# - f.e. battle machine with "hold" will only attack land units
|
||||||
# - workers are able to help a technician build an aerodrome faster. is that wanted?
|
# - workers are able to help a technician build an aerodrome faster. is that wanted?
|
||||||
@@ -1927,18 +1926,20 @@ sub get_value {
|
|||||||
my $nodeset = $xpath->find("$location");
|
my $nodeset = $xpath->find("$location");
|
||||||
print "doing location $location\n";
|
print "doing location $location\n";
|
||||||
my ($node) = $nodeset->get_nodelist;
|
my ($node) = $nodeset->get_nodelist;
|
||||||
|
|
||||||
my $value;
|
my $value;
|
||||||
if ( $node ) {
|
if ( $node ) {
|
||||||
my $attribute = XML::XPath::XMLParser::as_string( $node );
|
my $attribute = XML::XPath::XMLParser::as_string( $node );
|
||||||
|
|
||||||
# get only the value of an attribute, XML::Xpath returns f.e. regeneration="3", we want just 3
|
# get only the value of an attribute, XML::Xpath returns f.e. regeneration="3", we want just 3
|
||||||
if ( $attribute =~ /\"(.+?)\"/ ) {
|
if ( $attribute =~ /(?<!value-percent-multiplier)[ \t]*=[ \t]*\"[ \t]*(.+?)[ \t]*\"/ ) {
|
||||||
$value = $1;
|
$value = $1;
|
||||||
|
|
||||||
|
if ( $attribute =~ /value-percent-multiplier[ \t]*=[ \t]*\"[ \t]*true[ \t]*\"/ ) {
|
||||||
|
$value = "$value%";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
#else {
|
||||||
$value = $attribute;
|
# $value = $attribute;
|
||||||
}
|
#}
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user