Pet Commands QOL . makes pet commands easier to use (#88495)

## About The Pull Request
this PR improves the UX of pet commands a bit. i decided to expand on
their radial menu. You can now hold shift and hover over your pet to
display a menu of commands which you can choose from. alternatively, you
can still type out commands in chat


https://github.com/user-attachments/assets/9da7f7ea-58a3-4fd6-b040-45cc05cda51d



## Why It's Good For The Game
makes pet commands easier to give out when you're managing more than 1
pet. also fixes the fishing command not working.

## Changelog
🆑
qol: holding shift and hovering over your pet will display a list of
commands you can click from
fix: fixes the fishing pet command not working
/🆑
This commit is contained in:
Ben10Omintrix
2024-12-22 03:05:30 +01:00
committed by GitHub
parent d39dd980b8
commit efe62c5a72
50 changed files with 426 additions and 220 deletions
@@ -127,7 +127,7 @@
var/static/list/pet_commands = list(
/datum/pet_command/idle,
/datum/pet_command/free,
/datum/pet_command/point_targeting/clean,
/datum/pet_command/clean,
)
/mob/living/basic/bot/cleanbot/Initialize(mapload)
@@ -200,14 +200,15 @@
return
return ..()
/datum/pet_command/point_targeting/clean
/datum/pet_command/clean
command_name = "Clean"
command_desc = "Command a cleanbot to clean the mess."
requires_pointing = TRUE
radial_icon = 'icons/obj/service/janitor.dmi'
radial_icon_state = "mop"
speech_commands = list("clean", "mop")
/datum/pet_command/point_targeting/clean/set_command_target(mob/living/parent, atom/target)
/datum/pet_command/clean/set_command_target(mob/living/parent, atom/target)
if(isnull(target) || !istype(target, /obj/effect/decal/cleanable))
return
if(isnull(parent.ai_controller))
@@ -216,7 +217,7 @@
return
return ..()
/datum/pet_command/point_targeting/clean/execute_action(datum/ai_controller/basic_controller/bot/controller)
/datum/pet_command/clean/execute_action(datum/ai_controller/basic_controller/bot/controller)
if(controller.blackboard_key_exists(BB_CURRENT_PET_TARGET))
controller.queue_behavior(/datum/ai_behavior/execute_clean, BB_CURRENT_PET_TARGET)
return SUBTREE_RETURN_FINISH_PLANNING