Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Adds an HUD button to change your z-level #2195

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
#define ui_building "EAST-4:22,SOUTH:21"
#define ui_language_menu "EAST-4:6,SOUTH:21"
#define ui_navigate_menu "EAST-4:22,SOUTH:5"
#define ui_floor_menu "EAST-4:14,SOUTH:37"

//Upper-middle right (alerts)
#define ui_alert1 "EAST-1:28,CENTER+5:27"
Expand Down Expand Up @@ -143,6 +144,7 @@
#define ui_borg_alerts "CENTER+4:21,SOUTH:5"
#define ui_borg_language_menu "CENTER+4:19,SOUTH+1:6"
#define ui_borg_navigate_menu "CENTER+4:19,SOUTH+1:6"
#define ui_borg_floor_menu "CENTER+4:-13,SOUTH+1:6"

//Aliens
#define ui_alien_health "EAST,CENTER-1:15"
Expand All @@ -151,6 +153,7 @@
#define ui_alien_storage_r "CENTER+1:18,SOUTH:5"
#define ui_alien_language_menu "EAST-4:20,SOUTH:5"
#define ui_alien_navigate_menu "EAST-4:20,SOUTH:5"
#define ui_alien_floor_menu "EAST-4:-12,SOUTH:5"

//AI
#define ui_ai_core "BOTTOM:6,RIGHT-4"
Expand All @@ -159,6 +162,7 @@
#define ui_ai_state_laws "BOTTOM:6,RIGHT-1"
#define ui_ai_mod_int "BOTTOM:6,RIGHT"
#define ui_ai_language_menu "BOTTOM+1:8,RIGHT-1:30"
#define ui_ai_floor_menu "BOTTOM+1:8,RIGHT-1:14"

#define ui_ai_crew_monitor "BOTTOM:6,CENTER-1"
#define ui_ai_crew_manifest "BOTTOM:6,CENTER"
Expand Down Expand Up @@ -200,6 +204,7 @@
#define ui_ghost_pai "SOUTH: 6, CENTER+1:24"
#define ui_ghost_minigames "SOUTH: 6, CENTER+2:24"
#define ui_ghost_language_menu "SOUTH: 22, CENTER+3:8"
#define ui_ghost_floor_menu "SOUTH: 6, CENTER+3:8"

//Blobbernauts
#define ui_blobbernaut_overmind_health "EAST-1:28,CENTER+0:19"
Expand Down
5 changes: 5 additions & 0 deletions code/_onclick/hud/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@
using.screen_loc = ui_ai_language_menu
static_inventory += using

// Z-level floor change
using = new /atom/movable/screen/floor_menu(null, src)
using.screen_loc = ui_ai_floor_menu
static_inventory += using

//AI core
using = new /atom/movable/screen/ai/aicore(null, src)
using.screen_loc = ui_ai_core
Expand Down
6 changes: 5 additions & 1 deletion code/_onclick/hud/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
using.screen_loc = ui_alien_language_menu
static_inventory += using

using = new /atom/movable/screen/floor_menu(null, src)
using.screen_loc = ui_alien_floor_menu
static_inventory += using

using = new /atom/movable/screen/navigate(null, src)
using.screen_loc = ui_alien_navigate_menu
static_inventory += using
Expand All @@ -87,7 +91,7 @@
pull_icon.update_appearance()
pull_icon.screen_loc = ui_above_movement
static_inventory += pull_icon

rest_icon = new /atom/movable/screen/rest(null, src)
rest_icon.icon = ui_style
rest_icon.screen_loc = ui_above_intent
Expand Down
4 changes: 4 additions & 0 deletions code/_onclick/hud/alien_larva.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
using.screen_loc = ui_alien_language_menu
static_inventory += using

using = new /atom/movable/screen/floor_menu(null, src)
using.screen_loc = ui_alien_floor_menu
static_inventory += using

using = new /atom/movable/screen/navigate(null, src)
using.screen_loc = ui_alien_navigate_menu
static_inventory += using
Expand Down
10 changes: 10 additions & 0 deletions code/_onclick/hud/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@
using.icon = ui_style
static_inventory += using

using = new /atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_ghost_language_menu
using.icon = ui_style
static_inventory += using

using = new /atom/movable/screen/floor_menu(null, src)
using.screen_loc = ui_ghost_floor_menu
using.icon = ui_style
static_inventory += using

/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
// don't show this HUD if observing; show the HUD of the observee
var/mob/dead/observer/O = mymob
Expand Down
4 changes: 4 additions & 0 deletions code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
using.icon = ui_style
static_inventory += using

using = new /atom/movable/screen/floor_menu(null, src)
using.icon = ui_style
static_inventory += using

action_intent = new /atom/movable/screen/combattoggle/flashy(null, src)
action_intent.icon = ui_style
action_intent.screen_loc = ui_combat_toggle
Expand Down
6 changes: 6 additions & 0 deletions code/_onclick/hud/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
var/mob/living/silicon/robot/robit = mymob
var/atom/movable/screen/using

// Language
using = new/atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_borg_language_menu
static_inventory += using
Expand All @@ -86,6 +87,11 @@
using.screen_loc = ui_borg_navigate_menu
static_inventory += using

// Z-level floor change
using = new /atom/movable/screen/floor_menu(null, src)
using.screen_loc = ui_borg_floor_menu
static_inventory += using

//Radio
using = new /atom/movable/screen/robot/radio(null, src)
using.screen_loc = ui_borg_radio
Expand Down
27 changes: 27 additions & 0 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,33 @@
/atom/movable/screen/language_menu/Click()
usr.get_language_holder().open_language_menu(usr)

/atom/movable/screen/floor_menu
name = "change floor"
icon = 'icons/hud/screen_midnight.dmi'
icon_state = "floor_change"
screen_loc = ui_floor_menu

/atom/movable/screen/floor_menu/Initialize(mapload)
. = ..()
register_context()

/atom/movable/screen/floor_menu/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()

context[SCREENTIP_CONTEXT_LMB] = "Go up a floor"
context[SCREENTIP_CONTEXT_RMB] = "Go down a floor"
return CONTEXTUAL_SCREENTIP_SET

/atom/movable/screen/floor_menu/Click(location,control,params)
var/list/modifiers = params2list(params)

if(LAZYACCESS(modifiers, RIGHT_CLICK) || LAZYACCESS(modifiers, ALT_CLICK))
usr.down()
return

usr.up()
return

/atom/movable/screen/inventory
/// The identifier for the slot. It has nothing to do with ID cards.
var/slot_id
Expand Down
Binary file modified icons/hud/screen_clockwork.dmi
Binary file not shown.
Binary file modified icons/hud/screen_detective.dmi
Binary file not shown.
Binary file modified icons/hud/screen_glass.dmi
Binary file not shown.
Binary file modified icons/hud/screen_midnight.dmi
Binary file not shown.
Binary file modified icons/hud/screen_operative.dmi
Binary file not shown.
Binary file modified icons/hud/screen_plasmafire.dmi
Binary file not shown.
Binary file modified icons/hud/screen_retro.dmi
Binary file not shown.
Binary file modified icons/hud/screen_slimecore.dmi
Binary file not shown.
Binary file modified icons/hud/screen_trasenknox.dmi
Binary file not shown.
Loading