adamaig-ruby_activeworld 0.2-linux → 0.3-linux

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,586 +0,0 @@
1
- require 'ruby_activeworld_enums'
2
-
3
- module RubyActiveworldSupport
4
- include RubyActiveworldEnums
5
-
6
- AW_BUILD = 65
7
- AW_MAX_AVCHANGE_PER_SECOND = 10
8
- AW_MAX_MESSAGES_PER_SECOND = 100
9
- AW_MAX_WHISPERS_PER_SECOND = 100
10
- AW_MAX_BOTGRAMS_PER_SECOND = 32
11
- AW_MAX_ATTRIBUTE_LENGTH = 255
12
- AW_MAX_LONG_ATTRIBUTE_LENGTH = 1000
13
- AW_MAX_DATA_ATTRIBUTE_LENGTH = 4096
14
- AW_PERSONAL_AVATAR = 65535
15
- AW_CUSTOM_AVATAR = 65534
16
- AW_CUSTOM_WORLD_AVATAR = 65533
17
-
18
- AW_OBJECT_VERSION_CAMERA = 1
19
- AW_OBJECT_VERSION_PARTICLES = 1
20
- AW_OBJECT_VERSION_ZONE = 1
21
- AW_OBJECT_VERSION_MOVER = 1
22
-
23
- # This class allows is for the generation of RubyActiveworld specific errors
24
- class RubyActiveworldError < RuntimeError; end
25
-
26
- # call-seq:
27
- # rc_sym ruby_aw_init => :RC_SUCCESS
28
- #
29
- # This returns the symbol corresponding to the return code name
30
- def rc_sym(rc_int)
31
- RETURN_CODE_MAP[rc_int][:error_symbol]
32
- end
33
-
34
- # call-seq:
35
- # rc_msg ruby_aw_init => "Success: Return value from an asynchronous call..."
36
- # rc_msg some_failing_call => "This call failed due to ..."
37
- #
38
- # This looks up return code's corresponding explanation.
39
- def rc_msg(rc_int)
40
- RETURN_CODE_MAP[rc_int][:error_explanation]
41
- end
42
-
43
- def raise_on_error(rc_int)
44
- if :RC_SUCCESS != rc_sym(rc_int)
45
- throw RubyActiveworldError.new( "#{rc_int} : #{rc_msg(rc_int)}")
46
- end
47
- end
48
-
49
- ATTRIBUTE_TYPE_MAP = {
50
- :AW_AVATAR_LOCK => :bool,
51
- :AW_CELL_COMBINE => :bool,
52
- :AW_CITIZEN_BETA => :bool,
53
- :AW_CITIZEN_CAV_ENABLED => :bool,
54
- :AW_CITIZEN_ENABLED => :bool,
55
- :AW_CITIZEN_PAV_ENABLED => :bool,
56
- :AW_CITIZEN_TRIAL => :bool,
57
- :AW_CONSOLE_BOLD => :bool,
58
- :AW_CONSOLE_ITALICS => :bool,
59
- :AW_ENTER_GLOBAL => :bool,
60
- :AW_LICENSE_ALLOW_TOURISTS => :bool,
61
- :AW_LICENSE_HIDDEN => :bool,
62
- :AW_LICENSE_PLUGINS => :bool,
63
- :AW_LICENSE_VOIP => :bool,
64
- :AW_QUERY_COMPLETE => :bool,
65
- :AW_SERVER_ENABLED => :bool,
66
- :AW_SERVER_MORE => :bool,
67
- :AW_TELEPORT_WARP => :bool,
68
- :AW_TERRAIN_COMPLETE => :bool,
69
- :AW_URL_TARGET_3D => :bool,
70
- :AW_USERLIST_MORE => :bool,
71
- :AW_WORLDLIST_MORE => :bool,
72
- :AW_CAV_DEFINITION => :data,
73
- :AW_OBJECT_DATA => :data,
74
- :AW_TERRAIN_NODE_HEIGHTS => :data,
75
- :AW_TERRAIN_NODE_TEXTURES => :data,
76
- :AW_HUD_ELEMENT_OPACITY => :float,
77
- :AW_ATTRIB_SENDER_SESSION => :int,
78
- :AW_AVATAR_ADDRESS => :int,
79
- :AW_AVATAR_ANGLE => :int,
80
- :AW_AVATAR_CITIZEN => :int,
81
- :AW_AVATAR_DISTANCE => :int,
82
- :AW_AVATAR_FLAGS => :int,
83
- :AW_AVATAR_GESTURE => :int,
84
- :AW_AVATAR_PITCH => :int,
85
- :AW_AVATAR_PITCH_DELTA => :int,
86
- :AW_AVATAR_PRIVILEGE => :int,
87
- :AW_AVATAR_SESSION => :int,
88
- :AW_AVATAR_STATE => :int,
89
- :AW_AVATAR_TYPE => :int,
90
- :AW_AVATAR_VERSION => :int,
91
- :AW_AVATAR_WORLD_INSTANCE => :int,
92
- :AW_AVATAR_X => :int,
93
- :AW_AVATAR_Y => :int,
94
- :AW_AVATAR_Y_DELTA => :int,
95
- :AW_AVATAR_YAW => :int,
96
- :AW_AVATAR_YAW_DELTA => :int,
97
- :AW_AVATAR_Z => :int,
98
- :AW_BOTGRAM_FROM => :int,
99
- :AW_BOTGRAM_TO => :int,
100
- :AW_BOTGRAM_TYPE => :int,
101
- :AW_BOTMENU_FROM_SESSION => :int,
102
- :AW_BOTMENU_TO_SESSION => :int,
103
- :AW_CAMERA_LOCATION_SESSION => :int,
104
- :AW_CAMERA_LOCATION_TYPE => :int,
105
- :AW_CAMERA_TARGET_SESSION => :int,
106
- :AW_CAMERA_TARGET_TYPE => :int,
107
- :AW_CAV_CITIZEN => :int,
108
- :AW_CAV_SESSION => :int,
109
- :AW_CELL_ITERATOR => :int,
110
- :AW_CELL_SEQUENCE => :int,
111
- :AW_CELL_SIZE => :int,
112
- :AW_CELL_X => :int,
113
- :AW_CELL_Z => :int,
114
- :AW_CHAT_SESSION => :int,
115
- :AW_CHAT_TYPE => :int,
116
- :AW_CITIZEN_BOT_LIMIT => :int,
117
- :AW_CITIZEN_EXPIRATION_TIME => :int,
118
- :AW_CITIZEN_IMMIGRATION_TIME => :int,
119
- :AW_CITIZEN_LAST_ADDRESS => :int,
120
- :AW_CITIZEN_LAST_LOGIN => :int,
121
- :AW_CITIZEN_NUMBER => :int,
122
- :AW_CITIZEN_PRIVACY => :int,
123
- :AW_CITIZEN_TIME_LEFT => :int,
124
- :AW_CITIZEN_TOTAL_TIME => :int,
125
- :AW_CLICKED_SESSION => :int,
126
- :AW_CONSOLE_BLUE => :int,
127
- :AW_CONSOLE_GREEN => :int,
128
- :AW_CONSOLE_RED => :int,
129
- :AW_DISCONNECT_REASON => :int,
130
- :AW_EJECT_DURATION => :int,
131
- :AW_EJECT_SESSION => :int,
132
- :AW_EJECTION_ADDRESS => :int,
133
- :AW_EJECTION_CREATION_TIME => :int,
134
- :AW_EJECTION_EXPIRATION_TIME => :int,
135
- :AW_EJECTION_TYPE => :int,
136
- :AW_ENTITY_FLAGS => :int,
137
- :AW_ENTITY_ID => :int,
138
- :AW_ENTITY_MODEL_NUM => :int,
139
- :AW_ENTITY_OWNER_CITIZEN => :int,
140
- :AW_ENTITY_OWNER_SESSION => :int,
141
- :AW_ENTITY_PITCH => :int,
142
- :AW_ENTITY_ROLL => :int,
143
- :AW_ENTITY_STATE => :int,
144
- :AW_ENTITY_TYPE => :int,
145
- :AW_ENTITY_X => :int,
146
- :AW_ENTITY_Y => :int,
147
- :AW_ENTITY_YAW => :int,
148
- :AW_ENTITY_Z => :int,
149
- :AW_HUD_ELEMENT_CLICK_X => :int,
150
- :AW_HUD_ELEMENT_CLICK_Y => :int,
151
- :AW_HUD_ELEMENT_CLICK_Z => :int,
152
- :AW_HUD_ELEMENT_COLOR => :int,
153
- :AW_HUD_ELEMENT_FLAGS => :int,
154
- :AW_HUD_ELEMENT_ID => :int,
155
- :AW_HUD_ELEMENT_ORIGIN => :int,
156
- :AW_HUD_ELEMENT_SESSION => :int,
157
- :AW_HUD_ELEMENT_SIZE_X => :int,
158
- :AW_HUD_ELEMENT_SIZE_Y => :int,
159
- :AW_HUD_ELEMENT_SIZE_Z => :int,
160
- :AW_HUD_ELEMENT_TEXTURE_OFFSET_X => :int,
161
- :AW_HUD_ELEMENT_TEXTURE_OFFSET_Y => :int,
162
- :AW_HUD_ELEMENT_TYPE => :int,
163
- :AW_HUD_ELEMENT_X => :int,
164
- :AW_HUD_ELEMENT_Y => :int,
165
- :AW_HUD_ELEMENT_Z => :int,
166
- :AW_LICENSE_CREATION_TIME => :int,
167
- :AW_LICENSE_EXPIRATION_TIME => :int,
168
- :AW_LICENSE_LAST_ADDRESS => :int,
169
- :AW_LICENSE_LAST_START => :int,
170
- :AW_LICENSE_RANGE => :int,
171
- :AW_LICENSE_USERS => :int,
172
- :AW_LOGIN_OWNER => :int,
173
- :AW_MY_GESTURE => :int,
174
- :AW_MY_PITCH => :int,
175
- :AW_MY_STATE => :int,
176
- :AW_MY_TYPE => :int,
177
- :AW_MY_X => :int,
178
- :AW_MY_Y => :int,
179
- :AW_MY_YAW => :int,
180
- :AW_MY_Z => :int,
181
- :AW_OBJECT_BUILD_TIMESTAMP => :int,
182
- :AW_OBJECT_CALLBACK_REFERENCE => :int,
183
- :AW_OBJECT_ID => :int,
184
- :AW_OBJECT_NUMBER => :int,
185
- :AW_OBJECT_OLD_NUMBER => :int,
186
- :AW_OBJECT_OLD_X => :int,
187
- :AW_OBJECT_OLD_Z => :int,
188
- :AW_OBJECT_OWNER => :int,
189
- :AW_OBJECT_ROLL => :int,
190
- :AW_OBJECT_SESSION => :int,
191
- :AW_OBJECT_SYNC => :int,
192
- :AW_OBJECT_TILT => :int,
193
- :AW_OBJECT_TYPE => :int,
194
- :AW_OBJECT_X => :int,
195
- :AW_OBJECT_Y => :int,
196
- :AW_OBJECT_YAW => :int,
197
- :AW_OBJECT_Z => :int,
198
- :AW_SERVER_BUILD => :int,
199
- :AW_SERVER_EXPIRATION => :int,
200
- :AW_SERVER_ID => :int,
201
- :AW_SERVER_INSTANCE => :int,
202
- :AW_SERVER_MAX_USERS => :int,
203
- :AW_SERVER_OBJECTS => :int,
204
- :AW_SERVER_SIZE => :int,
205
- :AW_SERVER_START_RC => :int,
206
- :AW_SERVER_STATE => :int,
207
- :AW_SERVER_TERRAIN_NODES => :int,
208
- :AW_SERVER_USERS => :int,
209
- :AW_TELEPORT_X => :int,
210
- :AW_TELEPORT_Y => :int,
211
- :AW_TELEPORT_YAW => :int,
212
- :AW_TELEPORT_Z => :int,
213
- :AW_TERRAIN_NODE_HEIGHT_COUNT => :int,
214
- :AW_TERRAIN_NODE_SIZE => :int,
215
- :AW_TERRAIN_NODE_TEXTURE_COUNT => :int,
216
- :AW_TERRAIN_NODE_X => :int,
217
- :AW_TERRAIN_NODE_Z => :int,
218
- :AW_TERRAIN_PAGE_X => :int,
219
- :AW_TERRAIN_PAGE_Z => :int,
220
- :AW_TERRAIN_SEQUENCE => :int,
221
- :AW_TERRAIN_VERSION_NEEDED => :int,
222
- :AW_TERRAIN_X => :int,
223
- :AW_TERRAIN_Z => :int,
224
- :AW_TOOLBAR_ID => :int,
225
- :AW_TOOLBAR_SESSION => :int,
226
- :AW_USERLIST_ADDRESS => :int,
227
- :AW_USERLIST_CITIZEN => :int,
228
- :AW_USERLIST_ID => :int,
229
- :AW_USERLIST_PRIVILEGE => :int,
230
- :AW_USERLIST_STATE => :int,
231
- :AW_WORLDLIST_RATING => :int,
232
- :AW_WORLDLIST_STATUS => :int,
233
- :AW_WORLDLIST_USERS => :int,
234
- :AW_AVATAR_NAME => :string,
235
- :AW_BOTGRAM_FROM_NAME => :string,
236
- :AW_BOTMENU_FROM_NAME => :string,
237
- :AW_CAMERA_LOCATION_OBJECT => :string,
238
- :AW_CAMERA_TARGET_OBJECT => :string,
239
- :AW_CHAT_MESSAGE => :string,
240
- :AW_CITIZEN_COMMENT => :string,
241
- :AW_CITIZEN_EMAIL => :string,
242
- :AW_CITIZEN_NAME => :string,
243
- :AW_CITIZEN_PASSWORD => :string,
244
- :AW_CITIZEN_PRIVILEGE_PASSWORD => :string,
245
- :AW_CITIZEN_URL => :string,
246
- :AW_CLICKED_NAME => :string,
247
- :AW_CONSOLE_MESSAGE => :string,
248
- :AW_EJECTION_COMMENT => :string,
249
- :AW_HUD_ELEMENT_TEXT => :string,
250
- :AW_LICENSE_COMMENT => :string,
251
- :AW_LICENSE_EMAIL => :string,
252
- :AW_LICENSE_NAME => :string,
253
- :AW_LICENSE_PASSWORD => :string,
254
- :AW_LOGIN_APPLICATION => :string,
255
- :AW_LOGIN_NAME => :string,
256
- :AW_LOGIN_PASSWORD => :string,
257
- :AW_LOGIN_PRIVILEGE_NAME => :string,
258
- :AW_LOGIN_PRIVILEGE_PASSWORD => :string,
259
- :AW_OBJECT_ACTION => :string,
260
- :AW_OBJECT_DESCRIPTION => :string,
261
- :AW_OBJECT_MODEL => :string,
262
- :AW_PLUGIN_STRING => :string,
263
- :AW_SERVER_CARETAKERS => :string,
264
- :AW_SERVER_NAME => :string,
265
- :AW_SERVER_PASSWORD => :string,
266
- :AW_SERVER_REGISTRY => :string,
267
- :AW_SOUND_NAME => :string,
268
- :AW_TELEPORT_WORLD => :string,
269
- :AW_URL_POST => :string,
270
- :AW_URL_TARGET => :string,
271
- :AW_USERLIST_EMAIL => :string,
272
- :AW_USERLIST_NAME => :string,
273
- :AW_USERLIST_WORLD => :string,
274
- :AW_WORLDLIST_NAME => :string,
275
- :AW_BOTGRAM_TEXT => :string,
276
- :AW_BOTMENU_ANSWER => :string,
277
- :AW_BOTMENU_QUESTION => :string,
278
- :AW_URL_NAME => :string,
279
- :AW_UNIVERSE_ALLOW_BOTS_CAV => :bool,
280
- :AW_UNIVERSE_ALLOW_TOURISTS => :bool,
281
- :AW_UNIVERSE_ALLOW_TOURISTS_CAV => :bool,
282
- :AW_UNIVERSE_CITIZEN_CHANGES_ALLOWED => :bool,
283
- :AW_UNIVERSE_REGISTRATION_REQUIRED => :bool,
284
- :AW_UNIVERSE_USER_LIST_ENABLED => :bool,
285
- :AW_UNIVERSE_OBJECT_PASSWORD => :data,
286
- :AW_UNIVERSE_BROWSER_BETA => :int,
287
- :AW_UNIVERSE_BROWSER_MINIMUM => :int,
288
- :AW_UNIVERSE_BROWSER_RELEASE => :int,
289
- :AW_UNIVERSE_BROWSER_RELEASE_22 => :int ,
290
- :AW_UNIVERSE_BUILD_NUMBER => :int,
291
- :AW_UNIVERSE_OBJECT_REFRESH => :int,
292
- :AW_UNIVERSE_REGISTER_METHOD => :int,
293
- :AW_UNIVERSE_TIME => :int,
294
- :AW_UNIVERSE_WORLD_BETA => :int,
295
- :AW_UNIVERSE_WORLD_MINIMUM => :int,
296
- :AW_UNIVERSE_WORLD_RELEASE => :int,
297
- :AW_UNIVERSE_ANNUAL_CHARGE => :string,
298
- :AW_UNIVERSE_CAV_PATH => :string,
299
- :AW_UNIVERSE_CAV_PATH2 => :string,
300
- :AW_UNIVERSE_MONTHLY_CHARGE => :string,
301
- :AW_UNIVERSE_NAME => :string,
302
- :AW_UNIVERSE_NOTEPAD_URL => :string,
303
- :AW_UNIVERSE_SEARCH_URL => :string,
304
- :AW_UNIVERSE_WELCOME_MESSAGE => :string,
305
- :AW_UNIVERSE_WORLD_START => :string,
306
- :AW_WORLD_ALLOW_3_AXIS_ROTATION => :bool,
307
- :AW_WORLD_ALLOW_AVATAR_COLLISION => :bool,
308
- :AW_WORLD_ALLOW_CITIZEN_WHISPER => :bool,
309
- :AW_WORLD_ALLOW_FLYING => :bool,
310
- :AW_WORLD_ALLOW_OBJECT_SELECT => :bool,
311
- :AW_WORLD_ALLOW_PASSTHRU => :bool,
312
- :AW_WORLD_ALLOW_TELEPORT => :bool,
313
- :AW_WORLD_ALLOW_TOURIST_BUILD => :bool,
314
- :AW_WORLD_ALLOW_TOURIST_WHISPER => :bool,
315
- :AW_WORLD_ALWAYS_SHOW_NAMES => :bool,
316
- :AW_WORLD_AMBIENT_LIGHT_BLUE => :int,
317
- :AW_WORLD_AMBIENT_LIGHT_GREEN => :int,
318
- :AW_WORLD_AMBIENT_LIGHT_RED => :int,
319
- :AW_WORLD_AVATAR_REFRESH_RATE => :int,
320
- :AW_WORLD_BACKDROP => :string,
321
- :AW_WORLD_BOTMENU_URL => :string,
322
- :AW_WORLD_BOTS_RIGHT => :string,
323
- :AW_WORLD_BUILD_CAPABILITY => :bool,
324
- :AW_WORLD_BUILD_NUMBER => :int,
325
- :AW_WORLD_BUILD_RIGHT => :string,
326
- :AW_WORLD_BUOYANCY => :float,
327
- :AW_WORLD_CAMERA_ZOOM => :float,
328
- :AW_WORLD_CARETAKER_CAPABILITY => :bool,
329
- :AW_WORLD_CAV_OBJECT_PASSWORD => :string,
330
- :AW_WORLD_CAV_OBJECT_PATH => :string,
331
- :AW_WORLD_CAV_OBJECT_REFRESH => :int,
332
- :AW_WORLD_CELL_LIMIT => :int,
333
- :AW_WORLD_CHAT_DISABLE_URL_CLICKS => :bool,
334
- :AW_WORLD_CLOUDS_LAYER1_MASK => :string,
335
- :AW_WORLD_CLOUDS_LAYER1_OPACITY => :int,
336
- :AW_WORLD_CLOUDS_LAYER1_SPEED_X => :float,
337
- :AW_WORLD_CLOUDS_LAYER1_SPEED_Z => :float,
338
- :AW_WORLD_CLOUDS_LAYER1_TEXTURE => :string,
339
- :AW_WORLD_CLOUDS_LAYER1_TILE => :float,
340
- :AW_WORLD_CLOUDS_LAYER2_MASK => :string,
341
- :AW_WORLD_CLOUDS_LAYER2_OPACITY => :int,
342
- :AW_WORLD_CLOUDS_LAYER2_SPEED_X => :float,
343
- :AW_WORLD_CLOUDS_LAYER2_SPEED_Z => :float,
344
- :AW_WORLD_CLOUDS_LAYER2_TEXTURE => :string,
345
- :AW_WORLD_CLOUDS_LAYER2_TILE => :float,
346
- :AW_WORLD_CLOUDS_LAYER3_MASK => :string,
347
- :AW_WORLD_CLOUDS_LAYER3_OPACITY => :int,
348
- :AW_WORLD_CLOUDS_LAYER3_SPEED_X => :float,
349
- :AW_WORLD_CLOUDS_LAYER3_SPEED_Z => :float,
350
- :AW_WORLD_CLOUDS_LAYER3_TEXTURE => :string,
351
- :AW_WORLD_CLOUDS_LAYER3_TILE => :float,
352
- :AW_WORLD_CREATION_TIMESTAMP => :int,
353
- :AW_WORLD_DISABLE_AVATAR_LIST => :bool,
354
- :AW_WORLD_DISABLE_CHAT => :bool,
355
- :AW_WORLD_DISABLE_CREATE_URL => :bool,
356
- :AW_WORLD_DISABLE_MULTIPLE_MEDIA => :bool,
357
- :AW_WORLD_DISABLE_SHADOWS => :bool,
358
- :AW_WORLD_EJECT_CAPABILITY => :bool,
359
- :AW_WORLD_EJECT_RIGHT => :string,
360
- :AW_WORLD_EMINENT_DOMAIN_CAPABILITY => :bool,
361
- :AW_WORLD_EMINENT_DOMAIN_RIGHT => :string,
362
- :AW_WORLD_ENABLE_BUMP_EVENT => :bool,
363
- :AW_WORLD_ENABLE_CAMERA_COLLISION => :bool,
364
- :AW_WORLD_ENABLE_CAV => :int,
365
- :AW_WORLD_ENABLE_PAV => :bool,
366
- :AW_WORLD_ENABLE_REFERER => :bool,
367
- :AW_WORLD_ENABLE_SYNC_EVENTS => :bool,
368
- :AW_WORLD_ENABLE_TERRAIN => :bool,
369
- :AW_WORLD_ENTER_RIGHT => :string,
370
- :AW_WORLD_ENTRY_POINT => :string,
371
- :AW_WORLD_EXPIRATION => :int,
372
- :AW_WORLD_FOG_BLUE => :int,
373
- :AW_WORLD_FOG_ENABLE => :bool,
374
- :AW_WORLD_FOG_GREEN => :int,
375
- :AW_WORLD_FOG_MAXIMUM => :int,
376
- :AW_WORLD_FOG_MINIMUM => :int,
377
- :AW_WORLD_FOG_RED => :int,
378
- :AW_WORLD_FOG_TINTED => :bool,
379
- :AW_WORLD_FRICTION => :float,
380
- :AW_WORLD_GRAVITY => :float,
381
- :AW_WORLD_GROUND => :string,
382
- :AW_WORLD_HOME_PAGE => :string,
383
- :AW_WORLD_KEYWORDS => :string,
384
- :AW_WORLD_LIGHT_BLUE => :int,
385
- :AW_WORLD_LIGHT_DRAW_BRIGHT => :bool,
386
- :AW_WORLD_LIGHT_DRAW_FRONT => :bool,
387
- :AW_WORLD_LIGHT_DRAW_SIZE => :int,
388
- :AW_WORLD_LIGHT_GREEN => :int,
389
- :AW_WORLD_LIGHT_MASK => :string,
390
- :AW_WORLD_LIGHT_RED => :int,
391
- :AW_WORLD_LIGHT_SOURCE_COLOR => :int,
392
- :AW_WORLD_LIGHT_SOURCE_USE_COLOR => :bool,
393
- :AW_WORLD_LIGHT_TEXTURE => :string,
394
- :AW_WORLD_LIGHT_X => :float,
395
- :AW_WORLD_LIGHT_Y => :float,
396
- :AW_WORLD_LIGHT_Z => :float,
397
- :AW_WORLD_MAX_LIGHT_RADIUS => :int,
398
- :AW_WORLD_MAX_USERS => :int,
399
- :AW_WORLD_MINIMUM_VISIBILITY => :int,
400
- :AW_WORLD_MOVER_EMPTY_RESET_TIMEOUT => :int,
401
- :AW_WORLD_MOVER_USED_RESET_TIMEOUT => :int,
402
- :AW_WORLD_NAME => :string,
403
- :AW_WORLD_OBJECT_COUNT => :int,
404
- :AW_WORLD_OBJECT_PASSWORD => :data,
405
- :AW_WORLD_OBJECT_PATH => :string,
406
- :AW_WORLD_OBJECT_REFRESH => :int,
407
- :AW_WORLD_PUBLIC_SPEAKER_CAPABILITY => :bool,
408
- :AW_WORLD_PUBLIC_SPEAKER_RIGHT => :string,
409
- :AW_WORLD_RATING => :int,
410
- :AW_WORLD_REPEATING_GROUND => :bool,
411
- :AW_WORLD_RESTRICTED_RADIUS => :int,
412
- :AW_WORLD_SIZE => :int,
413
- :AW_WORLD_SKY_BOTTOM_BLUE => :int,
414
- :AW_WORLD_SKY_BOTTOM_GREEN => :int,
415
- :AW_WORLD_SKY_BOTTOM_RED => :int,
416
- :AW_WORLD_SKY_EAST_BLUE => :int,
417
- :AW_WORLD_SKY_EAST_GREEN => :int,
418
- :AW_WORLD_SKY_EAST_RED => :int,
419
- :AW_WORLD_SKY_NORTH_BLUE => :int,
420
- :AW_WORLD_SKY_NORTH_GREEN => :int,
421
- :AW_WORLD_SKY_NORTH_RED => :int,
422
- :AW_WORLD_SKY_SOUTH_BLUE => :int,
423
- :AW_WORLD_SKY_SOUTH_GREEN => :int,
424
- :AW_WORLD_SKY_SOUTH_RED => :int,
425
- :AW_WORLD_SKY_TOP_BLUE => :int,
426
- :AW_WORLD_SKY_TOP_GREEN => :int,
427
- :AW_WORLD_SKY_TOP_RED => :int,
428
- :AW_WORLD_SKY_WEST_BLUE => :int,
429
- :AW_WORLD_SKY_WEST_GREEN => :int,
430
- :AW_WORLD_SKY_WEST_RED => :int,
431
- :AW_WORLD_SKYBOX => :string,
432
- :AW_WORLD_SLOPESLIDE_ENABLED => :bool,
433
- :AW_WORLD_SLOPESLIDE_MAX_ANGLE => :float,
434
- :AW_WORLD_SLOPESLIDE_MIN_ANGLE => :float,
435
- :AW_WORLD_SOUND_AMBIENT => :string,
436
- :AW_WORLD_SOUND_FOOTSTEP => :string,
437
- :AW_WORLD_SOUND_WATER_ENTER => :string,
438
- :AW_WORLD_SOUND_WATER_EXIT => :string,
439
- :AW_WORLD_SPEAK_CAPABILITY => :bool,
440
- :AW_WORLD_SPEAK_RIGHT => :string,
441
- :AW_WORLD_SPECIAL_COMMANDS => :string,
442
- :AW_WORLD_SPECIAL_COMMANDS_RIGHT => :string,
443
- :AW_WORLD_SPECIAL_OBJECTS_RIGHT => :string,
444
- :AW_WORLD_TERRAIN_AMBIENT => :float,
445
- :AW_WORLD_TERRAIN_DIFFUSE => :float,
446
- :AW_WORLD_TERRAIN_OFFSET => :float,
447
- :AW_WORLD_TERRAIN_RIGHT => :string,
448
- :AW_WORLD_TERRAIN_TIMESTAMP => :int,
449
- :AW_WORLD_TITLE => :string,
450
- :AW_WORLD_V4_OBJECTS_RIGHT => :string,
451
- :AW_WORLD_WAIT_LIMIT => :int,
452
- :AW_WORLD_WATER_BLUE => :int,
453
- :AW_WORLD_WATER_BOTTOM_MASK => :string,
454
- :AW_WORLD_WATER_BOTTOM_TEXTURE => :string,
455
- :AW_WORLD_WATER_ENABLED => :bool,
456
- :AW_WORLD_WATER_FRICTION => :float,
457
- :AW_WORLD_WATER_GREEN => :int,
458
- :AW_WORLD_WATER_LEVEL => :float,
459
- :AW_WORLD_WATER_MASK => :string,
460
- :AW_WORLD_WATER_OPACITY => :int,
461
- :AW_WORLD_WATER_RED => :int,
462
- :AW_WORLD_WATER_SPEED => :float,
463
- :AW_WORLD_WATER_SURFACE_MOVE => :float,
464
- :AW_WORLD_WATER_TEXTURE => :string,
465
- :AW_WORLD_WATER_UNDER_TERRAIN => :bool,
466
- :AW_WORLD_WATER_WAVE_MOVE => :float,
467
- :AW_WORLD_WATER_VISIBILITY => :int,
468
- :AW_WORLD_WELCOME_MESSAGE => :string,
469
- :AW_WORLD_VOIP_CONFERENCE_GLOBAL => :bool,
470
- :AW_WORLD_VOIP_MODERATE_GLOBAL => :bool,
471
- :AW_WORLD_VOIP_RIGHT => :string
472
- }
473
-
474
- RETURN_CODE_MAP = {
475
- 0 => {:error_symbol => :RC_SUCCESS, :error_explanation => "Success: Return value from an asynchronous call: Request has been sent to the server.\nReturn value from a blocking call: Operation has completed successfully.\nWhen passed to a callback: Operation has completed successfully."},
476
- 1 => {:error_symbol => :RC_CITIZENSHIP_EXPIRED, :error_explanation => "Citizenship has expired: Citizenship of the owner has expired."},
477
- 2 => {:error_symbol => :RC_LAND_LIMIT_EXCEEDED, :error_explanation => "Land limit exceeded: Land limit of the universe would be exceeded if the world is started."},
478
- 3 => {:error_symbol => :RC_NO_SUCH_CITIZEN, :error_explanation => "No such citizen: No citizenship with a matching citizen number was found."},
479
- 5 => {:error_symbol => :RC_LICENSE_PASSWORD_CONTAINS_SPACE, :error_explanation => "License password contains space: Password cannot contain a space."},
480
- 6 => {:error_symbol => :RC_LICENSE_PASSWORD_TOO_LONG, :error_explanation => "License password too long: Password cannot be longer than 8 characters."},
481
- 7 => {:error_symbol => :RC_LICENSE_PASSWORD_TOO_SHORT, :error_explanation => "License password too short: Password must be at least 2 characters."},
482
- 8 => {:error_symbol => :RC_LICENSE_RANGE_TOO_LARGE, :error_explanation => "License range too large: Range must be smaller than 3275 hectometers. That is, at most 32750 coordinates N/S/W/E or 655000 meters across."},
483
- 9 => {:error_symbol => :RC_LICENSE_RANGE_TOO_SMALL, :error_explanation => "License range too small: Range must be larger than 0 hectometers. That is, at least 10 coordinates N/S/W/E or 200 meters across."},
484
- 10 => {:error_symbol => :RC_LICENSE_USERS_TOO_LARGE, :error_explanation => "License users too large: User limit cannot exceed 1024."},
485
- 11 => {:error_symbol => :RC_LICENSE_USERS_TOO_SMALL, :error_explanation => "License users too small: User limit must be larger than 0."},
486
- 13 => {:error_symbol => :RC_INVALID_PASSWORD, :error_explanation => "Invalid password: Unable to login due to invalid password."},
487
- 15 => {:error_symbol => :RC_LICENSE_WORLD_TOO_SHORT, :error_explanation => "License world too short: Name must be at least 2 characters."},
488
- 16 => {:error_symbol => :RC_LICENSE_WORLD_TOO_LONG, :error_explanation => "License world too long: Name cannot be longer than 8 characters."},
489
- 20 => {:error_symbol => :RC_INVALID_WORLD, :error_explanation => "Invalid world: Unable to start the world due to invalid name or password."},
490
- 21 => {:error_symbol => :RC_SERVER_OUTDATED, :error_explanation => "Server outdated: Server build either contains a serious flaw or is outdated and must be upgraded."},
491
- 22 => {:error_symbol => :RC_WORLD_ALREADY_STARTED, :error_explanation => "World already started: World has already been started at a different location."},
492
- 27 => {:error_symbol => :RC_NO_SUCH_WORLD, :error_explanation => "No such world: No world with a matching name has been started on the server."},
493
- 32 => {:error_symbol => :RC_UNAUTHORIZED, :error_explanation => "Unauthorized: Not authorized to perform the operation."},
494
- 33 => {:error_symbol => :RC_WORLD_ALREADY_EXISTS, :error_explanation => "World already exists: TODO: Might not be in use."},
495
- 34 => {:error_symbol => :RC_NO_SUCH_LICENSE, :error_explanation => "No such license: No license with a matching world name was found."},
496
- 57 => {:error_symbol => :RC_TOO_MANY_WORLDS, :error_explanation => "Too many worlds: Limit of started worlds in the universe would be exceeded if the world is started."},
497
- 58 => {:error_symbol => :RC_MUST_UPGRADE, :error_explanation => "Must upgrade: SDK build either contains a serious flaw or is outdated and must be upgraded."},
498
- 59 => {:error_symbol => :RC_BOT_LIMIT_EXCEEDED, :error_explanation => "Bot limit exceeded: Bot limit of the owner citizenship would be exceeded if the bot is logged in."},
499
- 61 => {:error_symbol => :RC_WORLD_EXPIRED, :error_explanation => "World expired: Unable to start world due to its license having expired."},
500
- 62 => {:error_symbol => :RC_CITIZEN_DOES_NOT_EXPIRE, :error_explanation => "Citizen does not expire: TODO: What is this used for?"},
501
- 64 => {:error_symbol => :RC_LICENSE_STARTS_WITH_NUMBER, :error_explanation => "License starts with number: Name cannot start with a number."},
502
- 66 => {:error_symbol => :RC_NO_SUCH_EJECTION, :error_explanation => "No such ejection: No ejection with a matching identifier was found."},
503
- 67 => {:error_symbol => :RC_NO_SUCH_SESSION, :error_explanation => "No such session: No user with a matching session number has entered the world."},
504
- 72 => {:error_symbol => :RC_WORLD_RUNNING, :error_explanation => "World running: World has already been started."},
505
- 73 => {:error_symbol => :RC_WORLD_NOT_SET, :error_explanation => "World not set: World to perform the operation on has not been set."},
506
- 74 => {:error_symbol => :RC_NO_SUCH_CELL, :error_explanation => "No such cell: No more cells left to enumerate."},
507
- 75 => {:error_symbol => :RC_NO_REGISTRY, :error_explanation => "No registry: Unable to start world due to missing or invalid registry."},
508
- 76 => {:error_symbol => :RC_CANT_OPEN_REGISTRY, :error_explanation => "Can't open registry"},
509
- 77 => {:error_symbol => :RC_CITIZEN_DISABLED, :error_explanation => "Citizen disabled: Citizenship of the owner has been disabled."},
510
- 78 => {:error_symbol => :RC_WORLD_DISABLED, :error_explanation => "World disabled: Unable to start world due to it having been disabled."},
511
- 85 => {:error_symbol => :RC_TELEGRAM_BLOCKED, :error_explanation => "Telegram blocked"},
512
- 88 => {:error_symbol => :RC_UNABLE_TO_UPDATE_TERRAIN, :error_explanation => "Unable to update terrain"},
513
- 100 => {:error_symbol => :RC_EMAIL_CONTAINS_INVALID_CHAR, :error_explanation => "Email contains invalid char: Email address contains one or more invalid characters."},
514
- 101 => {:error_symbol => :RC_EMAIL_ENDS_WITH_BLANK, :error_explanation => "Email ends with blank: Email address cannot end with a blank."},
515
- 101 => {:error_symbol => :RC_NO_SUCH_OBJECT, :error_explanation => "No such object: Unable to find the object to delete."},
516
- 102 => {:error_symbol => :RC_EMAIL_MISSING_DOT, :error_explanation => "Email missing dot: Email address must contain at least one '.'."},
517
- 102 => {:error_symbol => :RC_NOT_DELETE_OWNER, :error_explanation => "Not delete owner"},
518
- 103 => {:error_symbol => :RC_EMAIL_MISSING_AT, :error_explanation => "Email missing at: Email address must contain a '@'."},
519
- 104 => {:error_symbol => :RC_EMAIL_STARTS_WITH_BLANK, :error_explanation => "Email starts with blank: Email address cannot start with a blank."},
520
- 105 => {:error_symbol => :RC_EMAIL_TOO_LONG, :error_explanation => "Email too long: Email address cannot be longer than 50 characters."},
521
- 106 => {:error_symbol => :RC_EMAIL_TOO_SHORT, :error_explanation => "Email too short: Email address must be at least 8 characters or longer."},
522
- 107 => {:error_symbol => :RC_NAME_ALREADY_USED, :error_explanation => "Name already used: Citizenship with a matching name already exists."},
523
- 108 => {:error_symbol => :RC_NAME_CONTAINS_NONALPHANUMERIC_CHAR, :error_explanation => "Name contains nonalphanumeric character: Name contains invalid character(s)."},
524
- 109 => {:error_symbol => :RC_NAME_CONTAINS_INVALID_BLANK, :error_explanation => "Name contains invalid blank: Name contains invalid blank(s)."},
525
- 111 => {:error_symbol => :RC_NAME_ENDS_WITH_BLANK, :error_explanation => "Name ends with blank: Name cannot end with a blank."},
526
- 112 => {:error_symbol => :RC_NAME_TOO_LONG, :error_explanation => "Name too long: Name cannot be longer than 16 characters."},
527
- 113 => {:error_symbol => :RC_NAME_TOO_SHORT, :error_explanation => "Name too short: Name must be at least 2 characters."},
528
- 115 => {:error_symbol => :RC_PASSWORD_TOO_LONG, :error_explanation => "Password too long: Password cannot be longer than 12 characters."},
529
- 116 => {:error_symbol => :RC_PASSWORD_TOO_SHORT, :error_explanation => "Password too short: Password must be at least 4 characters."},
530
- 124 => {:error_symbol => :RC_UNABLE_TO_DELETE_CITIZEN, :error_explanation => "Unable to delete citizen: Unable to delete citizen due to a database problem."},
531
- 126 => {:error_symbol => :RC_NUMBER_ALREADY_USED, :error_explanation => "Number already used: Citizenship with a matching citizen number already exists."},
532
- 127 => {:error_symbol => :RC_NUMBER_OUT_OF_RANGE, :error_explanation => "Number out of range: Citizen number is larger than the auto-incremented field in the database."},
533
- 128 => {:error_symbol => :RC_PRIVILEGE_PASSWORD_IS_TOO_SHORT, :error_explanation => "Privilege password is too short: Privilege password must be either empty or at least 4 characters."},
534
- 129 => {:error_symbol => :RC_PRIVILEGE_PASSWORD_IS_TOO_LONG, :error_explanation => "Privilege password is too long: Password cannot be longer than 12 characters."},
535
- 203 => {:error_symbol => :RC_NOT_CHANGE_OWNER, :error_explanation => "Not change owner: Not permitted to change the owner of an object. It requires eminent domain or caretaker capability."},
536
- 204 => {:error_symbol => :RC_CANT_FIND_OLD_ELEMENT, :error_explanation => "Can't find old element: Unable to find the object to change."},
537
- 212 => {:error_symbol => :RC_IMPOSTER, :error_explanation => "Imposter: Unable to enter world due to masquerading as someone else."},
538
- 300 => {:error_symbol => :RC_ENCROACHES, :error_explanation => "Encroaches: Not allowed to encroach into another's property."},
539
- 301 => {:error_symbol => :RC_OBJECT_TYPE_INVALID, :error_explanation => "Object type invalid"},
540
- 303 => {:error_symbol => :RC_TOO_MANY_BYTES, :error_explanation => "Too many bytes: Cell limit would be exceeded."},
541
- 306 => {:error_symbol => :RC_UNREGISTERED_OBJECT, :error_explanation => "Unregistered object: Model name does not exist in the registry."},
542
- 308 => {:error_symbol => :RC_ELEMENT_ALREADY_EXISTS, :error_explanation => "Element already exists"},
543
- 309 => {:error_symbol => :RC_RESTRICTED_COMMAND, :error_explanation => "Restricted command"},
544
- 311 => {:error_symbol => :RC_OUT_OF_BOUNDS, :error_explanation => "Out of bounds"},
545
- 313 => {:error_symbol => :RC_RESTRICTED_OBJECT, :error_explanation => "Restricted object: Not allowed to build with 'z' objects in this world."},
546
- 314 => {:error_symbol => :RC_RESTRICTED_AREA, :error_explanation => "Restricted area: Not allowed to build within the restricted area of this world."},
547
- 401 => {:error_symbol => :RC_NOT_YET, :error_explanation => "Not yet: Would exceed the maximum number of operations per second."},
548
- 402 => {:error_symbol => :RC_TIMEOUT, :error_explanation => "Timeout: Synchronous operation timed out."},
549
- 404 => {:error_symbol => :RC_UNABLE_TO_CONTACT_UNIVERSE, :error_explanation => "Unable to contact universe: Unable to establish a connection to the universe server."},
550
- 439 => {:error_symbol => :RC_NO_CONNECTION, :error_explanation => "No connection: Connection to the server is down."},
551
- 444 => {:error_symbol => :RC_NOT_INITIALIZED, :error_explanation => "Not initialized: SDK API has not been initialized (by calling aw_init)."},
552
- 445 => {:error_symbol => :RC_NO_INSTANCE, :error_explanation => "No instance"},
553
- 448 => {:error_symbol => :RC_INVALID_ATTRIBUTE, :error_explanation => "Invalid attribute"},
554
- 449 => {:error_symbol => :RC_TYPE_MISMATCH, :error_explanation => "Type mismatch"},
555
- 450 => {:error_symbol => :RC_STRING_TOO_LONG, :error_explanation => "String too long"},
556
- 451 => {:error_symbol => :RC_READ_ONLY, :error_explanation => "Read only: Unable to set attribute due to it being read-only."},
557
- 453 => {:error_symbol => :RC_INVALID_INSTANCE, :error_explanation => "Invalid instance"},
558
- 454 => {:error_symbol => :RC_VERSION_MISMATCH, :error_explanation => "Version mismatch: Aw.h and Aw.dll (or libaw_sdk.so for Linux) are from different builds of the SDK."},
559
- 464 => {:error_symbol => :RC_QUERY_IN_PROGRESS, :error_explanation => "Query in progress: A property query is already in progress."},
560
- 466 => {:error_symbol => :RC_EJECTED, :error_explanation => "Ejected: Disconnected from world due to ejection."},
561
- 467 => {:error_symbol => :RC_NOT_WELCOME, :error_explanation => "Not welcome: Citizenship of the owner does not have bot rights in the world."},
562
- 471 => {:error_symbol => :RC_CONNECTION_LOST, :error_explanation => "Connection lost"},
563
- 474 => {:error_symbol => :RC_NOT_AVAILABLE, :error_explanation => "Not available"},
564
- 500 => {:error_symbol => :RC_CANT_RESOLVE_UNIVERSE_HOST, :error_explanation => "Can't resolve universe host"},
565
- 505 => {:error_symbol => :RC_INVALID_ARGUMENT, :error_explanation => "Invalid argument"},
566
- 514 => {:error_symbol => :RC_UNABLE_TO_UPDATE_CAV, :error_explanation => "Unable to update custom avatar"},
567
- 515 => {:error_symbol => :RC_UNABLE_TO_DELETE_CAV, :error_explanation => "Unable to delete custom avatar"},
568
- 516 => {:error_symbol => :RC_NO_SUCH_CAV, :error_explanation => "No such custom avatar"},
569
- 521 => {:error_symbol => :RC_WORLD_INSTANCE_ALREADY_EXISTS, :error_explanation => "World instance already exists"},
570
- 522 => {:error_symbol => :RC_WORLD_INSTANCE_INVALID, :error_explanation => "World instance invalid"},
571
- 523 => {:error_symbol => :RC_PLUGIN_NOT_AVAILABLE, :error_explanation => "Plugin not available"},
572
- 600 => {:error_symbol => :RC_DATABASE_ERROR, :error_explanation => "Database error"},
573
- 4995 => {:error_symbol => :RC_Z_BUF_ERROR, :error_explanation => "Buffer error (zlib) Not enough room in the output buffer."},
574
- 4996 => {:error_symbol => :RC_Z_MEM_ERROR, :error_explanation => "Memory error (zlib): Memory could not be allocated for processing."},
575
- 4997 => {:error_symbol => :RC_Z_DATA_ERROR, :error_explanation => "Data error (zlib): Input data was corrupted."}
576
- }
577
-
578
- RETURN_CODE_SYMBOL_MAP = begin
579
- h = {}
580
- RETURN_CODE_MAP.each_pair do |rc_int,hsh|
581
- h.merge!({hsh[:error_symbol] => {:rc => rc_int, :error_explanation => hsh[:error_explanation]}})
582
- end
583
- h
584
- end
585
-
586
- end