Carbon mpbs can be attacked again (#6728)

This commit is contained in:
Atermonera
2020-02-22 20:12:23 -08:00
committed by VirgoBot
parent d247f88329
commit 89e23b3218
2 changed files with 4 additions and 4 deletions

View File

@@ -103,7 +103,7 @@
var/sdepth = A.storage_depth(src)
if((!isturf(A) && A == loc) || (sdepth != -1 && sdepth <= 1))
if(W)
var/resolved = W.resolve_attackby(A, src, params)
var/resolved = W.resolve_attackby(A, src, click_parameters = params)
if(!resolved && A && W)
W.afterattack(A, src, 1, params) // 1 indicates adjacency
else
@@ -143,7 +143,7 @@
if(A.Adjacent(src) || (W && W.attack_can_reach(src, A, W.reach)) ) // see adjacent.dm
if(W)
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = W.resolve_attackby(A,src, params)
var/resolved = W.resolve_attackby(A,src, click_parameters = params)
if(!resolved && A && W)
W.afterattack(A, src, 1, params) // 1: clicking something Adjacent
else

View File

@@ -37,11 +37,11 @@ avoid code duplication. This includes items that may sometimes act as a standard
/atom/proc/attackby(obj/item/W, mob/user, var/attack_modifier, var/click_parameters)
return
/atom/movable/attackby(obj/item/W, mob/user, var/attack_modifier)
/atom/movable/attackby(obj/item/W, mob/user, var/attack_modifier, var/click_parameters)
if(!(W.flags & NOBLUDGEON))
visible_message("<span class='danger'>[src] has been hit by [user] with [W].</span>")
/mob/living/attackby(obj/item/I, mob/user, var/attack_modifier)
/mob/living/attackby(obj/item/I, mob/user, var/attack_modifier, var/click_parameters)
if(!ismob(user))
return 0
if(can_operate(src) && I.do_surgery(src,user))