Skip to content
Snippets Groups Projects
Commit 90ef1f3c authored by dg's avatar dg
Browse files

nothing to see, move along

git-svn-id: http://svn.net-core.org/repos/t-engine4@5797 51575b47-30f0-44d4-a5cc-537603b46e54
parent f811e298
No related branches found
No related tags found
No related merge requests found
......@@ -749,6 +749,37 @@ function _M:entityVaultPoke(module, kind, name, desc, data)
print("[ONLINE PROFILE] poke entity vault", module, kind, name)
end
function _M:entityVaultPeek(module, kind, id)
if not id then return end
if not self.auth then return end
core.profile.pushOrder(table.serialize{o="EntityPeek",
module=module,
kind=kind,
id=id,
})
print("[ONLINE PROFILE] peek entity vault", module, kind, id)
end
function _M:entityVaultEmpty(module, kind, id)
if not id then return end
if not self.auth then return end
core.profile.pushOrder(table.serialize{o="EntityEmpty",
module=module,
kind=kind,
id=id,
})
print("[ONLINE PROFILE] empty entity vault", module, kind, id)
end
function _M:entityVaultInfos(module, kind)
if not self.auth then return end
core.profile.pushOrder(table.serialize{o="EntityInfos",
module=module,
kind=kind,
})
print("[ONLINE PROFILE] list entity vault", module, kind)
end
function _M:isDonator(s)
s = s or 1
if not self.auth or not tonumber(self.auth.donated) or tonumber(self.auth.donated) <= s then return false else return true end
......
......@@ -1523,6 +1523,7 @@ do return end
self.tooltip.container.focused = self.tooltip.locked
game.log("Tooltip %s", self.tooltip.locked and "locked" or "unlocked")
end
local menu
local l = {
"resume",
"achievements",
......@@ -1541,7 +1542,8 @@ do return end
}
local adds = self.uiset:getMainMenuItems()
for i = #adds, 1, -1 do table.insert(l, 10, adds[i]) end
local menu menu = require("engine.dialogs.GameMenu").new(l)
self:triggerHook{"Game:alterGameMenu", menu=l, unregister=function() self:unregisterDialog(menu) end}
menu = require("engine.dialogs.GameMenu").new(l)
self:registerDialog(menu)
end,
......
......@@ -463,12 +463,13 @@ end
function _M:orderEntityInfos(o)
self:command("EVLT", "INFO", o.module, o.kind)
if not self:read("200") then return end
self.sock:send(o.data)
if self:read("200") then
local _, _, size = self.last_line:find("^([0-9]+)")
size = tonumber(size)
if not size or size < 1 then return end
if not size or size < 1 then
cprofile.pushEvent(string.format("e='EntityInfos' module=%q kind=%q data='list={} max=0'", o.module, o.kind))
return
end
local body = self:receive(size)
cprofile.pushEvent(string.format("e='EntityInfos' module=%q kind=%q data=%q", o.module, o.kind, body))
else
......@@ -485,16 +486,20 @@ function _M:orderEntityPoke(o)
cprofile.pushEvent("e='EntityPoke' ok=true")
end
function _M:orderEntityEmpty(o)
self:command("EVLT", "EMPTY", o.module, o.kind, o.id)
end
function _M:orderEntityPeek(o)
self:command("EVLT", "PEEK", o.id_profile, o.uuid, o.module)
self:command("EVLT", "PEEK", o.module, o.kind, o.id)
if self:read("200") then
local _, _, size = self.last_line:find("^([0-9]+)")
size = tonumber(size)
if not size or size < 1 then return end
if not size or size < 1 then cprofile.pushEvent("e='EntityPeek' ok=false") return end
local body = self:receive(size)
cprofile.pushEvent(string.format("e='EntityPeek' id_profile=%q uuid=%q data=%q", o.id_profile, o.uuid, body))
cprofile.pushEvent(string.format("e='EntityPeek' ok=true id=%d data=%q", o.id, body))
else
cprofile.pushEvent(string.format("e='EntityPeek' id_profile=%q uuid=%q unknown=true", o.id_profile, o.uuid))
cprofile.pushEvent("e='EntityPeek' ok=false")
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment