/* called by: entrance ctrl of the object 'track'
& K$ I T+ o* \# B" J* H2 E7 O5 s*/
+ y% }( ?9 L. k) ?; h; Uis
! F4 f! k ^8 v4 K1 ~) M" v% B W, I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 r# I2 e( ]* }- a0 u6 X# O3 [do9 E$ |7 a( V5 o" V
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 ], z9 ` g) H) r, U! l2 J if current = @.Destination -- else return; j0 S1 p5 D! ^) b4 v
then2 }, D3 N$ t9 E* ^0 L
@.Destination := void;
# P6 c9 Y8 R, t7 J; ~7 Z+ M: O9 X if @.occupied then! l9 I% W' z$ J1 @9 }. [2 e
part := @.cont;8 k+ w5 S# j: H6 N4 O
@.transpOrder := void;
* {! N6 B- `( R" }9 A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Z" o; v- {% R1 \9 Y" D, h* C) b7 K
@,root.eventcontroller.simTime);
/ F1 ]8 P; N+ E4 H2 W @.HasOrder := false;
4 A' z+ }8 B. k" J @.DrivingHome := true;% U! b* d9 d% K% m
rgManager.tryToStartTransOrder;4 s7 g9 l& ^; k; N2 @
if @.Destination = void6 K2 m3 u) e& _2 u, j# a
then -- no transport order for vehicle @
/ k- ~: F/ l6 O, q) Q2 O R9 r @.Destination :=
% e! _1 p1 x' ~, `8 t rgManager.nearestFreeStation(@,track.~);
& B& X+ [( ~4 S4 Q& ~ newDirection(@); / D! R# D4 p+ V3 j! D
if @.Destination /= void then
2 V B( B; a' y5 B7 [ @.Destination.NumReservation :=
# S/ [$ [ H7 u% ^ @.Destination.NumReservation + 1;
, b$ _4 }% i( ?. q end;
4 \# a r3 p" w8 E @.CurrIcon := "drivingHome";
- M+ j: W9 D9 W J4 e @.DrivingHome := true;
2 g3 q& L. @5 M5 p0 G; O end;
& }7 g( G8 r% o. a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
l9 ~0 n7 M/ x, i8 N part := @.transpOrder;( C4 N( w1 w; v& Y" B
part.move(@);-- load part# K- G8 u* _3 M6 j% a' S
@.CurrIcon := "load";. [+ \) L0 C: E- G$ l6 e
GlobalDistObj := part.globDestination;
9 ]! d4 x% ~$ K1 R8 y+ I3 i2 z7 i) W assignLObj := rgmanager.rgAssignL;
( F5 R: P* |1 [; |( N4 Y row := assignLObj.getRowNo(GlobalDistObj);
$ S4 [' I( W. H e if Row = -1 then -- since 70
: t* y1 c# I# J# V if lan=1 then: Y4 E/ y' Q! [+ h @' _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 B1 a. b/ Z' E: s9 b2 u
to_str("in der Andockstation: \"",?.~.name,"\""));
$ N; a, M9 O+ N else& t$ b+ S, y% c8 R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 L- l& l/ `# q$ V. N
to_str("in docking station: \"",?.~.name,"\"")); ! f+ ~( _8 H M3 T6 P
end;
, I% I+ j: F/ K4 x else% Y: s/ w8 f0 g( X
@.Destination := assignLObj[1,row];4 E9 a& n/ F& |7 h3 K/ I# q6 x4 M( f
end;
* v0 d* e2 }/ }7 C- }4 b0 b! Z) A newDirection(@);
2 f- t' T% x+ @4 i! j @.HasOrder := true;+ [& L, J [1 ]3 I$ n) c
end;1 R1 L0 _( q9 L$ {' n
end;, j: c& H2 Q% f7 m+ } Q3 S
end; -- of the method6 c6 m7 Q0 m7 c) A
|