/* called by: entrance ctrl of the object 'track'2 ^2 h% c5 P& [: d3 H
*/" {7 k2 J/ ~. t0 d8 l" I9 P
is% M5 x- }9 R3 d* K4 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; q2 ]9 g2 K9 P: S+ Ido* I& m% Z0 } d8 p" c
Lan := rootfolder.Internal.Tools.AOLlanguage;
: Q: B) s9 e7 N0 E( G- c if current = @.Destination -- else return
6 A) x# ]$ s6 u( \# u then1 h+ s1 Q! ?# G: D
@.Destination := void;
. t6 t `3 V9 @7 { if @.occupied then
. A T4 l& Y- Y4 C! t part := @.cont;
+ D7 Z0 @) R2 m9 T- Q @.transpOrder := void;
( M# i+ c' ~7 p1 t3 P1 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 n4 _) W, N' H @,root.eventcontroller.simTime);
; c) Q, [# ~0 m! `* J" { @.HasOrder := false;- d3 u: x5 B; v! G8 }
@.DrivingHome := true;
4 _( C8 k- b* p$ k, _1 \; z' ~ rgManager.tryToStartTransOrder;- ^3 h1 ?0 B: |) v6 {% U( [
if @.Destination = void
# U/ C! |6 h7 C/ U" u. @. \ then -- no transport order for vehicle @% p3 z+ ~; ~- p( J# ^
@.Destination :=
7 T8 e8 o+ J# \' D4 I6 i$ x* U rgManager.nearestFreeStation(@,track.~);' Q+ v# M& O8 P7 T
newDirection(@); ( N% ]8 o1 j1 w- D4 J' u0 v* s
if @.Destination /= void then
/ g7 c. t4 i- E, p- S @.Destination.NumReservation :=
8 |2 S$ k8 M* C, G5 H1 x9 d @.Destination.NumReservation + 1;9 H1 u( p$ n* V' }* C2 _$ i
end;
* p; g% ]5 v$ B% `) u" u @.CurrIcon := "drivingHome";
0 Z8 R4 V- @" r @.DrivingHome := true;8 x2 @: d; L% C) W
end;- u. I- i; f0 _% x0 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% G ?: i6 k: F# l; Q part := @.transpOrder;
% h& [" O3 d6 }& ?6 V4 {0 m& B9 t; q part.move(@);-- load part
9 i0 \% q% O4 r/ N# {* v" [+ B @.CurrIcon := "load";( d X" r, R6 r- L+ r
GlobalDistObj := part.globDestination;1 ?6 K+ v: H# u9 c, w9 d4 O( ^
assignLObj := rgmanager.rgAssignL;% q( D5 h+ t2 b0 `6 N a
row := assignLObj.getRowNo(GlobalDistObj);% R: z% M3 e/ d5 [4 z% v
if Row = -1 then -- since 703 _+ d* @# \4 H6 G
if lan=1 then' C5 ^% m- ]# u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, V) u9 r7 l9 a to_str("in der Andockstation: \"",?.~.name,"\""));
) B# b0 W3 q& X else
! r) J+ `1 \3 X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# h/ [" X4 M* w3 S5 t) J to_str("in docking station: \"",?.~.name,"\""));
; e2 F# f% k# I! l end;7 C: K* W% Q. q7 t0 g% Y
else
* B5 \9 y' _0 w! }' {. U* T @.Destination := assignLObj[1,row];# S3 r: n5 F) ^; a6 _ V* q
end;
( g/ B) b/ P9 P newDirection(@);
( I) _5 ?. V# v5 s, B& X @.HasOrder := true;7 P2 V* B, N- [$ v! Y$ z$ r
end;
2 I# |# E2 d( Q* ~& Q end;
( D9 C8 V+ h& \& I0 ~end; -- of the method k" r9 d# d Z7 A) G
|