mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 11:42:27 +00:00
## About The Pull Request Basically just goes through and adds `mouse_over_pointer = MOUSE_HAND_POINTER` to a bunch of screen elements (player hud and lobby menu) Also adds it to very small wall mounted objects like buttons, fire alarms, and light switches https://github.com/user-attachments/assets/c501cd3d-8efd-4fd0-a486-a53f2102a2cb https://github.com/user-attachments/assets/89f7cdcb-b40c-4ef3-b578-fee66ddf1ce2 ## Why It's Good For The Game - Makes interacting with screen elements a bit more tactile - Makes it a bit easier to click on tiny buttons and such (being able to know when you're actually hovering the thing) - Maybe can be expanded to more world objects to indicate they are clickable vs non-interactable? ## Changelog 🆑 Melbert qol: Hovering over clickable screen elements will now update your mouse cursor to indicate they're clickable qol: Hovering over small wall mounts (light switches, buttons, fire alarms) will now update to mouse cursor indicating you're hovering them /🆑
275 lines
6.7 KiB
Plaintext
275 lines
6.7 KiB
Plaintext
#define PAI_MISSING_SOFTWARE_MESSAGE span_warning("You must download the required software to use this.")
|
|
|
|
/atom/movable/screen/pai
|
|
icon = 'icons/hud/screen_pai.dmi'
|
|
mouse_over_pointer = MOUSE_HAND_POINTER
|
|
var/required_software
|
|
|
|
/atom/movable/screen/pai/Click()
|
|
if(isobserver(usr) || usr.incapacitated)
|
|
return FALSE
|
|
var/mob/living/silicon/pai/user = usr
|
|
if(required_software && !user.installed_software.Find(required_software))
|
|
to_chat(user, PAI_MISSING_SOFTWARE_MESSAGE)
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/atom/movable/screen/pai/software
|
|
name = "Software Interface"
|
|
icon_state = "pai"
|
|
|
|
/atom/movable/screen/pai/software/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.ui_interact(pAI)
|
|
|
|
/atom/movable/screen/pai/shell
|
|
name = "Toggle Holoform"
|
|
icon_state = "pai_holoform"
|
|
|
|
/atom/movable/screen/pai/shell/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
if(pAI.holoform)
|
|
pAI.fold_in(0)
|
|
else
|
|
pAI.fold_out()
|
|
|
|
/atom/movable/screen/pai/chassis
|
|
name = "Holochassis Appearance Composite"
|
|
icon_state = "pai_chassis"
|
|
|
|
/atom/movable/screen/pai/chassis/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.choose_chassis()
|
|
|
|
/atom/movable/screen/pai/rest
|
|
name = "Rest"
|
|
icon_state = "pai_rest"
|
|
|
|
/atom/movable/screen/pai/rest/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.toggle_resting()
|
|
|
|
/atom/movable/screen/pai/light
|
|
name = "Toggle Integrated Lights"
|
|
icon_state = "light"
|
|
|
|
/atom/movable/screen/pai/light/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.toggle_integrated_light()
|
|
|
|
/atom/movable/screen/pai/newscaster
|
|
name = "pAI Newscaster"
|
|
icon_state = "newscaster"
|
|
required_software = "Newscaster"
|
|
|
|
/atom/movable/screen/pai/newscaster/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.newscaster.ui_interact(usr)
|
|
|
|
/atom/movable/screen/pai/host_monitor
|
|
name = "Host Health Scan"
|
|
icon_state = "host_monitor"
|
|
required_software = "Host Scan"
|
|
|
|
/atom/movable/screen/pai/host_monitor/Click(location, control, params)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
var/list/modifiers = params2list(params)
|
|
if(LAZYACCESS(modifiers, LEFT_CLICK))
|
|
pAI.host_scan(PAI_SCAN_TARGET)
|
|
return TRUE
|
|
if(LAZYACCESS(modifiers, RIGHT_CLICK))
|
|
pAI.host_scan(PAI_SCAN_MASTER)
|
|
return TRUE
|
|
|
|
/atom/movable/screen/pai/crew_manifest
|
|
name = "Crew Manifest"
|
|
icon_state = "manifest"
|
|
required_software = "Crew Manifest"
|
|
|
|
/atom/movable/screen/pai/crew_manifest/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.ai_roster()
|
|
|
|
/atom/movable/screen/pai/state_laws
|
|
name = "State Laws"
|
|
icon_state = "state_laws"
|
|
|
|
/atom/movable/screen/pai/state_laws/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.checklaws()
|
|
|
|
/atom/movable/screen/pai/modpc
|
|
name = "Messenger"
|
|
icon_state = "pda_send"
|
|
required_software = "Digital Messenger"
|
|
var/mob/living/silicon/pai/pAI
|
|
|
|
/atom/movable/screen/pai/modpc/Click()
|
|
. = ..()
|
|
if(!.) // this works for some reason.
|
|
return
|
|
pAI.modularInterface?.interact(pAI)
|
|
|
|
/atom/movable/screen/pai/internal_gps
|
|
name = "Internal GPS"
|
|
icon_state = "internal_gps"
|
|
required_software = "Internal GPS"
|
|
|
|
/atom/movable/screen/pai/internal_gps/Click()
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
if(!pAI.internal_gps)
|
|
pAI.internal_gps = new(pAI)
|
|
pAI.internal_gps.attack_self(pAI)
|
|
|
|
/atom/movable/screen/pai/image_take
|
|
name = "Take Image"
|
|
icon_state = "take_picture"
|
|
required_software = "Photography Module"
|
|
|
|
/atom/movable/screen/pai/image_take/Click()
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.aicamera.toggle_camera_mode(usr)
|
|
|
|
/atom/movable/screen/pai/image_view
|
|
name = "View Images"
|
|
icon_state = "view_images"
|
|
required_software = "Photography Module"
|
|
|
|
/atom/movable/screen/pai/image_view/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.aicamera.viewpictures(usr)
|
|
|
|
/atom/movable/screen/pai/radio
|
|
name = "radio"
|
|
icon = 'icons/hud/screen_cyborg.dmi'
|
|
icon_state = "radio"
|
|
|
|
/atom/movable/screen/pai/radio/Click()
|
|
if(!..())
|
|
return
|
|
var/mob/living/silicon/pai/pAI = usr
|
|
pAI.radio.interact(usr)
|
|
|
|
/datum/hud/pai/New(mob/living/silicon/pai/owner)
|
|
..()
|
|
var/atom/movable/screen/using
|
|
|
|
// Software menu
|
|
using = new /atom/movable/screen/pai/software(null, src)
|
|
using.screen_loc = ui_pai_software
|
|
static_inventory += using
|
|
|
|
// Holoform
|
|
using = new /atom/movable/screen/pai/shell(null, src)
|
|
using.screen_loc = ui_pai_shell
|
|
static_inventory += using
|
|
|
|
// Chassis Select Menu
|
|
using = new /atom/movable/screen/pai/chassis(null, src)
|
|
using.screen_loc = ui_pai_chassis
|
|
static_inventory += using
|
|
|
|
// Rest
|
|
using = new /atom/movable/screen/pai/rest(null, src)
|
|
using.screen_loc = ui_pai_rest
|
|
static_inventory += using
|
|
|
|
// Integrated Light
|
|
using = new /atom/movable/screen/pai/light(null, src)
|
|
using.screen_loc = ui_pai_light
|
|
static_inventory += using
|
|
|
|
// Newscaster
|
|
using = new /atom/movable/screen/pai/newscaster(null, src)
|
|
using.screen_loc = ui_pai_newscaster
|
|
static_inventory += using
|
|
|
|
// Language menu
|
|
using = new /atom/movable/screen/language_menu(null, src)
|
|
using.screen_loc = ui_pai_language_menu
|
|
static_inventory += using
|
|
|
|
// Navigation
|
|
using = new /atom/movable/screen/navigate(null, src)
|
|
using.screen_loc = ui_pai_navigate_menu
|
|
static_inventory += using
|
|
|
|
// Host Monitor
|
|
using = new /atom/movable/screen/pai/host_monitor(null, src)
|
|
using.screen_loc = ui_pai_host_monitor
|
|
static_inventory += using
|
|
|
|
// Crew Manifest
|
|
using = new /atom/movable/screen/pai/crew_manifest(null, src)
|
|
using.screen_loc = ui_pai_crew_manifest
|
|
static_inventory += using
|
|
|
|
// Laws
|
|
using = new /atom/movable/screen/pai/state_laws(null, src)
|
|
using.screen_loc = ui_pai_state_laws
|
|
static_inventory += using
|
|
|
|
// Modular Interface
|
|
using = new /atom/movable/screen/pai/modpc(null, src)
|
|
using.screen_loc = ui_pai_mod_int
|
|
static_inventory += using
|
|
var/atom/movable/screen/pai/modpc/tablet_button = using
|
|
tablet_button.pAI = mymob
|
|
|
|
// Internal GPS
|
|
using = new /atom/movable/screen/pai/internal_gps(null, src)
|
|
using.screen_loc = ui_pai_internal_gps
|
|
static_inventory += using
|
|
|
|
// Take image
|
|
using = new /atom/movable/screen/pai/image_take(null, src)
|
|
using.screen_loc = ui_pai_take_picture
|
|
static_inventory += using
|
|
|
|
// View images
|
|
using = new /atom/movable/screen/pai/image_view(null, src)
|
|
using.screen_loc = ui_pai_view_images
|
|
static_inventory += using
|
|
|
|
// Radio
|
|
using = new /atom/movable/screen/pai/radio(null, src)
|
|
using.screen_loc = ui_pai_radio
|
|
static_inventory += using
|
|
|
|
update_software_buttons()
|
|
|
|
/datum/hud/pai/proc/update_software_buttons()
|
|
var/mob/living/silicon/pai/owner = mymob
|
|
for(var/atom/movable/screen/pai/button in static_inventory)
|
|
if(button.required_software)
|
|
button.color = owner.installed_software.Find(button.required_software) ? null : COLOR_GRAY
|
|
|
|
#undef PAI_MISSING_SOFTWARE_MESSAGE
|