Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using System.Linq;
- using UnityEngine;
- public enum FactionTrustLevel
- {
- NoContact, // No interaction prompt shown - level isn't high enough
- NoContactIKnowYou, // No interaction prompt shown - level isn't high enough but vouched for
- DontKnowYou, // Can press E, but NPC says "I don't know you" LEVEL is high enough no one vouched
- SkepticalBuyer, // Will reluctantly buy one small item (entry trust)
- ReliableContact,// Will regularly buy (medium trust)
- VouchedFor // Will vouch for you to other factions (high trust)
- }
- [CreateAssetMenu(fileName = "NewFaction", menuName = "Buyer/Faction")]
- public class BuyerFaction : ScriptableObject
- {
- public string factionName;
- public string description;
- //public ReputationRank reputationLevel; // Optional: minimum rep level needed
- public BuyerProfile buyerProfile;
- public FactionTrustLevel currentTrustLevel = FactionTrustLevel.NoContact; // default
- [Header("Trust Progression Settings")]
- public int trustPointsToReliableContact = 30; // Points needed to upgrade SkepticalBuyer → ReliableContact
- public int trustPointsToVouchedFor = 70; // Points needed to upgrade ReliableContact → VouchedFor
- public int vouchesRequiredToReachSkepticalBuyer = 10;
- public int currentVouches = 0;
- public List<BuyerFaction> factionsTheyWillVouchTo;
- [HideInInspector]
- public int currentTrustPoints; // Ongoing trust points earned
- [Header("Sales Tracking")]
- [HideInInspector]
- public int totalGunsPurchased; // How many guns this faction has bought
- // ******************* proposed changes
- private static List<BuyerFaction> allFactions;
- public static List<BuyerFaction> GetAll()
- {
- Init();
- return allFactions;
- }
- private static void Init()
- {
- if (allFactions!=null)
- {
- return;
- }
- allFactions = Resources.LoadAll<BuyerFaction>("BuyerProfiles").ToList();
- }
- // ******************
- }
Advertisement
Add Comment
Please, Sign In to add comment