mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
[non-modular] Adds a new trait for the basic security hud and cleans up the secmed glasses in tandum with that (#1920)
## About The Pull Request does as title says ## Why It's Good For The Game players won't notice but code looks better ## Proof Of Testing  ## Changelog 🆑 code: changed basic sec hud into a trait /🆑
This commit is contained in:
@@ -13,3 +13,6 @@
|
||||
|
||||
//For the hemophage quirk that allows hemophages to eat/drink normal food/drink.
|
||||
#define TRAIT_MASQUERADE_FOOD "masquerade_food"
|
||||
|
||||
//basic security hud
|
||||
#define TRAIT_BASIC_SECURITY_HUD "basic_security_hud"
|
||||
|
||||
@@ -28,6 +28,7 @@ GLOBAL_LIST_INIT(trait_to_hud, list(
|
||||
TRAIT_DIAGNOSTIC_HUD = DATA_HUD_DIAGNOSTIC,
|
||||
TRAIT_BOT_PATH_HUD = DATA_HUD_BOT_PATH, // SKYRAT EDIT CHANGE
|
||||
TRAIT_PERMIT_HUD = DATA_HUD_PERMIT, // SKYRAT EDIT ADDITION
|
||||
TRAIT_BASIC_SECURITY_HUD = DATA_HUD_SECURITY_BASIC // BUBBER EDIT ADDITION
|
||||
))
|
||||
|
||||
/datum/atom_hud
|
||||
|
||||
@@ -100,22 +100,7 @@
|
||||
icon = 'modular_zubbers/code/modules/security/secmed/icons/secmed_equipment.dmi'
|
||||
icon_state = "hud"
|
||||
worn_icon_state = "healthhud"
|
||||
clothing_traits = list(TRAIT_MEDICAL_HUD)
|
||||
|
||||
/obj/item/clothing/glasses/hud/secmed/equipped(mob/living/carbon/human/user, slot)
|
||||
. = ..()
|
||||
if(!(slot & ITEM_SLOT_EYES))
|
||||
return
|
||||
// Extra hud because the bloody code doesn't support multihuds yet. I'll probably add multihud support soon enough. If you see this I didn't. ~Waterpig
|
||||
var/datum/atom_hud/extra_hud = GLOB.huds[DATA_HUD_SECURITY_BASIC]
|
||||
extra_hud.show_to(user)
|
||||
|
||||
/obj/item/clothing/glasses/hud/secmed/dropped(mob/living/carbon/human/user)
|
||||
. = ..()
|
||||
if(!istype(user) || user.glasses != src)
|
||||
return
|
||||
var/datum/atom_hud/extra_hud = GLOB.huds[DATA_HUD_SECURITY_BASIC]
|
||||
extra_hud.hide_from(user)
|
||||
clothing_traits = list(TRAIT_MEDICAL_HUD, TRAIT_BASIC_SECURITY_HUD)
|
||||
|
||||
/obj/item/clothing/glasses/hud/secmed/sunglasses
|
||||
name = "security-medical HUD sunglasses"
|
||||
|
||||
Reference in New Issue
Block a user