/* called by: entrance ctrl of the object 'track'
+ @; {5 y% \" y" _* A! F4 o8 U. R*/
" ?. K) P! n0 a4 lis
& g6 h( J3 h! a4 _/ M part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 P; B, T0 ~" A* {$ T
do4 ?- r+ ]4 w+ s& r) d
Lan := rootfolder.Internal.Tools.AOLlanguage;0 q4 }" `3 b4 E' ~, a' |& e2 }
if current = @.Destination -- else return
% X' Y! n/ R6 ~' U" l then
& N c6 t) z6 A V. C, x* v; R, k# P @.Destination := void;
# K% A' C& V Y6 c- T. ~" W if @.occupied then# ^& v) _" i1 T, t6 N3 f
part := @.cont;& `/ L0 [- ^$ K' z
@.transpOrder := void;
# F9 ~' d ]8 T5 @& `+ t) W! L f0 V% O3 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ z) t6 N/ x0 f, R+ G9 J @,root.eventcontroller.simTime);0 S! b+ E2 n1 D
@.HasOrder := false;
S! S# V4 w7 s L2 O% ^ @.DrivingHome := true;
3 N' H8 X7 [0 p& ]$ d, ]9 G rgManager.tryToStartTransOrder;
# b5 U1 N5 q6 @8 o- w if @.Destination = void. V9 Y% T H* b, m, @$ [6 X
then -- no transport order for vehicle @
8 y4 Z8 C( ]4 T) Y( ^1 |; j @.Destination :=
. c. _- S* }8 G( A" N6 v2 S* K rgManager.nearestFreeStation(@,track.~);
' D- V* ?# S! _5 n, g1 G1 X1 o newDirection(@);
5 `9 E4 E8 d- J) o. v. m if @.Destination /= void then
' S1 t/ L( w4 t( F8 ]* J3 w @.Destination.NumReservation :=9 s2 M5 |9 @6 ~+ q0 G6 @
@.Destination.NumReservation + 1;
7 s r4 @7 n$ Z end;
' e9 V3 W8 p6 V2 J, ^4 Y @.CurrIcon := "drivingHome";% m; [5 \0 X# N1 w# V$ g/ ^
@.DrivingHome := true;0 r$ p% [% n% e# r1 V5 g
end;
\" P& V M) s# l$ J. [& S' _$ R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. L4 T" ^" m9 g" w7 a part := @.transpOrder;
9 _; O6 c1 y# S+ N part.move(@);-- load part
+ d4 X: O# q$ @7 H" [3 R @.CurrIcon := "load";3 G( n4 ]: j3 L3 l
GlobalDistObj := part.globDestination;
/ K; [7 X& [% U. b% D P% Y assignLObj := rgmanager.rgAssignL;
! P8 a( x2 Y# {! r8 u0 D% k row := assignLObj.getRowNo(GlobalDistObj);
2 W8 K, c! l1 q L if Row = -1 then -- since 70
& N" Q5 J; R3 {5 h, A5 m8 I. T if lan=1 then, B/ f- _: y$ u7 p: O' o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, ]* P& A: t$ d, L5 m) R* M# E to_str("in der Andockstation: \"",?.~.name,"\""));
" f3 \# O+ P" R v5 l# M, I else: Y+ j' `3 N; Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. ?! D- _* G) V b5 L3 `
to_str("in docking station: \"",?.~.name,"\""));
$ ?/ r& c0 m+ `: @. t) o end;
5 r. w- x3 X" E$ | else( R: g5 A# G) P9 ] y
@.Destination := assignLObj[1,row];) a+ B0 \' k# Z4 |( O* d
end; ; R8 M/ u! C1 s5 B) E9 t2 _
newDirection(@);1 [ h! ~2 t/ P! B
@.HasOrder := true;
6 A) D4 m, Q: X5 k3 m end;; r9 D4 L, k! S, F) L* ?' K5 z
end;4 u$ S' w& l- {- F
end; -- of the method& d1 G: N' v0 c5 ~& W- l0 O
|