mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
HUD traits now apply their corresponding hud automatically. Most clothing/item/etc sources of HUDs now only use traits (#84984)
## About The Pull Request Currently if you want to apply a HUD you usually add both its trait and the HUD itself. Only exceptions are things like simplemobs where you should avoid adding the hud trait since it adds security/med DB access and such, but there is no cases where you'd want to apply the trait and not apply the hud. Requested by Melbert about a week ago.  ## Why It's Good For The Game This makes working with HUDs significantly easier, as you no longer have to bother with manually adding/removing them. Also potentially removes an edge case where if your hud could get removed while keeping the trait. ## Changelog 🆑 refactor: HUD traits now apply their corresponding hud automatically /🆑
This commit is contained in:
@@ -27,17 +27,15 @@
|
||||
|
||||
/datum/element/digitalcamo/proc/HideFromAIHuds(mob/living/target)
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.ai_list)
|
||||
var/datum/atom_hud/M = GLOB.huds[AI.med_hud]
|
||||
M.hide_single_atomhud_from(AI,target)
|
||||
var/datum/atom_hud/S = GLOB.huds[AI.sec_hud]
|
||||
S.hide_single_atomhud_from(AI,target)
|
||||
for (var/hud_type in AI.silicon_huds)
|
||||
var/datum/atom_hud/silicon_hud = GLOB.huds[hud_type]
|
||||
silicon_hud.hide_single_atomhud_from(AI,target)
|
||||
|
||||
/datum/element/digitalcamo/proc/UnhideFromAIHuds(mob/living/target)
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.ai_list)
|
||||
var/datum/atom_hud/M = GLOB.huds[AI.med_hud]
|
||||
M.unhide_single_atomhud_from(AI,target)
|
||||
var/datum/atom_hud/S = GLOB.huds[AI.sec_hud]
|
||||
S.unhide_single_atomhud_from(AI,target)
|
||||
for (var/hud_type in AI.silicon_huds)
|
||||
var/datum/atom_hud/silicon_hud = GLOB.huds[hud_type]
|
||||
silicon_hud.unhide_single_atomhud_from(AI,target)
|
||||
|
||||
/datum/element/digitalcamo/proc/on_examine(datum/source, mob/M)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
Reference in New Issue
Block a user