Commit graph

36 commits

Author SHA1 Message Date
Jakob Gillich e51e970e51
Update to Scala 2.13 & Akka 2.6.5 (#461)
* update scala to 2.13 & update dependencies

* fix test

* import scodec-akka

* scala 2.13 fixes

* Work around futures not completing when awaited within object constructor

Co-authored-by: Mazo <mazo2@hotmail.com>
2020-05-26 16:16:22 -04:00
Mazo 896fa7bf07 Revert "Let's Move Item, Together (#429)"
This reverts commit 3f2240947b.
2020-05-16 19:10:06 +01:00
Fate-JH 3f2240947b
Let's Move Item, Together (#429)
* mix-in code for akka messaging move item, currently testing on infantry only

* adjusted structure of COntainable so callbacks are separate from message-producing functions, are separate from message-sending functionality; massaged LockerContainer until it could support control agency and created a wrapper for its Equipment interfacing; the control structure starts and stops when PlayerControl starts and stops, and it converts whenever necessary

* added failsafe conditions to Containable, such as blocking certain messages while completing a MoveItem call, or blocking all messages to reset disruptive MoveItem calls; depiction message callbacks for Player, Locker, and Vehicle, to properly depict the manipulation of items; eliminated the old code from WSA

* added useful comments to Containable; moved functionality for deployables, and for container'ing, and dropping logic out from WSA and distributed it appropriately

* handling terminal operations - buying an exosuit and selecting an infantry loadout; starting work on support for more persistent equipment timers local to the avatar (that were removed in this update; see wsa changes)

* linked terminal page/message with routing policy

* tuning vehicle loadout management and display

* separated use time from purchase time and applied a system that limits either if that same event would recur too soon; tuning exosuit and loadout changes

* some ask timeout handling and comments

* normalizing item on ground interactions

* rearranging the project structure

* merged with master; commas removed

* fixing tests

* added description strings to Tasks; adjusted the completion conditions for some Tasks

* a failed purchase will not block future purchases; increased timeout on move-item tasks

* corpses, even one's own, should have properly moveable inventories

* for better persistence, until GlobalDefinitions is renovated, moved the object id->name map onto the avatar object, for the purpose of timers; replaced a use of values in GridInventory for a map conversion

* max loadouts and max exosuit switch use same cooldown now; hopefully better clarifcation regarding held arm position
2020-05-16 12:18:08 -04:00
Chord a80e869fb9 Map performance critical actors to dedicated dispatchers
Using built-in akka configs, we are able to map Actors to dispatchers in
a fine-grained way. Now each session router, network listener, and zone
have a dedicated set of threads. Currently all WorldSessions are sharing
a single worker pool, which means that the server could still crash if
all worker threads are exhausted. To prevent conditions like these, the
amount of time spent on single actors based on time and number of
messages can be tuned.Threads when not receiving work exit to save
resources.

Also all .conf files are now included in the resource packing process.
Users should create user.conf to override these .conf files to avoid
losing edits when updating the server version.
2020-05-12 07:41:46 +02:00
Chord c5528ac6a4 Revert missing class loader strategy 2020-05-11 15:24:10 +02:00
Chord 82e8840176 Create PsAdmin framework
PsAdmin uses a dedicated TCP port to allow for remote queries and
command to be sent to the running World/Login server. Commands are a
single command followed by zero or more arguments.

Commands may require access to the ActorSystem, so they will get their
own dedicated actors to be able to handle the different messages
required that can be sent in response to a query. The return line is in
JSON to allow for easy parsing by applications, such as web servers.
An interactive client is easy as being able to parse json and buffer
command input.

Some basic commands are implemented for now:

* shutdown - kills the actor system
* list_players - gets a list of players on the interstellar cluster
* dump_config - get the running config
* thread_dump - dumps all thread backtraces (useful for prod debugging)

More advanced commands like kick/ban will require additional testing.
2020-05-11 04:18:29 +02:00
Mazo 61360d97e0
Kamon tweaks (#401)
* Move application.conf to src/main/resources

* Change ClassLoaderLayeringStrategy for Kanela / Kamon to intiialize properly

* Attempt at reducing PTSv3 log spam

* Silence some more logspam

* Disable oshi logging entirely
2020-05-04 00:27:41 -04:00
Mazo eabb952683
Add kamon.io metrics reporting (#395)
* Add kamon.io metrics reporting

* Line length + whitespace
2020-04-29 14:59:12 -04:00
pschord b1be0ffdb3
Upgrade SBT to 1.3.6 (#322) 2020-01-13 17:59:24 -05:00
pschord d08911d07c Account and Character Database and Config Improvements (#317)
* Create Account/DB abstraction

* Fix crash when removing boomers from deconstructed player

* Extend config to include database and worldserver info

* Improve ConfigParser tests

* Add database setup documentation

* Add xTriad to THANKS file

**

* Increase bcrypt rounds and fix readme link
2020-01-10 11:13:37 -05:00
pschord ae7f8bf71d Enable quiet tests using SBT config (#318)
* Enable quiet tests using SBT config

* Add logback-test.xml config to reduce log messages

* Hide "resolving" messages in CI environment

* Improve ScalaTest options to reduce SuiteStart events

* Hide EVEN MORE Specs2 output
2020-01-08 08:33:25 -05:00
Chord bf21491859 TravisCI: re-enable coverage, exclude WorldSessionActor
* Update badge to travis-ci.com
* Add artifact upload to S3 testing for future CI based server deploys
2019-12-13 13:48:15 -05:00
Mazo 7b6063055a Basic lattice functionality (#296)
* Move isMoving check to outer block to fix scoping issues

* Initial basic lattice functionality

* Small tweaks to tests
2019-12-10 09:17:54 -05:00
Fate-JH a5a85e6cc3
Upper Body Angle (#292)
* constrain angles on specialized yaw and pitch fields

* integrated new Angular Codec into OCM and OCDM of avatar; corrected tests; wrote shortcut for whether a unit is moving (under its own power)

* apply clamp

* Accessed containers while moving

Removed unintentional code duplication outside of conditional.
2019-11-29 11:14:25 -05:00
Chord 9836e48ac7 Fix flaky actor tests by de-parallelizing 2019-10-22 14:35:17 -04:00
pschord 33e4f2b35e
SBT: add support for unified docs (#284)
Unified documentation can be generated with the sbt unidoc command.
2019-10-21 16:29:36 -04:00
pschord c3d19b5377
Create PSForever config framework (#283)
We can now parse arbitrary INI configuration entries. This will allow
server customization and testing without recompiling the server.
2019-10-21 14:12:26 -04:00
Chord 6a876d5b57 Add feature flag to SBT scalac options 2019-10-11 11:50:00 -04:00
FateJH e6646c2352 deleted unnecessary intermediary class; modified current Actor tests to operate under akka-testkit, which required changing the dependencies 2017-08-16 18:23:09 -04:00
FateJH 1b789154bf added compiler flag '-language:postFixOps' to stop warnings about time post-fix notation ('100 milliseconds') 2017-05-05 08:22:17 -04:00
Chord 04ae44c3a9 Improve LoginRespMessage, write test, and begin DB 2017-03-04 14:55:43 -05:00
L-11 88b6974edc Initial support for server REPL (#68)
* Initial support for server console

* Expand README

* Fix unmanagedClasspath for `sbt pslogin/console`
2016-08-26 23:46:57 -04:00
Chord ccad92a555 Increase client keep alive interval, add dynamic log files 2016-08-05 18:12:51 -04:00
Chord ae6687c38f Create advance session management and reaping 2016-07-30 21:08:40 -04:00
Chord 6c86ac92a7 Fix logback debug file and bump version 2016-07-29 03:02:58 -04:00
Chord ce5461da66 Travis: enable code coverage 2016-07-26 22:31:54 -04:00
Chord 1168022db9 Add resource directories and config/ 2016-07-26 21:48:58 -04:00
Chord 35a592476f Add classpath for native pscrypto libraries 2016-07-26 20:41:02 -04:00
Chord 7af6f64429 Rebump scodec-akka due to fix 2016-06-04 13:23:37 -04:00
Chord 50fb65ac57 Version bump scodec and specs2
Also fix assorted casting errors and improve test case readability
2016-06-03 21:47:45 -04:00
Chord e41d0ac9c4 Fix broken organization name in build.sbt 2016-05-03 04:04:36 -04:00
Chord df1d222df8 Refactor package naming scheme and line endings (CRLF) 2016-05-03 03:58:58 -04:00
Chord e299abb03a Add SLF4J MDC session logging 2016-05-01 21:41:10 -04:00
Chord 1318ebd751 New SLF4J logger log4s. ANSI colors
Used jANSI for Windows console color support. Log4s for a Scala logging
facade (which uses SLF4J). Using logback as the logging driver.
2016-05-01 04:37:36 -04:00
Chord 0d986bcb29 Migrate to sbt-pack vs assembly for faster packing 2016-04-22 23:02:47 -04:00
Chord d96fce6299 Initial Commit 2016-02-05 03:19:13 -05:00