Skip to content

Commit

Permalink
experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Sep 11, 2023
1 parent bb17b58 commit 5cd4c86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define DEFAULT_MESSAGE_RANGE 7

#define BAYONET_DRAW_DELAY (1 SECONDS)
#define POINTBLANK_COOLDOWN_TIME (2 SECONDS)

//Predator decloak multpliers based on the standard.
#define DECLOAK_STANDARD (10 SECONDS)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/living_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
var/image/attack_icon = null //the image used as overlay on the things we attack.

COOLDOWN_DECLARE(zoom_cooldown) //Cooldown on using zooming items, to limit spam
COOLDOWN_DECLARE(pointblank_cooldown) //Cooldown on PB attacks in an effort to prevent bypassing delays.

var/do_bump_delay = 0 // Flag to tell us to delay movement because of being bumped

Expand Down
4 changes: 4 additions & 0 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,9 @@ and you're good to go.
if(!(flags_gun_features & GUN_CAN_POINTBLANK)) // If it can't point blank, you can't suicide and such.
return ..()

if(!COOLDOWN_FINISHED(user, pointblank_cooldown))
return ..()

if(attacked_mob == user && user.zone_selected == "mouth" && ishuman(user))
var/mob/living/carbon/human/HM = user
if(!able_to_fire(user))
Expand Down Expand Up @@ -1392,6 +1395,7 @@ and you're good to go.
if(bullets_fired == 1) //First shot gives the PB message.
user.visible_message(SPAN_DANGER("[user] fires [src] point blank at [attacked_mob]!"),
SPAN_WARNING("You fire [src] point blank at [attacked_mob]!"), null, null, CHAT_TYPE_WEAPON_USE)
COOLDOWN_START(user, pointblank_cooldown, POINTBLANK_COOLDOWN_TIME)

user.track_shot(initial(name))
apply_bullet_effects(projectile_to_fire, user, bullets_fired) //We add any damage effects that we need.
Expand Down

0 comments on commit 5cd4c86

Please sign in to comment.