Fix some bugs in the pshop_copier script for the brest pshops.

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@11538 282e977c-c81d-0410-88c4-b93c2d0d6712
master
anmaster 2009-02-15 15:37:56 +00:00
parent 84813f777d
commit f952a3e588
1 changed files with 5 additions and 5 deletions

View File

@ -24,17 +24,17 @@ for FILE in pshop*; do
#go there
cd $FILE
#get the pshopnum
PSHOPNUM=$(cut -d p -f3 <<< "$FILE")
#for each file in the pshop directory
for MYFILE in *; do
#correct the key values on inventory checkers
sed "s/pshop1/${FILE}/" "$MYFILE" > "${MYFILE}_2"
sed "s/pshop1/${FILE}/;s/^name Private Shop 1,/name Private Shop ${PSHOPNUM},/" "$MYFILE" > "${MYFILE}_2"
rm -f $MYFILE
mv "${MYFILE}_2" $MYFILE
done
#get the pshopnum
PSHOPNUM=$(cut -d p -f3 <<< "$FILE")
#calculate HP and SP based on pshopnum
if [[ $PSHOPNUM -lt 14 ]]; then
#top row of shops
@ -77,7 +77,7 @@ for FILE in pshop*; do
;;
esac
if [[ ( $hadhp == 1 ) && ( $hadsp == 1 ) ]]; then
state=1
state=0
fi
;;
esac