Lua Scripting (#1334)

Closes #83
Fixes #1309
Fixes #1287
Fixes #1129 (actually fixed now)
This commit is contained in:
maybegreat48
2023-06-06 07:40:40 +00:00
committed by GitHub
parent 35bb398c01
commit 03c1a96b67
201 changed files with 156682 additions and 838 deletions

View File

@ -6,6 +6,7 @@
#include "script_patches.hpp"
#include "services/context_menu/context_menu_service.hpp"
#include "services/orbital_drone/orbital_drone.hpp"
#include "services/tunables/tunables_service.hpp"
#include "services/vehicle/vehicle_control_service.hpp"
#include "services/squad_spawner/squad_spawner.hpp"
#include "thread_pool.hpp"
@ -77,7 +78,6 @@ namespace big
{
looped::vehicle_auto_drive();
looped::vehicle_boost_behavior();
looped::vehicle_god_mode();
looped::derail_train();
looped::drive_train();
@ -85,18 +85,6 @@ namespace big
}
}
void backend::turnsignal_loop()
{
LOG(INFO) << "Starting script: turnsignal";
while (g_running)
{
looped::vehicle_turn_signals();
script::get_current()->yield();
}
}
void backend::misc_loop()
{
LOG(INFO) << "Starting script: Miscellaneous";
@ -104,7 +92,6 @@ namespace big
while (g_running)
{
looped::hud_transition_state();
looped::session_local_time();
looped::session_pop_multiplier_areas();
looped::session_force_thunder();
looped::session_randomize_ceo_colors();
@ -154,18 +141,6 @@ namespace big
}
}
void backend::vehiclefly_loop()
{
LOG(INFO) << "Starting script: Vehicle fly";
while (g_running)
{
looped::vehicle_fly();
script::get_current()->yield();
}
}
void backend::disable_control_action_loop()
{
LOG(INFO) << "Starting script: Disable Control Action";
@ -212,13 +187,17 @@ namespace big
{
while (true)
{
g_vehicle_control_service.tick();
script::get_current()->yield();
}
}
void backend::tunables_script()
{
g_tunables_service->run_script();
}
void backend::squad_spawner()
{
while (true)