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-b93c2d0d6712master
parent
84813f777d
commit
f952a3e588
|
@ -24,17 +24,17 @@ for FILE in pshop*; do
|
||||||
#go there
|
#go there
|
||||||
cd $FILE
|
cd $FILE
|
||||||
|
|
||||||
|
#get the pshopnum
|
||||||
|
PSHOPNUM=$(cut -d p -f3 <<< "$FILE")
|
||||||
|
|
||||||
#for each file in the pshop directory
|
#for each file in the pshop directory
|
||||||
for MYFILE in *; do
|
for MYFILE in *; do
|
||||||
#correct the key values on inventory checkers
|
#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
|
rm -f $MYFILE
|
||||||
mv "${MYFILE}_2" $MYFILE
|
mv "${MYFILE}_2" $MYFILE
|
||||||
done
|
done
|
||||||
|
|
||||||
#get the pshopnum
|
|
||||||
PSHOPNUM=$(cut -d p -f3 <<< "$FILE")
|
|
||||||
|
|
||||||
#calculate HP and SP based on pshopnum
|
#calculate HP and SP based on pshopnum
|
||||||
if [[ $PSHOPNUM -lt 14 ]]; then
|
if [[ $PSHOPNUM -lt 14 ]]; then
|
||||||
#top row of shops
|
#top row of shops
|
||||||
|
@ -77,7 +77,7 @@ for FILE in pshop*; do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [[ ( $hadhp == 1 ) && ( $hadsp == 1 ) ]]; then
|
if [[ ( $hadhp == 1 ) && ( $hadsp == 1 ) ]]; then
|
||||||
state=1
|
state=0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue