Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powerloader wreckage now can be attacked by xenos #4371

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions code/modules/vehicles/powerloader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,29 @@
opacity = FALSE
pixel_x = -18
pixel_y = -5
health = 100

/obj/structure/powerloader_wreckage/attack_alien(mob/living/carbon/xenomorph/attacking_xeno)
if(attacking_xeno.a_intent == INTENT_HELP)
return XENO_NO_DELAY_ACTION

if(attacking_xeno.mob_size < MOB_SIZE_XENO)
to_chat(attacking_xeno, SPAN_XENOWARNING("You're too small to do any significant damage to this vehicle!"))
return XENO_NO_DELAY_ACTION

attacking_xeno.animation_attack_on(src)

attacking_xeno.visible_message(SPAN_DANGER("[attacking_xeno] slashes [src]!"), SPAN_DANGER("You slash [src]!"))
playsound(attacking_xeno, pick('sound/effects/metalhit.ogg', 'sound/weapons/alien_claw_metal1.ogg', 'sound/weapons/alien_claw_metal2.ogg', 'sound/weapons/alien_claw_metal3.ogg'), 25, 1)

var/damage = (attacking_xeno.melee_vehicle_damage + rand(-5,5))

health -= damage

if(health <= 0)
deconstruct(FALSE)

return XENO_NONCOMBAT_ACTION

/obj/structure/powerloader_wreckage/jd
name = "\improper John Deere 4300 Power Loader wreckage"
Expand Down