Gives better feedback to the AI when opening doors from chat. Fix runtime

This commit is contained in:
joep van der velden
2020-09-21 16:36:54 +02:00
parent 53d8819639
commit d7030d9d82
2 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -1332,8 +1332,10 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
if(istype(A))
switch(alert(src, "Do you want to open \the [A] for [target]?", "Doorknob_v2a.exe", "Yes", "No"))
if("Yes")
A.AIShiftClick()
to_chat(src, "<span class='notice'>You open \the [A] for [target].</span>")
if(!A.density)
to_chat(src, "<span class='notice'>[A] was already opened.</span>")
else if(A.open_close(src))
to_chat(src, "<span class='notice'>You open \the [A] for [target].</span>")
else
to_chat(src, "<span class='warning'>You deny the request.</span>")
else