Commit Graph

11 Commits

Author SHA1 Message Date
c4d885cf6d Login && Password need to be at least 4 long 2023-12-04 20:30:58 -06:00
ac62f7d64e moved config/ -> internal/config 2023-12-02 22:09:11 -06:00
557117f093 moved internal/protocol -> cnet/protocol 2023-12-01 19:56:23 -06:00
8e65a78d07 testing refactor; use github.com/matryer/is
It is syntactically pretty, simple, and also makes failures have
pretty colors. what more could you ask for :)
2023-12-01 13:49:50 -06:00
d0346b2382 use proper errors for db.Err
- switch to using errors.Is where applicable
2023-11-29 19:52:10 -06:00
1f66acfd25 holy refactor
started out as me making a service abstraction..

- db.Player exists again, and entity.Player uses it as an embedded struct
- chunk.ForEachEntity() lets you add/remove entities during iteration now
- removed account related fields from CNPeer
- protocol/pool has been merged with protocol.
use protocol.GetBuffer() and protocol.PutBuffer().
- new protocol/internal/service!
service.Service is an abstraction layer to handle multiple CNPeer*
connections and allows you to associate each with an interface{} uData.
In the future it might also handle a task queue for jobs that
modify/interact with the player's uData, called from service.handleEvents()
- PacketHandler callback type has a new param! uData is passed as well now
- much of loginserver/shardserver is now handled by the shared service
abstraction
- SHARD: NPC_ENTER packets are now sent on player loading complete
rather than on enter.
2023-11-27 21:23:28 -06:00
d32facf363 swithed to blackbox testing
just because i am lazy
2023-11-25 23:11:19 -06:00
7eece044c5 more better db tests; use psql 15, not latest
- our db_test tests now use psql version 15 (which is the same
version our docker-compose file uses) for consistency.
- also added another test, TestDBPlayer
2023-11-22 15:41:31 -06:00
e8f8129b35 fix: SetPlayerInventorySlots actually uses tx now
lol, must've been a typo
2023-11-21 14:13:55 -06:00
f95cc2cae7 test: started internal/db test cases
- we use github.com/bitcomplete/sqltestutil to spin up a postgresql
container to test against
- minor error variable refactoring
2023-11-21 13:58:59 -06:00
458e907c99 moved 'core' to 'internal' 2023-08-23 18:16:24 -05:00