Skip to content

Commit

Permalink
Cricket Fix (#33604)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurfursten authored Oct 29, 2022
1 parent 6e83d3a commit f47243a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
18 changes: 8 additions & 10 deletions code/modules/mob/living/simple_animal/cricket.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
/mob/living/simple_animal/cricket/New()
..()

pixel_x = rand(-20, 20) * PIXEL_MULTIPLIER
pixel_y = rand(-20, 20) * PIXEL_MULTIPLIER
pixel_x = rand(-15, 15) * PIXEL_MULTIPLIER
pixel_y = rand(-15, 15) * PIXEL_MULTIPLIER

maxHealth = rand(1,6)
health = maxHealth
Expand Down Expand Up @@ -81,22 +81,20 @@
/mob/living/simple_animal/cricket/Crossed(mob/living/O)
if(!istype(O))
return
if(O.a_intent == I_HELP)
return //Must be on harm intent to stomp
if(O.a_intent != I_HURT)
return
if(O.isUnconscious())
return

if(prob(15))
death(gore = 1)

/mob/living/simple_animal/cricket/wander_move(turf/dest)
icon_state = "cricket-hop"
animate(src, pixel_x = rand(-8,8), time=4, loop=1, easing=ELASTIC_EASING)
..()
var/halfway = rand(-10,10)
//- moving left. + moving right.
do_flick(src, "cricket-hop", 5)
animate(src, pixel_x = pixel_x - halfway, pixel_y = pixel_y + 4 * PIXEL_MULTIPLIER, 2, 1, ELASTIC_EASING)
animate(src, pixel_x = pixel_x - halfway, pixel_y = pixel_y - 4 * PIXEL_MULTIPLIER, 3, 1, ELASTIC_EASING)

spawn(4)
icon_state = "cricket"

/mob/living/simple_animal/cricket/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/newspaper))
Expand Down
1 change: 1 addition & 0 deletions vgstation13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,7 @@
#include "code\modules\events\brand_intelligence.dm"
#include "code\modules\events\carp_migration.dm"
#include "code\modules\events\communications_blackout.dm"
#include "code\modules\events\crickets.dm"
#include "code\modules\events\electrical_storm.dm"
#include "code\modules\events\event.dm"
#include "code\modules\events\event_dynamic.dm"
Expand Down

0 comments on commit f47243a

Please sign in to comment.