mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
resolve_attackby bugfix (#19441)
This commit is contained in:
@@ -137,7 +137,8 @@
|
||||
if(!currently_restrained && ((!isturf(A) && A == loc) || (sdepth <= MAX_STORAGE_REACH)))
|
||||
if(W)
|
||||
var/resolved = W.resolve_attackby(A, src, click_parameters = params)
|
||||
if(!resolved && A && W)
|
||||
//If we got a 'SUCCESS' it means resolve_attackby did something. Don't do afterattack in that case.
|
||||
if((resolved != ITEM_INTERACT_SUCCESS) && A && W)
|
||||
W.afterattack(A, src, 1, params) // 1 indicates adjacency
|
||||
else
|
||||
if(ismob(A)) // No instant mob attacking
|
||||
@@ -150,7 +151,7 @@
|
||||
if(!currently_restrained && isbelly(loc) && (loc == A.loc))
|
||||
if(W)
|
||||
var/resolved = W.resolve_attackby(A,src)
|
||||
if(!resolved && A && W)
|
||||
if((resolved != ITEM_INTERACT_SUCCESS) && A && W)
|
||||
W.afterattack(A, src, 1, params) // 1: clicking something Adjacent
|
||||
else
|
||||
if(ismob(A)) // No instant mob attacking
|
||||
@@ -176,7 +177,7 @@
|
||||
if(W && !restrained())
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = W.resolve_attackby(A,src, click_parameters = params)
|
||||
if(!resolved && A && W)
|
||||
if((resolved != ITEM_INTERACT_SUCCESS) && A && W)
|
||||
W.afterattack(A, src, 1, params) // 1: clicking something Adjacent
|
||||
else
|
||||
if(ismob(A)) // No instant mob attacking
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
upgrade_to = /obj/item/stack/medical/bruise_pack
|
||||
|
||||
/obj/item/stack/medical/crude_pack/attack(mob/living/M, mob/living/user, target_zone, attack_modifier)
|
||||
if(..())
|
||||
if(..() == ITEM_INTERACT_FAILURE)
|
||||
return ITEM_INTERACT_FAILURE
|
||||
|
||||
if (ishuman(M))
|
||||
@@ -160,7 +160,7 @@
|
||||
upgrade_to = /obj/item/stack/medical/advanced/bruise_pack
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/attack(mob/living/M, mob/living/user, target_zone, attack_modifier)
|
||||
if(..())
|
||||
if(..() == ITEM_INTERACT_FAILURE)
|
||||
return ITEM_INTERACT_FAILURE
|
||||
|
||||
if (ishuman(M))
|
||||
@@ -234,7 +234,7 @@
|
||||
pickup_sound = 'sound/items/pickup/herb.ogg'
|
||||
|
||||
/obj/item/stack/medical/ointment/attack(mob/living/M, mob/living/user, target_zone, attack_modifier)
|
||||
if(..())
|
||||
if(..() == ITEM_INTERACT_FAILURE)
|
||||
return ITEM_INTERACT_FAILURE
|
||||
|
||||
if (ishuman(M))
|
||||
|
||||
Reference in New Issue
Block a user