[MIRROR] adds screentips to the janicart (pimpin' ride) [MDB IGNORE] (#25933)

* adds screentips to the janicart (pimpin' ride) (#80665)

## About The Pull Request
Adds screentips the janicart (pimpin' ride) for dismounting, adding and
removing trash bags/upgrades/keys and inserting into the connected trash
bag.

The dismounting and key insertion/removal screentips could maybe be used
in the base vehicle. But right now I can't figure out how to move those
there without needing to do the same checks on the janicart (pimpin'
ride) again.
## Why It's Good For The Game
The janicart (pimpin' ride) has a lot of things you can do with it that
are not immediately obvious. It took me a while to figure out that you
can grab the trash bag from it without having to get off of it first.
## Changelog
🆑
qol: added screentips to the janicart (pimpin' ride)
/🆑

* adds screentips to the janicart (pimpin' ride)

---------

Co-authored-by: kawoppi <94711066+kawoppi@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-12-31 15:42:52 -05:00
committed by GitHub
co-authored by kawoppi
parent 35f625dea6
commit af1d15c2bc
+39
View File
@@ -14,6 +14,7 @@
/obj/vehicle/ridden/janicart/Initialize(mapload)
. = ..()
register_context()
update_appearance()
AddElement(/datum/element/ridable, /datum/component/riding/vehicle/janicart)
GLOB.janitor_devices += src
@@ -85,6 +86,44 @@
if (!.)
try_remove_bag(user)
/obj/vehicle/ridden/janicart/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
if(!held_item)
if(occupant_amount() > 0)
context[SCREENTIP_CONTEXT_LMB] = "Dismount"
context[SCREENTIP_CONTEXT_RMB] = "Dismount"
if(trash_bag)
context[SCREENTIP_CONTEXT_RMB] = "Remove trash bag"
if(is_key(inserted_key) && occupants.Find(user))
context[SCREENTIP_CONTEXT_ALT_LMB] = "Remove key"
return CONTEXTUAL_SCREENTIP_SET
else if(trash_bag)
context[SCREENTIP_CONTEXT_LMB] = "Remove trash bag"
context[SCREENTIP_CONTEXT_RMB] = "Remove trash bag"
return CONTEXTUAL_SCREENTIP_SET
if(istype(held_item, /obj/item/storage/bag/trash) && !trash_bag)
context[SCREENTIP_CONTEXT_LMB] = "Add trash bag"
context[SCREENTIP_CONTEXT_RMB] = "Add trash bag"
return CONTEXTUAL_SCREENTIP_SET
if(istype(held_item, /obj/item/janicart_upgrade) && !installed_upgrade)
context[SCREENTIP_CONTEXT_LMB] = "Install upgrade"
return CONTEXTUAL_SCREENTIP_SET
if(istype(held_item, /obj/item/screwdriver) && installed_upgrade)
context[SCREENTIP_CONTEXT_LMB] = "Remove upgrade"
return CONTEXTUAL_SCREENTIP_SET
if(is_key(held_item) && !is_key(inserted_key))
context[SCREENTIP_CONTEXT_LMB] = "Insert key"
context[SCREENTIP_CONTEXT_RMB] = "Insert key"
return CONTEXTUAL_SCREENTIP_SET
else if (trash_bag)
context[SCREENTIP_CONTEXT_LMB] = "Insert into trash bag"
context[SCREENTIP_CONTEXT_RMB] = "Insert into trash bag"
return CONTEXTUAL_SCREENTIP_SET
/**
* Called if the attached bag is being qdeleted, ensures appearance is maintained properly