Commit graph

301 commits

Author SHA1 Message Date
Renovate Bot 60932ecefa
Update dependency io.kamon:kamon-apm-reporter to v2.1.12 2021-02-10 13:25:18 +00:00
Renovate Bot ca4fcdb9b9 Update dependency io.kamon:kamon-bundle to v2.1.12 2021-02-10 13:24:43 +00:00
Mazo ed805cb736
Merge pull request #686 from psforever/renovate/joda-time-joda-time-2.x
Update dependency joda-time:joda-time to v2.10.10
2021-02-06 15:51:02 +00:00
Renovate Bot 53f844decf
Update dependency io.sentry:sentry-logback to v4 2021-02-05 23:45:14 +00:00
Renovate Bot 5dee2dd3fe
Update dependency joda-time:joda-time to v2.10.10 2021-02-05 23:45:08 +00:00
Mazo 1af1353b60 Add akka-http to satisfy kamon dependencies 2021-02-05 23:30:52 +00:00
Mazo fcf565e8a8
Merge pull request #680 from psforever/renovate/akka
Update akka to v2.6.12
2021-02-02 21:29:36 +00:00
Renovate Bot 55527d596d
Update dependency io.kamon:kamon-bundle to v2.1.11 2021-02-01 21:42:19 +00:00
Renovate Bot 11af2c0182 Update dependency io.kamon:kamon-apm-reporter to v2.1.11 2021-02-01 20:14:08 +00:00
Renovate Bot 040baf9b7d
Update akka to v2.6.12 2021-01-29 09:14:52 +00:00
Renovate Bot c02a71f2ee Update dependency org.flywaydb:flyway-core to v7.5.2 2021-01-27 13:02:17 +00:00
Renovate Bot b001a1876e Update dependency org.flywaydb:flyway-core to v7.5.1 2021-01-21 15:41:22 +00:00
Renovate Bot fab00895d1 Update dependency org.fusesource.jansi:jansi to v2.2.0 2021-01-21 00:16:37 +00:00
Renovate Bot 8ad7d4e2ea
Update dependency io.kamon:kamon-apm-reporter to v2.1.10 2021-01-20 10:08:16 +00:00
Mazo ef52f8853b
Merge pull request #670 from psforever/renovate/io.kamon-kamon-bundle-2.x
Update dependency io.kamon:kamon-bundle to v2.1.10
2021-01-20 10:07:38 +00:00
Mazo 15d67d4767
Merge pull request #668 from psforever/renovate/io.sentry-sentry-logback-3.x
Update dependency io.sentry:sentry-logback to v3.2.1
2021-01-20 09:56:38 +00:00
Renovate Bot 89ab034e22
Update dependency io.kamon:kamon-bundle to v2.1.10 2021-01-20 09:53:09 +00:00
Renovate Bot b80bca063a
Update dependency io.sentry:sentry-logback to v3.2.1 2021-01-19 09:54:30 +00:00
Renovate Bot 9a3faa29e9
Update dependency org.specs2:specs2-core to v4.10.6 2021-01-18 18:06:32 +00:00
Renovate Bot 0b3049c975 Update akka to v2.6.11 2021-01-15 13:38:00 +00:00
Renovate Bot 85a10fbf8b
Update dependency io.getquill:quill-jasync-postgres to v3.6.0 2021-01-12 19:34:54 +00:00
Renovate Bot 7af8d8984d
Update dependency org.flywaydb:flyway-core to v7.5.0 2021-01-11 13:46:40 +00:00
Renovate Bot 2f0c6d98fd Update dependency joda-time:joda-time to v2.10.9 2020-12-29 22:43:25 +00:00
Fate-JH 06b63d8d23
Merge pull request #646 from psforever/renovate/org.fusesource.jansi-jansi-2.x
Update dependency org.fusesource.jansi:jansi to v2.1.1
2020-12-24 08:05:59 -05:00
Fate-JH 864731cac3
Merge pull request #647 from psforever/renovate/org.flywaydb-flyway-core-7.x
Update dependency org.flywaydb:flyway-core to v7.3.2
2020-12-24 08:05:33 -05:00
Renovate Bot 1ef7d0c510
Update dependency org.bouncycastle:bcprov-jdk15on to v1.68 2020-12-23 01:28:51 +00:00
Renovate Bot a508917473
Update dependency org.flywaydb:flyway-core to v7.3.2 2020-12-16 16:15:44 +00:00
Renovate Bot 09f71649a8
Update dependency org.fusesource.jansi:jansi to v2.1.1 2020-12-15 10:26:15 +00:00
Renovate Bot b07fe77c6e Update dependency com.github.scopt:scopt to v4.0.0 2020-12-08 20:09:40 +00:00
Fate-JH 32216ecbc8
Merge pull request #642 from psforever/renovate/org.flywaydb-flyway-core-7.x
Update dependency org.flywaydb:flyway-core to v7.3.1
2020-12-08 14:34:07 -05:00
Renovate Bot e2dd86b1db
Update dependency org.fusesource.jansi:jansi to v2.1.0 2020-12-08 00:12:59 +00:00
Renovate Bot b701cc2515
Update dependency org.flywaydb:flyway-core to v7.3.1 2020-12-04 15:33:28 +00:00
Fate-JH babd455753
Yet Another Corpse Fix (#637)
* numeric session ids now restored; LoginActor knows about connection address; corpses are barren unless searched

* session and login id/counter moved under server; function literal definition changed

* corpse channel

* trying to fix docker as per set-env requirement changes; I don't know what I'm doing
2020-11-27 09:30:56 -05:00
Fate-JH e357663364
Merge pull request #634 from psforever/renovate/scala-2.13.x
Update dependency scala to v2.13.4
2020-11-26 09:18:06 -05:00
Renovate Bot 3234c5797a
Update dependency io.kamon:kamon-bundle to v2.1.9 2020-11-26 13:06:24 +00:00
Fate-JH b3b550f82d
Merge pull request #635 from psforever/renovate/io.kamon-kamon-apm-reporter-2.x
Update dependency io.kamon:kamon-apm-reporter to v2.1.9
2020-11-26 08:05:59 -05:00
Fate-JH b6ae5fe71b
Merge pull request #633 from psforever/renovate/org.flywaydb-flyway-core-7.x
Update dependency org.flywaydb:flyway-core to v7.3.0
2020-11-26 08:04:34 -05:00
Fate-JH 5f019c0f5f
Merge pull request #632 from psforever/renovate/org.scala-lang.modules-scala-parallel-collections-1.x
Update dependency org.scala-lang.modules:scala-parallel-collections to v1
2020-11-26 08:04:20 -05:00
Fate-JH 77441ab4ed
Merge pull request #629 from psforever/renovate/org.scalatest-scalatest-3.x
Update dependency org.scalatest:scalatest to v3.2.3
2020-11-26 08:04:09 -05:00
Fate-JH ce973c34d6
Merge pull request #625 from psforever/renovate/org.fusesource.jansi-jansi-2.x
Update dependency org.fusesource.jansi:jansi to v2
2020-11-26 08:02:27 -05:00
Renovate Bot 0b785f6de0
Update dependency org.flywaydb:flyway-core to v7.3.0 2020-11-25 15:00:28 +00:00
Renovate Bot 1583b8835a
Update dependency io.kamon:kamon-apm-reporter to v2.1.9 2020-11-24 15:18:33 +00:00
Renovate Bot c7238a83db
Update dependency scala to v2.13.4 2020-11-19 13:57:24 +00:00
Renovate Bot ea8ec1493a
Update dependency io.sentry:sentry-logback to v3 2020-11-18 17:13:46 +00:00
Renovate Bot f5f6bf264a
Update dependency org.scala-lang.modules:scala-parallel-collections to v1 2020-11-18 05:50:39 +00:00
Renovate Bot 776019fae6
Update dependency org.fusesource.jansi:jansi to v2 2020-11-16 07:05:28 +00:00
Renovate Bot 6c43728a40 Update dependency org.scoverage:scalac-scoverage-plugin to v1.4.2 2020-11-16 06:50:59 +00:00
Renovate Bot 5b087774be Update dependency com.github.nscala-time:nscala-time to v2.26.0 2020-11-15 13:06:59 +00:00
Renovate Bot ae71cf6b73 Update dependency org.flywaydb:flyway-core to v7.2.0 2020-11-09 16:19:54 +00:00
Renovate Bot 4adf495398
Update dependency org.scalatest:scalatest to v3.2.3 2020-11-09 04:22:12 +00:00
Mazo a90f926783
Merge pull request #627 from psforever/renovate/org.bouncycastle-bcprov-jdk15on-1.x
Update dependency org.bouncycastle:bcprov-jdk15on to v1.67
2020-11-01 12:11:06 +00:00
Mazo e52fff4b89
Merge pull request #621 from psforever/renovate/com.typesafe-config-1.x
Update dependency com.typesafe:config to v1.4.1
2020-11-01 12:09:49 +00:00
Renovate Bot af94146f33
Update dependency org.bouncycastle:bcprov-jdk15on to v1.67 2020-11-01 09:53:08 +00:00
Renovate Bot 9c7056a69f Update dependency org.log4s:log4s to v1.9.0 2020-10-30 06:23:31 +00:00
Renovate Bot d59e709989 Update dependency joda-time:joda-time to v2.10.8 2020-10-24 00:32:53 +00:00
Renovate Bot 115bf33b5f
Update dependency com.typesafe:config to v1.4.1 2020-10-22 23:28:48 +00:00
Renovate Bot d36fcb890e Update dependency joda-time:joda-time to v2.10.7 2020-10-21 10:47:34 +00:00
Mazo 9ec6c735b9
Merge pull request #611 from psforever/renovate/org.flywaydb-flyway-core-7.x
Update dependency org.flywaydb:flyway-core to v7.0.3
2020-10-15 19:29:36 +01:00
Renovate Bot ce0ba803e0
Update dependency org.flywaydb:flyway-core to v7.0.3 2020-10-15 18:28:38 +00:00
Mazo d529988ff0
Merge pull request #610 from psforever/renovate/org.specs2-specs2-core-4.x
Update dependency org.specs2:specs2-core to v4.10.5
2020-10-15 19:28:34 +01:00
Renovate Bot d21f5f2a76
Update dependency org.postgresql:postgresql to v42.2.18 2020-10-15 14:50:29 +00:00
Renovate Bot 81c095a55a
Update dependency org.specs2:specs2-core to v4.10.5 2020-10-14 09:47:34 +00:00
Renovate Bot 252e970736
Update dependency org.flywaydb:flyway-core to v7.0.2 2020-10-12 13:04:41 +00:00
Mazo d19429e45c
Merge pull request #602 from psforever/renovate/org.specs2-specs2-core-4.x
Update dependency org.specs2:specs2-core to v4.10.4
2020-10-12 13:05:01 +01:00
Mazo ad5997a841
Merge pull request #609 from psforever/renovate/io.kamon-kamon-bundle-2.x
Update dependency io.kamon:kamon-bundle to v2.1.8
2020-10-12 13:04:44 +01:00
Mazo 20a1629d38
Merge pull request #604 from psforever/renovate/org.postgresql-postgresql-42.x
Update dependency org.postgresql:postgresql to v42.2.17
2020-10-12 13:04:23 +01:00
Renovate Bot 7bdd28e474
Update dependency io.kamon:kamon-bundle to v2.1.8 2020-10-12 12:04:06 +00:00
Renovate Bot e070a02190
Update dependency io.kamon:kamon-apm-reporter to v2.1.8 2020-10-12 11:33:27 +00:00
Renovate Bot c3861a91fb
Update dependency org.postgresql:postgresql to v42.2.17 2020-10-09 14:27:56 +00:00
Renovate Bot 5c01d33f62 Update akka to v2.6.10 2020-10-09 12:27:56 +00:00
Renovate Bot e433952a4e
Update dependency org.specs2:specs2-core to v4.10.4 2020-10-09 11:27:51 +00:00
Renovate Bot 2d0f0ebe49 Update dependency org.flywaydb:flyway-core to v7.0.1 2020-10-07 12:08:37 +00:00
Renovate Bot 402342f995
Update dependency io.kamon:kamon-apm-reporter to v2.1.7 2020-10-05 13:31:40 +00:00
Renovate Bot e1d99fd17e
Update dependency io.kamon:kamon-bundle to v2.1.7 2020-10-05 13:30:17 +00:00
Renovate Bot fcb2635730 Update dependency org.flywaydb:flyway-core to v7 2020-09-29 11:03:33 +02:00
Renovate Bot f3c2fe75c1 Update dependency org.json4s:json4s-native to v3.6.10 2020-09-29 05:12:24 +00:00
Jakob Gillich 407429ee21 Networking
The game uses a UDP-based protocol. Unlike TCP, UDP does not guarantee that
packets arrive, or that they arrive in the correct order. For this reason,
the game protocol implements those features using the following:

* All packets have a sequence number that is utilized for reordering
* Important packets are wrapped in a SlottedMetaPacket with a subslot number
* RelatedA packets ae used to request lost packets using the subslot number
* RelatedB packets are used to confirm received SlottedMetaPackets

All of these go both ways, server <-> client. We used to only partially
implement these features: Outgoing packet bundles used SMPs and could be
resent, but not all packets were bundled and there was no logic for requesting
lost packets from the client and there was no packet reordering, which resulted
in dire consequences in the case of packet loss (zoning failures, crashes and many
other odd bugs). This patch addresses all of these issues.

* Packet bundling: Packets are now automatically bundled and sent as
  SlottedMetaPackets using a recurring timer. All manual bundling functionality
  was removed.

* Packet reordering: Incoming packets, if received out of order, are stashed and
  reordered. The maximum wait time for reordering is 20ms.

* Packet requesting: Missing SlottedMetaPackets are requested from the client.

* PacketCoding refactor: Dropped confusing packet container types. Fixes #5.

* Crypto rewrite: PSCrypto is based on a ancient buggy version of cryptopp.
  Updating to a current version was not possible because it removed the
  MD5-MAC algorithm. For more details, see Md5Mac.scala.
  This patch replaces PSCrypto with native Scala code.

* Added two new actors:
  * SocketActor: A simple typed UDP socket actor
  * MiddlewareActor: The old session pipeline greatly simplified into a
    typed actor that does most of the things mentioned above.

* Begun work on a headless client

* Fixed anniversary gun breaking stamina regen

* Resolved a few sentry errors
2020-09-26 23:58:09 +02:00
Renovate Bot 5827204b10 Update dependency org.flywaydb:flyway-core to v6.5.7 2020-09-25 18:11:30 +02:00
Renovate Bot d67119b255 Update dependency com.github.pureconfig:pureconfig to v0.14.0 2020-09-22 02:32:46 +02:00
Renovate Bot 07f447c234 Update dependency io.getquill:quill-jasync-postgres to v3.5.3 2020-09-17 10:18:41 +00:00
Renovate Bot d7aa72d6e2
Update dependency org.flywaydb:flyway-core to v6.5.6 2020-09-16 14:21:58 +00:00
Renovate Bot 8245d3ff1e Update dependency commons-io:commons-io to v2.8.0 2020-09-09 18:37:23 +02:00
Renovate Bot 40c917d300 Update akka to v2.6.9 2020-09-09 18:37:07 +02:00
Jakob Gillich d1a3c9cbb5 Fix akka mixed versioning exception 2020-09-08 08:16:08 +02:00
Renovate Bot 2687cf5a14 Update dependency org.specs2:specs2-core to v4.10.3 2020-09-02 08:08:34 +02:00
Renovate Bot 7a0b2d5a7d Update dependency org.json4s:json4s-native to v3.6.9 2020-09-02 08:08:15 +02:00
Renovate Bot 23f02c180f Update dependency org.fusesource.jansi:jansi to v1.18 2020-09-02 08:07:56 +02:00
Renovate Bot 549d2b53fd Update dependency org.postgresql:postgresql to v42.2.16 2020-09-02 08:07:48 +02:00
Renovate Bot bff0dcb9d8 Update dependency org.scala-graph:graph-core to v1.13.2 2020-09-02 08:07:44 +02:00
Renovate Bot 8eb3131f81 Update dependency org.scalatest:scalatest to v3.2.2 2020-09-02 08:07:37 +02:00
Renovate Bot ea55f2357f Update dependency org.flywaydb:flyway-core to v6.5.5 2020-09-02 04:24:09 +00:00
Renovate Bot 6f7f0ca6f3 Update dependency net.java.dev.jna:jna to v5.6.0 2020-09-02 04:21:42 +00:00
Renovate Bot a62d5b8d81 Update dependency io.kamon:kamon-bundle to v2.1.6 2020-09-02 03:19:59 +00:00
Renovate Bot 4bac38d77d Update dependency io.kamon:kamon-apm-reporter to v2.1.6 2020-09-02 02:14:04 +00:00
Renovate Bot 50372a72b2 Update circe to v0.13.0 2020-09-02 02:09:16 +00:00
Renovate Bot 768172d13a Update dependency commons-io:commons-io to v2.7 2020-09-02 00:11:02 +02:00
Renovate Bot 8c768fadac Update akka packages to v2.6.8 2020-09-02 00:10:49 +02:00
Renovate Bot c3222ef568 Update dependency com.github.t3hnar:scala-bcrypt to v4.3.0 2020-09-02 00:01:19 +02:00
Jakob Gillich 0429003863 Auto publish docs 2020-08-26 06:19:00 +02:00
Jakob Gillich f4fd78fc5d Restructure repository
* Move /common/src to /src
* Move services to net.psforever package
* Move /pslogin to /server
2020-08-26 06:19:00 +02:00
Jakob Gillich 3bdc681c9d Avatar Persistence
* Add AvatarActor: Responsible for managing the session's avatar object
* Convert Avatar object to case class
* Add persistence for BEP, CEP, implants, certs and cosmetics
* Add cosmetic chat commands and handle UI packet
* Add /setbr, /setcr, /certadd, /addbep, /addcep GM commands
* Convert zone maps to JSON
* Update to Scala 2.13.3 and fix warnings
* Fix MAX cooldowns not being applied when purchased manually
* Normalize database table names to singular
* Add docker image build
2020-08-22 16:19:13 +02:00
Jakob Gillich 1efbedcf8e Fix coverage exclusions 2020-08-22 16:19:13 +02:00
Jakob Gillich ff8f787b81 Add Sentry 2020-08-22 16:19:13 +02:00
Jakob Gillich 3345e56b38 Building persistence
Buildings will now persist their faction in the database. At least
that's what I want you to believe this change is.

What it actually is: A rework of InterstellarCluster and groundwork
for further reworks.

InterstellarClusterService: This is the old InterstellarCluster, but
as a service (it has always been one in secret). It was converted to
a typed actor and it now handles all spawn point requests.

ZoneActor: Basically ZoneControl, but as a typed actor. It's more of a
stub right now, the eventual goal is to have it own the `Zone` object
rather than the other way around.

BuildingActor: BuildingControl, but as a typed actor.

Also includes some minor improvements to ChatActor and sets
SupervisorStrategy.restart for all typed actors (which is the default
for classic actors, but not for typed actors - we may want to get more
sophisticated here in the future).
2020-08-22 16:19:13 +02:00
Jakob Gillich 4634dffe00 ChatActor
This removes roughly 1k LOC from WorldSessionActor and moves
them to a new ChatActor. That was the initial goal anyway, but it
wasn't that simple. There was no clear location to put this new actor,
I didn't want to put it in pslogin since it isn't part of the "login server"
(and neither is WSA). But since the new actor would have to talk to
WSA and common does not depend on pslogin, I had a choice of
putting more actors in pslogin or putting everything in common. I
chose the latter.

ChatActor and SessionActor (formerly WorldSessionActor) now live
in `common/actors/session`. Since WSA also depends on other
actors in pslogin, most of the pslogin code was moved to either
common/login or common/util. PsLogin as the main entry point
remains in pslogin since having the main code compile to a library
has some advantages, and it will allow us to produce binaries
for distinct login/world servers in the future if desired. For a second
take, I'd suggest moving common to /src in the root directory.

This change is enabled by a new immutable `Zone` object that is
passed from SessionActor to ChatActor. Most of its members are
still mutable references, and the code at the moment does depend
on this being the case. Changes to the session object in
SessionActor are forwarded through a SetZone message to
ChatActor. As we split out more code into actors, we could
use EventBus or typed Topic's instead.

Also included is a reworked ChatService that was converted to a
typed actor and uses the built-in Receptionist facility for service
discovery. By receiving the session object from ChatActor, it can
be much smarter about who to send messages to, rather than
sending all messages to everyone and having them figure it out.
But as this session object is not updated, it can only use static
properties like player name and faction and not fluid properties
like position.

The following chat commands were added:
command, note, gmbroadcast, [nc|tr|vs|broadcast, gmtell, gmpopup
and !whitetext
2020-08-22 16:19:13 +02:00
Jakob Gillich 4dd24ff01a Fix packed binary
I moved PsLogin into a package but didn't update `packMain`
2020-07-23 21:53:45 +02:00
Jakob Gillich 752a195178
Add command line interface
Comes with a flag to run flyway baseline automatically
2020-07-14 19:31:59 +02:00
Jakob Gillich e0defe8240
Persistence #1 featuring quill (#508)
* Add .scalafmt.conf

* Adopt quill for database access

* Removed postgresql-async
* Refactored all instances of database access
* Creating duplicate characters of the same account is no longer possible
* Rewrote large parts of LoginSessionActor

* Implement migrations

* Move overrides into subdirectory

* Make usernames case insensitive

* Use LOWER(?) comparison instead of storing lowercased username

* import scala.util.{Success, Failure}

* Add config and joda-time dependencies

* Add sbt-scalafmt

* Use defaultWithAlign scalafmt preset

* Format all

* Add scalafix

* Remove unused imports

* Don't lowercase username when inserting

* Update readme

* Listen on worldserver.Hostname address

* Remove database test on startup

It could fail when the global thread pool is busy loading zone
maps. Migrations run on the main thread and also serve the
purpose of verifying the database configuration so it's fine to
remove the test altogether.

* Refactor chat message handlers, zones

What started as a small change to how zones are stored turned
into a pretty big effort of refactoring the chat message handler.
The !hack command was removed, the /capturebase commandwas added.

* Expose db ports in docker-compose.yml

* Silence property override log

* Rework configuration

* Unify configuration using the typesafe.config library
* Add configuration option for public address
* Configuration is now loaded from application.conf rather than worldserver.ini
* Refactor PsLogin and remove unnecessary logging
* Move pslogin into net.psforever.pslogin namespace

* Fix coverage
2020-07-13 23:54:05 -04:00
Jakob Gillich 116860b3be
XTools V3
* Use command line interface instead of hard-coded paths
* Takes in both .gcap and parsed gcapy files
* Add pack config to allow system-wide installation
* Slightly change output format from [C|S] -> [C|s] to C [<<<|>>>] S
* Add some documentation to README
2020-06-10 14:26:32 +02:00
Mazo e56f4dfd3b Remove unnecessary dependency 2020-06-05 21:51:47 +01:00
Mazo d58550dc3b Add missing dependency on common package 2020-06-05 21:12:08 +01:00
Mazo 094cb3046f Move XToolsV2 into a new tools/decode-packets project 2020-06-05 21:08:54 +01:00
Mazo 663616ddf1 XTools V2 2020-06-05 21:08:23 +01:00
Fate-JH bd82d332fa
Let's Move Item, Together, Again (#445)
* 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

* manual merge-rebase of master with hand reconstruction of WorldSessionActor and PlayerControl, and variations for other files necessary to maintain both inventory operations and login reliability

* test fixes; MAX exo-suit cooldown is now five minutes again
2020-06-04 16:39:08 -04:00
FateJH 7162aa9c17 reactivating sbt-unidocs plugin 2020-05-29 19:12:07 -04:00
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