Open CWolfs opened 6 years ago
Describe the problem
The conversation action method AddBattleTechFloat in BattleTech.cs actually adds an int instead of a float. This means the method is broken.
AddBattleTechFloat
BattleTech.cs
int
float
Provide an example of the code where the problem occurs
Any conversation that will use the action AddBattleTechFloat would not work correctly. The float would be truncated to an int.
Provide an example of your proposed solution
In the AddBattleTechFloat method the following lines should be changed.
float num2 = (float)env.ToInt(inputs[2]);
should be
float num2 = env.ToFloat(inputs[2]);
and
statCollection.ModifyStat<float>("Conversation.Event", 0, statName, StatCollection.StatOperation.Int_Add, num2, -1, true);
statCollection.ModifyStat<float>("Conversation.Event", 0, statName, StatCollection.StatOperation.Float_Add, num2, -1, true);
Describe the problem
The conversation action method
AddBattleTechFloat
inBattleTech.cs
actually adds anint
instead of afloat
. This means the method is broken.Provide an example of the code where the problem occurs
Any conversation that will use the action
AddBattleTechFloat
would not work correctly. The float would be truncated to an int.Provide an example of your proposed solution
In the
AddBattleTechFloat
method the following lines should be changed.float num2 = (float)env.ToInt(inputs[2]);
should be
float num2 = env.ToFloat(inputs[2]);
and
statCollection.ModifyStat<float>("Conversation.Event", 0, statName, StatCollection.StatOperation.Int_Add, num2, -1, true);
should be
statCollection.ModifyStat<float>("Conversation.Event", 0, statName, StatCollection.StatOperation.Float_Add, num2, -1, true);