mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-29 03:21:30 +00:00
Refactored do_after to use a flag-based system for options (#17127)
* Refactored do_after to use a flag-based system for options * More flags * Ditto * Use the HAS_FLAG macro * do_after pass * Fix burning paper code * Resolve issues from Fluffy's code reviews * .
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
)
|
||||
LAZYADD(climbers, user)
|
||||
|
||||
if(!do_after(user,25))
|
||||
if(!do_after(user, 2.5 SECONDS))
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
if(manipulating) return M
|
||||
manipulating = 1
|
||||
to_chat(user, "<span class='notice'>You begin [verb]ing \the [src] with [M.display_name].</span>")
|
||||
if(!do_after(user, 20) || !S.use(1))
|
||||
if(!do_after(user, 2 SECONDS, src, DO_REPAIR_CONSTRUCT) || !S.use(1))
|
||||
manipulating = 0
|
||||
return null
|
||||
user.visible_message("<span class='notice'>\The [user] [verb]es \the [src] with [M.display_name].</span>", "<span class='notice'>You finish [verb]ing \the [src].</span>")
|
||||
@@ -252,7 +252,7 @@
|
||||
"<span class='notice'>You begin removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>")
|
||||
if(sound)
|
||||
playsound(src.loc, sound, 50, 1)
|
||||
if(!do_after(user, 40))
|
||||
if(!do_after(user, 4 SECONDS, src, DO_REPAIR_CONSTRUCT))
|
||||
manipulating = 0
|
||||
return M
|
||||
user.visible_message("<span class='notice'>\The [user] removes the [M.display_name] [what] from \the [src].</span>",
|
||||
|
||||
Reference in New Issue
Block a user