From f473f13585e1bc901bfeb05cd5a9bb35489595da Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Tue, 17 Jul 2012 12:02:03 +0000 Subject: Simple health regeneration system Prepared for food git-svn-id: http://mc-server.googlecode.com/svn/trunk@679 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/squirrelbindings/SquirrelBindings.cpp | 14 +++----------- source/squirrelbindings/SquirrelBindings.h | 2 +- source/squirrelbindings/SquirrelFunctions.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 13 deletions(-) (limited to 'source/squirrelbindings') diff --git a/source/squirrelbindings/SquirrelBindings.cpp b/source/squirrelbindings/SquirrelBindings.cpp index f0291b39b..c24b82c70 100644 --- a/source/squirrelbindings/SquirrelBindings.cpp +++ b/source/squirrelbindings/SquirrelBindings.cpp @@ -9,8 +9,7 @@ using namespace Sqrat; - - +#if USE_SQUIRREL void BindSquirrel(HSQUIRRELVM vm) { RootTable() @@ -91,12 +90,6 @@ void BindSquirrel(HSQUIRRELVM vm) .Func("GetMetaData", &cPawn::GetMetaData) .Func("SetMaxHealth", &cPawn::SetMaxHealth) .Func("GetMaxHealth", &cPawn::GetMaxHealth) - .Func("GetMaxFood", &cPawn::GetMaxFood) - .Func("GetFood", &cPawn::GetFood) - .Func("GetMaxFoodSaturation", &cPawn::GetMaxFoodSaturation) - .Func("GetFoodSaturation", &cPawn::GetFoodSaturation) - .Func("SetMaxFoodLevel", &cPawn::SetMaxFoodLevel) - .Func("GetMaxFoodLevel", &cPawn::SetMaxFoodLevel) ); RootTable().Bind("cPlayer", DerivedClass() @@ -137,8 +130,6 @@ void BindSquirrel(HSQUIRRELVM vm) .Func("MoveToWorld", &cPlayer::MoveToWorld) .Func("GetLoadedWorldName", &cPlayer::GetLoadedWorldName) .Func("UseEquippedItem", &cPlayer::UseEquippedItem) - .Func("EatItem", &cPlayer::EatItem) - ); RootTable().Bind("StringArray", Class() @@ -175,5 +166,6 @@ void BindSquirrel(HSQUIRRELVM vm) .Const("WeatherChanged", cPluginManager::HOOK_WEATHER_CHANGED) .Const("UpdatingSign", cPluginManager::HOOK_UPDATING_SIGN) .Const("UpdatedSign", cPluginManager::HOOK_UPDATED_SIGN)); +} -} \ No newline at end of file +#endif \ No newline at end of file diff --git a/source/squirrelbindings/SquirrelBindings.h b/source/squirrelbindings/SquirrelBindings.h index 1b71f5e86..d5aee170a 100644 --- a/source/squirrelbindings/SquirrelBindings.h +++ b/source/squirrelbindings/SquirrelBindings.h @@ -1,7 +1,7 @@ #pragma once -#define USE_SQUIRREL 1 +#define USE_SQUIRREL 0 #if USE_SQUIRREL diff --git a/source/squirrelbindings/SquirrelFunctions.cpp b/source/squirrelbindings/SquirrelFunctions.cpp index 88871369d..b965c63ab 100644 --- a/source/squirrelbindings/SquirrelFunctions.cpp +++ b/source/squirrelbindings/SquirrelFunctions.cpp @@ -3,6 +3,9 @@ #include "SquirrelFunctions.h" #include "SquirrelBindings.h" + +#if USE_SQUIRREL + static HSQUIRRELVM squirrelvm = NULL; SQInteger runtimeErrorHandler(HSQUIRRELVM a_VM) @@ -62,4 +65,6 @@ void CloseSquirrelVM() void sqPrint(SQChar * text) { LOGINFO("%s", text); -} \ No newline at end of file +} + +#endif \ No newline at end of file -- cgit v1.2.3