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
@@ -39,8 +39,9 @@
var/static/list/pet_commands = list(
/datum/pet_command/idle,
/datum/pet_command/free,
/datum/pet_command/move,
/datum/pet_command/untargeted_ability/pet_lights,
/datum/pet_command/point_targeting/use_ability/take_photo,
/datum/pet_command/use_ability/take_photo,
/datum/pet_command/follow/orbie,
/datum/pet_command/perform_trick_sequence,
)
@@ -123,17 +123,24 @@
return SUBTREE_RETURN_FINISH_PLANNING
return ..()
/datum/pet_command/point_targeting/use_ability/take_photo
/datum/pet_command/use_ability/pet_lights/retrieve_command_text(atom/living_pet, atom/target)
return "signals [living_pet] to toggle its lights!"
/datum/pet_command/use_ability/take_photo
command_name = "Photo"
command_desc = "Make your pet take a photo!"
radial_icon = 'icons/mob/simple/pets.dmi'
radial_icon_state = "orbie_lights_action"
radial_icon = 'icons/obj/art/camera.dmi'
radial_icon_state = "camera"
speech_commands = list("photo", "picture", "image")
command_feedback = "Readys camera mode"
pet_ability_key = BB_PHOTO_ABILITY
targeting_strategy_key = BB_TARGETING_STRATEGY
/datum/pet_command/point_targeting/use_ability/take_photo/execute_action(datum/ai_controller/controller)
/datum/pet_command/use_ability/take_photo/retrieve_command_text(atom/living_pet, atom/target)
return isnull(target) ? null : "signals [living_pet] to take a photo of [target]!"
/datum/pet_command/use_ability/take_photo/execute_action(datum/ai_controller/controller)
if(controller.blackboard[BB_VIRTUAL_PET_LEVEL] < 3)
controller.clear_blackboard_key(BB_ACTIVE_PET_COMMAND)
return SUBTREE_RETURN_FINISH_PLANNING
@@ -152,6 +159,9 @@
return FALSE
return findtext(spoken_text, text_command)
/datum/pet_command/perform_trick_sequence/light/retrieve_command_text(atom/living_pet, atom/target)
return "signals [living_pet] to dance!"
/datum/pet_command/perform_trick_sequence/execute_action(datum/ai_controller/controller)
var/mob/living/living_pawn = controller.pawn
var/list/trick_sequence = controller.blackboard[BB_TRICK_SEQUENCE]