86 bool CreateCar(
int floor);
88 void Report(
const std::string &message);
89 bool ReportError(
const std::string &message);
90 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);
91 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);
92 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);
93 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);
94 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);
95 void DumpServicedFloors();
96 bool AddServicedFloor(
int number,
bool create_shaft_door =
true);
97 void RemoveServicedFloor(
int number,
bool remove_shaft_door =
true);
98 bool IsServicedFloor(
int floor,
bool report =
true);
99 int GetFloorIndex(
int floor);
100 int GetServicedFloorCount();
101 int GetServicedFloor(
int index);
102 bool CheckServicedFloors();
107 void Enabled(
bool value);
108 void EnableObjects(
bool value);
109 void UpdateFloorIndicators();
111 int GetBottomFloor();
112 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);
113 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);
114 void SetDirectionalIndicators(
int floor,
bool UpLight,
bool DownLight);
115 void UpdateDirectionalIndicators();
116 void EnableDirectionalIndicators(
bool value);
118 bool OpenDoorsEmergency(
int number = 0,
int whichdoors = 1,
int floor = 0,
bool hold =
false);
119 void CloseDoorsEmergency(
int number = 0,
int whichdoors = 1,
int floor = 0,
bool hold =
false);
120 bool OpenDoors(
int number = 0,
int whichdoors = 1,
int floor = 0,
bool manual =
false,
bool hold =
false);
121 void CloseDoors(
int number = 0,
int whichdoors = 1,
int floor = 0,
bool manual =
false,
bool hold =
false);
122 void StopDoors(
int number = 0);
123 void HoldDoors(
int number = 0,
bool sensor =
false);
124 void ShaftDoorsEnabled(
int number,
int floor,
bool value);
125 void ShaftDoorsEnabledRange(
int number,
int floor,
int range);
126 bool AreDoorsOpen(
int number = 0);
127 bool AreShaftDoorsOpen(
int number,
int floor);
128 bool AreShaftDoorsClosed(
bool skip_current_floor =
false);
129 void ResetDoors(
int number = 0,
bool sensor =
false);
130 bool DoorsStopped(
int number = 0);
131 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);
132 bool AddShaftDoors(
int number,
const std::string &lefttexture,
const std::string &righttexture,
Real thickness,
Real CenterX,
Real CenterZ,
Real voffset,
Real tw,
Real th);
133 DoorWrapper* AddShaftDoor(
int floor,
int number,
const std::string &lefttexture,
const std::string &righttexture,
Real tw,
Real th);
134 DoorWrapper* AddShaftDoor(
int floor,
int number,
const std::string &lefttexture,
const std::string &righttexture,
Real thickness,
Real CenterX,
Real CenterZ,
Real voffset,
Real tw,
Real th);
135 void Chime(
int number,
int floor,
bool direction,
bool early =
false);
136 void EnableDoors(
bool value);
137 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);
138 int AreDoorsMoving(
int number = 0,
bool car_doors =
true,
bool shaft_doors =
true);
139 bool AreDoorsOpening(
int number = 0,
bool car_doors =
true,
bool shaft_doors =
true);
140 bool AreDoorsClosing(
int number = 0,
bool car_doors =
true,
bool shaft_doors =
true);
141 void SetShaftDoors(
int number,
Real thickness,
Real CenterX,
Real CenterZ);
142 bool DoorExists(
int number);
143 bool ShaftDoorsExist(
int number,
int floor,
bool include_nonserviced =
false);
144 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));
145 Reverb* AddReverb(
const std::string &name,
const std::string &type,
const Vector3 &position,
Real min_distance,
Real max_distance);
146 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);
147 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);
148 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);
149 DoorWrapper* FinishDoors(
int number,
bool DoorWalls =
true,
bool TrackWalls =
true);
150 DoorWrapper* FinishShaftDoor(
int number,
int floor,
bool DoorWalls =
true,
bool TrackWalls =
true);
151 bool FinishShaftDoors(
int number,
bool DoorWalls =
true,
bool TrackWalls =
true);
153 Control* GetFloorButton(
int floor);
154 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);
155 Door* CreateDoor(std::string name,
const std::string &open_sound,
const std::string &close_sound,
bool rotate);
156 Door* GetDoor(
const std::string &name);
157 Door* GetStdDoor(
int number);
162 void RemoveDoor(
Door *door);
163 void RemoveSound(
Sound *sound);
165 void RemoveLight(
Light *light);
166 void RemoveModel(
Model *model);
169 void RemoveControl(
Control *control);
170 void RemoveTrigger(
Trigger *trigger);
171 bool IsNudgeModeActive(
int number = 0);
172 void EnableNudgeMode(
bool value,
int number = 0);
173 Light* AddLight(
const std::string &name,
int type);
174 Light* GetLight(
const std::string &name);
175 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);
176 void AddModel(
Model *model);
177 Primitive* AddPrimitive(
const std::string &name);
181 void AddDisplayFloor(
int floor);
182 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);
183 Trigger* AddTrigger(
const std::string &name,
const std::string &sound_file,
Vector3 &area_min,
Vector3 &area_max, std::vector<std::string> &action_names);
184 bool ReplaceTexture(
const std::string &oldtexture,
const std::string &newtexture);
185 std::vector<Sound*> GetSound(
const std::string &name);
188 void ChangeLight(
int floor,
bool value);
189 void EnableSensor(
bool value,
int number = 0);
190 bool GetSensorStatus(
int number = 0);
191 std::string GetFloorDisplay();
192 bool GetHoldStatus(
int number = 0);
193 void ResetNudgeTimer(
bool start =
true,
int number = 0);
194 void ResetDoorState(
int number = 0);
195 Model* GetModel(std::string name);
196 Primitive* GetPrimitive(std::string name);
198 void SetBeepSound(
const std::string &filename);
199 void SetFloorSound(
const std::string &prefix);
200 void SetMessageSound(
bool type,
bool direction,
const std::string &filename);
202 bool PlayFloorBeep();
203 bool PlayFloorSound();
204 bool PlayMessageSound(
bool type);
206 bool IsInCar(
const Vector3 &position,
bool camera =
false);
211 bool OnBottomFloor();
213 int GetNearestServicedFloor();
214 Real GetDestinationAltitude(
int floor);
215 Real GetDestinationOffset(
int floor);
216 void SetFloor(
int floor,
bool move_parent =
true);
218 bool IsOnFloor(
int floor,
bool leveled =
true);
219 void NotifyArrival(
int floor,
bool early =
false,
int direction = 0);
220 bool IndependentServiceActive();
221 bool IndependentServiceOnOtherCar();
222 int FirePhase2Active();
223 bool FirePhase2OnOtherCar();
224 void SetControls(
const std::string &action_name);
225 void FlashIndicators(
bool value);
228 bool RespondingToCall(
int floor,
int direction);
229 int RespondingToCall(
int floor);
230 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);
236 bool Input(
const std::string& text);
245 void PlayStartingSounds();
246 void PlayStoppingSounds(
bool emergency =
false);
247 void PlayMovingSounds();
321 void UpdateKeypadIndicator(
const std::string& text,
bool play_sound =
true);
323 void KeypadError(
bool type = 0);
324 bool GetFloorFromID(
const std::string& floor,
int& result);
325 void Requested(
int floor);