Quickbuild and Destroyable reintegration

This commit is contained in:
David Markowitz
2023-06-11 04:37:53 -07:00
parent 77dc6ff312
commit 5f139c75e0
7 changed files with 126 additions and 70 deletions

View File

@@ -312,11 +312,8 @@
#include "WildNinjaSensei.h"
#include "WildNinjaBricks.h"
//Big bad global bc this is a namespace and not a class:
InvalidScript* invalidToReturn = new InvalidScript();
std::map<std::string, CppScripts::Script*> m_Scripts;
// yeah sorry darwin ill fix the global later
InvalidScript* CppScripts::invalidToReturn = new InvalidScript();
std::map<std::string, CppScripts::Script*> CppScripts::m_Scripts;
CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scriptName) {
Script* script;

View File

@@ -7,11 +7,15 @@
class User;
class Entity;
class NiPoint3;
class InvalidScript;
enum class eMissionState : int32_t;
enum class ePetTamingNotifyType : uint32_t;
enum class eRebuildState : uint32_t;
namespace CppScripts {
extern InvalidScript* invalidToReturn;
extern std::map<std::string, CppScripts::Script*> m_Scripts;
/**
* Base class for all scripts. Includes virtual methods to be overridden to handle LUA equivelent events.
*
@@ -357,7 +361,7 @@ namespace CppScripts {
* @param player the player to remove
* @param canceled if it was done via the cancel button
*/
virtual void OnRequestActivityExit(Entity* sender, LWOOBJID player, bool canceled){};
virtual void OnRequestActivityExit(Entity* sender, LWOOBJID player, bool canceled) {};
};
Script* GetScript(Entity* parent, const std::string& scriptName);