Commit graph

805 commits

Author SHA1 Message Date
FateJH f627571f0e eliminated multiple timers for a single aura effect; added comments; added tests; fixed tests 2020-08-26 11:48:42 -04:00
FateJH fc89355acf moved aggravation damage into damage implementations of turrets and vehicles, rather than directly into ther immediate control agencies; revamp projectile quality modifiers; comet now does initial damage and one less tick of aggravation; the implementation progression of damageable entities is different now 2020-08-26 11:48:41 -04:00
FateJH 89d7aea633 separated aggravation behavior and uara management behavior; moved files into packages and deleted old files 2020-08-26 11:45:07 -04:00
FateJH a79fc6bd2f working comet calculations 2020-08-26 11:45:05 -04:00
FateJH 80c1a34fb0 woring Starfire damage calculations; projectiles have open-ended quality modifier 2020-08-26 11:45:05 -04:00
FateJH 66eb3b5b95 work on starfire damage profile; moved aura behavior into own folder and creates an aura container object; extended aura behavior to vehicles; applied target-control to aggravation effect 2020-08-26 11:45:03 -04:00
FateJH 97e64d5edc timing and damage tuning around: standard, reinforced, max; plasma grenades, dragon 2020-08-26 11:45:02 -04:00
FateJH d149e07e89 grenade projectile flag on projectile definition; better timing control on aura behavior and integration with player control 2020-08-26 11:45:00 -04:00
FateJH 811c7b09b5 wrote aggravated damage properties into the definitions of projectiles that convey them; basic workflow for aggravation from projectile damage is in place, but not tested 2020-08-26 11:44:58 -04:00
FateJH 5c8331ed9b initial work and tests for AggravatedDamageMessage 2020-08-26 11:44:58 -04:00
FateJH e5d0690c42 introduction of aggravated damage properties and modification of damage pathways such that 'aggravated' is treated as a unique damage type 2020-08-26 11:44:57 -04: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
Fate-JH 89a30ae6f6
armor value updated (#533) 2020-08-25 21:28:04 -04:00
Fate-JH d46110874e
Implied Swap Item (#530)
* by deleting a swap item for the entirety of a zone, avert the end of the world
* drop the item you are holding when you die
2020-08-24 04:36:20 +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 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
Fate-JH 144804139f
Maelstrom (#520)
* initial packet and tests for ChainLashMessage; changed Rounds to RoundPerShot for extra clarity; weapon fire and discharge refactor

* lash damage field for maelstrom; chain lashes on hit with damsage proxy

* mend

* must modify all tests that rely on ephemeral logic like this in the future

* adding modifiers to take the place of target-selected distance calculations performed on damage valuesd; simplying the damage model

* suppressor goes in the suppressor slot
2020-07-28 00:02:43 -04:00
Mazo f2b1d64c3d Give all facilities cavern equipment + vehicle module benefits 2020-07-22 17:25:09 +02:00
Mazo eabf1beb02 Disable airpad / ground silo repairing functionality on vehicles that have been damaged within the last 5 seconds 2020-07-22 17:25:09 +02:00
Mazo 449c727be7 Disable damage on spectators (e.g. pain fields) 2020-07-22 17:25:09 +02:00
Fate-JH 3ffd16852d
Merge pull request #518 from jgillich/nick-ams
Temporary AMS & GG changes based on community needs.
2020-07-14 15:06:28 -04:00
NickPSF bcdc4fd11f
Temporary AMS & GG changes based on community needs.
**AMS Changes:**

- Max health increased from 3000 to 5000
- Max shields increased from 600 + 1 to 1000 + 1
- Expert Hacker jacking time increased from 15 to 30 seconds
- Advanced Hacker jacking time increased from 20 to 40 seconds

**Galaxy Gunship Changes:**

- Max health increased from 6000 to 9500 while it lacks its damage reduction mechanic.
2020-07-14 20:49:12 +02:00
Fate-JH 4cc8278f2f
Deployment and NTU (#510)
* moved deployment state management and ntu management into vehicle control agency; resource silos need coordinates

* compartmentalization of ntu behavior; end-of-life vehicle behavior; initial state of ntu behavior vehicle during zone loading

* warp gates now have specific ntu granting powers; resource silos have specific ntu acceptance powers; users are forced to process set current avatar at least once during the interim period

* compartmentalized the process of transferring ntu; the ant sends messages to the warp gate and the warp gate responds; the ant sends messages to the resource silo, the silo responds, and then the ant returns a second response; the matter of ntu transferrence was refactored for future accessibility for the bfr siphon

* refactor to single basic transfer behavior out from ant ntu transfer behavior; adding behavior to warp gates and silos

* rebase onto master merge

* correcting tests; eliminating redundancies in end of life of deployed vehicles by patching a match case

* ntu low moved to a function

* fixing test (order of messages)

* rebase merge resolutions
2020-07-14 14:13:18 -04: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
Mazo 88b194fde2
Correctly show ANT capacitor on zoning (#504)
* Correctly show ANT capacitor on zoning

* Remove log

* Move vehicle shields / ntu capacitor packets to HandleSetCurrentAvatar
2020-07-02 20:16:56 -04:00
Mazo 5437b3f068
Reviving a player will drain 25 rounds after revival is complete, instead of on each progress tick (#505) 2020-06-29 13:01:16 -04:00
Mazo d1e7d8f8e0
Amenity positions + !hack refactor (#503)
* Add object positions for capture terminals and resource silos

* Small refactoring / renaming for !hack and capture terminals
2020-06-26 21:34:05 -04:00
Fate-JH e91e282d3a
Disconnect (#499)
* better kicking; a quitting that eliminates persistence

* GenericActionMessage comments; integer delay time

* TeardownConnection corresponds to closing the client directly

* messaging path for CMT_QUIT immediate logout that intersects zoning logic for IA and Recall

* slightly improved kicking, and the posibility of longer kicking

* restoring a turn counter instance

* player character will now clean up like normal; immediately turns into corpse; kick delay exists only on the persistence monitor
2020-06-24 23:08:22 -04:00
Mazo a5403298e3
Add trunk position calculations, reduce trunk access range to ~3 units and add a check that the vehicle isn't moving a significant amount (#497) 2020-06-24 23:07:05 -04:00
FateJH 111fa1b574 initial packet work and tests for: DataChallengeMessage, DataChallengeMessageResp, SimDataChallenge, and SimDataChallengeResp 2020-06-12 00:18:35 -04:00
Fate-JH 181fdb9c84
Stamina / Implants (#485)
* removing stamina update business logic from the Player class

* I really need to sort this out

* implant changes: deactivate when changing armor or loadouts and when zoning; extra details for state management when being jammed or fatigued upon loading

* merge with master

* pull rebase on master; moved implant learning/forgetting to PlayerControl, but not yet completely tested

* unhandled case of no implant in a slot during avatar setup

* complete implant deactivation optional?

* moved reference to player control agency for matters concerning stamina updates on damage taken

* - > +

* crouching makes nothing better

* PlayerControl now handles stamina regeneration; handling a case where being fatigued because activation charge is too much leaves the drain timer running

* no more stamina drain message; moving functionality into the class (out of the object) for expediency; handling implant uninitialization differently upon death

* test repairs; redundant messages in player damage and player death logic

* no jumping; riders get a free pass

* making the code uglier
2020-06-10 09:27:12 -04:00
Fate-JH 3ea51d404e
Graverobbing (#490)
* added corpse control to manage (only) looting; swapping controls in ZonePopulationActor

* making test timing more forgiving; fixing case conditions for corpse addition
2020-06-10 09:23:52 -04:00
Mazo c290dca16b
Merge pull request #491 from Fate-JH/rep-distance
Reviving Players at a Distance
2020-06-10 10:24:48 +01:00
FateJH 1d0d7500ec reviving players now has a distance check 2020-06-09 16:04:45 -04:00
Mazo 73f4c45f93
Merge pull request #481 from Mazo/property-overrides
Zone specific property override config files
2020-06-07 21:41:02 +01:00
Mazo 64ba54b34f Add missing ObjectClass entries for property overrides 2020-06-04 22:56:33 +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
Mazo 69e63827fa Added functionality to allow zone specific property override config files 2020-05-30 21:40:45 +01:00
Fate-JH d6397d54a1
Interim 2 (#477)
* changed DefaultCancellable.obj with Default.Cancellable and deleted the former (as unnecessary)

* changed ActorRef.noSender with Default.Actor for PlanetSideServerObject entities

* Actor.noSender -> ActorRef.noSender, for consistency

* player name in log messages; zoneLoaded and zoneReload flags; upstream message count

* Default object tests; expanded the set current avatar loop

* fallback cases for unsuccessful zone/avatar load process

* completing the trials of the god Travis

* forgot to reactivate kamon
2020-05-30 12:28:10 -04:00
Fate-JH 765816a4d2
original squad leader did not have health or armor properly scaled to the field; squad vehicle stats no longer override individual squad member stats in ui (#479) 2020-05-30 12:03:25 -04:00
Fate-JH 4da6f9d618
added away from keyboard field to player and ways to flag it (#480) 2020-05-30 12:02:46 -04:00
FateJH 6f4eac9e43 changes to quiet the warnings since the 2.13.2 update 2020-05-26 19:50:54 -04:00
Jakob Gillich 222697aee8
Refactor MultiPacketCollector#Bundle (#467)
Bundle was never called in any place other than BundleOption.
This refactors BundleOption into Bundle and removes BundleOption.
Besides being more efficient, it no longer has the possibility of
swallowing unrelated exceptions.
2020-05-26 16:21:49 -04:00
Mazo 210ce0605c
Add personal shield to damage resolution calculations (#465) 2020-05-26 16:17:39 -04:00
Mazo 11a01b038f
Add some logging for suspicious HitMessages (#459)
* Add some logging for suspicious HitMessages

* Add HitPositionDiscrepancyThreshold config settings

* Add hit position discrepancy check to LashMessage & SplashHitMessage

* Whitespace
2020-05-26 16:17:19 -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 1092e76348 Safeguard against trying to send messages to a vehicle actor that no longer exists 2020-05-17 22:04:26 +01:00
Mazo 896fa7bf07 Revert "Let's Move Item, Together (#429)"
This reverts commit 3f2240947b.
2020-05-16 19:10:06 +01:00