lua/wrappers/game/lua_door.cpp
/**
	 * @static
	 * Creates or wraps a door instance.
	 *
	 * @param string [""] game_id The game id to create the door with or the game id
	 *  of an existing door.
	 * @returns am.character The newly created door or returns an existing door
	 *  with the same game_id.
	 * @returns boolean True if the door was newly created or is just wrapped an existing one.
	 */
@static
Creates or wraps a door instance.

@param string [""] game_id The game id to create the door with or the game id
of an existing door.
@returns am.character The newly created door or returns an existing door
with the same game_id.
@returns boolean True if the door was newly created or is just wrapped an existing one.
@static Creates or wraps a door instance . @param string [ " " ] game_id The game id to create the door with or the game id of an existing door . @returns am . character The newly created door or returns an existing door with the same game_id . @returns boolean True if the door was newly created or is just wrapped an existing one .
int Door_ctor(lua_State *lua)
	{
		int args = lua_gettop(lua);
		if (args >= 1 && !lua_isstr(lua, 1))
		{
			return LuaState::expectedArgs(lua, "@new", 2, "", "string id");
		}
		if (args == 0)
		{
			Door *door = new Door();
			wrapRefObject<Door>(lua, door);
			lua_pushboolean(lua, true);
			return 2;
		}
		bool newDoor = false;
		const char *id = lua_tostring(lua, 1);
		base::Handle<Door> door(dynamic_cast<Door *>(Engine::getEngine()->getGameObject(id)));
		if (!door)
		{
			newDoor = true;
			door = new Door();
			door->setGameId(id);
		}
		wrapRefObject<Door>(lua, door);
		lua_pushboolean(lua, newDoor);
		return 2;
	}
int Door_ctor ( lua_State * lua ) { int args = lua_gettop ( lua ) ; if ( args >= 1 && ! lua_isstr ( lua , 1 ) ) { return LuaState :: expectedArgs ( lua , " " , 2 , " " , " " ) ; } if ( args == 0 ) { Door * door = new Door ( ) ; wrapRefObject < Door > ( lua , door ) ; lua_pushboolean ( lua , true ) ; return 2 ; } bool newDoor = false ; const char * id = lua_tostring ( lua , 1 ) ; base :: Handle < Door > door ( dynamic_cast < Door * > ( Engine :: getEngine ( ) -> getGameObject ( id ) ) ) ; if ( ! door ) { newDoor = true ; door = new Door ( ) ; door -> setGameId ( id ) ; } wrapRefObject < Door > ( lua , door ) ; lua_pushboolean ( lua , newDoor ) ; return 2 ; }
@static
 Creates or wraps a door instance.
@static Creates or wraps a door instance .