@@ -92,112 +92,112 @@ void CLuaElementDefs::LoadFunctions ( void )
92
92
CLuaCFunctions::AddFunction ( " setElementCollisionsEnabled" , setElementCollisionsEnabled );
93
93
CLuaCFunctions::AddFunction ( " setElementFrozen" , setElementFrozen );
94
94
CLuaCFunctions::AddFunction ( " setLowLODElement" , setLowLODElement );
95
- }
96
-
97
- // TODO: specials
98
- void CLuaElementDefs::AddClass ( lua_State* luaVM )
99
- {
100
- lua_newclass ( luaVM );
101
-
102
- lua_classfunction ( luaVM, " getByID" , " getElementByID" );
103
- lua_classfunction ( luaVM, " getAllByType" , " getElementsByType" );
104
- lua_classfunction ( luaVM, " getByIndex" , " getElementByIndex" );
105
-
106
- lua_classfunction ( luaVM, " create" , " createElement" );
107
- lua_classfunction ( luaVM, " clone" , " cloneElement" );
108
- lua_classfunction ( luaVM, " destroy" , " destroyElement" );
109
- lua_classfunction ( luaVM, " clearVisibility" , " clearElementVisibleTo" );
110
- lua_classfunction ( luaVM, " attach" , " attachElements" );
111
- lua_classfunction ( luaVM, " detach" , " detachElements" );
112
- lua_classfunction ( luaVM, " removeData" , " removeElementData" );
113
-
114
- lua_classfunction ( luaVM, " setParent" , " setElementParent" );
115
- lua_classfunction ( luaVM, " setVelocity" , " setElementVelocity" );
116
- lua_classfunction ( luaVM, " setFrozen" , " setElementFrozen" );
117
- lua_classfunction ( luaVM, " setHealth" , " setElementHealth" );
118
- lua_classfunction ( luaVM, " setModel" , " setElementModel" );
119
- lua_classfunction ( luaVM, " setSyncer" , " setElementSyncer" );
120
- lua_classfunction ( luaVM, " setAlpha" , " setElementAlpha" );
121
- lua_classfunction ( luaVM, " setDoubleSided" , " setElementDoubleSided" );
122
- lua_classfunction ( luaVM, " setCollisionsEnabled" , " setElementCollisionsEnabled" );
123
- lua_classfunction ( luaVM, " setData" , " setElementData" );
124
- lua_classfunction ( luaVM, " setPosition" , " setElementPosition" );
125
- lua_classfunction ( luaVM, " setRotation" , " setElementRotation" );
126
- lua_classfunction ( luaVM, " setVelocity" , " setElementVelocity" );
127
- lua_classfunction ( luaVM, " setMatrix" , " setElementMatrix" );
128
- lua_classfunction ( luaVM, " setID" , " setElementID" );
129
- lua_classfunction ( luaVM, " setInterior" , " setElementInterior" );
130
- lua_classfunction ( luaVM, " setDimension" , " setElementDimension" );
131
- lua_classfunction ( luaVM, " setLowLOD" , " setLowLODElement" );
132
- lua_classfunction ( luaVM, " setAttachedOffsets" , " setElementAttachedOffsets" );
133
- lua_classfunction ( luaVM, " setCallPropagationEnabled" , " setElementCallPropagationEnabled" );
134
-
135
- lua_classfunction ( luaVM, " getAttachedOffsets" , " getElementAttachedOffsets" );
136
- lua_classfunction ( luaVM, " getChild" , " getElementChild" );
137
- lua_classfunction ( luaVM, " getChildren" , " getElementChildren" );
138
- lua_classfunction ( luaVM, " getParent" , " getElementParent" );
139
- lua_classfunction ( luaVM, " getAttachedElements" , " getAttachedElements" );
140
- lua_classfunction ( luaVM, " getAttachedTo" , " getElementAttachedTo" );
141
- lua_classfunction ( luaVM, " getVelocity" , " getElementVelocity" , OOP_getElementVelocity );
142
- lua_classfunction ( luaVM, " getID" , " getElementID" );
143
- lua_classfunction ( luaVM, " getZoneName" , " getElementZoneName" );
144
- lua_classfunction ( luaVM, " getAlpha" , " getElementAlpha" );
145
- lua_classfunction ( luaVM, " getHealth" , " getElementHealth" );
146
- lua_classfunction ( luaVM, " getModel" , " getElementModel" );
147
- lua_classfunction ( luaVM, " getChildrenCount" , " getElementChildrenCount" );
148
- lua_classfunction ( luaVM, " getSyncer" , " getElementSyncer" );
149
- lua_classfunction ( luaVM, " getAllData" , " getAllElementData" );
150
- lua_classfunction ( luaVM, " getColShape" , " getElementColShape" );
151
- lua_classfunction ( luaVM, " getData" , " getElementData" );
152
- lua_classfunction ( luaVM, " getPosition" , " getElementPosition" , OOP_getElementPosition );
153
- lua_classfunction ( luaVM, " getRotation" , " getElementRotation" , OOP_getElementRotation );
154
- lua_classfunction ( luaVM, " getMatrix" , " getElementMatrix" , OOP_getElementMatrix );
155
- lua_classfunction ( luaVM, " getType" , " getElementType" );
156
- lua_classfunction ( luaVM, " getInterior" , " getElementInterior" );
157
- lua_classfunction ( luaVM, " getDimension" , " getElementDimension" );
158
- lua_classfunction ( luaVM, " getLowLOD" , " getLowLODElement" );
159
-
160
- lua_classfunction ( luaVM, " getCollisionsEnabled" , " getElementCollisionsEnabled" );
161
- lua_classfunction ( luaVM, " isCallPropagationEnabled" , " isElementCallPropagationEnabled" );
162
- lua_classfunction ( luaVM, " isWithinMarker" , " isElementWithinMarker" );
163
- lua_classfunction ( luaVM, " isWithinColShape" , " isElementWithinColShape" );
164
- lua_classfunction ( luaVM, " isFrozen" , " isElementFrozen" );
165
- lua_classfunction ( luaVM, " isInWater" , " isElementInWater" );
166
- lua_classfunction ( luaVM, " isDoubleSided" , " isElementDoubleSided" );
167
- lua_classfunction ( luaVM, " isVisibleTo" , " isElementVisibleTo" );
168
- lua_classfunction ( luaVM, " isLowLOD" , " isElementLowLOD" );
169
- lua_classfunction ( luaVM, " isAttached" , " isElementAttached" );
170
-
171
- lua_classvariable ( luaVM, " id" , " setElementID" , " getElementID" );
172
- lua_classvariable ( luaVM, " callPropagationEnabled" , " setElementCallPropagationEnabled" , " isElementCallPropagationEnabled" );
173
- lua_classvariable ( luaVM, " parent" , " setElementParent" , " getElementParent" );
174
- lua_classvariable ( luaVM, " zoneName" , NULL , " getElementZoneName" );
175
- lua_classvariable ( luaVM, " attachedTo" , " attachElements" , " getElementAttachedTo" );
176
- lua_classvariable ( luaVM, " children" , NULL , " getElementChildren" );
177
- lua_classvariable ( luaVM, " frozen" , " setElementFrozen" , " isElementFrozen" );
178
- lua_classvariable ( luaVM, " attachedElements" , NULL , " getAttachedElements" );
179
- lua_classvariable ( luaVM, " inWater" , NULL , " isElementInWater" );
180
- lua_classvariable ( luaVM, " health" , " setElementHealth" , " getElementHealth" );
181
- lua_classvariable ( luaVM, " alpha" , " setElementAlpha" , " getElementAlpha" );
182
- lua_classvariable ( luaVM, " type" , NULL , " getElementType" );
183
- lua_classvariable ( luaVM, " dimension" , " setElementDimension" , " getElementDimension" );
184
- lua_classvariable ( luaVM, " doubleSided" , " setElementDoubleSided" , " isElementDoubleSided" );
185
- lua_classvariable ( luaVM, " model" , " setElementModel" , " getElementModel" );
186
- lua_classvariable ( luaVM, " lowLOD" , " setLowLODElement" , " getLowLODElement" );
187
- lua_classvariable ( luaVM, " syncer" , NULL , " getElementSyncer" );
188
- lua_classvariable ( luaVM, " childrenCount" , NULL , " getElementChildrenCount" );
189
- lua_classvariable ( luaVM, " interior" , " setElementInterior" , " getElementInterior" );
190
- lua_classvariable ( luaVM, " colShape" , NULL , " getElementColShape" );
191
- lua_classvariable ( luaVM, " collisions" , " setElementCollisionsEnabled" , " getElementCollisionsEnabled" );
192
- lua_classvariable ( luaVM, " position" , " setElementPosition" , " getElementPosition" , setElementPosition, OOP_getElementPosition );
193
- lua_classvariable ( luaVM, " rotation" , " setElementRotation" , " getElementRotation" , OOP_setElementRotation, OOP_getElementRotation );
194
- lua_classvariable ( luaVM, " matrix" , " setElementMatrix" , " getElementMatrix" , setElementMatrix, OOP_getElementMatrix );
195
- lua_classvariable ( luaVM, " velocity" , " setElementVelocity" , " getElementVelocity" , setElementVelocity, OOP_getElementVelocity );
196
- lua_classvariable ( luaVM, " isElement" , NULL , " isElement" );
197
- // lua_classvariable ( luaVM, "data", "setElementData", "getElementData", OOP_setElementData, OOP_getElementData );
198
- // lua_classvariable ( luaVM, "visibility", "setElementVisibleTo", "isElementVisibleTo", OOP_setElementVisibleTo, CLuaOOPDefs::IsElementVisibleTo ); // .visibility[john]=false
199
-
200
- lua_registerclass ( luaVM, " Element" );
95
+ }
96
+
97
+ // TODO: specials
98
+ void CLuaElementDefs::AddClass ( lua_State* luaVM )
99
+ {
100
+ lua_newclass ( luaVM );
101
+
102
+ lua_classfunction ( luaVM, " getByID" , " getElementByID" );
103
+ lua_classfunction ( luaVM, " getAllByType" , " getElementsByType" );
104
+ lua_classfunction ( luaVM, " getByIndex" , " getElementByIndex" );
105
+
106
+ lua_classfunction ( luaVM, " create" , " createElement" );
107
+ lua_classfunction ( luaVM, " clone" , " cloneElement" );
108
+ lua_classfunction ( luaVM, " destroy" , " destroyElement" );
109
+ lua_classfunction ( luaVM, " clearVisibility" , " clearElementVisibleTo" );
110
+ lua_classfunction ( luaVM, " attach" , " attachElements" );
111
+ lua_classfunction ( luaVM, " detach" , " detachElements" );
112
+ lua_classfunction ( luaVM, " removeData" , " removeElementData" );
113
+
114
+ lua_classfunction ( luaVM, " setParent" , " setElementParent" );
115
+ lua_classfunction ( luaVM, " setVelocity" , " setElementVelocity" );
116
+ lua_classfunction ( luaVM, " setFrozen" , " setElementFrozen" );
117
+ lua_classfunction ( luaVM, " setHealth" , " setElementHealth" );
118
+ lua_classfunction ( luaVM, " setModel" , " setElementModel" );
119
+ lua_classfunction ( luaVM, " setSyncer" , " setElementSyncer" );
120
+ lua_classfunction ( luaVM, " setAlpha" , " setElementAlpha" );
121
+ lua_classfunction ( luaVM, " setDoubleSided" , " setElementDoubleSided" );
122
+ lua_classfunction ( luaVM, " setCollisionsEnabled" , " setElementCollisionsEnabled" );
123
+ lua_classfunction ( luaVM, " setData" , " setElementData" );
124
+ lua_classfunction ( luaVM, " setPosition" , " setElementPosition" );
125
+ lua_classfunction ( luaVM, " setRotation" , " setElementRotation" );
126
+ lua_classfunction ( luaVM, " setVelocity" , " setElementVelocity" );
127
+ lua_classfunction ( luaVM, " setMatrix" , " setElementMatrix" );
128
+ lua_classfunction ( luaVM, " setID" , " setElementID" );
129
+ lua_classfunction ( luaVM, " setInterior" , " setElementInterior" );
130
+ lua_classfunction ( luaVM, " setDimension" , " setElementDimension" );
131
+ lua_classfunction ( luaVM, " setLowLOD" , " setLowLODElement" );
132
+ lua_classfunction ( luaVM, " setAttachedOffsets" , " setElementAttachedOffsets" );
133
+ lua_classfunction ( luaVM, " setCallPropagationEnabled" , " setElementCallPropagationEnabled" );
134
+
135
+ lua_classfunction ( luaVM, " getAttachedOffsets" , " getElementAttachedOffsets" );
136
+ lua_classfunction ( luaVM, " getChild" , " getElementChild" );
137
+ lua_classfunction ( luaVM, " getChildren" , " getElementChildren" );
138
+ lua_classfunction ( luaVM, " getParent" , " getElementParent" );
139
+ lua_classfunction ( luaVM, " getAttachedElements" , " getAttachedElements" );
140
+ lua_classfunction ( luaVM, " getAttachedTo" , " getElementAttachedTo" );
141
+ lua_classfunction ( luaVM, " getVelocity" , " getElementVelocity" , OOP_getElementVelocity );
142
+ lua_classfunction ( luaVM, " getID" , " getElementID" );
143
+ lua_classfunction ( luaVM, " getZoneName" , " getElementZoneName" );
144
+ lua_classfunction ( luaVM, " getAlpha" , " getElementAlpha" );
145
+ lua_classfunction ( luaVM, " getHealth" , " getElementHealth" );
146
+ lua_classfunction ( luaVM, " getModel" , " getElementModel" );
147
+ lua_classfunction ( luaVM, " getChildrenCount" , " getElementChildrenCount" );
148
+ lua_classfunction ( luaVM, " getSyncer" , " getElementSyncer" );
149
+ lua_classfunction ( luaVM, " getAllData" , " getAllElementData" );
150
+ lua_classfunction ( luaVM, " getColShape" , " getElementColShape" );
151
+ lua_classfunction ( luaVM, " getData" , " getElementData" );
152
+ lua_classfunction ( luaVM, " getPosition" , " getElementPosition" , OOP_getElementPosition );
153
+ lua_classfunction ( luaVM, " getRotation" , " getElementRotation" , OOP_getElementRotation );
154
+ lua_classfunction ( luaVM, " getMatrix" , " getElementMatrix" , OOP_getElementMatrix );
155
+ lua_classfunction ( luaVM, " getType" , " getElementType" );
156
+ lua_classfunction ( luaVM, " getInterior" , " getElementInterior" );
157
+ lua_classfunction ( luaVM, " getDimension" , " getElementDimension" );
158
+ lua_classfunction ( luaVM, " getLowLOD" , " getLowLODElement" );
159
+
160
+ lua_classfunction ( luaVM, " getCollisionsEnabled" , " getElementCollisionsEnabled" );
161
+ lua_classfunction ( luaVM, " isCallPropagationEnabled" , " isElementCallPropagationEnabled" );
162
+ lua_classfunction ( luaVM, " isWithinMarker" , " isElementWithinMarker" );
163
+ lua_classfunction ( luaVM, " isWithinColShape" , " isElementWithinColShape" );
164
+ lua_classfunction ( luaVM, " isFrozen" , " isElementFrozen" );
165
+ lua_classfunction ( luaVM, " isInWater" , " isElementInWater" );
166
+ lua_classfunction ( luaVM, " isDoubleSided" , " isElementDoubleSided" );
167
+ lua_classfunction ( luaVM, " isVisibleTo" , " isElementVisibleTo" );
168
+ lua_classfunction ( luaVM, " isLowLOD" , " isElementLowLOD" );
169
+ lua_classfunction ( luaVM, " isAttached" , " isElementAttached" );
170
+
171
+ lua_classvariable ( luaVM, " id" , " setElementID" , " getElementID" );
172
+ lua_classvariable ( luaVM, " callPropagationEnabled" , " setElementCallPropagationEnabled" , " isElementCallPropagationEnabled" );
173
+ lua_classvariable ( luaVM, " parent" , " setElementParent" , " getElementParent" );
174
+ lua_classvariable ( luaVM, " zoneName" , NULL , " getElementZoneName" );
175
+ lua_classvariable ( luaVM, " attachedTo" , " attachElements" , " getElementAttachedTo" );
176
+ lua_classvariable ( luaVM, " children" , NULL , " getElementChildren" );
177
+ lua_classvariable ( luaVM, " frozen" , " setElementFrozen" , " isElementFrozen" );
178
+ lua_classvariable ( luaVM, " attachedElements" , NULL , " getAttachedElements" );
179
+ lua_classvariable ( luaVM, " inWater" , NULL , " isElementInWater" );
180
+ lua_classvariable ( luaVM, " health" , " setElementHealth" , " getElementHealth" );
181
+ lua_classvariable ( luaVM, " alpha" , " setElementAlpha" , " getElementAlpha" );
182
+ lua_classvariable ( luaVM, " type" , NULL , " getElementType" );
183
+ lua_classvariable ( luaVM, " dimension" , " setElementDimension" , " getElementDimension" );
184
+ lua_classvariable ( luaVM, " doubleSided" , " setElementDoubleSided" , " isElementDoubleSided" );
185
+ lua_classvariable ( luaVM, " model" , " setElementModel" , " getElementModel" );
186
+ lua_classvariable ( luaVM, " lowLOD" , " setLowLODElement" , " getLowLODElement" );
187
+ lua_classvariable ( luaVM, " syncer" , NULL , " getElementSyncer" );
188
+ lua_classvariable ( luaVM, " childrenCount" , NULL , " getElementChildrenCount" );
189
+ lua_classvariable ( luaVM, " interior" , " setElementInterior" , " getElementInterior" );
190
+ lua_classvariable ( luaVM, " colShape" , NULL , " getElementColShape" );
191
+ lua_classvariable ( luaVM, " collisions" , " setElementCollisionsEnabled" , " getElementCollisionsEnabled" );
192
+ lua_classvariable ( luaVM, " position" , " setElementPosition" , " getElementPosition" , setElementPosition, OOP_getElementPosition );
193
+ lua_classvariable ( luaVM, " rotation" , " setElementRotation" , " getElementRotation" , OOP_setElementRotation, OOP_getElementRotation );
194
+ lua_classvariable ( luaVM, " matrix" , " setElementMatrix" , " getElementMatrix" , setElementMatrix, OOP_getElementMatrix );
195
+ lua_classvariable ( luaVM, " velocity" , " setElementVelocity" , " getElementVelocity" , setElementVelocity, OOP_getElementVelocity );
196
+ lua_classvariable ( luaVM, " isElement" , NULL , " isElement" );
197
+ // lua_classvariable ( luaVM, "data", "setElementData", "getElementData", OOP_setElementData, OOP_getElementData );
198
+ // lua_classvariable ( luaVM, "visibility", "setElementVisibleTo", "isElementVisibleTo", OOP_setElementVisibleTo, CLuaOOPDefs::IsElementVisibleTo ); // .visibility[john]=false
199
+
200
+ lua_registerclass ( luaVM, " Element" );
201
201
}
202
202
203
203
int CLuaElementDefs::createElement ( lua_State* luaVM )
0 commit comments