/* called by: entrance ctrl of the object 'track'
3 h9 q& k( o; a" b' G*/
9 [/ k6 \* o x3 \7 N+ w9 e9 Tis; W/ g* O; E0 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 \: E" h4 a5 ^6 Q: @, Z
do6 ^7 E0 H1 C" _% g
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 t$ Y2 X. {4 b if current = @.Destination -- else return
4 g3 c$ X W" C5 n& t8 ~ then W1 p7 J" P; G' V9 I
@.Destination := void;
' p/ M# |, W- E+ C if @.occupied then4 e/ _& j$ m, \: A! k
part := @.cont;
8 Q6 h" P% A4 {, R# r: b @.transpOrder := void;
8 L: e- C2 V9 M. K% c+ `9 ~ b, n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 `2 j: q" [! T. n
@,root.eventcontroller.simTime);* i5 D- e' \! S9 x2 v
@.HasOrder := false;/ U, M# U/ w9 D( B) T# c
@.DrivingHome := true;- T, c6 _2 t2 I1 J8 Y+ d- p8 j
rgManager.tryToStartTransOrder;- j3 F2 I$ f3 W# k& u# C0 B5 h/ H
if @.Destination = void
4 w) ~' |' }" I, g/ s: ^6 r then -- no transport order for vehicle @
: ~5 D! m2 ~: E' G# `7 D$ z @.Destination :=
, ~1 k2 w: G" I5 s' u rgManager.nearestFreeStation(@,track.~);9 b$ L! q" M: E2 `
newDirection(@);
7 |% m# W9 t8 t- N& ` if @.Destination /= void then
% O3 _& V# }) C6 C1 t @.Destination.NumReservation :=: R" s: k) }$ S) K, U3 z. r
@.Destination.NumReservation + 1;
1 J7 j( C" @! Y9 i end;8 y7 y$ H6 T& [* ?
@.CurrIcon := "drivingHome";! z% `$ s8 \1 ^- }
@.DrivingHome := true;5 W# u1 a( N* l6 j
end; d! C- i5 I+ g F, y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# U) N& T0 o0 o& D: C
part := @.transpOrder;
( s' Y( Y0 b4 i4 b2 b( H | part.move(@);-- load part2 t' M; J8 A+ O: G9 _/ k- x
@.CurrIcon := "load";0 q! ]. d2 p- v' ~
GlobalDistObj := part.globDestination; Y: `$ G0 ]- ]' G5 q! `% l
assignLObj := rgmanager.rgAssignL;' p$ R6 L" [) P; e! p' Z
row := assignLObj.getRowNo(GlobalDistObj);
' Y0 S# r' P: Q4 q& p if Row = -1 then -- since 709 O5 o6 ~3 O3 x9 r5 v4 W/ H
if lan=1 then
9 B- w3 m: d7 d/ p. w L9 `& f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 m" `: \ c% M, _% [) n1 m to_str("in der Andockstation: \"",?.~.name,"\""));5 J$ G; ] Y; J: Z4 C2 o$ I% d
else# k l( u) V, C. Q* a: f) }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," b: J) `/ U$ i5 n# c: L }
to_str("in docking station: \"",?.~.name,"\"")); - H3 R' d3 E$ s' j9 F8 S1 F5 [1 G+ m r
end;4 @6 i9 V# v4 B# z, o2 O
else3 K6 @1 N7 X( c/ m% H
@.Destination := assignLObj[1,row];. H' f; s! l( h0 ~9 {1 z
end; 7 @( Z+ u4 L0 W7 N: [/ s; L
newDirection(@);
+ [; J9 K$ y1 F" E5 U @.HasOrder := true;
! n& V S- ? b0 M3 _ end;
/ Q5 m# b& p, ]; S- J6 S end;
3 K* G) l9 h, _1 B6 fend; -- of the method
% }" ?) P: ]9 _1 \* u+ a |