1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
|
local ReceiverBase = require("core:erm.ReceiverBase")
local Metatype = require ("core:Metatype")
local EntitiesChanged = require("netpacks.EntitiesChanged")
local SERVICES = SERVICES
local creatures = SERVICES:creatures()
local SERVER = SERVER
local function sendChanges(metatype, index, data)
local pack = EntitiesChanged.new()
pack:update(metatype, index, data)
SERVER:commitPackage(pack)
end
local UN = ReceiverBase:new()
function UN:new(ERM)
return ReceiverBase.new(self,{ERM=ERM})
end
function UN:A(x, artifactIndex, ...)
error ("UN:A is not implemented")
end
--[[
WoG chests
]]
function UN:B(x, ...)
error ("UN:B is not implemented")
end
--[[
May be reuse for smth
]]
function UN:C(x, ...)
error ("UN:C is not supported")
end
-- make water passable
function UN:D(x, ...)
error ("UN:D is not implemented")
end
-- check tile empty
function UN:E(x, ...)
error ("UN:E is not implemented")
end
-- Fire
function UN:F(x, ...)
error ("UN:F is not supported")
end
UN:p1Dispatcher("G")
-- Secondary skill texts
function UN:G0(x, ...)
error ("UN:G0 is not implemented")
end
function UN:G1(x, creatureIndex, N, v)
return nil, nil, (self["G1"..tostring(N)](self, x, creatureIndex, v))
end
function UN:G10(x, creatureIndex, v)
if v == nil then
return creatures:getByIndex(creatureIndex):getSingularName()
else
v = self.ERM:getZVar(v)
local packData = {config = {name={singular=v}}}
sendChanges(Metatype.CREATURE, creatureIndex, packData)
end
end
function UN:G11(x, creatureIndex, v)
if v == nil then
return creatures:getByIndex(creatureIndex):getPluralName()
else
v = self.ERM:getZVar(v)
local packData = {config = {name={plural=v}}}
sendChanges(Metatype.CREATURE, creatureIndex, packData)
end
end
--[[
creature ability description, there is a field abilityText, but it`s not used anywhere
]]
function UN:G12(x, creatureIndex, v)
error ("UN:G1/*/2/* is not supported")
end
-- hero specialty texts
function UN:G2(x, ...)
error ("UN:G2 is not implemented")
end
-- Set Fog of war (for all but playerIndex)
function UN:H(x, tx, ty, tl, playerIndex, radius)
error ("UN:H is not supported")
end
-- Put new oblect
function UN:I(x, tx, ty, tl, typ, subtype, ...)
error ("UN:I is not supported")
end
UN:p1Dispatcher("J")
-- allowed spells
function UN:J0(x, ...)
error ("UN:J0 is not implemented")
end
-- level XP limits
function UN:J1(x, ...)
error ("UN:J1 is not implemented")
end
-- difficulty
function UN:J2(x, ...)
error ("UN:J2 is not implemented")
end
-- WoG settings file
function UN:J3(x, ...)
error ("UN:J3 is not supported")
end
-- AI think radius
function UN:J4(x, ...)
error ("UN:J4 is not supported")
end
-- Enable autosave
function UN:J5(x, ...)
error ("UN:J5 is not implemented")
end
-- generate random artifact
function UN:J6(x, ...)
error ("UN:J6 is not implemented")
end
-- artifact trader
function UN:J7(x, slot, artifactIndex)
error ("UN:J7 is not implemented")
end
-- check file exists
function UN:J8(x, ...)
error ("UN:J8 is not implemented")
end
-- game paths
function UN:J9(x, ...)
error ("UN:J9 is not supported")
end
-- dump ERM variables
function UN:J10(x, ...)
error ("UN:J10 is not implemented")
end
function UN:J11(x, ...)
error ("UN:J11 is not supported")
end
--new week params
function UN:K(x, ...)
error ("UN:K is not implemented")
end
-- set view point/check obelisk
function UN:L(x, ...)
error ("UN:L is not implemented")
end
--new month params
function UN:M(x, ...)
error ("UN:M is not implemented")
end
UN:p1Dispatcher("N")
-- artifact name
function UN:N0(x, z, ...)
error ("UN:N0 is not implemented")
end
-- spell name
function UN:N1(x, z, index)
error ("UN:N1 is not implemented")
end
--building name
function UN:N2(x, z, townIndex, index)
error ("UN:N2 is not implemented")
end
--monster name
function UN:N3(x, z, index)
error ("UN:N3 is not implemented")
end
--sec skill name
function UN:N4(x, z, index)
error ("UN:N4 is not implemented")
end
function UN:N5(x, ...)
error ("UN:N5 is not supported")
end
function UN:N6(x, ...)
error ("UN:N6 is not supported")
end
--remove object
function UN:O(x, tx, ty, tl)
error ("UN:O is not implemented")
end
-- WoG options
function UN:P(x, ...)
error ("UN:P is not implemented")
end
-- end game for current player
function UN:Q(x, ...)
error ("UN:Q is not implemented")
end
function UN:R(x, ...)
error ("UN:R is not supported")
end
-- Remove Fog of war for all playerIndex)
function UN:H(x, tx, ty, tl, playerIndex, radius)
error ("UN:H is not supported")
end
--set available creatures
function UN:T(x, town, level, dwellingSlot, creature)
error ("UN:T is not implemented")
end
-- count objects, get coordinates
function UN:U(x, ...)
error ("UN:U is not implemented")
end
-- version info
function UN:V(x, ...)
error ("UN:V is not implemented")
end
-- make water passable
function UN:W(x, ...)
error ("UN:W is not implemented")
end
-- map size
function UN:X(x, ...)
error ("UN:X is not implemented")
end
return UN
|