diff --git a/code/__DEFINES/xeno_ai.dm b/code/__DEFINES/xeno_ai.dm index dc4be8dbcc..d1f0b647cd 100644 --- a/code/__DEFINES/xeno_ai.dm +++ b/code/__DEFINES/xeno_ai.dm @@ -9,6 +9,7 @@ #define DOOR_PENALTY 3 #define OBJECT_PENALTY 20 #define HUMAN_PENALTY 4 +#define XENO_PENALTY 20 #define VEHICLE_PENALTY 25 #define SENTRY_PENALTY 25 #define WINDOW_FRAME_PENALTY 25 diff --git a/code/modules/defenses/sentry.dm b/code/modules/defenses/sentry.dm index 24bff3d869..8beec534fb 100644 --- a/code/modules/defenses/sentry.dm +++ b/code/modules/defenses/sentry.dm @@ -62,6 +62,12 @@ can_be_near_defense = TRUE + /// Delay sending no ammo messages + COOLDOWN_DECLARE(no_ammo_message_cooldown) + + /// Delay for the beep before firing after not firing for a while + COOLDOWN_DECLARE(beep_fire_sound_cooldown) + /obj/structure/machinery/defenses/sentry/Initialize() . = ..() spark_system = new /datum/effect_system/spark_spread @@ -317,14 +323,18 @@ if(!(world.time-last_fired >= fire_delay) || !turned_on || !ammo || QDELETED(target)) return - if(world.time-last_fired >= 30 SECONDS) //if we haven't fired for a while, beep first + if(COOLDOWN_FINISHED(src, beep_fire_sound_cooldown)) //if we haven't fired for a while, beep first playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) if(ammo && ammo.current_rounds <= 0) - to_chat(usr, SPAN_WARNING("[name] does not have any ammo.")) + if(COOLDOWN_FINISHED(src, no_ammo_message_cooldown)) + visible_message(SPAN_WARNING("[src] beeps steadily and its ammo light blinks red.")) + COOLDOWN_START(src, no_ammo_message_cooldown, (3 SECONDS)) + return last_fired = world.time + COOLDOWN_START(src, beep_fire_sound_cooldown, (30 SECONDS)) if(QDELETED(owner_mob)) owner_mob = src diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm b/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm index ddadee2b5b..9f4ce3df0e 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm @@ -100,6 +100,14 @@ At bare minimum, make sure the relevant checks from parent types gets copied in . = ..() +// XENOS +/mob/living/carbon/xenomorph/xeno_ai_obstacle(mob/living/carbon/xenomorph/X, direction, turf/target) + . = ..() + if(!.) + return + + return XENO_PENALTY + // VEHICLES /obj/vehicle/xeno_ai_obstacle(mob/living/carbon/xenomorph/X, direction, turf/target) . = ..() @@ -122,11 +130,6 @@ At bare minimum, make sure the relevant checks from parent types gets copied in return ..() return WINDOW_FRAME_PENALTY -/obj/structure/window_frame/xeno_ai_act(mob/living/carbon/xenomorph/X) - . = ..() - if(!X.action_busy) - do_climb(X) - /obj/structure/barricade/handrail/xeno_ai_obstacle(mob/living/carbon/xenomorph/X, direction, turf/target) . = ..() if(!.) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 71e0a75aed..531afd2f4a 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -520,8 +520,10 @@ else if(!L.lying) animatation_displace_reset(L) if(ammo.sound_miss) playsound_client(L.client, ammo.sound_miss, get_turf(L), 75, TRUE) - L.visible_message(SPAN_AVOIDHARM("[src] misses [L]!"), - SPAN_AVOIDHARM("[src] narrowly misses you!"), null, 4, CHAT_TYPE_TAKING_HIT) + if(COOLDOWN_FINISHED(L, shot_cooldown)) + L.visible_message(SPAN_AVOIDHARM("[src] misses [L]!"), + SPAN_AVOIDHARM("[src] narrowly misses you!"), null, 4, CHAT_TYPE_TAKING_HIT) + COOLDOWN_START(L, shot_cooldown, 1 SECONDS) var/log_message = "[src] narrowly missed [key_name(L)]" var/mob/living/carbon/shotby = firer