diff --git a/code/game/objects/items/sport.dm b/code/game/objects/items/sport.dm index 6a094b935f5..b2e40a4f635 100644 --- a/code/game/objects/items/sport.dm +++ b/code/game/objects/items/sport.dm @@ -7,10 +7,13 @@ throw_speed = 1 throw_range = 20 flags = CONDUCT + new_attack_chain = TRUE /// Whether `attack_self` will move ("dribble") it to the other hand var/dribbleable = FALSE // Most balls do not have a dribble animation -/obj/item/beach_ball/attack_self__legacy__attackchain(mob/user) +/obj/item/beach_ball/activate_self(mob/user) + if(..()) + return if(!dribbleable) return diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 6044c793671..361958d95a3 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -13,15 +13,22 @@ attack_verb = list("banned") armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 100, ACID = 70) resistance_flags = FIRE_PROOF + new_attack_chain = TRUE /obj/item/banhammer/suicide_act(mob/user) visible_message("[user] is hitting [user.p_themselves()] with [src]! It looks like [user.p_theyre()] trying to ban [user.p_themselves()] from life.") return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS -/obj/item/banhammer/attack__legacy__attackchain(mob/M, mob/user) - to_chat(M, " You have been banned FOR NO REISIN by [user]") - to_chat(user, " You have BANNED [M]") - playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much +/obj/item/banhammer/pre_attack(atom/A, mob/living/user, params) + if(..()) + return FINISH_ATTACK + + if(ismob(A)) + user.changeNext_move(CLICK_CD_MELEE) + to_chat(A, "You have been banned FOR NO REISIN by [user]") + to_chat(user, "You have BANNED [A]") + playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much + return FINISH_ATTACK /obj/item/sord name = "\improper SORD" diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 77f58a53aff..3c106a53ab8 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -11,7 +11,7 @@ LINEN BINS icon_state = "sheet" lefthand_file = 'icons/mob/inhands/bedsheet_lefthand.dmi' righthand_file = 'icons/mob/inhands/bedsheet_righthand.dmi' - layer = 4 + layer = MOB_LAYER throwforce = 1 throw_speed = 1 throw_range = 2 @@ -22,6 +22,7 @@ LINEN BINS dog_fashion = /datum/dog_fashion/head/ghost dyeable = TRUE dyeing_key = DYE_REGISTRY_BEDSHEET + new_attack_chain = TRUE var/list/dream_messages = list("white") var/list/nightmare_messages = list("black") @@ -36,24 +37,26 @@ LINEN BINS return return ..() -/obj/item/bedsheet/attack_self__legacy__attackchain(mob/user as mob) +/obj/item/bedsheet/activate_self(mob/user) + if(..()) + return + user.drop_item() + + // this check doesn't work, because layer is set to ABOVE_HUD_LAYER when in a hand if(layer == initial(layer)) - layer = 5 + layer = MOB_LAYER + 1 else layer = initial(layer) add_fingerprint(user) - return -/obj/item/bedsheet/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(I.sharp) +/obj/item/bedsheet/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(used.sharp) var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3) transfer_fingerprints_to(C) C.add_fingerprint(user) to_chat(user, "You tear [src] up.") qdel(src) - else - return ..() /obj/item/bedsheet/blue icon_state = "sheetblue" @@ -276,6 +279,7 @@ LINEN BINS anchored = TRUE resistance_flags = FLAMMABLE max_integrity = 70 + new_attack_chain = TRUE var/amount = 20 var/list/sheets = list() var/obj/item/hidden = null @@ -325,25 +329,25 @@ LINEN BINS default_unfasten_wrench(user, I, time = 20) return TRUE -/obj/structure/bedsheetbin/attackby__legacy__attackchain(obj/item/I, mob/user, params) - if(istype(I, /obj/item/bedsheet)) +/obj/structure/bedsheetbin/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(istype(used, /obj/item/bedsheet)) if(!user.drop_item()) - to_chat(user, "[I] is stuck to your hand!") + to_chat(user, "[used] is stuck to your hand!") return - I.forceMove(src) - sheets.Add(I) + used.forceMove(src) + sheets.Add(used) amount++ update_icon(UPDATE_ICON_STATE) - to_chat(user, "You put [I] in [src].") - else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there. - if(I.flags & ABSTRACT) + to_chat(user, "You put [used] in [src].") + else if(amount && !hidden && used.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there. + if(used.flags & ABSTRACT) return if(!user.drop_item()) - to_chat(user, "[I] is stuck to your hand!") + to_chat(user, "[used] is stuck to your hand!") return - I.forceMove(src) - hidden = I - to_chat(user, "You hide [I] among the sheets.") + used.forceMove(src) + hidden = used + to_chat(user, "You hide [used] among the sheets.")