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

[PORT] Follows up TG's atom_hud system #10897

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8332f45
Full ports
EvilDragonfiend Apr 17, 2024
6bcd034
Fixes alt appearance
EvilDragonfiend Apr 17, 2024
1d863f2
More TG fixes
EvilDragonfiend Apr 17, 2024
9287460
Corrects errors
EvilDragonfiend Apr 17, 2024
b42a6a9
Merge branch 'master' into portatomhud
EvilDragonfiend Apr 23, 2024
af47fea
Merge remote-tracking branch 'BeeStation/master' into portatomhud
EvilDragonfiend Jul 8, 2024
f8a96d1
delete mecha code
EvilDragonfiend Jul 8, 2024
92267bd
up to date Master
EvilDragonfiend Jul 8, 2024
647c62c
Merge branch 'master' into portatomhud
EvilDragonfiend Jul 10, 2024
b2a8578
atom hud update with dynamic z update
EvilDragonfiend Jul 10, 2024
683fd7c
antag stash fix
EvilDragonfiend Jul 10, 2024
40844f1
Merge branch 'master' into portatomhud
EvilDragonfiend Aug 6, 2024
5e14b19
error fix
EvilDragonfiend Aug 16, 2024
3889196
Merge remote-tracking branch 'BeeStation/master' into portatomhud
EvilDragonfiend Aug 16, 2024
617a918
properly update branch
EvilDragonfiend Aug 16, 2024
d9874c1
Merge branch 'master' into portatomhud
EvilDragonfiend Sep 15, 2024
c3e7c91
Merge branch 'master' into portatomhud
EvilDragonfiend Sep 20, 2024
e29eebf
begone space indent
EvilDragonfiend Sep 21, 2024
7400351
Merge branch 'master' into portatomhud
EvilDragonfiend Oct 20, 2024
c29a9f5
Merge remote-tracking branch 'BeeStation/master' into portatomhud
EvilDragonfiend Oct 27, 2024
51e1a46
Better explanation
EvilDragonfiend Oct 27, 2024
641aea4
Merge remote-tracking branch 'BeeStation/master' into portatomhud
EvilDragonfiend Nov 10, 2024
cdcc3dc
Merge branch 'master' into portatomhud
EvilDragonfiend Nov 22, 2024
51f8ede
Fixes sec hud
EvilDragonfiend Nov 25, 2024
e4fe414
Merge remote-tracking branch 'BeeStation/master' into portatomhud
EvilDragonfiend Dec 10, 2024
8aebb9e
Auto stash before merge of "portatomhud" and "BeeStation/master"
EvilDragonfiend Dec 10, 2024
1cd1b1d
fixes stash
EvilDragonfiend Dec 10, 2024
fa6bb7b
god
EvilDragonfiend Dec 10, 2024
364dad7
wwwwooo fucky
EvilDragonfiend Dec 10, 2024
47e9086
Merge branch 'master' into portatomhud
EvilDragonfiend Dec 24, 2024
e9fd54e
Merge branch 'BeeStation:master' into portatomhud
EvilDragonfiend Dec 30, 2024
1f985d8
this will prolly work
EvilDragonfiend Dec 30, 2024
29eac7d
more failsafe
EvilDragonfiend Dec 30, 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
3 changes: 1 addition & 2 deletions _maps/_basemap.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.
//#define QUICKSTART // uncomment this to start the round immidiately when ready and automatically spawn players with debug outfit
#define LOWMEMORYMODE //uncomment this to load centcom and runtime station and thats it.

