Skip to content

Commit

Permalink
Customer Service (#1247)
Browse files Browse the repository at this point in the history
* initial workings for a csr/gm player mode

* weird line removal after merge

* too many changes and refactors, but the code compiles properly; need to push these to the repo and sort out issues with it all later; hopefully, nothing has changed except for the csr stuff

* extensive changes to mode logic for refactoring and functionality improvements, especially for accommodating csr spectator mode

* csr's may now see players who are spectating, including csr's who are spectating, including a wide variety of their behavior such as location, weapon management, etc.; removes zoning cancel messages as a required log from certain use item actions

* corrected various issues identified in the comments of PR#1247

* restored killed->autorevive functionality; removed last traces of old door code from general operations

* knife stab corrected; spitfire turret corrected; blockmap interactivity using zone interaction allowance flag; visibility during resurgence code for csr; removing messages and experience gain for interactions with csr

* pruning imports and correcting the default spectator setting

* separated router/telepad activity from other vehicular activity, previously all considered a form of mounting/dismounting, and restored support experience rewards

* can not activate or deactive spectator of gm when dead; zoning while spectator removes spectator and defaults to sanctuary

* field turrets are neutral-neutral when constructed by a csr; custom bang command 'setempire' will adjust the faction affiliation of a variety of game objects

* fixed facility occupation recognition

* when transitioning between player modes, do not parse new messages about transitioning between player modes, until fully transitioned between player modes
  • Loading branch information
Fate-JH authored Dec 2, 2024
1 parent 360c326 commit 58238df
Show file tree
Hide file tree
Showing 63 changed files with 6,835 additions and 3,951 deletions.
10 changes: 8 additions & 2 deletions src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ world {

# How the server is displayed in the server browser.
# One of: released beta development
server-type = released
server-type = development
}

# Admin API configuration
Expand Down Expand Up @@ -408,8 +408,14 @@ game {
base = 25
}
{
name = "router"
name = "router-driver"
base = 15
shots-multiplier = 1.0
}
{
name = "telepad-use"
base = 20
shots-multiplier = 1.0
}
{
name = "hotdrop"
Expand Down
11 changes: 8 additions & 3 deletions src/main/scala/net/psforever/actors/session/AvatarActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,11 @@ class AvatarActor(
var supportExperienceTimer: Cancellable = Default.Cancellable
var experienceDebt: Long = 0L

private def setSession(newSession: Session): Unit = {
session = Some(newSession)
_avatar = Option(newSession.avatar)
}

def avatar: Avatar = _avatar.get

def avatar_=(avatar: Avatar): Unit = {
Expand All @@ -1156,7 +1161,7 @@ class AvatarActor(
postLoginBehaviour()

case SetSession(newSession) =>
session = Some(newSession)
setSession(newSession)
postLoginBehaviour()

case other =>
Expand All @@ -1176,7 +1181,7 @@ class AvatarActor(
Behaviors
.receiveMessage[Command] {
case SetSession(newSession) =>
session = Some(newSession)
setSession(newSession)
Behaviors.same

case SetLookingForSquad(lfs) =>
Expand Down Expand Up @@ -1329,7 +1334,7 @@ class AvatarActor(
Behaviors
.receiveMessagePartial[Command] {
case SetSession(newSession) =>
session = Some(newSession)
setSession(newSession)
Behaviors.same

case ReplaceAvatar(newAvatar) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class SessionActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], con
if (mode != newMode) {
logic.switchFrom(data.session)
mode = newMode
logic = mode.setup(data)
logic = newMode.setup(data)
}
logic.switchTo(data.session)
}
Expand Down
Loading

0 comments on commit 58238df

Please sign in to comment.