diff --git a/code/game/objects/items/collar.dm b/code/game/objects/items/collar.dm index 6a71734de9a..eb1599f9869 100644 --- a/code/game/objects/items/collar.dm +++ b/code/game/objects/items/collar.dm @@ -6,24 +6,28 @@ var/original_name var/original_real_name var/obj/item/card/id/access_id + new_attack_chain = TRUE /obj/item/petcollar/Destroy() QDEL_NULL(access_id) STOP_PROCESSING(SSobj, src) return ..() -/obj/item/petcollar/attack_self__legacy__attackchain(mob/user) +/obj/item/petcollar/activate_self(mob/user) + if(..()) + return ITEM_INTERACT_COMPLETE var/option = "Change Name" if(access_id) option = tgui_input_list(user, "What do you want to do?", "[src]", list("Change Name", "Remove ID")) if(QDELETED(src) || !Adjacent(user)) - return + return ITEM_INTERACT_COMPLETE switch(option) if("Change Name") var/petname = input(user, "Would you like to change the name on the tag?", "Name your new pet", tagname ? tagname : "Spot") as null|text if(petname && !QDELETED(src) && Adjacent(user)) tagname = copytext(sanitize(petname), 1, MAX_NAME_LEN) name = "[initial(name)] - [tagname]" + return ITEM_INTERACT_COMPLETE if("Remove ID") if(access_id) user.visible_message(SPAN_WARNING("[user] starts unclipping [access_id] from [src].")) @@ -32,17 +36,19 @@ access_id.forceMove(get_turf(user)) user.put_in_hands(access_id) access_id = null + return ITEM_INTERACT_COMPLETE -/obj/item/petcollar/attackby__legacy__attackchain(obj/item/card/id/W, mob/user, params) - if(!istype(W)) +/obj/item/petcollar/item_interaction(mob/living/user, obj/item/card/id/tool, list/modifiers) + if(!istype(tool)) return ..() if(access_id) to_chat(user, SPAN_WARNING("There is already \a [access_id] clipped onto [src].")) - return ..() + return ITEM_INTERACT_COMPLETE user.drop_item() - W.forceMove(src) - access_id = W - to_chat(user, SPAN_NOTICE("[W] clips onto [src] snugly.")) + tool.forceMove(src) + access_id = tool + to_chat(user, SPAN_NOTICE("[tool] clips onto [src] snugly.")) + return ITEM_INTERACT_COMPLETE /obj/item/petcollar/GetAccess() return access_id ? access_id.GetAccess() : ..() diff --git a/code/modules/mob/living/simple_animal/friendly/fox.dm b/code/modules/mob/living/simple_animal/friendly/fox.dm index 21702143bec..b2dae6714bd 100644 --- a/code/modules/mob/living/simple_animal/friendly/fox.dm +++ b/code/modules/mob/living/simple_animal/friendly/fox.dm @@ -14,6 +14,12 @@ see_in_dark = 6 butcher_results = list(/obj/item/food/meat = 3) response_disarm = "gently pushes aside" + var/collar_icon_state = "fox" + +/mob/living/simple_animal/pet/dog/fox/Initialize(mapload) + . = ..() + AddElement(/datum/element/wears_collar, collar_icon_state_ = collar_icon_state) + regenerate_icons() //Captain fox /mob/living/simple_animal/pet/dog/fox/renault