/* called by: entrance ctrl of the object 'track'5 D" e: I7 H7 w, A2 ?
*/
' j6 _4 |- @* `/ s, Uis' U) i7 F: V0 {% F) B4 A" y P: b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; N7 x1 h2 ]! w
do$ _) \+ Z7 c! q
Lan := rootfolder.Internal.Tools.AOLlanguage;( G) x8 E8 V ]" K
if current = @.Destination -- else return
0 E/ r- O$ H0 {& h+ ` then: a: P4 j/ i/ Y# Y) B
@.Destination := void;4 [; P; g0 X- a# ^
if @.occupied then3 x6 i0 A4 _* V- J7 \1 l8 O
part := @.cont;
/ E" _" ^5 P8 |, @1 L @.transpOrder := void;
. [' e3 f3 o- ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% P! W! ?) p+ }% ]: T. b @,root.eventcontroller.simTime);; s2 e" ~! J6 ^7 _0 ~- Y0 d
@.HasOrder := false;
/ n* L$ q0 h) q @.DrivingHome := true;* }7 M0 X# A6 _+ q
rgManager.tryToStartTransOrder;& I$ {' k+ z$ Z& v; T# b* H8 `
if @.Destination = void% }% T, w4 ?+ c) u4 z
then -- no transport order for vehicle @; r* {9 D$ Y2 I! a$ Y
@.Destination :=/ d7 z: \3 q9 P- x4 {. T4 w5 ~
rgManager.nearestFreeStation(@,track.~); J) _# ^2 [2 v2 z2 w& d7 H
newDirection(@);
I* ^) ~& z" R/ m E. g! t. @5 ^; p if @.Destination /= void then
$ f8 j1 _0 \& m _4 `, ? @.Destination.NumReservation :=% u) z: p* I/ {
@.Destination.NumReservation + 1;* W) N8 d% E3 E$ F
end;2 t H6 z8 P( w+ b
@.CurrIcon := "drivingHome";, u. e" S( N0 F1 L0 S
@.DrivingHome := true;
J6 v6 S- q5 ^' K( r end;
$ s. A/ _+ _# G) S1 H; k7 S2 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ c9 h5 `. z% m+ Y# B
part := @.transpOrder;0 ?; {3 X: a ?: o
part.move(@);-- load part
* ]# O# p0 S# r$ w' \) L+ { @.CurrIcon := "load";
( a9 K4 K. C' ~% m( A/ b6 O GlobalDistObj := part.globDestination;
8 @0 Y- ~0 |' D3 b4 g8 @ assignLObj := rgmanager.rgAssignL;" `. g- t3 h$ |; N4 S4 H& [
row := assignLObj.getRowNo(GlobalDistObj);
5 F: d5 v9 y j+ j if Row = -1 then -- since 70
% p' y8 @4 n4 O if lan=1 then. I1 ?. R6 z6 j# b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; \: O' Q5 r r" ~1 _3 K6 g+ \ to_str("in der Andockstation: \"",?.~.name,"\""));# x# Z! L7 X! ?- s0 L' w- ?
else
& t- T# k0 Q o* [+ R1 E" o0 [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 Z* V/ R* ~8 H, E$ {
to_str("in docking station: \"",?.~.name,"\""));
/ Q) t+ o; s) l( Y' K# K- n end;/ i& L* @; t2 E5 R7 S# I6 b9 B
else. `: }- N8 v+ o9 t, _5 ?$ k4 {) y2 w
@.Destination := assignLObj[1,row];. O X5 B) i; }0 V
end; $ c8 ?6 s X E1 ^; V
newDirection(@);. w: X8 Y3 P+ N& N
@.HasOrder := true;
' J. o& Y; k4 \9 Q( w- p$ y end;: G; K K/ @( y: j3 y7 a7 E8 P9 x
end;% l. d2 I5 t6 J6 H/ H1 [, c# Z6 O
end; -- of the method
; Y/ P2 Z2 W; @5 F |