1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
vcmi/scripting/lua
Ivan Savenko 3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
..
api Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
CMakeLists.txt Removed cmake_modules/VCMI_lib macro, use it directly in place 2024-02-11 20:38:24 +02:00
LuaCallWrapper.h vcmi: modernize headers 2023-04-30 13:35:54 +03:00
LuaFunctor.h fix building vcmiLua for iOS 2022-09-24 15:55:24 +03:00
LuaReference.cpp vcmi: modernize lua 2023-02-08 13:51:22 +03:00
LuaReference.h vcmi: modernize lua 2023-02-08 13:51:22 +03:00
LuaScriptingContext.cpp lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
LuaScriptingContext.h fix building vcmiLua for iOS 2022-09-24 15:55:24 +03:00
LuaScriptModule.cpp Reduced usage of global variables - removed or made const / constexpr 2024-02-12 13:49:45 +02:00
LuaScriptModule.h fix building vcmiLua for iOS 2022-09-24 15:55:24 +03:00
LuaSpellEffect.cpp Renamed JsonNode::meta to more logical modScope. Member is now private 2024-02-26 12:55:49 +02:00
LuaSpellEffect.h Remove redundant virtual specifiers 2024-02-10 20:46:13 +01:00
LuaStack.cpp Renamed JsonNode::meta to more logical modScope. Member is now private 2024-02-26 12:55:49 +02:00
LuaStack.h Fix SonarCloud issues 2024-03-02 14:08:03 +01:00
LuaWrapper.h Fix SonarCloud issues 2024-03-02 14:08:03 +01:00
StdInc.cpp Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
StdInc.h Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00