Charakterbewegungen hinzugefügt, Deko hinzugefügt, Kochrezepte angepasst
This commit is contained in:
parent
95945c0306
commit
a0c893ca0b
1124 changed files with 64294 additions and 763 deletions
43
mods/futil/util/predicates.lua
Normal file
43
mods/futil/util/predicates.lua
Normal file
|
@ -0,0 +1,43 @@
|
|||
function futil.is_nil(v)
|
||||
return v == nil
|
||||
end
|
||||
|
||||
function futil.is_boolean(v)
|
||||
return v == true or v == false
|
||||
end
|
||||
|
||||
function futil.is_number(v)
|
||||
return type(v) == "number"
|
||||
end
|
||||
|
||||
function futil.is_positive(v)
|
||||
return v > 0
|
||||
end
|
||||
|
||||
function futil.is_integer(v)
|
||||
return v % 1 == 0
|
||||
end
|
||||
|
||||
function futil.is_positive_integer(v)
|
||||
return type(v) == "number" and v > 0 and v % 1 == 0
|
||||
end
|
||||
|
||||
function futil.is_string(v)
|
||||
return type(v) == "string"
|
||||
end
|
||||
|
||||
function futil.is_userdata(v)
|
||||
return type(v) == "userdata"
|
||||
end
|
||||
|
||||
function futil.is_function(v)
|
||||
return type(v) == "function"
|
||||
end
|
||||
|
||||
function futil.is_thread(v)
|
||||
return type(v) == "thread"
|
||||
end
|
||||
|
||||
function futil.is_table(v)
|
||||
return type(v) == "table"
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue