From b4d1f6d52089e10c2f3fc967c1844495fb1ff23b Mon Sep 17 00:00:00 2001 From: cadyn <35672377+cadyn@users.noreply.github.com> Date: Sun, 28 Feb 2021 19:23:38 -0800 Subject: [PATCH] Fix bullets I guess --- code/_helpers/mobs.dm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index c3ea7946a4..cc6471287a 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -122,14 +122,18 @@ Proc for attack log creation, because really why not if(ismob(user)) //CHOMPEdit Begin //user.attack_log += text("\[[time_stamp()]\] Attacked [target_str]: [what_done]") - var/DBQuery/query_insert = SSdbcore.NewQuery("INSERT INTO erro_attacklog (id, time, ckey, mob, message) VALUES (null, NOW(), :t_ckey, :t_mob, :t_content)", list("t_ckey" = user.ckey, "t_mob" = user.real_name, "t_content" = "Attacked [target_str]: [what_done]")) - query_insert.Execute(async=use_async) - qdel(query_insert) + //var/DBQuery/query_insert = SSdbcore.NewQuery("INSERT INTO erro_attacklog (id, time, ckey, mob, message) VALUES (null, NOW(), :t_ckey, :t_mob, :t_content)", list("t_ckey" = user.ckey, "t_mob" = user.real_name, "t_content" = "Attacked [target_str]: [what_done]")) + //query_insert.Execute(async=use_async) + //qdel(query_insert) + if(SSdbcore.Connect()) + rustg_sql_query_async(SSdbcore.connection, "INSERT INTO erro_attacklog (id, time, ckey, mob, message) VALUES (null, NOW(), :t_ckey, :t_mob, :t_content)", json_encode(list("t_ckey" = user.ckey, "t_mob" = user.real_name, "t_content" = "Attacked [target_str]: [what_done]"))) if(ismob(target)) //target.attack_log += text("\[[time_stamp()]\] Attacked by [user_str]: [what_done]") - var/DBQuery/query_insert = SSdbcore.NewQuery("INSERT INTO erro_attacklog (id, time, ckey, mob, message) VALUES (null, NOW(), :t_ckey, :t_mob, :t_content)", list("t_ckey" = target.ckey, "t_mob" = target.real_name, "t_content" = "Attacked by [user_str]: [what_done]")) - query_insert.Execute(async=use_async) - qdel(query_insert) + //var/DBQuery/query_insert = SSdbcore.NewQuery("INSERT INTO erro_attacklog (id, time, ckey, mob, message) VALUES (null, NOW(), :t_ckey, :t_mob, :t_content)", list("t_ckey" = target.ckey, "t_mob" = target.real_name, "t_content" = "Attacked by [user_str]: [what_done]")) + //query_insert.Execute(async=use_async) + //qdel(query_insert) + if(SSdbcore.Connect()) + rustg_sql_query_async(SSdbcore.connection, "INSERT INTO erro_attacklog (id, time, ckey, mob, message) VALUES (null, NOW(), :t_ckey, :t_mob, :t_content)", json_encode(list("t_ckey" = target.ckey, "t_mob" = target.real_name, "t_content" = "Attacked by [user_str]: [what_done]")) //CHOMPEdit End log_attack(user_str,target_str,what_done) if(admin_notify)