544 LuaError('Lua: Wrong number of parameters passed to GetClanColor!'); |
544 LuaError('Lua: Wrong number of parameters passed to GetClanColor!'); |
545 lua_pushnil(L); // return value on stack (nil) |
545 lua_pushnil(L); // return value on stack (nil) |
546 end |
546 end |
547 else lua_pushinteger(L, ClansArray[lua_tointeger(L, 1)]^.Color shl 8 or $FF); |
547 else lua_pushinteger(L, ClansArray[lua_tointeger(L, 1)]^.Color shl 8 or $FF); |
548 lc_getclancolor:= 1 |
548 lc_getclancolor:= 1 |
|
549 end; |
|
550 |
|
551 function lc_setclancolor(L : Plua_State) : LongInt; Cdecl; |
|
552 var gear : PGear; |
|
553 begin |
|
554 if lua_gettop(L) <> 2 then |
|
555 LuaError('Lua: Wrong number of parameters passed to SetClanColor!') |
|
556 else ClansArray[lua_tointeger(L, 1)]^.Color:= lua_tointeger(L, 2) shr 8; |
|
557 lc_setclancolor:= 0 |
549 end; |
558 end; |
550 |
559 |
551 function lc_gethogteamname(L : Plua_State) : LongInt; Cdecl; |
560 function lc_gethogteamname(L : Plua_State) : LongInt; Cdecl; |
552 var gear : PGear; |
561 var gear : PGear; |
553 begin |
562 begin |
1602 lua_register(luaState, 'SetHealth', @lc_sethealth); |
1611 lua_register(luaState, 'SetHealth', @lc_sethealth); |
1603 lua_register(luaState, 'GetHealth', @lc_gethealth); |
1612 lua_register(luaState, 'GetHealth', @lc_gethealth); |
1604 lua_register(luaState, 'SetEffect', @lc_seteffect); |
1613 lua_register(luaState, 'SetEffect', @lc_seteffect); |
1605 lua_register(luaState, 'GetHogClan', @lc_gethogclan); |
1614 lua_register(luaState, 'GetHogClan', @lc_gethogclan); |
1606 lua_register(luaState, 'GetClanColor', @lc_getclancolor); |
1615 lua_register(luaState, 'GetClanColor', @lc_getclancolor); |
|
1616 lua_register(luaState, 'SetClanColor', @lc_setclancolor); |
1607 lua_register(luaState, 'GetHogTeamName', @lc_gethogteamname); |
1617 lua_register(luaState, 'GetHogTeamName', @lc_gethogteamname); |
1608 lua_register(luaState, 'GetHogName', @lc_gethogname); |
1618 lua_register(luaState, 'GetHogName', @lc_gethogname); |
1609 lua_register(luaState, 'GetHogLevel', @lc_gethoglevel); |
1619 lua_register(luaState, 'GetHogLevel', @lc_gethoglevel); |
1610 lua_register(luaState, 'SetHogLevel', @lc_sethoglevel); |
1620 lua_register(luaState, 'SetHogLevel', @lc_sethoglevel); |
1611 lua_register(luaState, 'GetX', @lc_getx); |
1621 lua_register(luaState, 'GetX', @lc_getx); |