Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-2pick
Commits
fc21d5dd
Commit
fc21d5dd
authored
Oct 20, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Duel.SetMetatable(userdata, table)
parent
6e291f6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+10
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+1
-0
No files found.
ocgcore/interpreter.cpp
View file @
fc21d5dd
...
...
@@ -370,6 +370,7 @@ static const struct luaL_Reg duellib[] = {
{
"ReadCard"
,
scriptlib
::
duel_read_card
},
{
"Exile"
,
scriptlib
::
duel_exile
},
{
"DisableActionCheck"
,
scriptlib
::
duel_disable_action_check
},
{
"SetMetatable"
,
scriptlib
::
duel_setmetatable
},
{
"EnableGlobalFlag"
,
scriptlib
::
duel_enable_global_flag
},
{
"GetLP"
,
scriptlib
::
duel_get_lp
},
...
...
ocgcore/libduel.cpp
View file @
fc21d5dd
...
...
@@ -154,6 +154,16 @@ int32 scriptlib::duel_disable_action_check(lua_State *L) {
pduel
->
lua
->
disable_action_check
=
dis
;
return
0
;
}
int32
scriptlib
::
duel_setmetatable
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
if
(
!
lua_isuserdata
(
L
,
1
))
luaL_error
(
L
,
"Parameter 1 should be
\"
Card
\"
or
\"
Effect
\"
or
\"
Group
\"
."
);
if
(
!
lua_istable
(
L
,
2
))
luaL_error
(
L
,
"Parameter 2 should be
\"
Table
\"
."
);
lua_settop
(
L
,
2
);
lua_setmetatable
(
L
,
1
);
return
0
;
}
int32
scriptlib
::
duel_enable_global_flag
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
...
...
ocgcore/scriptlib.h
View file @
fc21d5dd
...
...
@@ -32,6 +32,7 @@ public:
static
int32
duel_read_card
(
lua_State
*
L
);
static
int32
duel_exile
(
lua_State
*
L
);
static
int32
duel_disable_action_check
(
lua_State
*
L
);
static
int32
duel_setmetatable
(
lua_State
*
L
);
//card lib
static
int32
card_get_code
(
lua_State
*
L
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment