187 for (
size_t i = 0; i <
ModelArray.size(); i++)
198 for (
size_t i = 0; i <
PrimArray.size(); i++)
220 for (
size_t i = 0; i <
lights.size(); i++)
224 lights[i]->parent_deleting =
true;
232 parent->
Report(
"deleting interior directional indicators");
250 for (
size_t i = 0; i <
DoorArray.size(); i++)
279 for (
size_t i = 0; i <
PanelArray.size(); i++)
354 for (
size_t i = 0; i <
sounds.size(); i++)
392 return ReportError(
"Elevator has not been created yet");
443 Report(
"creating sound objects");
486Wall*
ElevatorCar::AddWall(
const std::string &name,
const std::string &texture,
Real thickness,
Real x1,
Real z1,
Real x2,
Real z2,
Real height1,
Real height2,
Real voffset1,
Real voffset2,
Real tw,
Real th)
491 sbs->
AddWallMain(wall, name, texture, thickness, x1, z1, x2, z2, height1, height2, voffset1, voffset2, tw, th,
true);
495Wall*
ElevatorCar::AddFloor(
const std::string &name,
const std::string &texture,
Real thickness,
Real x1,
Real z1,
Real x2,
Real z2,
Real voffset1,
Real voffset2,
bool reverse_axis,
bool texture_direction,
Real tw,
Real th,
bool legacy_behavior)
500 sbs->
AddFloorMain(wall, name, texture, thickness, x1, z1, x2, z2, voffset1, voffset2, reverse_axis, texture_direction, tw, th,
true, legacy_behavior);
508 FloorIndicator*
indicator =
new FloorIndicator(
this,
FloorIndicatorArray.size(),
parent->
Number,
Number, texture_prefix, blank_texture, direction, CenterX, CenterZ, width, height, voffset);
513ButtonPanel*
ElevatorCar::CreateButtonPanel(
const std::string &texture,
int rows,
int columns,
const std::string &direction,
Real CenterX,
Real CenterZ,
Real buttonwidth,
Real buttonheight,
Real spacingX,
Real spacingY,
Real voffset,
Real tw,
Real th)
522 ButtonPanel* panel =
new ButtonPanel(
this, index + 1, texture, rows, columns, direction, CenterX, CenterZ, buttonwidth, buttonheight, spacingX, spacingY, voffset, tw, th);
573 if (
Created ==
true && create_shaft_door ==
true)
575 for (
size_t i = 0; i <
DoorArray.size(); i++)
602 if (
Created ==
true && remove_shaft_door ==
true)
604 for (
size_t i = 0; i <
DoorArray.size(); i++)
606 DoorArray[i]->RemoveServicedFloor(number);
667 return ReportError(
"Floor " + num +
" not valid for shaft " + snum);
762 Report(
"playing car idle sound");
776 Report(
"stopping car idle sound");
782 Report(
"stopping car idle sound");
900 for (
size_t i = 0; i <
lights.size(); i++)
907 Report(
"enabling lights");
917 Report(
"disabling lights");
918 lights[i]->Enabled(
false);
959 for (
size_t i = 0; i <
DoorArray.size(); i++)
1017 Report(
"enabling objects");
1019 Report(
"disabling objects");
1047 for (
size_t i = 0; i <
ModelArray.size(); i++)
1054 for (
size_t i = 0; i <
PanelArray.size(); i++)
1058 for (
size_t i = 0; i <
PrimArray.size(); i++)
1072 for (
size_t i = 0; i <
sounds.size(); i++)
1076 if (
sounds[i]->GetLoopState() ==
true)
1122void ElevatorCar::AddDirectionalIndicators(
bool relative,
bool active_direction,
bool single,
bool vertical,
const std::string &BackTexture,
const std::string &uptexture,
const std::string &uptexture_lit,
const std::string &downtexture,
const std::string &downtexture_lit,
Real CenterX,
Real CenterZ,
Real voffset,
const std::string &direction,
Real BackWidth,
Real BackHeight,
bool ShowBack,
Real tw,
Real th)
1127 Report(
"adding directional indicators");
1132 sbs->
GetFloor(
ServicedFloors[i])->
AddDirectionalIndicator(
parent->
Number,
Number, relative, active_direction, single, vertical, BackTexture, uptexture, uptexture_lit, downtexture, downtexture_lit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight, ShowBack, tw, th);
1136DirectionalIndicator*
ElevatorCar::AddDirectionalIndicator(
bool active_direction,
bool single,
bool vertical,
const std::string &BackTexture,
const std::string &uptexture,
const std::string &uptexture_lit,
const std::string &downtexture,
const std::string &downtexture_lit,
Real CenterX,
Real CenterZ,
Real voffset,
const std::string &direction,
Real BackWidth,
Real BackHeight,
bool ShowBack,
Real tw,
Real th)
1141 Report(
"adding interior directional indicator");
1143 DirectionalIndicator *
indicator =
new DirectionalIndicator(
this,
parent->
Number,
Number, 0, active_direction, single, vertical, BackTexture, uptexture, uptexture_lit, downtexture, downtexture_lit, CenterX, CenterZ, voffset, direction, BackWidth, BackHeight, ShowBack, tw, th);
1164 if (
indicator->ActiveDirection ==
false)
1213 Report(
"enabling interior directional indicators");
1215 Report(
"disabling interior directional indicators");
1233 if (number > 0 && number <= (
int)
DoorArray.size())
1256 return OpenDoors(number, whichdoors, floor,
true, hold);
1270 CloseDoors(number, whichdoors, floor,
true, hold);
1302 int start = number, end = number;
1329 for (
int i = start; i <= end; i++)
1341 bool closedstate =
false;
1343 for (
int i = start; i <= end; i++)
1358 for (
int i = start; i <= end; i++)
1363 if (closedstate ==
true)
1391 for (
int i = start; i <= end; i++)
1433 int start = number, end = number;
1441 for (
int i = start; i <= end; i++)
1460 bool openstate =
false;
1461 for (
int i = start; i <= end; i++)
1476 if (openstate ==
true)
1478 for (
int i = start; i <= end; i++)
1504 int start = number, end = number;
1510 for (
int i = start; i <= end; i++)
1519DoorWrapper*
ElevatorCar::AddDoors(
int number,
const std::string &lefttexture,
const std::string &righttexture,
Real thickness,
Real CenterX,
Real CenterZ,
Real width,
Real height,
bool direction,
Real tw,
Real th)
1525 return GetDoor(number)->
AddDoors(lefttexture, righttexture, thickness, CenterX, CenterZ, width, height, direction, tw, th);
1538 Report(
"Adding shaft doors...");
1539 return GetDoor(number)->
AddShaftDoors(lefttexture, righttexture, thickness, CenterX, CenterZ, voffset, tw, th);
1563 return GetDoor(number)->
AddShaftDoor(floor, lefttexture, righttexture, thickness, CenterX, CenterZ, voffset, tw, th);
1574 int start = number, end = number;
1580 for (
int i = start; i <= end; i++)
1598 int start = number, end = number;
1604 for (
int i = start; i <= end; i++)
1620 int start = number, end = number;
1626 for (
int i = start; i <= end; i++)
1646 int start = number, end = number;
1652 for (
int i = start; i <= end; i++)
1670 for (
size_t i = 0; i <
DoorArray.size(); i++)
1691 int start = number, end = number;
1697 for (
int i = start; i <= end; i++)
1703 door->
Chime(floor, direction);
1710 if (direction ==
true)
1724 int start = number, end = number;
1730 for (
int i = start; i <= end; i++)
1734 door->
Reset(sensor);
1744 int start = number, end = number;
1750 for (
int i = start; i <= end; i++)
1769 int start = number, end = number;
1775 for (
int i = start; i <= end; i++)
1815 Report(
"enabling doors");
1817 Report(
"disabling doors");
1820 for (
int i = 1; i <=
NumDoors; i++)
1832 int start = number, end = number;
1838 for (
int i = start; i <= end; i++)
1853 if (relative ==
true)
1865 if (door_number != 0)
1871 bool autosize_x, autosize_y;
1877 bool door_result =
false;
1881 if (door_number != 0)
1884 if ((door_number == 0 || door_result ==
true) &&
sbs->
GetFloor(floor))
1886 std::string texture = texture_prefix +
sbs->
GetFloor(floor)->
ID;
1887 std::string tmpdirection = direction;
1890 if (tmpdirection ==
"front" || tmpdirection ==
"left")
1891 sbs->
DrawWalls(
true,
false,
false,
false,
false,
false);
1893 sbs->
DrawWalls(
false,
true,
false,
false,
false,
false);
1895 if (tmpdirection ==
"front" || tmpdirection ==
"back")
1896 sbs->
GetFloor(floor)->
AddWall(
"Floor Sign", texture, 0, x - (width / 2), z, x + (width / 2), z, height, height, base + voffset, base + voffset, 1, 1,
false);
1898 sbs->
GetFloor(floor)->
AddWall(
"Floor Sign", texture, 0, x, z - (width / 2), x, z + (width / 2), height, height, base + voffset, base + voffset, 1, 1,
false);
1911 int start = number, end = number;
1917 for (
int i = start; i <= end; i++)
1929 int start = number, end = number;
1935 for (
int i = start; i <= end; i++)
1947Sound*
ElevatorCar::AddSound(
const std::string &name,
const std::string &filename,
Vector3 position,
bool loop,
Real volume,
int speed,
Real min_distance,
Real max_distance,
Real doppler_level,
Real cone_inside_angle,
Real cone_outside_angle,
Real cone_outside_volume,
Vector3 direction)
1951 sounds.emplace_back(sound);
1954 sound->
Move(position);
1961 sound->
SetConeSettings(cone_inside_angle, cone_outside_angle, cone_outside_volume);
1962 sound->
Load(filename);
1974 Report(
"turning off button lights");
1976 for (
size_t i = 0; i <
PanelArray.size(); i++)
1992 Report(
"turning off button lights for floor " +
ToString(floor));
1995 for (
size_t i = 0; i <
PanelArray.size(); i++)
1999DoorWrapper*
ElevatorCar::AddDoorComponent(
int number,
const std::string &name,
const std::string &texture,
const std::string &sidetexture,
Real thickness,
const std::string &direction,
Real OpenSpeed,
Real CloseSpeed,
Real x1,
Real z1,
Real x2,
Real z2,
Real height,
Real voffset,
Real tw,
Real th,
Real side_tw,
Real side_th)
2004 return GetDoor(number)->
AddDoorComponent(name, texture, sidetexture, thickness, direction, OpenSpeed, CloseSpeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw, side_th);
2010DoorWrapper*
ElevatorCar::AddShaftDoorComponent(
int number,
int floor,
const std::string &name,
const std::string &texture,
const std::string &sidetexture,
Real thickness,
const std::string &direction,
Real OpenSpeed,
Real CloseSpeed,
Real x1,
Real z1,
Real x2,
Real z2,
Real height,
Real voffset,
Real tw,
Real th,
Real side_tw,
Real side_th)
2015 return GetDoor(number)->
AddShaftDoorComponent(floor, name, texture, sidetexture, thickness, direction, OpenSpeed, CloseSpeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw, side_th);
2020void ElevatorCar::AddShaftDoorsComponent(
int number,
const std::string &name,
const std::string &texture,
const std::string &sidetexture,
Real thickness,
const std::string &direction,
Real OpenSpeed,
Real CloseSpeed,
Real x1,
Real z1,
Real x2,
Real z2,
Real height,
Real voffset,
Real tw,
Real th,
Real side_tw,
Real side_th)
2026 Report(
"Adding shaft doors component...");
2027 GetDoor(number)->
AddShaftDoorsComponent(name, texture, sidetexture, thickness, direction, OpenSpeed, CloseSpeed, x1, z1, x2, z2, height, voffset, tw, th, side_tw, side_th);
2069 if (index > (
int)
PanelArray.size() || index < 1)
2087 for (
size_t i = 0; i <
PanelArray.size(); i++)
2101 int start = number, end = number;
2107 for (
int i = start; i <= end; i++)
2116Door*
ElevatorCar::AddDoor(std::string name,
const std::string &open_sound,
const std::string &close_sound,
bool open_state,
const std::string &texture,
const std::string &side_texture,
Real thickness,
const std::string &face_direction,
const std::string &open_direction,
bool rotate,
Real open_speed,
Real close_speed,
Real CenterX,
Real CenterZ,
Real width,
Real height,
Real voffset,
Real tw,
Real th,
Real side_tw,
Real side_th)
2146 name =
"Door " + number;
2148 Door* door =
new Door(
this, 0, name, open_sound, close_sound, rotate);
2149 door->
CreateDoor(open_state, texture, side_texture, thickness, face_direction, open_direction, open_speed, close_speed, CenterX, CenterZ, width, height, voffset, tw, th, side_tw, side_th);
2161 name =
"Door " + number;
2163 Door* door =
new Door(
this, 0, name, open_sound, close_sound, rotate);
2193 for (
size_t i = 0; i <
PanelArray.size(); i++)
2219 for (
size_t i = 0; i <
DoorArray.size(); i++)
2263 for (
size_t i = 0; i <
sounds.size(); i++)
2276 for (
size_t i = 0; i <
lights.size(); i++)
2289 for (
size_t i = 0; i <
ModelArray.size(); i++)
2302 for (
size_t i = 0; i <
PrimArray.size(); i++)
2355 int start = number, end = number;
2361 for (
int i = start; i <= end; i++)
2384 int start = number, end = number;
2390 for (
int i = start; i <= end; i++)
2404 int start2 = number, end = number;
2410 for (
int i = start2; i <= end; i++)
2427 lights.emplace_back(light);
2434 for (
size_t i = 0; i <
lights.size(); i++)
2442Model*
ElevatorCar::AddModel(
const std::string &name,
const std::string &filename,
bool center,
Vector3 position,
Vector3 rotation,
Real max_render_distance,
Real scale_multiplier,
bool enable_physics,
Real restitution,
Real friction,
Real mass)
2445 Model* model =
new Model(
this, name, filename, center, position, rotation, max_render_distance, scale_multiplier, enable_physics, restitution, friction, mass);
2462 for (
size_t i = 0; i <
ModelArray.size(); i++)
2486 for (
size_t i = 0; i <
PrimArray.size(); i++)
2562Control*
ElevatorCar::AddControl(
const std::string &name,
const std::string &sound,
const std::string &direction,
Real CenterX,
Real CenterZ,
Real width,
Real height,
Real voffset,
int selection_position, std::vector<std::string> &action_names, std::vector<std::string> &textures)
2565 std::vector<Action*> actionnull;
2566 Control* control =
new Control(
this, name,
false, sound, action_names, actionnull, textures, direction, width, height,
true, selection_position);
2567 control->
Move(
Vector3(CenterX, voffset, CenterZ));
2575 Trigger* trigger =
new Trigger(
this, name,
false, sound_file, area_min, area_max, action_names);
2589 std::string findname = name;
2591 std::vector<Sound*> soundlist;
2592 for (
size_t i = 0; i <
sounds.size(); i++)
2596 std::string name2 =
sounds[i]->GetName();
2598 if (findname == name2)
2599 soundlist.emplace_back(
sounds[i]);
2609 int start = number, end = number;
2615 for (
int i = start; i <= end; i++)
2638 int start = number, end = number;
2644 for (
int i = start; i <= end; i++)
2658 int start = number, end = number;
2664 for (
int i = start; i <= end; i++)
2687 int start = number, end = number;
2693 for (
int i = start; i <= end; i++)
2709 for (
size_t i = 0; i <
ModelArray.size(); i++)
2724 for (
size_t i = 0; i <
PrimArray.size(); i++)
2752 Report(
"setting beep sound");
2762 Report(
"setting floor sound");
2775 if (direction ==
true)
2778 Report(
"setting up message sound");
2785 Report(
"setting down message sound");
2793 if (direction ==
true)
2796 Report(
"setting open message sound");
2803 Report(
"setting close message sound");
2823 Report(
"playing floor beep sound");
2848 Report(
"playing floor sound");
2874 std::string newsound;
2909 Report(
"playing up message sound");
2919 Report(
"playing down message sound");
2938 Report(
"playing open message sound");
2948 Report(
"playing close message sound");
2973 Report(
"playing car up start sound");
2982 Report(
"playing car down start sound");
2998 if (emergency ==
true)
3003 Report(
"playing car emergency stop sound");
3015 Report(
"playing car up stop sound");
3023 Report(
"playing car down stop sound");
3061 Report(
"playing car up movement sound");
3070 Report(
"playing car down movement sound");
3113 bool result =
false;
3126 if (position.y >= (ypos - 0.1) && position.y < ypos + (
Height * 2))
3137 else if (camera ==
true)
3140 if (position.y < ypos +
Height)
3149 else if (camera ==
true)
3170 if (
InCar() ==
false)
3184 else if (
InCar() ==
true)
3258 bool firstrun =
true;
3260 Real nearest_difference = 0;
3264 if (firstrun ==
true)
3278 if (difference < nearest_difference)
3281 nearest_difference = difference;
3300 for (
size_t i = 0; i <
DoorArray.size(); i++)
3306 if (altitude > result || found ==
false)
3344 if (move_parent ==
true)
3361 Real tolerance = 0.005;
3382 if (leveled ==
false)
3404 bool up =
true, down =
true;
3417 bool new_direction =
false;
3424 new_direction =
true;
3426 new_direction =
false;
3440 new_direction =
true;
3442 new_direction =
false;
3447 if (new_direction ==
true)
3451 Chime(0, floor,
true, early);
3460 Chime(0, floor,
false, early);
3503 for (
size_t i = 0; i <
PanelArray.size(); i++)
3526 return cameratexture;
3581 indicator =
new Indicator(
this, sound, texture_prefix, blank_texture, direction, CenterX, CenterZ, width, height, voffset, timer_duration);
3595 std::string message =
"Requested";
3629 if (text.length() != 1)
3646 if ((StarCount > 1 || MinCount > 1) &&
InputCache.length() > 1)
3728 int rawfloor =
ToInt(floor);
3731 std::string converted =
ToString(rawfloor);
3739 result = floorobj->
Number;
3744 result = floorobj2->
Number;
3768 std::string message =
"XX";
3783 if (relative ==
true)
3795 if (door_number != 0)
3798 return ReportError(
"AddElevatorIDSigns: door " +
ToString(door_number) +
" does not exist");
3801 bool autosize_x, autosize_y;
3807 bool door_result =
false;
3811 if (door_number != 0)
3814 if ((door_number == 0 || door_result ==
true) &&
sbs->
GetFloor(floor))
3816 std::string texture = texture_prefix + e->
ID;
3817 std::string tmpdirection = direction;
3820 if (tmpdirection ==
"front" || tmpdirection ==
"left")
3821 sbs->
DrawWalls(
true,
false,
false,
false,
false,
false);
3823 sbs->
DrawWalls(
false,
true,
false,
false,
false,
false);
3825 if (tmpdirection ==
"front" || tmpdirection ==
"back")
3826 sbs->
GetFloor(floor)->
AddWall(
"Elevator ID Sign", texture, 0, x - (width / 2), z, x + (width / 2), z, height, height, base + voffset, base + voffset, 1, 1,
false);
3828 sbs->
GetFloor(floor)->
AddWall(
"Elevator ID Sign", texture, 0, x, z - (width / 2), x, z + (width / 2), height, height, base + voffset, base + voffset, 1, 1,
false);
3842 reverb =
new Reverb(
this, name, type, position, min_distance, max_distance,
false);
DoorWrapper * CreateDoor(bool open_state, const std::string &texture, const std::string &side_texture, Real thickness, const std::string &face_direction, const std::string &open_direction, Real open_speed, Real close_speed, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th)
void Enabled(bool value, MeshObject *client=0)
KeypadTimer(const std::string &name, ElevatorCar *parent)
bool ReportError(const std::string &message)
void ResetNudgeTimer(bool start=true, int number=0)
void StopDoors(int number=0)
ElevatorDoor * lastdoor_result
Door * AddDoor(std::string name, const std::string &open_sound, const std::string &close_sound, bool open_state, const std::string &texture, const std::string &side_texture, Real thickness, const std::string &face_direction, const std::string &open_direction, bool rotate, Real open_speed, Real close_speed, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th)
FloorIndicator * AddFloorIndicator(const std::string &texture_prefix, const std::string &blank_texture, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real voffset)
int GetServicedFloorCount()
void RemoveCameraTexture(CameraTexture *camtex)
bool AddShaftDoors(int number, const std::string &lefttexture, const std::string &righttexture, Real thickness, Real CenterX, Real CenterZ, Real voffset, Real tw, Real th)
bool OpenDoorsEmergency(int number=0, int whichdoors=1, int floor=0, bool hold=false)
void EnableDoors(bool value)
void ChangeLight(int floor, bool value)
bool FinishShaftDoors(int number, bool DoorWalls=true, bool TrackWalls=true)
void DumpServicedFloors()
void HoldDoors(int number=0, bool sensor=false)
std::string DownMoveSound
void RemovePrimitive(Primitive *prim)
void ShaftDoorsEnabled(int number, int floor, bool value)
bool AddFloorSigns(int door_number, bool relative, const std::string &texture_prefix, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real voffset)
void SetDirectionalIndicators(int floor, bool UpLight, bool DownLight)
void SetFloor(int floor, bool move_parent=true)
bool DoorExists(int number)
void SetMessageSound(bool type, bool direction, const std::string &filename)
std::string GetFloorDisplay()
void RemovePanel(ButtonPanel *panel)
std::vector< CameraTexture * > CameraTextureArray
Real GetDestinationOffset(int floor)
std::vector< Sound * > GetSound(const std::string &name)
bool GetSensorStatus(int number=0)
void CloseDoorsEmergency(int number=0, int whichdoors=1, int floor=0, bool hold=false)
std::vector< Door * > StdDoorArray
void RemoveServicedFloor(int number, bool remove_shaft_door=true)
Control * GetFloorButton(int floor)
bool PlayMessageSound(bool type)
Wall * AddWall(const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real height1, Real height2, Real voffset1, Real voffset2, Real tw, Real th)
bool IsOnFloor(int floor, bool leveled=true)
bool OpenDoors(int number=0, int whichdoors=1, int floor=0, bool manual=false, bool hold=false)
ElevatorCar(Elevator *parent, int number)
Door * CreateDoor(std::string name, const std::string &open_sound, const std::string &close_sound, bool rotate)
int GetNearestServicedFloor()
std::vector< int > DisplayFloors
void RemoveLight(Light *light)
ButtonPanel * CreateButtonPanel(const std::string &texture, int rows, int columns, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, Real spacingX, Real spacingY, Real tw, Real th)
void KeypadError(bool type=0)
bool IsInCar(const Vector3 &position, bool camera=false)
Wall * AddFloor(const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real voffset1, Real voffset2, bool reverse_axis, bool texture_direction, Real tw, Real th, bool legacy_behavior=false)
void PlayStoppingSounds(bool emergency=false)
bool IndependentServiceOnOtherCar()
void EnableNudgeMode(bool value, int number=0)
void UpdateKeypadIndicator(const std::string &text, bool play_sound=true)
bool ShaftDoorsExist(int number, int floor, bool include_nonserviced=false)
bool Check(Vector3 &position)
std::vector< int > ServicedFloors
bool UseDoorMessageSounds
Indicator * AddKeypadIndicator(const std::string &sound, const std::string &texture_prefix, const std::string &blank_texture, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, Real timer_duration)
void AddDirectionalIndicators(bool relative, bool active_direction, bool single, bool vertical, const std::string &BackTexture, const std::string &uptexture, const std::string &uptexture_lit, const std::string &downtexture, const std::string &downtexture_lit, Real CenterX, Real CenterZ, Real voffset, const std::string &direction, Real BackWidth, Real BackHeight, bool ShowBack, Real tw, Real th)
bool AreDoorsClosing(int number=0, bool car_doors=true, bool shaft_doors=true)
void ResetDoorState(int number=0)
bool CreateCar(int floor)
std::string OpenMessageSound
void RemoveFloorIndicator(FloorIndicator *indicator)
std::vector< Primitive * > PrimArray
void EnableObjects(bool value)
std::string CloseMessageSound
void SetControls(const std::string &action_name)
void AddDisplayFloor(int floor)
void PlayStartingSounds()
std::vector< Light * > lights
void RemoveSound(Sound *sound)
ButtonPanel * GetPanel(int index)
bool FirePhase2OnOtherCar()
Primitive * GetPrimitive(std::string name)
bool AddElevatorIDSigns(int door_number, bool relative, const std::string &texture_prefix, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real voffset)
bool GetHoldStatus(int number=0)
void RemoveTrigger(Trigger *trigger)
bool ReplaceTexture(const std::string &oldtexture, const std::string &newtexture)
bool GetFloorFromID(const std::string &floor, int &result)
std::vector< CustomObject * > CustomObjectArray
CustomObject * GetCustomObject(std::string name)
void ShaftDoorsEnabledRange(int number, int floor, int range)
bool Input(const std::string &text)
Model * GetModel(std::string name)
bool DoorsStopped(int number=0)
Real GetDestinationAltitude(int floor)
void NotifyArrival(int floor, bool early=false, int direction=0)
bool IsNudgeModeActive(int number=0)
bool AreDoorsOpen(int number=0)
bool IsServicedFloor(int floor, bool report=true)
void UpdateDirectionalIndicators()
std::vector< DirectionalIndicator * > DirIndicatorArray
Light * AddLight(const std::string &name, int type)
void RemoveModel(Model *model)
DirectionalIndicator * AddDirectionalIndicator(bool active_direction, bool single, bool vertical, const std::string &BackTexture, const std::string &uptexture, const std::string &uptexture_lit, const std::string &downtexture, const std::string &downtexture_lit, Real CenterX, Real CenterZ, Real voffset, const std::string &direction, Real BackWidth, Real BackHeight, bool ShowBack, Real tw, Real th)
int GetFloorIndex(int floor)
void Requested(int floor)
void SetFloorSound(const std::string &prefix)
Primitive * AddPrimitive(const std::string &name)
std::vector< Trigger * > TriggerArray
std::vector< std::string > InvalidInput
bool RespondingToCall(int floor, int direction)
Model * AddModel(const std::string &name, const std::string &filename, bool center, Vector3 position, Vector3 rotation, Real max_render_distance=0, Real scale_multiplier=1, bool enable_physics=false, Real restitution=0, Real friction=0, Real mass=0)
Sound * AddSound(const std::string &name, const std::string &filename, Vector3 position, bool loop=true, Real volume=1.0, int speed=100, Real min_distance=1.0, Real max_distance=-1.0, Real doppler_level=0.0, Real cone_inside_angle=360, Real cone_outside_angle=360, Real cone_outside_volume=1.0, Vector3 direction=Vector3(0, 0, 0))
void RemoveCustomObject(CustomObject *object)
DoorWrapper * AddDoors(int number, const std::string &lefttexture, const std::string &righttexture, Real thickness, Real CenterX, Real CenterZ, Real width, Real height, bool direction, Real tw, Real th)
bool CheckServicedFloors()
std::string EmergencyStopSound
bool AddServicedFloor(int number, bool create_shaft_door=true)
Control * AddControl(const std::string &name, const std::string &sound, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, int selection_position, std::vector< std::string > &action_names, std::vector< std::string > &textures)
void RemoveDoor(Door *door)
std::vector< Control * > ControlArray
std::vector< Sound * > sounds
void RemoveControl(Control *control)
std::string UpMessageSound
void Chime(int number, int floor, bool direction, bool early=false)
Door * GetStdDoor(int number)
bool AreShaftDoorsClosed(bool skip_current_floor=false)
void FlashIndicators(bool value)
bool AreDoorsOpening(int number=0, bool car_doors=true, bool shaft_doors=true)
DoorWrapper * FinishShaftDoor(int number, int floor, bool DoorWalls=true, bool TrackWalls=true)
void SetShaftDoors(int number, Real thickness, Real CenterX, Real CenterZ)
int AreDoorsMoving(int number=0, bool car_doors=true, bool shaft_doors=true)
bool AreShaftDoorsOpen(int number, int floor)
void AddShaftDoorsComponent(int number, const std::string &name, const std::string &texture, const std::string &sidetexture, Real thickness, const std::string &direction, Real OpenSpeed, Real CloseSpeed, Real x1, Real z1, Real x2, Real z2, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th)
bool IndependentServiceActive()
void UpdateFloorIndicators()
int GetServicedFloor(int index)
std::vector< ButtonPanel * > PanelArray
DoorWrapper * AddShaftDoor(int floor, int number, const std::string &lefttexture, const std::string &righttexture, Real tw, Real th)
Trigger * AddTrigger(const std::string &name, const std::string &sound_file, Vector3 &area_min, Vector3 &area_max, std::vector< std::string > &action_names)
std::vector< Model * > ModelArray
DoorWrapper * AddDoorComponent(int number, const std::string &name, const std::string &texture, const std::string &sidetexture, Real thickness, const std::string &direction, Real OpenSpeed, Real CloseSpeed, Real x1, Real z1, Real x2, Real z2, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th)
std::string AlarmSoundStop
void CloseDoors(int number=0, int whichdoors=1, int floor=0, bool manual=false, bool hold=false)
void Report(const std::string &message)
std::string DownMessageSound
std::string DownStopSound
KeypadTimer * keypad_timer
CustomObject * AddCustomObject(const std::string &name, const Vector3 &position, const Vector3 &rotation, Real max_render_distance=0, Real scale_multiplier=1)
Reverb * AddReverb(const std::string &name, const std::string &type, const Vector3 &position, Real min_distance, Real max_distance)
DoorWrapper * FinishDoors(int number, bool DoorWalls=true, bool TrackWalls=true)
std::string DownStartSound
void SetBeepSound(const std::string &filename)
CameraTexture * AddCameraTexture(const std::string &name, int quality, Real fov, const Vector3 &position, bool use_rotation, const Vector3 &rotation)
Light * GetLight(const std::string &name)
void EnableDirectionalIndicators(bool value)
void ResetDoors(int number=0, bool sensor=false)
std::vector< ElevatorDoor * > DoorArray
std::vector< FloorIndicator * > FloorIndicatorArray
void RemoveElevatorDoor(ElevatorDoor *door)
ElevatorDoor * GetDoor(int number)
DoorWrapper * AddShaftDoorComponent(int number, int floor, const std::string &name, const std::string &texture, const std::string &sidetexture, Real thickness, const std::string &direction, Real OpenSpeed, Real CloseSpeed, Real x1, Real z1, Real x2, Real z2, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th)
void EnableSensor(bool value, int number=0)
void RemoveDirectionalIndicator(DirectionalIndicator *indicator)
DoorComponent * AddDoorComponent(DoorWrapper *wrapper, const std::string &name, const std::string &meshname, const std::string &texture, const std::string &sidetexture, Real thickness, const std::string &direction, Real OpenSpeed, Real CloseSpeed, Real x1, Real z1, Real x2, Real z2, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th)
void ShaftDoorsEnabledRange(int floor, int range)
void EnableSensor(bool value, bool persistent=true)
DoorWrapper * AddShaftDoor(int floor, const std::string &lefttexture, const std::string &righttexture, Real tw, Real th)
bool FinishShaftDoors(bool DoorWalls=true, bool TrackWalls=true)
DoorWrapper * AddShaftDoorComponent(int floor, const std::string &name, const std::string &texture, const std::string &sidetexture, Real thickness, const std::string &direction, Real OpenSpeed, Real CloseSpeed, Real x1, Real z1, Real x2, Real z2, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th)
bool GetSensorStatus(bool persistent=true)
void ShaftDoorsEnabled(int floor, bool value)
bool AddShaftDoors(const std::string &lefttexture, const std::string &righttexture, Real thickness, Real CenterX, Real CenterZ, Real voffset, Real tw, Real th)
bool AreDoorsMoving(int doors=0, bool car_doors=true, bool shaft_doors=true)
void CloseDoors(int whichdoors=1, int floor=0, bool manual=false)
void Hold(bool sensor=false)
void SetShaftDoors(Real thickness, Real CenterX, Real CenterZ)
void ResetNudgeTimer(bool start=true)
DoorWrapper * FinishDoors(DoorWrapper *wrapper, int floor, bool ShaftDoor, bool DoorWalls=true, bool TrackWalls=true)
void Reset(bool sensor=false)
void AddShaftDoorsComponent(const std::string &name, const std::string &texture, const std::string &sidetexture, Real thickness, const std::string &direction, Real OpenSpeed, Real CloseSpeed, Real x1, Real z1, Real x2, Real z2, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th)
DoorWrapper * FinishShaftDoor(int floor, bool DoorWalls=true, bool TrackWalls=true)
void EnableNudgeMode(bool value)
void OpenDoors(int whichdoors=1, int floor=0, bool manual=false)
bool ShaftDoorsExist(int floor, bool include_nonserviced=false)
void Chime(int floor, bool direction)
void EarlyChime(int floor, bool direction)
bool AreShaftDoorsOpen(int floor)
DoorWrapper * AddDoors(const std::string &lefttexture, const std::string &righttexture, Real thickness, Real CenterX, Real CenterZ, Real width, Real height, bool direction, Real tw, Real th)
bool GetCallStatus(int floor, bool &up, bool &down)
void Report(const std::string &message)
std::string FloorSkipText
bool GetArrivalDirection(int floor)
DynamicMesh * DoorContainer
int QueuePositionDirection
std::vector< QueueEntry > UpQueue
bool GetDestinationDispatch()
ElevatorCar * GetCar(int number)
bool SelectFloor(int floor)
bool Stop(bool emergency=false)
void RemoveCar(ElevatorCar *car)
void MoveObjects(Real offset)
std::vector< QueueEntry > DownQueue
int GetActiveCallDirection()
int IndependentServiceCar
bool IsServicedFloor(int floor, bool report=true)
bool ReportError(const std::string &message)
Floor * GetByID(const std::string &id)
Floor * GetByNumberID(const std::string &id)
DirectionalIndicator * AddDirectionalIndicator(int elevator, int car, bool relative, bool active_direction, bool single, bool vertical, const std::string &BackTexture, const std::string &uptexture, const std::string &uptexture_lit, const std::string &downtexture, const std::string &downtexture_lit, Real CenterX, Real CenterZ, Real voffset, const std::string &direction, Real BackWidth, Real BackHeight, bool ShowBack, Real tw, Real th)
Real GetBase(bool relative=false)
void SetDirectionalIndicators(int elevator, int car, bool UpLight, bool DownLight)
Wall * AddWall(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 voffset1, Real voffset2, Real tw, Real th, bool isexternal)
void Update(const std::string &text, bool play_sound=true)
bool InBoundingBox(const Vector3 &pos, bool check_y)
Real HitBeam(const Vector3 &origin, const Vector3 &direction, Real max_distance)
bool ReplaceTexture(const std::string &oldtexture, const std::string &newtexture)
Wall * CreateWallObject(const std::string &name)
const std::string & GetName()
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)
void SetPositionRelative(const Vector3 &position)
void SetValues(const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true)
virtual void Enabled(bool value)
FloorManager * GetFloorManager()
std::string GetConfigString(const std::string &key, const std::string &default_value)
bool AddWallMain(Wall *wallobject, 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, bool autosize)
void ResetWalls(bool ToDefaults=false)
bool IsValidFloor(int floor)
Floor * GetFloor(int number)
TextureManager * GetTextureManager()
int GetFloorNumber(Real altitude, int lastfloor=0, bool checklastfloor=false)
bool GetConfigBool(const std::string &key, bool default_value)
void DrawWalls(bool MainN, bool MainP, bool SideN, bool SideP, bool Top, bool Bottom)
bool AddFloorMain(Wall *wallobject, const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real altitude1, Real altitude2, bool reverse_axis, bool texture_direction, Real tw, Real th, bool autosize, bool legacy_behavior=false)
bool IsValidFloor(int floor)
void Pause(bool value=true)
bool Load(const std::string &filename, bool force=false)
bool Play(bool reset=true)
void PlayQueued(const std::string &filename, bool stop=true, bool loop=false)
void SetSpeed(int percent)
void SetDopplerLevel(Real level)
void SetLoopState(bool value)
void SetPlayPosition(Real percent)
void SetConeSettings(Real inside_angle=360.0, Real outside_angle=360.0, Real outside_volume=1.0)
void SetVolume(Real value)
void SetDirection(const Vector3 &direction)
void SetDistances(Real min, Real max)
void SetAutoSize(bool x, bool y)
void GetAutoSize(bool &x, bool &y)
void Start(int milliseconds=-1, bool oneshot=false)
void ReplaceAll(std::string &string, const std::string &original, const std::string &replacement)
int ToInt(const std::string &string)
void SetCase(std::string &string, bool uppercase)
std::string ToString(int number)
std::string SetCaseCopy(std::string string, bool uppercase)
bool IsNumeric(char character)
void TrimString(std::string &string)
#define SBS_PROFILE(name)