Add null checks to client prefs checks

client.prefs. -> client?.prefs?.
This commit is contained in:
psq95
2023-05-13 23:53:47 +01:00
parent dfeb85bfa4
commit 5840c8ab99
93 changed files with 310 additions and 310 deletions
+2 -2
View File
@@ -108,8 +108,8 @@ Notes:
/proc/openToolTip(mob/user = null, atom/movable/tip_src = null, params = null,title = "",content = "",theme = "")
if(istype(user))
if(user.client && user.client.tooltips)
if(!theme && user.client.prefs && user.client.prefs.UI_style)
theme = lowertext(user.client.prefs.UI_style)
if(!theme && user.client.prefs && user.client?.prefs?.UI_style)
theme = lowertext(user.client?.prefs?.UI_style)
if(!theme)
theme = "default"
user.client.tooltips.show(tip_src, params,title,content,theme)