/* called by: entrance ctrl of the object 'track'1 z* [' c9 H5 i2 t; ]( B9 }9 P
*/) h& A* w. E4 z
is: z" L/ ~8 L, B. M% I8 r" {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 @& Z2 O& U3 Odo1 Q* {# o- ^5 I) n$ @
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 h5 n$ E2 [- `$ X if current = @.Destination -- else return: ?& o0 P" v/ [+ N# ^% {
then
+ V9 }1 P' n" N# Q @.Destination := void;
, F/ }# Q3 { h if @.occupied then
( G1 G2 V+ @" r6 O part := @.cont;. {; V! y" o Q; I
@.transpOrder := void;! w3 z% ]8 `3 J7 o$ T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 ^0 ?5 V) B' Y0 M* e2 K/ M @,root.eventcontroller.simTime);
5 R) ~; F+ i' C6 T) G9 c @.HasOrder := false;! S/ {: O' Q- L
@.DrivingHome := true; W5 F$ j6 D- y
rgManager.tryToStartTransOrder;5 @& q3 ~; O' ]7 e8 a
if @.Destination = void2 n Q9 W0 Y6 g
then -- no transport order for vehicle @
u1 M* V& p( q5 q9 w" B @.Destination :=% a6 S1 n4 Y* r1 X
rgManager.nearestFreeStation(@,track.~);" p# t0 C& b1 }2 i* {' x: ?. u
newDirection(@); 4 F9 W$ x/ \1 f, q
if @.Destination /= void then3 y* p8 K$ I$ b6 N8 n8 w7 ~; X
@.Destination.NumReservation :=
- T- i7 b8 {* D# j @.Destination.NumReservation + 1;
% z# o% J+ |/ Y2 s. {" w end;
( q; }' q: h* D- d3 G1 g7 |) x( M @.CurrIcon := "drivingHome";& Y- ?) R$ v* y6 X' [: d5 |% m g
@.DrivingHome := true;
) t4 j/ Q7 `2 O0 U) a; [2 u! Y$ s/ i end;
~* E0 u- n! C else -- the vehicle @ is empty, both vehicle and part are in the same dock station' e2 z, v7 Q; u5 f5 [ E7 f8 A
part := @.transpOrder;8 X2 k5 g! L2 l7 r* ?
part.move(@);-- load part
z6 x+ l/ J4 } k9 K& k @.CurrIcon := "load";& S$ w# k7 ?6 x* U# E
GlobalDistObj := part.globDestination;
' E4 H6 Q! v' d# ~* J0 C: `1 w, R' K assignLObj := rgmanager.rgAssignL;
. I) l Q8 g& U0 b N2 } row := assignLObj.getRowNo(GlobalDistObj);
0 L* s6 g# `% y; h* a/ z if Row = -1 then -- since 70
' d1 c9 a4 m) T: [ if lan=1 then( F! G4 U9 R( E% b/ f* H1 b6 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* z+ y! O, |. Z; S. D' L
to_str("in der Andockstation: \"",?.~.name,"\""));
0 B" g$ v0 i: L& B" B else
5 j/ Q! f; f- Y+ K- j, }' K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& y# a" q% h) j* V, b8 B) p; d( a) b to_str("in docking station: \"",?.~.name,"\""));
5 g% S8 E* U* d6 A( N% d. M) M+ Z end;" W5 |, b+ N1 Z1 c% d- m4 g4 j
else, A$ O) T" [) [- p3 T; [' J; e) ^
@.Destination := assignLObj[1,row];1 Y1 c" p' a. V7 y) s
end; ; b) ?$ S- p0 D5 G
newDirection(@);2 t6 F; E. H% @% w
@.HasOrder := true;; ~3 \8 G9 M# k* g+ X
end;9 V+ Y4 |% o5 z. g# r
end;7 c+ x8 n3 H3 L) f) r# {
end; -- of the method9 w1 X! Q& s9 G$ G
|