/* called by: entrance ctrl of the object 'track'7 ?2 J' U: e$ ?) o
*/
: x% C% l" w1 p3 B# @( f7 c$ F ]is. {9 u7 J" r9 `1 H6 i. `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! M" ]) m9 W) \, o4 Ldo: r$ }+ ?% o& D! t: Y5 A
Lan := rootfolder.Internal.Tools.AOLlanguage;% N% ^8 T8 {" p1 H. d4 O7 D# I9 c
if current = @.Destination -- else return5 P+ t4 |) d* m4 q0 [! G
then/ p5 H, z5 H/ H, k; c! M; q
@.Destination := void;
% w% Y- P k: E, r5 n if @.occupied then3 F- {/ b- p1 D* P
part := @.cont;
" G: |" V! D. P @.transpOrder := void;) m! S: o0 x2 T( c* |' y% I$ t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( i G+ G/ L4 K$ D @,root.eventcontroller.simTime);
" x7 S; S4 k; z* N8 P, r' Z1 w @.HasOrder := false;
! j# [/ w5 V9 F' |" C& e @.DrivingHome := true;
7 ^5 `! @# `0 v4 o: a+ F rgManager.tryToStartTransOrder; O- I5 C" e0 X4 A& r4 x5 X
if @.Destination = void
* N. k2 o$ D& A8 q0 c- b then -- no transport order for vehicle @
5 d4 U) b6 X& K* V/ ~5 }7 t% p @.Destination :=5 Q( i4 Z# }& o( I
rgManager.nearestFreeStation(@,track.~);! t( `/ h% L5 Y3 p) ^' Y) y
newDirection(@); 5 }8 _' ^; ^9 J1 {% z6 j
if @.Destination /= void then; j7 v1 F. o) h0 T( @
@.Destination.NumReservation :=
3 e1 c, \7 g8 K+ C1 q y @.Destination.NumReservation + 1;1 {$ P5 _/ {5 {; G- V& a) Q5 b* v/ S
end;
s) O, i$ y( g0 ~ @.CurrIcon := "drivingHome";! }/ b. Y9 p% }, y0 s% k- x
@.DrivingHome := true;6 L, R9 |) p9 g$ ?7 S
end;( F# O; Y/ Y' K, Q4 }4 r! q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 `$ Y; I% b+ a9 f
part := @.transpOrder;5 A; c1 f G* u5 @
part.move(@);-- load part& S& O" f; J. j+ v& s
@.CurrIcon := "load"; R- y3 S; {- j ^& Z- d
GlobalDistObj := part.globDestination;& \7 `* T& l; U. @0 T
assignLObj := rgmanager.rgAssignL;
# h7 U0 g/ \* p; ]% x! M row := assignLObj.getRowNo(GlobalDistObj);
" b3 O8 N; E% J) F! w ?- [ if Row = -1 then -- since 70
( Y4 c! b' K8 ? \$ j if lan=1 then
8 X" f% K- I. l$ Z. j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- E' n8 {' r+ e4 m: w to_str("in der Andockstation: \"",?.~.name,"\""));
8 _+ i I! A; v/ _ else' w3 H% m1 @: C6 \. C ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, C% h' F) n* F0 o# b# _7 O" ~5 W
to_str("in docking station: \"",?.~.name,"\"")); 3 ^) m) n' v; n' M7 W/ i4 s+ Q* D
end;
" b9 }4 W/ X1 i* D4 d( r9 Q T6 a else
( Z( c& h7 i/ w: z8 V+ d @.Destination := assignLObj[1,row];" V, W: W0 W$ l7 U7 r3 p
end; ! V i/ e. x5 G' x* t
newDirection(@);
; {7 n \- k* |3 O" | @.HasOrder := true;8 T8 v/ ^. m3 s. B/ ?- L2 Y
end;
u, I/ S1 A& V3 U end;. m4 U, w1 L7 d0 ]$ E3 I
end; -- of the method
$ h) e4 N9 u/ ]# [ |