Removed a duplicate file

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/trunk/maps@2974 282e977c-c81d-0410-88c4-b93c2d0d6712
master
majorwoo 2004-10-21 23:27:52 +00:00
parent 778a93590b
commit a80a76d665
2 changed files with 1 additions and 90 deletions

View File

@ -1,89 +0,0 @@
#!/bin/bash
#
# creator: josh@woosworld.net
# Simple script to replicate changes made to pshop1
# to the rest of the pshops and keep the correct
# keys working.
#
# Obviously this is based on some conventions I have
# don't use pshop1 anywhere else in the file etc...
#
#first rename the pshop1 dir so we don't erase it
mv pshop1 PSHOP
#then remove all the pshop files
rm -f pshop*/*
#copy PSHOP to all the pshop directories
for FILE in pshop*;do
if [ -d "$FILE" ]
then
#copy the files into the pshops directories
cp PSHOP/* "$FILE"/
#go there
cd $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
rm -f $MYFILE
mv "$MYFILE"_2 $MYFILE
done
#get the pshopnum
PSHOPNUM=`echo "$FILE" | cut -d p -f3`
#calculate HP and SP based on pshopnum
if [ $PSHOPNUM -lt 14 ]
then
#top row of shops
SP="2"
TEMPHP=`expr $PSHOPNUM \* 3`
HP=`expr $TEMPHP + 1`
else
#bottom row of shops
SP="6"
MODPSHOPNUM=`expr $PSHOPNUM - 14`
TEMPHP=`expr $MODPSHOPNUM \* 3`
HP=`expr $TEMPHP + 1`
fi
#fix the exit on gfloor
while read LINE
do
if [ "$LINE" == "slaying ../pshops_main" ]
then
#remove the 2 lines
read dummy_hp_line
read dummp_sp_line
#add the original back
echo "$LINE" >> gfloor2
#write the new lines
echo "hp $HP" >> gfloor2
echo "sp $SP" >> gfloor2
else
#just add it back to the file
echo "$LINE" >> gfloor2
fi
done < gfloor
#replace gfloor with gfloor2
rm -f gfloor
mv gfloor2 gfloor
#go back up
cd ..
fi
done
#put pshop1 back
mv PSHOP pshop1
#bye
exit 0

View File

@ -5,7 +5,7 @@
TODO TODO
*auto key tracking system? (python to rename the shop?) *auto key tracking system? (python to rename the shop?)
v 1.3 v 1.3 -- 21 Sep 2004
*added shops/pshopsinc2 *added shops/pshopsinc2
*added diamond/platinum convertor to pshopsinc (thanks leaf!) *added diamond/platinum convertor to pshopsinc (thanks leaf!)
*modified pshopsinc managers office slightly *modified pshopsinc managers office slightly