mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
Amendment from PR review to unwrap optional boolean
This commit is contained in:
parent
0ff24feffc
commit
49225271ba
|
|
@ -208,7 +208,10 @@ class BuildingActor(
|
|||
case AmenityStateChange(terminal: CaptureTerminal, data) =>
|
||||
// Notify amenities that listen for CC hack state changes, e.g. wall turrets to dismount seated players
|
||||
building.Amenities.filter(x => x.isInstanceOf[CaptureTerminalAware]).foreach(amenity => {
|
||||
amenity.Actor ! CaptureTerminalAwareBehavior.TerminalStatusChanged(terminal, data.get.asInstanceOf[Boolean])
|
||||
data match {
|
||||
case Some(isResecured: Boolean) => amenity.Actor ! CaptureTerminalAwareBehavior.TerminalStatusChanged(terminal, isResecured)
|
||||
case _ => log.warn("CaptureTerminal AmenityStateChange was received with no attached data.")
|
||||
}
|
||||
})
|
||||
|
||||
// When a CC is hacked (or resecured) all currently hacked amenities for the base should return to their default unhacked state
|
||||
|
|
|
|||
Loading…
Reference in a new issue