mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Co-authored-by: ItsSelis <selis@xynolabs.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: Raeschen <rycoop29@gmail.com>
30 lines
781 B
Plaintext
30 lines
781 B
Plaintext
///Passes Stat Browser Panel clicks to the game and calls client click on an atom
|
|
/atom/Topic(href, list/href_list)
|
|
. = ..()
|
|
if(!usr?.client)
|
|
return
|
|
var/client/usr_client = usr.client
|
|
var/list/paramslist = list()
|
|
|
|
if(href_list["statpanel_item_click"])
|
|
switch(href_list["statpanel_item_click"])
|
|
if("left")
|
|
paramslist["left"] = "1"
|
|
if("right")
|
|
paramslist["right"] = "1"
|
|
if("middle")
|
|
paramslist["middle"] = "1"
|
|
else
|
|
return
|
|
|
|
if(href_list["statpanel_item_shiftclick"])
|
|
paramslist["shift"] = "1"
|
|
if(href_list["statpanel_item_ctrlclick"])
|
|
paramslist["ctrl"] = "1"
|
|
if(href_list["statpanel_item_altclick"])
|
|
paramslist["alt"] = "1"
|
|
|
|
var/mouseparams = list2params(paramslist)
|
|
usr_client.Click(src, loc, null, mouseparams)
|
|
return TRUE
|