mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
[MIRROR] robots can use melee weapon range, runtime fix (#7362)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
|
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
|
||||||
if(isturf(A) || isturf(A.loc))
|
if(isturf(A) || isturf(A.loc))
|
||||||
if(A.Adjacent(src)) // see adjacent.dm
|
if(A.Adjacent(src) || (W && W.attack_can_reach(src, A, W.reach))) // see adjacent.dm, allows robots to use ranged melee weapons
|
||||||
|
|
||||||
var/resolved = A.attackby(W, src, 1)
|
var/resolved = A.attackby(W, src, 1)
|
||||||
if(!resolved && A && W)
|
if(!resolved && A && W)
|
||||||
|
|||||||
@@ -185,22 +185,22 @@
|
|||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
shatter()
|
shatter()
|
||||||
|
|
||||||
else if (usr.a_intent == I_HURT)
|
else if (user.a_intent == I_HURT)
|
||||||
|
|
||||||
if (istype(usr,/mob/living/carbon/human))
|
if (istype(user,/mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/H = usr
|
var/mob/living/carbon/human/H = user
|
||||||
if(H.species.can_shred(H))
|
if(H.species.can_shred(H))
|
||||||
attack_generic(H,25)
|
attack_generic(H,25)
|
||||||
return
|
return
|
||||||
|
|
||||||
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
|
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
|
||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
usr.visible_message("<span class='danger'>\The [usr] bangs against \the [src]!</span>",
|
user.visible_message("<span class='danger'>\The [user] bangs against \the [src]!</span>",
|
||||||
"<span class='danger'>You bang against \the [src]!</span>",
|
"<span class='danger'>You bang against \the [src]!</span>",
|
||||||
"You hear a banging sound.")
|
"You hear a banging sound.")
|
||||||
else
|
else
|
||||||
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
|
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
|
||||||
usr.visible_message("[usr.name] knocks on the [src.name].",
|
user.visible_message("[user.name] knocks on the [src.name].",
|
||||||
"You knock on the [src.name].",
|
"You knock on the [src.name].",
|
||||||
"You hear a knocking sound.")
|
"You hear a knocking sound.")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user