Fix stupid idiot things

This commit is contained in:
RaidMax 2021-05-15 09:20:49 -05:00
parent 1595c1fa99
commit 9488f754d4
2 changed files with 13 additions and 11 deletions

View File

@ -41,7 +41,7 @@ namespace IW4MAdmin.Application.Misc
if (value is object[] array && array.All(item => item is double d && AsInteger(d) != null))
{
castValue = array.Select(item => (int) item).ToArray();
castValue = array.Select(item => AsInteger((double)item)).ToArray();
}
if (!_config.ContainsKey(_pluginName))

View File

@ -60,22 +60,24 @@ let plugin = {
"pong",
"hello"
];
this.configHandler = _configHandler;
_configHandler.SetValue("SampleIntegerValue", 123);
_configHandler.SetValue("SampleStringValue", this.author);
_configHandler.SetValue("SampleFloatValue", this.version);
_configHandler.SetValue("SampleNumericalArray", intArray);
_configHandler.SetValue("SampleStringArray", stringArray);
this.configHandler.SetValue("SampleIntegerValue", 123);
this.configHandler.SetValue("SampleStringValue", this.author);
this.configHandler.SetValue("SampleFloatValue", this.version);
this.configHandler.SetValue("SampleNumericalArray", intArray);
this.configHandler.SetValue("SampleStringArray", stringArray);
this.logger.WriteDebug(_configHandler.GetValue("SampleIntegerValue"));
this.logger.WriteDebug(_configHandler.GetValue("SampleStringValue"));
this.logger.WriteDebug(_configHandler.GetValue("SampleFloatValue"));
this.logger.WriteDebug(this.configHandler.GetValue("SampleIntegerValue"));
this.logger.WriteDebug(this.configHandler.GetValue("SampleStringValue"));
this.logger.WriteDebug(this.configHandler.GetValue("SampleFloatValue"));
_configHandler.GetValue("SampleNumericalArray").forEach((element) => {
this.configHandler.GetValue("SampleNumericalArray").forEach((element) => {
this.logger.WriteDebug(element);
});
_configHandler.GetValue("SampleStringArray").forEach((element) => {
this.configHandler.GetValue("SampleStringArray").forEach((element) => {
this.logger.WriteDebug(element);
});
},