Skip to content

Class: QuestManager ​

csharp
public class QuestManager : NetworkedManagerBase<QuestManager>, ILogicUpdate

Fields ​

NameDeclarationDescription
activeQuests`[NonSerialized]
public List<DewQuest> activeQuests`
ClientEvent_OnArtifactAppraisedpublic SafeAction&lt;string, bool&gt; ClientEvent_OnArtifactAppraisedCalled everywhere when an artifact is appraised.Second boolean parameter denotes whether the artifact is new and now unlocked.
ClientEvent_OnArtifactPickedUppublic SafeAction&lt;string, DewPlayer, Vector3&gt; ClientEvent_OnArtifactPickedUpCalled everywhere when an artifact is picked up. Parameters denote: artifact type, player, artifact world position
ClientEvent_OnArtifactRemovedpublic SafeAction&lt;string&gt; ClientEvent_OnArtifactRemoved
ClientEvent_OnQuestAddedpublic SafeAction&lt;DewQuest&gt; ClientEvent_OnQuestAdded
ClientEvent_OnQuestRemovedpublic SafeAction&lt;DewQuest&gt; ClientEvent_OnQuestRemoved
didCollectArtifactThisLoop`[NonSerialized]
[SaveVar(SaveVarFlags.Default)]
public bool didCollectArtifactThisLoop`Available on server.
undiscoveredArtifacts`[SaveVar(SaveVarFlags.Default)]
[NonSerialized]
public List<string> undiscoveredArtifacts`Available on server. List of artifacts that are not discovered by any clients.

Properties ​

NameDeclarationDescription
artifactPoolpublic Type[] artifactPool { get; }
currentArtifact`[SaveVar(SaveVarFlags.Default)]
public string currentArtifact { get; }`

Methods ​

DiscoverArtifactAndShowStory(string) ​

Discover an artifact and show the story to everyone.

csharp
public void DiscoverArtifactAndShowStory(string artifact)

Parameters:

NameTypeDescription
artifactstring

HasQuest(Type) ​

csharp
public bool HasQuest(Type type)

Parameters:

NameTypeDescription
typeSystem.Type

Returns: bool

HasQuest&lt;T&gt;() ​

csharp
public bool HasQuest<T>() where T : DewQuest

Parameters:

NameTypeDescription
``T

Returns: bool

OnStartClient() ​

csharp
public override void OnStartClient()

OnStartServer() ​

csharp
public override void OnStartServer()

PickUpArtifact(string, DewPlayer, Vector3) ​

csharp
public void PickUpArtifact(string artifactName, DewPlayer player, Vector3 worldPos)

Parameters:

NameTypeDescription
artifactNamestring
playerDewPlayer
worldPosUnityEngine.Vector3

RemoveArtifact() ​

csharp
public void RemoveArtifact()

StartQuest&lt;T&gt;(T, Action&lt;T&gt;) ​

csharp
public T StartQuest<T>(T prefab, Action<T> beforePrepare = null) where T : DewQuest

Parameters:

NameTypeDescription
prefabT
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

StartQuest&lt;T&gt;(Action&lt;T&gt;) ​

csharp
public T StartQuest<T>(Action<T> beforePrepare = null) where T : DewQuest

Parameters:

NameTypeDescription
beforePrepareSystem.Action&lt;T&gt;&lt;T&gt;
``T

Returns: T

TryGetQuest(Type, out DewQuest) ​

csharp
public bool TryGetQuest(Type type, out DewQuest quest)

Parameters:

NameTypeDescription
typeSystem.Type
questDewQuest

Returns: bool

TryGetQuest&lt;T&gt;(out T) ​

csharp
public bool TryGetQuest<T>(out T quest) where T : DewQuest

Parameters:

NameTypeDescription
questT
``T

Returns: bool

Maintained by the Shape of Dreams Modding Community