Astrogator
The Astrogator was a device used for a while on Otherspace as a navigation aid when flying ships in Hspace (2 and/or 3). It was necessary in a game where ships could use the standard Hspace hyperdrive and distant stars often could not be seen on sensors until one was very close.
Functions:
abs(),
add(),
and(),
ansi(),
capstr(),
center(),
comp(),
dec(),
dist3d(),
div(),
edit(),
extract(),
fdiv(),
first(),
grab(),
graball(),
gt(),
gte(),
haspower(),
if(),
ifelse(),
index(),
isnum(),
iter(),
lattr(),
lcstr(),
ljust(),
locate(),
lt(),
match(),
mid(),
mod(),
mul(),
name(),
parent(),
power(),
repeat(),
rest(),
rjust(),
room(),
round(),
secure(),
set(),
setdiff(),
setq(),
setunion(),
sign(),
sort(),
sortby(),
space(),
sqrt(),
squish(),
sub(),
switch(),
t(),
time(),
timestring(),
type(),
u(),
v(),
wipe(),
words(),
x().
Instructions
Copy and paste the below code into a compatible MUSH or MUX.
MUSHCode for Astrogator
@@ This was @decompiled the night before this code was abandoned.
@create Astrogator Parent - 1277
@link Astrogator Parent - 1277 = #4988
@parent Astrogator Parent - 1277=#1661
@lock/Basic Astrogator Parent - 1277==#2085
@set Astrogator Parent - 1277 = LINK_OK
@set Astrogator Parent - 1277 = SAFE
@set Astrogator Parent - 1277 = NO_COMMAND
&HELP_FUEL Astrogator Parent - 1277=%r%t This chart shows the total fuel useage for a 10 minute jump in a craft with the listed stats. As well as showing the total overall flight time for that craft. Please note that the minutes of flight time(min) figure is not an exact number. Merely an estimate. Rely on this entirely at your own risk. %r %r %tFuel%tEff%tPoT%tMin%r%t200%t10%t5%% %t200%r%t150%t10%t6%% %t185%r%t100%t10%t8%% %t145%r%t50%t10%t9-10%% %t100%r %r %t200%t5%t9%% %t110%r %t150%t5%t12%% %t96%r %t100%t5%t18%% %t60 %r%t50%t5%t25%% %t40%r%r%t200%t1%t43%% %t25 %r %t150%t1%t65%% %t15%r %t100%t1%t85%% %t12%r%t50 %t1%t100%% %t8%r %r %t Fuel - The total size of the fuel tank %r %r %t Eff - Fuel Efficiency %r %r %t PoT - Percentage of fuel used in a 10 minute jump. %r %r %t Min - Total minutes of OS jumptime the craft can sustain.
&HELP_ALL Astrogator Parent - 1277=[iter(setdiff(v(List_Help),HELP_All),%r[u(##)]%r)]
&LIST_HELP Astrogator Parent - 1277=HELP_LINKS HELP_WAYPOINTS HELP_PLOTTING_COURSES HELP_WIDGETS HELP_All HELP_FUEL
&MAP_DEFAULT Astrogator Parent - 1277=Centauri -4918754 -5870334 -3043316|Sagittarius -4600577 -3500000 -4603592|Mars -4304571 -3455576 -2910715|Luna -4300100 -3456700 -2910716|Earth -4300095 -3456098 -2910710|Sivad -3947288 -2224713 -6689298|Castor -3515982 -3222009 -3000813|Demaria -2500000 -2500000 -2500000|Antimone -2368144 -1368144 15355|Quaquan -993678 -910713 -995372|Ungstir -70000 790000 808000|Grimlahd 950470 8760003 590000|Odari 1009000 1205010 1010001|Nalhom 8381027 2590714 5452590|Lebal 10080000 5631700 8790400|Ist'thol'mek 10694305 4402200 7749500|Vollista 11062669 6490293 11412578|Tomin_Kora 1000000 900000 1000000
&WP_ORIGIN Astrogator Parent - 1277=Sol 0 0 0
@set Astrogator Parent - 1277/WP_ORIGIN=no_command
&WP_DEST Astrogator Parent - 1277=Proxima_Centauri -11555846383 -15571786152 -35761242035
@set Astrogator Parent - 1277/WP_DEST=no_command
&SPEED Astrogator Parent - 1277=0 0
@set Astrogator Parent - 1277/SPEED=no_command
&MAP Astrogator Parent - 1277=Default
@set Astrogator Parent - 1277/MAP=no_command
&LINK_DB Astrogator Parent - 1277=
@set Astrogator Parent - 1277/LINK_DB=no_command
&HELP_WIDGETS Astrogator Parent - 1277=%tThese commands are designed to assist with navigation in other ways than just plotting a course.%r%r[ljust([ansi(ch,ETA FOR)] [ansi(y,<Distance>)] [ansi(ch,AT)] [ansi(y,<Speed>)],38)]Computes an estimated time of arrival.%r[ljust([ansi(ch,ETA FOR)] [ansi(y,<Distance>)] [ansi(ch,AT)] [ansi(y,<Speed>)] [ansi(ch,JUMP)],38)]Computes an estimated time of arrival.
@set Astrogator Parent - 1277/HELP_WIDGETS=no_command
&HELP_WAYPOINTS Astrogator Parent - 1277=%tWaypoints are used to store coordinates of things for use in plotting courses. Maps may contain many waypoints, and are useful for keeping coordinates arranged in a logical order.%r%r[ljust([ansi(ch,MAP LIST)],38)]Lists all maps of stored waypoints.%r[ljust([ansi(ch,MAP CREATE)] [ansi(y,<Map>)],38)]Creates a new map and loads it.%r[ljust([ansi(ch,MAP DEL)] [ansi(y,<Map>)],38)]Deletes a map.%r[ljust([ansi(ch,MAP LOAD)] [ansi(y,<Map>)],38)]Loads a map.%r[ljust([ansi(ch,MAP COPY)] [ansi(y,<Map>)][ansi(ch,=)][ansi(y,<New Map>)],38)]Loads a map.%r%r[ljust(ansi(ch,WAYPOINT LIST),38)]Displays all recorded waypoints.%r[ljust([ansi(ch,WAYPOINT ADD)] [ansi(y,<Name>)] [ansi(ch,=)] [ansi(y,<X> <Y> <Z>)],38)]Creates a waypoint.%r[ljust([ansi(ch,WAYPOINT STORE)] [ansi(y,<Name>)],38)]Creates new waypoint here.%r[ljust([ansi(ch,WAYPOINT DEL)] [ansi(y,<Name>)],38)]Deletes a waypoint.%r[ljust([ansi(ch,WAYPOINT SORT)] [ansi(y,<)][ansi(ch,NAME)][ansi(y,/)][ansi(ch,DIST)][ansi(y,/)][ansi(ch,X)][ansi(y,/)][ansi(ch,Y)][ansi(y,/)][ansi(ch,Z)][ansi(y,>)],38)]Sorts the waypoint by selected criteria.
@set Astrogator Parent - 1277/HELP_WAYPOINTS=no_command
&HELP_PLOTTING_COURSES Astrogator Parent - 1277=%tThese commands will allow you to plot a course. Remember that the astrogator does not include acceleration for these calculations. The astrogator much also have a valid datalink to know it's current location.%r%r[ljust(ansi(ch,PLOT COURSE),38)]Displays information on plotted course.%r[ljust(ansi(ch,PLOT ALL COURSES),38)]Displays a course plot to all waypoints.%r[ljust([ansi(ch,START AT)] [ansi(y,<Waypoint>)],38)]Selects the point of origin.%r[ljust(ansi(ch,START HERE),38)]Selects here the point of origin.%r[ljust([ansi(ch,STOP AT)] [ansi(y,<Waypoint>)],38)]Selects the destination.%r[ljust(ansi(ch,STOP HERE),38)]Selects here the destination.%r[ljust([ansi(ch,SET SPEED)] [ansi(y,<Speed>)],38)]Changes the speed setting.%r[ljust([ansi(ch,SET SPEED)] [ansi(y,<Speed>)] [ansi(ch,JUMP)],38)]Changes the speed setting.
@set Astrogator Parent - 1277/HELP_PLOTTING_COURSES=no_command
&HELP_LINKS Astrogator Parent - 1277=%tBefore the astrogator can determine your location in space, you must first link it with a navigation console. The Astrogator will use this connection only to gather data, and will not pilot the ship in any way. [ifelse(haspower(%!,see_all),,This unit must be dropped next to the console to draw any data through it's datalink.)]%r%r[ljust([ansi(ch,LINK)] [ansi(y,<Console>)],38)]Creates a datalink with the console.%r[ljust(ansi(ch,UNLINK),38)]Disconnects any active link.
@set Astrogator Parent - 1277/HELP_LINKS=no_command
&FUN_SHORTTIME Astrogator Parent - 1277=[ifelse(isnum(secure(%0)),timestring(round(secure(%0),0)),N/A)]
@set Astrogator Parent - 1277/FUN_SHORTTIME=no_command
&FUN_ORIGIN Astrogator Parent - 1277=[ifelse(match(LINKED,v(WP_Origin)),u(FUN_HERE),v(WP_Origin))]
@set Astrogator Parent - 1277/FUN_ORIGIN=no_command
&FUN_HERE Astrogator Parent - 1277=[ifelse([and(isnum(hs_get_attr(v(Link_DB),x)),match(room(v(Link_DB)),room(%!)))],%(Current_Position%) [round(hs_get_attr(v(Link_DB),x),0)] [round(hs_get_attr(v(Link_DB),y),0)] [round(hs_get_attr(v(Link_DB),z),0)],%(Connection_Lost%) 0 0 0)]
@set Astrogator Parent - 1277/FUN_HERE=no_command
&FUN_DIST3D Astrogator Parent - 1277=[sqrt(add(power(sub(%0,%3),2),power(sub(%1,%4),2),power(sub(%2,%5),2)))]
@set Astrogator Parent - 1277/FUN_DIST3D=no_command
&FUN_DEST Astrogator Parent - 1277=[ifelse(match(LINKED,v(WP_Dest)),u(FUN_HERE),v(WP_Dest))]
@set Astrogator Parent - 1277/FUN_DEST=no_command
&CONST_JUMP Astrogator Parent - 1277=2500
@set Astrogator Parent - 1277/CONST_JUMP=no_command
&CMD_WP_STORE Astrogator Parent - 1277=$WAYPOINT STORE *:@pemit %#=[switch([setq(0,edit(edit(squish(secure(%0)),|,I),%b,_))][setq(1,rest(u(FUN_HERE)))][t(match(iter(v(MAP_[v(Map)]),first(##),|),%q0))][t(words(v(MAP_[v(Map)])))],1*,ERROR: Waypoint name is use.,00, Waypoint added.[set(%!,MAP_[v(Map)]:[%q0] [%q1])],01, Waypoint added.[set(%!,MAP_[v(map)]:[v(MAP_[v(Map)])]|[%q0] [%q1])],ERROR: Unknown malfunction.)]
&CMD_WP_LIST Astrogator Parent - 1277=$WAYPOINT LIST:@pemit %#=[ansi(mh,Waypoint List: [capstr(lcstr(edit(v(Map),_,%b)))])]%r[ansi(b,repeat(=,78))][ifelse(words(v(MAP_[v(Map)])),iter(v(MAP_[v(Map)]),%r%b[ansi(ch,\[)][rjust(ansi(c,#@),2)][ansi(ch,\])]%b[ansi(y,ljust(mid(edit(first(##),_,%b),0,26),26))][rjust(extract(##,2,1),15)][rjust(extract(##,3,1),15)][rjust(extract(##,4,1),15)],|),%r[ansi(r,center(No waypoints are stored.,78))])]%r[ansi(b,repeat(=,78))]
&CMD_WP_DEL Astrogator Parent - 1277=$WAYPOINT DEL *:@pemit %#=[ifelse([setq(0,match(iter(v(MAP_[v(Map)]),first(##),|),*[edit(secure(%0),%b,_)]*))][t(%q0)],Waypoint [ansi(y,edit(first(index(v(MAP_[v(Map)]),|,%q0,1)),_,%b))] has been deleted.[set(%!,MAP_[v(Map)]:[index(v(MAP_[v(Map)]),|,1,sub(%q0,1))][if(and(gt(%q0,1),lt(%q0,words(v(MAP_[v(Map)]),|))),|)][index(v(MAP_[v(Map)]),|,add(%q0,1),sub(words(v(MAP_[v(Map)]),|),%q0))])],ERROR: Invalid waypoint.)]
&CMD_WP_ADD Astrogator Parent - 1277=$WAYPOINT ADD *=*:@pemit %#=[switch([setq(0,edit(edit(squish(secure(%0)),|,I),%b,_))][setq(1,[round(extract(secure(%1),1,1),0)] [round(extract(secure(%1),2,1),0)] [round(extract(secure(%1),3,1),0)])][and(isnum(extract(%q1,1,1)),isnum(extract(%q1,2,1)),isnum(extract(%q1,3,1)),match(3,words(%q1)))][t(match(iter(v(MAP_[v(Map)]),first(##),|),%q0))][t(words(v(MAP_[v(Map)])))],0*,ERROR: Invalid coordinates.,11*,ERROR: Waypoint name is use.,100, Waypoint added.[set(%!,MAP_[v(Map)]:[%q0] [%q1])],101, Waypoint added.[set(%!,Map_[v(Map)]:[v(MAP_[v(Map)])]|[%q0] [%q1])],ERROR: Unknown malfunction.)]
&CMD_UNLINK Astrogator Parent - 1277=$UNLINK:@pemit %#=[ifelse(t(v(Link_DB)),This unit has been disconnected from [ansi(y,name(v(Link_DB)))].[set(%!,Link_DB:)],ERROR: This unit is not linked to anything.)]
&CMD_STOP_HERE Astrogator Parent - 1277=$STOP HERE:@pemit %#=[ifelse(t(v(LINK_DB)),The current location is now set as the destination.[set(%!,WP_DEST:LINKED)],ERROR: Unable to gather local coordinates.)]
&CMD_STOP_AT Astrogator Parent - 1277=$STOP AT *:@pemit %#=[ifelse([setq(0,index(v(MAP_[v(Map)]),|,match(iter(v(MAP_[v(Map)]),first(##),|),*[edit(secure(%0),%b,_)]*),1))][t(%q0)],Waypoint [ansi(y,edit(first(%q0),_,%b))] is now set as the destination.[set(%!,WP_Dest:[%q0])],ERROR: Invalid waypoint)]
&CMD_START_HERE Astrogator Parent - 1277=$START HERE:@pemit %#=[ifelse(t(v(LINK_DB)),The current location is now set as the point of origin.[set(%!,WP_ORIGIN:LINKED)],ERROR: Unable to gather local coordinates.)]
&CMD_START_AT Astrogator Parent - 1277=$START AT *:@pemit %#=[ifelse([setq(0,index(v(MAP_[v(Map)]),|,match(iter(v(MAP_[v(Map)]),first(##),|),*[edit(secure(%0),%b,_)]*),1))][t(%q0)],Waypoint [ansi(y,edit(first(%q0),_,%b))] is now set as the point of origin.[set(%!,WP_Origin:[%q0])],ERROR: Invalid waypoint)]
&CMD_SET_SPEED Astrogator Parent - 1277=$SET SPEED *:@pemit %#=[setq(0,secure(%0))][setq(1,round(first(%q0),0))][setq(2,match(J,mid(rest(%q0),0,1)))][ifelse([isnum(%q1)],The speed setting has been changed to [ansi(y,%q1)] [ifelse(%q2,in hyperspace%, or [ansi(y,mul(v(CONST_JUMP),%q1))] Mm/hr in normal space.[set(%!,Speed:[mul(v(CONST_JUMP),%q1)] 1)],Mm/hr.[set(%!,Speed:[%q1] 0)])],ERROR: Speed must be a number.)]
&CMD_PLOT_ALL Astrogator Parent - 1277=$PLOT ALL COURSES:@pemit %#=[ansi(mh,Plotted Courses to All Waypoints)]%r[ansi(b,repeat(=,78))][ifelse(words(v(MAP_[v(Map)]),|),[setq(8,u(%!/FUN_Origin))][setq(0,extract(%q8,2,1))][setq(1,extract(%q8,3,1))][setq(2,extract(%q8,4,1))]%r[ansi(ch,Point of Origin:)] [ansi(y,edit(first(%q8),_,%b))] [ansi(ch,at)] [rest(%q8)]%r[ansi(ch,Speed:)] [ifelse(rest(v(Speed)),[ansi(y,div(first(v(Speed)),v(CONST_JUMP)))] in hyperspace or [ansi(y,first(v(Speed)))] hm/hr in normal space.,[ansi(y,first(v(Speed)))] hm/hr)]%r[ansi(ch,Map:)] [ansi(y,[capstr(lcstr(v(Map)))])]%r[ansi(b,repeat(-,78))]%r[ansi(ch,[ljust(Destination,23)][center(Bearing,7)][center(Distance,23)][center(ETA,23)])][iter(v(MAP_[v(Map)]),[setq(3,extract(##,2,1))][setq(4,extract(##,3,1))][setq(5,extract(##,4,1))][setq(6,round(u(%!/Fun_dist3d,%q0,%q1,%q2,%q3,%q4,%q5),0))]%r[ansi(y,ljust(edit(first(##),_,%b),23))][rjust(xyang(%q0,%q1,%q3,%q4),3)]/[ljust(zang(%q0,%q1,%q2,%q3,%q4,%q5),3)][rjust(%q6,23)][rjust(ifelse(gt(first(v(Speed)),0),u(%!/FUN_ShortTime,fdiv(%q6,fdiv(first(v(Speed)),3600))),N/A),23)],|)],%r[ansi(r,center(No waypoints are stored.,78))])]%r[ansi(b,repeat(=,78))]
&CMD_PLOT Astrogator Parent - 1277=$PLOT COURSE:@pemit %#=[setq(0,extract(u(%!/FUN_Origin),2,1))][setq(1,extract(u(%!/FUN_Origin),3,1))][setq(2,extract(u(%!/FUN_Origin),4,1))][setq(3,extract(u(%!/FUN_Dest),2,1))][setq(4,extract(u(%!/FUN_Dest),3,1))][setq(5,extract(u(%!/FUN_Dest),4,1))][setq(6,round(u(Fun_dist3d,%q0,%q1,%q2,%q3,%q4,%q5),0))][setq(7,v(Speed))][ansi(b,.[repeat(-,74)].%r|)][ansi(mh,center(ORIGIN,24))][ansi(b,|)][ansi(mh,center(DESTINATION,24))][ansi(b,|)][ansi(mh,center(COURSE DATA,24))][ansi(b,|%r|)][ansi(y,center(mid(edit(first(u(%!/FUN_Origin)),_,%b),0,24),24))][ansi(b,|)][ansi(y,center(mid(edit(first(u(%!/FUN_Dest)),_,%b),0,24),24))][ansi(b,|)][ansi(c,rjust(Bearing:%b,11))][ljust([xyang(%q0,%q1,%q3,%q4)]/[zang(%q0,%q1,%q2,%q3,%q4,%q5)],13)][ansi(b,|%r|)][ansi(c,rjust(X:%b,7))][rjust(%q0,13)][space(4)][ansi(b,|)][ansi(c,rjust(X:%b,7))][rjust(%q3,13)][space(4)][ansi(b,|)][ansi(c,rjust(Distance:%b,11))][ljust(%q6,13)][ansi(b,|%r|)][ansi(c,rjust(Y:%b,7))][rjust(%q1,13)][space(4)][ansi(b,|)][ansi(c,rjust(Y:%b,7))][rjust(%q4,13)][space(4)][ansi(b,|)][ansi(c,rjust(Speed:%b,11))][ljust([ifelse(rest(%q7),[ansi(y,div(first(%q7),v(CONST_JUMP)))] [ansi(c,Jump)],first(%q7))],13)][ansi(b,|%r|)][ansi(c,rjust(Z:%b,7))][rjust(%q2,13)][space(4)][ansi(b,|)][ansi(c,rjust(Z:%b,7))][rjust(%q5,13)][space(4)][ansi(b,|)][ansi(c,rjust(ETA:%b,11))][ljust(ifelse(gt(first(%q7),0),u(%!/FUN_ShortTime,fdiv(%q6,fdiv(first(%q7),3600))),N/A),13)][ansi(b,|%r'[repeat(-,74)]')][setq(8,v(Link_DB))][ifelse(and(t(hs_get_attr(%q8,Accel)),t(hs_get_attr(%q8,speed))),%rAt [ansi(y,round(hs_get_attr(%q8,speed),0))] hm/hr it will take this ship [ansi(y,timestring(round(fdiv(hs_get_attr(%q8,Speed),hs_get_attr(%q8,Accel)),0)))] and [ansi(y,round(fdiv(power(fdiv(hs_get_attr(%q8,Speed),3600),2),fdiv(hs_get_attr(%q8,Accel),1800)),0))] hms to come to a complete stop.,)][ifelse(hs_get_attr(%q8,Speed),%rAt present speed and fuel supplies\, this ship will run out of fuel in [ansi(y,round(mileage(%q8),0))] hms.%r,)]
&CMD_NEW_MAP Astrogator Parent - 1277=$MAP CREATE *:@pemit %#=[setq(0,rest(grab([setunion(graball(lattr(parent(%!)/MAP_*),MAP_*),lattr(%!/MAP_*))],MAP_[edit(squish(secure(%0)),%b,_)]),_))][ifelse(t(%q0),Map [ansi(y,capstr(lcstr(edit(%q0,_,%b))))] already exists.,[setq(1,edit(squish(secure(%0)),%b,_))]You create a new map named [ansi(y,capstr(lcstr(%q1)))]. It now resides in active memory.[set(%!,MAP_[%q1]:)][set(%!,Map:MAP_[%q1])])]
&CMD_LOAD_MAP Astrogator Parent - 1277=$MAP LOAD *:@pemit %#=[setq(0,rest(grab([setunion(graball(lattr(parent(%!)/MAP_*),MAP_*),lattr(%!/MAP_*))],MAP_[edit(squish(secure(%0)),%b,_)]*),_))][ifelse(t(%q0),Map [ansi(y,capstr(lcstr(edit(%q0,_,%b))))] loaded.[set(%!,Map:[%q0])],No map of that name could be found.)]
&CMD_LIST_MAPS Astrogator Parent - 1277=$MAP LIST:@pemit %#=[ansi(mh,Maps)]%r[ansi(b,repeat(=,78))][setq(0,[setunion(graball(lattr(parent(%!)/MAP_*),MAP_*),lattr(%!/MAP_*))])][iter(%q0,[ifelse(mod(dec(#@),3),,%r)][ljust(capstr(lcstr(edit(rest(##,_),_,%b))),25)])]%r[ansi(b,repeat(=,78))]
&CMD_LINK Astrogator Parent - 1277=$LINK *:@pemit %#=[setq(0,switch([t(locate(%#,secure(%0),*))][t(locate(%!,secure(%0),*))],1*,locate(%#,secure(%0),*),*1,locate(%!,secure(%0),*),#-1))][switch([t(%q0)][and(isnum(x(%q0)),match(THING,type(%q0)))],0*,ERROR: Unable to locate any [ansi(y,secure(%0))] to link with.,10,ERROR: Unable to establish link with [ansi(y,name(%q0))].,11,Link with [ansi(y,name(%q0))] successful.[set(%!,Link_DB:[%q0])],ERROR: Internal malfunction.)]
&CMD_HELP2 Astrogator Parent - 1277=$Astro*help *:@pemit %#=[setq(0,grab(sort(v(List_Help),a),HELP_[edit(secure(%1),%b,_)]*))][ifelse([t(%q0)],[ansi(mh,Astrogator Help for [iter(lcstr(rest(%q0,_)),capstr(##),_)])]%r[ansi(b,repeat(=,78))]%r[u(%q0)]%r[ansi(b,repeat(=,78))],No ASTROHELP file was found under that name.)]
&CMD_HELP Astrogator Parent - 1277=$Astro*help:@pemit %#=[ansi(mh,Astrogator Help)]%r[ansi(b,repeat(=,78))]%r[ansi(ch,Topics:)]%r[iter(sort(v(LIST_HELP),a),[ifelse(mod(dec(#@),3),,%r)][ljust(ansi(w,capstr(lcstr(edit(rest(##,_),_,%b)))),25)])]%r%rTo learn more\, type: [ansi(ch,ASTROHELP)] [ansi(y,<Topic>)]%r[ansi(b,repeat(=,78))]
&CMD_ETA_2 Astrogator Parent - 1277=$ETA FOR * AT *:@pemit %#=[setq(0,abs(round(secure(%0),0)))][setq(1,abs(round(first(secure(%1)),0)))][setq(2,match(J,mid(rest(secure(%1)),0,1)))][switch([and(isnum(%q0),isnum(%q1))][%q2],10,It will take [ansi(y,ifelse(gt(%q1,0),u(%!/FUN_ShortTime,fdiv(%q0,fdiv(%q1,3600))),forever))] to travel [ansi(y,%q0)] hm at [ansi(y,%q1)] hm/hour.,11,It will take [ansi(y,ifelse(gt(%q1,0),u(%!/FUN_ShortTime,fdiv(%q0,fdiv(mul(%q1,v(CONST_JUMP)),3600))),forever))] to travel [ansi(y,%q0)] hm at [ansi(y,%q1)] in hyperspace or [ansi(y,mul(%q1,v(CONST_JUMP)))] hm/hr in normal space.,0*,ERROR: Auguments must be numbers.)]
&CMD_ETA_1 Astrogator Parent - 1277=$ETA AT * FOR *:@pemit %#=[setq(0,abs(round(secure(%1),0)))][setq(1,abs(round(first(secure(%0)),0)))][setq(2,match(J,mid(rest(secure(%0)),0,1)))][switch([and(isnum(%q0),isnum(%q1))][%q2],10,It will take [ansi(y,ifelse(gt(%q1,0),u(%!/FUN_ShortTime,fdiv(%q0,fdiv(%q1,3600))),forever))] to travel [ansi(y,%q0)] hm at [ansi(y,%q1)] hm/hour.,11,It will take [ansi(y,ifelse(gt(%q1,0),u(%!/FUN_ShortTime,fdiv(%q0,fdiv(mul(%q1,v(CONST_JUMP)),3600))),forever))] to travel [ansi(y,%q0)] hm at [ansi(y,%q1)] in hyperspace or [ansi(y,mul(%q1,v(CONST_JUMP)))] hm/hr in normal space.,0*,ERROR: Auguments must be numbers.)]
&CMD_DEL_MAP Astrogator Parent - 1277=$MAP DEL* *:@pemit %#=[setq(0,rest(grab([setunion(graball(lattr(parent(%!)/MAP_*),MAP_*),lattr(%!/MAP_*))],MAP_[edit(squish(secure(%1)),%b,_)]*),_))][ifelse(t(%q0),Map [ansi(y,capstr(lcstr(edit(%q0,_,%b))))] has been deleted.[wipe(%!/MAP_[%q0])],No map of that name could be found.)]
&AUTHOR Astrogator Parent - 1277=Coded by Dahan
@set Astrogator Parent - 1277/AUTHOR=no_command visual
@DESCRIBE Astrogator Parent - 1277=This is a small, electronic device housed in a black plastic case. It's three and a half inches wide, seven inches tall, and only a half inch thick. One side has a control panel and video display. Printed above the display is "CPI-42 Astrogator." In the upper righthand corner of the display are the words "[ansi(g,Map: [capstr(lcstr(edit(v(Map),_,%b)))])]"%r%t%(Type [ansi(g,ASTROGATOR HELP)] for instructions.%)%r%rThis object rates a [ansi(hy,[v(WEIGHT)])] in weight.
@set Astrogator Parent - 1277/DESCRIBE=no_command visual
@ACLONE Astrogator Parent - 1277=@cpattr #1277/Map_Default=%!/Map_Default
@set Astrogator Parent - 1277/ACLONE=no_command
@LASTPAGED Astrogator Parent - 1277=Dahan
@set Astrogator Parent - 1277/LASTPAGED=wizard locked
@WEIGHT Astrogator Parent - 1277=1
@set Astrogator Parent - 1277/WEIGHT=wizard
&CMD_COPY_MAP Astrogator Parent - 1277=$MAP COPY *=*:@pemit %#=[setq(0,rest(grab([setunion(lattr(parent(%!)/MAP_*),lattr(%!/MAP_*))],MAP_[edit(squish(secure(%0)),%b,_)]*),_))][setq(1,edit(squish(secure(%1)),%b,_))][ifelse(t(%q0),Map [ansi(y,capstr(lcstr(edit(%q0,_,%b))))] has been copied to map [ansi(y,capstr(lcstr(edit(%q1,_,%b))))]\, overwriting the preexisting of that name if any.[set(%!,MAP_[%q1]:[v(MAP_[%q0])])],)]
&CMD_TEMP Astrogator Parent - 1277=$temp:@pemit %#=Download complete.[iter(map_consortium map_fringe map_parallax map_hiverspace,[set(%!,[##]:[v(##)])])]
&FN_SORT_NAME Astrogator Parent - 1277=[comp(first(%0),first(%1))]
&FN_SORT_Z Astrogator Parent - 1277=[ifelse(gte(extract(%0,4,1),extract(%1,4,1)),1,-1)]
&FN_SORT_Y Astrogator Parent - 1277=[ifelse(gte(extract(%0,3,1),extract(%1,3,1)),1,-1)]
&FN_SORT_X Astrogator Parent - 1277=[ifelse(gte(extract(%0,2,1),extract(%1,2,1)),1,-1)]
&CMD_SORT Astrogator Parent - 1277=$WAYPOINT SORT *:@swi [setq(0,grab(NAME DIST X Y Z,secure(%0)))][t(%q0)]=1,{@pemit %#=Map: [ansi(yh,v(Map))] sorted by [%q0].[set(%!,Temp:[u(FUN_Origin)])][set(%!,MAP_[v(Map)]:[sortby(%!/FN_Sort_[%q0],v(MAP_[v(Map)]),|)])][wipe(%!/Temp)]},{@pemit %#=Valid sort types are: NAME, DIST, X, Y, or Z.}
&FN_SORT_DIST Astrogator Parent - 1277=[setq(0,v(Temp))][sign(sub(dist3d(extract(%q0,2,1),extract(%q0,3,1),extract(%q0,4,1),extract(%0,2,1),extract(%0,3,1),extract(%0,4,1)),dist3d(extract(%q0,2,1),extract(%q0,3,1),extract(%q0,4,1),extract(%1,2,1),extract(%1,3,1),extract(%1,4,1))))]
&PLACENUMS Astrogator Parent - 1277=
@set Astrogator Parent - 1277/PLACENUMS=no_command
@create Astrogator Parent - 1277
@link Astrogator Parent - 1277 = #4988
@parent Astrogator Parent - 1277=#1661
@lock/Basic Astrogator Parent - 1277==#2085
@set Astrogator Parent - 1277 = LINK_OK
@set Astrogator Parent - 1277 = SAFE
@set Astrogator Parent - 1277 = NO_COMMAND
&HELP_FUEL Astrogator Parent - 1277=%r%t This chart shows the total fuel useage for a 10 minute jump in a craft with the listed stats. As well as showing the total overall flight time for that craft. Please note that the minutes of flight time(min) figure is not an exact number. Merely an estimate. Rely on this entirely at your own risk. %r %r %tFuel%tEff%tPoT%tMin%r%t200%t10%t5%% %t200%r%t150%t10%t6%% %t185%r%t100%t10%t8%% %t145%r%t50%t10%t9-10%% %t100%r %r %t200%t5%t9%% %t110%r %t150%t5%t12%% %t96%r %t100%t5%t18%% %t60 %r%t50%t5%t25%% %t40%r%r%t200%t1%t43%% %t25 %r %t150%t1%t65%% %t15%r %t100%t1%t85%% %t12%r%t50 %t1%t100%% %t8%r %r %t Fuel - The total size of the fuel tank %r %r %t Eff - Fuel Efficiency %r %r %t PoT - Percentage of fuel used in a 10 minute jump. %r %r %t Min - Total minutes of OS jumptime the craft can sustain.
&HELP_ALL Astrogator Parent - 1277=[iter(setdiff(v(List_Help),HELP_All),%r[u(##)]%r)]
&LIST_HELP Astrogator Parent - 1277=HELP_LINKS HELP_WAYPOINTS HELP_PLOTTING_COURSES HELP_WIDGETS HELP_All HELP_FUEL
&MAP_DEFAULT Astrogator Parent - 1277=Centauri -4918754 -5870334 -3043316|Sagittarius -4600577 -3500000 -4603592|Mars -4304571 -3455576 -2910715|Luna -4300100 -3456700 -2910716|Earth -4300095 -3456098 -2910710|Sivad -3947288 -2224713 -6689298|Castor -3515982 -3222009 -3000813|Demaria -2500000 -2500000 -2500000|Antimone -2368144 -1368144 15355|Quaquan -993678 -910713 -995372|Ungstir -70000 790000 808000|Grimlahd 950470 8760003 590000|Odari 1009000 1205010 1010001|Nalhom 8381027 2590714 5452590|Lebal 10080000 5631700 8790400|Ist'thol'mek 10694305 4402200 7749500|Vollista 11062669 6490293 11412578|Tomin_Kora 1000000 900000 1000000
&WP_ORIGIN Astrogator Parent - 1277=Sol 0 0 0
@set Astrogator Parent - 1277/WP_ORIGIN=no_command
&WP_DEST Astrogator Parent - 1277=Proxima_Centauri -11555846383 -15571786152 -35761242035
@set Astrogator Parent - 1277/WP_DEST=no_command
&SPEED Astrogator Parent - 1277=0 0
@set Astrogator Parent - 1277/SPEED=no_command
&MAP Astrogator Parent - 1277=Default
@set Astrogator Parent - 1277/MAP=no_command
&LINK_DB Astrogator Parent - 1277=
@set Astrogator Parent - 1277/LINK_DB=no_command
&HELP_WIDGETS Astrogator Parent - 1277=%tThese commands are designed to assist with navigation in other ways than just plotting a course.%r%r[ljust([ansi(ch,ETA FOR)] [ansi(y,<Distance>)] [ansi(ch,AT)] [ansi(y,<Speed>)],38)]Computes an estimated time of arrival.%r[ljust([ansi(ch,ETA FOR)] [ansi(y,<Distance>)] [ansi(ch,AT)] [ansi(y,<Speed>)] [ansi(ch,JUMP)],38)]Computes an estimated time of arrival.
@set Astrogator Parent - 1277/HELP_WIDGETS=no_command
&HELP_WAYPOINTS Astrogator Parent - 1277=%tWaypoints are used to store coordinates of things for use in plotting courses. Maps may contain many waypoints, and are useful for keeping coordinates arranged in a logical order.%r%r[ljust([ansi(ch,MAP LIST)],38)]Lists all maps of stored waypoints.%r[ljust([ansi(ch,MAP CREATE)] [ansi(y,<Map>)],38)]Creates a new map and loads it.%r[ljust([ansi(ch,MAP DEL)] [ansi(y,<Map>)],38)]Deletes a map.%r[ljust([ansi(ch,MAP LOAD)] [ansi(y,<Map>)],38)]Loads a map.%r[ljust([ansi(ch,MAP COPY)] [ansi(y,<Map>)][ansi(ch,=)][ansi(y,<New Map>)],38)]Loads a map.%r%r[ljust(ansi(ch,WAYPOINT LIST),38)]Displays all recorded waypoints.%r[ljust([ansi(ch,WAYPOINT ADD)] [ansi(y,<Name>)] [ansi(ch,=)] [ansi(y,<X> <Y> <Z>)],38)]Creates a waypoint.%r[ljust([ansi(ch,WAYPOINT STORE)] [ansi(y,<Name>)],38)]Creates new waypoint here.%r[ljust([ansi(ch,WAYPOINT DEL)] [ansi(y,<Name>)],38)]Deletes a waypoint.%r[ljust([ansi(ch,WAYPOINT SORT)] [ansi(y,<)][ansi(ch,NAME)][ansi(y,/)][ansi(ch,DIST)][ansi(y,/)][ansi(ch,X)][ansi(y,/)][ansi(ch,Y)][ansi(y,/)][ansi(ch,Z)][ansi(y,>)],38)]Sorts the waypoint by selected criteria.
@set Astrogator Parent - 1277/HELP_WAYPOINTS=no_command
&HELP_PLOTTING_COURSES Astrogator Parent - 1277=%tThese commands will allow you to plot a course. Remember that the astrogator does not include acceleration for these calculations. The astrogator much also have a valid datalink to know it's current location.%r%r[ljust(ansi(ch,PLOT COURSE),38)]Displays information on plotted course.%r[ljust(ansi(ch,PLOT ALL COURSES),38)]Displays a course plot to all waypoints.%r[ljust([ansi(ch,START AT)] [ansi(y,<Waypoint>)],38)]Selects the point of origin.%r[ljust(ansi(ch,START HERE),38)]Selects here the point of origin.%r[ljust([ansi(ch,STOP AT)] [ansi(y,<Waypoint>)],38)]Selects the destination.%r[ljust(ansi(ch,STOP HERE),38)]Selects here the destination.%r[ljust([ansi(ch,SET SPEED)] [ansi(y,<Speed>)],38)]Changes the speed setting.%r[ljust([ansi(ch,SET SPEED)] [ansi(y,<Speed>)] [ansi(ch,JUMP)],38)]Changes the speed setting.
@set Astrogator Parent - 1277/HELP_PLOTTING_COURSES=no_command
&HELP_LINKS Astrogator Parent - 1277=%tBefore the astrogator can determine your location in space, you must first link it with a navigation console. The Astrogator will use this connection only to gather data, and will not pilot the ship in any way. [ifelse(haspower(%!,see_all),,This unit must be dropped next to the console to draw any data through it's datalink.)]%r%r[ljust([ansi(ch,LINK)] [ansi(y,<Console>)],38)]Creates a datalink with the console.%r[ljust(ansi(ch,UNLINK),38)]Disconnects any active link.
@set Astrogator Parent - 1277/HELP_LINKS=no_command
&FUN_SHORTTIME Astrogator Parent - 1277=[ifelse(isnum(secure(%0)),timestring(round(secure(%0),0)),N/A)]
@set Astrogator Parent - 1277/FUN_SHORTTIME=no_command
&FUN_ORIGIN Astrogator Parent - 1277=[ifelse(match(LINKED,v(WP_Origin)),u(FUN_HERE),v(WP_Origin))]
@set Astrogator Parent - 1277/FUN_ORIGIN=no_command
&FUN_HERE Astrogator Parent - 1277=[ifelse([and(isnum(hs_get_attr(v(Link_DB),x)),match(room(v(Link_DB)),room(%!)))],%(Current_Position%) [round(hs_get_attr(v(Link_DB),x),0)] [round(hs_get_attr(v(Link_DB),y),0)] [round(hs_get_attr(v(Link_DB),z),0)],%(Connection_Lost%) 0 0 0)]
@set Astrogator Parent - 1277/FUN_HERE=no_command
&FUN_DIST3D Astrogator Parent - 1277=[sqrt(add(power(sub(%0,%3),2),power(sub(%1,%4),2),power(sub(%2,%5),2)))]
@set Astrogator Parent - 1277/FUN_DIST3D=no_command
&FUN_DEST Astrogator Parent - 1277=[ifelse(match(LINKED,v(WP_Dest)),u(FUN_HERE),v(WP_Dest))]
@set Astrogator Parent - 1277/FUN_DEST=no_command
&CONST_JUMP Astrogator Parent - 1277=2500
@set Astrogator Parent - 1277/CONST_JUMP=no_command
&CMD_WP_STORE Astrogator Parent - 1277=$WAYPOINT STORE *:@pemit %#=[switch([setq(0,edit(edit(squish(secure(%0)),|,I),%b,_))][setq(1,rest(u(FUN_HERE)))][t(match(iter(v(MAP_[v(Map)]),first(##),|),%q0))][t(words(v(MAP_[v(Map)])))],1*,ERROR: Waypoint name is use.,00, Waypoint added.[set(%!,MAP_[v(Map)]:[%q0] [%q1])],01, Waypoint added.[set(%!,MAP_[v(map)]:[v(MAP_[v(Map)])]|[%q0] [%q1])],ERROR: Unknown malfunction.)]
&CMD_WP_LIST Astrogator Parent - 1277=$WAYPOINT LIST:@pemit %#=[ansi(mh,Waypoint List: [capstr(lcstr(edit(v(Map),_,%b)))])]%r[ansi(b,repeat(=,78))][ifelse(words(v(MAP_[v(Map)])),iter(v(MAP_[v(Map)]),%r%b[ansi(ch,\[)][rjust(ansi(c,#@),2)][ansi(ch,\])]%b[ansi(y,ljust(mid(edit(first(##),_,%b),0,26),26))][rjust(extract(##,2,1),15)][rjust(extract(##,3,1),15)][rjust(extract(##,4,1),15)],|),%r[ansi(r,center(No waypoints are stored.,78))])]%r[ansi(b,repeat(=,78))]
&CMD_WP_DEL Astrogator Parent - 1277=$WAYPOINT DEL *:@pemit %#=[ifelse([setq(0,match(iter(v(MAP_[v(Map)]),first(##),|),*[edit(secure(%0),%b,_)]*))][t(%q0)],Waypoint [ansi(y,edit(first(index(v(MAP_[v(Map)]),|,%q0,1)),_,%b))] has been deleted.[set(%!,MAP_[v(Map)]:[index(v(MAP_[v(Map)]),|,1,sub(%q0,1))][if(and(gt(%q0,1),lt(%q0,words(v(MAP_[v(Map)]),|))),|)][index(v(MAP_[v(Map)]),|,add(%q0,1),sub(words(v(MAP_[v(Map)]),|),%q0))])],ERROR: Invalid waypoint.)]
&CMD_WP_ADD Astrogator Parent - 1277=$WAYPOINT ADD *=*:@pemit %#=[switch([setq(0,edit(edit(squish(secure(%0)),|,I),%b,_))][setq(1,[round(extract(secure(%1),1,1),0)] [round(extract(secure(%1),2,1),0)] [round(extract(secure(%1),3,1),0)])][and(isnum(extract(%q1,1,1)),isnum(extract(%q1,2,1)),isnum(extract(%q1,3,1)),match(3,words(%q1)))][t(match(iter(v(MAP_[v(Map)]),first(##),|),%q0))][t(words(v(MAP_[v(Map)])))],0*,ERROR: Invalid coordinates.,11*,ERROR: Waypoint name is use.,100, Waypoint added.[set(%!,MAP_[v(Map)]:[%q0] [%q1])],101, Waypoint added.[set(%!,Map_[v(Map)]:[v(MAP_[v(Map)])]|[%q0] [%q1])],ERROR: Unknown malfunction.)]
&CMD_UNLINK Astrogator Parent - 1277=$UNLINK:@pemit %#=[ifelse(t(v(Link_DB)),This unit has been disconnected from [ansi(y,name(v(Link_DB)))].[set(%!,Link_DB:)],ERROR: This unit is not linked to anything.)]
&CMD_STOP_HERE Astrogator Parent - 1277=$STOP HERE:@pemit %#=[ifelse(t(v(LINK_DB)),The current location is now set as the destination.[set(%!,WP_DEST:LINKED)],ERROR: Unable to gather local coordinates.)]
&CMD_STOP_AT Astrogator Parent - 1277=$STOP AT *:@pemit %#=[ifelse([setq(0,index(v(MAP_[v(Map)]),|,match(iter(v(MAP_[v(Map)]),first(##),|),*[edit(secure(%0),%b,_)]*),1))][t(%q0)],Waypoint [ansi(y,edit(first(%q0),_,%b))] is now set as the destination.[set(%!,WP_Dest:[%q0])],ERROR: Invalid waypoint)]
&CMD_START_HERE Astrogator Parent - 1277=$START HERE:@pemit %#=[ifelse(t(v(LINK_DB)),The current location is now set as the point of origin.[set(%!,WP_ORIGIN:LINKED)],ERROR: Unable to gather local coordinates.)]
&CMD_START_AT Astrogator Parent - 1277=$START AT *:@pemit %#=[ifelse([setq(0,index(v(MAP_[v(Map)]),|,match(iter(v(MAP_[v(Map)]),first(##),|),*[edit(secure(%0),%b,_)]*),1))][t(%q0)],Waypoint [ansi(y,edit(first(%q0),_,%b))] is now set as the point of origin.[set(%!,WP_Origin:[%q0])],ERROR: Invalid waypoint)]
&CMD_SET_SPEED Astrogator Parent - 1277=$SET SPEED *:@pemit %#=[setq(0,secure(%0))][setq(1,round(first(%q0),0))][setq(2,match(J,mid(rest(%q0),0,1)))][ifelse([isnum(%q1)],The speed setting has been changed to [ansi(y,%q1)] [ifelse(%q2,in hyperspace%, or [ansi(y,mul(v(CONST_JUMP),%q1))] Mm/hr in normal space.[set(%!,Speed:[mul(v(CONST_JUMP),%q1)] 1)],Mm/hr.[set(%!,Speed:[%q1] 0)])],ERROR: Speed must be a number.)]
&CMD_PLOT_ALL Astrogator Parent - 1277=$PLOT ALL COURSES:@pemit %#=[ansi(mh,Plotted Courses to All Waypoints)]%r[ansi(b,repeat(=,78))][ifelse(words(v(MAP_[v(Map)]),|),[setq(8,u(%!/FUN_Origin))][setq(0,extract(%q8,2,1))][setq(1,extract(%q8,3,1))][setq(2,extract(%q8,4,1))]%r[ansi(ch,Point of Origin:)] [ansi(y,edit(first(%q8),_,%b))] [ansi(ch,at)] [rest(%q8)]%r[ansi(ch,Speed:)] [ifelse(rest(v(Speed)),[ansi(y,div(first(v(Speed)),v(CONST_JUMP)))] in hyperspace or [ansi(y,first(v(Speed)))] hm/hr in normal space.,[ansi(y,first(v(Speed)))] hm/hr)]%r[ansi(ch,Map:)] [ansi(y,[capstr(lcstr(v(Map)))])]%r[ansi(b,repeat(-,78))]%r[ansi(ch,[ljust(Destination,23)][center(Bearing,7)][center(Distance,23)][center(ETA,23)])][iter(v(MAP_[v(Map)]),[setq(3,extract(##,2,1))][setq(4,extract(##,3,1))][setq(5,extract(##,4,1))][setq(6,round(u(%!/Fun_dist3d,%q0,%q1,%q2,%q3,%q4,%q5),0))]%r[ansi(y,ljust(edit(first(##),_,%b),23))][rjust(xyang(%q0,%q1,%q3,%q4),3)]/[ljust(zang(%q0,%q1,%q2,%q3,%q4,%q5),3)][rjust(%q6,23)][rjust(ifelse(gt(first(v(Speed)),0),u(%!/FUN_ShortTime,fdiv(%q6,fdiv(first(v(Speed)),3600))),N/A),23)],|)],%r[ansi(r,center(No waypoints are stored.,78))])]%r[ansi(b,repeat(=,78))]
&CMD_PLOT Astrogator Parent - 1277=$PLOT COURSE:@pemit %#=[setq(0,extract(u(%!/FUN_Origin),2,1))][setq(1,extract(u(%!/FUN_Origin),3,1))][setq(2,extract(u(%!/FUN_Origin),4,1))][setq(3,extract(u(%!/FUN_Dest),2,1))][setq(4,extract(u(%!/FUN_Dest),3,1))][setq(5,extract(u(%!/FUN_Dest),4,1))][setq(6,round(u(Fun_dist3d,%q0,%q1,%q2,%q3,%q4,%q5),0))][setq(7,v(Speed))][ansi(b,.[repeat(-,74)].%r|)][ansi(mh,center(ORIGIN,24))][ansi(b,|)][ansi(mh,center(DESTINATION,24))][ansi(b,|)][ansi(mh,center(COURSE DATA,24))][ansi(b,|%r|)][ansi(y,center(mid(edit(first(u(%!/FUN_Origin)),_,%b),0,24),24))][ansi(b,|)][ansi(y,center(mid(edit(first(u(%!/FUN_Dest)),_,%b),0,24),24))][ansi(b,|)][ansi(c,rjust(Bearing:%b,11))][ljust([xyang(%q0,%q1,%q3,%q4)]/[zang(%q0,%q1,%q2,%q3,%q4,%q5)],13)][ansi(b,|%r|)][ansi(c,rjust(X:%b,7))][rjust(%q0,13)][space(4)][ansi(b,|)][ansi(c,rjust(X:%b,7))][rjust(%q3,13)][space(4)][ansi(b,|)][ansi(c,rjust(Distance:%b,11))][ljust(%q6,13)][ansi(b,|%r|)][ansi(c,rjust(Y:%b,7))][rjust(%q1,13)][space(4)][ansi(b,|)][ansi(c,rjust(Y:%b,7))][rjust(%q4,13)][space(4)][ansi(b,|)][ansi(c,rjust(Speed:%b,11))][ljust([ifelse(rest(%q7),[ansi(y,div(first(%q7),v(CONST_JUMP)))] [ansi(c,Jump)],first(%q7))],13)][ansi(b,|%r|)][ansi(c,rjust(Z:%b,7))][rjust(%q2,13)][space(4)][ansi(b,|)][ansi(c,rjust(Z:%b,7))][rjust(%q5,13)][space(4)][ansi(b,|)][ansi(c,rjust(ETA:%b,11))][ljust(ifelse(gt(first(%q7),0),u(%!/FUN_ShortTime,fdiv(%q6,fdiv(first(%q7),3600))),N/A),13)][ansi(b,|%r'[repeat(-,74)]')][setq(8,v(Link_DB))][ifelse(and(t(hs_get_attr(%q8,Accel)),t(hs_get_attr(%q8,speed))),%rAt [ansi(y,round(hs_get_attr(%q8,speed),0))] hm/hr it will take this ship [ansi(y,timestring(round(fdiv(hs_get_attr(%q8,Speed),hs_get_attr(%q8,Accel)),0)))] and [ansi(y,round(fdiv(power(fdiv(hs_get_attr(%q8,Speed),3600),2),fdiv(hs_get_attr(%q8,Accel),1800)),0))] hms to come to a complete stop.,)][ifelse(hs_get_attr(%q8,Speed),%rAt present speed and fuel supplies\, this ship will run out of fuel in [ansi(y,round(mileage(%q8),0))] hms.%r,)]
&CMD_NEW_MAP Astrogator Parent - 1277=$MAP CREATE *:@pemit %#=[setq(0,rest(grab([setunion(graball(lattr(parent(%!)/MAP_*),MAP_*),lattr(%!/MAP_*))],MAP_[edit(squish(secure(%0)),%b,_)]),_))][ifelse(t(%q0),Map [ansi(y,capstr(lcstr(edit(%q0,_,%b))))] already exists.,[setq(1,edit(squish(secure(%0)),%b,_))]You create a new map named [ansi(y,capstr(lcstr(%q1)))]. It now resides in active memory.[set(%!,MAP_[%q1]:)][set(%!,Map:MAP_[%q1])])]
&CMD_LOAD_MAP Astrogator Parent - 1277=$MAP LOAD *:@pemit %#=[setq(0,rest(grab([setunion(graball(lattr(parent(%!)/MAP_*),MAP_*),lattr(%!/MAP_*))],MAP_[edit(squish(secure(%0)),%b,_)]*),_))][ifelse(t(%q0),Map [ansi(y,capstr(lcstr(edit(%q0,_,%b))))] loaded.[set(%!,Map:[%q0])],No map of that name could be found.)]
&CMD_LIST_MAPS Astrogator Parent - 1277=$MAP LIST:@pemit %#=[ansi(mh,Maps)]%r[ansi(b,repeat(=,78))][setq(0,[setunion(graball(lattr(parent(%!)/MAP_*),MAP_*),lattr(%!/MAP_*))])][iter(%q0,[ifelse(mod(dec(#@),3),,%r)][ljust(capstr(lcstr(edit(rest(##,_),_,%b))),25)])]%r[ansi(b,repeat(=,78))]
&CMD_LINK Astrogator Parent - 1277=$LINK *:@pemit %#=[setq(0,switch([t(locate(%#,secure(%0),*))][t(locate(%!,secure(%0),*))],1*,locate(%#,secure(%0),*),*1,locate(%!,secure(%0),*),#-1))][switch([t(%q0)][and(isnum(x(%q0)),match(THING,type(%q0)))],0*,ERROR: Unable to locate any [ansi(y,secure(%0))] to link with.,10,ERROR: Unable to establish link with [ansi(y,name(%q0))].,11,Link with [ansi(y,name(%q0))] successful.[set(%!,Link_DB:[%q0])],ERROR: Internal malfunction.)]
&CMD_HELP2 Astrogator Parent - 1277=$Astro*help *:@pemit %#=[setq(0,grab(sort(v(List_Help),a),HELP_[edit(secure(%1),%b,_)]*))][ifelse([t(%q0)],[ansi(mh,Astrogator Help for [iter(lcstr(rest(%q0,_)),capstr(##),_)])]%r[ansi(b,repeat(=,78))]%r[u(%q0)]%r[ansi(b,repeat(=,78))],No ASTROHELP file was found under that name.)]
&CMD_HELP Astrogator Parent - 1277=$Astro*help:@pemit %#=[ansi(mh,Astrogator Help)]%r[ansi(b,repeat(=,78))]%r[ansi(ch,Topics:)]%r[iter(sort(v(LIST_HELP),a),[ifelse(mod(dec(#@),3),,%r)][ljust(ansi(w,capstr(lcstr(edit(rest(##,_),_,%b)))),25)])]%r%rTo learn more\, type: [ansi(ch,ASTROHELP)] [ansi(y,<Topic>)]%r[ansi(b,repeat(=,78))]
&CMD_ETA_2 Astrogator Parent - 1277=$ETA FOR * AT *:@pemit %#=[setq(0,abs(round(secure(%0),0)))][setq(1,abs(round(first(secure(%1)),0)))][setq(2,match(J,mid(rest(secure(%1)),0,1)))][switch([and(isnum(%q0),isnum(%q1))][%q2],10,It will take [ansi(y,ifelse(gt(%q1,0),u(%!/FUN_ShortTime,fdiv(%q0,fdiv(%q1,3600))),forever))] to travel [ansi(y,%q0)] hm at [ansi(y,%q1)] hm/hour.,11,It will take [ansi(y,ifelse(gt(%q1,0),u(%!/FUN_ShortTime,fdiv(%q0,fdiv(mul(%q1,v(CONST_JUMP)),3600))),forever))] to travel [ansi(y,%q0)] hm at [ansi(y,%q1)] in hyperspace or [ansi(y,mul(%q1,v(CONST_JUMP)))] hm/hr in normal space.,0*,ERROR: Auguments must be numbers.)]
&CMD_ETA_1 Astrogator Parent - 1277=$ETA AT * FOR *:@pemit %#=[setq(0,abs(round(secure(%1),0)))][setq(1,abs(round(first(secure(%0)),0)))][setq(2,match(J,mid(rest(secure(%0)),0,1)))][switch([and(isnum(%q0),isnum(%q1))][%q2],10,It will take [ansi(y,ifelse(gt(%q1,0),u(%!/FUN_ShortTime,fdiv(%q0,fdiv(%q1,3600))),forever))] to travel [ansi(y,%q0)] hm at [ansi(y,%q1)] hm/hour.,11,It will take [ansi(y,ifelse(gt(%q1,0),u(%!/FUN_ShortTime,fdiv(%q0,fdiv(mul(%q1,v(CONST_JUMP)),3600))),forever))] to travel [ansi(y,%q0)] hm at [ansi(y,%q1)] in hyperspace or [ansi(y,mul(%q1,v(CONST_JUMP)))] hm/hr in normal space.,0*,ERROR: Auguments must be numbers.)]
&CMD_DEL_MAP Astrogator Parent - 1277=$MAP DEL* *:@pemit %#=[setq(0,rest(grab([setunion(graball(lattr(parent(%!)/MAP_*),MAP_*),lattr(%!/MAP_*))],MAP_[edit(squish(secure(%1)),%b,_)]*),_))][ifelse(t(%q0),Map [ansi(y,capstr(lcstr(edit(%q0,_,%b))))] has been deleted.[wipe(%!/MAP_[%q0])],No map of that name could be found.)]
&AUTHOR Astrogator Parent - 1277=Coded by Dahan
@set Astrogator Parent - 1277/AUTHOR=no_command visual
@DESCRIBE Astrogator Parent - 1277=This is a small, electronic device housed in a black plastic case. It's three and a half inches wide, seven inches tall, and only a half inch thick. One side has a control panel and video display. Printed above the display is "CPI-42 Astrogator." In the upper righthand corner of the display are the words "[ansi(g,Map: [capstr(lcstr(edit(v(Map),_,%b)))])]"%r%t%(Type [ansi(g,ASTROGATOR HELP)] for instructions.%)%r%rThis object rates a [ansi(hy,[v(WEIGHT)])] in weight.
@set Astrogator Parent - 1277/DESCRIBE=no_command visual
@ACLONE Astrogator Parent - 1277=@cpattr #1277/Map_Default=%!/Map_Default
@set Astrogator Parent - 1277/ACLONE=no_command
@LASTPAGED Astrogator Parent - 1277=Dahan
@set Astrogator Parent - 1277/LASTPAGED=wizard locked
@WEIGHT Astrogator Parent - 1277=1
@set Astrogator Parent - 1277/WEIGHT=wizard
&CMD_COPY_MAP Astrogator Parent - 1277=$MAP COPY *=*:@pemit %#=[setq(0,rest(grab([setunion(lattr(parent(%!)/MAP_*),lattr(%!/MAP_*))],MAP_[edit(squish(secure(%0)),%b,_)]*),_))][setq(1,edit(squish(secure(%1)),%b,_))][ifelse(t(%q0),Map [ansi(y,capstr(lcstr(edit(%q0,_,%b))))] has been copied to map [ansi(y,capstr(lcstr(edit(%q1,_,%b))))]\, overwriting the preexisting of that name if any.[set(%!,MAP_[%q1]:[v(MAP_[%q0])])],)]
&CMD_TEMP Astrogator Parent - 1277=$temp:@pemit %#=Download complete.[iter(map_consortium map_fringe map_parallax map_hiverspace,[set(%!,[##]:[v(##)])])]
&FN_SORT_NAME Astrogator Parent - 1277=[comp(first(%0),first(%1))]
&FN_SORT_Z Astrogator Parent - 1277=[ifelse(gte(extract(%0,4,1),extract(%1,4,1)),1,-1)]
&FN_SORT_Y Astrogator Parent - 1277=[ifelse(gte(extract(%0,3,1),extract(%1,3,1)),1,-1)]
&FN_SORT_X Astrogator Parent - 1277=[ifelse(gte(extract(%0,2,1),extract(%1,2,1)),1,-1)]
&CMD_SORT Astrogator Parent - 1277=$WAYPOINT SORT *:@swi [setq(0,grab(NAME DIST X Y Z,secure(%0)))][t(%q0)]=1,{@pemit %#=Map: [ansi(yh,v(Map))] sorted by [%q0].[set(%!,Temp:[u(FUN_Origin)])][set(%!,MAP_[v(Map)]:[sortby(%!/FN_Sort_[%q0],v(MAP_[v(Map)]),|)])][wipe(%!/Temp)]},{@pemit %#=Valid sort types are: NAME, DIST, X, Y, or Z.}
&FN_SORT_DIST Astrogator Parent - 1277=[setq(0,v(Temp))][sign(sub(dist3d(extract(%q0,2,1),extract(%q0,3,1),extract(%q0,4,1),extract(%0,2,1),extract(%0,3,1),extract(%0,4,1)),dist3d(extract(%q0,2,1),extract(%q0,3,1),extract(%q0,4,1),extract(%1,2,1),extract(%1,3,1),extract(%1,4,1))))]
&PLACENUMS Astrogator Parent - 1277=
@set Astrogator Parent - 1277/PLACENUMS=no_command