/* called by: entrance ctrl of the object 'track'
8 e# u. `5 l% f2 J*/% K* t$ \$ `4 w3 F# u, Q9 ~
is
- {9 c+ X7 ]# J K part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 n* s2 l! I. x+ M
do
& C9 @7 @' {; a& [ Lan := rootfolder.Internal.Tools.AOLlanguage;1 u7 A; Z( k) r! ^0 ]) o- j
if current = @.Destination -- else return, k4 c% b; \: {, h% z( G% u# S
then. Y1 y3 }: ?2 P
@.Destination := void;
_$ Y' k4 H, \1 j* B/ H! J if @.occupied then2 @, D7 r9 P/ L9 u/ N% n# [
part := @.cont;
( W' m# Z1 t) { @.transpOrder := void;' O o2 ?2 N9 m" W6 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) e" w% n0 q% R! j* m' d w0 Q/ A
@,root.eventcontroller.simTime);
3 y3 V$ S6 J! t" G d" l# R- E @.HasOrder := false;
S! r" W- i% H$ k @.DrivingHome := true;
- u7 Z+ N1 \" h6 ?8 ~ Z3 k7 c rgManager.tryToStartTransOrder;
1 c: N+ C0 F& R3 X if @.Destination = void. s5 Q+ ^4 m: T; O
then -- no transport order for vehicle @
5 C) s8 p5 r) t @.Destination :=1 S5 ?1 d* O! a
rgManager.nearestFreeStation(@,track.~);
X' u7 j0 F3 a9 f newDirection(@); & S3 w- P* z2 J
if @.Destination /= void then ^( T& n) r0 A$ Q; f2 t+ H
@.Destination.NumReservation :=
5 m! M: N" A3 h& }- o5 T @.Destination.NumReservation + 1;
* @3 F; ], Z+ F! O4 N7 k end;7 a3 ^4 t( C5 F# }* E }6 C2 o
@.CurrIcon := "drivingHome";
% L) U# a0 C/ b' S @.DrivingHome := true;9 x! K7 j9 l3 n n& c5 _' m
end;
& I8 E0 `2 i$ {4 g+ u t+ P1 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 f6 I$ Y9 Y) d0 G+ j; @ part := @.transpOrder;
8 L9 g/ c$ t& v- M, I part.move(@);-- load part
& m, Z" V# S9 c7 S8 {" [$ D @.CurrIcon := "load";
& X4 {) N; D1 f F GlobalDistObj := part.globDestination;
8 \) g( H+ K' z* F assignLObj := rgmanager.rgAssignL;3 [8 N% p; \" \" u
row := assignLObj.getRowNo(GlobalDistObj);
/ ~( o, g, s% C( j9 c# L if Row = -1 then -- since 70
) _5 J7 v1 q6 g3 ]5 p* N3 ^: S if lan=1 then
' v5 ?3 f+ g5 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 h" v6 B4 T* e( | to_str("in der Andockstation: \"",?.~.name,"\""));
" ?0 v6 }# P2 i4 ?* b4 x else
. F1 ^8 q9 Y$ I0 h3 K7 T5 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# @: m4 E% [; b( _! R8 w to_str("in docking station: \"",?.~.name,"\"")); 6 x6 R0 f- X1 O
end;, I4 L: d- J1 T8 S' ^2 f( P
else
+ H9 t) c7 Z3 ~" D/ N @.Destination := assignLObj[1,row];
, x# ?: ^+ p5 R, M% c6 w end;
; E: {+ i7 T* y4 B& d- Z. ] newDirection(@);) u4 A8 o5 u: W
@.HasOrder := true;
8 q8 h' \; M* b% s end;
; M5 T7 F5 _% [- K" _& F, @2 n end;
3 D) k- C4 B: @8 oend; -- of the method
; w& n0 m1 @$ z: ~2 n |