File tree 4 files changed +78
-1
lines changed
4 files changed +78
-1
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ Set(SOURCEPYTHON_CONVERSIONS_MODULE_SOURCES
166
166
# Cvars module.
167
167
# ------------------------------------------------------------------
168
168
Set (SOURCEPYTHON_CVARS_MODULE_HEADERS
169
+ core/modules/cvars/${SOURCE_ENGINE} /cvars_wrap.h
169
170
)
170
171
171
172
Set (SOURCEPYTHON_CVARS_MODULE_SOURCES
Original file line number Diff line number Diff line change
1
+ /* *
2
+ * =============================================================================
3
+ * Source Python
4
+ * Copyright (C) 2014 Source Python Development Team. All rights reserved.
5
+ * =============================================================================
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify it under
8
+ * the terms of the GNU General Public License, version 3.0, as published by the
9
+ * Free Software Foundation.
10
+ *
11
+ * This program is distributed in the hope that it will be useful, but WITHOUT
12
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
+ * details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License along with
17
+ * this program. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ * As a special exception, the Source Python Team gives you permission
20
+ * to link the code of this program (as well as its derivative works) to
21
+ * "Half-Life 2," the "Source Engine," and any Game MODs that run on software
22
+ * by the Valve Corporation. You must obey the GNU General Public License in
23
+ * all respects for all other code used. Additionally, the Source.Python
24
+ * Development Team grants this exception to all derivative works.
25
+ */
26
+
27
+ #include " icvar.h"
28
+
29
+ class ICVarExt
30
+ {
31
+ public:
32
+ static ConCommandBase* GetCommands (ICvar* pCvar)
33
+ {
34
+ ICvar::Iterator iter (pCvar);
35
+ iter.SetFirst ();
36
+ return iter.Get ();
37
+ };
38
+ };
Original file line number Diff line number Diff line change 32
32
#include " modules/export_main.h"
33
33
#include " modules/memory/memory_tools.h"
34
34
35
+ #include ENGINE_INCLUDE_PATH(cvars_wrap.h)
36
+
35
37
36
38
// -----------------------------------------------------------------------------
37
39
// External variables
@@ -92,7 +94,7 @@ void export_cvar_interface()
92
94
)
93
95
94
96
.def (" get_commands" ,
95
- GET_METHOD (ConCommandBase *, ICvar, GetCommands) ,
97
+ ICVarExt:: GetCommands,
96
98
" Get first ConCommandBase to allow iteration." ,
97
99
reference_existing_object_policy ()
98
100
)
Original file line number Diff line number Diff line change
1
+ /* *
2
+ * =============================================================================
3
+ * Source Python
4
+ * Copyright (C) 2014 Source Python Development Team. All rights reserved.
5
+ * =============================================================================
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify it under
8
+ * the terms of the GNU General Public License, version 3.0, as published by the
9
+ * Free Software Foundation.
10
+ *
11
+ * This program is distributed in the hope that it will be useful, but WITHOUT
12
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
+ * details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License along with
17
+ * this program. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ * As a special exception, the Source Python Team gives you permission
20
+ * to link the code of this program (as well as its derivative works) to
21
+ * "Half-Life 2," the "Source Engine," and any Game MODs that run on software
22
+ * by the Valve Corporation. You must obey the GNU General Public License in
23
+ * all respects for all other code used. Additionally, the Source.Python
24
+ * Development Team grants this exception to all derivative works.
25
+ */
26
+
27
+ #include " icvar.h"
28
+
29
+ class ICVarExt
30
+ {
31
+ public:
32
+ static ConCommandBase* GetCommands (ICvar* pCvar)
33
+ {
34
+ return pCvar->GetCommands ();
35
+ };
36
+ };
You can’t perform that action at this time.
0 commit comments