Commit graph

23 commits

Author SHA1 Message Date
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 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 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 a23643b240
Instant Action / Recall to Sanctuary (#348)
* refactored ZoneActor for external calls; earliest code for calculating Instant Action placement

* created a building definition so that SOI is no longer indeterminate; gave hot spots projector a longer-lasting backup for purposes of activity retention; instant action ramp-up works

* filled out instant action messages; refactored main method

* packet and initial tests for DroppodFreefallingMessage; drop pod definition, packet converter, and consideration in WSA and InterstellarCluster instant action functionality; droppods now work

* duplicated soi information; modified priority of instant action; assigned cavern status; added reset for instant action failure; implant interrupt condition; wrote comments

* no instant action droppods; added messages for cancelling instant action when certain conditions occur; wilderness instant action request

* made generic the entire instant action process to shoehorn the whole of the sanctuary recall process into it; I hope you're happy

* test fix; vehicle hacking fix; no more artificial NTU drain

* escape case for zoning last chance; descriptive mesages condense similar calls

* something of a merge repair
2020-04-16 21:21:33 -04:00
Mazo 06ef3a08c5
More caverns work (#335)
* Add functionality for cavern sentry turrets

* Add missing LastDischarge on Tool

* Fix BuildingControl GUID errors on server startup

* Fix instant REK access to terminals in a cavern facility with a hacked CC

* Simplify CC Amenity matching

* Modify warning to match disabled functionality
2020-02-14 10:52:57 -05:00
FateJH 03bc52f52d moved PlanetSideGUID from .packet.game to .types; project threw a hissy fit 2020-01-09 15:32:19 -05:00
FateJH c4bb0a77f6 resolutions 2; tests 2019-12-11 08:34:29 -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
Mazo 2662be8778 Standardize constructors to have position as the first param and add positions to terminals (#294)
* Standardize constructors to have position as the first param and add positions to terminals

* Actually assign the position to the terminal object
2019-12-05 09:44:42 -05:00
Mazo 7fcbf7bf41 Full map configs for all above ground continents including battle islands and oshur prime (#245)
* Move door orientation logic from the door itself to the IFF lock, as the lock has the correct orientation in the UBR files, whereas the door does not.

* Remove ModelID from buildings (is now GUID) and change "ID" to be "MapId". A building can also be constructed with both a GUID and MapID.

* Update Maps.scala and Zones.scala to (for the moment) only have Ishundar configured with Sounours V3 playtest base ownership. Default starting zone is also moved to Ishundar for now.

* Fix oopsie with West Zaqar Tower

* Add proximity terminal positions to constructors

* Offset vehicle spawning by the correct amount from game_objects.adb.lst

* Orient players correctly when spawning at a respawn tube

* Apply a 90 degree offset to tech plant garage locks, as these are the only locks where the orientation does not match the orientation of the door

* Add missing spawn terminals, repair/rearm terminals for both ground and air.

* Additional documentation for GOAM / PAM packets

* Add extra arguments to building LocalObjects to make it a bit more DRY and reduce line count for map files

* Split maps configuration into separate files and add every above ground map (including battle islands and oshur prime)

* Fix ZoneTest typo

* Update vehicle spawn pads to use the correct object types, Z offsets and Z orient offsets

* Update ZoneMaps with the new vehicle spawn pad definitions and fix a few issues with sanctuary GUIDs (special thanks to the one person that used capitals in the .lst files when no other object uses them)

* Comment out duplicate instance of ObjectDetachMessage being sent

* Apparently TR sanc has an extra 6 repair silos, now accounted for.
2019-04-04 14:44:57 -04:00
Mazo 3738feec12 IFF/Door orientation - Building MapID/GUID changes - Ishundar full config (#244)
* Move door orientation logic from the door itself to the IFF lock, as the lock has the correct orientation in the UBR files, whereas the door does not.

* Remove ModelID from buildings (is now GUID) and change "ID" to be "MapId". A building can also be constructed with both a GUID and MapID.

* Update Maps.scala and Zones.scala to (for the moment) only have Ishundar configured with Sounours V3 playtest base ownership. Default starting zone is also moved to Ishundar for now.

* Fix oopsie with West Zaqar Tower

* Add proximity terminal positions to constructors

* Offset vehicle spawning by the correct amount from game_objects.adb.lst

* Orient players correctly when spawning at a respawn tube

* Apply a 90 degree offset to tech plant garage locks, as these are the only locks where the orientation does not match the orientation of the door

* Add missing spawn terminals, repair/rearm terminals for both ground and air.

* Additional documentation for GOAM / PAM packets
2019-04-04 14:32:28 -04:00
Fate-JH 5f3e7e5df8
Deployables (#230)
* functions for certifcation ui updates (that don't work)

* initialization of combat engineering deployables ui on load and certification change

* representation classes for ACE and FDU; ability to pull ACE and FDU from equipment terminals

* ammo change functionality and fire mode change functionality for ConstructionItems refactored from Tool operations and supported properly (switch between deployable options)

* zone-specific structure for keeping track of deployables; abaility to dismiss deployables from the map screen (previous functionality); local client creation of explosive-type deployables

* refactored MannedTurret into FacilityTurret and lesser traits to be used in the deployable spitfires and the OMFT's; all ACE deployables are available for placement; partial management of the construction items after the deployable is placed; boomers create boomer triggers

* Avatar-specific storage for deployables and for updating UI elements

* refactored quite a bit of code in WSA for the benefit of deployable management; refinements to deployable creation; server messages about deployable quantities; corrected the FDU encoding pattern; lots of work dedicated just to synchronizing BoomerTrigger objects

* added RemoverActor for deployables and redistributed deconstruction functionality away from WSA to new DeployableRemover; added events to facilitate activities not inheritable with this model

* refactored and distributed Deployables classes; copious amounts of testing and document-writing

* boomers now explode from trigger; support for deployables being destroyed by weapon discharge, including individual health, soure identification, and damage model; shuffled deployable classes to build different hierarchy

* sensor_shield was skipped by accident

* identified stray object in Hanish, Ishundar, and added Irkalla, Ishundar's capture console; fixed issue with Warp command and 'Irkalla'; modified building amenity setup and setup testing in Zone; players load and die properly when seated in an omft; reserve ammunition in omft properly registered

* added local service channel, capture consoles, fixed tests as much as posible

* fixed LocalService tests by booting the ServiceManager; added avatar and local tests

* a simple attempt to refactor Actor messages in a way that is acceptable to Travis CI

* making the explosive deployables vanish upon explosion; sensor health bars are now supported
2018-09-23 08:00:58 -04:00
Fate-JH b81ff2bbf4
Facility Turrets (#223)
* object class, actor class, and definitions for base turrets; untested

* wired base turrets into existence, with hoop jumping; created interface for objects with mounted weapons (vehicles and turrets); working example phalanx_sgl_hevgatcan in Anguta, Ceryshen

* re-wiring manned turrets so that the turreted weapon itself never changes externally but merely identifies different and changes internally; workflow for upgrading wall turrets in place (30s); clarifications and documentation for HackMessage and UseItemMessage; getting rid of orphaned packages from previous location of services

* added a simple task that reverts upgraded manned turrets to their None state after a certain amount of time has passed; it works but need improvement

* turret weapon upgrades now last for a duration of 30 minutes before reverting; created a service support actor base actor that underlies all current support actors; nano-dispenser now properly loads 1 unit of upgrade canister, rather than 100 units; all canister types have appropriate 2x3 inventory size

* forgot to hurry; moved over the Services tests from main/test folder into the common/test folder and needed to change the location of ActorTest to accommodate it; test and documentation for MannedTurret; codecov ignore update

* wired facility turrets in Anguta, Ceryshen; Akna tower, Ceryshen; and S.Villa tower, home3 (Anguta tower is a watchtower); attempted workaround for Travis CI issues with receiveN; re-introduced RemoveActorTest, at least the first test; expanded how ZoneActor performs tests on MannedTurret setup

* getting rid of useless commented-out code; making common operations for mounting and dismounting

* removed outdated comment; added ResourceSilo tests; added extra test for Zone
2018-07-14 21:25:44 -04:00
FateJH 20a4fdfe45 documentation for projectiles; moved LocalProjectile construction intoMaps.scala; extensive test corrections 2018-06-16 17:31:49 -04:00
FateJH 35ed000ccc code documentation and tests 2018-04-19 08:03:06 -04:00
FateJH ddc2450541 Buildings now have simple type distinctions to work using the known output of a SpawnRequestMessage packet. Support for cross-continental respawning (actually a failure case for being unable to spawn). Corpse tuning and testing. 2018-03-31 19:59:11 -04:00
FateJH 33a7636f5e changing continent id and building id to normal data types in BroadcastWarpgateUpdate and BuildingInfoUpdate; implementing warp gates and branched logic for warp gate initialization in WSA; updating tests 2018-03-05 23:26:38 -05:00
FateJH eefe4d2e20 Building:
Replaces class object/serverobject/door/Base.scala.  It performs nearly the exact same purpose but now has a list of owned objects called Amenities.  Buildings are now a PlanetSideServerObject (PSSO), which allows them to have accept a *Control Actor and possess FactionAffinity.

FoundationBuilder:
FoundationBuilder : Building :: ServerObjectBuilder : [T <: PlanetSideServerObject]

Amenity:
Most PSSO's now accept Amenity as their parent in class hierarchy.  Flagged PSSO's like Building and Vehicle are, on the other hand, capable of becoming the owner for these Amenity PSSOs, which allows them to inherit the same FactionAffinity.

FactionAffinity:
A trait that connects objects that are intended to communicate PlanetSideEmpire values.

MountableBhevaior:
Split between Mount and Dismount behavior.  Passes appropriate messages to ensure coherent workflows.

Control Actors:
FactionAffinityBehavior and MountableBehavior are PartialFunctions that get processed in series.

VehicleControl:
Distinguished behavior allowed between an operational vehicle and a deactivated one.

WSA:
Tightened up DismountVehicleMsg handling code, since MountableBehavior has been enhanced.

Minor:
Shotgun shell stacking goes from 32 to 16.  Various PSSO classes now have reliable Definition objects.

Tests:
We now have 1012 tests, some of them useful.
2018-02-08 14:22:05 -05:00
FateJH f4b913a5d9 Vector3 normal vector functions; locked door opening from inside mechanics; correction to item/equipment identification in WSA; quick solution to stop door from closing on player who opened it if that player is still standing within sqrt(15)m from it 2018-01-24 20:44:30 -05:00
FateJH f5182030da added support for Lockers and access to Locker contents; modified RequestDelete to handle Locker, as well as previously neglected vehicle trunk contents; added Lockers to Hart C shuttle observation room 2018-01-22 20:45:05 -05:00
FateJH 17a8b8bf38 Zones:
Added continent stubs to InterstellarCluster init list.  All Maps and Zones are defined in temporary objects that may be subdivided further as they grow.

Builder:

Replaced trait ServerObjectBuilder[A] with class ServerObjectBuilder[A] that allows for much greater power.  In ZoneMap.Init override, LocalObject invocations that were previously 'LocalBuilder(FooObjectBuilder(ObjectDefintion, Int))` have been transformed into `LocalObject(ServerObjectBuilder(Int, (Int=>Foo))` where `Foo` is the type of object to be created by the curried function `(Int)=>Foo`.  The examples with Terminals and the VehicleSpawnPad should demonstrate what kind of power this syntax possesses in isolating constant (or at least initial) configuration settings.  At least five files, and some files not yet written, have been rendered obsolete and have been eliminated from the sim pertaining to these created objects.
2017-12-25 17:01:53 -05:00
FateJH f9beb47073 Implant Terminals:
Implant terminals (mech) are now properly mountable and implant terminals (interface) are also properly interactive.  Player can select to equip or to remove implants properly.

Mountable:

Vehicles and implant terminal mechs now use common Mountable logic.

home3 Hart C:

All doors, save for those to the shuttle, and all implant terminals in this building are now rigged to operate.
2017-12-03 21:00:58 -05:00