diff --git a/FLHookSDK b/FLHookSDK index 0753ca68c..62b554f26 160000 --- a/FLHookSDK +++ b/FLHookSDK @@ -1 +1 @@ -Subproject commit 0753ca68c24b864a3e973a46b06ff10a136a17d6 +Subproject commit 62b554f269202914c8a49f96e30d0e6ac62f93e0 diff --git a/plugins/wave_defence/WaveDefence.cpp b/plugins/wave_defence/WaveDefence.cpp index fc572b23c..37587ede8 100644 --- a/plugins/wave_defence/WaveDefence.cpp +++ b/plugins/wave_defence/WaveDefence.cpp @@ -186,6 +186,14 @@ namespace Plugins::WaveDefence game.spawnedNpcs.push_back(global->communicator->CreateNpc(npc, game.system.positionVector, rotation, game.system.systemId, true)); } + for (uint multiple = 0; multiple < global->config->npcMultiplier; multiple++) + { + for (auto const& npc : wave.variableNpcs) + { + game.spawnedNpcs.push_back(global->communicator->CreateNpc(npc, game.system.positionVector, rotation, game.system.systemId, true)); + } + } + // Actions for all players in group for (auto const& player : game.members) { @@ -433,9 +441,9 @@ DefaultDllMainSettings(LoadSettings); REFL_AUTO(type(CostumeStrings), field(body), field(head), field(lefthand), field(righthand), field(accessory)); REFL_AUTO(type(Character), field(voice), field(infocard), field(costumeStrings)); REFL_AUTO(type(VoiceLine), field(voiceLineString), field(character)); -REFL_AUTO(type(Wave), field(npcs), field(reward), field(startVoiceLine), field(endVoiceLine)); +REFL_AUTO(type(Wave), field(npcs), field(variableNpcs), field(reward), field(startVoiceLine), field(endVoiceLine)); REFL_AUTO(type(System), field(system), field(waves), field(posX), field(posY), field(posZ)); -REFL_AUTO(type(Config), field(systems), field(characters), field(victoryMusic), field(failureMusic)); +REFL_AUTO(type(Config), field(systems), field(characters), field(victoryMusic), field(failureMusic), field(npcMultiplier)); extern "C" EXPORT void ExportPluginInfo(PluginInfo* pi) { diff --git a/plugins/wave_defence/WaveDefence.h b/plugins/wave_defence/WaveDefence.h index 19f34c06c..788781781 100644 --- a/plugins/wave_defence/WaveDefence.h +++ b/plugins/wave_defence/WaveDefence.h @@ -50,6 +50,7 @@ namespace Plugins::WaveDefence struct Wave : Reflectable { std::vector npcs = {{L"example"}, {L"example"}}; + std::vector variableNpcs = {{L"example"}, {L"example"}}; uint reward = 1000; VoiceLine startVoiceLine = VoiceLine(); VoiceLine endVoiceLine = VoiceLine(); @@ -90,6 +91,9 @@ namespace Plugins::WaveDefence pub::Audio::Tryptich victoryMusicId; pub::Audio::Tryptich failureMusicId; + // How many variable npcs per player + uint npcMultiplier = 2; + //! The config file we load out of std::string File() override { return "config/wave_defence.json"; } };