221 Report(
"elevator object created");
230 Report(
"deleting meshes");
262 Report(
"deleting timers");
305 for (
size_t i = 0; i <
Cars.size(); i++)
309 Cars[i]->parent_deleting =
true;
323 Report(
"deleting motor sounds");
358 return ReportError(
"Acceleration not set or invalid");
361 return ReportError(
"Deceleration not set or invalid");
375 return ReportError(
"Invalid value for Controller");
382 Vector3 position = Vector3::ZERO;
384 if (relative ==
false)
399 for (
size_t i = 0; i < (size_t)
Controllers.size(); i++)
415 Report(
"moving elevator to origin position");
421 motorname +=
" Idle";
441 if (!
GetCar(1)->CreateCar(floor))
468 bool autosize_x, autosize_y;
472 Wall *frame =
sbs->
CreateWallBox(
WeightMesh,
"Counterweight Frame", frame_texture, -size.x / 2, size.x / 2, -size.z / 2, size.z / 2, size.y, 0, 1, 1,
true,
true,
false,
false,
false);
473 Wall *counterweight =
sbs->
CreateWallBox(
WeightMesh,
"Counterweight", weight_texture, (-size.x / 2) + 0.01, (size.x / 2) - 0.01, (-size.z / 2) + 0.01, (size.z / 2) - 0.01, size.y / 2, weight_voffset, 1, 1);
475 Floor *topfloor, *carfloor, *topcarfloor, *bottomfloor;
491 c_rope =
sbs->
AddWall(
WeightRopeMesh,
"Counterweight Rope",
RopeTexture, 0, -size.x / 4, 0, size.x / 4, 0, counterweight_rope_height, counterweight_rope_height, 0, 0, 1, 1);
493 c_rope =
sbs->
AddWall(
WeightRopeMesh,
"Counterweight Rope",
RopeTexture, 0, 0, -size.z / 4, 0, size.z / 4, counterweight_rope_height, counterweight_rope_height, 0, 0, 1, 1);
498 rope =
sbs->
AddWall(
RopeMesh,
"Rope",
RopeTexture, 0, -size.x / 4, 0, size.x / 4, 0, rope_height, rope_height, 0, 0, 1, 1);
500 rope =
sbs->
AddWall(
RopeMesh,
"Rope",
RopeTexture, 0, 0, -size.z / 4, 0, size.z / 4, rope_height, rope_height, 0, 0, 1, 1);
510 return counterweight;
520 return ReportError(
"AddRails: no shaft available");
528 if (orientation ==
false)
531 sbs->
CreateWallBox2(mesh,
"Rails L1", edge_texture, -rail_distance + x + offset.x + (rail_width / 4), z + offset.z, rail_width / 2, rail_width / 8, height, 0, 1, 1);
532 sbs->
CreateWallBox2(mesh,
"Rails L2", main_texture, -rail_distance + x + offset.x - (rail_width / 4), z + offset.z, rail_width / 2, rail_width / 8, height, 0, 1, 1);
533 sbs->
CreateWallBox2(mesh,
"Rails L3", main_texture, -rail_distance + x + offset.x - (rail_width / 2), z + offset.z, rail_width / 8, rail_width, height, 0, 1, 1);
536 sbs->
CreateWallBox2(mesh,
"Rails R1", edge_texture, rail_distance + x + offset.x - (rail_width / 4), z + offset.z, rail_width / 2, rail_width / 8, height, 0, 1, 1);
537 sbs->
CreateWallBox2(mesh,
"Rails R2", main_texture, rail_distance + x + offset.x + (rail_width / 4), z + offset.z, rail_width / 2, rail_width / 8, height, 0, 1, 1);
538 sbs->
CreateWallBox2(mesh,
"Rails R3", main_texture, rail_distance + x + offset.x + (rail_width / 2), z + offset.z, rail_width / 8, rail_width, height, 0, 1, 1);
543 sbs->
CreateWallBox2(mesh,
"Rails F1", edge_texture, x + offset.x, -rail_distance + z + offset.z + (rail_width / 4), rail_width / 8, rail_width / 2, height, 0, 1, 1);
544 sbs->
CreateWallBox2(mesh,
"Rails F2", main_texture, x + offset.x, -rail_distance + z + offset.z - (rail_width / 4), rail_width / 8, rail_width / 2, height, 0, 1, 1);
545 sbs->
CreateWallBox2(mesh,
"Rails F3", main_texture, x + offset.x, -rail_distance + z + offset.z - (rail_width / 2), rail_width, rail_width / 8, height, 0, 1, 1);
548 sbs->
CreateWallBox2(mesh,
"Rails B1", edge_texture, x + offset.x, rail_distance + z + offset.z - (rail_width / 4), rail_width / 8, rail_width / 2, height, 0, 1, 1);
549 sbs->
CreateWallBox2(mesh,
"Rails B2", main_texture, x + offset.x, rail_distance + z + offset.z + (rail_width / 4), rail_width / 8, rail_width / 2, height, 0, 1, 1);
550 sbs->
CreateWallBox2(mesh,
"Rails B3", main_texture, x + offset.x, rail_distance + z + offset.z + (rail_width / 2), rail_width, rail_width / 8, height, 0, 1, 1);
576 return ReportError(
"floor button must be pressed before closing doors while in independent service");
580 return ReportError(
"cannot add route while in inspection service mode");
583 return ReportError(
"cannot add route while hold is enabled");
590 return ReportError(
"cannot add route in opposite direction of queue search");
629 std::string car_msg =
"";
633 Report(
"adding route to floor " +
ToString(floor) +
" (" + floorobj->
ID +
") direction Up" + car_msg);
651 std::string car_msg =
"";
655 Report(
"adding route to floor " +
ToString(floor) +
" (" + floorobj->
ID +
") direction Down" + car_msg);
671 Report(
"adding ACP route");
699 for (
size_t i = 0; i <
UpQueue.size(); i++)
703 Report(
"deleting route to floor " +
ToString(floor) +
" (" + floorobj->
ID +
") direction Up");
714 for (
size_t i = 0; i <
DownQueue.size(); i++)
718 Report(
"deleting route to floor " +
ToString(floor) +
" (" + floorobj->
ID +
") direction Down");
731 Report(
"DeleteRoute: turning off button lights for floor " +
ToString(floor));
744 if (direction ==
true)
746 for (
size_t i = 0; i <
UpQueue.size(); i++)
754 for (
size_t i = 0; i <
DownQueue.size(); i++)
783 Report(
"cancelled last call");
806 Report(
"cancelled all calls");
819 if (emergency ==
true)
823 return ReportError(
"cannot stop while in inspection service mode");
827 return ReportError(
"cannot stop while in fire service 1 recall mode");
837 if (emergency ==
true)
848 Report(
"stopping elevator");
897 Report(
"ProcessCallQueue: sending elevator to top floor for DownPeak mode");
905 Report(
"ProcessCallQueue: sending elevator to bottom floor for UpPeak mode");
915 Report(
"ProcessCallQueue: resetting search direction due to idle");
926 Report(
"ProcessCallQueue: setting search direction to up");
932 Report(
"ProcessCallQueue: setting search direction to down");
944 Report(
"ProcessCallQueue: setting search direction to down");
954 Report(
"ProcessCallQueue: setting search direction to up");
971 Report(
"ProcessCallQueue: resetting search direction due to empty up queue");
978 Report(
"ProcessCallQueue: resetting search direction due to empty down queue");
990 for (
size_t i = 0; i <
UpQueue.size(); i++)
996 std::string car_msg =
"";
1038 Report(
"ProcessCallQueue up: cannot change destination floor to " +
ToString(
UpQueue[i].floor) + car_msg);
1051 Report(
"ProcessCallQueue up: dispatching idle lower elevator, floor " +
ToString(
UpQueue[i].floor) + car_msg);
1071 Report(
"ProcessCallQueue up: resetting search direction since last entry is lower" + car_msg);
1091 std::string car_msg =
"";
1096 if (
DownQueue[i].floor <= car->CurrentFloor)
1133 Report(
"ProcessCallQueue down: cannot change destination floor to " +
ToString(
DownQueue[i].floor) + car_msg);
1146 Report(
"ProcessCallQueue down: dispatching idle higher elevator, floor " +
ToString(
DownQueue[i].floor) + car_msg);
1166 Report(
"ProcessCallQueue down: resetting search direction since last entry is higher" + car_msg);
1264 Report(
"playing motor idle sound");
1277 Report(
"stopping motor idle sound");
1324 bool StartLeveling =
false;
1363 Report(
"starting elevator movement procedure");
1368 std::string dir_string;
1404 ReportError(
"Destination floor not a serviced floor");
1415 ReportError(
"Elevator already on specified floor");
1430 dir_string =
"down";
1441 dir_string =
"down";
1448 bool skip_interlock =
false;
1455 skip_interlock =
true;
1463 ReportError(
"Doors must be closed before moving when interlocks are enabled");
1518 Report(
"user in elevator - turning off objects");
1533 if (
GetShaft()->ShowOutside ==
false)
1559 std::string car_msg =
"";
1567 Report(
"moving " + dir_string);
1576 Report(
"started departure delay");
1590 Report(
"finished departure delay");
1595 for (
size_t i = 0; i <
Cars.size(); i++)
1597 if (
Cars[i]->MessageOnMove ==
true)
1598 Cars[i]->PlayMessageSound(
true);
1610 Report(
"handling emergency stop");
1752 Report(
"beyond deceleration marker - slowing down");
1834 Report(
"leveling enabled");
1836 StartLeveling =
true;
1861 if (pass ==
true || StartLeveling ==
true)
1884 StartLeveling =
false;
1897 Report(
"arrived at floor");
1921 Report(
"started arrival delay");
1929 Report(
"finished arrival delay");
1938 Report(
"storing error offset");
1951 Report(
"setting elevator to floor altitude");
1959 Report(
"resetting elevator motion values");
2003 Vector3 vector (0, offset, 0);
2070 Report(
"user in elevator - turning on objects");
2096 Report(
"user not in elevator - not turning on objects");
2138 Report(
"at top floor; setting queue search direction to down");
2145 Report(
"at bottom floor; setting queue search direction to up");
2219 for (
size_t i = 0; i <
UpQueue.size(); i++)
2221 std::string type =
"Car";
2222 if (
UpQueue[i].call_type == 1)
2224 if (
UpQueue[i].call_type == 2)
2226 if (
UpQueue[i].call_type == 3)
2227 type =
"Destination";
2239 for (
size_t i = 0; i <
DownQueue.size(); i++)
2241 std::string type =
"Car";
2247 type =
"Destination";
2270 Report(
"enabling elevator");
2272 Report(
"disabling elevator");
2275 for (
size_t i = 0; i <
Cars.size(); i++)
2277 Cars[i]->Enabled(value);
2297 for (
size_t i = 0; i <
Cars.size(); i++)
2299 if (
Cars[i]->IsInCar(position, camera) ==
true)
2341 for (
size_t i = 0; i <
Cars.size(); i++)
2343 Cars[i]->UpdateFloorIndicators();
2361 std::string text = id;
2372 Report(
"setting floor skip text to " + text);
2414 if (
GoActive ==
false || hold ==
false)
2473 Report(
"On recall floor");
2475 Report(
"On alternate recall floor");
2485 Report(
"Proceeding to recall floor");
2493 Report(
"Proceeding to alternate recall floor");
2532 return ReportError(
"EnableACP: cannot enable while in independent service mode");
2534 return ReportError(
"EnableACP: cannot enable while in inspection service mode");
2536 return ReportError(
"EnableACP: cannot enable while in a fire service mode");
2544 Report(
"ACP mode enabled");
2549 Report(
"ACP mode disabled");
2577 return ReportError(
"EnableUpPeak: cannot enable while in independent service mode");
2579 return ReportError(
"EnableUpPeak: cannot enable while in inspection service mode");
2581 return ReportError(
"EnableUpPeak: cannot enable while in a fire service mode");
2592 for (
size_t i = 0; i <
Cars.size(); i++)
2596 Cars[i]->SetDirectionalIndicators(
Cars[i]->GetFloor(),
true,
false);
2599 Cars[i]->OpenDoors();
2604 Report(
"Up Peak mode enabled");
2611 Report(
"Up Peak mode disabled");
2639 return ReportError(
"EnableDownPeak: cannot enable while in independent service mode");
2641 return ReportError(
"EnableDownPeak: cannot enable while in inspection service mode");
2643 return ReportError(
"EnableDownPeak: cannot enable while in a fire service mode");
2654 for (
size_t i = 0; i <
Cars.size(); i++)
2658 Cars[i]->SetDirectionalIndicators(
Cars[i]->GetFloor(),
false,
true);
2661 Cars[i]->OpenDoors();
2666 Report(
"Down Peak mode enabled");
2673 Report(
"Down Peak mode disabled");
2702 ReportError(
"EnableIndependentService: mode is the same");
2706 if (car_number == 0)
2712 return ReportError(
"EnableIndependentService: cannot enable while in inspection service mode");
2714 return ReportError(
"EnableIndependentService: cannot enable while in a fire service mode");
2733 Report(
"Independent Service mode enabled for car " +
ToString(car_number));
2743 Report(
"Independent Service mode disabled");
2761 ReportError(
"EnableInspectionService: mode is the same");
2778 Report(
"Inspection Service mode enabled");
2788 Report(
"Inspection Service mode disabled");
2796 Report(
"user in elevator - turning on objects");
2846 ReportError(
"EnableFireService1: mode is the same");
2852 return ReportError(
"EnableFireService1: cannot enable while in inspection service mode");
2854 if (value < 0 || value > 2)
2855 return ReportError(
"EnableFireService1: invalid value");
2867 Report(
"Fire Service Phase 1 mode set to On");
2894 Report(
"Fire Service Phase 1 mode set to Bypass");
2904 Report(
"Fire Service Phase 1 mode set to Off");
2927 return ReportError(
"EnableFireService2: cannot enable while in inspection service mode");
2931 return ReportError(
"EnableFireService2: not in fire service phase 1 mode");
2943 return ReportError(
"EnableFireService2: doors must be open to change phase 2 modes");
2949 ReportError(
"EnableFireService2: mode is the same");
2953 if (car_number == 0)
2956 if (value >= 0 && value <= 2)
2959 return ReportError(
"EnableFireService2: invalid value");
2979 if (i != car_number)
2986 Report(
"Fire Service Phase 2 mode set to On for car " +
ToString(car_number));
2991 Report(
"Fire Service Phase 2 mode set to Hold for car " +
ToString(car_number));
2997 Report(
"Fire Service Phase 2 mode set to Off");
3046 return ReportError(
"Invalid alternate recall floor");
3089 return ReportError(
"Not in inspection service mode");
3110 Report(
"MoveUp: moving elevator");
3127 return ReportError(
"Not in inspection service mode");
3148 Report(
"MoveDown: moving elevator");
3166 if (
ManualGo ==
true && value ==
false)
3179 Report(
"setting go button status to on");
3181 Report(
"setting go button status to off");
3209 if (
ManualUp ==
true && value ==
false)
3222 Report(
"setting up button status to on");
3224 Report(
"setting up button status to off");
3227 if (
ManualGo ==
true && value ==
true)
3260 Report(
"setting down button status to on");
3262 Report(
"setting down button status to off");
3265 if (
ManualGo ==
true && value ==
true)
3289 SBS_PROFILE(
"Elevator::UpdateDirectionalIndicators");
3291 for (
size_t i = 0; i <
Cars.size(); i++)
3293 Cars[i]->UpdateDirectionalIndicators();
3321 Report(
"QueueReset: resetting up queue");
3328 Report(
"QueueReset: resetting down queue");
3350 Report(
"deleting active route");
3384 if (direction == -1)
3462 if (queue == 0 || queue == 1)
3464 for (
size_t i = 0; i <
UpQueue.size(); i++)
3466 if (
UpQueue[i].floor == floor)
3471 if (queue == 0 || queue == -1)
3473 for (
size_t i = 0; i <
DownQueue.size(); i++)
3514 int newfloor = floor;
3531 bool UpStatus, DownStatus;
3584 if (newfloor == floor)
3592 if (newfloor >= floor)
3605 if (value ==
false &&
IsMoving ==
true)
3614 if (value ==
false &&
IsMoving ==
false)
3620 Report(
"Elevator stopped");
3625 Report(
"Elevator running");
3669 bool enable_elevators =
sbs->
GetConfigBool(
"Skyscraper.SBS.Elevator.IsEnabled",
true);
3671 if (enable_elevators ==
false)
3732 Report(
"Available for call");
3737 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3738 Report(
"Not available for call - going a different direction and is not idle");
3744 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3745 Report(
"Not available for call - position/direction wrong for call and is not idle");
3751 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3752 Report(
"Not available for call - in nudge mode");
3758 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3759 Report(
"Not available for call - interlock check failed");
3765 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3766 Report(
"Not available for call - door hold is enabled");
3772 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3773 Report(
"Not available for call - queueresets is on and opposite queue direction is active");
3779 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3780 Report(
"Not available for call - limitqueue is on and queue is active");
3786 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3787 Report(
"Not available for call - queue change is pending");
3793 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3794 Report(
"Not available for call - in service mode");
3800 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3801 Report(
"Not available for call - elevator not running");
3807 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3808 Report(
"Not available for call - direction beyond serviced range");
3813 if (
sbs->
Verbose ==
true && report_on_failure ==
true)
3814 Report(
"Not available for call - not a serviced floor");
3828 return ReportError(
"Cannot select floor while in inspection mode");
3830 return ReportError(
"Cannot select floor while in fire service recall mode");
3836 return Go(floor,
true);
3850 return ReportError(
"Cannot select floor " +
ToString(floor) +
": Hybrid mode is not enabled");
3854 bool result =
false;
3891 car->
Chime(0, floor,
false);
3893 car->
Chime(0, floor,
true);
3921 for (
size_t i =
Cars.size() - 1; i <
Cars.size(); --i)
3945 if (parking ==
true)
3948 if (floor >=
GetCar(car)->GetFloor())
3968 Report(
"returning to bottom floor");
4050 Report(
"Up: moving elevator");
4086 Report(
"Up: moving elevator");
4142 for (
size_t i = 0; i <
Cars.size(); i++)
4144 Cars[i]->PlayStartingSounds();
4152 Report(
"playing motor up start sound");
4161 Report(
"playing motor down start sound");
4175 Report(
"playing counterweight start sound");
4189 bool motorsound_play =
false;
4190 std::string MotorSoundFile;
4193 for (
size_t i = 0; i <
Cars.size(); i++)
4195 Cars[i]->PlayStoppingSounds(emergency);
4198 if (emergency ==
true)
4204 Report(
"playing motor emergency stop sound");
4207 motorsound_play =
true;
4212 if (motorsound_play ==
false)
4217 Report(
"playing motor up stop sound");
4220 motorsound_play =
true;
4225 Report(
"playing motor down stop sound");
4228 motorsound_play =
true;
4234 if (motorsound_play ==
true)
4260 Report(
"[playing counterweight stop sound");
4276 for (
size_t i = 0; i <
Cars.size(); i++)
4278 Cars[i]->PlayMovingSounds();
4287 Report(
"playing motor up run sound");
4296 Report(
"playing motor down run sound");
4310 Report(
"playing counterweight move sound");
4367 std::vector<Floor*> list;
4369 for (
size_t i = 0; i <
Cars.size(); i++)
4371 for (
size_t j = 0; j <
Cars[i]->GetServicedFloorCount(); j++)
4373 int num =
Cars[i]->GetServicedFloor(j);
4379 if (type ==
"lobby" || type ==
"skylobby")
4380 list.emplace_back(floor);
4406 for (
size_t i = 0; i <
Cars.size(); i++)
4408 Control *control =
Cars[i]->GetFloorButton(floor);
4428 if ((direction == 1 &&
UpQueue.empty()) ||
4456 if (skip_current_floor ==
false)
4468 int number = (int)
Cars.size() + 1;
4470 Cars.emplace_back(car);
4476 if (number < 0 || number >(
int)
Cars.size())
4482 return Cars[number - 1];
4487 return (
int)
Cars.size();
4493 for (
size_t i = 0; i <
Cars.size(); i++)
4507 for (
size_t i = 0; i <
Cars.size(); i++)
4520 for (
size_t i = 0; i <
Cars.size(); i++)
4532 for (
size_t i = 0; i <
Cars.size(); i++)
4545 for (
size_t i = 0; i <
Cars.size(); i++)
4557 for (
size_t i = 0; i <
Cars.size(); i++)
4569 for (
size_t i = 0; i <
Cars.size(); i++)
4581 for (
size_t i = 0; i <
Cars.size(); i++)
4595 bool result =
false;
4602 if (result ==
false)
4615 for (
size_t i = 0; i <
Cars.size(); i++)
4617 Cars[i]->StopCarSound();
4626 for (
size_t i = 0; i <
Cars.size(); i++)
4628 Cars[i]->ChangeLight(floor, value);
4636 for (
size_t i = 0; i <
Cars.size(); i++)
4638 Cars[i]->ResetLights();
4650 for (
size_t i = 0; i <
Cars.size(); i++)
4652 Cars[i]->OpenDoors();
4664 for (
size_t i = 0; i <
Cars.size(); i++)
4666 Cars[i]->CloseDoors();
4674 for (
size_t i = 0; i <
Cars.size(); i++)
4696 for (
size_t i = 0; i <
Cars.size(); i++)
4728 for (
size_t i = 0; i <
Cars.size(); i++)
4730 Cars[i]->ResetDoors();
4737 for (
size_t i = 0; i <
Cars.size(); i++)
4739 Cars[i]->ResetNudgeTimer(start);
4751 for (
size_t i = 0; i <
Cars.size(); i++)
4753 Cars[i]->HoldDoors();
4761 for (
size_t i = 0; i <
Cars.size(); i++)
4763 Cars[i]->SetDirectionalIndicators(
Cars[i]->CurrentFloor,
false,
false);
4775 for (
size_t i = 0; i <
Cars.size(); i++)
4777 Cars[i]->EnableNudgeMode(value);
4843 return ReportError(
"SetHoistwayAccess: Elevator not running");
4846 return ReportError(
"SetHoistwayAccess: Not in inspection service mode");
4856 Report(
"Hoistway Access set to Off for floor " +
ToString(floor));
4870 return ReportError(
"SetHoistwayAccess: no car found that services floor " +
ToString(floor));
4873 return ReportError(
"Shaft doors need to be open on floor " +
ToString(floor) +
" to enable Hoistway Access");
4879 std::string direction =
"Down";
4882 Report(
"Hoistway Access set to " + direction +
" for floor " +
ToString(floor));
4909 for (
size_t i = 0; i <
Cars.size(); i++)
4911 Cars[i]->SetControls(action_name);
4933 Report(
"Elevator active on current floor - opening");
4953 if (direction == -1)
5014 bool result =
false;
5042 Report(
"Enabling malfunctions");
5047 Report(
"Disabling malfunctions");
5066 for (
size_t i = 0; i <
Cars.size(); i++)
5071 Cars[i]->Fan =
false;
bool MovePosition(Vector3 vector, Real speed=1.0)
bool AddElevator(int elevator)
bool GetCallStatus(int elevator, int floor, bool &up, bool &down)
void ResetArrival(int number)
void ElevatorArrived(int number, int floor, bool direction)
void ResetNudgeTimer(bool start=true, int number=0)
void ChangeLight(int floor, bool value)
void HoldDoors(int number=0, bool sensor=false)
Real GetDestinationOffset(int floor)
bool IsOnFloor(int floor, bool leveled=true)
bool OpenDoors(int number=0, int whichdoors=1, int floor=0, bool manual=false, bool hold=false)
int GetNearestServicedFloor()
Real GetDestinationAltitude(int floor)
void NotifyArrival(int floor, bool early=false, int direction=0)
bool IsServicedFloor(int floor, bool report=true)
bool RespondingToCall(int floor, int direction)
void Chime(int number, int floor, bool direction, bool early=false)
int AreDoorsMoving(int number=0, bool car_doors=true, bool shaft_doors=true)
bool AreShaftDoorsOpen(int number, int floor)
void CloseDoors(int number=0, int whichdoors=1, int floor=0, bool manual=false, bool hold=false)
Timer(const std::string &name, Elevator *parent, int Type)
bool CreateElevator(bool relative, Real x, Real z, int floor)
int AvailableForCall(bool destination, int floor, int direction, bool report_on_failure=true)
bool EnableACP(bool value)
Real GetStoppingDistance()
bool AreShaftDoorsClosed(bool skip_current_floor=false)
bool GetCallStatus(int floor, bool &up, bool &down)
bool BeyondDecelMarker(int direction, Real destination)
void HandleDequeue(int direction, bool stop_if_empty=true)
void EnableNudgeMode(bool value)
void ChangeLight(int floor, bool value)
std::string MotorUpRunSound
bool AreDoorsClosing(bool car_doors=true, bool shaft_doors=true)
void ResetNudgeTimers(bool start=true)
void Report(const std::string &message)
std::string CounterweightStopSound
int GetFloorForCar(int car, int number)
std::string MotorEmergencyStopSound
std::string FloorSkipText
bool EnableFireService1(int value)
bool GetArrivalDirection(int floor)
bool EnableIndependentService(bool value, int car_number=0)
bool SetDownButton(bool value)
bool SetUpButton(bool value)
std::string GetFloorSkipText()
DynamicMesh * DoorContainer
void CancelHallCall(int floor, int direction)
int GetActiveRecallFloor()
bool EnableUpPeak(bool value)
void SetFloorSkipText(const std::string &id)
std::string MotorDownStartSound
int QueuePositionDirection
int GetEmergencyStopStatus()
bool IsQueued(int floor, int queue=0)
std::vector< QueueEntry > UpQueue
bool GetDestinationDispatch()
ElevatorCar * GetCar(int number)
void MoveElevatorToFloor()
void SetControls(const std::string &action_name)
bool AddRoute(int floor, int direction, int call_type)
bool SetRecallFloor(int floor)
std::vector< Floor * > GetLobbies()
void EnableMalfunctions(bool value)
void ResetShaftDoors(int floor)
bool EnableDownPeak(bool value)
bool SelectFloor(int floor)
std::string MotorDownRunSound
void ResetQueue(bool up, bool down, bool stop_if_empty=true)
bool ReturnToNearestFloor(bool parking=true, int car=1)
Timer * malfunction_timer
bool Stop(bool emergency=false)
void NotifyArrival(bool early=false)
void SetRunState(bool value)
Elevator(Object *parent, int number)
void RemoveController(int controller)
bool Go(int floor, bool hold=false)
void UpdateFloorIndicators()
void ProcessGotoFloor(int floor, int direction)
std::vector< ElevatorCar * > Cars
void RemoveCar(ElevatorCar *car)
bool CheckInterlocks(bool skip_current_floor=false)
Wall * CreateCounterweight(const std::string &frame_texture, const std::string &weight_texture, Real x, Real z, const Vector3 &size, Real weight_voffset)
ElevatorCar * GetCarForFloor(int number, bool report_on_failure=false)
bool EnableInspectionService(bool value)
void SameFloorArrival(int floor, int direction)
bool AreDoorsOpening(bool car_doors=true, bool shaft_doors=true)
bool SetACPFloor(int floor)
bool ReturnToBottomFloor()
CallStation * GetPrimaryCallStation()
bool RouteExists(bool direction, int floor)
std::string MotorUpStopSound
bool CalculateStoppingDistance
void MoveObjects(Real offset)
void PlayStoppingSounds(bool emergency=false)
Real GetCarOffset(int number)
std::queue< std::string > ControlQueue
std::string MotorIdleSound
bool SetHoistwayAccess(int floor, int access)
std::string MotorUpStartSound
bool Check(Vector3 position)
int AreDoorsMoving(bool car_doors=true, bool shaft_doors=true)
std::vector< QueueEntry > DownQueue
void UpdateDirectionalIndicators()
int GetActiveCallDirection()
int IndependentServiceCar
bool IsServicedFloor(int floor, bool report=true)
bool ReportError(const std::string &message)
Sound * counterweightsound
bool SetAlternateRecallFloor(int floor)
Real GetDestinationAltitude(int floor)
std::string MotorDownStopSound
bool DeleteRoute(int floor, int direction)
std::string CounterweightStartSound
ElevatorCar * IsInElevator(const Vector3 &position, bool camera=false)
bool EnableFireService2(int value, int car_number=0, bool force=false)
Real GetDestinationOffset(int floor)
std::vector< int > Controllers
bool SetGoButton(bool value)
bool AddRails(const std::string &main_texture, const std::string &edge_texture, Real x, Real z, bool orientation, Real rail_distance, Real rail_width)
MeshObject * WeightRopeMesh
void AddController(int controller)
void DirectionalIndicatorsOff()
void PlayStartingSounds()
std::string CounterweightMoveSound
void UpdateDirectionalIndicators(int elevator)
void UpdateFloorIndicators(int elevator)
Real GetBase(bool relative=false)
void EnableGroup(bool value)
CallStation * GetCallStationForElevator(int elevator)
void ChangeHeight(Real newheight)
const std::string & GetName()
virtual bool ReportError(const std::string &message)
virtual void Report(const std::string &message)
void SetName(const std::string &name)
virtual void Move(const Vector3 &vector, Real speed=1.0)
virtual void SetPositionY(Real value)
virtual Vector3 GetPosition(bool relative=false)
SceneNode * GetSceneNode()
void SetValues(const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true)
void EnableLoop(bool value)
virtual void SetPosition(const Vector3 &position)
Shaft * GetShaft(int number)
void EnableBuildings(bool value)
std::string GetConfigString(const std::string &key, const std::string &default_value)
void RemoveElevator(Elevator *elevator)
Real GetConfigFloat(const std::string &key, Real default_value)
DispatchController * GetController(int number)
Floor * GetFloor(int number)
TextureManager * GetTextureManager()
void EnableLandscape(bool value)
Wall * CreateWallBox2(MeshObject *mesh, const std::string &name, const std::string &texture, Real CenterX, Real CenterZ, Real WidthX, Real LengthZ, Real height_in, Real voffset, Real tw, Real th, bool inside=true, bool outside=true, bool top=true, bool bottom=true, bool autosize=true)
void EnableSkybox(bool value)
int GetFloorNumber(Real altitude, int lastfloor=0, bool checklastfloor=false)
bool GetConfigBool(const std::string &key, bool default_value)
Wall * AddWall(MeshObject *mesh, const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real height_in1, Real height_in2, Real altitude1, Real altitude2, Real tw, Real th)
int GetConfigInt(const std::string &key, int default_value)
void EnableExternal(bool value)
Wall * CreateWallBox(MeshObject *mesh, const std::string &name, const std::string &texture, Real x1, Real x2, Real z1, Real z2, Real height_in, Real voffset, Real tw, Real th, bool inside=true, bool outside=true, bool top=true, bool bottom=true, bool autosize=true)
MeshObject * GetMeshObject()
void AddElevator(int number)
void EnableRange(int floor, int range, bool value, bool EnableShaftDoors)
Level * GetLevel(int floor)
bool Load(const std::string &filename, bool force=false)
bool Play(bool reset=true)
void SetLoopState(bool value)
void SetPlayPosition(Real percent)
void SetAutoSize(bool x, bool y)
void GetAutoSize(bool &x, bool &y)
void Start(int milliseconds=-1, bool oneshot=false)
std::string TruncateNumber(float value, int decimals)
std::string ToString(int number)
std::string SetCaseCopy(std::string string, bool uppercase)
void TrimString(std::string &string)
#define SBS_PROFILE(name)