1358 lua_pushnil(L); |
1358 lua_pushnil(L); |
1359 end |
1359 end |
1360 else |
1360 else |
1361 lua_pushnil(L); // return value on stack (nil) |
1361 lua_pushnil(L); // return value on stack (nil) |
1362 lc_gethogflag:= 1 |
1362 lc_gethogflag:= 1 |
|
1363 end; |
|
1364 |
|
1365 function lc_gethogfort(L : Plua_State) : LongInt; Cdecl; |
|
1366 var gear : PGear; |
|
1367 begin |
|
1368 if CheckLuaParamCount(L, 1, 'GetHogFort', 'gearUid') then |
|
1369 begin |
|
1370 gear:= GearByUID(lua_tointeger(L, 1)); |
|
1371 // TODO error messages |
|
1372 if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then |
|
1373 lua_pushstring(L, str2pchar(gear^.Hedgehog^.Team^.FortName)) |
|
1374 else |
|
1375 lua_pushnil(L); |
|
1376 end |
|
1377 else |
|
1378 lua_pushnil(L); // return value on stack (nil) |
|
1379 lc_gethogfort:= 1 |
1363 end; |
1380 end; |
1364 |
1381 |
1365 function lc_ishoglocal(L : Plua_State) : LongInt; Cdecl; |
1382 function lc_ishoglocal(L : Plua_State) : LongInt; Cdecl; |
1366 var gear : PGear; |
1383 var gear : PGear; |
1367 begin |
1384 begin |
3403 lua_register(luaState, _P'GetHogClan', @lc_gethogclan); |
3420 lua_register(luaState, _P'GetHogClan', @lc_gethogclan); |
3404 lua_register(luaState, _P'GetClanColor', @lc_getclancolor); |
3421 lua_register(luaState, _P'GetClanColor', @lc_getclancolor); |
3405 lua_register(luaState, _P'SetClanColor', @lc_setclancolor); |
3422 lua_register(luaState, _P'SetClanColor', @lc_setclancolor); |
3406 lua_register(luaState, _P'GetHogVoicepack', @lc_gethogvoicepack); |
3423 lua_register(luaState, _P'GetHogVoicepack', @lc_gethogvoicepack); |
3407 lua_register(luaState, _P'GetHogFlag', @lc_gethogflag); |
3424 lua_register(luaState, _P'GetHogFlag', @lc_gethogflag); |
|
3425 lua_register(luaState, _P'GetHogFort', @lc_gethogfort); |
3408 lua_register(luaState, _P'GetHogGrave', @lc_gethoggrave); |
3426 lua_register(luaState, _P'GetHogGrave', @lc_gethoggrave); |
3409 lua_register(luaState, _P'IsHogLocal', @lc_ishoglocal); |
3427 lua_register(luaState, _P'IsHogLocal', @lc_ishoglocal); |
3410 lua_register(luaState, _P'GetHogTeamName', @lc_gethogteamname); |
3428 lua_register(luaState, _P'GetHogTeamName', @lc_gethogteamname); |
3411 lua_register(luaState, _P'SetHogTeamName', @lc_sethogteamname); |
3429 lua_register(luaState, _P'SetHogTeamName', @lc_sethogteamname); |
3412 lua_register(luaState, _P'GetHogName', @lc_gethogname); |
3430 lua_register(luaState, _P'GetHogName', @lc_gethogname); |