mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
Support Nullable<> as ConCmd argument (#3515)
Co-authored-by: 766974616c79 <100430077+766974616c79@users.noreply.github.com>
This commit is contained in:
@@ -614,6 +614,7 @@ public static partial class SandboxSystemExtensions
|
||||
{
|
||||
Value = null;
|
||||
|
||||
t = Nullable.GetUnderlyingType( t ) ?? t;
|
||||
if ( t == typeof( decimal ) ) { Value = str.ToDecimal(); return true; }
|
||||
if ( t == typeof( float ) ) { Value = str.ToFloat(); return true; }
|
||||
if ( t == typeof( double ) ) { Value = (double)str.ToFloat(); return true; }
|
||||
|
||||
Reference in New Issue
Block a user