From a25cadd79397ae17dc66d954a2482bf71cc6ecc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 12 Mar 2019 11:08:15 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/vm/value.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'server/src') diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index 453c0799..fe727caf 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -285,4 +285,18 @@ function mt:getLiteral() return self._literal end +function mt:set(name, v) + if not self._flag then + self._flag = {} + end + self._flag[name] = v +end + +function mt:get(name) + if not self._flag then + return nil + end + return self._flag[name] +end + return create -- cgit v1.2.3