Crossedfall marked this conversation as resolved.
Show resolved Hide resolved
// uncomment this for a map you need to use
// #define FORCE_MAP "corgstation"
Expand Down
2 changes: 2 additions & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include "code\__DEFINES\chat.dm"
#include "code\__DEFINES\cinematics.dm"
#include "code\__DEFINES\cleaning.dm"
#include "code\__DEFINES\client.dm"
#include "code\__DEFINES\clockcult.dm"
#include "code\__DEFINES\clothing.dm"
#include "code\__DEFINES\colors.dm"
Expand Down Expand Up @@ -207,6 +208,7 @@
#include "code\__DEFINES\dcs\helpers.dm"
#include "code\__DEFINES\dcs\signals.dm"
#include "code\__DEFINES\dcs\signals\signals_area.dm"
#include "code\__DEFINES\dcs\signals\signals_client.dm"
#include "code\__DEFINES\dcs\signals\signals_global.dm"
#include "code\__DEFINES\dcs\signals\signals_lighting.dm"
#include "code\__DEFINES\dcs\signals\signals_movable.dm"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/client.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// necessary for set_eye() proc. This is used to compare a value
#define CLIENT_OLD_EYE_NULL "I_AM_ACTUALLY_NULL" // Check 'mob login code' why it should be a thing
8 changes: 8 additions & 0 deletions code/__DEFINES/dcs/signals/signals_client.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Format:
// When the signal is called: (signal arguments)
// All signals send the source datum of the signal as the first argument


// /client signals
/// from base of /client/proc/set_eye(), /atom/movable/proc/onTransitZ(): (old_z, new_z)
#define COMSIG_CLIENT_EYE_Z_CHANGED "client_eye_z_changed"
2 changes: 2 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#define isdatum(thing) (istype(thing, /datum))

#define isclient(thing) (istype(thing, /client))

#define isweakref(D) (istype(D, /datum/weakref))

