Commit eaddd940 authored by salix5's avatar salix5 Committed by GitHub

add GetID() (#1708)

parent e9452e66
......@@ -4,6 +4,15 @@ POS_FACEUP_DEFENCE=POS_FACEUP_DEFENSE
POS_FACEDOWN_DEFENCE=POS_FACEDOWN_DEFENSE
RACE_CYBERS=RACE_CYBERSE
function GetID()
local str=string.match(debug.getinfo(2,"S")["source"],"c%d+%.lua")
str=string.sub(str,1,string.len(str)-4)
local scard=_G[str]
local id=tonumber(string.sub(str,2))
local offset=id<100000000 and 1 or 100
return scard,id,offset
end
--the lua version of the bit32 lib, which is deprecated in lua 5.3
bit={}
function bit.band(a,b)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment