Tg 1 28 sync testing/confirmation (#5178)
* maps, tgui, tools * defines and helpers * onclick and controllers * datums fucking caught that hulk reversal too. * game and shuttle modular * module/admin * oh god they fucking moved antag shit again * haaaaate. Haaaaaaaaaate. * enables moff wings * more modules things * tgstation.dme before I forget something important * some mob stuff * s'more mob/living stuff * some carbon stuff * ayy lmaos and kitchen meat * Human stuff * species things moff wings have a 'none' version too * the rest of the module stuff. * some strings * misc * mob icons * some other icons. * It compiles FUCK BORERS FUCK BORERS
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
/obj/item/proc/melee_attack_chain(mob/user, atom/target, params)
|
||||
if(!tool_check(user, target) && pre_attackby(target, user, params))
|
||||
if(!tool_attack_chain(user, target) && pre_attackby(target, user, params))
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = target.attackby(src, user, params)
|
||||
if(!resolved && target && !QDELETED(src))
|
||||
@@ -8,20 +8,11 @@
|
||||
|
||||
|
||||
//Checks if the item can work as a tool, calling the appropriate tool behavior on the target
|
||||
/obj/item/proc/tool_check(mob/user, atom/target)
|
||||
switch(tool_behaviour)
|
||||
if(TOOL_NONE)
|
||||
return FALSE
|
||||
if(TOOL_CROWBAR)
|
||||
return target.crowbar_act(user, src)
|
||||
if(TOOL_MULTITOOL)
|
||||
return target.multitool_act(user, src)
|
||||
if(TOOL_SCREWDRIVER)
|
||||
return target.screwdriver_act(user, src)
|
||||
if(TOOL_WRENCH)
|
||||
return target.wrench_act(user, src)
|
||||
if(TOOL_WIRECUTTER)
|
||||
return target.wirecutter_act(user, src)
|
||||
/obj/item/proc/tool_attack_chain(mob/user, atom/target)
|
||||
if(!tool_behaviour)
|
||||
return FALSE
|
||||
|
||||
return target.tool_act(user, src, tool_behaviour)
|
||||
|
||||
|
||||
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
|
||||
@@ -39,7 +30,7 @@
|
||||
return FALSE
|
||||
|
||||
/obj/attackby(obj/item/I, mob/living/user, params)
|
||||
return ..() || (can_be_hit && I.attack_obj(src, user))
|
||||
return ..() || ((obj_flags & CAN_BE_HIT) && I.attack_obj(src, user))
|
||||
|
||||
/mob/living/attackby(obj/item/I, mob/living/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -59,10 +50,10 @@
|
||||
if(flags_1 & NOBLUDGEON_1)
|
||||
return
|
||||
|
||||
if(force && user.has_disability(DISABILITY_PACIFISM))
|
||||
if(force && user.has_trait(TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm other living beings!</span>")
|
||||
return
|
||||
|
||||
|
||||
if(!force)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1)
|
||||
else if(hitsound)
|
||||
|
||||
Reference in New Issue
Block a user