mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-08 09:41:07 +00:00
31 lines
750 B
C#
31 lines
750 B
C#
using QSB.Messaging;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.Player.Messages
|
|
{
|
|
internal class LaunchCodesMessage : QSBMessage
|
|
{
|
|
public override bool ShouldReceive => WorldObjectManager.AllObjectsReady;
|
|
|
|
public override void OnReceiveRemote()
|
|
{
|
|
var flag = false;
|
|
if (!PlayerData._currentGameSave.PersistentConditionExists("LAUNCH_CODES_GIVEN"))
|
|
{
|
|
flag = true;
|
|
}
|
|
else if (!PlayerData._currentGameSave.GetPersistentCondition("LAUNCH_CODES_GIVEN"))
|
|
{
|
|
flag = true;
|
|
}
|
|
|
|
if (flag)
|
|
{
|
|
DialogueConditionManager.SharedInstance.SetConditionState("SCIENTIST_3", true);
|
|
PlayerData._currentGameSave.SetPersistentCondition("LAUNCH_CODES_GIVEN", true);
|
|
GlobalMessenger.FireEvent("LearnLaunchCodes");
|
|
}
|
|
}
|
|
}
|
|
}
|