24 [
Serialize(1.0f,
IsPropertySaveable.Yes, description:
"Value to set as the multiplier, or to multiply, min or max the current multiplier with.")]
27 [
Serialize(
OperationType.Set,
IsPropertySaveable.Yes, description:
"Do you want to set the value as the multiplier, multiply the existing multiplier with it, or take the smaller or larger of the values.")]
35 private bool isFinished =
false;
46 public override void Update(
float deltaTime)
48 if (isFinished) {
return; }
51 float newMultiplier = GetCurrentMultiplier(campaign.Map.CurrentLocation);
62 newMultiplier = Math.Min(
Multiplier, campaign.Map.CurrentLocation.PriceMultiplier);
65 newMultiplier = Math.Max(
Multiplier, campaign.Map.CurrentLocation.PriceMultiplier);
68 throw new NotImplementedException();
71 SetCurrentMultiplier(campaign.Map.CurrentLocation, newMultiplier);
76 private float GetCurrentMultiplier(
Location location)
82 _ =>
throw new NotImplementedException()
86 private void SetCurrentMultiplier(Location location,
float value)
91 location.PriceMultiplier = value;
94 location.MechanicalPriceMultiplier = value;
97 throw new NotImplementedException();
103 return $
"{ToolBox.GetDebugSymbol(isFinished)} {nameof(SetPriceMultiplierAction)} -> (Multiplier: {Multiplier.ColorizeObject()}, " +
104 $
"Operation: {Operation.ColorizeObject()}, Target: {TargetMultiplier})";
static GameSession?? GameSession
float MechanicalPriceMultiplier
Adjusts the price multiplier for stores or mechanical repairs in the current location.
PriceMultiplierType TargetMultiplier
override void Update(float deltaTime)
override bool IsFinished(ref string goTo)
Has the action finished.
override string ToDebugString()
Rich test to display in debugdraw
SetPriceMultiplierAction(ScriptedEvent parentEvent, ContentXElement element)