From 6084a6badb0aa7d347bc3f742f923b9d6f4de17d Mon Sep 17 00:00:00 2001 From: morrowwolf Date: Mon, 11 Sep 2023 01:21:33 -0400 Subject: [PATCH] Powerloader wreckage now can be attacked by xenos (#4371) # About the pull request Powerloader wreckage now can be attacked by xenos # Explain why it's good for the game Dumb meta rules/oversight # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: Morrow add: Powerloader wreckage now can be attacked by xenos /:cl: --- code/modules/vehicles/powerloader.dm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/code/modules/vehicles/powerloader.dm b/code/modules/vehicles/powerloader.dm index 88d917b90b3e..6992269c7566 100644 --- a/code/modules/vehicles/powerloader.dm +++ b/code/modules/vehicles/powerloader.dm @@ -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"