Fixes infinite ghost role spawners not being infinite (#74090)

## About The Pull Request
I love it when we add something and we have like three PRs around the
same time touching the same code and none of it conflicts, it's awesome,
believe me!

Adds the `!infinite_use` to the other check that checked the uses left,
to ensure that it still allows infinite spawners to remain infinite.

## Why It's Good For The Game
Code that works is always good for the game.

## Changelog

🆑 GoldenAlpharex
fix: Ghost role spawners that are set to have infinite uses no longer
run out of uses.
/🆑
This commit is contained in:
GoldenAlpharex
2023-03-19 10:45:23 -04:00
committed by GitHub
parent 80c407215f
commit 83a1ea9f82
+1 -1
View File
@@ -191,7 +191,7 @@
LAZYREMOVE(ckeys_trying_to_spawn, user_ckey)
return
if(uses <= 0) // Just in case something took longer than it should've and we got here after the uses went below zero.
if(uses <= 0 && !infinite_use) // Just in case something took longer than it should've and we got here after the uses went below zero.
to_chat(user, span_warning("This spawner is out of charges!"))
LAZYREMOVE(ckeys_trying_to_spawn, user_ckey)
return