Commit Graph

426 Commits

Author SHA1 Message Date
NewSoupVi 005a143e3e
MultiServer: Add slot to SetReply packets (#3747)
* Add slot to datastorage set response

* update docs as well
2025-01-18 19:59:26 +01:00
Fabian Dill 9dac7d9cc3
MultiServer: update InvalidPacket text for location scouts (#4485) 2025-01-15 21:50:20 +01:00
NewSoupVi bedf746f1d
MultiServer: Revert hints being created for already found locations #4367 2025-01-14 21:37:10 +01:00
NewSoupVi adcb2f59ca
MultiServer: Correct tying of Context.groups (#4460) 2025-01-11 22:16:01 +01:00
NewSoupVi 5dd19fccd0
MultiServer/CommonClient: We forgot about Item Links again (Hint Priority) (#4314)
* Vi don't forget about itemlinks challenge difficulty impossible

* People other than Vi also don't forget about ItemLinks challenge difficulty impossible
2024-12-10 20:35:36 +01:00
Emily f26cda07db
Core: Hint Priority fixes (#4315)
* Update hint priority docs

* Update network protocol.md

* Add error on `UpdateHint` trying to change to `HINT_FOUND`

* Update network protocol.md

* fix: precollected hint priority
2024-12-01 15:16:36 +01:00
josephwhite 21dbfd2472
Multiserver: Add argument for timestamping STDOUT (#4266)
* core: add server arg for timestamping STDOUT

* Multiserver: Implicitly use default write_mode arg in init_logging

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-12-01 04:33:36 +01:00
qwint 845a604955
MultiServer: !status shows Ready status (#3598)
* Makes !status show a note if the slot is in Status Ready

* update variable name for better clarity
2024-11-30 03:40:14 +01:00
Emily b783eab1e8
Core: Introduce 'Hint Priority' concept (#3506)
* Introduce 'Hint Priority' concept

* fix error when sorting hints while not connected

* fix 'found' -> 'status' kivy stuff

* remove extraneous warning

this warning fired if you clicked to select or toggle priority of any hint, as you weren't clicking on the header...

* skip scanning individual header widgets when not clicking on the header

* update hints on disconnection

* minor cleanup

* minor fixes/cleanup

* fix: hints not updating properly for receiving player

* update re: review

* 'type() is' -> 'isinstance()'

* cleanup, re: Jouramie's review

* Change 'priority' to 'status', add 'Unspecified' and 'Avoid' statuses, update colors

* cleanup

* move dicts out of functions

* fix: new hints being returned when hint already exists

* fix: show `Found` properly when hinting already-found hints

* import `Hint` and `HintStatus` directly from `NetUtils`

* Default any hinted `Trap` item to be classified as `Avoid` by default

* add some sanity checks

* re: Vi's feedback

* move dict out of function

* Update kvui.py

* remove unneeded dismiss message

* allow lclick to drop hint status dropdown

* underline hint statuses to indicate clickability

* only underline clickable statuses

* Update kvui.py

* Update kvui.py

---------

Co-authored-by: Silvris <58583688+Silvris@users.noreply.github.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-11-29 02:10:31 +01:00
qwint 48ea274655
MultiServer: persist hints even if previously found (#4214)
* change to persist all hints to ctx.hints regardless of found status

* remove if not found entirely as it seems like it was added to not double charge hint points
9842399d8b
2024-11-19 21:16:10 +01:00
black-sliver 9be996ba0e
Core: downgrade websockets and minor fixes (#4166)
* Core: downgrade websockets to 13.x

14.x currently doesn't work for MultiServer.
14.x is not supported with py3.8, so updating to 14.x should be scheduled for AP 0.6.0.

* CI: 5min timeout for hosting test

* MultiServer: properly shutdown even if ctx is invalid

* CI: increase hosting test timeout to 10min

this is 4x expected time, just to be safe.
2024-11-10 01:23:29 +01:00
Fabian Dill b772d42df5
Core: turn MultiServer item_names and location_names into instance vars (#4053) 2024-10-14 00:15:53 +02:00
Fabian Dill ef4d1e77e3
Core: make shlex split an attempt with regular split retry (#4046) 2024-10-11 23:24:42 +02:00
Fabian Dill 05a67386c6
Core: use shlex splitting instead of whitespace splitting for client and server commands (#4011) 2024-10-02 03:09:43 +02:00
Aaron Wagener f06f95d03d
Core: move race_mode to read_data instead of stored_data (#4020)
* move race_mode to read_data

* add race_mode to docs
2024-10-01 23:55:34 +02:00
Aaron Wagener 67f6b458d7
Core: add race mode to multidata and datastore (#4017)
* add race mode to multidata and datastore

* have commonclient check race mode on connect and add it to the tooltip ui
2024-10-01 21:08:13 +02:00
Fabian Dill 3ab71daa8d
MultiServer: put some limits in place (#3858)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2024-09-01 21:59:37 +02:00
black-sliver 1a41e1acc8
customserver: fix memory leak (#3864) 2024-09-01 20:34:50 +02:00
Kaito Sinclaire ca96e7e294
Fix !remaining for cross-world items (#3732)
* Fix !remaining for other worlds

* Typing fixes for the previous change

* Update LocationStore test to match what get_remaining now returns
2024-08-16 22:20:02 +02:00
Remy Jette f6735745b6
Core: Fix !remaining (#3611) 2024-07-03 15:39:08 +02:00
black-sliver afb6d9c4da
MultiServer, customserver, CI, Test: Fix problems in room hosting and test/simulate it (#3464)
* Test: add hosting simulation test

* WebHost: add weak typing to get_app()

* MultiServer: add typing to auto_saver_thread

* MultiServer: don't cancel task, properly end it

* customserver: stop auto-save thread from saving after shutdown

and make sure it stops, another potential memory leak

* MultiServer, customserver: make datapackage small again

* customserver: collect/finish room tasks

Hopefully fixes the memory leak we are seeing

* CI: test hosting

* Test: hosting: verify autohoster saves on Ctrl+C

* customserver: save when stopping via Ctrl+C
2024-06-06 01:54:46 +02:00
Ishigh1 3cb5452455
Core: Fix auto-fill in the text client when clicking on a hint suggestion (#3267) 2024-06-01 07:32:41 -05:00
Zach Parks 5aa6ad63ca
Core: Remove Universally Unique ID Requirements (Per-Game Data Packages) (#1933) 2024-06-01 06:07:13 -05:00
Fabian Dill 74aa4eca9d
MultiServer: make !hint prefer early sphere (#2862) 2024-05-27 18:43:25 +02:00
Fabian Dill e97eddcdaf
WebHost: move atexit saving to end of room hosting function (#3339) 2024-05-19 18:25:56 +02:00
Fabian Dill 7900e4c9a4
WebHost: use a limited process pool to run Rooms (#3214) 2024-05-17 12:21:01 +02:00
Scipio Wright d5683c4326
Core: Make output when hinting something with multiple copies show up in a better order (#3245)
* Make the hint info show up in a better order

* Change how old_hints is modified/done

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-05-04 04:28:09 +02:00
Emily ea6235e0d9
Core: Improve join/leave messages, add "HintGame" tag (#2859)
* Add better "verbs" on joining msg, and improve leaving msgs

* Add 'HintGame' tag, for projects like BKSudoku/APSudoku/HintMachine

* data in one place instead of 3

* Clean up 'ignore_game' loop to use any() instead

---------

Co-authored-by: beauxq <beauxq@yahoo.com>
2024-05-02 09:38:49 +02:00
Fabian Dill 2f78860d8c
Core/SNIClient/LttP/Factorio: switch to get_settings (#3208) 2024-04-24 06:24:44 +02:00
Zach Parks 49c0268a84
MultiServer: Fix `/alias <name>` not removing aliases. (#3186) 2024-04-21 11:37:24 -05:00
Fabian Dill 392c47dcef
MultiServer: add datastore list command to MultiServer (#3181) 2024-04-21 03:47:01 +02:00
Zach Parks 21184b59d2
MultiServer: Prevent invalid `*_mode` option values. (#3149) 2024-04-18 18:46:48 +02:00
NewSoupVi 7c44d749d4
MultiServer: Support location name groups in !missing and !checked commands (#2538) 2024-04-14 20:22:12 +02:00
Silvris f1765899c4
MultiServer: add all worlds goal completion message (#2956) 2024-04-14 20:16:45 +02:00
Aaron Wagener 98e2d89a1c
Core: Let location name groups work with /hint_location (#2814) 2024-04-14 02:25:27 +02:00
Exempt-Medic 1fc2c5ed4b
Core: Getting rid of forfeit_mode (#3099) 2024-04-12 21:25:33 +02:00
Fabian Dill ae6c16bde1
MultiServer: send new read_hints datastore values on change (#2558) 2024-03-12 19:58:02 +01:00
chandler05 9c920fbc53
MultiServer: Improve command response to help troubleshooting (#2833)
* Update MultiServer.py

* Improve logging again

* Add to other log as well

* Update MultiServer.py
2024-03-11 09:55:22 +01:00
Remy Jette be802b4723
Core: Remove extra " character in /forbid_release help message (#2923)
Was pointed out in the Discord: https://discord.com/channels/731205301247803413/731205301818359821/1215882443261870190
2024-03-10 08:12:55 +01:00
Fabian Dill 2c5b2e0759
MultiServer: make !hint without further arguments only reply to the instigating player (#2339) 2024-03-03 06:34:48 +01:00
Fabian Dill 70fdd6b90d
Core: clean up MultiServer.py/auto_shutdown (#2552) 2024-01-07 01:42:57 +01:00
Zach Parks e46420f4a9
MultiServer: Create read-only data storage key for client statuses. (#2412) 2023-11-24 17:14:07 -06:00
Ishigh1 530e792c3c
Core: Floor and ceil in datastorage (#2448) 2023-11-24 10:42:22 -06:00
black-sliver eb50e0781e
MultiServer: exit console task when console thread dies (#2068) 2023-08-04 10:01:51 +02:00
Silvris a99a407c41
MultiServer: fix unclosed parenthesis in connection message (#2035) 2023-07-28 03:31:48 +02:00
black-sliver bff2b80acf
MultiServer: fix loading of default hint_cost (#1964) 2023-07-11 20:38:09 +02:00
black-sliver b6e78bd1a3
MultiServer: speed up location commands (#1926)
* MultiServer: speed up location commands

Adds optimized pure python wrapper around locations dict
Adds optimized cython implementation of the wrapper, saving cpu time and 80% memory use

* Speedups: auto-build on import and build during setup

* Speedups: add requirements

* CI: don't break with build_ext

* Speedups: use C++ compiler for pyximport

* Speedups: cleanup and more validation

* Speedups: add tests for LocationStore

* Setup: delete temp in-place build modules

* Speedups: more tests and safer indices

The change has no security implications, but ensures that entries[IndexEntry.start] is always valid.

* Speedups: add cython3 compatibility

* Speedups: remove unused import

* Speedups: reformat

* Speedup: fix empty set in test

* Speedups: use regular dict in Locations.get_for_player

* CI: run unittests with beta cython

now with 2x nicer names
2023-07-04 19:12:43 +02:00
Fabian Dill 6a88d5aa79 Core: update modules 2023-07-02 09:51:01 +02:00
Fabian Dill 6c459066a7 Core: add generator_version to network protocol 2023-04-26 10:48:57 +02:00
Fabian Dill 58aea7ca58
Multiserver: cleaner exit (#1743) 2023-04-23 22:21:28 +02:00