Class Proposal
Class containing all the information for a single in-game proposal.
Inheritance
Inherited Members
Namespace: GDA
Assembly: Assembly-CSharp.dll
Syntax
[CreateAssetMenu(menuName = "ScriptableObjects/Proposal")]
public class Proposal : ScriptableObject
Fields
newsA
(Optional) News "generated" when the proposal is accepted.
Declaration
public NewsItem newsA
Field Value
Type | Description |
---|---|
NewsItem |
newsB
(Optional) News "generated" when the proposal is rejected.
Declaration
public NewsItem newsB
Field Value
Type | Description |
---|---|
NewsItem |
productA
The proposed product to accept/reject.
Declaration
public Product productA
Field Value
Type | Description |
---|---|
Product |
productB
The existing product to compare productBto.
Declaration
public Product productB
Field Value
Type | Description |
---|---|
Product |
proposer
The proposer that will be presenting the proposal.
Declaration
public ProposerInfo proposer
Field Value
Type | Description |
---|---|
ProposerInfo |
stateChangeA
(Optional) Predefined effects on the GameState when the proposal is accepted.
Declaration
public GameStateChange stateChangeA
Field Value
Type | Description |
---|---|
GameStateChange |
stateChangeB
(Optional) Predefined effects on the GameState when the proposal is rejected.
Declaration
public GameStateChange stateChangeB
Field Value
Type | Description |
---|---|
GameStateChange |
userGroup
The UserGroup associated with the proposal.
Declaration
public UserGroup userGroup
Field Value
Type | Description |
---|---|
UserGroup |
Properties
chosenProduct
The "chosen" product of the proposal.
Returns productA if the proposal is accepted,
and productB if the proposal is rejected.
Returns null
if proposal is undecided.
Declaration
public Product chosenProduct { get; }
Property Value
Type | Description |
---|---|
Product |
ChosenQty
The quantity of the chosenProduct needed to fulfill the needs of the userGroup. returns -1 if the proposal has not been decided on yet.
Declaration
public int ChosenQty { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
decision
The decision status of the proposal. Usually undecided (Nill) until player makes a decision.
Declaration
public Proposal.DecisionState decision { get; }
Property Value
Type | Description |
---|---|
Proposal.DecisionState |
newsArticle
The news "generated" by the decision of the proposal.
Returns newsA if the proposal is accepted,
and newsB if the proposal is rejected.
Returns null
if proposal is undecided.
Note that: newsA and newsB may be null themselves.
Declaration
public NewsItem newsArticle { get; }
Property Value
Type | Description |
---|---|
NewsItem |
proposerBehaviour
The behevaiour that the proposer will exhibit.
Declaration
public TypeReference proposerBehaviour { get; }
Property Value
Type | Description |
---|---|
TypeReferences.TypeReference |
QtyA
Declaration
public int QtyA { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
QtyB
Declaration
public int QtyB { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
rejectedProduct
The "rejected" product of the proposal.
Returns productB if the proposal is accepted,
and productA if the proposal is rejected.
Returns null
if proposal is undecided.
Declaration
public Product rejectedProduct { get; }
Property Value
Type | Description |
---|---|
Product |
RejectedQty
The quantity of the rejectedProduct needed to fulfill the needs of the userGroup. returns -1 if the proposal has not been decided on yet.
Declaration
public int RejectedQty { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
scriptedConversations
Scripted Conversations specific to the proposal.
Declaration
public ReadOnlyDictionary<string, Conversation> scriptedConversations { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyDictionary<System.String, Conversation> |
Methods
GenerateProposal(ProductGenerator, ProductGenerator, UserArchetype, UserArchetype.SizeMagnitude, ProposerInfo)
Generates a new proposal containing two products of different families of the same type. E.g. (surgical mask vs cloth mask)
Declaration
public static Proposal GenerateProposal(ProductGenerator productFamilyA, ProductGenerator productFamilyB, UserArchetype userArchetype, UserArchetype.SizeMagnitude sizeMagnitude, ProposerInfo proposer)
Parameters
Type | Name | Description |
---|---|---|
ProductGenerator | productFamilyA | They type of product to be proposed |
ProductGenerator | productFamilyB | They type of product to be compared to (the existing product) |
UserArchetype | userArchetype | The type of usergroup to generate |
UserArchetype.SizeMagnitude | sizeMagnitude | The magnitude of the usergroup size |
ProposerInfo | proposer | The proposer presenting the proposal |
Returns
Type | Description |
---|---|
Proposal |
GenerateProposal(ProductGenerator, UserArchetype, UserArchetype.SizeMagnitude, ProposerInfo)
Generates a new proposal containing two products of the same family and type.
Declaration
public static Proposal GenerateProposal(ProductGenerator productFamily, UserArchetype userArchetype, UserArchetype.SizeMagnitude sizeMagnitude, ProposerInfo proposer)
Parameters
Type | Name | Description |
---|---|---|
ProductGenerator | productFamily | They type of product to generate |
UserArchetype | userArchetype | The type of user group to generate |
UserArchetype.SizeMagnitude | sizeMagnitude | The magnitude of the usergroup size |
ProposerInfo | proposer | The proposer presenting the proposal |
Returns
Type | Description |
---|---|
Proposal |
GetCostOfApproval()
Calculates the funds required to approve the proposal.
Declaration
public float GetCostOfApproval()
Returns
Type | Description |
---|---|
System.Single |
GetCostOfOrder(Product)
Cost of single product in the proposal. Normally not used alone, but used to compare two products.
Declaration
public float GetCostOfOrder(Product product)
Parameters
Type | Name | Description |
---|---|---|
Product | product |
Returns
Type | Description |
---|---|
System.Single |
MakeDecision(Boolean)
Changes the decision status of the proposal to accepted/rejected.
Declaration
public void MakeDecision(bool chooseA)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | chooseA |
|
ResetDecision()
Sets the decision status of the proposal back to Nill/undecided.
Declaration
public void ResetDecision()