Makes the armblade handle more like the fireaxe with opening doors (#20313)

* armblade tweaks

* mistaken regression

* farie's review

* early return

* Update code/game/machinery/doors/airlock.dm

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

---------

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
GDN
2023-03-08 19:57:14 +01:00
committed by GitHub
co-authored by S34N
parent 0f6cb57276
commit 8ea96d8e36
6 changed files with 48 additions and 40 deletions
@@ -123,37 +123,22 @@
throw_range = 0
throw_speed = 0
/obj/item/melee/arm_blade/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_FORCES_OPEN_DOORS_ITEM, ROUNDSTART_TRAIT)
/obj/item/melee/arm_blade/afterattack(atom/target, mob/user, proximity)
if(!proximity)
return
if(istype(target, /obj/structure/table))
var/obj/structure/table/T = target
T.deconstruct(FALSE)
return
else if(istype(target, /obj/machinery/computer))
if(istype(target, /obj/machinery/computer))
var/obj/machinery/computer/C = target
C.attack_alien(user) //muh copypasta
else if(istype(target, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/A = target
if(!A.requiresID() || A.allowed(user)) //This is to prevent stupid shit like hitting a door with an arm blade, the door opening because you have acces and still getting a "the airlocks motors resist our efforts to force it" message.
return
if(A.locked)
to_chat(user, "<span class='notice'>The airlock's bolts prevent it from being forced.</span>")
return
if(A.arePowerSystemsOn())
user.visible_message("<span class='warning'>[user] jams [src] into the airlock and starts prying it open!</span>", "<span class='warning'>We start forcing the airlock open.</span>", \
"<span class='italics'>You hear a metal screeching sound.</span>")
playsound(A, 'sound/machines/airlock_alien_prying.ogg', 150, 1)
if(!do_after(user, 100, target = A))
return
//user.say("Heeeeeeeeeerrre's Johnny!")
user.visible_message("<span class='warning'>[user] forces the airlock to open with [user.p_their()] [name]!</span>", "<span class='warning'>We force the airlock to open.</span>", "<span class='warning'>You hear a metal screeching sound.</span>")
A.open(2)
/***************************************\
|***********COMBAT TENTACLES*************|