diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index f5887996..b276b6a5 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -1499,7 +1499,7 @@ void Entity::RequestActivityExit(Entity* sender, LWOOBJID player, bool canceled) CppScripts::Script* const Entity::GetScript() { auto* scriptComponent = GetComponent(); - auto* script = scriptComponent ? scriptComponent->GetScript() : CppScripts::GetInvalidScript(); + auto* script = scriptComponent ? scriptComponent->GetScript() : &CppScripts::GetInvalidScript(); DluAssert(script != nullptr); return script; } @@ -2175,7 +2175,7 @@ void Entity::SetRespawnRot(const NiQuaternion& rotation) { int32_t Entity::GetCollisionGroup() const { for (const auto* component : m_Components | std::views::values) { - auto* compToCheck = dynamic_cast(component); + auto* compToCheck = dynamic_cast(component); if (compToCheck) { return compToCheck->GetCollisionGroup(); } diff --git a/dGame/dComponents/InventoryComponent.cpp b/dGame/dComponents/InventoryComponent.cpp index 0bea9fe4..a6d5285f 100644 --- a/dGame/dComponents/InventoryComponent.cpp +++ b/dGame/dComponents/InventoryComponent.cpp @@ -913,11 +913,8 @@ void InventoryComponent::EquipScripts(Item* equippedItem) { if (scriptComponentID > -1) { CDScriptComponentTable* scriptCompTable = CDClientManager::GetTable(); CDScriptComponent scriptCompData = scriptCompTable->GetByID(scriptComponentID); - auto* itemScript = CppScripts::GetScript(m_Parent, scriptCompData.script_name); - if (!itemScript) { - LOG("null script?"); - } - itemScript->OnFactionTriggerItemEquipped(m_Parent, equippedItem->GetId()); + auto& itemScript = CppScripts::GetScript(m_Parent, scriptCompData.script_name); + itemScript.OnFactionTriggerItemEquipped(m_Parent, equippedItem->GetId()); } } @@ -928,11 +925,8 @@ void InventoryComponent::UnequipScripts(Item* unequippedItem) { if (scriptComponentID > -1) { CDScriptComponentTable* scriptCompTable = CDClientManager::GetTable(); CDScriptComponent scriptCompData = scriptCompTable->GetByID(scriptComponentID); - auto* itemScript = CppScripts::GetScript(m_Parent, scriptCompData.script_name); - if (!itemScript) { - LOG("null script?"); - } - itemScript->OnFactionTriggerItemUnequipped(m_Parent, unequippedItem->GetId()); + auto& itemScript = CppScripts::GetScript(m_Parent, scriptCompData.script_name); + itemScript.OnFactionTriggerItemUnequipped(m_Parent, unequippedItem->GetId()); } } diff --git a/dGame/dComponents/ScriptComponent.cpp b/dGame/dComponents/ScriptComponent.cpp index d6bff5b5..a11aa223 100644 --- a/dGame/dComponents/ScriptComponent.cpp +++ b/dGame/dComponents/ScriptComponent.cpp @@ -48,5 +48,5 @@ CppScripts::Script* const ScriptComponent::GetScript() { void ScriptComponent::SetScript(const std::string& scriptName) { // Scripts are managed by the CppScripts class and are effecitvely singletons // and they may also be used by other script components so DON'T delete them. - m_Script = CppScripts::GetScript(m_Parent, scriptName); + m_Script = &CppScripts::GetScript(m_Parent, scriptName); } diff --git a/dScripts/CppScripts.cpp b/dScripts/CppScripts.cpp index 54328451..acaf3e85 100644 --- a/dScripts/CppScripts.cpp +++ b/dScripts/CppScripts.cpp @@ -338,358 +338,358 @@ namespace { // This is in the translation unit instead of the header to prevent weird linker errors InvalidScript InvalidToReturn; std::map g_Scripts; - std::map> scriptLoader = { + std::map ()>> scriptLoader = { //VE / AG - { "scripts\\ai\\AG\\L_AG_SHIP_PLAYER_DEATH_TRIGGER.lua", []() { return new AgShipPlayerDeathTrigger(); } }, - {"scripts\\ai\\NP\\L_NPC_NP_SPACEMAN_BOB.lua", []() { return new NpcNpSpacemanBob(); } }, - {"scripts\\ai\\AG\\L_AG_SPACE_STUFF.lua", []() { return new AgSpaceStuff();} }, - {"scripts\\ai\\AG\\L_AG_SHIP_SHAKE.lua", []() { return new AgShipShake();}}, - {"scripts\\ai\\AG\\L_AG_SHIP_PLAYER_SHOCK_SERVER.lua", []() { return new AgShipPlayerShockServer();} }, - {"scripts\\ai\\AG\\L_AG_IMAG_SMASHABLE.lua", []() { return new AgImagSmashable();} }, - {"scripts\\02_server\\Map\\General\\L_STORY_BOX_INTERACT_SERVER.lua", []() { return new StoryBoxInteractServer();} }, - {"scripts\\02_server\\Map\\General\\L_BINOCULARS.lua", []() { return new Binoculars();} }, - {"scripts\\ai\\WILD\\L_ALL_CRATE_CHICKEN.lua", []() { return new AllCrateChicken();} }, + { "scripts\\ai\\AG\\L_AG_SHIP_PLAYER_DEATH_TRIGGER.lua", []() { return std::make_unique(); } }, + {"scripts\\ai\\NP\\L_NPC_NP_SPACEMAN_BOB.lua", []() { return std::make_unique(); } }, + {"scripts\\ai\\AG\\L_AG_SPACE_STUFF.lua", []() { return std::make_unique();} }, + {"scripts\\ai\\AG\\L_AG_SHIP_SHAKE.lua", []() { return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_SHIP_PLAYER_SHOCK_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\ai\\AG\\L_AG_IMAG_SMASHABLE.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Map\\General\\L_STORY_BOX_INTERACT_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Map\\General\\L_BINOCULARS.lua", []() { return std::make_unique();} }, + {"scripts\\ai\\WILD\\L_ALL_CRATE_CHICKEN.lua", []() { return std::make_unique();} }, // Broken? (below) - {"scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_SMASHABLE.lua", []() { return new RockHydrantSmashable();} }, - {"scripts\\02_server\\Map\\SS\\L_SS_MODULAR_BUILD_SERVER.lua", []() { return new SsModularBuildServer();} }, - {"scripts\\02_server\\Map\\Property\\AG_Small\\L_ZONE_AG_PROPERTY.lua", []() { return new ZoneAgProperty();} }, + {"scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_SMASHABLE.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Map\\SS\\L_SS_MODULAR_BUILD_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Map\\Property\\AG_Small\\L_ZONE_AG_PROPERTY.lua", []() { return std::make_unique();} }, // this is done in Entity.cpp, not needed for our implementation (below) - {"scripts\\02_server\\Map\\General\\L_POI_MISSION.lua", []() { return new InvalidScript();} }, - {"scripts\\02_server\\Map\\General\\L_TOUCH_MISSION_UPDATE_SERVER.lua", []() { return new TouchMissionUpdateServer();} }, - {"scripts\\ai\\AG\\L_ACT_SHARK_PLAYER_DEATH_TRIGGER.lua", []() { return new ActSharkPlayerDeathTrigger();} }, - {"scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_MECH.lua", []() { return new BaseEnemyMech();} }, - {"scripts\\zone\\AG\\L_ZONE_AG_SURVIVAL.lua", []() { return new ZoneAgSurvival();} }, - {"scripts\\02_server\\Objects\\L_BUFF_STATION_SERVER.lua", []() { return new AgSurvivalBuffStation();} }, - {"scripts\\ai\\AG\\L_AG_BUS_DOOR.lua", []() { return new AgBusDoor();} }, - {"scripts\\02_server\\Equipment\\L_MAESTROM_EXTRACTICATOR_SERVER.lua", []() { return new MaestromExtracticatorServer();} }, - {"scripts\\02_server\\Map\\AG\\L_AG_CAGED_BRICKS_SERVER.lua", []() { return new AgCagedBricksServer();} }, - {"scripts\\02_server\\Map\\AG\\L_NPC_WISP_SERVER.lua", []() { return new NpcWispServer();} }, - {"scripts\\02_server\\Map\\AG\\L_NPC_EPSILON_SERVER.lua", []() { return new NpcEpsilonServer();} }, - {"scripts\\ai\\AG\\L_AG_TURRET.lua", []() {return new AgTurret();}}, - {"scripts\\ai\\AG\\L_AG_TURRET_FOR_SHIP.lua", []() { return new AgTurret();}}, - {"scripts\\02_server\\Map\\AG\\L_AG_LASER_SENSOR_SERVER.lua", []() {return new AgLaserSensorServer();}}, - {"scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_LASER_SERVER.lua", []() {return new AgMonumentLaserServer();}}, - {"scripts\\ai\\AG\\L_AG_FANS.lua", []() {return new AgFans();}}, - {"scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_BIRDS.lua", []() {return new AgMonumentBirds();}}, - {"scripts\\02_server\\Map\\AG\\L_REMOVE_RENTAL_GEAR.lua", []() {return new RemoveRentalGear();}}, - {"scripts\\02_server\\Map\\AG\\L_NPC_NJ_ASSISTANT_SERVER.lua", []() {return new NpcNjAssistantServer();}}, - {"scripts\\ai\\AG\\L_AG_SALUTING_NPCS.lua", []() {return new AgSalutingNpcs();}}, - {"scripts\\ai\\AG\\L_AG_JET_EFFECT_SERVER.lua", []() {return new AgJetEffectServer();}}, - {"scripts\\02_server\\Enemy\\AG\\L_BOSS_SPIDER_QUEEN_ENEMY_SERVER.lua", []() {return new BossSpiderQueenEnemyServer();}}, - {"scripts\\02_server\\Map\\Property\\AG_Small\\L_ENEMY_SPIDER_SPAWNER.lua", []() {return new EnemySpiderSpawner();}}, - {"scripts/02_server/Map/Property/AG_Small/L_ENEMY_SPIDER_SPAWNER.lua", []() {return new EnemySpiderSpawner();}}, - {"scripts\\ai\\AG\\L_AG_QB_Elevator.lua", []() {return new AgQbElevator();}}, - {"scripts\\ai\\PROPERTY\\AG\\L_AG_PROP_GUARD.lua", []() {return new AgPropGuard();}}, - {"scripts\\02_server\\Map\\AG\\L_AG_BUGSPRAYER.lua", []() {return new AgBugsprayer();}}, - {"scripts\\02_server\\Map\\AG\\L_NPC_AG_COURSE_STARTER.lua", []() {return new NpcAgCourseStarter();}}, - {"scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_GOAL.lua", []() {return new AgMonumentRaceGoal();}}, - {"scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_CANCEL.lua", []() {return new AgMonumentRaceCancel();}}, - {"scripts\\02_server\\Map\\AG_Spider_Queen\\L_ZONE_AG_SPIDER_QUEEN.lua", []() {return new ZoneAgSpiderQueen();}}, - {"scripts\\02_server\\Map\\AG_Spider_Queen\\L_SPIDER_BOSS_TREASURE_CHEST_SERVER.lua", []() {return new SpiderBossTreasureChestServer();}}, - {"scripts\\02_server\\Map\\AG\\L_NPC_COWBOY_SERVER.lua", []() {return new NpcCowboyServer();}}, - {"scripts\\02_server\\Map\\Property\\AG_Med\\L_ZONE_AG_MED_PROPERTY.lua", []() {return new ZoneAgMedProperty();}}, - {"scripts\\ai\\AG\\L_AG_STROMBIE_PROPERTY.lua", []() {return new AgStromlingProperty();}}, - {"scripts\\ai\\AG\\L_AG_DARKLING_MECH.lua", []() {return new BaseEnemyMech();}}, - {"scripts\\ai\\AG\\L_AG_DARK_SPIDERLING.lua", []() {return new AgDarkSpiderling();}}, - {"scripts\\ai\\PROPERTY\\L_PROP_GUARDS.lua", []() {return new AgPropguards();}}, - {"scripts\\ai\\PROPERTY\\L_PROPERTY_FX_DAMAGE.lua", []() {return new PropertyFXDamage();}}, - {"scripts\\02_server\\Map\\AG\\L_NPC_PIRATE_SERVER.lua", []() {return new NpcPirateServer();}}, - {"scripts\\ai\\AG\\L_AG_PICNIC_BLANKET.lua", []() {return new AgPicnicBlanket();}}, - {"scripts\\02_server\\Map\\Property\\L_PROPERTY_BANK_INTERACT_SERVER.lua", []() {return new PropertyBankInteract();}}, - {"scripts\\02_server\\Enemy\\VE\\L_VE_MECH.lua", []() {return new VeMech();}}, - {"scripts\\02_server\\Map\\VE\\L_MISSION_CONSOLE_SERVER.lua", []() {return new VeMissionConsole();}}, - {"scripts\\02_server\\Map\\VE\\L_EPSILON_SERVER.lua", []() {return new VeEpsilonServer();}}, + {"scripts\\02_server\\Map\\General\\L_POI_MISSION.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Map\\General\\L_TOUCH_MISSION_UPDATE_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\ai\\AG\\L_ACT_SHARK_PLAYER_DEATH_TRIGGER.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_MECH.lua", []() { return std::make_unique();} }, + {"scripts\\zone\\AG\\L_ZONE_AG_SURVIVAL.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Objects\\L_BUFF_STATION_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\ai\\AG\\L_AG_BUS_DOOR.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Equipment\\L_MAESTROM_EXTRACTICATOR_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Map\\AG\\L_AG_CAGED_BRICKS_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Map\\AG\\L_NPC_WISP_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\02_server\\Map\\AG\\L_NPC_EPSILON_SERVER.lua", []() { return std::make_unique();} }, + {"scripts\\ai\\AG\\L_AG_TURRET.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_TURRET_FOR_SHIP.lua", []() { return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_AG_LASER_SENSOR_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_LASER_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_FANS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_AG_MONUMENT_BIRDS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_REMOVE_RENTAL_GEAR.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_NPC_NJ_ASSISTANT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_SALUTING_NPCS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_JET_EFFECT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\AG\\L_BOSS_SPIDER_QUEEN_ENEMY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\Property\\AG_Small\\L_ENEMY_SPIDER_SPAWNER.lua", []() {return std::make_unique();}}, + {"scripts/02_server/Map/Property/AG_Small/L_ENEMY_SPIDER_SPAWNER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_QB_Elevator.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\PROPERTY\\AG\\L_AG_PROP_GUARD.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_AG_BUGSPRAYER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_NPC_AG_COURSE_STARTER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_GOAL.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L__AG_MONUMENT_RACE_CANCEL.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG_Spider_Queen\\L_ZONE_AG_SPIDER_QUEEN.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG_Spider_Queen\\L_SPIDER_BOSS_TREASURE_CHEST_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_NPC_COWBOY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\Property\\AG_Med\\L_ZONE_AG_MED_PROPERTY.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_STROMBIE_PROPERTY.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_DARKLING_MECH.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_DARK_SPIDERLING.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\PROPERTY\\L_PROP_GUARDS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\PROPERTY\\L_PROPERTY_FX_DAMAGE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AG\\L_NPC_PIRATE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_PICNIC_BLANKET.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\Property\\L_PROPERTY_BANK_INTERACT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\VE\\L_VE_MECH.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\VE\\L_MISSION_CONSOLE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\VE\\L_EPSILON_SERVER.lua", []() {return std::make_unique();}}, //NS - {"scripts\\ai\\NS\\L_NS_MODULAR_BUILD.lua", []() {return new NsModularBuild();}}, - {"scripts\\ai\\NS\\L_NS_GET_FACTION_MISSION_SERVER.lua", []() {return new NsGetFactionMissionServer();}}, - {"scripts\\ai\\NS\\L_NS_QB_IMAGINATION_STATUE.lua", []() {return new NsQbImaginationStatue();}}, - {"scripts\\02_server\\Map\\NS\\CONCERT_CHOICEBUILD_MANAGER_SERVER.lua", []() {return new NsConcertChoiceBuildManager();}}, - {"scripts\\ai\\NS\\L_NS_CONCERT_CHOICEBUILD.lua", []() {return new NsConcertChoiceBuild();}}, - {"scripts\\ai\\NS\\L_NS_CONCERT_QUICKBUILD.lua", []() {return new NsConcertQuickBuild();}}, - {"scripts\\ai\\AG\\L_AG_STAGE_PLATFORMS.lua", []() {return new AgStagePlatforms();}}, - {"scripts\\ai\\NS\\L_NS_CONCERT_INSTRUMENT_QB.lua", []() {return new NsConcertInstrument();}}, - {"scripts\\ai\\NS\\L_NS_JONNY_FLAG_MISSION_SERVER.lua", []() {return new NsJohnnyMissionServer();}}, - {"scripts\\02_server\\Objects\\L_STINKY_FISH_TARGET.lua", []() {return new StinkyFishTarget();}}, - {"scripts\\zone\\PROPERTY\\NS\\L_ZONE_NS_PROPERTY.lua", []() {return new ZoneNsProperty();}}, - {"scripts\\02_server\\Map\\Property\\NS_Med\\L_ZONE_NS_MED_PROPERTY.lua", []() {return new ZoneNsMedProperty();}}, - {"scripts\\02_server\\Map\\NS\\L_NS_TOKEN_CONSOLE_SERVER.lua", []() {return new NsTokenConsoleServer();}}, - {"scripts\\02_server\\Map\\NS\\L_NS_LUP_TELEPORT.lua", []() {return new NsLupTeleport();}}, - {"scripts\\02_server\\Map\\NS\\Waves\\L_ZONE_NS_WAVES.lua", []() {return new ZoneNsWaves();}}, - {"scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HAMMERLING_ENEMY_SERVER.lua", []() {return new WaveBossHammerling();}}, - {"scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_APE_ENEMY_SERVER.lua", []() {return new WaveBossApe();}}, - {"scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_DARK_SPIDERLING_ENEMY_SERVER.lua", []() {return new WaveBossSpiderling();}}, - {"scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HORESEMEN_ENEMY_SERVER.lua", []() {return new WaveBossHorsemen();}}, - {"scripts\\02_server\\Minigame\\General\\L_MINIGAME_TREASURE_CHEST_SERVER.lua", []() {return new MinigameTreasureChestServer();}}, - {"scripts\\02_server\\Map\\NS\\L_NS_LEGO_CLUB_DOOR.lua", []() {return new NsLegoClubDoor();}}, - {"scripts/ai/NS/L_CL_RING.lua", []() {return new ClRing();}}, - {"scripts\\ai\\WILD\\L_WILD_AMBIENTS.lua", []() {return new WildAmbients();}}, - {"scripts\\ai\\NS\\NS_PP_01\\L_NS_PP_01_TELEPORT.lua", []() {return new PropertyDeathPlane();}}, - {"scripts\\02_server\\Map\\General\\L_QB_SPAWNER.lua", []() {return new QbSpawner();}}, - {"scripts\\ai\\AG\\L_AG_QB_Wall.lua", []() {return new AgQbWall();}}, + {"scripts\\ai\\NS\\L_NS_MODULAR_BUILD.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\NS\\L_NS_GET_FACTION_MISSION_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\NS\\L_NS_QB_IMAGINATION_STATUE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NS\\CONCERT_CHOICEBUILD_MANAGER_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\NS\\L_NS_CONCERT_CHOICEBUILD.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\NS\\L_NS_CONCERT_QUICKBUILD.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_STAGE_PLATFORMS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\NS\\L_NS_CONCERT_INSTRUMENT_QB.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\NS\\L_NS_JONNY_FLAG_MISSION_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Objects\\L_STINKY_FISH_TARGET.lua", []() {return std::make_unique();}}, + {"scripts\\zone\\PROPERTY\\NS\\L_ZONE_NS_PROPERTY.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\Property\\NS_Med\\L_ZONE_NS_MED_PROPERTY.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NS\\L_NS_TOKEN_CONSOLE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NS\\L_NS_LUP_TELEPORT.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NS\\Waves\\L_ZONE_NS_WAVES.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HAMMERLING_ENEMY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_APE_ENEMY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_DARK_SPIDERLING_ENEMY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\Waves\\L_WAVES_BOSS_HORESEMEN_ENEMY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Minigame\\General\\L_MINIGAME_TREASURE_CHEST_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NS\\L_NS_LEGO_CLUB_DOOR.lua", []() {return std::make_unique();}}, + {"scripts/ai/NS/L_CL_RING.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_WILD_AMBIENTS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\NS\\NS_PP_01\\L_NS_PP_01_TELEPORT.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_QB_SPAWNER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_QB_Wall.lua", []() {return std::make_unique();}}, //GF - {"scripts\\02_server\\Map\\GF\\L_GF_TORCH.lua", []() {return new GfTikiTorch();}}, - {"scripts\\ai\\GF\\L_SPECIAL_FIREPIT.lua", []() {return new GfCampfire();}}, - {"scripts\\ai\\GF\\L_GF_ORGAN.lua", []() {return new GfOrgan();}}, - {"scripts\\ai\\GF\\L_GF_BANANA.lua", []() {return new GfBanana();}}, - {"scripts\\ai\\GF\\L_GF_BANANA_CLUSTER.lua", []() {return new GfBananaCluster();}}, - {"scripts/ai/GF/L_GF_JAILKEEP_MISSION.lua", []() {return new GfJailkeepMission();}}, - {"scripts\\ai\\GF\\L_TRIGGER_AMBUSH.lua", []() {return new TriggerAmbush();}}, - {"scripts\\02_server\\Map\\GF\\L_GF_CAPTAINS_CANNON.lua", []() {return new GfCaptainsCannon();}}, - {"scripts\\02_server\\Map\\GF\\L_MAST_TELEPORT.lua", []() {return new MastTeleport();}}, - {"scripts\\ai\\GF\\L_GF_JAIL_WALLS.lua", []() {return new GfJailWalls();}}, - {"scripts\\02_server\\Map\\General\\L_QB_ENEMY_STUNNER.lua", []() {return new QbEnemyStunner();}}, + {"scripts\\02_server\\Map\\GF\\L_GF_TORCH.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_SPECIAL_FIREPIT.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_GF_ORGAN.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_GF_BANANA.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_GF_BANANA_CLUSTER.lua", []() {return std::make_unique();}}, + {"scripts/ai/GF/L_GF_JAILKEEP_MISSION.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_TRIGGER_AMBUSH.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\GF\\L_GF_CAPTAINS_CANNON.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\GF\\L_MAST_TELEPORT.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_GF_JAIL_WALLS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_QB_ENEMY_STUNNER.lua", []() {return std::make_unique();}}, //Technically also used once in AG (below) - {"scripts\\ai\\GF\\L_GF_PET_DIG_BUILD.lua", []() {return new PetDigBuild();}}, - {"scripts\\02_server\\Map\\GF\\L_SPAWN_LION_SERVER.lua", []() {return new SpawnLionServer();}}, - {"scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_APE.lua", []() {return new BaseEnemyApe();}}, - {"scripts\\02_server\\Enemy\\General\\L_GF_APE_SMASHING_QB.lua", []() {return new GfApeSmashingQB();}}, - {"scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua", []() {return new ZoneGfProperty();}}, - {"scripts\\ai\\GF\\L_GF_ARCHWAY.lua", []() {return new GfArchway();}}, - {"scripts\\ai\\GF\\L_GF_MAELSTROM_GEYSER.lua", []() {return new GfMaelstromGeyser();}}, - {"scripts\\ai\\GF\\L_PIRATE_REP.lua", []() {return new PirateRep();}}, - {"scripts\\ai\\GF\\L_GF_PARROT_CRASH.lua", []() {return new GfParrotCrash();}}, + {"scripts\\ai\\GF\\L_GF_PET_DIG_BUILD.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\GF\\L_SPAWN_LION_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_APE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\General\\L_GF_APE_SMASHING_QB.lua", []() {return std::make_unique();}}, + {"scripts\\zone\\PROPERTY\\GF\\L_ZONE_GF_PROPERTY.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_GF_ARCHWAY.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_GF_MAELSTROM_GEYSER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_PIRATE_REP.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GF\\L_GF_PARROT_CRASH.lua", []() {return std::make_unique();}}, //SG - {"scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua", []() {return new SGCannon();}}, - {"scripts\\ai\\MINIGAME\\SG_GF\\L_ZONE_SG_SERVER.lua", []() {return new ZoneSGServer();}}, + {"scripts\\ai\\MINIGAME\\SG_GF\\SERVER\\SG_CANNON.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\MINIGAME\\SG_GF\\L_ZONE_SG_SERVER.lua", []() {return std::make_unique();}}, //PR - {"scripts\\client\\ai\\PR\\L_PR_WHISTLE.lua", []() {return new PrWhistle();}}, - {"scripts\\02_server\\Map\\PR\\L_PR_SEAGULL_FLY.lua", []() {return new PrSeagullFly();}}, - {"scripts\\ai\\PETS\\L_HYDRANT_SMASHABLE.lua", []() {return new HydrantSmashable();}}, - {"scripts\\02_server\\map\\PR\\L_HYDRANT_BROKEN.lua", []() {return new HydrantBroken();}}, - {"scripts\\02_server\\Map\\General\\PET_DIG_SERVER.lua", []() {return new PetDigServer();}}, - {"scripts\\02_server\\Map\\AM\\L_SKELETON_DRAGON_PET_DIG_SERVER.lua", []() {return new PetDigServer();}}, - //{"scripts\\02_server\\Map\\AM\\L_SKELETON_DRAGON_PET_DIG_SERVER.lua", [](){return new PetDigServer();}}, - {"scripts\\client\\ai\\PR\\L_CRAB_SERVER.lua", []() {return new CrabServer();}}, - {"scripts\\02_server\\Pets\\L_PET_FROM_DIG_SERVER.lua", []() {return new PetFromDigServer();}}, - {"scripts\\02_server\\Pets\\L_PET_FROM_OBJECT_SERVER.lua", []() {return new PetFromObjectServer();}}, - {"scripts\\02_server\\Pets\\L_DAMAGING_PET.lua", []() {return new DamagingPets();}}, - {"scripts\\02_server\\Map\\PR\\L_SPAWN_GRYPHON_SERVER.lua", []() {return new SpawnGryphonServer();}}, + {"scripts\\client\\ai\\PR\\L_PR_WHISTLE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\PR\\L_PR_SEAGULL_FLY.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\PETS\\L_HYDRANT_SMASHABLE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\map\\PR\\L_HYDRANT_BROKEN.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\PET_DIG_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_SKELETON_DRAGON_PET_DIG_SERVER.lua", []() {return std::make_unique();}}, + //{"scripts\\02_server\\Map\\AM\\L_SKELETON_DRAGON_PET_DIG_SERVER.lua", [](){return std::make_unique();}}, + {"scripts\\client\\ai\\PR\\L_CRAB_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Pets\\L_PET_FROM_DIG_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Pets\\L_PET_FROM_OBJECT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Pets\\L_DAMAGING_PET.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\PR\\L_SPAWN_GRYPHON_SERVER.lua", []() {return std::make_unique();}}, //FV - {"scripts\\02_server\\Map\\FV\\L_ACT_CANDLE.lua", []() {return new FvCandle();}}, - {"scripts\\02_server\\Map\\FV\\L_ENEMY_RONIN_SPAWNER.lua", []() {return new EnemyRoninSpawner();}}, - {"scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_CAVALRY.lua", []() {return new FvMaelstromCavalry();}}, - {"scripts\\ai\\FV\\L_ACT_NINJA_TURRET_1.lua", []() {return new ActNinjaTurret();}}, - {"scripts\\02_server\\Map\\FV\\L_FV_HORSEMEN_TRIGGER.lua", []() {return new FvHorsemenTrigger();}}, - {"scripts\\ai\\FV\\L_FV_FLYING_CREVICE_DRAGON.lua", []() {return new FvFlyingCreviceDragon();}}, - {"scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_DRAGON.lua", []() {return new FvMaelstromDragon();}}, - {"scripts\\ai\\FV\\L_FV_DRAGON_SMASHING_GOLEM_QB.lua", []() {return new FvDragonSmashingGolemQb();}}, - {"scripts\\02_server\\Enemy\\General\\L_TREASURE_CHEST_DRAGON_SERVER.lua", []() {return new TreasureChestDragonServer();}}, - {"scripts\\ai\\GENERAL\\L_INSTANCE_EXIT_TRANSFER_PLAYER_TO_LAST_NON_INSTANCE.lua", []() {return new InstanceExitTransferPlayerToLastNonInstance();}}, - {"scripts\\ai\\FV\\L_NPC_FREE_GF_NINJAS.lua", []() {return new FvFreeGfNinjas();}}, - {"scripts\\ai\\FV\\L_FV_PANDA_SPAWNER_SERVER.lua", []() {return new FvPandaSpawnerServer();}}, - {"scripts\\ai\\FV\\L_FV_PANDA_SERVER.lua", []() {return new FvPandaServer();}}, - {"scripts\\zone\\PROPERTY\\FV\\L_ZONE_FV_PROPERTY.lua", []() {return new ZoneFvProperty();}}, - {"scripts\\ai\\FV\\L_FV_BRICK_PUZZLE_SERVER.lua", []() {return new FvBrickPuzzleServer();}}, - {"scripts\\ai\\FV\\L_FV_CONSOLE_LEFT_QUICKBUILD.lua", []() {return new FvConsoleLeftQuickbuild();}}, - {"scripts\\ai\\FV\\L_FV_CONSOLE_RIGHT_QUICKBUILD.lua", []() {return new FvConsoleRightQuickbuild();}}, - {"scripts\\ai\\FV\\L_FV_FACILITY_BRICK.lua", []() {return new FvFacilityBrick();}}, - {"scripts\\ai\\FV\\L_FV_FACILITY_PIPES.lua", []() {return new FvFacilityPipes();}}, - {"scripts\\02_server\\Map\\FV\\L_IMG_BRICK_CONSOLE_QB.lua", []() {return new ImgBrickConsoleQB();}}, - {"scripts\\ai\\FV\\L_ACT_PARADOX_PIPE_FIX.lua", []() {return new ActParadoxPipeFix();}}, - {"scripts\\ai\\FV\\L_FV_NINJA_GUARDS.lua", []() {return new FvNinjaGuard();}}, - {"scripts\\ai\\FV\\L_ACT_PASS_THROUGH_WALL.lua", []() {return new FvPassThroughWall();}}, - {"scripts\\ai\\FV\\L_ACT_BOUNCE_OVER_WALL.lua", []() {return new FvBounceOverWall();}}, - {"scripts\\02_server\\Map\\FV\\L_NPC_FONG.lua", []() {return new FvFong();}}, - {"scripts\\ai\\FV\\L_FV_MAELSTROM_GEYSER.lua", []() {return new FvMaelstromGeyser();}}, - {"scripts\\02_server\\Map\\FV\\Racing\\RACE_SHIP_LAP_COLUMNS_SERVER.lua", []() {return new RaceShipLapColumnsServer();}}, + {"scripts\\02_server\\Map\\FV\\L_ACT_CANDLE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\FV\\L_ENEMY_RONIN_SPAWNER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_CAVALRY.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_ACT_NINJA_TURRET_1.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\FV\\L_FV_HORSEMEN_TRIGGER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_FLYING_CREVICE_DRAGON.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\FV\\L_FV_MAELSTROM_DRAGON.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_DRAGON_SMASHING_GOLEM_QB.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\General\\L_TREASURE_CHEST_DRAGON_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GENERAL\\L_INSTANCE_EXIT_TRANSFER_PLAYER_TO_LAST_NON_INSTANCE.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_NPC_FREE_GF_NINJAS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_PANDA_SPAWNER_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_PANDA_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\zone\\PROPERTY\\FV\\L_ZONE_FV_PROPERTY.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_BRICK_PUZZLE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_CONSOLE_LEFT_QUICKBUILD.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_CONSOLE_RIGHT_QUICKBUILD.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_FACILITY_BRICK.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_FACILITY_PIPES.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\FV\\L_IMG_BRICK_CONSOLE_QB.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_ACT_PARADOX_PIPE_FIX.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_NINJA_GUARDS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_ACT_PASS_THROUGH_WALL.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_ACT_BOUNCE_OVER_WALL.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\FV\\L_NPC_FONG.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_FV_MAELSTROM_GEYSER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\FV\\Racing\\RACE_SHIP_LAP_COLUMNS_SERVER.lua", []() {return std::make_unique();}}, //yes we know the lap numbers dont match the file name or anim. Thats what they desgined it as. - {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP1_SERVER.lua", []() {return new FvRaceDragon("lap_01", 2);}}, - {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP2_SERVER.lua", []() {return new FvRaceDragon("lap_02", 0);}}, - {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP3_SERVER.lua", []() {return new FvRaceDragon("lap_03", 1);}}, - {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_ABC_SERVER.lua", []() {return new FvRacePillarABCServer();}}, - {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_D_SERVER.lua", []() {return new FvRacePillarDServer();}}, - {"scripts\\02_server\\Map\\FV\\Racing\\RACE_FIREBALLS.lua", []() {return new RaceFireballs();}}, + {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP1_SERVER.lua", []() {return std::make_unique("lap_01", 2);}}, + {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP2_SERVER.lua", []() {return std::make_unique("lap_02", 0);}}, + {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_DRAGON_LAP3_SERVER.lua", []() {return std::make_unique("lap_03", 1);}}, + {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_ABC_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_PILLAR_D_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\FV\\Racing\\RACE_FIREBALLS.lua", []() {return std::make_unique();}}, //Misc. - {"scripts\\02_server\\Map\\General\\L_EXPLODING_ASSET.lua", []() {return new ExplodingAsset();}}, - {"scripts\\02_server\\Map\\General\\L_WISHING_WELL_SERVER.lua", []() {return new WishingWellServer();}}, - {"scripts\\ai\\ACT\\L_ACT_PLAYER_DEATH_TRIGGER.lua", []() {return new ActPlayerDeathTrigger();}}, - {"scripts\\02_server\\Map\\General\\L_GROWING_FLOWER_SERVER.lua", []() {return new GrowingFlower();}}, - {"scripts\\02_server\\Map\\General\\L_TOKEN_CONSOLE_SERVER.lua", []() {return new TokenConsoleServer();}}, - {"scripts\\ai\\ACT\\FootRace\\L_ACT_BASE_FOOT_RACE.lua", []() {return new BaseFootRaceManager();}}, - {"scripts\\02_server\\Map\\General\\L_PROP_PLATFORM.lua", []() {return new PropertyPlatform();}}, - {"scripts\\02_server\\Map\\VE\\L_VE_BRICKSAMPLE_SERVER.lua", []() {return new VeBricksampleServer();}}, - {"scripts\\02_server\\Map\\General\\L_MAIL_BOX_SERVER.lua", []() {return new MailBoxServer();}}, - {"scripts\\ai\\ACT\\L_ACT_MINE.lua", []() {return new ActMine();}}, - {"scripts\\02_server\\Map\\AM\\L_WANDERING_VENDOR.lua", []() {return new WanderingVendor();}}, + {"scripts\\02_server\\Map\\General\\L_EXPLODING_ASSET.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_WISHING_WELL_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\ACT\\L_ACT_PLAYER_DEATH_TRIGGER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_GROWING_FLOWER_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_TOKEN_CONSOLE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\ACT\\FootRace\\L_ACT_BASE_FOOT_RACE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_PROP_PLATFORM.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\VE\\L_VE_BRICKSAMPLE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_MAIL_BOX_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\ACT\\L_ACT_MINE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_WANDERING_VENDOR.lua", []() {return std::make_unique();}}, //Racing - {"scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_CRATE_SERVER.lua", []() {return new RaceImagineCrateServer();}}, - {"scripts\\ai\\ACT\\L_ACT_VEHICLE_DEATH_TRIGGER.lua", []() {return new ActVehicleDeathTrigger();}}, - {"scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_POWERUP.lua", []() {return new RaceImaginePowerup();}}, - {"scripts\\02_server\\Map\\FV\\Racing\\RACE_MAELSTROM_GEISER.lua", []() {return new RaceMaelstromGeiser();}}, - {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_SMASH_EGG_IMAGINE_SERVER.lua", []() {return new FvRaceSmashEggImagineServer();}}, - {"scripts\\02_server\\Map\\FV\\Racing\\FV_RACING_COLUMNS.lua", []() {return new FvRacingColumns();}}, - {"scripts\\ai\\RACING\\OBJECTS\\RACE_SMASH_SERVER.lua", []() {return new RaceSmashServer();}}, + {"scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_CRATE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\ACT\\L_ACT_VEHICLE_DEATH_TRIGGER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\RACING\\OBJECTS\\RACE_IMAGINE_POWERUP.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\FV\\Racing\\RACE_MAELSTROM_GEISER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\RACING\\OBJECTS\\FV_RACE_SMASH_EGG_IMAGINE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\FV\\Racing\\FV_RACING_COLUMNS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\RACING\\OBJECTS\\RACE_SMASH_SERVER.lua", []() {return std::make_unique();}}, //NT - {"scripts\\02_server\\Map\\NT\\L_NT_SENTINELWALKWAY_SERVER.lua", []() {return new NtSentinelWalkwayServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_PARADOXTELE_SERVER.lua", []() {return new NtParadoxTeleServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_DARKITECT_REVEAL_SERVER.lua", []() {return new NtDarkitectRevealServer();}}, - {"scripts\\02_server\\Map\\General\\L_BANK_INTERACT_SERVER.lua", []() {return new BankInteractServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_VENTURESPEEDPAD_SERVER.lua", []() {return new NtVentureSpeedPadServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_VENTURE_CANNON_SERVER.lua", []() {return new NtVentureCannonServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_SERVER.lua", []() {return new NtCombatChallengeServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_DUMMY.lua", []() {return new NtCombatChallengeDummy();}}, - {"scripts\\02_server\\Map\\NT\\\\L_NT_COMBAT_EXPLODING_TARGET.lua", []() {return new NtCombatChallengeExplodingDummy();}}, - {"scripts\\02_server\\Map\\General\\L_BASE_INTERACT_DROP_LOOT_SERVER.lua", []() {return new BaseInteractDropLootServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_ASSEMBLYTUBE_SERVER.lua", []() {return new NtAssemblyTubeServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_PARADOX_PANEL_SERVER.lua", []() {return new NtParadoxPanelServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_IMAG_BEAM_BUFFER.lua", []() {return new NtImagBeamBuffer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_BEAM_IMAGINATION_COLLECTORS.lua", []() {return new NtBeamImaginationCollectors();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_DIRT_CLOUD_SERVER.lua", []() {return new NtDirtCloudServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_CONSOLE_TELEPORT_SERVER.lua", []() {return new NtConsoleTeleportServer();}}, - {"scripts\\02_server\\Map\\NT\\L_SPAWN_STEGO_SERVER.lua", []() {return new SpawnStegoServer();}}, - {"scripts\\02_server\\Map\\NT\\L_SPAWN_SABERCAT_SERVER.lua", []() {return new SpawnSaberCatServer();}}, - {"scripts\\02_server\\Map\\NT\\L_SPAWN_SHRAKE_SERVER.lua", []() {return new SpawnShrakeServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_DUKE_SERVER.lua", []() {return new NtDukeServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_HAEL_SERVER.lua", []() {return new NtHaelServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_FACTION_SPY_SERVER.lua", []() {return new NtFactionSpyServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_OVERBUILD_SERVER.lua", []() {return new NtOverbuildServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_VANDA_SERVER.lua", []() {return new NtVandaServer();}}, - {"scripts\\02_server\\Map\\General\\L_FORCE_VOLUME_SERVER.lua", []() {return new ForceVolumeServer();}}, - {"scripts\\02_server\\Map\\General\\L_FRICTION_VOLUME_SERVER.lua", []() {return new FrictionVolumeServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_XRAY_SERVER.lua", []() {return new NtXRayServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_SLEEPING_GUARD.lua", []() {return new NtSleepingGuard();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_IMAGIMETER_VISIBILITY_SERVER.lua", []() {return new NTImagimeterVisibility();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_PIPE_VISIBILITY_SERVER.lua", []() {return new NTPipeVisibilityServer();}}, - {"scripts\\ai\\MINIGAME\\Objects\\MINIGAME_BLUE_MARK.lua", []() {return new MinigameBlueMark();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_NAOMI_BREADCRUMB_SERVER.lua", []() {return new NtNaomiBreadcrumbServer();}}, - {"scripts\\02_server\\Map\\NT\\L_NT_NAOMI_DIRT_SERVER.lua", []() {return new NTNaomiDirtServer();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_SENTINELWALKWAY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_PARADOXTELE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_DARKITECT_REVEAL_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_BANK_INTERACT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_VENTURESPEEDPAD_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_VENTURE_CANNON_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_COMBAT_CHALLENGE_DUMMY.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\\\L_NT_COMBAT_EXPLODING_TARGET.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_BASE_INTERACT_DROP_LOOT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_ASSEMBLYTUBE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_PARADOX_PANEL_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_IMAG_BEAM_BUFFER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_BEAM_IMAGINATION_COLLECTORS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_DIRT_CLOUD_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_CONSOLE_TELEPORT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_SPAWN_STEGO_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_SPAWN_SABERCAT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_SPAWN_SHRAKE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_DUKE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_HAEL_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_FACTION_SPY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_OVERBUILD_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_VANDA_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_FORCE_VOLUME_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_FRICTION_VOLUME_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_XRAY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_SLEEPING_GUARD.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_IMAGIMETER_VISIBILITY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_PIPE_VISIBILITY_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\MINIGAME\\Objects\\MINIGAME_BLUE_MARK.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_NAOMI_BREADCRUMB_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\NT\\L_NT_NAOMI_DIRT_SERVER.lua", []() {return std::make_unique();}}, //AM Crux - {"scripts\\02_server\\Map\\AM\\L_AM_CONSOLE_TELEPORT_SERVER.lua", []() {return new AmConsoleTeleportServer();}}, - {"scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_FIN.lua", []() {return new RandomSpawnerFin();}}, - {"scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_PIT.lua", []() {return new RandomSpawnerPit();}}, - {"scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_STR.lua", []() {return new RandomSpawnerStr();}}, - {"scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_ZIP.lua", []() {return new RandomSpawnerZip();}}, - {"scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_MECH.lua", []() {return new AmDarklingMech();}}, - {"scripts\\02_server\\Map\\AM\\L_BRIDGE.lua", []() {return new AmBridge();}}, - {"scripts\\02_server\\Map\\AM\\L_DRAW_BRIDGE.lua", []() {return new AmDrawBridge();}}, - {"scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR.lua", []() {return new AmShieldGenerator();}}, - {"scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR_QUICKBUILD.lua", []() {return new AmShieldGeneratorQuickbuild();}}, - {"scripts\\02_server\\Map\\AM\\L_DROPSHIP_COMPUTER.lua", []() {return new AmDropshipComputer();}}, - {"scripts\\02_server\\Map\\AM\\L_SCROLL_READER_SERVER.lua", []() {return new AmScrollReaderServer();}}, - {"scripts\\02_server\\Map\\AM\\L_TEMPLE_SKILL_VOLUME.lua", []() {return new AmTemplateSkillVolume();}}, - {"scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF.lua", []() {return new EnemyNjBuff();}}, - {"scripts\\02_server\\Enemy\\AM\\L_AM_SKELETON_ENGINEER.lua", []() {return new AmSkeletonEngineer();}}, - {"scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL.lua", []() {return new AmSkullkinDrill();}}, - {"scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL_STAND.lua", []() {return new AmSkullkinDrillStand();}}, - {"scripts\\02_server\\Map\\AM\\L_SKULLKIN_TOWER.lua", []() {return new AmSkullkinTower();}}, - {"scripts\\02_server\\Enemy\\AM\\L_AM_NAMED_DARKLING_DRAGON.lua", []() {return new AmDarklingDragon();}}, - {"scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_DRAGON.lua", []() {return new AmDarklingDragon();}}, - {"scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_APE.lua", []() {return new BaseEnemyApe();}}, - {"scripts\\02_server\\Map\\AM\\L_BLUE_X.lua", []() {return new AmBlueX();}}, - {"scripts\\02_server\\Map\\AM\\L_TEAPOT_SERVER.lua", []() {return new AmTeapotServer();}}, + {"scripts\\02_server\\Map\\AM\\L_AM_CONSOLE_TELEPORT_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_FIN.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_PIT.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_STR.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_RANDOM_SPAWNER_ZIP.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_MECH.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_BRIDGE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_DRAW_BRIDGE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_SHIELD_GENERATOR_QUICKBUILD.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_DROPSHIP_COMPUTER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_SCROLL_READER_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_TEMPLE_SKILL_VOLUME.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\AM\\L_AM_SKELETON_ENGINEER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_SKULLKIN_DRILL_STAND.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_SKULLKIN_TOWER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\AM\\L_AM_NAMED_DARKLING_DRAGON.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_DRAGON.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\AM\\L_AM_DARKLING_APE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_BLUE_X.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\AM\\L_TEAPOT_SERVER.lua", []() {return std::make_unique();}}, //Ninjago - {"scripts\\02_server\\Map\\njhub\\L_GARMADON_CELEBRATION_SERVER.lua", []() {return new NjGarmadonCelebration();}}, - {"scripts\\02_server\\Map\\njhub\\L_WU_NPC.lua", []() {return new NjWuNPC();}}, - {"scripts\\02_server\\Map\\njhub\\L_SCROLL_CHEST_SERVER.lua", []() {return new NjScrollChestServer();}}, - {"scripts\\02_server\\Map\\njhub\\L_COLE_NPC.lua", []() {return new NjColeNPC();}}, - {"scripts\\02_server\\Map\\njhub\\L_JAY_MISSION_ITEMS.lua", []() {return new NjJayMissionItems();}}, - {"scripts\\02_server\\Map\\njhub\\L_NPC_MISSION_SPINJITZU_SERVER.lua", []() {return new NjNPCMissionSpinjitzuServer();}}, - {"scripts\\02_server\\Map\\njhub\\L_ENEMY_SKELETON_SPAWNER.lua", []() {return new EnemySkeletonSpawner();}}, - {"scripts\\02_server\\Map\\General\\L_NJ_RAIL_SWITCH.lua", []() {return new NjRailSwitch();}}, - {"scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_ACTIVATORS_SERVER.lua", []() {return new NjRailActivatorsServer();}}, - {"scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_POST_SERVER.lua", []() {return new NjRailPostServer();}}, - {"scripts\\02_server\\Map\\General\\Ninjago\\L_ICE_RAIL_ACTIVATOR_SERVER.lua", []() {return new NjIceRailActivator();}}, - {"scripts\\02_server\\Map\\njhub\\L_FALLING_TILE.lua", []() {return new FallingTile();}}, - {"scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF_STUN_IMMUNITY.lua", []() {return new EnemyNjBuff();}}, - {"scripts\\02_server\\Map\\njhub\\L_IMAGINATION_SHRINE_SERVER.lua", []() {return new ImaginationShrineServer();}}, - {"scripts\\02_server\\Map\\njhub\\L_LIEUTENANT.lua", []() {return new Lieutenant();}}, - {"scripts\\02_server\\Map\\njhub\\L_RAIN_OF_ARROWS.lua", []() {return new RainOfArrows();}}, - {"scripts\\02_server\\Map\\njhub\\L_CAVE_PRISON_CAGE.lua", []() {return new CavePrisonCage();}}, - {"scripts\\02_server\\Map\\njhub\\boss_instance\\L_MONASTERY_BOSS_INSTANCE_SERVER.lua", []() {return new NjMonastryBossInstance();}}, - {"scripts\\02_server\\Map\\njhub\\L_CATAPULT_BOUNCER_SERVER.lua", []() {return new CatapultBouncerServer();}}, - {"scripts\\02_server\\Map\\njhub\\L_CATAPULT_BASE_SERVER.lua", []() {return new CatapultBaseServer();}}, - {"scripts\\02_server\\Map\\General\\Ninjago\\L_NJHUB_LAVA_PLAYER_DEATH_TRIGGER.lua", []() {return new NjhubLavaPlayerDeathTrigger();}}, - {"scripts\\02_server\\Map\\njhub\\L_MON_CORE_NOOK_DOORS.lua", []() {return new MonCoreNookDoors();}}, - {"scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua", []() {return new MonCoreSmashableDoors();}}, - {"scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua", []() {return new MonCoreSmashableDoors();}}, - {"scripts\\02_server\\Map\\njhub\\L_FLAME_JET_SERVER.lua", []() {return new FlameJetServer();}}, - {"scripts\\02_server\\Map\\njhub\\L_BURNING_TILE.lua", []() {return new BurningTile();}}, - {"scripts\\02_server\\Map\\njhub\\L_SPAWN_EARTH_PET_SERVER.lua", []() {return new NjEarthDragonPetServer();}}, - {"scripts\\02_server\\Map\\njhub\\L_EARTH_PET_SERVER.lua", []() {return new NjEarthPetServer();}}, - {"scripts\\02_server\\Map\\njhub\\L_DRAGON_EMBLEM_CHEST_SERVER.lua", []() {return new NjDragonEmblemChestServer();}}, - {"scripts\\02_server\\Map\\njhub\\L_NYA_MISSION_ITEMS.lua", []() {return new NjNyaMissionitems();}}, + {"scripts\\02_server\\Map\\njhub\\L_GARMADON_CELEBRATION_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_WU_NPC.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_SCROLL_CHEST_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_COLE_NPC.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_JAY_MISSION_ITEMS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_NPC_MISSION_SPINJITZU_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_ENEMY_SKELETON_SPAWNER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_NJ_RAIL_SWITCH.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_ACTIVATORS_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\Ninjago\\L_RAIL_POST_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\Ninjago\\L_ICE_RAIL_ACTIVATOR_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_FALLING_TILE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\General\\L_ENEMY_NJ_BUFF_STUN_IMMUNITY.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_IMAGINATION_SHRINE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_LIEUTENANT.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_RAIN_OF_ARROWS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_CAVE_PRISON_CAGE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\boss_instance\\L_MONASTERY_BOSS_INSTANCE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_CATAPULT_BOUNCER_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_CATAPULT_BASE_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\Ninjago\\L_NJHUB_LAVA_PLAYER_DEATH_TRIGGER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_MON_CORE_NOOK_DOORS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_MON_CORE_SMASHABLE_DOORS.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_FLAME_JET_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_BURNING_TILE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_SPAWN_EARTH_PET_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_EARTH_PET_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_DRAGON_EMBLEM_CHEST_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\njhub\\L_NYA_MISSION_ITEMS.lua", []() {return std::make_unique();}}, //DLU - {"scripts\\02_server\\DLU\\DLUVanityTeleportingObject.lua", []() {return new DLUVanityTeleportingObject();}}, + {"scripts\\02_server\\DLU\\DLUVanityTeleportingObject.lua", []() {return std::make_unique();}}, //Survival Minigame - {"scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_STROMBIE.lua", []() {return new AgSurvivalStromling();}}, - {"scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARKLING_MECH.lua", []() {return new AgSurvivalMech();}}, - {"scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARK_SPIDERLING.lua", []() {return new AgSurvivalSpiderling();}}, + {"scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_STROMBIE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARKLING_MECH.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Enemy\\Survival\\L_AG_SURVIVAL_DARK_SPIDERLING.lua", []() {return std::make_unique();}}, //Scripted Equipment - {"scripts\\EquipmentScripts\\Sunflower.lua", []() {return new Sunflower();}}, - {"scripts/EquipmentScripts/AnvilOfArmor.lua", []() {return new AnvilOfArmor();}}, - {"scripts/EquipmentScripts/FountainOfImagination.lua", []() {return new FountainOfImagination();}}, - {"scripts/EquipmentScripts/CauldronOfLife.lua", []() {return new CauldronOfLife();}}, - {"scripts\\02_server\\Equipment\\L_BOOTYDIG_SERVER.lua", []() {return new BootyDigServer();}}, - {"scripts\\EquipmentScripts\\PersonalFortress.lua", []() {return new PersonalFortress();}}, - {"scripts\\02_server\\Map\\General\\L_PROPERTY_DEVICE.lua", []() {return new PropertyDevice();}}, - {"scripts\\02_server\\Map\\General\\L_IMAG_BACKPACK_HEALS_SERVER.lua", []() {return new ImaginationBackpackHealServer();}}, - {"scripts\\ai\\GENERAL\\L_LEGO_DIE_ROLL.lua", []() {return new LegoDieRoll();}}, - {"scripts\\EquipmentScripts\\BuccaneerValiantShip.lua", []() {return new BuccaneerValiantShip();}}, - {"scripts\\EquipmentScripts\\FireFirstSkillonStartup.lua", []() {return new FireFirstSkillonStartup();}}, - {"scripts\\equipmenttriggers\\gempack.lua", []() {return new GemPack();}}, - {"scripts\\equipmenttriggers\\shardarmor.lua", []() {return new ShardArmor();}}, - {"scripts\\equipmenttriggers\\coilbackpack.lua", []() {return new TeslaPack();}}, - {"scripts\\EquipmentScripts\\stunImmunity.lua", []() {return new StunImmunity();}}, + {"scripts\\EquipmentScripts\\Sunflower.lua", []() {return std::make_unique();}}, + {"scripts/EquipmentScripts/AnvilOfArmor.lua", []() {return std::make_unique();}}, + {"scripts/EquipmentScripts/FountainOfImagination.lua", []() {return std::make_unique();}}, + {"scripts/EquipmentScripts/CauldronOfLife.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Equipment\\L_BOOTYDIG_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\EquipmentScripts\\PersonalFortress.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_PROPERTY_DEVICE.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_IMAG_BACKPACK_HEALS_SERVER.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\GENERAL\\L_LEGO_DIE_ROLL.lua", []() {return std::make_unique();}}, + {"scripts\\EquipmentScripts\\BuccaneerValiantShip.lua", []() {return std::make_unique();}}, + {"scripts\\EquipmentScripts\\FireFirstSkillonStartup.lua", []() {return std::make_unique();}}, + {"scripts\\equipmenttriggers\\gempack.lua", []() {return std::make_unique();}}, + {"scripts\\equipmenttriggers\\shardarmor.lua", []() {return std::make_unique();}}, + {"scripts\\equipmenttriggers\\coilbackpack.lua", []() {return std::make_unique();}}, + {"scripts\\EquipmentScripts\\stunImmunity.lua", []() {return std::make_unique();}}, //FB - {"scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_BROKEN.lua", []() {return new RockHydrantBroken();}}, - {"scripts\\ai\\NS\\L_NS_WH_FANS.lua", []() {return new WhFans();}}, + {"scripts\\ai\\NS\\WH\\L_ROCKHYDRANT_BROKEN.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\NS\\L_NS_WH_FANS.lua", []() {return std::make_unique();}}, //WBL - {"scripts\\zone\\LUPs\\WBL_generic_zone.lua", []() {return new WblGenericZone();}}, + {"scripts\\zone\\LUPs\\WBL_generic_zone.lua", []() {return std::make_unique();}}, //Alpha - {"scripts\\ai\\FV\\L_TRIGGER_GAS.lua", []() {return new TriggerGas();}}, - {"scripts\\ai\\FV\\L_ACT_NINJA_SENSEI.lua", []() {return new ActNinjaSensei();}}, + {"scripts\\ai\\FV\\L_TRIGGER_GAS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\FV\\L_ACT_NINJA_SENSEI.lua", []() {return std::make_unique();}}, //Pickups - {"scripts\\ai\\SPEC\\L_SPECIAL_1_BRONZE-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(1);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_1_GOLD-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(10000);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_1_SILVER-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(100);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_10_BRONZE-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(10);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_10_GOLD-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(100000);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_10_SILVER-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(1000);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_25_BRONZE-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(25);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_25_GOLD-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(250000);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_25_SILVER-COIN-SPAWNER.lua", []() {return new SpecialCoinSpawner(2500);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER.lua", []() {return new SpecialPowerupSpawner(13);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER-2PT.lua", []() {return new SpecialPowerupSpawner(129);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_LIFE-POWERUP-SPAWNER.lua", []() {return new SpecialPowerupSpawner(5);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_ARMOR-POWERUP-SPAWNER.lua", []() {return new SpecialPowerupSpawner(747);}}, - {"scripts\\ai\\SPEC\\L_SPECIAL_SPEED_BUFF_SPAWNER.lua", []() {return new SpecialSpeedBuffSpawner();}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_1_BRONZE-COIN-SPAWNER.lua", []() {return std::make_unique(1);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_1_GOLD-COIN-SPAWNER.lua", []() {return std::make_unique(10000);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_1_SILVER-COIN-SPAWNER.lua", []() {return std::make_unique(100);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_10_BRONZE-COIN-SPAWNER.lua", []() {return std::make_unique(10);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_10_GOLD-COIN-SPAWNER.lua", []() {return std::make_unique(100000);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_10_SILVER-COIN-SPAWNER.lua", []() {return std::make_unique(1000);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_25_BRONZE-COIN-SPAWNER.lua", []() {return std::make_unique(25);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_25_GOLD-COIN-SPAWNER.lua", []() {return std::make_unique(250000);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_25_SILVER-COIN-SPAWNER.lua", []() {return std::make_unique(2500);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER.lua", []() {return std::make_unique(13);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_IMAGINE-POWERUP-SPAWNER-2PT.lua", []() {return std::make_unique(129);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_LIFE-POWERUP-SPAWNER.lua", []() {return std::make_unique(5);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_ARMOR-POWERUP-SPAWNER.lua", []() {return std::make_unique(747);}}, + {"scripts\\ai\\SPEC\\L_SPECIAL_SPEED_BUFF_SPAWNER.lua", []() {return std::make_unique();}}, //Wild - {"scripts\\ai\\WILD\\L_WILD_GF_RAT.lua", []() {return new WildAndScared();}}, - {"scripts\\ai\\WILD\\L_WILD_GF_SNAIL.lua", []() {return new WildAndScared();}}, - {"scripts\\ai\\WILD\\L_WILD_GF_GLOWBUG.lua", []() {return new WildGfGlowbug();}}, - {"scripts\\ai\\WILD\\L_WILD_AMBIENT_CRAB.lua", []() {return new WildAmbientCrab();}}, - {"scripts\\ai\\WILD\\L_WILD_PANTS.lua", []() {return new WildPants();}}, - {"scripts\\ai\\WILD\\L_WILD_NINJA_BRICKS.lua", []() {return new WildNinjaBricks();}}, - {"scripts\\ai\\WILD\\L_WILD_NINJA_STUDENT.lua", []() {return new WildNinjaStudent();}}, - {"scripts\\ai\\WILD\\L_WILD_NINJA_SENSEI.lua", []() {return new WildNinjaSensei();}}, - {"scripts\\ai\\WILD\\L_LUP_generic_interact.lua", []() {return new LupGenericInteract();}}, - {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenBlue.lua", []() {return new WblRobotCitizen();}}, - {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenGreen.lua", []() {return new WblRobotCitizen();}}, - {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenOrange.lua", []() {return new WblRobotCitizen();}}, - {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenRed.lua", []() {return new WblRobotCitizen();}}, - {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenYellow.lua", []() {return new WblRobotCitizen();}}, - {"scripts\\02_server\\Map\\General\\L_ENEMY_CLEAR_THREAT.lua", []() {return new EnemyClearThreat();}}, - {"scripts\\ai\\AG\\L_AG_SPIDER_BOSS_MESSAGE.lua", []() {return new AgSpiderBossMessage();}}, + {"scripts\\ai\\WILD\\L_WILD_GF_RAT.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_WILD_GF_SNAIL.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_WILD_GF_GLOWBUG.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_WILD_AMBIENT_CRAB.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_WILD_PANTS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_WILD_NINJA_BRICKS.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_WILD_NINJA_STUDENT.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_WILD_NINJA_SENSEI.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\WILD\\L_LUP_generic_interact.lua", []() {return std::make_unique();}}, + {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenBlue.lua", []() {return std::make_unique();}}, + {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenGreen.lua", []() {return std::make_unique();}}, + {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenOrange.lua", []() {return std::make_unique();}}, + {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenRed.lua", []() {return std::make_unique();}}, + {"scripts\\zone\\LUPs\\RobotCity Intro\\WBL_RCIntro_RobotCitizenYellow.lua", []() {return std::make_unique();}}, + {"scripts\\02_server\\Map\\General\\L_ENEMY_CLEAR_THREAT.lua", []() {return std::make_unique();}}, + {"scripts\\ai\\AG\\L_AG_SPIDER_BOSS_MESSAGE.lua", []() {return std::make_unique();}}, }; @@ -706,23 +706,23 @@ namespace { }; }; -CppScripts::Script* const CppScripts::GetScript(Entity* parent, const std::string& scriptName) { +CppScripts::Script& CppScripts::GetScript(Entity* parent, const std::string& scriptName) { auto itr = g_Scripts.find(scriptName); if (itr != g_Scripts.end()) { - return itr->second; + return *itr->second; } const auto itrTernary = scriptLoader.find(scriptName); - Script* script = itrTernary != scriptLoader.cend() ? itrTernary->second() : &InvalidToReturn; + auto& script = itrTernary != scriptLoader.cend() ? *itrTernary->second() : InvalidToReturn; - if (script == &InvalidToReturn && !scriptName.empty() && !g_ExcludedScripts.contains(scriptName)) { + if (&script == &InvalidToReturn && !scriptName.empty() && !g_ExcludedScripts.contains(scriptName)) { LOG_DEBUG("LOT %i attempted to load CppScript for '%s', but returned InvalidScript.", parent->GetLOT(), scriptName.c_str()); } - g_Scripts[scriptName] = script; + g_Scripts[scriptName] = &script; return script; } -CppScripts::Script* const CppScripts::GetInvalidScript() { - return &InvalidToReturn; +CppScripts::Script& CppScripts::GetInvalidScript() { + return InvalidToReturn; } diff --git a/dScripts/CppScripts.h b/dScripts/CppScripts.h index 8d3b3b5d..b357eb63 100644 --- a/dScripts/CppScripts.h +++ b/dScripts/CppScripts.h @@ -357,10 +357,10 @@ namespace CppScripts { virtual void OnRequestActivityExit(Entity* sender, LWOOBJID player, bool canceled){}; }; - Script* const GetScript(Entity* parent, const std::string& scriptName); + Script& GetScript(Entity* parent, const std::string& scriptName); // Get the invalid script. Would be a static variable of the namespace, but that would be // more cluttery to use. Also this allows us to control where this invalid script is defined and initialized // since we dont want anyone externally modifying it. - Script* const GetInvalidScript(); + Script& GetInvalidScript(); };