adds client helpers, fixes an oversight from 8451

This commit is contained in:
spookerton
2022-03-30 15:04:29 +01:00
parent 21ee12ae4b
commit b61156cefe
5 changed files with 81 additions and 13 deletions
+4 -3
View File
@@ -148,12 +148,13 @@
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
// Otherwise, the user mob's machine var will be reset directly.
//
/proc/onclose(mob/user, windowid, var/atom/ref=null)
if(!user || !user.client) return
/proc/onclose(client/user, windowid, atom/ref)
user = resolve_client(user)
if (!user)
return
var/param = "null"
if(ref)
param = "\ref[ref]"
winset(user, windowid, "on-close=\".windowclose [param]\"")
//to_world("OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]")