#define isimage(thing) (istype(thing, /image))
Expand Down
22 changes: 9 additions & 13 deletions code/__HELPERS/icon_smoothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ DEFINE_BITFIELD(smoothing_junction, list(
match = target_turf

if(isnull(match) && smoothing_flags & SMOOTH_OBJ)
for(var/am in target_turf)
var/atom/movable/thing = am
for(var/atom/movable/thing as anything in target_turf)
if(!thing.anchored || isnull(thing.smoothing_groups))
continue
for(var/target in canSmoothWith)
Expand Down Expand Up @@ -417,21 +416,18 @@ DEFINE_BITFIELD(smoothing_junction, list(
//Icon smoothing helpers
/proc/smooth_zlevel(zlevel, now = FALSE)
var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel))
for(var/V in away_turfs)
var/turf/T = V
if(T.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
for(var/turf/turf_to_smooth as anything in away_turfs)
if(turf_to_smooth.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
if(now)
T.smooth_icon()
turf_to_smooth.smooth_icon()
else
QUEUE_SMOOTH(T)
for(var/R in T)
var/atom/A = R
if(A.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH(turf_to_smooth)
for(var/atom/movable/movable_to_smooth as anything in turf_to_smooth)
if(movable_to_smooth.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
if(now)
A.smooth_icon()
movable_to_smooth.smooth_icon()
else
QUEUE_SMOOTH(A)

QUEUE_SMOOTH(movable_to_smooth)

/atom/proc/clear_smooth_overlays()
cut_overlay(top_left_corner)
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
for(var/datum/atom_hud/antag/H in GLOB.huds)
for(var/m in GLOB.player_list)
var/mob/M = m
H.add_hud_to(M)
H.show_to(M)

CHECK_TICK

Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/anti_magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
ADD_TRAIT(mob_parent, TRAIT_SEE_ANTIMAGIC, identifier)
var/image/forbearance = image('icons/effects/genetics.dmi', mob_parent, "servitude", MOB_OVERLAY_LAYER_ABSOLUTE(mob_parent.layer, MUTATIONS_LAYER))
forbearance.plane = mob_parent.plane
mob_parent.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/blessedAware, "magic_protection_[identifier]", forbearance)
mob_parent.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/blessed_aware, "magic_protection_[identifier]", forbearance)
mob_parent.update_alt_appearances()
else
return COMPONENT_INCOMPATIBLE
Expand All @@ -53,7 +53,7 @@
ADD_TRAIT(equipper, TRAIT_SEE_ANTIMAGIC, identifier)
var/image/forbearance = image('icons/effects/genetics.dmi', equipper, "servitude", MOB_OVERLAY_LAYER_ABSOLUTE(equipper.layer, MUTATIONS_LAYER))
forbearance.plane = equipper.plane
equipper.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/blessedAware, "magic_protection_[identifier]", forbearance)
equipper.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/blessed_aware, "magic_protection_[identifier]", forbearance)
equipper.update_alt_appearances()

/datum/component/anti_magic/proc/on_drop(datum/source, mob/user)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/components/team_monitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ GLOBAL_LIST_EMPTY(tracker_beacons)
UnregisterSignal(updating, COMSIG_MOVABLE_MOVED)

//Goodbye, it was a good life
remove_from_huds()
remove_atom_from_huds()

//Remove from the global network
if(team_frequency)
Expand Down Expand Up @@ -503,7 +503,7 @@ GLOBAL_LIST_EMPTY(tracker_beacons)
if((updating || always_update) && visible)
add_to_huds()
else
remove_from_huds()
remove_atom_from_huds()

//===========
// Position Updating
Expand All @@ -526,7 +526,7 @@ GLOBAL_LIST_EMPTY(tracker_beacons)
//===========

//Remove ourselves from other tracking components
/datum/component/tracking_beacon/proc/remove_from_huds()
/datum/component/tracking_beacon/proc/remove_atom_from_huds()
if(!team_frequency)
return
for(var/datum/component/team_monitor/team_monitor as() in get_all_watchers_on_frequency(team_frequency, team_freq_key, global_signal))
Expand Down
24 changes: 12 additions & 12 deletions code/datums/elements/digital_camo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,24 @@
//Hide the mob
silicon.client.images |= attached_mobs[target]
//Hide from HUD
var/datum/atom_hud/M = GLOB.huds[silicon.med_hud]
var/datum/atom_hud/S = GLOB.huds[silicon.sec_hud]
M.hide_single_atomhud_from(silicon, target)
S.hide_single_atomhud_from(silicon, target)
var/datum/atom_hud/med_hud = GLOB.huds[silicon.med_hud]
var/datum/atom_hud/sec_hud = GLOB.huds[silicon.sec_hud]
med_hud.hide_single_atomhud_from(silicon, target)
sec_hud.hide_single_atomhud_from(silicon, target)

/datum/element/digital_camo/proc/HideFromSiliconHuds(mob/living/target)
for(var/mob/living/silicon/silicon as() in GLOB.silicon_mobs)
var/datum/atom_hud/M = GLOB.huds[silicon.med_hud]
var/datum/atom_hud/S = GLOB.huds[silicon.sec_hud]
M.hide_single_atomhud_from(silicon, target)
S.hide_single_atomhud_from(silicon, target)
var/datum/atom_hud/med_hud = GLOB.huds[silicon.med_hud]
var/datum/atom_hud/sec_hud = GLOB.huds[silicon.sec_hud]
med_hud.hide_single_atomhud_from(silicon, target)
sec_hud.hide_single_atomhud_from(silicon, target)

/datum/element/digital_camo/proc/UnhideFromSiliconHuds(mob/living/target)
for(var/mob/living/silicon/silicon as() in GLOB.silicon_mobs)
var/datum/atom_hud/M = GLOB.huds[silicon.med_hud]
var/datum/atom_hud/S = GLOB.huds[silicon.sec_hud]
M.unhide_single_atomhud_from(silicon, target)
S.unhide_single_atomhud_from(silicon, target)
var/datum/atom_hud/med_hud = GLOB.huds[silicon.med_hud]
var/datum/atom_hud/sec_hud = GLOB.huds[silicon.sec_hud]
med_hud.unhide_single_atomhud_from(silicon, target)
sec_hud.unhide_single_atomhud_from(silicon, target)

/datum/element/digital_camo/proc/on_examine(datum/source, mob/user, list/examine_list)
SIGNAL_HANDLER
Expand Down
4 changes: 2 additions & 2 deletions code/datums/helper_datums/teleport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/teleportation_wake)
src.destination = destination
prepare_huds()
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
diag_hud.add_to_hud(src)
diag_hud.add_atom_to_hud(src)
var/image/holder = hud_list[DIAG_WAKE_HUD]
var/mutable_appearance/MA = new /mutable_appearance()
MA.icon = 'icons/effects/effects.dmi'
Expand All @@ -295,7 +295,7 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/effect/temp_visual/teleportation_wake)
/obj/effect/temp_visual/teleportation_wake/Destroy()
if (has_hud_icon)
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
diag_hud.remove_from_hud(src)
diag_hud.remove_atom_from_hud(src)
return ..()

/obj/effect/temp_visual/portal_opening
Expand Down
Loading
Loading