/* called by: entrance ctrl of the object 'track'
8 Q+ E; K" m3 E/ `: j. `- s*/2 ^) ]% I) r* Q& ]" U
is# Y0 q) _( C3 ^/ p I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 p& L' L& L4 zdo
4 @9 u1 ^# O. a! X7 n Lan := rootfolder.Internal.Tools.AOLlanguage;
8 b! r9 a$ M3 {9 l5 J if current = @.Destination -- else return. b5 p; g/ N) i9 b# t
then
7 T1 l1 ^( p0 j; P- R: m @.Destination := void;
* G/ ~/ e. }/ D. {) ]" m if @.occupied then4 t- O5 R& r$ D
part := @.cont;
6 v. Q8 Q' h" K- [4 Y7 [ @.transpOrder := void;
4 E2 d4 c+ z( h8 {8 U' k7 q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! |* q. L/ x4 {$ p0 q- ^
@,root.eventcontroller.simTime);% d$ l5 R$ `$ ~! ]9 K
@.HasOrder := false;6 h X$ L+ W5 |
@.DrivingHome := true;
# ?9 R9 ~8 T; n$ s! b) J rgManager.tryToStartTransOrder; Z9 w5 v6 J9 H
if @.Destination = void: d& C. j/ s, v4 _6 T) E
then -- no transport order for vehicle @: V! P; ~3 X$ B1 D
@.Destination :=
- S( P. V1 g8 n8 X, U6 d4 B+ E rgManager.nearestFreeStation(@,track.~);
- u! u* @4 V; i7 e3 V" K* y0 T newDirection(@); 5 V* t: m( I; P0 t* a
if @.Destination /= void then; f4 J( M S2 o2 [+ {+ S
@.Destination.NumReservation :=! z# E/ ?! ~. z) M9 L& S1 B* C
@.Destination.NumReservation + 1;
- {1 J! C1 b) x* b end;% ]( Q" q" k5 w U
@.CurrIcon := "drivingHome";. @ e+ M1 @- Q3 m1 Y9 U8 _ b# n3 Z: [
@.DrivingHome := true;2 T* t5 Q# e) Q5 c$ W7 ]" V
end;( @; b: f, v( _) Q# J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 J' E6 o6 Y2 L3 V* `+ A) \
part := @.transpOrder;/ S0 i" `. R$ m4 P( z. d5 L, Q
part.move(@);-- load part
3 a6 W3 k8 I: E @.CurrIcon := "load";
- p& i2 ~( M, f9 i- X3 |) j GlobalDistObj := part.globDestination;2 @$ B3 Z1 ^; B f1 k
assignLObj := rgmanager.rgAssignL;
# b: X. g" _$ d; ^3 G/ v& ~9 p row := assignLObj.getRowNo(GlobalDistObj);5 w6 s9 S, Z& a
if Row = -1 then -- since 70
3 t/ [- l3 @8 \7 w if lan=1 then
* N( l1 o3 e* L9 ^* F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 h: k* i$ P! p- Q4 N* u* M
to_str("in der Andockstation: \"",?.~.name,"\""));
) S8 A: {3 Y) @3 _5 J* `4 R: B else
* v$ v+ Q7 A Q1 p' w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 }' D V) K+ s/ ~* j to_str("in docking station: \"",?.~.name,"\""));
, z0 }" d; g$ W& I7 \9 v) I end;
1 ?2 q' j4 E4 D5 z" F$ M else' [( [# W& f6 S2 E# Q2 j% h
@.Destination := assignLObj[1,row];2 p- w& @9 H7 a/ \
end;
3 z/ k' C0 `% C" g& y/ X newDirection(@);7 a) b5 n. F! d- B2 J/ i
@.HasOrder := true;
7 B) V: f- h8 S! a end;
2 c. l8 V9 M4 a( |# R end;# c$ B& R6 u$ s' v$ F
end; -- of the method2 N, f/ h& E: w# I
|