Skip to content

Commit

Permalink
Update to v2.17.151686; Fix loader to work with diag exe (intercept#295)
Browse files Browse the repository at this point in the history
* * Fix loader in diag exe
* Add unary commands

* Add binary and nular commands
  • Loading branch information
Leopard20 authored Apr 25, 2024
1 parent 40250db commit cd8774d
Show file tree
Hide file tree
Showing 28 changed files with 989 additions and 302 deletions.
47 changes: 28 additions & 19 deletions src/client/headers/client/sqf/ai.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ namespace intercept {
void kb_react();
void kb_tell(const object &unit_, const object &receiver_, sqf_string_const_ref topic_name_, sqf_string_const_ref sentence_class_, sqf_string_const_ref argument_name_, const code &argument_value_, sqf_string_const_ref argument_text_, sqf_string_list_const_ref argument_speech_, std::variant<std::reference_wrapper<bool>, std::reference_wrapper<int>, sqf_string_const_ref_wrapper> force_radio_);
bool kb_was_said(const object &unit_, const object &receiver_, sqf_string_const_ref topic_, sqf_string_const_ref sentence_id_, int max_age_);
bool kb_add_database(const object &value0_, sqf_string_const_ref value1_);
bool kb_add_database_targets(const object &value0_, sqf_string_const_ref value1_);
bool kb_has_topic(const object &value0_, sqf_string_const_ref value1_);
void kb_remove_topic(const object &value0_, sqf_string_const_ref value1_);
bool kb_add_database(const object &obj0_, sqf_string_const_ref value1_);
bool kb_add_database_targets(const object &obj0_, sqf_string_const_ref value1_);
bool kb_has_topic(const object &obj0_, sqf_string_const_ref value1_);
void kb_remove_topic(const object &obj0_, sqf_string_const_ref value1_);

//ai
void set_skill(const object &object_, float skill_);
Expand Down Expand Up @@ -125,7 +125,7 @@ namespace intercept {
KEY_UP,
KEY_DOWN
};
void send_simple_command(const object &value0_, simple_command_type command_);
void send_simple_command(const object &obj0_, simple_command_type command_);
sqf_return_string speed_mode(const object &obj_);
sqf_return_string speed_mode(const group &grp_);
object create_agent(sqf_string_const_ref type_, const vector3 &pos_, const std::vector<marker> &markers_ = {}, float placement_ = 0.0f, sqf_string_const_ref special_ = "NONE"sv);
Expand Down Expand Up @@ -157,11 +157,11 @@ namespace intercept {
vector3 formation_position(const object &unit_);
sqf_return_string behaviour(const object &unit_);
bool check_aifeature(sqf_string_const_ref feature_);
bool fleeing(const object &value_);
float skill(const object &value_);
sqf_return_string land_result(const object &value_);
bool move_to_completed(const object &value_);
bool move_to_failed(const object &value_);
bool fleeing(const object &obj_);
float skill(const object &obj_);
sqf_return_string land_result(const object &obj_);
bool move_to_completed(const object &obj_);
bool move_to_failed(const object &obj_);

enum class ai_behaviour_types {
TARGET, // Stop the unit to watch the assigned target / group commander may not assign targets
Expand All @@ -184,8 +184,8 @@ namespace intercept {
ALL // All of the above.
};

void disable_ai(const object &value0_, ai_behaviour_types type_);
void enable_ai(const object &value0_, ai_behaviour_types type_);
void disable_ai(const object &obj0_, ai_behaviour_types type_);
void enable_ai(const object &obj0_, ai_behaviour_types type_);
enum class ai_feature_types {
AwareFormationSoft,
CombatFormationSoft
Expand All @@ -196,13 +196,13 @@ namespace intercept {
float knows_about(const object &source_, const object &target_);
float knows_about(const group &source_, const object &target_);
float knows_about(const side &side_, const object &target_);
void land(const object &value0_, sqf_string_const_ref value1_);
void land_at(const object &value0_, float value1_);
void land_at(const object &value0_, const object &helipad_);
float skill(const object &value0_, sqf_string_const_ref value1_);
float skill_final(const object &value0_, sqf_string_const_ref value1_);
void stop(const object &value0_, bool value1_);
void suppress_for(const object &value0_, float value1_);
void land(const object &veh_, sqf_string_const_ref mode_);
void land_at(const object &veh_, float id_);
bool land_at(const object &veh_, const object &helipad_, sqf_string_const_ref mode_);
float skill(const object &obj0_, sqf_string_const_ref value1_);
float skill_final(const object &obj0_, sqf_string_const_ref value1_);
void stop(const object &obj0_, bool value1_);
void suppress_for(const object &obj0_, float value1_);
void move_to(const object &unit_, const vector3 &pos_);
struct rv_expected_destination {
vector3 position;
Expand All @@ -218,6 +218,9 @@ namespace intercept {

void use_ai_oper_map_obstruction_test(bool use_);
void use_ai_steering_component(bool use_);
void use_ai_steering_component(const object &veh_, bool use_);
bool is_ai_steering_component_enabled(const object &veh_);
bool is_using_ai_steering_component();
void command_suppressive_fire(const object &unit_, const object &target_);
void command_suppressive_fire(const object &unit_, const vector3 &target_position_);

Expand Down Expand Up @@ -270,7 +273,13 @@ namespace intercept {
void set_unit_combat_mode(const object &unit_, sqf_string_const_ref mode_);
sqf_return_string unit_combat_mode(const object &unit_);
std::vector<rv_unit_trait> get_all_unit_traits(const object &unit_);
std::vector<rv_unit_trait> get_all_unit_traits(sqf_string_const_ref class_);
object get_attack_target(const object &unit_);
std::pair<sqf_return_string, sqf_return_string> vehicle_move_info(const object &vehicle_);

void forget_target(const object &unit_, const object& target_);
void forget_target(const group &group_, const object& target_);
std::vector<object> targets(std::variant<std::reference_wrapper<const object>, std::reference_wrapper<const group>> unit_, std::optional<bool> enemy_only_, std::optional<float> max_distance_, std::optional<std::vector<side>> sides_, std::optional<float> max_age_, std::optional<std::variant<std::reference_wrapper<vector2>, std::reference_wrapper<vector3>>> alternate_center_);
void ignore_target(const group& group_, const object& target_, bool is_ignored_ = true);
} // namespace sqf
} // namespace intercept
14 changes: 14 additions & 0 deletions src/client/headers/client/sqf/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,15 @@ namespace intercept {
script exec_vm(sqf_string_const_ref value_);
bool script_done(script value_);
void terminate(script value_);
void terminate(float value_);
void debug_fsm(float value0_, bool value1_);
void uisleep(float value_);
sqf_return_string to_lower(sqf_string_const_ref value_);
sqf_return_string to_upper(sqf_string_const_ref value_);
void sleep(float value_);
bool finite(float value_);
float exec_fsm(sqf_string_const_ref value_);
int exec_fsm(sqf_string_const_ref value_, bool allow_termination_);
void save_profile_namespace();
bool save_mission_profile_namespace();
void exit();
Expand All @@ -145,6 +147,7 @@ namespace intercept {
void set_fsm_variable(float handle_, sqf_string_const_ref name_, game_value value_);
void set_fsm_variable(int fsm_handle_, sqf_string_const_ref variable_, const game_value &value_);
int exec_fsm(const game_value &arguments_, sqf_string_const_ref file_name_);
int exec_fsm(const game_value &arguments_, sqf_string_const_ref file_name_, bool allow_termination_);
script exec_vm(const game_value &arguments_, sqf_string_const_ref file_name_);
void exec(const game_value &argument_, sqf_string_const_ref script_);
sqf_return_string str(game_value data_);
Expand All @@ -164,6 +167,7 @@ namespace intercept {

game_value get_variable(const rv_namespace &namespace_, sqf_string_const_ref var_name_);
game_value get_variable(const rv_namespace &namespace_, sqf_string_const_ref var_name_, game_value default_value_);
game_value get_variable(const display &display_, sqf_string_const_ref var_name_);
game_value get_variable(const display &display_, sqf_string_const_ref var_name_, game_value default_value_);
game_value get_variable(const object &obj_, sqf_string_const_ref var_name_);
game_value get_variable(const object &obj_, sqf_string_const_ref var_name_, game_value default_value_);
Expand All @@ -178,6 +182,16 @@ namespace intercept {
game_value get_variable(const location &loc_, sqf_string_const_ref var_name_);
game_value get_variable(const location &location_, sqf_string_const_ref var_name_, game_value default_value_);

bool is_nil(const rv_namespace &namespace_, sqf_string_const_ref var_name_);
bool is_nil(const object &obj_, sqf_string_const_ref var_name_);
bool is_nil(const group &group_, sqf_string_const_ref var_name_);

bool is_nil(const display &display_, sqf_string_const_ref var_name_);
bool is_nil(const team_member &team_member_, sqf_string_const_ref var_name_);
bool is_nil(const task &task_, sqf_string_const_ref var_name_);
bool is_nil(const control &control_, sqf_string_const_ref var_name_);
bool is_nil(const location &loc_, sqf_string_const_ref var_name_);

bool is_null(const object &value_);
bool is_null(const control &value_);
bool is_null(const display &value_);
Expand Down
Loading

0 comments on commit cd8774d

Please sign in to comment.