Mail click spam (#7558)

This commit is contained in:
Guti
2024-01-15 00:38:09 +01:00
committed by GitHub
parent 4430b0c532
commit 05529b3cc9

View File

@@ -42,6 +42,7 @@
var/stamp_offset_x = 0
// Physical offset of stamps on the object. Y direction.
var/stamp_offset_y = 2
var/opening = FALSE
/obj/item/mail/envelope
name = "envelope"
@@ -110,7 +111,13 @@
to_chat(user, "<span class='notice'>You can't open somebody's mail! That's <em>illegal</em></span>")
return FALSE
if(opening)
to_chat(user, "<span class='notice'>You are already opening that!</span>")
return FALSE
opening = TRUE
if(!do_after(user, 1.5 SECONDS, target = user))
opening = FALSE
return FALSE
return TRUE