Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
981a217
Z Level Button: Redone and ReBETTER. (#86465)
TheSmallBlue Sep 14, 2024
304a77a
Fixes detective action palette being invisible (#87814)
SmArtKar Nov 13, 2024
66ad3b9
micro-pick
siliconOpossum Jun 1, 2026
b461fbd
Xenos have their resist UI element again (#84995)
Rhials Jul 17, 2024
44d0004
Major UI update and theme redesign (#88498)
SmArtKar Dec 18, 2024
60e9ae4
Returns plasmafire and clockwork UI's transparency, slightly adjusts …
SmArtKar Dec 25, 2024
27eadf1
Adds a sleep icon (and fixes Alien HUD a bit) (#91256)
JohnFulpWillard May 29, 2025
1054d07
Cleans up multiz buttons a tad, adds ghost versions (#91836)
LemonInTheDark Jun 27, 2025
8dccb56
Adds a DNR button at the button of the ghost screen (#91807)
MrMelbert Jul 3, 2025
e54f90a
Updates old screen_gen sprites (#93786)
Aliceee2ch Nov 6, 2025
8564028
Ports the Updated DNR Icon from Iris Station (#94351)
xPokee Dec 6, 2025
be91033
Removes redundant update_parallax_contents calls (#82644)
LemonInTheDark Apr 14, 2024
3ee97b1
Fix shuttle parallax (#89184)
dj-34 Jan 27, 2025
e468875
Better ghost tray scan (#87143)
Jewelry-x Oct 12, 2024
4c35cb5
Ghost settings UI (#91370)
siliconOpossum Jun 2, 2026
de0be33
Brings back ghost verbs (chatbar only) (#91619)
SmArtKar Jun 13, 2025
97201a9
Adds back a couple ghost verbs (#91654)
vinylspiders Jun 17, 2025
28072ad
fixes ghost huds (#85164)
Holoo-1 Jul 22, 2024
db396ed
Adds screen hud elements for ghost toggles (#94570)
MrMelbert Dec 30, 2025
53da06a
ai z level indicator (#82376)
mc-oofert Apr 2, 2024
0c9b1c2
ourgh oops
siliconOpossum Jun 2, 2026
3dcf907
Merge branch 'master' of https://github.com/MrMelbert/MapleStationCod…
siliconOpossum Jun 2, 2026
3fa607a
oops I thought I did that
siliconOpossum Jun 2, 2026
e5c92bb
I'm the one person who should absolutely *know* to check for these th…
siliconOpossum Jun 2, 2026
745f310
micro-pick from light camera eye refactor to fix a runtime
siliconOpossum Jun 2, 2026
a7786a6
Merge branch 'master' of https://github.com/MrMelbert/MapleStationCod…
siliconOpossum Jun 2, 2026
843b510
Fixes race condition with alien weeds (#83394)
vinylspiders May 25, 2024
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
23 changes: 22 additions & 1 deletion code/__DEFINES/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// The default ghost display selection for the main player
#define GHOST_ACCS_DEFAULT_OPTION GHOST_ACCS_FULL

/// The other players ghosts will display as a simple white ghost
/// The other players ghosts will display as a simple white ghost
#define GHOST_OTHERS_SIMPLE "White ghosts"
/// The other players ghosts will display as transparent mobs
#define GHOST_OTHERS_DEFAULT_SPRITE "Default sprites"
Expand All @@ -31,6 +31,8 @@
/// The default ghost display selection when viewing other players
#define GHOST_OTHERS_DEFAULT_OPTION GHOST_OTHERS_THEIR_SETTING

/// A ghosts min view range that we won't allow them to go under by.
#define GHOST_MIN_VIEW_RANGE 7
/// A ghosts max view range if they are a BYOND guest or regular account
#define GHOST_MAX_VIEW_RANGE_DEFAULT 10
/// A ghosts max view range if they are a BYOND paid member account (P2W feature)
Expand All @@ -56,3 +58,22 @@
#define CAMERA_SEE_GHOSTS_BASIC 1
/// Pictures taken by a camera will display ghosts and their orbits
#define CAMERA_SEE_GHOSTS_ORBIT 2 // this doesn't do anything right now as of Jan 2022


#define GHOST_DATA_HUDS (1<<0)
#define GHOST_VISION (1<<1)
#define GHOST_HEALTH (1<<2)
#define GHOST_CHEM (1<<3)
#define GHOST_GAS (1<<4)
/// Represents tray view. Not a real view flag, as tray is not persistent, but used as an identifier for one.
#define GHOST_TRAY (1<<5)
/// Repesents darkness level setting. Not a real view flag, as darkness level cycles through values, but used as an identifier for one.
#define GHOST_DARKNESS_LEVEL (1<<6)

#define ALL_GHOST_FLAGS list( \
GHOST_DATA_HUDS, \
GHOST_VISION, \
GHOST_HEALTH, \
GHOST_CHEM, \
GHOST_GAS, \
)
48 changes: 25 additions & 23 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,6 @@
Therefore, the top right corner (except during admin shenanigans) is at "15,15"
*/

/proc/ui_hand_position(i) //values based on old hand ui positions (CENTER:-/+16,SOUTH:5)
var/x_off = i % 2 ? 0 : -1
var/y_off = round((i-1) / 2)
return"CENTER+[x_off]:16,SOUTH+[y_off]:5"

/proc/ui_equip_position(mob/M)
var/y_off = round((M.held_items.len-1) / 2) //values based on old equip ui position (CENTER: +/-16,SOUTH+1:5)
return "CENTER:-16,SOUTH+[y_off+1]:5"

/proc/ui_swaphand_position(mob/M, which = 1) //values based on old swaphand ui positions (CENTER: +/-16,SOUTH+1:5)
var/x_off = which == 1 ? -1 : 0
var/y_off = round((M.held_items.len-1) / 2)
return "CENTER+[x_off]:16,SOUTH+[y_off+1]:5"

//Lower left, persistent menu
#define ui_inventory "WEST:6,SOUTH:5"

Expand All @@ -67,8 +53,11 @@
#define ui_combo "CENTER+4:24,SOUTH+1:7" //combo meter for martial arts

//Lower right, persistent menu
#define ui_drop_throw "EAST-1:28,SOUTH+1:7"
#define ui_rest "EAST-1:28,SOUTH+1:7"
#define ui_drop_throw "EAST-1:28,SOUTH+1:24"
#define ui_above_throw "EAST-1:28,SOUTH+1:41"
#define ui_above_movement "EAST-2:26,SOUTH+1:7"
#define ui_above_movement_top "EAST-2:26, SOUTH+1:24"
#define ui_above_intent "EAST-3:24, SOUTH+1:7"
#define ui_movi "EAST-2:26,SOUTH:5"
#define ui_acti "EAST-3:24,SOUTH:5"
Expand All @@ -78,7 +67,7 @@
#define ui_crafting "EAST-4:22,SOUTH:5"
#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_navigate_menu "EAST-4:6,SOUTH:5"

//Upper left (action buttons)
#define ui_action_palette "WEST+0:23,NORTH-1:5"
Expand Down Expand Up @@ -111,6 +100,13 @@
#define ui_living_pull "EAST-1:28,CENTER-3:15"
#define ui_living_healthdoll "EAST-1:28,CENTER-1:15"

//Humans
#define ui_human_floor_changer "EAST-4:22,SOUTH:5"
#define ui_human_crafting "EAST-3:24,SOUTH+1:7"
#define ui_human_navigate "EAST-3:7,SOUTH+1:7"
#define ui_human_language "EAST-3:7,SOUTH+1:24"
#define ui_human_area "EAST-3:24,SOUTH+1:24"

//Drones
#define ui_drone_drop "CENTER+1:18,SOUTH:5"
#define ui_drone_pull "CENTER+1.5:2,SOUTH:5"
Expand All @@ -132,15 +128,17 @@
#define ui_borg_camera "CENTER+3:21,SOUTH:5"
#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_navigate_menu "CENTER+4:3,SOUTH+1:6"
#define ui_borg_floor_changer "EAST-1:28,SOUTH+1:39"

//Aliens
#define ui_alien_health "EAST,CENTER-1:15"
#define ui_alienplasmadisplay "EAST,CENTER-2:15"
#define ui_alien_queen_finder "EAST,CENTER-3:15"
#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_navigate_menu "EAST-4:4,SOUTH:5"
#define ui_alien_floor_change "EAST-3:24, SOUTH:24"

//AI
#define ui_ai_core "BOTTOM:6,RIGHT-4"
Expand All @@ -162,6 +160,8 @@
#define ui_ai_multicam "BOTTOM+1:6,LEFT+1"
#define ui_ai_add_multicam "BOTTOM+1:6,LEFT"
#define ui_ai_take_picture "BOTTOM+2:6,LEFT"
#define ui_ai_floor_indicator "BOTTOM+5,RIGHT"
#define ui_ai_godownup "BOTTOM+5,RIGHT-1"

//pAI
#define ui_pai_software "SOUTH:6,WEST"
Expand All @@ -179,16 +179,18 @@
#define ui_pai_view_images "SOUTH:6,WEST+12"
#define ui_pai_radio "SOUTH:6,WEST+13"
#define ui_pai_language_menu "SOUTH+1:8,WEST+12:31"
#define ui_pai_navigate_menu "SOUTH+1:8,WEST+12:31"
#define ui_pai_navigate_menu "SOUTH+1:8,WEST+12:15"

//Ghosts
#define ui_ghost_spawners_menu "SOUTH:6,CENTER-3:24"
#define ui_ghost_orbit "SOUTH:6,CENTER-2:24"
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER-1:24"
#define ui_ghost_teleport "SOUTH:6,CENTER:24"
#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_dnr "SOUTH:6,CENTER:24"
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
#define ui_ghost_settings "SOUTH: 6, CENTER+2:24"
#define ui_ghost_minigames "SOUTH: 6, CENTER+3:24"
#define ui_ghost_language_menu "SOUTH: 6, CENTER+4:22"
#define ui_ghost_floor_changer "SOUTH: 6, CENTER+4:7"

//Blobbernauts
#define ui_blobbernaut_overmind_health "EAST-1:28,CENTER+0:19"
Expand Down
9 changes: 9 additions & 0 deletions code/__HELPERS/hud.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/proc/ui_hand_position(i) //values based on old hand ui positions (CENTER:-/+16,SOUTH:5)
var/x_off = i % 2 ? 0 : -1
var/y_off = round((i-1) / 2)
return"CENTER+[x_off]:16,SOUTH+[y_off]:5"

/proc/ui_swaphand_position(mob/M, which = LEFT_HANDS) //values based on old swaphand ui positions (CENTER: +/-16,SOUTH+1:5)
var/x_off = (which == LEFT_HANDS) ? -1 : null
var/y_off = round((M.held_items.len-1) / 2)
return "CENTER[x_off]:16,SOUTH+[y_off+1]:5"
9 changes: 5 additions & 4 deletions code/__HELPERS/view.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/proc/getviewsize(view)
if(!view) // Just to avoid any runtimes that could otherwise cause constant disconnect loops.
stack_trace("Missing value for 'view' in getviewsize(), defaulting to world.view!")
view = world.view
/proc/getviewsize(view = world.view)
SHOULD_BE_PURE(TRUE)

if(isnum(view))
//resetting back to 0- this is the same as just checking !view but we want to be clear the point of the check.
if(view == 0)
return list(0, 0)
var/totalviewrange = (view < 0 ? -1 : 1) + 2 * view
return list(totalviewrange, totalviewrange)
else
Expand Down
19 changes: 17 additions & 2 deletions code/_onclick/hud/action_button.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,32 +110,37 @@
last_hovored_ref = null
if(!can_use(usr))
return

var/datum/hud/our_hud = usr.hud_used
if(over_object == src)
our_hud.hide_landings()
return

if(istype(over_object, /atom/movable/screen/action_landing))
var/atom/movable/screen/action_landing/reserve = over_object
reserve.hit_by(src)
our_hud.hide_landings()
save_position()
our_hud.hide_landings()
return

our_hud.hide_landings()
if(istype(over_object, /atom/movable/screen/button_palette) || istype(over_object, /atom/movable/screen/palette_scroll))
our_hud.position_action(src, SCRN_OBJ_IN_PALETTE)
save_position()
our_hud.hide_landings()
return

if(istype(over_object, /atom/movable/screen/movable/action_button))
var/atom/movable/screen/movable/action_button/button = over_object
our_hud.position_action_relative(src, button)
save_position()
our_hud.hide_landings()
return

. = ..()

our_hud.position_action(src, screen_loc)
save_position()
our_hud.hide_landings()

/atom/movable/screen/movable/action_button/proc/save_position()
var/mob/user = our_hud.mymob
Expand Down Expand Up @@ -290,6 +295,7 @@
/atom/movable/screen/button_palette/proc/set_hud(datum/hud/our_hud)
src.our_hud = our_hud
refresh_owner()
disable_landing() // If our hud already has elements, don't force hide us

/atom/movable/screen/button_palette/update_name(updates)
. = ..()
Expand All @@ -311,6 +317,15 @@

icon_state = "[ui_name]_palette"

/atom/movable/screen/button_palette/proc/activate_landing()
// Reveal ourselves to the user
invisibility = INVISIBILITY_NONE

/atom/movable/screen/button_palette/proc/disable_landing()
// If we have no elements in the palette, hide your ugly self please
if (!length(our_hud.palette_actions?.actions))
invisibility = INVISIBILITY_ABSTRACT

/atom/movable/screen/button_palette/MouseEntered(location, control, params)
. = ..()
if(QDELETED(src))
Expand Down
68 changes: 68 additions & 0 deletions code/_onclick/hud/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,66 @@
var/mob/living/silicon/ai/AI = usr
AI.drop_new_multicam()

/atom/movable/screen/ai/floor_indicator
icon_state = "zindicator"
screen_loc = ui_ai_floor_indicator

/atom/movable/screen/ai/floor_indicator/Initialize(mapload, datum/hud/hud_owner)
. = ..()
if(istype(hud_owner))
RegisterSignal(hud_owner, COMSIG_HUD_OFFSET_CHANGED, PROC_REF(update_z))
update_z()

/atom/movable/screen/ai/floor_indicator/proc/update_z(datum/hud/source)
SIGNAL_HANDLER
var/mob/living/silicon/ai/ai = get_mob() //if you use this for anyone else i will find you
if(isnull(ai))
return
var/turf/locturf = isturf(ai.loc) ? get_turf(ai.eyeobj) : get_turf(ai) //must be a var cuz error
var/ai_z = locturf.z
var/text = "Level<br/>[ai_z]"
if(SSmapping.level_trait(ai_z, ZTRAIT_STATION))
text = "Floor<br/>[ai_z - 1]"
else if (SSmapping.level_trait(ai_z, ZTRAIT_NOPHASE))
text = "ERROR"
maptext = MAPTEXT_TINY_UNICODE("<div align='center' valign='middle' style='position:relative; top:0px; left:0px'>[text]</div>")

/atom/movable/screen/ai/go_up
name = "go up"
icon_state = "up"
screen_loc = ui_ai_godownup

/atom/movable/screen/ai/go_up/Initialize(mapload)
. = ..()
register_context()

/atom/movable/screen/ai/go_up/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
context[SCREENTIP_CONTEXT_LMB] = "Go up a floor"
return CONTEXTUAL_SCREENTIP_SET

/atom/movable/screen/ai/go_up/Click(location,control,params)
var/mob/ai = get_mob() //the core
flick("uppressed",src)
if(!isturf(ai.loc) || usr != ai) //aicard and stuff
return
ai.up()

/atom/movable/screen/ai/go_up/down
name = "go down"
icon_state = "down"

/atom/movable/screen/ai/go_up/down/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
context[SCREENTIP_CONTEXT_LMB] = "Go down a floor"
return CONTEXTUAL_SCREENTIP_SET

/atom/movable/screen/ai/go_up/down/Click(location,control,params)
var/mob/ai = get_mob() //the core
flick("downpressed",src)
if(!isturf(ai.loc) || usr != ai) //aicard and stuff
return
ai.down()

/datum/hud/ai
ui_style = 'icons/hud/screen_ai.dmi'
Expand All @@ -188,6 +248,14 @@
using.screen_loc = ui_ai_language_menu
static_inventory += using

// Z-level floor change
using = new /atom/movable/screen/ai/floor_indicator(null, src) //These come with their own predefined screen locs
static_inventory += using
using = new /atom/movable/screen/ai/go_up(null, src)
static_inventory += using
using = new /atom/movable/screen/ai/go_up/down(null, src)
static_inventory += using

//AI core
using = new /atom/movable/screen/ai/aicore(null, src)
using.screen_loc = ui_ai_core
Expand Down
24 changes: 17 additions & 7 deletions code/_onclick/hud/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
using = new /atom/movable/screen/swap_hand(null, src)
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
using.screen_loc = ui_swaphand_position(owner, 1)
static_inventory += using

using = new /atom/movable/screen/swap_hand(null, src)
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
using.screen_loc = ui_swaphand_position(owner, 2)
static_inventory += using

action_intent = new /atom/movable/screen/combattoggle/flashy(null, src)
Expand All @@ -59,6 +59,11 @@
H.leap_icon.screen_loc = ui_alien_storage_r
static_inventory += H.leap_icon

floor_change = new /atom/movable/screen/floor_changer(null, src)
floor_change.icon = ui_style
floor_change.screen_loc = ui_alien_floor_change
static_inventory += floor_change

using = new/atom/movable/screen/language_menu(null, src)
using.screen_loc = ui_alien_language_menu
static_inventory += using
Expand All @@ -72,10 +77,11 @@
using.screen_loc = ui_drop_throw
static_inventory += using

using = new /atom/movable/screen/resist(null, src)
using.icon = ui_style
using.screen_loc = ui_above_movement
hotkeybuttons += using
resist_icon = new /atom/movable/screen/resist(null, src)
resist_icon.icon = ui_style
resist_icon.screen_loc = ui_above_movement
resist_icon.update_appearance()
hotkeybuttons += resist_icon

throw_icon = new /atom/movable/screen/throw_catch(null, src)
throw_icon.icon = ui_style
Expand All @@ -90,10 +96,14 @@

rest_icon = new /atom/movable/screen/rest(null, src)
rest_icon.icon = ui_style
rest_icon.screen_loc = ui_above_intent
rest_icon.screen_loc = ui_rest
rest_icon.update_appearance()
static_inventory += rest_icon

sleep_icon = new /atom/movable/screen/sleep(null, src)
sleep_icon.icon = ui_style
sleep_icon.screen_loc = ui_above_throw

//begin indicators

healths = new /atom/movable/screen/healths/alien(null, src)
Expand Down
Loading
Loading