Skip to content

Commit

Permalink
removed duplicate procs
Browse files Browse the repository at this point in the history
  • Loading branch information
Halonexus committed May 19, 2024
1 parent 17cf9c0 commit c6b43a2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
15 changes: 1 addition & 14 deletions code/modules/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
//If our damage value for that person exceeds this number then we consider targeting them.
if(target_memory[P.firer] > MAX_DAMAGE_SUFFERED)
FindTarget(list(P.firer), 1)
DamageEffect(P.damage, P.damage_type)
return ..()

/mob/living/simple_animal/hostile/Move(atom/newloc, dir , step_x , step_y)
Expand Down Expand Up @@ -254,20 +255,6 @@
add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/variable_hostile_speed_bonus, TRUE, amount, TRUE)
addtimer(CALLBACK(src, TYPE_PROC_REF(/mob, add_or_update_variable_movespeed_modifier), /datum/movespeed_modifier/variable_hostile_speed_bonus, TRUE, -amount, TRUE), time)

/mob/living/simple_animal/hostile/attacked_by(obj/item/I, mob/living/user)
if(stat == CONSCIOUS && !target && AIStatus != AI_OFF && !client && user)
FindTarget(list(user), 1)
return ..()

/mob/living/simple_animal/hostile/bullet_act(obj/projectile/P)
if(stat == CONSCIOUS && !target && AIStatus != AI_OFF && !client)
if(P.firer && get_dist(src, P.firer) <= aggro_vision_range)
FindTarget(list(P.firer), 1)
Goto(P.starting, move_to_delay, 3)

. = ..()
DamageEffect(P.damage, P.damage_type)

/*-------------------\
|Damage Visual Effect|
\-------------------*/
Expand Down
16 changes: 10 additions & 6 deletions code/modules/mob/living/simple_animal/hostile/ordeal/green/dawn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@
return FALSE
return ..()

/mob/living/simple_animal/hostile/ordeal/green_bot/AttackingTarget()
/mob/living/simple_animal/hostile/ordeal/green_bot/AttackingTarget(atom/attacked_target)
if(finishing)
return
. = ..()
if(.)
if(!istype(target, /mob/living/carbon/human))
if(!istype(attacked_target, /mob/living/carbon/human))
return
if(SSmaptype.maptype == "city")
return
var/mob/living/carbon/human/TH = target
var/mob/living/carbon/human/TH = attacked_target
if(TH.health < 0)
finishing = TRUE
TH.Stun(4 SECONDS)
Expand Down Expand Up @@ -103,12 +105,14 @@
melee_damage_lower = 14
melee_damage_upper = 16

/mob/living/simple_animal/hostile/ordeal/green_bot/syringe/AttackingTarget()
/mob/living/simple_animal/hostile/ordeal/green_bot/syringe/AttackingTarget(atom/attacked_target)
if(finishing)
return
. = ..()
if(.)
if(!istype(target, /mob/living/carbon/human))
if(!istype(attacked_target, /mob/living/carbon/human))
return
var/mob/living/carbon/human/H = target
var/mob/living/carbon/human/H = attacked_target
H.add_movespeed_modifier(/datum/movespeed_modifier/grab_slowdown/aggressive)
addtimer(CALLBACK(H, TYPE_PROC_REF(/mob, remove_movespeed_modifier), /datum/movespeed_modifier/grab_slowdown/aggressive), 4 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
blood_volume = BLOOD_VOLUME_NORMAL
silk_results = list(/obj/item/stack/sheet/silk/indigo_simple = 1)

/mob/living/simple_animal/hostile/ordeal/indigo_dawn/AttackingTarget()
/mob/living/simple_animal/hostile/ordeal/indigo_dawn/AttackingTarget(atom/attacked_target)
. = ..()
if(. && isliving(target))
var/mob/living/L = target
if(. && isliving(attacked_target))
var/mob/living/L = attacked_target
if(L.stat != DEAD)
if(L.health <= HEALTH_THRESHOLD_DEAD && HAS_TRAIT(L, TRAIT_NODEATH))
devour(L)
Expand Down

0 comments on commit c6b43a2

Please sign in to comment.