From 83bafbe08b508266d31a6a76f1ffc2cddc662390 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sat, 8 Feb 2014 17:50:26 -0500 Subject: Make flag strings clear specified flag with 'no' prefix Remove flagmask field from set_mapgen_params table Add small bits of needed documentation --- src/script/common/c_content.cpp | 11 +++++------ src/script/common/c_content.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/script/common') diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 0d1f7aa03..d1e182f9f 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -839,12 +839,11 @@ void push_hit_params(lua_State *L,const HitParams ¶ms) } /******************************************************************************/ -u32 getflagsfield(lua_State *L, int table, - const char *fieldname, FlagDesc *flagdesc) { - std::string flagstring; - - flagstring = getstringfield_default(L, table, fieldname, ""); - return readFlagString(flagstring, flagdesc); +u32 getflagsfield(lua_State *L, int table, const char *fieldname, + FlagDesc *flagdesc, u32 *flagmask) +{ + std::string flagstring = getstringfield_default(L, table, fieldname, ""); + return readFlagString(flagstring, flagdesc, flagmask); } /******************************************************************************/ diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h index 163e803db..a89de1aad 100644 --- a/src/script/common/c_content.h +++ b/src/script/common/c_content.h @@ -121,7 +121,7 @@ int getenumfield (lua_State *L, u32 getflagsfield (lua_State *L, int table, const char *fieldname, - FlagDesc *flagdesc); + FlagDesc *flagdesc, u32 *flagmask); void push_items (lua_State *L, const std::vector &items); -- cgit v1.2.3