/* called by: entrance ctrl of the object 'track'; M+ U4 P6 x `9 G( P- u% h
*/5 s4 Q% ? F" n$ g9 Y# U. t
is
0 P- J$ Z5 @" E9 i* i* V6 O- f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# t0 b2 f' T: N# J7 C# Cdo9 M2 O" y$ A# O$ b3 q- Y5 V4 p
Lan := rootfolder.Internal.Tools.AOLlanguage;' E: w5 Y7 p* v( E
if current = @.Destination -- else return
( N- }4 O) ~- S1 ` then* ^8 K$ p v$ A" A
@.Destination := void;
5 Z* ^7 J4 A, d! B$ W if @.occupied then
9 t0 i% p7 Q* g c2 U/ Y part := @.cont;
* W7 F7 h9 U; I; |6 X/ @; N! _ @.transpOrder := void;0 m6 a) q5 m+ u; L+ u/ {* \ A, @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 V; j7 W3 Z/ y1 w5 R$ R" e$ j
@,root.eventcontroller.simTime);
8 v# |& F- M9 r7 y @.HasOrder := false;
: m: g \* _% {1 G4 o$ ]# F9 E @.DrivingHome := true;
& D( D) A+ c. r: y0 A5 E/ T rgManager.tryToStartTransOrder;6 ^8 `- z/ N/ m3 I
if @.Destination = void
: a W: |) @ W5 } z' b0 c4 V) o6 i6 g then -- no transport order for vehicle @4 }, Q$ p4 J; g+ ^' ?
@.Destination :=
. i3 P4 { F! R' Q: M rgManager.nearestFreeStation(@,track.~);( v. t; G9 a0 `' `& g
newDirection(@);
9 J" S: r& r: S ~- W0 Q# F- _ if @.Destination /= void then
9 g4 Y) x% z3 j. p& q6 A+ y: c# \ @.Destination.NumReservation :=
6 x |. C2 Y$ v, b. ~1 N @.Destination.NumReservation + 1;
; B5 G+ o: @% Y l, h% W" F1 o% s end;3 Y$ w5 a6 [4 U3 |$ f4 @8 e8 r
@.CurrIcon := "drivingHome";+ `. @: M6 l1 c% o1 H/ h# d$ f
@.DrivingHome := true;0 v3 y, e8 D8 s9 I0 I
end;
- J3 d' R: R# }4 V: z4 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
\0 {: M7 y7 h part := @.transpOrder;, `, t/ l6 }8 x" x/ ^) B
part.move(@);-- load part
8 W* u( g! X! e, k% B" [ @.CurrIcon := "load";
6 w- Q- f* b) A GlobalDistObj := part.globDestination;
$ k7 ]( X2 f3 t" ]' H assignLObj := rgmanager.rgAssignL;
" M+ k% ]0 B+ e' g. e row := assignLObj.getRowNo(GlobalDistObj);- ?, m Z2 y+ t7 l6 Y
if Row = -1 then -- since 70
; s6 G1 T# N, s( s if lan=1 then
4 E) ~) a- O6 U+ |9 q5 {# }% K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), p$ r) `' F" ^. c+ W, B9 v
to_str("in der Andockstation: \"",?.~.name,"\""));( M6 w: Y# H) A: o
else# E" @& P0 M3 ]8 E# x5 f! p6 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 w$ b. _ g( A9 K6 V# ? to_str("in docking station: \"",?.~.name,"\"")); ; M. z( m5 @# K* F
end;( \' Z7 v0 r4 P, h2 d
else
* |: n- @0 m& Z% k @.Destination := assignLObj[1,row];+ F5 j2 b; Q) n5 }' I: }
end;
: \! o+ O3 O6 y; n! ]8 K9 U; a7 H# a newDirection(@);
2 ]( I' T* p# c! R8 z% d @.HasOrder := true; D' z3 r+ R7 y. f; |/ K* g3 }
end;3 c. C: D) x5 B( y
end;: ] B- U7 H" U% b, ]! G& b7 ~+ ~- p
end; -- of the method
_, }. {3 j3 A$ K' o: R |