Critter cannon now posts using GNU Social instead of Twitter.
This commit is contained in:
parent
bc5b60e062
commit
0fb28e47e7
@ -108,10 +108,11 @@ fi
|
|||||||
read -n 1 -p "is $name correct? " continue
|
read -n 1 -p "is $name correct? " continue
|
||||||
done
|
done
|
||||||
if [ $newHighScore -eq 1 ] ; then
|
if [ $newHighScore -eq 1 ] ; then
|
||||||
read -n 1 -p "Post this score using TTYtter? " continue
|
read -n 1 -p "Post this score to GNU Social? " answer
|
||||||
if [ "${continue^}" == "Y" ] ; then
|
if [ "${answer^}" == "Y" ] ; then
|
||||||
ttytter -readline=0 -silent -status="I just shot a $amo $distance feet and now hold the 1st place position on my local scoreboard! #CritterCannon" &> /dev/null&
|
read -p "Enter your webfinger, e.g. storm@social.stormdragon.tk: " answer
|
||||||
echo "Score posted."
|
result="$(curl --connect-timeout 60 -s -u "${answer%@*}" -d status="I just got the number $newHighScore position in #${0##*/} on my local scoreboard! I $message Wanna play? http://github.com/stormdragon2976/storm-games #storm-games" -d source="${0##/*}" https://${answer#*@}/api/statuses/update.xml | grep '^ <text>' | sed -e 's/^ <text>//' -e 's/<\/text>$//')"
|
||||||
|
echo "$result"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
i=11
|
i=11
|
||||||
@ -183,25 +184,26 @@ points=$(echo "$points + 25" | bc)
|
|||||||
break
|
break
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
echo "You shot a $amo $distance feet. "
|
message="shot a $amo $distance feet. "
|
||||||
if [ $dynamite -ne 1 ] ; then
|
if [ $dynamite -ne 1 ] ; then
|
||||||
echo -n "The $amo hit $dynamite sticks of dynamite, "
|
message="${message}The $amo hit $dynamite sticks of dynamite, "
|
||||||
else
|
else
|
||||||
echo -n "The $amo hit $dynamite stick of dynamite, "
|
message="${message}The $amo hit $dynamite stick of dynamite, "
|
||||||
fi
|
fi
|
||||||
if [ $ground -ne 1 ] ; then
|
if [ $ground -ne 1 ] ; then
|
||||||
echo -n "landed on the ground $ground times, "
|
message="${message}landed on the ground $ground times, "
|
||||||
else
|
else
|
||||||
echo -n "landed on the ground $ground time, "
|
message="${message}landed on the ground $ground time, "
|
||||||
fi
|
fi
|
||||||
echo -n "and "
|
message="${message}and "
|
||||||
if [ $trampoline -ne 1 ] ; then
|
if [ $trampoline -ne 1 ] ; then
|
||||||
echo "bounced on $trampoline trampolines."
|
message="${message}bounced on $trampoline trampolines. "
|
||||||
else
|
else
|
||||||
echo "bounced on $trampoline trampoline."
|
message="${message}bounced on $trampoline trampoline. "
|
||||||
fi
|
fi
|
||||||
echo "The $amo was killed when $sex landed on $lastTerrain."
|
message="${message}The $amo was killed when $sex landed on $lastTerrain. "
|
||||||
echo "Your score for this shot was $points points."
|
message="${message}Total score for this shot was $points points."
|
||||||
|
echo "You $message"
|
||||||
high_score $distance
|
high_score $distance
|
||||||
echo -e "\nHigh Scores"
|
echo -e "\nHigh Scores"
|
||||||
i=1
|
i=1
|
||||||
|
Loading…
Reference in New Issue
Block a user