Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
@@ -18,6 +18,7 @@ namespace Barotrauma
|
||||
string FilePath,
|
||||
Option<SerializableDateTime> SaveTime,
|
||||
string SubmarineName,
|
||||
RespawnMode RespawnMode,
|
||||
ImmutableArray<string> EnabledContentPackageNames) : INetSerializableStruct;
|
||||
|
||||
public const int MaxMoney = int.MaxValue / 2; //about 1 billion
|
||||
@@ -33,6 +34,20 @@ namespace Barotrauma
|
||||
|
||||
public enum InteractionType { None, Talk, Examine, Map, Crew, Store, Upgrade, PurchaseSub, MedicalClinic, Cargo }
|
||||
|
||||
/// <summary>
|
||||
/// Should the interaction be disabled if the character's faction is hostile towards the players?
|
||||
/// </summary>
|
||||
public static bool HostileFactionDisablesInteraction(InteractionType interactionType)
|
||||
{
|
||||
return
|
||||
interactionType != InteractionType.None &&
|
||||
//allow interacting with stores, otherwise you could get softlocked
|
||||
//(no way to get enough resources from a hostile outpost to make it to the next one?)
|
||||
interactionType != InteractionType.Store &&
|
||||
//examining is triggered by events, and there may be events that are intended to allow interaction with a hostile NPC.
|
||||
interactionType != InteractionType.Examine;
|
||||
}
|
||||
|
||||
public static bool BlocksInteraction(InteractionType interactionType)
|
||||
{
|
||||
return interactionType != InteractionType.None && interactionType != InteractionType.Cargo;
|
||||
@@ -1099,6 +1114,7 @@ namespace Barotrauma
|
||||
private void NPCInteract(Character npc, Character interactor)
|
||||
{
|
||||
if (!npc.AllowCustomInteract) { return; }
|
||||
if (npc.AIController is HumanAIController humanAi && !humanAi.AllowCampaignInteraction()) { return; }
|
||||
NPCInteractProjSpecific(npc, interactor);
|
||||
string coroutineName = "DoCharacterWait." + (npc?.ID ?? Entity.NullEntityID);
|
||||
if (!CoroutineManager.IsCoroutineRunning(coroutineName))
|
||||
|
||||
@@ -140,13 +140,14 @@ namespace Barotrauma
|
||||
|
||||
private static readonly Dictionary<string, MultiplierSettings> _multiplierSettings = new Dictionary<string, MultiplierSettings>
|
||||
{
|
||||
{ "default", new MultiplierSettings { Min = 0.2f, Max = 2.0f, Step = 0.1f } },
|
||||
{ nameof(CrewVitalityMultiplier), new MultiplierSettings { Min = 0.5f, Max = 2.0f, Step = 0.1f } },
|
||||
{ nameof(NonCrewVitalityMultiplier),new MultiplierSettings { Min = 0.5f, Max = 3.0f, Step = 0.1f } },
|
||||
{ nameof(MissionRewardMultiplier), new MultiplierSettings { Min = 0.5f, Max = 2.0f, Step = 0.1f } },
|
||||
{ nameof(RepairFailMultiplier), new MultiplierSettings { Min = 0.5f, Max = 5.0f, Step = 0.5f } },
|
||||
{ nameof(ShopPriceMultiplier), new MultiplierSettings { Min = 0.1f, Max = 3.0f, Step = 0.1f } },
|
||||
{ nameof(ShipyardPriceMultiplier), new MultiplierSettings { Min = 0.1f, Max = 3.0f, Step = 0.1f } }
|
||||
{ "default", new MultiplierSettings { Min = 0.2f, Max = 2.0f, Step = 0.1f } },
|
||||
{ nameof(CrewVitalityMultiplier), new MultiplierSettings { Min = 0.5f, Max = 2.0f, Step = 0.1f } },
|
||||
{ nameof(NonCrewVitalityMultiplier), new MultiplierSettings { Min = 0.5f, Max = 3.0f, Step = 0.1f } },
|
||||
{ nameof(MissionRewardMultiplier), new MultiplierSettings { Min = 0.5f, Max = 2.0f, Step = 0.1f } },
|
||||
{ nameof(ExperienceRewardMultiplier), new MultiplierSettings { Min = 0.5f, Max = 2.0f, Step = 0.1f } },
|
||||
{ nameof(RepairFailMultiplier), new MultiplierSettings { Min = 0.5f, Max = 5.0f, Step = 0.5f } },
|
||||
{ nameof(ShopPriceMultiplier), new MultiplierSettings { Min = 0.1f, Max = 3.0f, Step = 0.1f } },
|
||||
{ nameof(ShipyardPriceMultiplier), new MultiplierSettings { Min = 0.1f, Max = 3.0f, Step = 0.1f } }
|
||||
// Add overrides for default values here
|
||||
};
|
||||
|
||||
@@ -165,6 +166,9 @@ namespace Barotrauma
|
||||
[Serialize(1.0f, IsPropertySaveable.Yes), NetworkSerialize]
|
||||
public float MissionRewardMultiplier { get; set; }
|
||||
|
||||
[Serialize(1.0f, IsPropertySaveable.Yes), NetworkSerialize]
|
||||
public float ExperienceRewardMultiplier { get; set; }
|
||||
|
||||
[Serialize(1.0f, IsPropertySaveable.Yes), NetworkSerialize]
|
||||
public float ShopPriceMultiplier { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user