From a0ff8680a3e5e4bd3845bfdd8e24f8559cbbc27b Mon Sep 17 00:00:00 2001 From: JackUnthank Date: Tue, 6 Jan 2015 17:01:15 +0000 Subject: [PATCH] Make the AI print out the walls not the map. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t worry I wasn’t doing this all afternoon I had a spare 5 minutes whilst waiting for some .DAT files to md5. =P --- api/perl/ttrts.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/perl/ttrts.pm b/api/perl/ttrts.pm index 6dc279e..793269b 100644 --- a/api/perl/ttrts.pm +++ b/api/perl/ttrts.pm @@ -238,6 +238,13 @@ sub PrintGameFromGamestateString $map[$invalidPos[0]][$invalidPos[1]] = "~"; } + # Fill with walls + foreach my $wall ( $info[8] =~ /\[(\d+,\d+)\]/g ) + { + $wall =~ /(\d+),(\d+)/; + $map[$1][$2] = "|"; + } + # Fill with units for my $unit (@units) {