mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fix build
This commit is contained in:
		| @@ -365,13 +365,6 @@ void CCallback::unregisterBattleInterface(std::shared_ptr<IBattleEventsReceiver> | |||||||
| 	cl->additionalBattleInts[*player] -= battleEvents; | 	cl->additionalBattleInts[*player] -= battleEvents; | ||||||
| } | } | ||||||
|  |  | ||||||
| #if SCRIPTING_ENABLED |  | ||||||
| scripting::Pool * CBattleCallback::getContextPool() const |  | ||||||
| { |  | ||||||
| 	return cl->getGlobalContextPool(); |  | ||||||
| } |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| CBattleCallback::CBattleCallback(std::optional<PlayerColor> player, CClient * C): | CBattleCallback::CBattleCallback(std::optional<PlayerColor> player, CClient * C): | ||||||
| 	cl(C), | 	cl(C), | ||||||
| 	player(player) | 	player(player) | ||||||
|   | |||||||
| @@ -134,10 +134,6 @@ public: | |||||||
| 	void onBattleStarted(const IBattleInfo * info); | 	void onBattleStarted(const IBattleInfo * info); | ||||||
| 	void onBattleEnded(const BattleID & battleID); | 	void onBattleEnded(const BattleID & battleID); | ||||||
|  |  | ||||||
| #if SCRIPTING_ENABLED |  | ||||||
| 	scripting::Pool * getContextPool() const override; |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| 	friend class CCallback; | 	friend class CCallback; | ||||||
| 	friend class CClient; | 	friend class CClient; | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -693,11 +693,6 @@ scripting::Pool * CClient::getGlobalContextPool() const | |||||||
| { | { | ||||||
| 	return clientScripts.get(); | 	return clientScripts.get(); | ||||||
| } | } | ||||||
|  |  | ||||||
| scripting::Pool * CClient::getContextPool() const |  | ||||||
| { |  | ||||||
| 	return clientScripts.get(); |  | ||||||
| } |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| void CClient::reinitScripting() | void CClient::reinitScripting() | ||||||
|   | |||||||
| @@ -220,7 +220,6 @@ public: | |||||||
|  |  | ||||||
| #if SCRIPTING_ENABLED | #if SCRIPTING_ENABLED | ||||||
| 	scripting::Pool * getGlobalContextPool() const override; | 	scripting::Pool * getGlobalContextPool() const override; | ||||||
| 	scripting::Pool * getContextPool() const override; |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| private: | private: | ||||||
|   | |||||||
| @@ -22,6 +22,13 @@ CPlayerBattleCallback::CPlayerBattleCallback(const IBattleInfo * battle, PlayerC | |||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #if SCRIPTING_ENABLED | ||||||
|  | scripting::Pool * CPlayerBattleCallback::getContextPool() const | ||||||
|  | { | ||||||
|  | 	return nullptr; //TODO cl->getGlobalContextPool(); | ||||||
|  | } | ||||||
|  | #endif | ||||||
|  |  | ||||||
| const IBattleInfo * CPlayerBattleCallback::getBattle() const | const IBattleInfo * CPlayerBattleCallback::getBattle() const | ||||||
| { | { | ||||||
| 	return battle; | 	return battle; | ||||||
|   | |||||||
| @@ -22,6 +22,10 @@ class DLL_LINKAGE CPlayerBattleCallback : public CBattleInfoCallback | |||||||
| public: | public: | ||||||
| 	CPlayerBattleCallback(const IBattleInfo * battle, PlayerColor player); | 	CPlayerBattleCallback(const IBattleInfo * battle, PlayerColor player); | ||||||
|  |  | ||||||
|  | #if SCRIPTING_ENABLED | ||||||
|  | 	scripting::Pool * getContextPool() const override; | ||||||
|  | #endif | ||||||
|  |  | ||||||
| 	const IBattleInfo * getBattle() const override; | 	const IBattleInfo * getBattle() const override; | ||||||
| 	std::optional<PlayerColor> getPlayerID() const override; | 	std::optional<PlayerColor> getPlayerID() const override; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -75,7 +75,7 @@ LuaContext::LuaContext(const Script * source, const Environment * env_): | |||||||
| 	S.push(env->game()); | 	S.push(env->game()); | ||||||
| 	lua_setglobal(L, "GAME"); | 	lua_setglobal(L, "GAME"); | ||||||
|  |  | ||||||
| 	S.push(env->battle()); | 	S.push(env->battle(BattleID::NONE)); | ||||||
| 	lua_setglobal(L, "BATTLE"); | 	lua_setglobal(L, "BATTLE"); | ||||||
|  |  | ||||||
| 	S.push(env->eventBus()); | 	S.push(env->eventBus()); | ||||||
|   | |||||||
| @@ -4094,10 +4094,10 @@ scripting::Pool * CGameHandler::getGlobalContextPool() const | |||||||
| 	return serverScripts.get(); | 	return serverScripts.get(); | ||||||
| } | } | ||||||
|  |  | ||||||
| scripting::Pool * CGameHandler::getContextPool() const | //scripting::Pool * CGameHandler::getContextPool() const | ||||||
| { | //{ | ||||||
| 	return serverScripts.get(); | //	return serverScripts.get(); | ||||||
| } | //} | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| void CGameHandler::createObject(const int3 & visitablePosition, Obj type, int32_t subtype) | void CGameHandler::createObject(const int3 & visitablePosition, Obj type, int32_t subtype) | ||||||
|   | |||||||
| @@ -270,7 +270,7 @@ public: | |||||||
|  |  | ||||||
| #if SCRIPTING_ENABLED | #if SCRIPTING_ENABLED | ||||||
| 	scripting::Pool * getGlobalContextPool() const override; | 	scripting::Pool * getGlobalContextPool() const override; | ||||||
| 	scripting::Pool * getContextPool() const override; | //	scripting::Pool * getContextPool() const override; | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| 	friend class CVCMIServer; | 	friend class CVCMIServer; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user