mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Basic mobs targeting, attacks, and pig migration. (#28987)
* Basic mobs targeting, attacks, and pig migration. * run updatepaths * fix duplicate macro def * Update code/datums/ai/basic_mobs/basic_ai_behaviors/basic_attacking.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> --------- Signed-off-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
co-authored by
Burzah
parent
5da3694877
commit
efc8adb6dd
@@ -6,6 +6,17 @@
|
||||
#define BB_CURRENT_MIN_MOVE_DISTANCE "BB_min_move_distance"
|
||||
/// How likely is this mob to move when idle per tick?
|
||||
#define BB_BASIC_MOB_IDLE_WALK_CHANCE "BB_basic_idle_walk_chance"
|
||||
/// Flag to set on if you want your mob to STOP running away
|
||||
#define BB_BASIC_MOB_STOP_FLEEING "BB_basic_stop_fleeing"
|
||||
/// Key of something we're running away from
|
||||
#define BB_BASIC_MOB_FLEE_TARGET "BB_basic_flee_target"
|
||||
/// Key for the current hidden location of something we're running away from
|
||||
#define BB_BASIC_MOB_FLEE_TARGET_HIDING_LOCATION "BB_basic_flee_target_hiding_location"
|
||||
/// Key defining the targeting strategy for things to flee from
|
||||
#define BB_FLEE_TARGETING_STRATEGY "BB_flee_targeting_strategy"
|
||||
/// Key defining how far we attempt to get away from something we're fleeing from
|
||||
#define BB_BASIC_MOB_FLEE_DISTANCE "BB_basic_flee_distance"
|
||||
#define DEFAULT_BASIC_FLEE_DISTANCE 9
|
||||
|
||||
// Searching
|
||||
|
||||
@@ -14,12 +25,22 @@
|
||||
|
||||
// Targeting
|
||||
|
||||
/// How close a mob must be for us to select it as a target, if that is less than how far we can maintain it as a target
|
||||
#define BB_AGGRO_RANGE "BB_aggro_range"
|
||||
/// Key for our current target.
|
||||
#define BB_BASIC_MOB_CURRENT_TARGET "BB_basic_current_target"
|
||||
/// Key for the current hidden location of our target if applicable.
|
||||
#define BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION "BB_basic_current_target_hiding_location"
|
||||
/// Key for the type of targeting strategy we will apply.
|
||||
#define BB_TARGETING_STRATEGY "targeting_strategy"
|
||||
/// Key for the minimum status at which we want to target mobs (does not need to be specified if CONSCIOUS)
|
||||
#define BB_TARGET_MINIMUM_STAT "BB_target_minimum_stat"
|
||||
/// Should we skip the faction check for the targeting strategy?
|
||||
#define BB_ALWAYS_IGNORE_FACTION "BB_always_ignore_factions"
|
||||
/// Are we in some kind of temporary state of ignoring factions when targeting? can result in volatile results if multiple behaviours touch this
|
||||
#define BB_TEMPORARILY_IGNORE_FACTION "BB_temporarily_ignore_factions"
|
||||
///List of mobs who have damaged us
|
||||
#define BB_BASIC_MOB_RETALIATE_LIST "BB_basic_mob_shitlist"
|
||||
|
||||
// Food and eating
|
||||
|
||||
@@ -40,3 +61,8 @@
|
||||
#define BB_BASIC_MOB_TIP_REACTING "BB_basic_tip_reacting"
|
||||
/// the motherfucker who tipped us
|
||||
#define BB_BASIC_MOB_TIPPER "BB_basic_tip_tipper"
|
||||
|
||||
// Misc
|
||||
|
||||
/// For /datum/ai_behavior/find_potential_targets, what if any field are we using currently
|
||||
#define BB_FIND_TARGETS_FIELD(type) "bb_find_targets_field_[type]"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
//from base of atom/attack_basic_mob(): (/mob/user)
|
||||
#define COMSIG_ATOM_ATTACK_BASIC_MOB "attack_basic_mob"
|
||||
#define COMPONENT_BASIC_ATTACK_CANCEL_CHAIN (1<<0)
|
||||
|
||||
///sent from ai controllers when they possess a pawn: (datum/ai_controller/source_controller)
|
||||
#define COMSIG_AI_CONTROLLER_POSSESSED_PAWN "ai_controller_possessed_pawn"
|
||||
|
||||
@@ -98,6 +98,15 @@
|
||||
#define COMSIG_ATOM_PREHIT "atom_prehit"
|
||||
#define ATOM_PREHIT_SUCCESS (1<<0)
|
||||
#define ATOM_PREHIT_FAILURE (1<<1)
|
||||
///from relay_attackers element: (atom/attacker, attack_flags)
|
||||
#define COMSIG_ATOM_ATTACK_ANIMAL "atom_attack_animal"
|
||||
#define COMSIG_ATOM_WAS_ATTACKED "atom_was_attacked"
|
||||
///The damage type of the weapon projectile is non-lethal stamina
|
||||
#define ATTACKER_STAMINA_ATTACK (1<<0)
|
||||
///the attacker is shoving the source
|
||||
#define ATTACKER_SHOVING (1<<1)
|
||||
/// The attack is a damaging-type attack
|
||||
#define ATTACKER_DAMAGING_ATTACK (1<<2)
|
||||
|
||||
/// Called from atom/Initialize() of target: (atom/target)
|
||||
#define COMSIG_ATOM_INITIALIZED_ON "atom_initialized_on"
|
||||
|
||||
@@ -47,6 +47,15 @@
|
||||
#define COMSIG_AFTER_ATTACK "item_after_attack" //! [/obj/item/proc/afterattack] -> atom/target, mob/user, params
|
||||
#define COMSIG_AFTER_ATTACKED_BY "after_attacked_by" //! [/obj/item/proc/afterattack] -> obj/item/weapon, mob/user, proximity_flag, params
|
||||
|
||||
/// Before attackingtarget has happened, source is the attacker and target is the attacked
|
||||
#define COMSIG_HOSTILE_PRE_ATTACKINGTARGET "hostile_pre_attackingtarget"
|
||||
#define COMPONENT_HOSTILE_NO_ATTACK COMPONENT_CANCEL_ATTACK_CHAIN //cancel the attack, only works before attack happens
|
||||
#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget"
|
||||
/// Called when a /mob/living/simple_animal/hostile fines a new target: (atom/source, give_target)
|
||||
#define COMSIG_HOSTILE_FOUND_TARGET "comsig_hostile_found_target"
|
||||
/// After attackingtarget has happened, source is the attacker and target is the attacked, extra argument for if the attackingtarget was successful
|
||||
#define COMSIG_HOSTILE_POST_ATTACKINGTARGET "hostile_post_attackingtarget"
|
||||
|
||||
// Return values for directing the control of the attack chain. Distinct from
|
||||
// signal interceptors because they're not meant to be combined, and to mesh better with
|
||||
// historical use of return values in attack chain procs.
|
||||
|
||||
@@ -188,12 +188,6 @@
|
||||
///from /mob/living/simple_animal/handle_environment()
|
||||
#define COMSIG_SIMPLEANIMAL_HANDLE_ENVIRONMENT "simpleanimal_handle_environment"
|
||||
|
||||
// /mob/living/simple_animal/hostile signals
|
||||
#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget"
|
||||
#define COMPONENT_HOSTILE_NO_ATTACK (1<<0)
|
||||
//Called when a /mob/living/simple_animal/hostile fines a new target: (atom/source, give_target)
|
||||
#define COMSIG_HOSTILE_FOUND_TARGET "comsig_hostile_found_target"
|
||||
|
||||
///from of mob/MouseDrop(): (/atom/over, /mob/user)
|
||||
#define COMSIG_DO_MOB_STRIP "do_mob_strip"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user