refactors click handling (#7286)

This commit is contained in:
silicons
2025-09-03 19:30:39 +02:00
committed by GitHub
parent 8005d92f3c
commit e5316fbaf5
104 changed files with 1423 additions and 1050 deletions
+18
View File
@@ -0,0 +1,18 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 Citadel Station Developers *//
/proc/log_clickchain(datum/event_args/actor/clickchain/clickchain, clickchain_flags)
var/list/data = list(
"performer" = key_name(clickchain.performer),
"target" = ismob(clickchain.target) ? key_name(clickchain.target) : "[clickchain.target || "null"]",
"intent" = clickchain.using_intent,
"hand" = clickchain.using_hand_index,
"zone" = clickchain.target_zone,
"data" = clickchain.data,
"params" = clickchain.click_params,
"flags" = clickchain_flags,
)
if(clickchain.performer != clickchain.initiator)
data["initiator"] = key_name(clickchain.initiator)
WRITE_LOG(GLOB.click_log , json_encode(data))
// global.event_logger.log__clickchain(clickchain, clickchain_flags)