commit d46de39c6062acd10e915a59f0aca2b779da42d5
parent d3ed7cb832fbe9594568a1c2b072a88640ad0c73
Author: Luxferre <lux@ferre>
Date: Sun, 28 Jan 2024 12:50:14 +0200
Version 1.8.1: fixed abbreviated planet search
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/README b/README
@@ -58,7 +58,7 @@ Fuel price is fixed at 0.2 CR/LY, you can hold 7LY of fuel at most.
== Gameplay differences from the original TE 1.5 C version ==
-As of the current version, 1.8:
+As of the current version, 1.8.1:
* multiple typos corrected in text strings
* the "cash" and "sneak" commands were removed since v1.6
diff --git a/awlite.awk b/awlite.awk
@@ -1,5 +1,5 @@
# awlite: POSIX AWK port of Text Elite
-# Version 1.8
+# Version 1.8.1
# Original high-level algorithms from Text Elite 1.5 by Ian Bell, 1999, 2015
# Porting, corrections, improvements and optimizations by Luxferre, 2024
#
@@ -327,7 +327,7 @@ function matchsys(s, d, i, p, cd) {
d = 9999
s = toupper(s) # system names are stored in uppercase
for(i=0;i<galsize;i++) {
- if(index(s, plannames[i]) == 1) { # found i-th system
+ if(index(plannames[i], s) == 1) { # found i-th system
cd = distance(galcoords_x[i], galcoords_y[i], galcoords_x[p], galcoords_y[p])
if(cd < d) {d = cd; p = i}
}
@@ -680,7 +680,7 @@ BEGIN {
split("", globalseeds) # init galaxy seeds
buildgalaxy(player["galaxynum"], globalseeds) # build the current galaxy
genmarket(0, economies[player["currentplanet"]]) # build local market
- printf("\nWelcome to awlite 1.8\n")
+ printf("\nWelcome to awlite 1.8.1\n")
dohelp()
# start the REPL
printf("\n\nCash: %.1f> ", player["cash"]/10)