diff --git a/src/utility/dictionary.cpp b/src/utility/dictionary.cpp index 59db6ec08..e951439ec 100644 --- a/src/utility/dictionary.cpp +++ b/src/utility/dictionary.cpp @@ -68,3 +68,16 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Dictionary, FromString, DictFromString) PARAM_STRING(string); ACTION_RETURN_POINTER(DictFromString(string)); } + +static void DictRemove(Dictionary *dict, const FString &key) +{ + dict->Remove(key); +} + +DEFINE_ACTION_FUNCTION_NATIVE(_Dictionary, Remove, DictRemove) +{ + PARAM_SELF_STRUCT_PROLOGUE(Dictionary); + PARAM_STRING(key); + DictRemove(self, key); + return 0; +} diff --git a/wadsrc/static/zscript/dictionary.zs b/wadsrc/static/zscript/dictionary.zs index 10f9cb20c..f802a2fae 100644 --- a/wadsrc/static/zscript/dictionary.zs +++ b/wadsrc/static/zscript/dictionary.zs @@ -4,6 +4,7 @@ struct Dictionary native native static Dictionary FromString(String s); native void Insert(String key, String value); + native void Remove(String key); native String At(String key) const; native String ToString() const;