fixing lasers yeeting through mobs

This commit is contained in:
cadyn
2021-01-29 20:12:38 -08:00
parent 02a5bbd8fc
commit 1aa0df2c2a
2 changed files with 5 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ Proc for attack log creation, because really why not
6 is additional information, anything that needs to be added
*/
/proc/add_attack_logs(mob/user, mob/target, what_done, var/admin_notify = TRUE)
/proc/add_attack_logs(mob/user, mob/target, what_done, var/admin_notify = TRUE, var/use_async = TRUE) //CHOMPEdit
if(islist(target)) //Multi-victim adding
var/list/targets = target
for(var/mob/M in targets)
@@ -123,13 +123,14 @@ Proc for attack log creation, because really why not
if(ismob(user)) //CHOMPEdit Begin
//user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [target_str]: [what_done]</font>")
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" = "<font color='red'>Attacked [target_str]: [what_done]</font>"))
query_insert.Execute()
query_insert.Execute(async=use_async)
qdel(query_insert)
if(ismob(target))
//target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Attacked by [user_str]: [what_done]</font>")
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" = "<font color='orange'>Attacked by [user_str]: [what_done]</font>"))
query_insert.Execute()
query_insert.Execute(async=use_async)
qdel(query_insert)
//CHOMPEdit End
log_attack(user_str,target_str,what_done)
if(admin_notify)
msg_admin_attack("[key_name_admin(user)] vs [target_str]: [what_done]")