diff options
author | William Miller <william-millennium@hotmail.com> | 2024-10-02 09:36:01 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 14:36:01 +0200 |
commit | 75e95ef7c8f319765e5702e8c178d93f03471e75 (patch) | |
tree | 283966b6a2c6cf6a5d435d2b8e2898c3763bcf4d /Northstar.CustomServers | |
parent | c92707e0966225c827c3ce3383b1b8f72ee3bb96 (diff) | |
download | NorthstarMods-75e95ef7c8f319765e5702e8c178d93f03471e75.tar.gz NorthstarMods-75e95ef7c8f319765e5702e8c178d93f03471e75.zip |
Restore missing faction dialogue for Titan Meter buildup (#876)
Adds faction dialogue saying that Titan is soon ready as well as showing a message when Titan is ready to drop.
Diffstat (limited to 'Northstar.CustomServers')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut index a20e7aa0..21723ab5 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut @@ -91,6 +91,8 @@ void function EarnMeterMP_PlayerLifeThink( entity player ) EarnObject pilotReward = PlayerEarnMeter_GetReward( player ) float pilotRewardFrac = PlayerEarnMeter_GetRewardFrac( player ) int lastEarnMeterMode = PlayerEarnMeter_GetMode( player ) + bool saidTitanSoon = false + bool titanReadyMsg = false float lastPassiveGainTime = Time() OnThreadEnd( @@ -148,8 +150,22 @@ void function EarnMeterMP_PlayerLifeThink( entity player ) if ( lastEarnMeterMode == eEarnMeterMode.DEFAULT ) { + if ( Riff_TitanAvailability() != eTitanAvailability.Never ) + { + if ( PlayerEarnMeter_GetOwnedFrac( player ) >= 0.75 && PlayerEarnMeter_GetOwnedFrac( player ) < 0.95 && !saidTitanSoon ) + { + PlayFactionDialogueToPlayer( "mp_titanSoon", player ) + saidTitanSoon = true + } + else if( PlayerEarnMeter_GetOwnedFrac( player ) < 0.75 ) + saidTitanSoon = false + } + if ( PlayerEarnMeter_GetOwnedFrac( player ) < 1.0 ) + { PlayerEarnMeter_DisableGoal( player ) + titanReadyMsg = false + } else if ( player.GetPlayerNetInt( "goalState" ) != eRewardState.UNAVAILABLE ) { // if goal is enabled then the client will show "titan ready" alerts even if it isn't @@ -157,6 +173,11 @@ void function EarnMeterMP_PlayerLifeThink( entity player ) // so unfortunately we have to do this manually player.SetPlayerNetInt( "goalState", eRewardState.AVAILABLE ) PlayerEarnMeter_RefreshGoal( player ) + if( !titanReadyMsg ) + { + Remote_CallFunction_NonReplay( player, "ServerCallback_TitanReadyMessage" ) + titanReadyMsg = true + } } if ( Time() - lastPassiveGainTime > 4.0 && file.passiveMeterGainEnabled ) // this might be 5.0 |