Skip to content

Commit ced8db2

Browse files
authored
fixes bad index in playtime subsystem (#7353)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request [2025-10-14T16:36:49] Runtime in code/controllers/subsystem/playtime.dm, line 48: bad index proc name: flush playtimes impl (/datum/controller/subsystem/playtime/proc/flush_playtimes_impl) src: Playtime (/datum/controller/subsystem/playtime) call stack: Playtime (/datum/controller/subsystem/playtime): flush playtimes impl() Playtime (/datum/controller/subsystem/playtime): flush playtimes() Playtime (/datum/controller/subsystem/playtime): fire(0) Playtime (/datum/controller/subsystem/playtime): ignite(0) Master (/datum/controller/master): RunQueue() Master (/datum/controller/master): Loop(4) Master (/datum/controller/master): StartProcessing(0) <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> :cl: fix: fixed a runtime in the playtime subsystem /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
1 parent 07f4677 commit ced8db2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/controllers/subsystem/playtime.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ SUBSYSTEM_DEF(playtime)
4545
"minutes" = minutes,
4646
"player" = playerid
4747
)
48-
C.persistent.playtime[roleid] += minutes
48+
LAZYADDASSOC(C.persistent.playtime, roleid, minutes)
4949
C.persistent.playtime_queued = list()
5050
SSdbcore.MassInsertLegacy(DB_PREFIX_TABLE_NAME("playtime"), built, duplicate_key = "ON DUPLICATE KEY UPDATE minutes = minutes + VALUES(minutes)")
5151

0 commit comments

Comments
 (0)