Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed sleep with SHOULD_NOT_SLEEP #355

Open
Cyberboss opened this issue May 6, 2023 · 1 comment · May be fixed by #356
Open

Missed sleep with SHOULD_NOT_SLEEP #355

Cyberboss opened this issue May 6, 2023 · 1 comment · May be fixed by #356
Labels

Comments

@Cyberboss
Copy link
Contributor

This errors in dreamchecker as expected

/datum/proc/is_valid(value)
    SHOULD_NOT_SLEEP(TRUE)

/datum/choiced/is_valid(value)
    get_choices()

/datum/choiced/proc/get_choices()
    init_possible_values()

/datum/choiced/proc/init_possible_values()

/datum/choiced/ai_core_display/init_possible_values()
    sleep(1)

This doesn't

/datum/proc/is_valid(value)
    SHOULD_NOT_SLEEP(TRUE)

/datum/choiced/is_valid(value)
    get_choices()

/datum/choiced/proc/get_choices()
    init_possible_values()

/datum/choiced/proc/init_possible_values()

/datum/choiced/ai_core_display/init_possible_values()
    stoplag()

/proc/stoplag()
    sleep(1)
@Cyberboss Cyberboss linked a pull request May 6, 2023 that will close this issue
@Cyberboss
Copy link
Contributor Author

As MSO put it: If a proc has SHOULD_NOT_SLEEP on the definition and has an override, sleeps are only detected directly in the override and not the procs it calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants