Skip to content

Commit

Permalink
Add binary and nular commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopard20 committed Apr 13, 2024
1 parent bdde720 commit 348dea5
Show file tree
Hide file tree
Showing 22 changed files with 388 additions and 226 deletions.
44 changes: 25 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 @@ -220,6 +220,7 @@ namespace intercept {
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 @@ -275,5 +276,10 @@ namespace intercept {
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
11 changes: 11 additions & 0 deletions src/client/headers/client/sqf/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,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 @@ -181,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 348dea5

Please sign in to comment.