/* called by: entrance ctrl of the object 'track'
' G* s7 g- |& X# ?/ y, b*/
3 ?; a* P l5 v1 [is& L5 R: \. n; b( \( Z; ^6 q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, | _, ]7 m9 T& I
do
# |0 E+ s0 ^" S6 P% j- a% ]# R- P Lan := rootfolder.Internal.Tools.AOLlanguage;0 t5 f) v9 C5 O% Z0 X5 j$ y
if current = @.Destination -- else return
d+ J9 |, S7 t& @) Q+ W7 z then
! |# O' F; Q) m. t @.Destination := void;
- J; ~5 g! z* k if @.occupied then, s. c; |8 J) o6 @2 R3 z4 f
part := @.cont;2 ^- A4 ]1 T: n/ b
@.transpOrder := void;
3 d0 A# I2 n! I- _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; {; ]. W5 N ~8 C4 x; {9 Z
@,root.eventcontroller.simTime);
0 w3 K% t/ V$ h4 k) q3 n1 N4 ] @.HasOrder := false;! o8 u5 t1 w/ n/ ^& \
@.DrivingHome := true;
4 I' z1 G' i( R7 k7 x rgManager.tryToStartTransOrder;+ j/ c! \, |' n8 X' Z |" G
if @.Destination = void
: P1 |: Z, R2 o1 G then -- no transport order for vehicle @8 e$ n+ v$ I. u% C' ~2 n
@.Destination :=) W+ ]: G% o2 V. ~
rgManager.nearestFreeStation(@,track.~);
7 |" b( O- P( N% ^! W* T newDirection(@); * G6 B/ e& U2 [! c8 S0 ]/ L
if @.Destination /= void then
( t( d4 `/ y9 }" l X/ w0 ? @.Destination.NumReservation :=
6 J$ z) w' x/ D; ^ @.Destination.NumReservation + 1;, L4 R3 x9 P% R0 D& r" P4 a, u
end;
& E. q g' a" p/ k8 x* S @.CurrIcon := "drivingHome";
" d" B- W0 o2 Y @.DrivingHome := true;* `: u) W. V0 N! k3 \5 D! Y( \( P
end;
; k' c5 L$ f9 B3 F% o! [/ G: K r; Z: N else -- the vehicle @ is empty, both vehicle and part are in the same dock station: ?4 P, L* i% M2 s+ A8 A
part := @.transpOrder;# {7 O! ~4 g2 }
part.move(@);-- load part
+ J* M t5 ]9 N. N @.CurrIcon := "load";' \% S+ T# P+ L' m, u
GlobalDistObj := part.globDestination;% Z$ ?% m5 q2 [# c: M' Z; I8 c
assignLObj := rgmanager.rgAssignL;
" _- Y% q/ E; a; `2 _7 ~5 O" |- B row := assignLObj.getRowNo(GlobalDistObj);
+ }9 [- x7 ? g: f! o1 w+ a2 ^ if Row = -1 then -- since 70
8 y: g' b3 D k if lan=1 then
: A" Q6 B `4 x2 H# i i/ ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# D! l$ _+ n) {' |# z
to_str("in der Andockstation: \"",?.~.name,"\""));
! O3 Z3 W Y3 L9 w# C3 W+ ^ else$ Y+ I* O3 w$ U; _2 t1 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," [, Q+ X& ~5 n) J6 W* V7 h3 q
to_str("in docking station: \"",?.~.name,"\""));
7 l3 @. B. O$ Y9 z+ ? end;
7 N$ C) X5 A/ _ else
& U( Y- \( |5 f1 S! W, H @.Destination := assignLObj[1,row];5 G8 g* C( U+ r) W# N2 c/ R" H
end;
$ P4 V! V: O# l% K# q6 P8 k newDirection(@);
0 ]8 ^7 a9 b) s" \ @.HasOrder := true;& U* J1 u8 ]4 [: Z; ~ g# S
end;
9 P- a- K+ j$ `8 x4 Y: ~ end;7 T2 |$ R r; \- U# R6 h
end; -- of the method
* q) a) Z) s2 J: ^% A7 s+ ]" c |