Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into vehicle-autofire
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Oct 29, 2023
2 parents 5879f73 + 837fbfa commit 07e0927
Show file tree
Hide file tree
Showing 15 changed files with 447 additions and 89 deletions.
9 changes: 9 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,12 @@

/// For any additional things that should happen when a xeno's melee_attack_additional_effects_self() proc is called
#define COMSIG_XENO_SLASH_ADDITIONAL_EFFECTS_SELF "xeno_slash_additional_effects_self"

/// From /mob/living/carbon/xenomorph/proc/handle_crit()
#define COMSIG_XENO_HANDLE_CRIT "xeno_handle_crit"

/// From /datum/action/xeno_action/activable/pounce/use_ability()
#define COMSIG_XENO_USED_POUNCE "xeno_used_pounce"

/// From /mob/living/carbon/xenomorph/proc/handle_ai_shot()
#define COMSIG_XENO_HANDLE_AI_SHOT "xeno_handle_ai_shot"
41 changes: 2 additions & 39 deletions code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#define WALL_PENALTY 50
#define FIRE_PENALTY 25

// Xeno AI flags
#define XENO_AI_NO_DESPAWN (1<<0)
#define XENO_AI_CHOOSE_RANDOM_STRAIN (1<<1)

/*
PROBABILITY CALCULATIONS ARE HERE
*/
Expand All @@ -28,6 +24,8 @@ PROBABILITY CALCULATIONS ARE HERE
#define RETREAT_AT_PLASMA_LEVEL 0.2
#define RETREAT_AT_HEALTH_LEVEL 0.4

#define LURKING_IGNORE_SHOT_CHANCE 75

// Warrior

/// How likely should it be that you lunge when off cooldown?
Expand Down Expand Up @@ -86,41 +84,6 @@ PROBABILITY CALCULATIONS ARE HERE
#define PRAETORIAN_SPIT 80
#define PRAETORIAN_SPRAY 80

/*
GAME DIRECTOR AI
*/

/datum/config_entry/number/ai_director
abstract_type = /datum/config_entry/number/ai_director

#define IDEAL_T2_PERCENT 0.5
#define IDEAL_T3_PERCENT 0.25

/// The maximum amount of xenomorphs that can spawn, scaled up by population.
/datum/config_entry/number/ai_director/max_xeno_per_player
config_entry_value = 1

// Xenos spawn
/datum/config_entry/number/ai_director/t2_spawn_at_percentage
config_entry_value = 0.25

/datum/config_entry/number/ai_director/t3_spawn_at_percentage
config_entry_value = 0.5

/// The minimum range at which a xeno can be spawned from a human
#define MIN_RANGE_TO_SPAWN_XENO 10
/// The maximum range at which a xeno can be spawned from a human
#define MAX_RANGE_TO_SPAWN_XENO 25

/// When a xeno gets despawned if there is no human within a specific range.
#define RANGE_TO_DESPAWN_XENO 25
/// When a xeno gets despawned if they can't find a target within a specific amount of time.
#define XENO_DESPAWN_NO_TARGET_PERIOD 200 SECONDS

// Director flags
#define XENO_SPAWN_T1 (1<<0)
#define XENO_SPAWN_T2 (1<<1)
#define XENO_SPAWN_T3 (1<<2)

/// Special blockers for pathfinding or obstacle handling
#define XENO_AI_SPECIAL_BLOCKERS list(/obj/flamer_fire, /obj/vehicle/multitile)
2 changes: 1 addition & 1 deletion code/_globalvars/lists/object_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ GLOBAL_LIST_EMPTY_TYPED(hijack_deletable_windows, /obj/structure/machinery/door/
GLOBAL_LIST_EMPTY_TYPED(hijack_bustable_ladders, /obj/structure/ladder/fragile_almayer)

GLOBAL_LIST_EMPTY_TYPED(all_multi_vehicles, /obj/vehicle/multitile)
GLOBAL_LIST_EMPTY_TYPED(all_defenses, /obj/structure/machinery/defenses)
GLOBAL_LIST_EMPTY_TYPED(all_active_defenses, /obj/structure/machinery/defenses)

GLOBAL_LIST_EMPTY_TYPED(lifeboat_almayer_docks, /obj/docking_port/stationary/lifeboat_dock)
GLOBAL_LIST_EMPTY_TYPED(lifeboat_doors, /obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/lifeboat/blastdoor)
2 changes: 1 addition & 1 deletion code/modules/admin/game_master/game_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)

// Spawn stuff
#define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE
#define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_CRUSHER)
#define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER)

#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE
#define GAME_MASTER_VENT_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER)
#define GAME_MASTER_VENT_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER)

#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1

Expand Down
6 changes: 3 additions & 3 deletions code/modules/defenses/defenses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@
power_on_action()
update_icon()

GLOB.all_defenses += src
GLOB.all_active_defenses += src

/obj/structure/machinery/defenses/proc/power_off()
turned_on = FALSE
power_off_action()
update_icon()

GLOB.all_defenses -= src
GLOB.all_active_defenses -= src

/**
* Update state category for this structure.
Expand Down Expand Up @@ -472,7 +472,7 @@
return

/obj/structure/machinery/defenses/Destroy()
GLOB.all_defenses -= src
GLOB.all_active_defenses -= src

if(owner_mob)
owner_mob = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@
LM.pass_flags = pounce_pass_flags
LM.collision_callbacks = pounce_callbacks

SEND_SIGNAL(owner, COMSIG_XENO_USED_POUNCE, A)

X.launch_towards(LM)

X.update_icons()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Config options
distance = 6
knockdown = FALSE
knockdown_duration = 2.5
knockdown_duration = 1.5
freeze_self = TRUE
freeze_time = 15
can_be_shield_blocked = TRUE
Expand Down
Loading

0 comments on commit 07e0927

Please sign in to comment.