content stringlengths 5 1.05M |
|---|
-- enable termguicolors
vim.opt.termguicolors = true
|
-- Assumes that spaceno has a TREE int32 (NUM) or int64 (NUM64) primary key
-- inserts a tuple after getting the next value of the
-- primary key and returns it back to the user
function box.auto_increment(spaceno, ...)
spaceno = tonumber(spaceno)
local max_tuple = box.space[spaceno].index[0].idx:max()
local max = 0
if max_tuple ~= nil then
local fmt = 'i'
if #max_tuple[0] == 8 then fmt = 'l' end
max = box.unpack(fmt, max_tuple[0])
else
-- first time
if box.space[spaceno].index[0].key_field[0].type == "NUM64" then max = tonumber64(max) end
end
return box.insert(spaceno, max + 1, ...)
end
|
-- PLAYER derives from CREATURE
-- this file is basically all controls stuff
local CREATURE = require("classes.entities.CREATURE")
local PLAYER = CREATURE:derive('PLAYER')
local Vector2 = require('lib.Vector2')
function PLAYER:PLAYER_init(arg)
self.hp = arg.hp
self.player_num = self.form.player_num -- sloppy?
self.control_scheme = self.form.control_scheme -- hope not
self.r_trig_up = true
end
function PLAYER:PLAYER_update(dt)
local RSXA, RSYA, r_trig
if self.control_scheme == "Gamepad" then
RSXA = GPM:stick2(self.player_num, true)[1]
RSYA = GPM:stick2(self.player_num, true)[2]
r_trig = GPM:r_trig(self.player_num)
elseif self.control_scheme == "Keyboard" then
-- this aims from the center of the screen
width, height = love.graphics.getDimensions()
RSXA = -((width * 0.5) - Mouse.x)
RSYA = -((height * 0.5) - Mouse.y)
local sum = math.abs(RSXA) + math.abs(RSYA)
if sum ~= 0 then
RSXA = RSXA / sum
RSYA = RSYA / sum
end
-- first mouse button shoots
if Mouse[1] then r_trig = 1 else r_trig = 0 end
else
assert(false, "control scheme not found!")
end
--
if r_trig > 0 then
-- if RSXA ~= 0 or RSYA ~= 0 then
-- self.equipped_gun.RSXA =
-- end
if self.equipped_gun
and self.equipped_gun.cooling == false
and (self.equipped_gun.automatic == true or self.r_trig_up == true)
then
self.equipped_gun:shoot(RSXA ,RSYA, r_trig)
-- i moved the shake into gun
-- i think it should be unique to every gun
if self.control_scheme == "Gamepad" then
GPM:startVibe(0.08, 0.2) -- vibe needs stick number
end
end
self.r_trig_up = false
else
self.r_trig_up = true
end
if (self.control_scheme == "Gamepad" and GPM:button_down(self.player_num, "b"))
or (self.control_scheme == "Keyboard" and Key:key_down('q'))
then
self:switch_guns()
end
if (self.control_scheme == "Gamepad" and GPM:button_down(self.player_num, "x"))
or (self.control_scheme == "Keyboard" and Key:key_down('f'))
then
if self.closest_gun then
self:pick_up_gun()
end
if PROFILING then
print('Position,Function name,Number of calls,Time,Source,')
for k,t in ipairs(love.profiler.query(60)) do
print(table.concat(t, ",")..",")
end
end
end
if GPM:button_down(self.player_num, "rightshoulder") then
end
if GPM:button(self.player_num, "leftshoulder") then
for i = 1, 2 do
-- _G.events:invoke("EF_spawn", "PlantZombie", {x = 100, y = 100})
_G.events:invoke("EF_spawn", "Mom1", {x = 100, y = 100})
-- _G.events:invoke("EF_spawn", "Mom2", {x = 100, y = 100})
local xcoord = math.floor(math.random() * 100)
local ycoord = math.floor(math.random() * 100)
local angle = math.random() * 3.14
-- _G.events:invoke("EF_spawn", "Missile", {x = xcoord, y = ycoord, angle = angle})
end
end
if GPM:button_down(self.player_num, "dpup") then
end
if (GPM:button_down(self.player_num, "y")) then
print("y")
end
local gun_angle = 0
if (RSXA ~= 0 or RSYA ~= 0) and self.equipped_gun ~= nil then
gun_angle = math.atan2(RSYA, RSXA)
self.equipped_gun.Transform.angle = gun_angle
if math.abs(math.deg(gun_angle)) >= 90 and math.abs(math.deg(gun_angle)) <= 180 then
self.equipped_gun.Sprite:flip_v(true)
else
self.equipped_gun.Sprite:flip_v(false)
end
end
local RSXAR = GPM:r_stick_smooth(self.player_num)[1]
local RSYAR = GPM:r_stick_smooth(self.player_num)[2]
local look_range = 26
local initPos = Vector2(self.Transform.x, self.Transform.y)
if RSXAR ~= 0 or RSYAR ~= 0 then
local xcamoffset = RSXAR * look_range
local ycamoffset = RSYAR * look_range
initPos = initPos.add(initPos,Vector2(xcamoffset,ycamoffset))
end
-- if self.player_num == 1 then
Camera:setTargetPos(initPos.x,initPos.y)
-- end
end
PLAYER.UF[#PLAYER.UF + 1] = 'PLAYER_update'
return PLAYER |
-- ======= Copyright (c) 2003-2011, Unknown Worlds Entertainment, Inc. All rights reserved. =======
--
-- lua\TargetCache.lua
--
-- Created by: Mats Olsson (mats.olsson@matsotech.se)
--
-- Allows for fast target selection for AI units such as hydras and sentries.
--
-- Gains most of its speed by using the fact that the majority of potential targets don't move
-- (static) while a minority is mobile.
--
-- Possible targets must implement one of the StaticTargetMixin and MobileTargetMixin. Mobile targets
-- can move freely, but StaticTargetMixins must call self:StaticTargetMoved() whenever they change
-- their location. As its fairly expensive to deal with a static target (all AI shooters in range will
-- trace to its location), it should not be done often (its intended to allow teleportation of
-- structures).
--
-- To speed things up even further, the concept of TargetType is used. Each TargetType maintains a
-- dictionary of created entities that match its own type. This allows for a quick filtering away of
-- uninterresting targets, without having to check their type or team.
--
-- The static targets are kept in a per-attacker cache. Usually, this table is empty, meaning that
-- 90% of all potential targets are ignored at zero cpu cost. The remaining targets are found by
-- using the fast ranged lookup (Shared.GetEntitiesWithinRadius()) and then using the per type list
-- to quickly ignore any non-valid targets, only then checking validity, range and visibility.
--
-- The TargetSelector is the main interface. It is configured, one per attacker, with the targeting
-- requriements (max range, if targets must be visible, what targetTypes, filters and prioritizers).
--
-- The TargetSelector is assumed NOT to move. If it starts moving, it must call selector:AttackerMoved()
-- before its next acquire target, in order to invalidate all cached targeting information.
--
-- Once configured, new targets may be acquired using AcquireTarget or AcquireTargets, and the validity
-- of a current target can be check by ValidateTarget().
--
-- Filters are used to reject targets that are not to valid.
--
-- Prioritizers are used to prioritize among targets. The default prioritizer chooses targets that
-- can damage the attacker before other targets.
--
Script.Load("lua/StaticTargetMixin.lua")
Script.Load("lua/MobileTargetMixin.lua")
--
-- TargetFilters are used to remove targets before presenting them to the prioritizers
--
--
-- Removes targets that are not inside the maxPitch
--
function PitchTargetFilter(attacker, minPitchDegree, maxPitchDegree)
return function(target, targetPoint)
local origin = GetEntityEyePos(attacker)
local viewCoords = GetEntityViewAngles(attacker):GetCoords()
local v = targetPoint - origin
local distY = Math.DotProduct(viewCoords.yAxis, v)
local distZ = Math.DotProduct(viewCoords.zAxis, v)
local pitch = 180 * math.atan2(distY,distZ) / math.pi
local result = pitch >= minPitchDegree and pitch <= maxPitchDegree
-- Log("filter %s for %s, v %s, pitch %s, result %s (%s,%s)", target, attacker, v, pitch, result, minPitchDegree, maxPitchDegree)
return result
end
end
function CloakTargetFilter()
return function(target, targetPoint)
return not HasMixin(target, "Cloakable") or not target:GetIsCloaked()
end
end
--
-- Only lets through damaged targets
--
function HealableTargetFilter(healer)
return function(target, targetPoint) return target:AmountDamaged() > 0 end
end
--
function RangeTargetFilter(origin, sqRange)
return function(target, targetPoint) return (targetPoint - origin):GetLengthSquared() end
end
--
-- Prioritizers are used to prioritize one kind of target over others
-- When selecting targets, the range-sorted list of targets are run against each supplied prioritizer in turn
-- before checking if the target is visible. If the prioritizer returns true for the target, the target will
-- be selected if it is visible (if required). If not visible, the selection process continues.
--
-- Once all user-supplied prioritizers have run, a final run through will select the closest visible target.
--
--
-- Selects target based on class
--
function IsaPrioritizer(className)
return function(target) return target:isa(className) end
end
--
-- Selects targets based on if they can hurt us
--
function HarmfulPrioritizer()
return function(target) return target:GetCanGiveDamage() end
end
--
-- Selects everything
--
function AllPrioritizer()
return function(target) return target:GetIsAlive() end
end
--
-- The target type is used to classify entities when they are created so we don't spend any
-- time thinking about shooting at stuff that we shouldn't be thinking about.
-- Also, the static target type can be used to remove entities that cannot be hit because of
-- range and LOS blocking. As this eliminates pretty much 90% of all potential targets, target
-- selection speeds up by about 1000%
--
class 'TargetType'
--
-- An entity belongs to a TargetType if it
-- 1. matches the team
-- 2. HasMixin(tag)
--
function TargetType:Init(name, teamNumber, tag)
self.name = name
self.teamNumber = teamNumber
-- Log("Team number: %s", teamNumber)
self.tag = tag
-- Log("Init %s: %s, %s", name, teamNumber, tag)
-- the entities that have been selected by their TargetType. A proper hashtable, not a list.
self.entityIdMap = {}
self.entityIdList = {}
-- wonder how much this slows down lookups?
self.teamFilterFunction = function (entity)
return entity:GetTeamNumber() == self.teamNumber
end
return self
end
--
-- Notification that a new entity id has been added
--
function TargetType:EntityAdded(entity)
local entId = entity:GetId()
if self:ContainsType(entity) and not self.entityIdMap[entId] and self.teamFilterFunction(entity) then
-- Log("%s: added %s, teamNumber: %s", self.name, entity, entity:GetTeamNumber())
table.insert(self.entityIdList, entId)
self.entityIdMap[entId] = #self.entityIdList
self:OnEntityAdded(entity)
end
end
--
-- Notification that a new entity id has been added
--
function TargetType:EntityMoved(entity)
if self:ContainsType(entity) and self.entityIdMap[entity:GetId()] then
self:OnEntityMoved(entity)
end
end
--
-- Notification that an entity id has been removed.
--
function TargetType:EntityRemoved(entity)
local entId = entity:GetId()
if entity and self.entityIdMap[entId] then
table.remove(self.entityIdList, self.entityIdMap[entId])
self.entityIdMap[entId] = nil
-- Log("%s: removed %s", self.name, entity)
self:OnEntityRemoved(entity)
end
end
--
-- True if we the entity belongs to our TargetType
--
function TargetType:ContainsType(entity)
return HasMixin(entity, self.tag)
end
--
-- Attach a target selector to this TargetType.
--
-- The returned object must be supplied whenever an acquire target is made
--
function TargetType:AttachSelector(selector)
assert(false, "Attach must be overridden")
end
--
-- Detach a selector from this target type
--
function TargetType:DetachSelector(selector)
assert(false, "Detach must be overridden")
end
--
-- Return all possible targets for this target type inside the given range.
-- Note: for performance reasons, we don't filter team type here because its
-- more expensive to do it from inside the GetEntitiesXxx
--
function TargetType:GetAllPossibleTargets(origin, range)
return Shared.GetEntitiesWithTagInRange(self.tag, origin, range)
end
--
-- Allow subclasses to react to the adding of a new entity id
--
function TargetType:OnEntityAdded(id)
end
--
-- Allow subclasses to react to the adding of a new entity id.
--
function TargetType:OnEntityRemoved(id)
end
--
-- Handle static targets
--
class 'StaticTargetType' (TargetType)
function StaticTargetType:Init(name, teamNumber, tag)
self.cacheMap = {}
return TargetType.Init(self, name, teamNumber, tag)
end
function StaticTargetType:AttachSelector(selector)
-- each selector gets its own cache of non-moving entities. The selector must be detached when the owning entitiy dies
if not self.cacheMap[selector] then
table.insert(self.cacheMap, selector)
self.cacheMap[selector] = StaticTargetCache():Init(self, selector)
end
return self.cacheMap[selector]
end
-- detach the selector. Must be called when the entity owning the selector dies
function StaticTargetType:DetachSelector(selector)
table.removevalue(self.cacheMap, selector)
self.cacheMap[selector] = nil
end
function StaticTargetType:OnEntityAdded(entity)
for _,selector in ipairs(self.cacheMap) do
local cache = self.cacheMap[selector]
cache:OnEntityAdded(entity)
end
end
function StaticTargetType:OnEntityMoved(entity)
for _,selector in ipairs(self.cacheMap) do
local cache = self.cacheMap[selector]
cache:OnEntityMoved(entity)
end
end
function StaticTargetType:OnEntityRemoved(entity)
for _,selector in ipairs(self.cacheMap) do
local cache = self.cacheMap[selector]
end
end
class 'StaticTargetCache'
function StaticTargetCache:Init(targetType, selector)
self.targetType = targetType
self.selector = selector
self.targetIds = nil
self.targetIdToRangeMap = nil
return self
end
function StaticTargetCache:Log(formatString, ...)
if self.selector.debug then
formatString = "%s[%s]: " .. formatString
Log(formatString, self.selector.attacker, self.targetType.name, ...)
end
end
function StaticTargetCache:OnEntityAdded(entity)
if self.targetIdToRangeMap then
self:MaybeAddTarget(entity, self.selector.attacker:GetEyePos())
end
end
-- just clear any info we might have had on that id
function StaticTargetCache:InvalidateDataFor(entity)
if self.targetIdToRangeMap then
local entId = entity:GetId()
table.removevalue(self.targetIds, entId)
self.targetIdToRangeMap[entId] = nil
end
end
function StaticTargetCache:OnEntityMoved(entity)
self:InvalidateDataFor(entity)
end
function StaticTargetCache:OnEntityRemoved(entity)
self:InvalidateDataFor(entity)
end
--
-- Make sure the cache is valid before using it
--
function StaticTargetCache:ValidateCache()
if not self.targetIdToRangeMap then
self.targetIdToRangeMap = {}
self.targetIds = {}
local eyePos = self.selector.attacker:GetEyePos()
local targets = self.targetType:GetAllPossibleTargets(eyePos, self.selector.range)
for _, target in ipairs(targets) do
if target:GetTeamNumber() == self.targetType.teamNumber then
self:MaybeAddTarget(target, eyePos)
end
end
end
end
--
-- Append possible targets, range pairs to the targetList
--
function StaticTargetCache:AddPossibleTargets(selector, result)
PROFILE("StaticTargetCache:AddPossibleTargets")
self:ValidateCache(selector)
for _, targetId in ipairs(self.targetIds) do
PROFILE("StaticTargetCache:AddPossibleTargets/loop")
local target = Shared.GetEntity(targetId)
local range = self.targetIdToRangeMap[targetId]
if target and target.GetIsAlive and target:GetIsAlive() and target:GetCanTakeDamage() then
PROFILE("StaticTargetCache:AddPossibleTargets/_ApplyFilters")
if selector:_ApplyFilters(target, target:GetEngagementPoint()) then
table.insert(result,target)
-- Log("%s: static target %s at range %s", selector.attacker, target, range)
end
end
end
end
--
-- If the attacker moves, the cache has to be invalidated.
--
function StaticTargetCache:AttackerMoved()
self.targetIdToRangeMap = nil
self.targetIds = nil
end
--
-- Check if the target is a possible target for us
--
-- Make sure its id is in our map, and that its inside range
--
function StaticTargetCache:PossibleTarget(target, origin, range)
self:ValidateCache()
local r = self.targetIdToRangeMap[target:GetId()]
return r and r <= range
end
function StaticTargetCache:MaybeAddTarget(target, origin)
local inRange = nil
local visible = nil
local range = -1
local rightType = self.targetType.entityIdMap[target:GetId()]
if rightType then
local targetPoint = target:GetEngagementPoint()
range = (origin - targetPoint):GetLength()
inRange = range <= self.selector.range
if inRange then
visible = true
if (self.selector.visibilityRequired) then
-- trace as a bullet, but ignore everything but the target.
local trace = Shared.TraceRay(origin, targetPoint, CollisionRep.Damage, PhysicsMask.Bullets, EntityFilterOnly(target))
-- self:Log("f %s, e %s", trace.fraction, trace.entity)
visible = trace.entity == target or trace.fraction == 1
if visible and trace.entity == target then
range = range * trace.fraction
end
end
end
end
if inRange and visible then
-- save the target and the range to it
local entId = target:GetId()
if not self.targetIdToRangeMap[entId] then
table.insert(self.targetIds, entId)
end
self.targetIdToRangeMap[target:GetId()] = range
-- self:Log("%s added at range %s", target, range)
else
if not rightType then
-- Log("%s rejected, wrong type", target)
else
-- Log("%s rejected, range %s, inRange %s, visible %s", target, range, inRange, visible)
end
end
end
function StaticTargetCache:Debug(selector, full)
Log("%s :", self.targetType.name)
self:ValidateCache(selector)
local origin = GetEntityEyePos(selector.attacker)
-- go through all static targets, showing range and curr
for _, targetId in ipairs(self.targetType.entityIdList) do
local target = Shared.GetEntity(targetId)
if target then
local targetPoint = target:GetEngagementPoint()
local range = (origin - targetPoint):GetLength()
local inRange = range <= selector.range
if full or inRange then
local valid = target:GetIsAlive() and target:GetCanTakeDamage()
local unfiltered = selector:_ApplyFilters(target, targetPoint)
local visible = selector.visibilityRequired and GetCanAttackEntity(selector.attacker, target) or "N/A"
local inCache = self.targetIdToRangeMap[targetId] ~= nil
local shouldBeInCache = inRange and (visible ~= false)
local cacheTxt = (inCache == shouldBeInCache and "") or (string.format(", CACHE %s != shouldBeInCache %s!", ToString(inCache), ToString(shouldBeInCache)))
Log("%s: in range %s, valid %s, unfiltered %s, visible %s%s", target, inRange, valid, unfiltered, visible, cacheTxt)
end
end
end
end
--
-- Handle mobile targets
--
class 'MobileTargetType' (TargetType)
function MobileTargetType:AttachSelector(selector)
-- we don't do any caching on a per-selector basis, so just return ourselves
return self
end
function MobileTargetType:DetachSelector(select)
-- do nothing
end
function MobileTargetType:AddPossibleTargets(selector, result)
PROFILE("MobileTargetType:AddPossibleTargets")
local origin = GetEntityEyePos(selector.attacker)
local entityIds = {}
local targets = self:GetAllPossibleTargets(origin, selector.range)
for _, target in ipairs(targets) do
if target:GetTeamNumber() == self.teamNumber then
local targetPoint = target:GetEngagementPoint()
if target:GetIsAlive() and target:GetCanTakeDamage() and selector:_ApplyFilters(target, targetPoint) then
table.insert(result, target)
end
end
end
end
function MobileTargetType:AttackerMoved()
-- ignore: no caching
end
function MobileTargetType:PossibleTarget(target, origin, range)
local r
if self.entityIdMap[target:GetId()] then
r = (origin - target:GetEngagementPoint()):GetLength()
end
return r and r <= range
end
function MobileTargetType:Debug(selector, full)
-- go through all mobile targets, showing range and curr
local origin = GetEntityEyePos(selector.attacker)
local targets = self:GetAllPossibleTargets(origin, selector.range)
Log("%s : %s entities (%s) inside %s range (%s)", self.name, #targets, self.tag, selector.range, targets)
for _, target in ipairs(targets) do
if target:GetTeamNumber() == self.teamNumber then
local targetPoint = target:GetEngagementPoint()
local range = (origin - targetPoint):GetLength()
local valid = target:GetIsAlive() and target:GetCanTakeDamage()
local unfiltered = selector:_ApplyFilters(target, targetPoint)
local visible = selector.visibilityRequired and GetCanAttackEntity(selector.attacker, target) or "N/A"
local inRadius = table.contains(targets, target)
Log("%s, in range %s, in radius %s, valid %s, unfiltered %s, visible %s", target, range, inRadius, valid, unfiltered, visible)
end
end
end
--
-- Note that we enumerate each individual instantiated class here. Adding new structures means that these must be updated.
--
-- (hotload safe)
-- this all assumes there are only 2 teams
-- Static targets for team 1
kTeam1StaticTargets = kTeam1StaticTargets or StaticTargetType():Init( "Team1Static", kTeam2Index, StaticTargetMixin.type )
-- Mobile targets for team 1
kTeam1MobileTargets = kTeam1MobileTargets or MobileTargetType():Init( "Team1Mobile", kTeam2Index, MobileTargetMixin.type )
-- Static targets for team 2
kTeam2StaticTargets = kTeam2StaticTargets or StaticTargetType():Init( "Team2Static", kTeam1Index, StaticTargetMixin.type )
-- Mobile targets for team 2
kTeam2MobileTargets = kTeam2MobileTargets or MobileTargetType():Init( "Team2Mobile", kTeam1Index, MobileTargetMixin.type )
-- team 1 static heal targets
kTeam1AlienStaticHealTargets = kTeam2StaticTargets
-- Alien team 1 mobile heal targets
kTeam1AlienMobileHealTargets = kTeam2MobileTargets
-- team 2 static heal targets
kTeam2AlienStaticHealTargets = kTeam1StaticTargets
-- Alien eam 1 mobile heal targets
kTeam2AlienMobileHealTargets = kTeam1MobileTargets
-- Used as final step if all other prioritizers fail
TargetType.kAllPrioritizer = TargetType.kAllPrioritizer or AllPrioritizer()
kMarineStaticTargets = 1
kMarineMobileTargets = 2
kAlienStaticTargets = 3
kAlienMobileTargets = 4
TargetType.kAllTargetTypes = {
kTeam1StaticTargets,
kTeam1MobileTargets,
kTeam2StaticTargets,
kTeam2MobileTargets
}
--
-- called by XxxTargetMixin when targetable units are created or destroyed
--
function TargetType.OnDestroyEntity(entity)
for _,tc in ipairs(TargetType.kAllTargetTypes) do
tc:EntityRemoved(entity)
end
end
function TargetType.OnCreateEntity(entity)
for _,tc in ipairs(TargetType.kAllTargetTypes) do
tc:EntityAdded(entity)
end
end
function TargetType.OnTargetMoved(entity)
for _,tc in ipairs(TargetType.kAllTargetTypes) do
tc:EntityMoved(entity)
end
end
--
-- ----- TargetSelector - simplifies using the TargetCache. --------------------
--
-- It wraps the static list handling and remembers how targets are selected so you can acquire and validate
-- targets using the same rules.
--
-- After creating a target selector in the initialization of the attacker, you only then need to call the AcquireTarget()
-- to scan for a new target and ValidateTarget(target) to validate it.
-- While the TargetSelector assumes that you don't move, if you do move, you must call AttackerMoved().
--
class "TargetSelector"
--
-- Setup a target selector.
--
-- A target selector allows one attacker to acquire and validate targets.
--
-- The attacker should stay in place. If the attacker moves, the AttackerMoved() method MUST be called.
--
-- Arguments:
-- - attacker - the attacker.
--
-- - range - the maximum range of the attack.
--
-- - visibilityRequired - true if the target must be visible to the attacker
--
-- - targetTypeList - list of targetTypees to use
--
-- - filters - a list of filter functions (nil ok), used to remove alive and in-range targets. Each filter will
-- be called with the target and the targeted point on that target. If any filter returns true, then the target is inadmissable.
--
-- - prioritizers - a list of selector functions, used to prioritize targets. The range-sorted, filtered
-- list of targets is run through each selector in turn, and if a selector returns true the
-- target is then checked for visibility (if visibilityRequired), and if seen, that target is selected.
-- Finally, after all prioritizers have been run through, the closest visible target is choosen.
-- A nil prioritizers will default to a single HarmfulPrioritizer
--
local function DestroyTargetSelector(targetSelector)
for _, targetType in ipairs(targetSelector.targetTypeList) do
targetType:DetachSelector(targetSelector)
end
end
function TargetSelector:Init(attacker, range, visibilityRequired, targetTypeList, filters, prioritizers)
assert(HasMixin(attacker, "TargetCache"))
self.attacker = attacker
self.range = range
self.visibilityRequired = visibilityRequired
self.filters = filters
self.prioritizers = prioritizers or { HarmfulPrioritizer() }
local attackerTeamNumber = attacker:GetTeamNumber()
local attackerTeamType = attacker:GetTeamType()
self.targetTypeMap = {}
self.targetTypeList = {}
for _, targetType in ipairs(targetTypeList) do
local fixedTargetType = targetType
-- this fixes the targets
if targetType == kAlienStaticTargets then
if attackerTeamNumber == kTeam1Index then
--Print("Using team 1 static targets")
fixedTargetType = kTeam1StaticTargets
elseif attackerTeamNumber == kTeam2Index then
--Print("Using team 2 static targets")
fixedTargetType = kTeam2StaticTargets
end
elseif targetType == kAlienMobileTargets then
if attackerTeamNumber == kTeam1Index then
--Print("Using team 1 mobile targets")
fixedTargetType = kTeam1MobileTargets
elseif attackerTeamNumber == kTeam2Index then
--Print("Using team 2 mobile targets")
fixedTargetType = kTeam2MobileTargets
end
elseif targetType == kMarineStaticTargets then
if attackerTeamNumber == kTeam2Index then
--Print("Using team 2 static targets")
fixedTargetType = kTeam2StaticTargets
elseif attackerTeamNumber == kTeam1Index then
--Print("Using team 1 static targets")
fixedTargetType = kTeam1StaticTargets
end
elseif targetType == kMarineMobileTargets then
if attackerTeamNumber == kTeam1Index then
--Print("Using team 1 mobile targets")
fixedTargetType = kTeam1MobileTargets
elseif attackerTeamNumber == kTeam2Index then
--Print("Using team 2 mobile targets")
fixedTargetType = kTeam2MobileTargets
end
end
self.targetTypeMap[fixedTargetType] = fixedTargetType:AttachSelector(self)
table.insert(self.targetTypeList, fixedTargetType)
end
-- This will allow target selectors to be cleaned up when the attack is destroyed.
-- targetSelectorsToDestroy comes from TargetCacheMixin.
table.insert(attacker.targetSelectorsToDestroy, function() DestroyTargetSelector(self) end)
self.debug = false
return self
end
--
-- Acquire maxTargets targets inside the given rangeOverride.
--
-- both may be left out, in which case maxTargets defaults to 1000 and rangeOverride to standard range
--
-- The rangeOverride, if given, must be <= the standard range for this selector
-- If originOverride is set, the range filter will filter from this point
-- Note that no targets can be selected outside the fixed target selector range.
--
function TargetSelector:AcquireTargets(maxTargets, rangeOverride, originOverride)
local savedFilters = self.filters
if rangeOverride then
local filters = {}
if self.filters then
table.copy(self.filters, filters)
end
local origin = originOverride or GetEntityEyePos(self.attacker)
table.insert(filters, RangeTargetFilter(origin, rangeOverride))
self.filters = filters
end
-- 1000 targets should be plenty ...
maxTargets = maxTargets or 1000
local targets = self:_AcquireTargets(maxTargets)
return targets
end
--
-- Return true if the target is acceptable to all filters
--
function TargetSelector:_ApplyFilters(target, targetPoint)
-- Log("%s: _ApplyFilters on %s, %s", self.attacker, target, targetPoint)
if self.filters then
for _, filter in ipairs(self.filters) do
if not filter(target, targetPoint) then
-- Log("%s: Reject %s", self.attacker, target)
return false
end
--Log("%s: Accept %s", self.attacker, target)
end
end
return true
end
--
-- Check if the target is possible.
--
function TargetSelector:_PossibleTarget(target)
if target and self.attacker ~= target and (target.GetIsAlive and target:GetIsAlive()) and target:GetCanTakeDamage() then
local origin = self.attacker:GetEyePos()
local possible = false
for _, tc in ipairs(self.targetTypeList) do
local tcCache = self.targetTypeMap[tc]
possible = possible or tcCache:PossibleTarget(target, origin, self.range)
end
if possible then
local targetPoint = target:GetEngagementPoint()
if self:_ApplyFilters(target, targetPoint) then
return true
end
end
end
return false
end
function TargetSelector:ValidateTarget(target)
local result = false
if target then
result = self:_PossibleTarget(target)
if result and self.visibilityRequired then
result = GetCanAttackEntity(self.attacker, target)
end
-- self:Log("validate %s -> %s", target, result)
end
return result
end
--
-- AcquireTargets with maxTarget set to 1, and returning the selected target
--
function TargetSelector:AcquireTarget()
return self:_AcquireTargets(1)[1]
end
--
-- Acquire a certain number of targets using filters to reject targets and prioritizers to prioritize them
--
-- Arguments: See TargetCache:CreateSelector for missing argument descriptions
-- - maxTarget - maximum number of targets to acquire
--
-- Return:
-- - the chosen targets
--
function TargetSelector:_AcquireTargets(maxTargets)
PROFILE("TargetSelector:_AcquireTargets")
local targets = self:_GetRawTargetList()
local result = {}
local checkedTable = {} -- already checked entities
local finalRange = nil
-- go through the prioritizers until we have filled up on targets
if self.prioritizers then
for _, prioritizer in ipairs(self.prioritizers) do
self:_InsertTargets(result, checkedTable, prioritizer, targets, maxTargets)
if #result >= maxTargets then
break
end
end
end
-- final run through with an all-selector
if #result < maxTargets then
self:_InsertTargets(result, checkedTable, TargetType.kAllPrioritizer, targets, maxTargets)
end
--[[
if #result > 0 then
Log("%s: found %s targets (%s)", self.attacker, #result, result[1])
end
--]]
return result
end
--
-- Return a sorted list of alive and GetCanTakeDamage'able targets, sorted by range.
--
function TargetSelector:_GetRawTargetList()
PROFILE("TargetSelector:_GetRawTargetList")
local result = {}
-- get potential targets from all targetTypees
for _, tc in ipairs(self.targetTypeList) do
local tcCache = self.targetTypeMap[tc]
tcCache:AddPossibleTargets(self, result)
end
if (true) then
PROFILE("TargetSelector:_GetRawTargetList")
Shared.SortEntitiesByDistance(self.attacker:GetEyePos(),result)
end
return result
end
--
-- Insert valid target into the resultTable until it is full.
--
-- Let a selector work on a target list. If a selector selects a target, a trace is made
-- and if successful, that target and range is inserted in the resultsTable.
--
-- Once the results size reaches maxTargets, the method returns.
--
function TargetSelector:_InsertTargets(foundTargetsList, checkedTable, prioritizer, targets, maxTargets)
PROFILE("TargetSelector:_InsertTargets")
for _, target in ipairs(targets) do
-- Log("%s: check %s, ct %s, prio %s", self.attacker, target, checkedTable[target], prioritizer(target))
local include = false
if not checkedTable[target] and prioritizer(target) and target:GetIsAlive() then
if self.visibilityRequired then
include = GetCanAttackEntity(self.attacker, target)
else
include = true
end
checkedTable[target] = true
end
if include then
--Log("%s targets %s", self.attacker, target)
table.insert(foundTargetsList,target)
if #foundTargetsList >= maxTargets then
break
end
end
end
end
--
-- if the location of the unit doing the target selection changes, its static target list
-- must be invalidated.
--
function TargetSelector:AttackerMoved()
for _, tc in ipairs(self.targetTypeList) do
local tcCache = self.targetTypeMap[tc]
tcCache:AttackerMoved()
end
end
--
-- Dump debugging info for this TargetSelector
--
function TargetSelector:Debug(cmd)
local full = cmd == "full" -- list all possible targets, even those out of range
self.debug = cmd == "log" and not self.debug or self.debug -- toggle logging for this selector only
if cmd == "reset" then
self:AttackerMoved()
end
Log("%s @ %s: target debug (full=%s, log=%s)", self.attacker, self.attacker:GetOrigin(), full, self.debug)
for _, tc in ipairs(self.targetTypeList) do
local tcCache = self.targetTypeMap[tc]
tcCache:Debug(self, full)
end
end
function TargetSelector:Log(formatString, ...)
if self.debug then
formatString = "%s: " .. formatString
Log(formatString, self.attacker, ...)
end
end |
slot0 = class("Mail", import(".BaseVO"))
slot0.ATTACHMENT_NONE = 0
slot0.ATTACHMENT_EXIST = 1
slot0.ATTACHMENT_TAKEN = 2
slot0.Ctor = function (slot0, slot1)
slot0.id = slot1.id
slot0.date = slot1.date
slot0.title = string.split(HXSet.hxLan(slot1.title), "||")[1]
slot0.sender = (#string.split(HXSet.hxLan(slot1.title), "||") > 1 and slot2[2]) or i18n("mail_sender_default")
slot0.readFlag = slot1.read_flag
slot0.attachFlag = slot1.attach_flag
slot0.importantFlag = slot1.imp_flag
slot0.attachments = {}
for slot6, slot7 in ipairs(slot1.attachment_list) do
table.insert(slot0.attachments, MailAttachment.New(slot7))
end
slot0.openned = false
end
slot0.extend = function (slot0, slot1)
slot0.content = string.gsub(HXSet.hxLan(slot1.content), "\\n", "\n")
slot0.openned = true
end
slot0.hasAttachmentsType = function (slot0, slot1)
for slot5, slot6 in pairs(slot0.attachments) do
if slot1 == slot6.type then
return true, slot6.id
end
end
end
slot0.getAttatchmentsCount = function (slot0, slot1, slot2)
slot3 = 0
for slot7, slot8 in pairs(slot0.attachments) do
if slot1 == slot8.type and slot2 == slot8.id then
slot3 = slot3 + slot8.count
end
end
return slot3
end
slot0.IsFudaiAndFullCapcity = function (slot0)
slot1 = {}
for slot5, slot6 in pairs(slot0.attachments) do
if slot6.type == DROP_TYPE_ITEM and table.contains(ITEM_ID_FUDAIS, slot6.id) then
table.insert(slot1, slot6)
end
end
slot2 = 0
slot3 = 0
slot4 = 0
slot5 = 0
if #slot1 then
for slot9, slot10 in ipairs(slot1) do
for slot15, slot16 in ipairs(pg.item_data_statistics[slot10.id].display_icon) do
if slot16[1] == DROP_TYPE_RESOURCE then
if slot16[2] == 1 then
slot2 = slot2 + slot16[3]
elseif slot16[2] == 2 then
slot3 = slot3 + slot16[3]
end
elseif slot16[1] == DROP_TYPE_EQUIP then
slot4 = slot4 + slot16[3]
elseif slot16[1] == DROP_TYPE_SHIP then
slot5 = slot5 + slot16[3]
end
end
end
end
slot6 = getProxy(PlayerProxy):getRawData()
if slot3 > 0 and slot6:OilMax(slot3) then
return false, i18n("oil_max_tip_title")
end
if slot2 > 0 and slot6:GoldMax(slot2) then
return false, i18n("gold_max_tip_title")
end
slot7 = getProxy(EquipmentProxy):getCapacity()
if slot4 > 0 and slot6:getMaxEquipmentBag() < slot4 + slot7 then
return false, i18n("mail_takeAttachment_error_magazine_full")
end
slot8 = getProxy(BayProxy):getShipCount()
if slot5 > 0 and slot6:getMaxShipBag() < slot5 + slot8 then
return false, i18n("mail_takeAttachment_error_dockYrad_full")
end
return true
end
slot0.sortByTime = function (slot0, slot1)
if slot0.readFlag == slot1.readFlag then
if ((slot0.attachFlag == slot0.ATTACHMENT_EXIST and 1) or 0) == ((slot1.attachFlag == slot0.ATTACHMENT_EXIST and 1) or 0) then
if slot0.date == slot1.date then
return slot1.id < slot0.id
else
return slot1.date < slot0.date
end
else
return slot3 < slot2
end
else
return slot0.readFlag < slot1.readFlag
end
end
slot0.setReadFlag = function (slot0, slot1)
slot0.readFlag = slot1
end
slot0.setImportantFlag = function (slot0, slot1)
slot0.importantFlag = slot1
end
return slot0
|
#!/usr/bin/env luajit
local constants = require "kong.constants"
local logger = require "kong.cli.utils.logger"
local utils = require "kong.tools.utils"
local config_loader = require "kong.tools.config_loader"
local Serf = require "kong.cli.services.serf"
local lapp = require("lapp")
local args = lapp(string.format([[
Kong cluster operations.
Usage: kong cluster <command> <args> [options]
Commands:
<command> (string) where <command> is one of:
members, force-leave, reachability, keygen
Options:
-c,--config (default %s) path to configuration file
]], constants.CLI.GLOBAL_KONG_CONF))
local KEYGEN = "keygen"
local FORCE_LEAVE = "force-leave"
local SUPPORTED_COMMANDS = {"members", KEYGEN, "reachability", FORCE_LEAVE}
if not utils.table_contains(SUPPORTED_COMMANDS, args.command) then
lapp.quit("Invalid cluster command. Supported commands are: "..table.concat(SUPPORTED_COMMANDS, ", "))
end
local configuration = config_loader.load_default(args.config)
local signal = args.command
args.command = nil
args.config = nil
local skip_running_check
if signal == FORCE_LEAVE and utils.table_size(args) ~= 1 then
logger:error("You must specify a node name")
os.exit(1)
elseif signal == KEYGEN then
skip_running_check = true
end
local res, err = Serf(configuration):invoke_signal(signal, args, false, skip_running_check)
if err then
logger:error(err)
os.exit(1)
end
logger:print(res)
|
local awful = require('awful')
local wibox = require('wibox')
local gears = require('gears')
local watch = awful.widget.watch
local dpi = require('beautiful').xresources.apply_dpi
local clickable_container = require('widget.airplane-mode.clickable-container')
local config_dir = gears.filesystem.get_configuration_dir()
local widget_dir = config_dir .. 'widget/airplane-mode/'
local widget_icon_dir = widget_dir .. 'icons/'
local icons = require('theme.icons')
local ap_state = false
local action_name = wibox.widget {
text = 'Airplane Mode',
font = 'Inter Regular 11',
align = 'left',
widget = wibox.widget.textbox
}
local button_widget = wibox.widget {
{
id = 'icon',
image = icons.toggled_off,
widget = wibox.widget.imagebox,
resize = true
},
layout = wibox.layout.align.horizontal
}
local widget_button = wibox.widget {
{
button_widget,
top = dpi(7),
bottom = dpi(7),
widget = wibox.container.margin
},
widget = clickable_container
}
local update_imagebox = function()
if ap_state then
button_widget.icon:set_image(icons.toggled_on)
else
button_widget.icon:set_image(icons.toggled_off)
end
end
local check_airplane_mode_state = function()
local cmd = 'cat ' .. widget_dir .. 'airplane_mode'
awful.spawn.easy_async_with_shell(
cmd,
function(stdout)
local status = stdout
if status:match("true") then
ap_state = true
elseif status:match("false") then
ap_state = false
else
ap_state = false
awful.spawn.easy_async_with_shell(
'echo "false" > ' .. widget_dir .. 'airplane_mode',
function(stdout)
end
)
end
update_imagebox()
end
)
end
check_airplane_mode_state()
local ap_off_cmd = [[
rfkill unblock wlan
# Create an AwesomeWM Notification
awesome-client "
naughty = require('naughty')
naughty.notification({
app_name = 'Network Manager',
title = '<b>Airplane mode disabled!</b>',
message = 'Initializing network devices',
icon = ']] .. widget_icon_dir .. 'airplane-mode-off' .. '.svg' .. [['
})
"
]] .. "echo false > " .. widget_dir .. "airplane_mode" .. [[
]]
local ap_on_cmd = [[
rfkill block wlan
# Create an AwesomeWM Notification
awesome-client "
naughty = require('naughty')
naughty.notification({
app_name = 'Network Manager',
title = '<b>Airplane mode enabled!</b>',
message = 'Disabling radio devices',
icon = ']] .. widget_icon_dir .. 'airplane-mode' .. '.svg' .. [['
})
"
]] .. "echo true > " .. widget_dir .. "airplane_mode" .. [[
]]
local toggle_action = function()
if ap_state then
awful.spawn.easy_async_with_shell(
ap_off_cmd,
function(stdout)
ap_state = false
update_imagebox()
end
)
else
awful.spawn.easy_async_with_shell(
ap_on_cmd,
function(stdout)
ap_state = true
update_imagebox()
end
)
end
end
widget_button:buttons(
gears.table.join(
awful.button(
{},
1,
nil,
function()
toggle_action()
end
)
)
)
gears.timer {
timeout = 5,
autostart = true,
callback = function()
check_airplane_mode_state()
end
}
local action_widget = wibox.widget {
{
action_name,
nil,
{
widget_button,
layout = wibox.layout.fixed.horizontal,
},
layout = wibox.layout.align.horizontal,
},
left = dpi(24),
right = dpi(24),
forced_height = dpi(48),
widget = wibox.container.margin
}
return action_widget
|
----------------------------------------------------------------------
-- This script implements a test procedure, to report accuracy
-- on the test data. Nothing fancy here...
--
-- Clement Farabet
----------------------------------------------------------------------
require 'torch' -- torch
--require 'xlua' -- xlua provides useful tools, like progress bars
require 'optim' -- an optimization package, for online and batch methods
require 'nn'
----------------------------------------------------------------------
--print '==> processing options'
cmd = torch.CmdLine()
cmd:text()
cmd:text('IO classifier of HEP jobs')
cmd:text()
cmd:text('Options:')
-- data:
cmd:option('-pattern', '', 'the IO pattern with 13 collumn')
cmd:option('-model', 'linear', 'type of model to construct: linear | mlp | mmlp')
cmd:option('-save', 'results', 'subdirectory to save/log experiments in')
cmd:text()
opt = cmd:parse(arg or {})
--print '==> loading dataset'
if (opt.pattern == '')
then
print "unknown"
os.exit()
end
featuresize=16
input=torch.Tensor(featuresize*2)
rawdata=torch.Tensor(featuresize+1)
i=1
sum=0
for token in string.gmatch(opt.pattern, "[^%s]+") do
rawdata[i]=token
i=i+1
end
for i=1,featuresize
do
input[i]=torch.sqrt(rawdata[i])
sum=sum+rawdata[i]
end
for i=featuresize+1,featuresize*2
do
input[i]=rawdata[i-featuresize]*100/sum
end
local filename = paths.concat(opt.save, 'meanstd')
res=torch.load(filename)
mean=torch.Tensor(featuresize*2)
std=torch.Tensor(featuresize*2)
mean=res[{{},1}]
std=res[{{},2}]
for i=1,featuresize*2
do
if (std[i]>0)
then
input[i]=(input[i]-mean[i])/std[i]
else
input[i]=input[i]-mean[i]
end
end
--print (input)
--print (mean)
--print (std)
local filename = paths.concat(opt.save, 'model.net')
model=torch.load(filename)
--print (model)
--model:add(nn.LogSoftMax())
-- test over test data
--print('==> testing on test set:')
pred = model:forward(input)
--print (pred)
maxi=1
max=pred[1]
for i=2,6
do
if(pred[i]>max)
then
max=pred[i]
maxi=i
end
end
if maxi==1
then
print ("ana")
elseif maxi==2
then
print ("rec")
elseif maxi==3
then
print ("sim")
elseif maxi==4
then
print ("cal")
elseif maxi==5
then
print ("scan")
elseif maxi==6
then
print ("skim")
end
|
local mjlib = require "mjlib"
local utils = require "utils"
local tips_lib = require "tipslib"
function test_fail()
local cards = {
1,1,1,0,0,0,2,0,0,
0,0,0,0,2,0,0,0,0,
0,0,0,0,1,2,2,1,0
}
local result = true
if mjlib._check_hu(cards) == result then
print("test_fail 测试成功")
else
print("test_fail 测试失败")
end
end
function test_success()
local cards = {
1,1,1,0,0,0,2,0,0,
0,0,0,0,3,0,0,0,0,
0,0,0,0,1,2,2,1,0
}
local result = true
if mjlib.check_hu(cards) == result then
print("test_success 测试成功")
else
print("test_success 测试失败")
end
end
function test_time()
local count = 100*10000
local cards = {
1,1,1,0,0,0,2,0,0,
0,0,0,0,3,0,0,0,0,
0,0,0,0,1,2,2,1,0
}
local start = os.time()
for i=1,count do
mjlib.check_normal(cards)
end
print("测试",count,"次,耗时",os.time()-start,"秒")
end
function test_tips_time(count)
local cards = {
0,0,0,1,3,1,1,1,0,
0,0,0,0,3,1,1,1,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0
}
local start = os.time()
for i=1,count do
local tips_cards = tips_lib.get_tips(cards)
end
print("测试",count,"次,耗时",os.time()-start,"秒")
end
function test_tips()
local cards = {
0,0,0,1,3,1,1,1,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0
}
local tips_cards = tips_lib.get_tips(cards)
print("需要展示的牌")
utils.print(tips_cards)
end
test_tips_time(10000)
|
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( "shared.lua" )
function SWEP:Fail( ) -- Fail in handcuffing.
self.Target = nil
self:SetNWInt( "FinishHandcuffingTime", 0 )
end
function SWEP:Success( ) -- Succeed in handcuffing.
self.Target:Give( "eps_handcuffed" )
self.Target = nil
self:SetNWInt( "FinishHandcuffingTime", 0 )
end
function SWEP:PrimaryAttack( )
if not IsFirstTimePredicted( ) then return end
local ply = self:GetOwner( )
local trace = ply:GetEyeTrace( )
local target = trace.Entity
local handcuff_range_squared = EggrollPoliceSystem.Config.MaxHandcuffDistance ^ 2
if not IsValid( target ) or not target:IsPlayer( ) or not target:Alive( ) or not target:IsSolid( ) or ply:EyePos( ):DistToSqr( target:GetPos( ) ) > handcuff_range_squared then return end
if target:GetNWBool( "EPS_Handcuffed" ) then
ply:ChatPrint( "This person is already handcuffed." )
return
end
self.Target = target
self:SetNWInt( "FinishHandcuffingTime", CurTime( ) + EggrollPoliceSystem.Config.TimeToHandcuff )
end
function SWEP:SecondaryAttack( )
if not IsFirstTimePredicted( ) then return end
local ply = self:GetOwner( )
if self.Target then
self:Fail( )
end
local trace = ply:GetEyeTrace( )
local target = trace.Entity
local unhandcuff_range_squared = EggrollPoliceSystem.Config.MaxHandcuffDistance ^ 2
if not IsValid( target ) or not target:IsPlayer( ) or not target:Alive( ) or ply:EyePos( ):DistToSqr( target:GetPos( ) ) > unhandcuff_range_squared then return end
if not target:GetNWBool( "EPS_Handcuffed" ) then
ply:ChatPrint( "This person is not handcuffed." )
return
end
target:GetWeapon( "eps_handcuffed" ):Remove( )
end
function SWEP:Think( )
if not self.Target then -- Not handcuffing anyone.
return
end
if self.Target and not IsValid( self.Target ) then -- Target no longer exists, most likely because they disconnected or crashed.
self:Fail( )
return
end
local ply = self:GetOwner( )
local trace = ply:GetEyeTrace( )
local target = trace.Entity
if target ~= self.Target then -- The player is no longer looking at the target.
self:Fail( )
return
end
local handcuff_range_squared = EggrollPoliceSystem.Config.MaxHandcuffDistance ^ 2
if not target:GetNWBool( "EPS_Handcuffed" ) and ply:EyePos( ):DistToSqr( target:GetPos( ) ) <= handcuff_range_squared then
if CurTime( ) >= self:GetNWInt( "FinishHandcuffingTime" ) then
self:Success( )
end
else -- Fail if the player is already handcuffed or the distance between the player and the target is too large.
self:Fail( )
end
end
function SWEP:Holster( )
if self.Target then
self:Fail( )
end
return true
end
function SWEP:OnRemove( )
if self.Target then
self:Fail( )
end
end
|
concurrent = require 'concurrent'
concurrent.setoption('trapexit', true)
function ping(pid)
concurrent.register('ping', concurrent.self())
concurrent.link(pid)
while true do
concurrent.send(pid, { from = { 'ping', 'ping@localhost' },
body = 'ping' })
print('ping sent message to pong')
local msg = concurrent.receive(1000)
if msg and msg.signal == 'EXIT' then break end
print('ping received reply from pong')
end
print('ping received EXIT and exiting')
end
concurrent.spawn(ping, { 'pong', 'pong@localhost' })
concurrent.init('ping@localhost')
concurrent.loop()
concurrent.shutdown()
|
local M = {}
M.__index = M
local private = {}
local dir = (...):gsub('.[^%.]+$', '')
local ObjParser = require(dir..'.obj_parser')
require(dir..'.model_builder').inject(M)
local new_mesh = love.graphics.newMesh
M.mesh_format = {
{ 'VertexPosition', 'float', 3 },
{ 'VertexTexCoord', 'float', 2 },
{ 'VertexNormal', 'float', 3 },
}
M.instance_mesh_format = {
{ 'ModelPos', 'float', 3 },
{ 'ModelAngle', 'float', 3 },
{ 'ModelScale', 'float', 3 },
{ 'ModelAlbedo', 'byte', 4 },
{ 'ModelPhysics', 'byte', 4 },
}
M.default_opts = {
write_depth = true,
face_culling = 'back', -- 'back', 'front', 'none'
order = -1, -- -1 don't sort, must >= 0 for sort
instance_usage = 'dynamic', -- see love2d SpriteBatchUsage. dynamic, static, stream. defualt: dynamic
mesh_format = M.mesh_format,
instance_mesh_format = M.instance_mesh_format,
ext_pass_id = 0, -- for ext pass, 0 will disable ext pass
-- parser set_instances attrs and return a table value of instance attributes.
-- must match the `instance_mesh_format`
instance_attrs_parser = false,
}
M.default_opts.__index = M.default_opts
local default_rotation = { 0, 0, 0 }
local default_scale = { 1, 1, 1 }
local default_albedo = { 1, 1, 1, 1 }
local default_physics = { 0.5, 0.2 }
--------------------
function M.new(...)
local obj = setmetatable({}, M)
obj:init(...)
return obj
end
function M.load(path)
local data = ObjParser.parse_file(path)
local vertices = ObjParser.parse_face(data)
local m = M.new(vertices)
m.path = path
m.data = data
return m
end
function M.set_default_opts(opts)
for k, v in pairs(opts) do
if M.default_opts[k] ~= nil then
M.default_opts[k] = v
else
error("Invalid option "..k)
end
end
end
--------------------
-- new(vertices)
-- new(vertices, options)
-- new(vertices, texture)
-- new(vertices, texture, options)
-- vertices: { vertex1, vertex2, ..., vertex_map }
-- texture:
-- optsions:
-- write_depth:
-- face_culling: 'back' or 'front' or 'none'
-- instance_usage: see love2d SpriteBatchUsage. dynamic, static, stream. defualt: dynamic
-- mesh_format: custom the mesh format
-- instance_mesh_format: custom the instance mesh format
function M:init(vertices, texture, opts)
if not opts and type(texture) == 'table' then
opts, texture = texture, nil
end
local mesh_format = opts and opts.mesh_format or M.mesh_format
self.vertices = vertices
self.mesh = new_mesh(mesh_format, vertices, "triangles", 'static')
if vertices.vertex_map then
self.mesh:setVertexMap(vertices.vertex_map)
end
self.options = setmetatable({}, M.default_opts)
if texture then self:set_texture(texture) end
if opts then self:set_opts(opts) end
end
function M:set_opts(opts)
for k, v in pairs(opts) do
if M.default_opts[k] ~= nil then
self.options[k] = v
else
error("Invalid option "..k)
end
end
end
function M:set_texture(tex)
self.mesh:setTexture(tex)
end
-- attrs: { { coord = vec3, rotation = vec3, scale = number or vec3, albedo = vec3 or vec4, physics = vec2 }, ... }
-- coord is required, other is optionals
function M:set_instances(instances_attrs)
if #instances_attrs == 0 then error("Instances count cannot be 0") end
local parser = self.options.instance_attrs_parser or private.parse_instance_attrs
local raw_attrs = {}
for i, attrs in ipairs(instances_attrs) do
table.insert(raw_attrs, parser(attrs))
end
self:set_raw_instances(raw_attrs)
end
-- attrs: { instance1_attrs, instance2_attrs, ... }
-- format: mesh format
function M:set_raw_instances(attrs)
local tfs_mesh = self.instances_mesh
if tfs_mesh and self.total_instances >= #attrs then
tfs_mesh:setVertices(attrs)
else
local format = self.options.instance_mesh_format
tfs_mesh = new_mesh(format, attrs, nil, self.options.instance_usage)
for _, f in ipairs(format) do
self.mesh:attachAttribute(f[1], tfs_mesh, 'perinstance')
end
self.instances_mesh = tfs_mesh
end
self.total_instances = #attrs
end
function M:clone()
return M.new(self.vertices, self.mesh:getTexture(), self.options)
end
--------------------
-- attrs: { coord = vec3, rotation = vec3, scale = number or vec3, albedo = vec3 or vec4, physics = vec2 }
function private.parse_instance_attrs(attrs)
local x, y, z, rx, ry, rz, sx, sy, sz, ar, ag, ab, aa, pr, pm
local coord = attrs.coord
local rotation = attrs.rotation or default_rotation
local scale = attrs.scale or default_scale
local albedo = attrs.albedo or default_albedo
local physics = attrs.physics or default_physics
if coord.x then
x, y, z = coord.x, coord.y, coord.z
else
x, y, z = unpack(coord)
end
if rotation.x then
rx, ry, rz = rotation.x, rotation.y, rotation.z
else
rx, ry, rz = unpack(rotation)
end
if type(scale) == 'number' then
sx, sy, sz = scale, scale, scale
elseif scale.x then
sx, sy, sz = scale.x, scale.y, scale.z
else
sx, sy, sz = unpack(scale)
end
if albedo.r then
ar, ag, ab, aa = albedo.r, albedo.g, albedo.b, albedo.a
else
ar, ag, ab, aa = unpack(albedo)
end
if physics.roughness then
pr, pm = physics.roughness, physics.metallic
else
pr, pm = unpack(physics)
end
return {
x, y, z,
rx, ry, rz,
sx, sy, sz,
ar, ag, ab, aa or 1,
pr, pm
}
end
return M
|
-- TODO: add default configurations
local config = {}
-- default config
config.default = {
verbose = false,
}
return config |
local AddonName, AddonTable = ...
AddonTable.inscription = {
-- Inks
173059,
173058,
175970,
-- Optional Reagents
173161,
173160,
173162,
173163,
-- Books and Scrolls
173048,
173049,
173065,
-- Contracts
173062,
173051,
175924,
173053,
-- Cards
173066,
177875,
177876,
177873,
177874,
-- Vantus Runes
173067,
-- Staves
173428,
173054,
-- Off-Hands
173050,
-- Hats
180755,
-- Misc
177841,
177840,
177842,
177843,
-- Vendor Bought
175886,
}
|
-- This file is automatically generated, do not edit!
-- Item data (c) Grinding Gear Games
local itemBases = ...
itemBases["Iron Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 6, },
req = { str = 8, },
}
itemBases["Steel Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 32, },
req = { level = 9, str = 21, },
}
itemBases["Plated Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 77, },
req = { level = 23, str = 44, },
}
itemBases["Reinforced Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 109, },
req = { level = 33, str = 60, },
}
itemBases["Antique Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 122, },
req = { level = 37, str = 67, },
}
itemBases["Ancient Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 151, },
req = { level = 46, str = 82, },
}
itemBases["Goliath Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 177, },
req = { level = 54, str = 95, },
}
itemBases["Vaal Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 220, },
req = { level = 62, str = 117, },
}
itemBases["Titan Greaves"] = {
type = "Boots",
subType = "Armour",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_armour = true, },
armour = { ArmourBase = 241, },
req = { level = 68, str = 120, },
}
itemBases["Rawhide Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 13, },
req = { dex = 11, },
}
itemBases["Goathide Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 42, },
req = { level = 12, dex = 26, },
}
itemBases["Deerskin Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 74, },
req = { level = 22, dex = 42, },
}
itemBases["Nubuck Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 113, },
req = { level = 34, dex = 62, },
}
itemBases["Eelskin Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 129, },
req = { level = 39, dex = 70, },
}
itemBases["Sharkskin Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 145, },
req = { level = 44, dex = 79, },
}
itemBases["Shagreen Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 180, },
req = { level = 55, dex = 97, },
}
itemBases["Stealth Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 220, },
req = { level = 62, dex = 117, },
}
itemBases["Slink Boots"] = {
type = "Boots",
subType = "Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_armour = true, },
armour = { EvasionBase = 246, },
req = { level = 69, dex = 120, },
}
itemBases["Wool Shoes"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 4, },
req = { int = 11, },
}
itemBases["Velvet Slippers"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 8, },
req = { level = 9, int = 21, },
}
itemBases["Silk Slippers"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 15, },
req = { level = 22, int = 42, },
}
itemBases["Scholar Boots"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 21, },
req = { level = 32, int = 59, },
}
itemBases["Satin Slippers"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 25, },
req = { level = 38, int = 69, },
}
itemBases["Samite Slippers"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 29, },
req = { level = 44, int = 79, },
}
itemBases["Conjurer Boots"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 34, },
req = { level = 53, int = 94, },
}
itemBases["Arcanist Slippers"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 45, },
req = { level = 61, int = 119, },
}
itemBases["Sorcerer Boots"] = {
type = "Boots",
subType = "Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, int_armour = true, },
armour = { EnergyShieldBase = 49, },
req = { level = 67, int = 123, },
}
itemBases["Leatherscale Boots"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_dex_armour = true, },
armour = { ArmourBase = 12, EvasionBase = 12, },
req = { level = 6, str = 9, dex = 9, },
}
itemBases["Ironscale Boots"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_dex_armour = true, },
armour = { ArmourBase = 34, EvasionBase = 34, },
req = { level = 18, str = 19, dex = 19, },
}
itemBases["Bronzescale Boots"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_dex_armour = true, },
armour = { ArmourBase = 55, EvasionBase = 55, },
req = { level = 30, str = 30, dex = 30, },
}
itemBases["Steelscale Boots"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_dex_armour = true, },
armour = { ArmourBase = 65, EvasionBase = 65, },
req = { level = 36, str = 35, dex = 35, },
}
itemBases["Serpentscale Boots"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_dex_armour = true, },
armour = { ArmourBase = 76, EvasionBase = 76, },
req = { level = 42, str = 40, dex = 40, },
}
itemBases["Wyrmscale Boots"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_dex_armour = true, },
armour = { ArmourBase = 92, EvasionBase = 92, },
req = { level = 51, str = 48, dex = 48, },
}
itemBases["Hydrascale Boots"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_dex_armour = true, },
armour = { ArmourBase = 106, EvasionBase = 106, },
req = { level = 59, str = 56, dex = 56, },
}
itemBases["Dragonscale Boots"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_dex_armour = true, },
armour = { ArmourBase = 121, EvasionBase = 121, },
req = { level = 65, str = 62, dex = 62, },
}
itemBases["Two-Toned Boots (Armour/Evasion)"] = {
type = "Boots",
subType = "Armour/Evasion",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, not_for_sale = true, atlas_base_type = true, bootsatlas2 = true, str_dex_armour = true, },
implicit = "+(8-12)% to Fire and Cold Resistances",
armour = { ArmourBase = 126, EvasionBase = 126, },
req = { level = 70, str = 62, dex = 62, },
}
itemBases["Chain Boots"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_int_armour = true, },
armour = { ArmourBase = 11, EnergyShieldBase = 3, },
req = { level = 5, str = 8, int = 8, },
}
itemBases["Ringmail Boots"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_int_armour = true, },
armour = { ArmourBase = 25, EnergyShieldBase = 5, },
req = { level = 13, str = 15, int = 15, },
}
itemBases["Mesh Boots"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_int_armour = true, },
armour = { ArmourBase = 51, EnergyShieldBase = 10, },
req = { level = 28, str = 28, int = 28, },
}
itemBases["Riveted Boots"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_int_armour = true, },
armour = { ArmourBase = 65, EnergyShieldBase = 13, },
req = { level = 36, str = 35, int = 35, },
}
itemBases["Zealot Boots"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_int_armour = true, },
armour = { ArmourBase = 73, EnergyShieldBase = 14, },
req = { level = 40, str = 38, int = 38, },
}
itemBases["Soldier Boots"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_int_armour = true, },
armour = { ArmourBase = 88, EnergyShieldBase = 17, },
req = { level = 49, str = 47, int = 47, },
}
itemBases["Legion Boots"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_int_armour = true, },
armour = { ArmourBase = 104, EnergyShieldBase = 20, },
req = { level = 58, str = 54, int = 54, },
}
itemBases["Crusader Boots"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, str_int_armour = true, },
armour = { ArmourBase = 121, EnergyShieldBase = 24, },
req = { level = 64, str = 62, int = 62, },
}
itemBases["Two-Toned Boots (Armour/Energy Shield)"] = {
type = "Boots",
subType = "Armour/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, not_for_sale = true, atlas_base_type = true, bootsatlas3 = true, str_int_armour = true, },
implicit = "+(8-12)% to Fire and Lightning Resistances",
armour = { ArmourBase = 126, EnergyShieldBase = 24, },
req = { level = 70, str = 62, int = 62, },
}
itemBases["Wrapped Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 12, EnergyShieldBase = 3, },
req = { level = 6, dex = 9, int = 9, },
}
itemBases["Strapped Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 30, EnergyShieldBase = 6, },
req = { level = 16, dex = 18, int = 18, },
}
itemBases["Clasped Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 50, EnergyShieldBase = 10, },
req = { level = 27, dex = 27, int = 27, },
}
itemBases["Shackled Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 62, EnergyShieldBase = 12, },
req = { level = 34, dex = 34, int = 34, },
}
itemBases["Trapper Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 74, EnergyShieldBase = 15, },
req = { level = 41, dex = 40, int = 40, },
}
itemBases["Ambush Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 85, EnergyShieldBase = 17, },
req = { level = 47, dex = 45, int = 45, },
}
itemBases["Carnal Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 99, EnergyShieldBase = 19, },
req = { level = 55, dex = 52, int = 52, },
}
itemBases["Assassin's Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 121, EnergyShieldBase = 24, },
req = { level = 63, dex = 62, int = 62, },
}
itemBases["Murder Boots"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, dex_int_armour = true, },
armour = { EvasionBase = 185, EnergyShieldBase = 17, },
req = { level = 69, dex = 82, int = 42, },
}
itemBases["Two-Toned Boots (Evasion/Energy Shield)"] = {
type = "Boots",
subType = "Evasion/Energy Shield",
socketLimit = 4,
tags = { default = true, armour = true, boots = true, not_for_sale = true, atlas_base_type = true, bootsatlas1 = true, dex_int_armour = true, },
implicit = "+(8-12)% to Cold and Lightning Resistances",
armour = { EvasionBase = 126, EnergyShieldBase = 24, },
req = { level = 70, dex = 62, int = 62, },
}
itemBases["Golden Caligae"] = {
type = "Boots",
hidden = true,
socketLimit = 4,
tags = { default = true, armour = true, boots = true, not_for_sale = true, },
implicit = "+(8-16)% to all Elemental Resistances",
armour = { },
req = { level = 12, },
}
|
CATEGORY_NAME = "Chat"
------------------------------ tgag ------------------------------
function ulx.tgag( calling_ply, target_plys, minutes, should_ungag )
local players = player.GetAll()
for i=1, #target_plys do
local v = target_plys[ i ]
if should_ungag then
v.ulx_tgagged = nil
v:SetNWBool("ulx_gagged", nil)
else
if minutes == 0 then
v.ulx_tgagged = 0
else
v.ulx_tgagged = minutes*60 + os.time()
v:SetNWBool("ulx_gagged", v.ulx_tgagged)
end
end
if SERVER then
if should_ungag then
v:RemovePData( "tgag" )
else
v:SetPData( "tgag", v.ulx_tgagged )
end
end
end
if not should_ungag then
local time = "for #i minute(s)"
if minutes == 0 then time = "permanently" end
ulx.fancyLogAdmin( calling_ply, "#A tgagged #T " .. time, target_plys, minutes )
else
ulx.fancyLogAdmin( calling_ply, "#A untgagged #T", target_plys )
end
end
local tgag = ulx.command( CATEGORY_NAME, "ulx tgag", ulx.tgag, "!tgag" )
tgag:addParam{ type=ULib.cmds.PlayersArg }
tgag:addParam{ type=ULib.cmds.NumArg, hint="minutes, 0 for perma", ULib.cmds.optional, ULib.cmds.allowTimeString, min=0 }
tgag:addParam{ type=ULib.cmds.BoolArg, invisible=true }
tgag:defaultAccess( ULib.ACCESS_ADMIN )
tgag:help( "Timegag target(s), disables microphone for a given time." )
tgag:setOpposite( "ulx untgag", {_, _, _, true}, "!untgag" )
if SERVER then
function userAuthed( ply, stid, unid )
local minutesstr = ply:GetPData( "tgag", "" )
if minutesstr == "" then return end
local minutes = util.StringToType( minutesstr, "int")
if minutes == 0 or minutes > os.time() then
ply.ulx_tgagged = minutes
ply:SetNWBool("ulx_tgagged", ply.ulx_tgagged)
if minutes == 0 then
ULib.tsayColor( ply, "", Color( 255, 25, 25 ), "Notice: ", Color(151, 211, 255), "You have been permanently gagged, you will not be able to use your mic!" )
else
ULib.tsayColor( ply, "", Color( 255, 25, 25 ), "Notice: ", Color(151, 211, 255), "You have a timegag, you will not be able to use your mic before ", Color( 25, 255, 25 ), ""..(minutes-os.time()), Color(151, 211, 255), " minutes!" )
end
end
end
hook.Add( "PlayerAuthed", "tgagplayerauthed", userAuthed )
local function tgagHook( listener, talker )
if talker.ulx_tgagged and (talker.ulx_tgagged == 0 or talker.ulx_tgagged*60 > os.time()) then return false
end
end
hook.Add( "PlayerCanHearPlayersVoice", "ULXTGag", tgagHook )
end |
-------------------------------------------------------------------------------
-- Hook library
-------------------------------------------------------------------------------
--- Deals with hooks
-- @shared
local hook_library, _ = SF.Libraries.Register( "hook" )
local registered_instances = {}
--- Sets a hook function
-- @param hookname Name of the event
-- @param name Unique identifier
-- @param func Function to run
function hook_library.add ( hookname, name, func )
SF.CheckType( hookname, "string" )
SF.CheckType( name, "string" )
if func then SF.CheckType( func, "function" ) else return end
local inst = SF.instance
local hooks = inst.hooks[ hookname:lower() ]
if not hooks then
hooks = {}
inst.hooks[ hookname:lower() ] = hooks
end
hooks[ name ] = func
registered_instances[ inst ] = true
end
--- Run a hook
-- @shared
-- @param hookname The hook name
-- @param ... arguments
function hook_library.run ( hookname, ... )
SF.CheckType( hookname, "string" )
local instance = SF.instance
local lower = hookname:lower()
SF.instance = nil -- Pretend we're not running an instance
local ret = { instance:runScriptHookForResult( lower, ... ) }
SF.instance = instance -- Set it back
local ok = table.remove( ret, 1 )
if not ok then
instance:Error( "Hook '" .. lower .. "' errored with " .. ret[ 1 ], ret[ 2 ] )
return
end
return unpack( ret )
end
--- Remote hook.
-- This hook can be called from other instances
-- @name remote
-- @class hook
-- @shared
-- @param sender The entity that caused the hook to run
-- @param owner The owner of the sender
-- @param ... The payload that was supplied when calling the hook
--- Run a hook remotely.
-- This will call the hook "remote" on either a specified entity or all instances on the server/client
-- @shared
-- @param recipient Starfall entity to call the hook on. Nil to run on every starfall entity
-- @param ... Payload. These parameters will be used to call the hook functions
-- @return tbl A list of the resultset of each called hook
function hook_library.runRemote ( recipient, ... )
if recipient then SF.CheckType( recipient, SF.Entities.Metatable ) end
local recipients
if recipient then
local ent = SF.Entities.Unwrap( recipient )
if not ent.instance then SF.throw( "Entity has no starfall instance", 2 ) end
recipients = {
[ ent.instance ] = true
}
else
recipients = registered_instances
end
local instance = SF.instance
local result = {}
for k, _ in pairs( recipients ) do
SF.instance = nil
res = { k:runScriptHookForResult( "remote", SF.WrapObject( instance.data.entity ), SF.WrapObject( instance.player ), ... ) }
local ok = table.remove( res, 1 )
if not res[ 1 ] then continue end -- Call failed because of non-existent hook. Ignore
if not ok then
k:Error( "Hook 'remote' errored with " .. res[ 1 ], res[ 2 ] )
-- Their fault - don't return
else
table.insert( result, res )
end
end
SF.instance = instance
return result
end
--- Remove a hook
-- @shared
-- @param hookname The hook name
-- @param name The unique name for this hook
function hook_library.remove ( hookname, name )
SF.CheckType( hookname, "string" )
SF.CheckType( name, "string" )
local instance = SF.instance
local lower = hookname:lower()
if instance.hooks[ lower ] then
instance.hooks[ lower ][ name ] = nil
if not next( instance.hooks[ lower ] ) then
instance.hooks[ lower ] = nil
end
end
if not next( instance.hooks ) then
registered_instances[ instance ] = nil
end
end
SF.Libraries.AddHook( "deinitialize", function ( instance )
registered_instances[ instance ] = nil
end )
SF.Libraries.AddHook( "cleanup", function ( instance, name, func, err )
if name == "_runFunction" and err == true then
registered_instances[ instance ] = nil
instance.hooks = {}
end
end)
local wrapArguments = SF.Sanitize
local function run ( hookname, customfunc, ... )
local result = {}
for instance,_ in pairs( registered_instances ) do
local ret = { instance:runScriptHookForResult( hookname, wrapArguments( ... ) ) }
local ok = table.remove( ret, 1 )
if ok then
if customfunc then
local sane = customfunc( instance, ret, ... )
result = sane ~= nil and { sane } or result
end
else
instance:Error( "Hook '" .. hookname .. "' errored with " .. ret[ 1 ], ret[ 2 ] )
end
end
return unpack( result )
end
local hooks = {}
--- Add a GMod hook so that SF gets access to it
-- @shared
-- @param hookname The hook name. In-SF hookname will be lowercased
-- @param customfunc Optional custom function
function SF.hookAdd ( hookname, customfunc )
hooks[ #hooks + 1 ] = hookname
local lower = hookname:lower()
hook.Add( hookname, "SF_" .. hookname, function ( ... )
return run( lower, customfunc, ... )
end )
end
local add = SF.hookAdd
if SERVER then
-- Server hooks
add( "GravGunOnPickedUp" )
add( "GravGunOnDropped" )
add( "OnPhysgunFreeze" )
add( "OnPhysgunReload" )
add( "PlayerDeath" )
add( "PlayerDisconnected" )
add( "PlayerInitialSpawn" )
add( "PlayerSpawn" )
add( "PlayerLeaveVehicle" )
add( "PlayerSay", function ( instance, args, ply )
if instance.player ~= ply then return end
if args then return args[ 1 ] end
end )
add( "PlayerSpray" )
add( "PlayerUse" )
add( "PlayerSwitchFlashlight" )
else
-- Client hooks
-- todo
end
-- Shared hooks
-- Player hooks
add( "PlayerHurt" )
add( "PlayerNoClip" )
add( "KeyPress" )
add( "KeyRelease" )
add( "GravGunPunt" )
add( "PhysgunPickup" )
add( "PhysgunDrop" )
-- Entity hooks
add( "OnEntityCreated" )
add( "EntityRemoved" )
-- Other
add( "EndEntityDriving" )
add( "StartEntityDriving" )
--- Called when an entity is being picked up by a gravity gun
-- @name GravGunOnPickedUp
-- @class hook
-- @server
-- @param ply Player picking up an object
-- @param ent Entity being picked up
--- Called when an entity is being dropped by a gravity gun
-- @name GravGunOnDropped
-- @class hook
-- @server
-- @param ply Player dropping the object
-- @param ent Entity being dropped
--- Called when an entity is being frozen
-- @name OnPhysgunFreeze
-- @class hook
-- @server
-- @param physgun Entity of the physgun
-- @param physobj PhysObj of the entity
-- @param ent Entity being frozen
-- @param ply Player freezing the entity
--- Called when a player reloads his physgun
-- @name OnPhysgunReload
-- @class hook
-- @server
-- @param physgun Entity of the physgun
-- @param ply Player reloading the physgun
--- Called when a player dies
-- @name PlayerDeath
-- @class hook
-- @server
-- @param ply Player who died
-- @param inflictor Entity used to kill the player
-- @param attacker Entity that killed the player
--- Called when a player disconnects
-- @name PlayerDisconnected
-- @class hook
-- @server
-- @param ply Player that disconnected
--- Called when a player spawns for the first time
-- @name PlayerInitialSpawn
-- @param player Player who spawned
-- @server
--- Called when a player spawns
-- @name PlayerSpawn
-- @class hook
-- @server
-- @param player Player who spawned
--- Called when a players leaves a vehicle
-- @name PlayerLeaveVehicle
-- @class hook
-- @server
-- @param ply Player who left a vehicle
-- @param vehicle Vehicle that was left
--- Called when a player sends a chat message
-- @name PlayerSay
-- @class hook
-- @server
-- @param ply Player that sent the message
-- @param text Content of the message
-- @param teamChat True if team chat
-- @return New text. "" to stop from displaying. Nil to keep original.
--- Called when a players sprays his logo
-- @name PlayerSpray
-- @class hook
-- @server
-- @param ply Player that sprayed
--- Called when a player holds their use key and looks at an entity.
-- Will continuously run.
-- @name PlayerUse
-- @server
-- @class hook
-- @param ply Player using the entity
-- @param ent Entity being used
--- Called when a players turns their flashlight on or off
-- @name PlayerSwitchFlashlight
-- @class hook
-- @server
-- @param ply Player switching flashlight
-- @param state New flashlight state. True if on.
--- Called when a player gets hurt
-- @name PlayerHurt
-- @class hook
-- @shared
-- @param ply Player being hurt
-- @param attacker Entity causing damage to the player
-- @param newHealth New health of the player
-- @param damageTaken Amount of damage the player has taken
--- Called when a player toggles noclip
-- @name PlayerNoClip
-- @class hook
-- @shared
-- @param ply Player toggling noclip
-- @param newState New noclip state. True if on.
--- Called when a player presses a key
-- @name KeyPress
-- @class hook
-- @shared
-- @param ply Player pressing the key
-- @param key The key being pressed
--- Called when a player releases a key
-- @name KeyRelease
-- @class hook
-- @shared
-- @param ply Player releasing the key
-- @param key The key being released
--- Called when a player punts with the gravity gun
-- @name GravGunPunt
-- @class hook
-- @shared
-- @param ply Player punting the gravgun
-- @param ent Entity being punted
--- Called when an entity gets picked up by a physgun
-- @name PhysgunPickup
-- @class hook
-- @shared
-- @param ply Player picking up the entity
-- @param ent Entity being picked up
--- Called when an entity being held by a physgun gets dropped
-- @name PhysgunDrop
-- @class hook
-- @shared
-- @param ply Player droppig the entity
-- @param ent Entity being dropped
--- Called when an entity gets created
-- @name OnEntityCreated
-- @class hook
-- @shared
-- @param ent New entity
--- Called when an entity is removed
-- @name EntityRemoved
-- @class hook
-- @shared
-- @param ent Entity being removed
--- Called when a player stops driving an entity
-- @name EndEntityDriving
-- @class hook
-- @shared
-- @param ent Entity that had been driven
-- @param ply Player that drove the entity
--- Called when a player starts driving an entity
-- @name StartEntityDriving
-- @class hook
-- @shared
-- @param ent Entity being driven
-- @param Player that is driving the entity
--- Called when the starfall chip is removed
-- @name Removed
-- @class hook
-- @server
|
local p = require('pretty-print').prettyPrint
local Object = {
name = "Play",
usage = "play url or a search for youtube music",
cmdNames = {'play','ply','paly','plya','pley','p'},
dependsOnMod = "YoutubeHelper"
}
function Object.callback(self,args,rawarg)
if self.dependsOnMod then if not _G[self.dependsOnMod] then return false, "The Music module failed to load or was disabled" end end
if not args[1] then return false, "Can't find url or search keys" end
if not args.msg.member.voiceChannel then return false, "You're not in a voice channel inside this discord guild!" end
return Music:addToQueue(args,args.msg.author,args.msg.channel,args.msg.member.voiceChannel, rawarg.guild.id)
end
function Object:__init()
end
return Object |
local streak = nil
local titleLabel = nil
local subtitleLabel = nil
local s = CCDirector:sharedDirector():getWinSize()
local scheduler = CCDirector:sharedDirector():getScheduler()
local firstTick = nil
local function modeCallback(sender)
fastMode = streak:isFastMode()
if fastMode == true then
streak:setFastMode(false)
else
streak:setFastMode(true)
end
end
local function getBaseLayer()
local layer = CCLayer:create()
local itemMode = CCMenuItemToggle:create(CCMenuItemFont:create("Use High Quality Mode"))
itemMode:addSubItem(CCMenuItemFont:create("Use Fast Mode"))
itemMode:registerScriptTapHandler(modeCallback)
local menuMode = CCMenu:create()
menuMode:addChild(itemMode)
menuMode:setPosition(ccp(s.width / 2, s.height / 4))
layer:addChild(menuMode)
Helper.initWithLayer(layer)
return layer
end
-----------------------------------
-- MotionStreakTest1
-----------------------------------
local root = nil
local target = nil
local MotionStreakTest1_entry = nil
local function MotionStreakTest1_update(dt)
if firstTick == true then
firstTick = false
return
end
streak:setPosition(target:convertToWorldSpace(ccp(0, 0)))
end
local function MotionStreakTest1_onEnterOrExit(tag)
if tag == "enter" then
MotionStreakTest1_entry = scheduler:scheduleScriptFunc(MotionStreakTest1_update, 0, false)
elseif tag == "exit" then
scheduler:unscheduleScriptEntry(MotionStreakTest1_entry)
end
end
local function MotionStreakTest1()
local layer = getBaseLayer()
root = CCSprite:create(s_pPathR1)
layer:addChild(root, 1)
root:setPosition(ccp(s.width / 2, s.height / 2))
target = CCSprite:create(s_pPathR1)
root:addChild(target)
target:setPosition(ccp(s.width / 4, 0))
streak = CCMotionStreak:create(2, 3, 32, ccc3(0, 255, 0), s_streak)
layer:addChild(streak)
local a1 = CCRotateBy:create(2, 360)
local action1 = CCRepeatForever:create(a1)
local motion = CCMoveBy:create(2, CCPointMake(100,0))
root:runAction(CCRepeatForever:create(CCSequence:createWithTwoActions(motion, motion:reverse())))
root:runAction(action1)
local array = CCArray:create()
array:addObject(CCTintTo:create(0.2, 255, 0, 0))
array:addObject(CCTintTo:create(0.2, 0, 255, 0))
array:addObject(CCTintTo:create(0.2, 0, 0, 255))
array:addObject(CCTintTo:create(0.2, 0, 255, 255))
array:addObject(CCTintTo:create(0.2, 255, 255, 0))
array:addObject(CCTintTo:create(0.2, 255, 255, 255))
local colorAction = CCRepeatForever:create(CCSequence:create(array))
streak:runAction(colorAction)
firstTick = true
layer:registerScriptHandler(MotionStreakTest1_onEnterOrExit)
Helper.titleLabel:setString("MotionStreak test 1")
return layer
end
-----------------------------------
-- MotionStreakTest2
-----------------------------------
local function MotionStreakTest2()
local layer = getBaseLayer()
streak = CCMotionStreak:create(3, 3, 64, ccc3(255, 255, 255), s_streak)
layer:addChild(streak)
streak:setPosition(CCPointMake(s.width / 2, s.height / 2))
local function onTouchMoved(x, y)
if firstTick == true then
firstTick = false
return
end
streak:setPosition(ccp(x, y))
end
local function onTouch(eventType, x, y)
if eventType == "began" then
return true
elseif eventType == "moved" then
return onTouchMoved(x, y)
end
end
firstTick = true
layer:setTouchEnabled(true)
layer:registerScriptTouchHandler(onTouch)
Helper.titleLabel:setString("MotionStreak test")
return layer
end
-----------------------------------
-- Issue1358
-----------------------------------
local Issue1358_entry = nil
local center = nil
local fAngle = nil
local fRadius = nil
local function Issue1358_update(dt)
if firstTick == true then
firstTick = false
return
end
fAngle = fAngle + 1.0
streak:setPosition(
ccp(center.x + math.cos(fAngle / 180 * math.pi) * fRadius, center.y + math.sin(fAngle/ 180 * math.pi) * fRadius))
end
local function Issue1358_onEnterOrExit(tag)
if tag == "enter" then
Issue1358_entry = scheduler:scheduleScriptFunc(Issue1358_update, 0, false)
elseif tag == "exit" then
scheduler:unscheduleScriptEntry(Issue1358_entry)
end
end
local function Issue1358()
local layer = getBaseLayer()
streak = CCMotionStreak:create(2.0, 1.0, 50.0, ccc3(255, 255, 0), "Images/Icon.png")
layer:addChild(streak)
center = ccp(s.width / 2, s.height / 2)
fRadius = s.width / 3
fAngle = 0
firstTick = true
layer:registerScriptHandler(Issue1358_onEnterOrExit)
Helper.titleLabel:setString("Issue 1358")
Helper.subtitleLabel:setString("The tail should use the texture")
return layer
end
function MotionStreakTest()
local scene = CCScene:create()
Helper.createFunctionTable = {
MotionStreakTest1,
MotionStreakTest2,
Issue1358
}
scene:addChild(MotionStreakTest1())
scene:addChild(CreateBackMenuItem())
return scene
end
|
return _csharp_getType("io.LuaFileInfo"); |
workspace "AdakiteEngine"
architecture "x64"
startproject "Sandbox"
configurations{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "AdakiteEngine"
location "AdakiteEngine"
kind "SharedLib"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files{
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp",
"%{prj.name}/src/**.c"
}
includedirs{
"%{prj.name}/src",
"%{prj.name}/vendor/spdlog/include",
"%{prj.name}/vendor/GLFW/include"
}
links{
"glfw3.lib",
"opengl32.lib"
}
filter "system:windows"
cppdialect "C++17"
staticruntime "On"
systemversion "latest"
defines{
"ADK_PLATFORM_WINDOWS",
"ADK_BUILD_DLL",
"_CONSOLE"
}
postbuildcommands{
("{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Sandbox")
}
filter "configurations:Debug"
defines {"ADK_DEBUG", "_DEBUG"}
buildoptions "/MTd"
symbols "On"
libdirs "%{prj.name}/vendor/GLFW/libsD"
filter "configurations:Release"
defines {"ADK_RELEASE", "_DEBUG"}
buildoptions "/MTd"
optimize "On"
libdirs "%{prj.name}/vendor/GLFW/libsD"
filter "configurations:Dist"
defines {"ADK_DIST", "NDEBUG"}
buildoptions "/MT"
optimize "On"
libdirs "%{prj.name}/vendor/GLFW/libs"
project "Sandbox"
location "Sandbox"
kind "ConsoleApp"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files{
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp"
}
includedirs{
"AdakiteEngine/vendor/spdlog/include",
"AdakiteEngine/src"
}
links{
"AdakiteEngine"
}
filter "system:windows"
cppdialect "C++17"
staticruntime "On"
systemversion "latest"
defines{
"ADK_PLATFORM_WINDOWS",
"_CONSOLE"
}
filter "configurations:Debug"
defines {"ADK_DEBUG", "_DEBUG"}
symbols "On"
buildoptions "/MTd"
filter "configurations:Release"
defines {"ADK_RELEASE", "_DEBUG"}
optimize "On"
buildoptions "/MTd"
filter "configurations:Dist"
defines {"ADK_DIST", "NDEBUG"}
optimize "On"
buildoptions "/MT" |
---------------------------------------------------------------------------
--- Modified Prompt module.
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2008 Julien Danjou
---------------------------------------------------------------------------
local akey = require("awful.key")
local keygrabber = require("awful.keygrabber")
local gobject = require("gears.object")
local gdebug = require('gears.debug')
local gtable = require("gears.table")
local gcolor = require("gears.color")
local gstring = require("gears.string")
local gfs = require("gears.filesystem")
local wibox = require("wibox")
local beautiful = require("beautiful")
local io = io
local table = table
local math = math
local ipairs = ipairs
local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1)
local capi = { selection = selection }
local prompt = { mt = {} }
--- Private data
local data = {}
data.history = {}
local function itera(inc,a, i)
i = i + inc
local v = a[i]
if v then return i,v end
end
local function history_check_load(id, max)
if id and id ~= "" and not data.history[id] then
data.history[id] = { max = 50, table = {} }
if max then
data.history[id].max = max
end
local f = io.open(id, "r")
if not f then return end
-- Read history file
for line in f:lines() do
if gtable.hasitem(data.history[id].table, line) == nil then
table.insert(data.history[id].table, line)
if #data.history[id].table >= data.history[id].max then
break
end
end
end
f:close()
end
end
local function is_word_char(c)
if string.find(c, "[{[(,.:;_-+=@/ ]") then
return false
else
return true
end
end
local function cword_start(s, pos)
local i = pos
if i > 1 then
i = i - 1
end
while i >= 1 and not is_word_char(s:sub(i, i)) do
i = i - 1
end
while i >= 1 and is_word_char(s:sub(i, i)) do
i = i - 1
end
if i <= #s then
i = i + 1
end
return i
end
local function cword_end(s, pos)
local i = pos
while i <= #s and not is_word_char(s:sub(i, i)) do
i = i + 1
end
while i <= #s and is_word_char(s:sub(i, i)) do
i = i + 1
end
return i
end
local function history_save(id)
if data.history[id] then
gfs.make_parent_directories(id)
local f = io.open(id, "w")
if not f then
gdebug.print_warning("Failed to write the history to "..id)
return
end
for i = 1, math.min(#data.history[id].table, data.history[id].max) do
f:write(data.history[id].table[i] .. "\n")
end
f:close()
end
end
local function history_items(id)
if data.history[id] then
return #data.history[id].table
else
return -1
end
end
local function history_add(id, command)
if data.history[id] and command ~= "" then
local index = gtable.hasitem(data.history[id].table, command)
if index == nil then
table.insert(data.history[id].table, command)
-- Do not exceed our max_cmd
if #data.history[id].table > data.history[id].max then
table.remove(data.history[id].table, 1)
end
history_save(id)
else
-- Bump this command to the end of history
table.remove(data.history[id].table, index)
table.insert(data.history[id].table, command)
history_save(id)
end
end
end
local function have_multibyte_char_at(text, position)
return text:sub(position, position):wlen() == -1
end
local function prompt_text_with_cursor(args)
local char, spacer, text_start, text_end, ret
local text = args.text or ""
local _prompt = args.prompt or ""
local underline = args.cursor_ul or "none"
if args.select_all then
if #text == 0 then char = " " else char = gstring.xml_escape(text) end
spacer = " "
text_start = ""
text_end = ""
elseif #text < args.cursor_pos then
char = " "
spacer = ""
text_start = gstring.xml_escape(text)
text_end = ""
else
local offset = 0
if have_multibyte_char_at(text, args.cursor_pos) then
offset = 1
end
char = gstring.xml_escape(text:sub(args.cursor_pos, args.cursor_pos + offset))
spacer = " "
text_start = gstring.xml_escape(text:sub(1, args.cursor_pos - 1))
text_end = gstring.xml_escape(text:sub(args.cursor_pos + 1 + offset))
end
local cursor_color = gcolor.ensure_pango_color(args.cursor_color)
local text_color = gcolor.ensure_pango_color(args.text_color)
if args.highlighter then
text_start, text_end = args.highlighter(text_start, text_end)
end
ret = _prompt .. text_start .. "<span background=\"" .. cursor_color ..
"\" foreground=\"" .. text_color .. "\" underline=\"" .. underline ..
"\">" .. char .. "</span>" .. text_end .. spacer
return ret
end
local function update(self)
self.textbox:set_font(self.font)
self.textbox:set_markup(prompt_text_with_cursor{
text = self.command, text_color = self.fg_cursor, cursor_color = self.bg_cursor,
cursor_pos = self._private_cur_pos, cursor_ul = self.ul_cursor, select_all = self.select_all,
prompt = self.prompt, highlighter = self.highlighter })
end
local function exec(self, cb, command_to_history)
self.textbox:set_markup("")
history_add(self.history_path, command_to_history)
keygrabber.stop(self._private.grabber)
if cb then cb(self.command) end
if self.done_callback then
self.done_callback()
end
end
function prompt:start()
-- The cursor position
if self.reset_on_stop == true or self._private_cur_pos == nil then
self._private_cur_pos = (self.select_all and 1) or self.text:wlen() + 1
end
if self.reset_on_stop == true then self.text = "" self.command = "" end
self.textbox:set_font(self.font)
self.textbox:set_markup(prompt_text_with_cursor{
text = self.reset_on_stop and self.text or self.command, text_color = self.fg_cursor, cursor_color = self.bg_cursor,
cursor_pos = self._private_cur_pos, cursor_ul = self.ul_cursor, select_all = self.select_all,
prompt = self.prompt, highlighter = self.highlighter})
self._private.search_term = nil
history_check_load(self.history_path, self.history_max)
local history_index = history_items(self.history_path) + 1
-- The completion element to use on completion request.
local ncomp = 1
local command_before_comp
local cur_pos_before_comp
self._private.grabber = keygrabber.run(function(modifiers, key, event)
-- Convert index array to hash table
local mod = {}
for _, v in ipairs(modifiers) do mod[v] = true end
if event ~= "press" then
if self.keyreleased_callback then
self.keyreleased_callback(mod, key, self.command)
end
return
end
-- Call the user specified callback. If it returns true as
-- the first result then return from the function. Treat the
-- second and third results as a new command and new prompt
-- to be set (if provided)
if self.keypressed_callback then
local user_catched, new_command, new_prompt =
self.keypressed_callback(mod, key, self.command)
if new_command or new_prompt then
if new_command then
self.command = new_command
end
if new_prompt then
self.prompt = new_prompt
end
update(self)
end
if user_catched then
if self.changed_callback then
self.changed_callback(self.command)
end
return
end
end
local filtered_modifiers = {}
-- User defined cases
if self.hooks[key] then
-- Remove caps and num lock
for _, m in ipairs(modifiers) do
if not gtable.hasitem(akey.ignore_modifiers, m) then
table.insert(filtered_modifiers, m)
end
end
for _,v in ipairs(self.hooks[key]) do
if #filtered_modifiers == #v[1] then
local match = true
for _,v2 in ipairs(v[1]) do
match = match and mod[v2]
end
if match then
local cb
local ret, quit = v[3](self.command)
local original_command = self.command
-- Support both a "simple" and a "complex" way to
-- control if the prompt should quit.
quit = quit == nil and (ret ~= true) or (quit~=false)
-- Allow the callback to change the command
self.command = (ret ~= true) and ret or self.command
-- Quit by default, but allow it to be disabled
if ret and type(ret) ~= "boolean" then
cb = self.exe_callback
if not quit then
self._private_cur_pos = ret:wlen() + 1
update(self)
end
elseif quit then
-- No callback.
cb = function() end
end
-- Execute the callback
if cb then
exec(self, cb, original_command)
end
return
end
end
end
end
-- Get out cases
if (mod.Control and (key == "c" or key == "g"))
or (not mod.Control and key == "Escape") then
self:stop()
return false
elseif (mod.Control and (key == "j" or key == "m"))
-- or (not mod.Control and key == "Return")
-- or (not mod.Control and key == "KP_Enter")
then
exec(self, self.exe_callback, self.command)
-- We already unregistered ourselves so we don't want to return
-- true, otherwise we may unregister someone else.
return
end
-- Control cases
if mod.Control then
self.select_all = nil
if key == "v" then
local selection = capi.selection()
if selection then
-- Remove \n
local n = selection:find("\n")
if n then
selection = selection:sub(1, n - 1)
end
self.command = self.command:sub(1, self._private_cur_pos - 1) .. selection .. self.command:sub(self._private_cur_pos)
self._private_cur_pos = self._private_cur_pos + #selection
end
elseif key == "a" then
self._private_cur_pos = 1
elseif key == "b" then
if self._private_cur_pos > 1 then
self._private_cur_pos = self._private_cur_pos - 1
if have_multibyte_char_at(self.command, self._private_cur_pos) then
self._private_cur_pos = self._private_cur_pos - 1
end
end
elseif key == "d" then
if self._private_cur_pos <= #self.command then
self.command = self.command:sub(1, self._private_cur_pos - 1) .. self.command:sub(self._private_cur_pos + 1)
end
elseif key == "p" then
if history_index > 1 then
history_index = history_index - 1
self.command = data.history[self.history_path].table[history_index]
self._private_cur_pos = #self.command + 2
end
elseif key == "n" then
if history_index < history_items(self.history_path) then
history_index = history_index + 1
self.command = data.history[self.history_path].table[history_index]
self._private_cur_pos = #self.command + 2
elseif history_index == history_items(self.history_path) then
history_index = history_index + 1
self.command = ""
self._private_cur_pos = 1
end
elseif key == "e" then
self._private_cur_pos = #self.command + 1
elseif key == "r" then
self._private.search_term = self._private.search_term or self.command:sub(1, self._private_cur_pos - 1)
for i,v in (function(a,i) return itera(-1,a,i) end), data.history[self.history_path].table, history_index do
if v:find(self._private.search_term,1,true) ~= nil then
self.command=v
history_index=i
self._private_cur_pos=#self.command+1
break
end
end
elseif key == "s" then
self._private.search_term = self._private.search_term or self.command:sub(1, self._private_cur_pos - 1)
for i,v in (function(a,i) return itera(1,a,i) end), data.history[self.history_path].table, history_index do
if v:find(self._private.search_term,1,true) ~= nil then
self.command=v
history_index=i
self._private_cur_pos=#self.command+1
break
end
end
elseif key == "f" then
if self._private_cur_pos <= #self.command then
if have_multibyte_char_at(self.command, self._private_cur_pos) then
self._private_cur_pos = self._private_cur_pos + 2
else
self._private_cur_pos = self._private_cur_pos + 1
end
end
elseif key == "h" then
if self._private_cur_pos > 1 then
local offset = 0
if have_multibyte_char_at(self.command, self._private_cur_pos - 1) then
offset = 1
end
self.command = self.command:sub(1, self._private_cur_pos - 2 - offset) .. self.command:sub(self._private_cur_pos)
self._private_cur_pos = self._private_cur_pos - 1 - offset
end
elseif key == "k" then
self.command = self.command:sub(1, self._private_cur_pos - 1)
elseif key == "u" then
self.command = self.command:sub(self._private_cur_pos, #self.command)
self._private_cur_pos = 1
elseif key == "Prior" then
self._private.search_term = self.command:sub(1, self._private_cur_pos - 1) or ""
for i,v in (function(a,i) return itera(-1,a,i) end), data.history[self.history_path].table, history_index do
if v:find(self._private.search_term,1,true) == 1 then
self.command=v
history_index=i
break
end
end
elseif key == "Next" then
self._private.search_term = self.command:sub(1, self._private_cur_pos - 1) or ""
for i,v in (function(a,i) return itera(1,a,i) end), data.history[self.history_path].table, history_index do
if v:find(self._private.search_term,1,true) == 1 then
self.command=v
history_index=i
break
end
end
elseif key == "w" or key == "BackSpace" then
local wstart = 1
local wend = 1
local cword_start_pos = 1
local cword_end_pos = 1
while wend < self._private_cur_pos do
wend = self.command:find("[{[(,.:;_-+=@/ ]", wstart)
if not wend then wend = #self.command + 1 end
if self._private_cur_pos >= wstart and self._private_cur_pos <= wend + 1 then
cword_start_pos = wstart
cword_end_pos = self._private_cur_pos - 1
break
end
wstart = wend + 1
end
self.command = self.command:sub(1, cword_start_pos - 1) .. self.command:sub(cword_end_pos + 1)
self._private_cur_pos = cword_start_pos
elseif key == "Delete" then
-- delete from history only if:
-- we are not dealing with a new command
-- the user has not edited an existing entry
if self.command == data.history[self.history_path].table[history_index] then
table.remove(data.history[self.history_path].table, history_index)
if history_index <= history_items(self.history_path) then
self.command = data.history[self.history_path].table[history_index]
self._private_cur_pos = #self.command + 2
elseif history_index > 1 then
history_index = history_index - 1
self.command = data.history[self.history_path].table[history_index]
self._private_cur_pos = #self.command + 2
else
self.command = ""
self._private_cur_pos = 1
end
end
end
elseif mod.Mod1 or mod.Mod3 then
if key == "b" then
self._private_cur_pos = cword_start(self.command, self._private_cur_pos)
elseif key == "f" then
self._private_cur_pos = cword_end(self.command, self._private_cur_pos)
elseif key == "d" then
self.command = self.command:sub(1, self._private_cur_pos - 1) .. self.command:sub(cword_end(self.command, self._private_cur_pos))
elseif key == "BackSpace" then
local wstart = cword_start(self.command, self._private_cur_pos)
self.command = self.command:sub(1, wstart - 1) .. self.command:sub(self._private_cur_pos)
self._private_cur_pos = wstart
end
else
if self.completion_callback then
if key == "Tab" or key == "ISO_Left_Tab" then
if key == "ISO_Left_Tab" or mod.Shift then
if ncomp == 1 then return end
if ncomp == 2 then
self.command = command_before_comp
self.textbox:set_font(self.font)
self.textbox:set_markup(prompt_text_with_cursor{
text = command_before_comp, text_color = self.fg_cursor, cursor_color = self.bg_cursor,
cursor_pos = self._private_cur_pos, cursor_ul = self.ul_cursor, select_all = self.select_all,
prompt = self.prompt })
self._private_cur_pos = cur_pos_before_comp
ncomp = 1
return
end
ncomp = ncomp - 2
elseif ncomp == 1 then
command_before_comp = self.command
cur_pos_before_comp = self._private_cur_pos
end
local matches
self.command, self._private_cur_pos, matches = self.completion_callback(command_before_comp, cur_pos_before_comp, ncomp)
ncomp = ncomp + 1
key = ""
-- execute if only one match found and autoexec flag set
if matches and #matches == 1 and args.autoexec then
exec(self, self.exe_callback)
return
end
elseif key ~= "Shift_L" and key ~= "Shift_R" then
ncomp = 1
end
end
-- Typin cases
if mod.Shift and key == "Insert" then
local selection = capi.selection()
if selection then
-- Remove \n
local n = selection:find("\n")
if n then
selection = selection:sub(1, n - 1)
end
self.command = self.command:sub(1, self._private_cur_pos - 1) .. selection .. self.command:sub(self._private_cur_pos)
self._private_cur_pos = self._private_cur_pos + #selection
end
elseif key == "Home" then
self._private_cur_pos = 1
elseif key == "End" then
self._private_cur_pos = #self.command + 1
elseif key == "BackSpace" then
if self._private_cur_pos > 1 then
local offset = 0
if have_multibyte_char_at(self.command, self._private_cur_pos - 1) then
offset = 1
end
self.command = self.command:sub(1, self._private_cur_pos - 2 - offset) .. self.command:sub(self._private_cur_pos)
self._private_cur_pos = self._private_cur_pos - 1 - offset
end
elseif key == "Delete" then
self.command = self.command:sub(1, self._private_cur_pos - 1) .. self.command:sub(self._private_cur_pos + 1)
elseif key == "Left" then
self._private_cur_pos = self._private_cur_pos - 1
elseif key == "Right" then
self._private_cur_pos = self._private_cur_pos + 1
elseif key == "Prior" then
if history_index > 1 then
history_index = history_index - 1
self.command = data.history[self.history_path].table[history_index]
self._private_cur_pos = #self.command + 2
end
elseif key == "Next" then
if history_index < history_items(self.history_path) then
history_index = history_index + 1
self.command = data.history[self.history_path].table[history_index]
self._private_cur_pos = #self.command + 2
elseif history_index == history_items(self.history_path) then
history_index = history_index + 1
self.command = ""
self._private_cur_pos = 1
end
else
-- wlen() is UTF-8 aware but #key is not,
-- so check that we have one UTF-8 char but advance the cursor of # position
if key:wlen() == 1 then
if self.select_all then self.command = "" end
self.command = self.command:sub(1, self._private_cur_pos - 1) .. key .. self.command:sub(self._private_cur_pos)
self._private_cur_pos = self._private_cur_pos + #key
end
end
if self._private_cur_pos < 1 then
self._private_cur_pos = 1
elseif self._private_cur_pos > #self.command + 1 then
self._private_cur_pos = #self.command + 1
end
self.select_all = nil
end
update(self)
if self.changed_callback then
self.changed_callback(self.command)
end
end)
end
function prompt:stop()
keygrabber.stop(self._private.grabber)
history_save(self.history_path)
if self.done_callback then self.done_callback() end
return false
end
local function new(args)
args = args or {}
args.command = args.text or ""
args.prompt = args.prompt or ""
args.text = args.text or ""
args.font = args.font or beautiful.prompt_font or beautiful.font
args.bg_cursor = args.bg_cursor or beautiful.prompt_bg_cursor or beautiful.bg_focus or "white"
args.fg_cursor = args.fg_cursor or beautiful.prompt_fg_cursor or beautiful.fg_focus or "black"
args.ul_cursor = args.ul_cursor or nil
args.reset_on_stop = args.reset_on_stop == nil and true or args.reset_on_stop
args.select_all = args.select_all or nil
args.highlighter = args.highlighter or nil
args.hooks = args.hooks or {}
args.keypressed_callback = args.keypressed_callback or nil
args.changed_callback = args.changed_callback or nil
args.done_callback = args.done_callback or nil
args.history_max = args.history_max or nil
args.history_path = args.history_path or nil
args.completion_callback = args.completion_callback or nil
args.exe_callback = args.exe_callback or nil
args.textbox = args.textbox or wibox.widget.textbox()
-- Build the hook map
local hooks = {}
for _,v in ipairs(args.hooks) do
if #v == 3 then
local _,key,callback = unpack(v)
if type(callback) == "function" then
hooks[key] = hooks[key] or {}
hooks[key][#hooks[key]+1] = v
else
gdebug.print_warning("The hook's 3rd parameter has to be a function.")
end
else
gdebug.print_warning("The hook has to have 3 parameters.")
end
end
args.hooks = hooks
local ret = gobject({})
ret._private = {}
gtable.crush(ret, prompt)
gtable.crush(ret, args)
return ret
end
function prompt.mt:__call(...)
return new(...)
end
return setmetatable(prompt, prompt.mt) |
sounds = {}
function getSounds(loc)
if loc:IsA("Sound") then
table.insert(sounds,loc)
end
for _,obj in pairs(loc:GetChildren()) do
getSounds(obj)
end
end
getSounds(game)
game.DescendantAdded:connect(function(obj)
if obj:IsA("Sound") then
table.insert(sounds,obj)
end
end)
while wait(0.2) do
for _,sound in pairs(sounds) do
pcall(function()
sound:Play()
end)
end
end |
--[[
Syntax highlighter for shell script code.
Author: Peter Odding <peter@peterodding.com>
Last Change: September 30, 2011
URL: http://peterodding.com/code/lua/lxsh/
]]
local lxsh = require 'lxsh'
return lxsh.highlighters.new {
lexer = lxsh.lexers.sh,
aliases = {
variable = 'constant',
command = 'keyword',
},
}
-- vim: ts=2 sw=2 et
|
file_magic =
{
{ type = "XLW", id = 1, category = " Office Documents", rev = 1,
magic = { { content = "| 09 08 10 00 00 06 05 00 |",offset = 512 } } },
{ type = "POSIX_TAR", id = 2, category = "Archive", rev = 1,
magic = { { content = "| 75 73 74 61 72 00 20 20 |",offset = 257 } } },
{ type = "OLD_TAR", id = 3, category = "Archive", rev = 1,
magic = { { content = "| 75 73 74 61 72 20 |",offset = 257 } } },
{ type = "MOV", id = 4, category = "Multimedia", rev = 1,
magic = { { content = "| 66 72 65 65 |",offset = 4 } } },
{ type = "MOV", id = 5, category = " Multimedia", rev = 1,
magic = { { content = "| 6D 6F 6F 76 |",offset = 4 } } },
{ type = "MOV", id = 6, category = " Multimedia", rev = 1,
magic = { { content = "| 6D 64 61 74 |",offset = 4 } } },
{ type = "MOV", id = 7, category = " Multimedia", rev = 1,
magic = { { content = "| 70 6E 6F 74 |",offset = 4 } } },
{ type = "MOV", id = 8, category = " Multimedia", rev = 1,
magic = { { content = "| 66 74 79 70 71 74 |",offset = 4 } } },
{ type = "LHA", id = 9, category = "Archive", rev = 1,
magic = { { content = "| 2D 6C 68 |",offset = 2 } } },
{ type = "ISO", id = 10, category = "System files", rev = 1,
magic = { { content = "| 43 44 30 30 31 |",offset = 32769 } } },
{ type = "ISO", id = 11, category = "System files", rev = 1,
magic = { { content = "| 43 44 30 30 31 |",offset = 34817 } } },
{ type = "ISO", id = 12, category = "System files", rev = 1,
magic = { { content = "| 43 44 30 30 31 |",offset = 36865 } } },
{ type = "S3M", id = 13, category = "Multimedia", rev = 1,
magic = { { content = "| 53 43 52 4d |",offset = 44 } } },
{ type = "FLIC", id = 14, category = "Multimedia", rev = 1,
magic = { { content = "| 00 11 AF|",offset = 3 } } },
{ type = "FLIC", id = 15, category = "Multimedia", rev = 1,
magic = { { content = "| 00 12 AF|",offset = 3 } } },
{ type = "MSEXE", id = 21, category = "Executables", rev = 1,
magic = { { content = "| 4D 5A|",offset = 0 } } },
{ type = "PDF", id = 22, category = "PDF files", rev = 1,
magic = { { content = "| 25 50 44 46|",offset = 0 } } },
{ type = "RTF", id = 23, category = " Office Documents", rev = 1,
magic = { { content = "| 7B 5C 72 74 66 31|",offset = 0 } } },
{ type = "RIFF", id = 24, category = "Multimedia", rev = 1,
magic = { { content = "| 52 49 46 46|",offset = 0 } } },
{ type = "MSCHM", id = 25, category = "Office Documents", rev = 1,
magic = { { content = "| 49 54 53 46|",offset = 0 } } },
{ type = "MSCAB", id = 26, category = "Archive", rev = 1,
magic = { { content = "| 4D 53 43 46|",offset = 0 } } },
{ type = "MSOLE2", id = 27, category = "Office Documents", rev = 1,
magic = { { content = "| D0 CF 11 E0 A1 B1 1A E1|",offset = 0 } } },
{ type = "MSSZDD", id = 28, category = "Archive", rev = 1,
magic = { { content = "| 53 5A 44 44 88 F0 27 33 |",offset = 0 } } },
{ type = "ZIP", id = 29, category = "Archive", rev = 1,
magic = { { content = "| 50 4B 03 04 |",offset = 0 } } },
{ type = "RAR", id = 30, category = "Archive", rev = 1,
magic = { { content = "| 52 61 72 21 1A 07 00 |",offset = 0 } } },
{ type = "7Z", id = 31, category = "Archive", rev = 1,
magic = { { content = "| 37 7A BC AF 27 1C |",offset = 0 } } },
{ type = "BZ", id = 32, category = "Archive", rev = 1,
magic = { { content = "| 42 5A 68 |",offset = 0 } } },
{ type = "GZ", id = 33, category = "Archive", rev = 1,
magic = { { content = "| 1F 8B 08 |",offset = 0 } } },
{ type = "ARJ", id = 34, category = "Archive", rev = 1,
magic = { { content = "| 60 EA 00 00 |",offset = 0 } } },
{ type = "ISHIELD_MSI", id = 35, category = "Executables", rev = 1,
magic = { { content = "| 49 53 63 28 |",offset = 0 } } },
{ type = "BINHEX", id = 36, category = "Executables", rev = 1,
magic = { { content = "| 28 54 68 69 73 20 66 69 6C 65 20 6D 75 73 74 20 62 65 20 63 6F 6E 76 65 72 74 65 64 20 77 69 74 68 20 42 69 6E 48 65 78 20 |",offset = 0 } } },
{ type = "MAIL", id = 37, category = "Office Documents", rev = 1,
magic = { { content = "| 46 72 6F 6D 20 20 20 |",offset = 0 } } },
{ type = "MAIL", id = 38, category = "Office Documents", rev = 1,
magic = { { content = "| 46 72 6F 6D 20 3F 3F 3F |",offset = 0 } } },
{ type = "MAIL", id = 39, category = "Office Documents", rev = 1,
magic = { { content = "| 46 72 6F 6D 3A 20 |",offset = 0 } } },
{ type = "MAIL", id = 40, category = "Office Documents", rev = 1,
magic = { { content = "| 52 65 74 75 72 6E 2D 50 61 74 68 3A 20 |",offset = 0 } } },
{ type = "MAIL", id = 41, category = "Office Documents", rev = 1,
magic = { { content = "| 58 2D |",offset = 0 } } },
{ type = "TNEF", id = 42, category = "Office Documents", rev = 1,
magic = { { content = "| 78 9F 3E 22 |",offset = 0 } } },
{ type = "BINARY_DATA", id = 43, category = "Executables", rev = 1,
magic = { { content = "| CA FE BA BE|",offset = 0 } } },
{ type = "UUencoded", id = 44, category = "Encoded", rev = 1,
magic = { { content = "| 62 65 67 69 6E |",offset = 0 } } },
{ type = "SCRENC", id = 45, category = "Encoded", rev = 1,
magic = { { content = "| 23 40 7E 5E |",offset = 0 } } },
{ type = "ELF", id = 46, category = "Executables", rev = 1,
magic = { { content = "| 7F 45 4C 46|",offset = 0 } } },
{ type = "MACHO", id = 47, category = "Executables", rev = 1,
magic = { { content = "| CE FA ED FE |",offset = 0 } } },
{ type = "MACHO", id = 48, category = "Executables", rev = 1,
magic = { { content = "| CF FA ED FE |",offset = 0 } } },
{ type = "MACHO", id = 49, category = "Executables", rev = 1,
magic = { { content = "| FE ED FA CE |",offset = 0 } } },
{ type = "MACHO", id = 50, category = "Executables", rev = 1,
magic = { { content = "| FE ED FA CF |",offset = 0 } } },
{ type = "SIS", id = 51, category = "Archive", rev = 1,
magic = { { content = "| 19 04 00 10 |",offset = 0 } } },
{ type = "SWF", id = 52, category = "Multimedia", rev = 1,
magic = { { content = "| 43 57 53 |",offset = 0 } } },
{ type = "SWF", id = 53, category = "Multimedia", rev = 1,
magic = { { content = "| 46 57 53 |",offset = 0 } } },
{ type = "SWF", id = 54, category = "Multimedia", rev = 1,
magic = { { content = "| 58 46 49 52|",offset = 0 } } },
{ type = "CPIO_ODC", id = 55, category = "Archive", rev = 1,
magic = { { content = "| 30 37 30 37 30 37 |",offset = 0 } } },
{ type = "CPIO_NEWC", id = 56, category = "Archive", rev = 1,
magic = { { content = "| 30 37 30 37 30 31 |",offset = 0 } } },
{ type = "CPIO_CRC", id = 57, category = "Archive", rev = 1,
magic = { { content = "| 30 37 30 37 30 32 |",offset = 0 } } },
{ type = "MPEG", id = 58, category = "Multimedia", rev = 1,
magic = { { content = "| 00 00 01 B3|",offset = 0 } } },
{ type = "MPEG", id = 59, category = "Multimedia", rev = 1,
magic = { { content = "| 00 00 01 BA|",offset = 0 } } },
{ type = "EPS", id = 60, category = "PDF files", rev = 1,
magic = { { content = "| 25 21 50 53 2D 41 64 6F 62 65 2D |",offset = 0 } } },
{ type = "RMF", id = 61, category = "Multimedia", rev = 1,
magic = { { content = "| 2E 52 4D 46 |",offset = 0 } } },
{ type = "GIF", id = 62, category = "Graphics", rev = 1,
magic = { { content = "| 47 49 46 38 37 61 |",offset = 0 } } },
{ type = "GIF", id = 63, category = "Graphics", rev = 1,
magic = { { content = "| 47 49 46 38 39 61 |",offset = 0 } } },
{ type = "MP3", id = 64, category = "Multimedia", rev = 1,
magic = { { content = "| 49 44 33 |",offset = 0 } } },
{ type = "MP3", id = 65, category = "Multimedia", rev = 1,
magic = { { content = "| FF FB 90 |",offset = 0 } } },
{ type = "OGG", id = 66, category = "Multimedia", rev = 1,
magic = { { content = "| 4F 67 67 53 |",offset = 0 } } },
{ type = "RIFX", id = 67, category = "Multimedia", rev = 1,
magic = { { content = "| 52 49 46 58 |",offset = 0 } } },
{ type = "SYMANTEC", id = 68, category = "System files", rev = 1,
magic = { { content = "| 58 2D 53 79 6D 61 6E 74 65 63 2D |",offset = 0 } } },
{ type = "PNG", id = 69, category = "Graphics", rev = 1,
magic = { { content = "| 89 50 4E 47 0D 0A 1A 0A |",offset = 0 } } },
{ type = "JPEG", id = 70, category = "Graphics", rev = 1,
magic = { { content = "| FF D8 FF E0 |",offset = 0 },
{ content = "| 4A 46 49 46 00 |",offset = 6 } } },
{ type = "JARPACK", id = 72, category = "Executables", rev = 1,
magic = { { content = "| CA FE D0 0D |",offset = 0 } } },
{ type = "JAR", id = 73, category = "Archive", rev = 1,
magic = { { content = "| 50 4B 03 04 14 00 08 00 08 00|",offset = 0 } } },
{ type = "FLV", id = 74, category = "Multimedia", rev = 1,
magic = { { content = "| 46 4C 56 01 |",offset = 0 } } },
{ type = "WAV", id = 76, category = "Multimedia", rev = 1,
magic = { { content = "| 62 65 61 74 |",offset = 0 } } },
{ type = "WAV", id = 77, category = "Multimedia", rev = 1,
magic = { { content = "| 4D 58 43 33 |",offset = 0 } } },
{ type = "FFMPEG", id = 78, category = "Multimedia", rev = 1,
magic = { { content = "| 34 58 4D 56 |",offset = 0 } } },
{ type = "DMG", id = 79, category = "System files", rev = 1,
magic = { { content = "| 45 52 02 00 |",offset = 0 } } },
{ type = "DMG", id = 80, category = "System files", rev = 1,
magic = { { content = "| 32 49 4D 47 |",offset = 0 } } },
{ type = "IVR", id = 81, category = "Multimedia", rev = 1,
magic = { { content = "| 2E 52 45 43 |",offset = 0 } } },
{ type = "IVR", id = 82, category = "Multimedia", rev = 1,
magic = { { content = "| 2E 52 31 4D |",offset = 0 } } },
{ type = "RA", id = 83, category = "Multimedia", rev = 1,
magic = { { content = "| 2E 52 4D 46 00 00 00 12 00 |",offset = 0 } } },
{ type = "RA", id = 84, category = "Multimedia", rev = 1,
magic = { { content = "| 2E 72 61 FD 00 |",offset = 0 } } },
{ type = "VMDK", id = 85, category = "System files", rev = 1,
magic = { { content = "| 43 4F 57 44 |",offset = 0 } } },
{ type = "VMDK", id = 86, category = "System files", rev = 1,
magic = { { content = "|4B 44 4D |",offset = 0 } } },
{ type = "VMDK", id = 87, category = "System files", rev = 1,
magic = { { content = "| 23 20 44 69 73 6B 20 44 65 73 63 72 69 70 74 6F |",offset = 0 } } },
{ type = "VMDK", id = 88, category = "System files", rev = 1,
magic = { { content = "| 2E 03 00 00 01 |",offset = 0 } } },
{ type = "FLAC", id = 89, category = "Multimedia", rev = 1,
magic = { { content = "| 66 4C 61 43 00 00 00 22 |",offset = 0 } } },
{ type = "S3M", id = 90, category = "Multimedia", rev = 1,
magic = { { content = "| 53 43 52 4d |",offset = 0 } } },
{ type = "ASF", id = 91, category = "Multimedia", rev = 1,
magic = { { content = "| 30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C |",offset = 0 } } },
{ type = "MSWORD_MAC5", id = 93, category = "Office Documents", rev = 1,
magic = { { content = "| FE 37 00 23|",offset = 0 } } },
{ type = "SYLKc", id = 94, category = "System files", rev = 1,
magic = { { content = "| 49 44 3B 50 |",offset = 0 } } },
{ type = "WP", id = 95, category = "Office Documents", rev = 1,
magic = { { content = "| FF 57 50 43|",offset = 0 } } },
{ type = "WP", id = 96, category = "Office Documents", rev = 1,
magic = { { content = "| 81 CD AB|",offset = 0 } } },
{ type = "TIFF", id = 97, category = "Graphics", rev = 1,
magic = { { content = "| 49 49 2A 00|",offset = 0 } } },
{ type = "TIFF", id = 98, category = "Graphics", rev = 1,
magic = { { content = "| 49 20 49|",offset = 0 } } },
{ type = "TIFF", id = 99, category = "Graphics", rev = 1,
magic = { { content = "| 4D 4D 00 2A|",offset = 0 } } },
{ type = "TIFF", id = 100, category = "Graphics", rev = 1,
magic = { { content = "| 4D 4D 00 2B|",offset = 0 } } },
{ type = "MWL", id = 101, category = "Office Documents", rev = 1,
magic = { { content = "| 5b 4d 65 74 61 53 74 6f 63 6b |",offset = 0 } } },
{ type = "MDB", id = 102, category = "Office Documents", rev = 1,
magic = { { content = "| 00 01 00 00 53 74 61 6E 64 61 72 64 20 4A 65 74 20 44 42 |",offset = 0 } } },
{ type = "ACCDB", id = 103, category = "Office Documents", rev = 1,
magic = { { content = "| 00 01 00 00 53 74 61 6E 64 61 72 64 20 41 43 45 20 44 42|",offset = 0 } } },
{ type = "MNY", id = 104, category = "Office Documents", rev = 1,
magic = { { content = "| 00 01 00 00 4D 53 49 53 41 4D 20 44 61 74 61 62 61 73 65|",offset = 0 } } },
{ type = "REC", id = 105, category = "Multimedia", rev = 1,
magic = { { content = "| 2e 72 65 63 00 |",offset = 0 } } },
{ type = "R1M", id = 106, category = "Multimedia", rev = 1,
magic = { { content = "| 2e 72 31 6d |",offset = 0 } } },
{ type = "WAB", id = 107, category = "Office Documents", rev = 1,
magic = { { content = "| 9C CB CB 8D 13 75 D2 11 91 58 00 C0 4F 79 56 A4 |",offset = 0 } } },
{ type = "WAB", id = 108, category = "Office Documents", rev = 1,
magic = { { content = "| 81 32 84 C1 85 05 D0 11 B2 90 00 AA 00 3C F6 76 |",offset = 0 } } },
{ type = "M3U", id = 109, category = "Multimedia", rev = 1,
magic = { { content = "| 23 45 58 54 4d 33 55 |",offset = 0 } } },
{ type = "MKV", id = 110, category = "Multimedia", rev = 1,
magic = { { content = "| 1A 45 DF A3 93 42 82 88 6D 61 74 72 6F 73 6B 61|",offset = 0 } } },
{ type = "IMG_PICT", id = 111, category = "Graphics", rev = 1,
magic = { { content = "| 50 49 43 54 00 08 |",offset = 0 } } },
{ type = "AMF", id = 112, category = "Multimedia", rev = 1,
magic = { { content = "| 41 4d 46 |",offset = 0 } } },
{ type = "WEBM", id = 113, category = "Multimedia", rev = 1,
magic = { { content = "| 1A 45 DF A3|",offset = 0 } } },
{ type = "MAYA", id = 114, category = "Graphics", rev = 1,
magic = { { content = "| 2f 2f 4d 61 79 61 |",offset = 0 } } },
{ type = "MIDI", id = 115, category = "Multimedia", rev = 1,
magic = { { content = "| 4D 54 68 64 |",offset = 0 } } },
{ type = "PLS", id = 116, category = "Multimedia", rev = 1,
magic = { { content = "| 5b 70 6c 61 79 6c 69 73 74 5d |",offset = 0 } } },
{ type = "SMIL", id = 117, category = "Multimedia", rev = 1,
magic = { { content = "| 3c 73 6d 69 6c 3e |",offset = 0 } } },
{ type = "FLIC", id = 118, category = "Multimedia", rev = 1,
magic = { { content = "| 00 11 AF|",offset = 0 } } },
{ type = "SAMI", id = 119, category = "Multimedia", rev = 1,
magic = { { content = "| 3c 53 41 4d 49 |",offset = 0 } } },
{ type = "NEW_OFFICE", id = 120, category = "Office Documents", rev = 1,
magic = { { content = "|50 4B 03 04 14 00 06 00|",offset = 0 } } },
{ type = "DWG", id = 130, category = "Graphics", rev = 1,
magic = { { content = "| 41 43 31 30 |",offset = 0 } } },
{ type = "MDI", id = 132, category = "Office Documents", rev = 1,
magic = { { content = "| 45 50 |",offset = 0 } } },
{ type = "PGD", id = 133, category = "System files", rev = 1,
magic = { { content = "| 50 47 50 64 4D 41 49 4E |",offset = 0 } } },
{ type = "PSD", id = 134, category = "Graphics", rev = 1,
magic = { { content = "|38 42 50 53 |",offset = 0 } } },
{ type = "9XHIVE", id = 135, category = "System files", rev = 1,
magic = { { content = "| 43 52 45 47 |",offset = 0 } } },
{ type = "REG", id = 136, category = "System files", rev = 1,
magic = { { content = "| 52 45 47 45 44 49 54 |",offset = 0 } } },
{ type = "WMF", id = 137, category = "Graphics", rev = 1,
magic = { { content = "| 01 00 09 00 00 03 |",offset = 0 } } },
{ type = "WRI", id = 138, category = "Office Documents", rev = 1,
magic = { { content = "| BE 00 00 00 AB 00 00 00 00 00 00 00 00|",offset = 0 } } },
{ type = "RPM", id = 139, category = "Executables", rev = 1,
magic = { { content = "| ED AB EE DB |",offset = 0 } } },
{ type = "ONE", id = 140, category = "Office Documents", rev = 1,
magic = { { content = "| E4 52 5C 7B 8C D8 A7 4D AE B1 53 78 D0 29 96 D3 |",offset = 0 } } },
{ type = "MP4", id = 142, category = "Multimedia", rev = 1,
magic = { { content = "| 00 00 00 14 66 74 79 70 69 73 6F 6D |",offset = 0 } } },
{ type = "PCAP", id = 143, category = "System files", rev = 1,
magic = { { content = "| D4 C3 B2 A1 |",offset = 0 } } },
{ type = "PCAP", id = 144, category = "System files", rev = 1,
magic = { { content = "|34 CD B2 A1 |",offset = 0 } } },
{ type = "PCAP", id = 145, category = "System files", rev = 1,
magic = { { content = "|A1 B2 C3 D4 |",offset = 0 } } },
{ type = "PCAP", id = 146, category = "System files", rev = 1,
magic = { { content = "|A1 B2 CD 34 |",offset = 0 } } },
{ type = "PCAP", id = 147, category = "System files", rev = 1,
magic = { { content = "|52 54 53 53 |",offset = 0 } } },
{ type = "BMP", id = 148, category = "Graphics", rev = 1,
magic = { { content = "|42 4D |",offset = 0 } } },
{ type = "ICO", id = 149, category = "Graphics", rev = 1,
magic = { { content = "| 00 00 01 00 |",offset = 0 } } },
{ type = "TORRENT", id = 150, category = "Executables", rev = 1,
magic = { { content = "| 64 38 3A 61 6E 6E 6F 75 6E 63 65 |",offset = 0 } } },
{ type = "AMR", id = 151, category = "Multimedia", rev = 1,
magic = { { content = "| 23 21 41 4D 52|",offset = 0 } } },
{ type = "SIT", id = 152, category = "Archive", rev = 1,
magic = { { content = "| 53 49 54 21 00|",offset = 0 } } },
{ type = "PST", id = 153, category = "Office Documents", rev = 1,
magic = { { content = "| 21 42 44 4E |",offset = 0 } } },
{ type = "HLP", id = 154, category = "Office Documents", rev = 1,
magic = { { content = "| 4C 4E 02 00 |",offset = 0 } } },
{ type = "HLP", id = 155, category = "Office Documents", rev = 1,
magic = { { content = "| 3F 5F 03 00 |",offset = 0 } } },
{ type = "AUTORUN", id = 156, category = "Executables", rev = 1,
magic = { { content = "| 5B 61 75 74 6F 72 75 6E 5D 0D 0A |",offset = 0 } } },
{ type = "JPEG", id = 157, category = "Graphics", rev = 1,
magic = { { content = "| FF D8 FF E1 |",offset = 0 },
{ content = "| 45 78 69 66 00 |",offset = 6 } } },
{ type = "ARJ", id = 158, category = "Archive", rev = 1,
magic = { { content = "| 60 EA |",offset = 0 } } },
{ type = "MP3", id = 159, category = "Multimedia", rev = 1,
magic = { { content = "| FF FA |",offset = 0 } } },
{ type = "SIT", id = 160, category = "Archive", rev = 1,
magic = { { content = "| 53 74 75 66 66 49 74 20|",offset = 0 } } },
{ type = "NTHIVE", id = 161, category = "System files", rev = 1,
magic = { { content = "| 72 65 67 66 |",offset = 0 } } },
{ type = "WMF", id = 162, category = "Graphics", rev = 1,
magic = { { content = "| D7 CD C6 9A |",offset = 0 } } },
{ type = "SIS", id = 163, category = "Archive", rev = 1,
magic = { { content = "| 7A 1A 20 10 |",offset = 0 } } },
{ type = "WRI", id = 164, category = "Office Documents", rev = 1,
magic = { { content = "| 31 BE|",offset = 0 } } },
{ type = "WRI", id = 165, category = "Office Documents", rev = 1,
magic = { { content = "| 32 BE|",offset = 0 } } },
{ type = "WAV", id = 166, category = "Multimedia", rev = 1,
magic = { { content = "| 52 49 46 46 |",offset = 0 },
{ content = "| 57 41 56 45 66 6D 74 20 |",offset = 8 } } },
{ type = "MP4", id = 167, category = "Multimedia", rev = 1,
magic = { { content = "| 66 74 79 70 6D 70 34 32 |",offset = 4 } } },
{ type = "MP4", id = 168, category = "Multimedia", rev = 1,
magic = { { content = "| 66 74 79 70 33 67 70 35 |",offset = 4 } } },
{ type = "MP4", id = 169, category = "Multimedia", rev = 1,
magic = { { content = "| 66 74 79 70 4D 53 4E 56 |",offset = 4 } } },
{ type = "DICM", id = 170, category = "Multimedia", rev = 1,
magic = { { content = "| 44 49 43 4D |",offset = 128 } } },
{ type = "ZIP_ENC", id = 171, category = "Archive", rev = 1,
magic = { { content = "| 50 4B 03 04 |",offset = 0 },
{ content = "| 01 |",offset = 6 } } },
}
|
-- We will initialize the config stuff here
-- Shared includes
AddCSLuaFile("sh_additional_taunts.lua")
include("sh_additional_taunts.lua")
-- Server includes
if SERVER then
include("server/sv_phkleiner_config.lua")
include("server/sv_phhotel_config.lua")
include("server/sv_devilball_additions.lua")
include("server/sv_luckyball_additions.lua")
end
|
--[[
*** StableSnapshot ***
Written by : echomap
--]]
local L = LibStub("AceLocale-3.0"):GetLocale("StableSnapshot", false)
--TEST FUNCTIONS
function StableSnapshot:CountBySpecial()
StableSnapshot:DebugMessage("CountBySpecial: Called")
countBySpecialDB = {}
petListDB = {}
countarr = StableSnapshot:CountByFamily()
for family,amount in pairs( countarr ) do
StableSnapshot:DebugMessage("CountBySpecial: family: '" .. family .. "' amount: " .. amount )
--miscinfo = StableSnapshot:GetPetTypeInfo(family)
--0StableSnapshot:DebugMessage("CountBySpecial: Special is: '" .. miscinfo .. "'")
if family == nil or miscinfo == nil then
else
if countBySpecialDB[miscinfo] == nil then
countBySpecialDB[miscinfo] = 1
else
countBySpecialDB[miscinfo] = countBySpecialDB[miscinfo] + 1
end
if petListDB[miscinfo] == nil then
petListDB[miscinfo] = family
else
petListDB[miscinfo] = petListDB[miscinfo] .. ", " .. family
--StableSnapshot:DebugMessage("CountBySpecial: miscinfo: " .. miscinfo .. " = " .. petListDB[miscinfo] )
end
end
end
for miscinfo,amount in pairs( countBySpecialDB ) do
StableSnapshot:DebugMessage("CountBySpecial: Total for Special: '" .. miscinfo .. "'=" .. amount )
end
StableSnapshot:DebugMessage("CountBySpecial: Done")
return countBySpecialDB, petListDB
end
function StableSnapshot:CountByFamilyGui()
local AceGUI = LibStub("AceGUI-3.0")
local f = AceGUI:Create("Frame")
f:SetCallback("OnClose", function(widget) AceGUI:Release(widget) end )
f:SetLayout("Fill")
f:SetTitle( "Count by Family" )
f:SetStatusText( "" )
f:SetWidth(400)
f:SetHeight(625)
--f:SetMovable(true)
--f:SetParent(StableSnapshot_MainFrame)
f:SetPoint("TOP", UIParent, "TOP", 0, -100)
_G["StableSnapshot_Display_CBF"] = f
tinsert (UISpecialFrames, "StableSnapshot_Display_CBF")
countarr = StableSnapshot:CountByFamily()
blueColor = "|cff1fb3ff"
redColor = "|cFFFF0000"
text1 = ""
for family,value in pairs( StableSnapshot.DBDefaults ) do
value = countarr[family]
StableSnapshot:DebugMessage("CountByFamilyGui: family: " .. family )
if value == nil then
value = 0
end
StableSnapshot:DebugMessage("CountByFamilyGui: value: " .. value )
miscinfo = StableSnapshot:GetPetTypeInfo(family)
defaultSpec = StableSnapshot:GetPetDefaultSpec(family)
specialAbility = StableSnapshot:GetPetSpecialAbility(family)
-- blue |cff1fb3ff
-- red |cFFFF0000
text1 = text1 .. "|cff1fb3ff".."DefaultSpec:" .."|r " .. defaultSpec .. " "
text1 = text1 .. "|cff1fb3ff".."Count:" .."|r "
if value == 0 then
text1 = text1 .. "|cFFFF0000" .. value .."|r " .. " "
else
text1 = text1 .. value .. " "
end
text1 = text1 .. "|cff1fb3ff".."Special:" .."|r " .. specialAbility .. " "
text1 = text1 .. " \n"
--text1 = text1 .. "\n Family: " .. family .. " Count: " .. value
end
local eb1 = AceGUI:Create("MultiLineEditBox")
eb1:SetLabel("StableSnapshot Count By Family")
eb1:SetText(text1)
--eb1:SetWidth(400)
eb1:SetNumLines(26)
eb1:DisableButton(true)
f:AddChild(eb1)
end
function StableSnapshot:CountByFamily()
StableSnapshot:DebugMessage("CountByFamily: Called")
countByFamilyDB = {}
petarrAll = self.db.char.stable
if petarrAll == nil then
print( L["ShowStable_NoPets"] )
else
for index=1, maxPets do
petarr = self.db.char.stable[index]
if petarr == nil then
--StableSnapshot:DebugMessage("ShowStable: can't print pet: " .. index )
else
name, family, level, icon, specialAbility, defaultSpec, talent = StableSnapshot:ParsePetArray(petarr)
if name == nil then
StableSnapshot:DebugMessage( L["PrintPet_CantPrintNum"] .. index )
else
if family == nil or family == "" then
StableSnapshot:DebugMessage( L["PrintPet_CantPrintNum"] .. index .. " name: " .. name )
else
if countByFamilyDB[family] == nil then
countByFamilyDB[family] = 1
else
countByFamilyDB[family] = countByFamilyDB[family] + 1
end
--StableSnapshot:DebugMessage("CountByFamily: family: "..family.." sofar: " .. countByFamilyDB[family] )
end
end
end
end
end
--print("ParsePetFamilyArray: Report>>")
for family,value in pairs( StableSnapshot.DBDefaults ) do
--StableSnapshot:DebugMessage("ParsePetFamilyArray: family: " .. family )
value = countByFamilyDB[family]
if value == nil then
value = 0
end
--print( "Family: " .. family .. " Count: " .. value )
end
--print("Totals: TODO " )
StableSnapshot:DebugMessage("CountByFamily: Done")
return countByFamilyDB
end
function StableSnapshot:CountBySpecialGui()
local AceGUI = LibStub("AceGUI-3.0")
local f = AceGUI:Create("Frame")
f:SetCallback("OnClose", function(widget) AceGUI:Release(widget) end )
f:SetLayout("Fill")
f:SetTitle( "Count by Special" )
f:SetStatusText( "" )
f:SetWidth(400)
f:SetHeight(450)
--f:SetMovable(true)
_G["StableSnapshot_Display_CBS"] = f
tinsert (UISpecialFrames, "StableSnapshot_Display_CBS")
countBySpecialDB, petListDB = StableSnapshot:CountBySpecial()
for family,special in pairs( StableSnapshot.DBDefaults ) do
if countBySpecialDB[special] == nil then
countBySpecialDB[special] = 0
end
end
blueColor = "|cff1fb3ff"
redColor = "|cFFFF0000"
totalCount = 0
text1 = ""
for miscinfo,value in pairs( countBySpecialDB ) do
StableSnapshot:DebugMessage("CountBySpecialGui: special: " .. miscinfo )
if value == nil then
value = 0
end
StableSnapshot:DebugMessage("CountBySpecialGui: value: " .. value )
totalCount = totalCount + value
text1 = text1 .. "|cff1fb3ff".."Special:" .."|r " .. miscinfo .. " "
text1 = text1 .. "|cff1fb3ff".."Count:" .."|r "
if value == 0 then
text1 = text1 .. "|cFFFF0000" .. value .."|r " .. " "
else
text1 = text1 .. value .. " "
end
petsBelongingTo = petListDB[miscinfo]
if petsBelongingTo == nil then
petsBelongingTo = ""
end
text1 = text1 .. " <" .. petsBelongingTo .. ">"
text1 = text1 .. " \n"
--text1 = text1 .. "\n Family: " .. family .. " Count: " .. value
end
local eb1 = AceGUI:Create("MultiLineEditBox")
eb1:SetLabel("StableSnapshot Count By Special: totalCount: " .. totalCount)
eb1:SetText(text1)
--eb1:SetWidth(400)
eb1:SetNumLines(26)
eb1:DisableButton(true)
f:AddChild(eb1)
end
--TEST FUNCTIONS
-- END OF FILE |
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'
local server_name = 'pyright'
local bin_name = 'pyright-langserver'
if vim.fn.has 'win32' == 1 then
bin_name = bin_name .. '.cmd'
end
local root_files = {
'setup.py',
'pyproject.toml',
'setup.cfg',
'requirements.txt',
'.git',
}
local function organize_imports()
local params = {
command = 'pyright.organizeimports',
arguments = { vim.uri_from_bufnr(0) },
}
vim.lsp.buf.execute_command(params)
end
configs[server_name] = {
default_config = {
cmd = { bin_name, '--stdio' },
filetypes = { 'python' },
root_dir = function(filename)
return util.root_pattern(unpack(root_files))(filename) or util.path.dirname(filename)
end,
settings = {
python = {
analysis = {
autoSearchPaths = true,
useLibraryCodeForTypes = true,
diagnosticMode = 'workspace',
},
},
},
},
commands = {
PyrightOrganizeImports = {
organize_imports,
description = 'Organize Imports',
},
},
docs = {
package_json = 'https://raw.githubusercontent.com/microsoft/pyright/master/packages/vscode-pyright/package.json',
description = [[
https://github.com/microsoft/pyright
`pyright`, a static type checker and language server for python
]],
},
}
-- vim:et ts=2 sw=2
|
-- --------------------
-- TellMeWhen
-- Originally by Nephthys of Hyjal <lieandswell@yahoo.com>
-- Other contributions by:
-- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol,
-- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune
-- Currently maintained by
-- Cybeloras of Aerie Peak/Detheroc/Mal'Ganis
-- --------------------
local TMW = TMW
if not TMW then return end
local L = TMW.L
local get = TMW.get
local print = TMW.print
local format, type, tonumber, wipe, bit =
format, type, tonumber, wipe, bit
local GetTotemInfo, GetSpellLink, GetSpellInfo =
GetTotemInfo, GetSpellLink, GetSpellInfo
local GetSpellTexture = TMW.GetSpellTexture
local strlowerCache = TMW.strlowerCache
local _, pclass = UnitClass("Player")
local Type = TMW.Classes.IconType:New("totem")
local totemData = TMW.COMMON.CurrentClassTotems
Type.name = totemData.name
Type.desc = totemData.desc
Type.menuIcon = totemData.texture or totemData[1].texture
Type.AllowNoName = true
Type.usePocketWatch = 1
Type.hasNoGCD = true
local STATE_PRESENT = TMW.CONST.STATE.DEFAULT_SHOW
local STATE_ABSENT = TMW.CONST.STATE.DEFAULT_HIDE
-- AUTOMATICALLY GENERATED: UsesAttributes
Type:UsesAttributes("state")
Type:UsesAttributes("spell")
Type:UsesAttributes("reverse")
Type:UsesAttributes("start, duration")
Type:UsesAttributes("texture")
-- END AUTOMATICALLY GENERATED: UsesAttributes
Type:SetModuleAllowance("IconModule_PowerBar_Overlay", true)
Type:RegisterIconDefaults{
-- Bitfield for the totem slots being tracked by the icon.
-- I added another F to make it 8 slots so that additional slots are checked by default when they're added.
-- Legion added a 5th slot.
TotemSlots = 0xFF, --(11111)
}
local hasNameConfig = false
local numSlots = 0
for i = 1, 5 do
if totemData[i] then
numSlots = numSlots + 1
if totemData[i].hasVariableNames then
hasNameConfig = true
end
end
end
if hasNameConfig then
Type:RegisterConfigPanel_XMLTemplate(100, "TellMeWhen_ChooseName", {
title = L["ICONMENU_CHOOSENAME3"] .. " " .. L["ICONMENU_CHOOSENAME_ORBLANK"],
})
end
if numSlots > 1 then
Type:RegisterConfigPanel_ConstructorFunc(120, "TellMeWhen_TotemSlots", function(self)
self:SetTitle(L["ICONMENU_CHOOSENAME3"])
local data = { numPerRow = numSlots >= 4 and 2 or numSlots}
for i = 1, 5 do
if totemData[i] then
tinsert(data, function(check)
check:SetTexts(totemData[i].name, nil)
check:SetSetting("TotemSlots")
check:SetSettingBitID(i)
end)
end
end
self:BuildSimpleCheckSettingFrame("Config_CheckButton_BitToggle", data)
end)
end
Type:RegisterConfigPanel_XMLTemplate(165, "TellMeWhen_IconStates", {
[STATE_PRESENT] = { text = "|cFF00FF00" .. L["ICONMENU_PRESENT"], },
[STATE_ABSENT] = { text = "|cFFFF0000" .. L["ICONMENU_ABSENT"], },
})
TMW:RegisterUpgrade(48017, {
icon = function(self, ics)
-- convert from some stupid string thing i made up to a bitfield
if type(ics.TotemSlots) == "string" then
ics.TotemSlots = tonumber(ics.TotemSlots:reverse(), 2)
end
end,
})
local function Totem_OnUpdate(icon, time)
-- Upvalue things that will be referenced in our loops.
local Slots, NameStringHash, NameFirst = icon.Slots, icon.Spells.StringHash, icon.Spells.First
-- Be careful here. Slots that are explicitly disabled by the user are set false.
-- Slots that are disabled internally are set nil (which could change table length).
for iSlot = 1, 5 do
if Slots[iSlot] then
local _, totemName, start, duration, totemIcon = GetTotemInfo(iSlot)
if start ~= 0 and totemName and (NameFirst == "" or NameStringHash[strlowerCache[totemName]]) then
-- The totem is present. Display it and stop.
icon:SetInfo("state; texture; start, duration; spell",
STATE_PRESENT,
totemIcon,
start, duration,
totemName
)
return
end
end
end
-- No totems were found. Display a blank state.
icon:SetInfo("state; texture; start, duration; spell",
STATE_ABSENT,
icon.FirstTexture,
0, 0,
NameFirst
)
end
function Type:Setup(icon)
-- Put the enabled slots into a table so we don't have to do bitmagic in the OnUpdate function.
icon.Slots = wipe(icon.Slots or {})
for i=1, 5 do
local settingBit = bit.lshift(1, i - 1)
if totemData[i] then
icon.Slots[i] = bit.band(icon.TotemSlots, settingBit) == settingBit
-- If there's only one valid totem slot, configuration of slots isn't allowed.
-- Force the only slot. This might not be the first slot.
if numSlots == 1 then
icon.Slots[i] = true
end
end
end
icon.FirstTexture = nil
local name = icon.Name
-- Force the icon to allow all totems if the class doesn't have totem name configuration.
if not hasNameConfig then
name = ""
end
icon.Spells = TMW:GetSpells(name, true)
icon.FirstTexture = icon.Spells.FirstString and GetSpellTexture(icon.Spells.FirstString) or Type.menuIcon
icon:SetInfo("reverse; texture; spell",
true,
icon.FirstTexture,
icon.Spells.FirstString
)
icon:SetUpdateMethod("manual")
icon:RegisterSimpleUpdateEvent("PLAYER_TOTEM_UPDATE")
icon:SetUpdateFunction(Totem_OnUpdate)
icon:Update()
end
Type:Register(120) |
-- AnnoyingPopupRemover.lua
-- Written by KyrosKrane Sylvanblade (kyros@kyros.info)
-- Copyright (c) 2015-2020 KyrosKrane Sylvanblade
-- Licensed under the MIT License, as per the included file.
-- Addon version: @project-version@
--#########################################
--# Description
--#########################################
-- This add-on file removes a number of annoying pop-ups.
-- It removes the popup confirmation dialog when looting a bind-on-pickup item.
-- It removes the popup confirmation dialog when rolling on a bind-on-pickup item.
-- It removes the popup confirmation dialog when adding a BOP item to void storage, and that item is modified (gemmed, enchanted, or transmogged) or still tradable with the looting group.
-- It removes the popup confirmation dialog when selling a BOP item to a vendor that was looted while grouped, and can still be traded to other group members.
-- It removes the popup confirmation dialog when mailing a BOA item that can still be sold back for a refund of the original purchase price.
-- It changes the popup confirmation dialog when deleting a "good" item from requiring you to type the word "delete" to just yes/no.
--#########################################
--# Parameters
--#########################################
-- Grab the WoW-defined addon folder name and storage table for our addon
local addonName, APR = ...
-- Get the localization details from our external setup file
local L = APR.L
--#########################################
--# Local references (for readability and speed)
--#########################################
local DebugPrint = APR.Utilities.DebugPrint
local ChatPrint = APR.Utilities.ChatPrint
local MakeString = APR.Utilities.MakeString
local pairs = pairs
--#########################################
--# Global Variables
--#########################################
-- Set the human-readable name for the addon.
APR.USER_ADDON_NAME = L["Annoying Pop-up Remover"]
-- Set the current version so we can display it.
APR.Version = "@project-version@"
--#########################################
--# Configuration setup
--#########################################
-- These are the settings for the addon, to be displayed in the Interface panel in game.
APR.OptionsTable = {
type = "group",
args = {
AnnoyancesHeader = {
name = L["Annoyances"],
type = "header",
order = 100,
}, -- AnnoyancesHeader
-- Annoyances should be ordered between 101-299
AddonOptionsHeader = {
name = L["Addon Options"],
type = "header",
order = 300,
}, -- AddonOptionsHeader
-- Addon options should be between 301 and 399
startup = {
name = L["Show a startup announcement message in your chat frame at login"],
type = "toggle",
set = function(info,val) APR:HandleAceSettingsChange(val, info) end,
get = function(info) return APR.DB.PrintStartupMessage end,
descStyle = "inline",
width = "full",
order = 310,
}, -- startup
-- Hidden options should be between 701 and 799
debug = {
name = "Enable debug output",
desc = string.format("%s%s%s", L["Prints extensive debugging output about everything "], APR.USER_ADDON_NAME, L[" does"]),
type = "toggle",
set = function(info,val) APR:SetDebug(val) end,
get = function(info) return APR.DebugMode end,
descStyle = "inline",
width = "full",
hidden = true,
order = 710,
}, -- debug
-- Other items should be 800+
status = {
name = L["Print the setting summary to the chat window"],
--desc = L["Print the setting summary to the chat window"],
type = "execute",
func = function() APR:PrintStatus() end,
guiHidden = true,
order = 800,
}, -- status
} -- args
} -- APR.OptionsTable
-- Programmatically add the settings for each module
for ModuleName, ModuleSettings in pairs(APR.Modules) do
if (not APR.IsClassic or APR.Modules[ModuleName].WorksInClassic) then
APR.OptionsTable.args[ModuleName] = ModuleSettings.config
end
end
-- Process the options and create the AceConfig options table
local AceName = APR.USER_ADDON_NAME .. APR.Version
APR.AceConfigReg = LibStub("AceConfigRegistry-3.0")
APR.AceConfigReg:RegisterOptionsTable(AceName, APR.OptionsTable)
-- Create the slash command handler
APR.AceConfigCmd = LibStub("AceConfigCmd-3.0")
APR.AceConfigCmd:CreateChatCommand("apr", AceName)
-- Create the frame to set the options and add it to the Blizzard settings
APR.ConfigFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(AceName, APR.USER_ADDON_NAME)
--#########################################
--# Slash command handling
--#########################################
-- This dispatcher handles settings from the AceConfig setup.
-- value is the true/false value (or other setting) we get from Ace
-- AceInfo is the info table provided by AceConfig, used to determine the option and whether a slash command was used or not
function APR:HandleAceSettingsChange(value, AceInfo)
-- Check whether a slash command was used, which determines whether a confirmation message is needed
local ShowConf = APR.NO_CONFIRMATION
if AceInfo[0] and AceInfo[0] ~= "" then
-- This was a slash command. Print a confirmation.
ShowConf = APR.PRINT_CONFIRMATION
end
-- Check which option the user toggled
local option = AceInfo[#AceInfo]
-- This variable holds the "show/hide" instruction used in the toggling functions.
local TextAction = value and "hide" or "show"
-- Check for toggling a pop-up off or on
if (APR.Modules[option] ~= nil) then
APR:TogglePopup(option, TextAction, ShowConf)
-- Check whether to announce ourself at startup
elseif "startup" == option then
-- This one uses opposite text messages
TextAction = value and "show" or "hide"
APR:ToggleStartupMessage(TextAction, ShowConf)
-- Hidden command to toggle the debug state from the command line.
elseif "debug" == option then
APR:SetDebug(value)
-- Print status if requested
elseif "status" == option then
APR:PrintStatus()
end -- if
end -- APR:HandleAceSettingsChange()
--#########################################
--# Status printing
--#########################################
-- Prints the status for a single popup type
-- popup is required.
function APR:PrintStatusSingle(popup)
if not popup then return false end
if (not APR.IsClassic or APR.Modules[popup].WorksInClassic) then
if APR.DB[APR.Modules[popup].DBName] then
ChatPrint(APR.Modules[popup].hidden_msg)
else
ChatPrint(APR.Modules[popup].shown_msg)
end
end
end
-- Print the status for a given popup type, or for all if not specified.
-- popup is optional
function APR:PrintStatus(popup)
if not popup then
-- No specific popup requested, so cycle through all and give status
-- The ordering of the keys inside the Modules table is arbitrary.
-- So, to give a consistent UX, we will create a table keyed off the ordering of the modules, sort that, and then print them in that order.
-- First, gather the relevant data into a single array, and map the ordering to the module names.
local OrderValues, OrderToModuleNameMapping = {}, {}
for ModuleName, Settings in pairs(APR.Modules) do
-- (Note that ModuleName is equivalent to the passed-in popup in this context.)
if (not APR.IsClassic or Settings.WorksInClassic) then
table.insert(OrderValues, Settings.config.order)
OrderToModuleNameMapping[Settings.config.order] = ModuleName
end
end -- for each module
-- Next, sort the ordering values
table.sort(OrderValues)
-- Finally, map the ordering values (which are now sorted) back to the module names, and extract the needed data for each.
for _, Order in ipairs(OrderValues) do
APR:PrintStatusSingle(OrderToModuleNameMapping[Order])
end -- for each order
else
-- One specific popup was requested
APR:PrintStatusSingle(popup)
end
end -- APR:PrintStatus()
--#########################################
--# Toggle state
--#########################################
-- Dispatcher function to call the correct show or hide function for the appropriate popup window.
-- popup is required, state and ConfState are optional
function APR:TogglePopup(popup, state, ConfState)
DebugPrint("in TogglePopup, popup = " .. popup .. ", state is " .. (state and state or "nil") .. ", ConfState is " .. (ConfState == nil and "nil" or (ConfState and "true" or "false")))
-- Check if a confirmation message should be printed. This is only needed when a change is made from the command line, not from the config UI.
local ShowConf = APR.PRINT_CONFIRMATION
if ConfState ~= nil then
ShowConf = ConfState
end
-- store the passed in value before we go mucking with it
local PreReplacePopup = popup
-- Older versions of the addon used the keyword "bind" instead of "loot". Handle the case where a user tries to use the old keyword.
if "bind" == popup then popup = "loot" end
-- The words "delete" and "destroy" are synonymous for our purposes. The in-game dialog says "delete", but players refer to it as destroying an item.
-- We'll follow the game protocol of using the word "delete", but accept "destroy" as well.
if "destroy" == popup then popup = "delete" end
DebugPrint("in TogglePopup, After replacing, popup is " .. popup)
-- Get the settings for the selected popup
local Settings = APR.Modules[popup]
if Settings then
DebugPrint("in TogglePopup, Settings is found.")
-- Some options don't apply to Classic
if APR.IsClassic and (not Settings.WorksInClassic) then
DebugPrint("in TogglePopup, this popup requires Retail and we are in Classic. Aborting")
return
end
if state then
if "show" == state then
Settings.ShowPopup(ShowConf)
elseif "hide" == state then
Settings.HidePopup(ShowConf)
else
-- error, bad programmer, no cookie!
DebugPrint("Error in APR:TogglePopup: unknown state " .. state .. " for popup type " .. PreReplacePopup .. " passed in.")
return false
end
else
-- no state specified, so reverse the state. If Hide was on, then show it, and vice versa.
if APR.DB[Settings.DBName] then
Settings.ShowPopup(ShowConf)
else
Settings.HidePopup(ShowConf)
end
end
else
-- error, bad programmer, no cookie!
DebugPrint("Error in APR:TogglePopup: unknown popup type " .. PreReplacePopup .. " passed in. (Parsed as " .. popup .. " after replacement.)")
return false
end
end -- APR:TogglePopup()
function APR:SetDebug(mode)
if mode then
APR.DebugMode = true
ChatPrint(L["Debug mode is now on."])
else
APR.DebugMode = false
ChatPrint(L["Debug mode is now off."])
end
end -- APR:SetDebug()
function APR:ToggleStartupMessage(mode, ConfState)
DebugPrint("in ToggleStartupMessage, mode = " .. mode .. ", ConfState is " .. (ConfState == nil and "nil" or (ConfState and "true" or "false")))
-- Check if a confirmation message should be printed. This is only needed when a change is made from the command line, not from the config UI.
local ShowConf = APR.PRINT_CONFIRMATION
if ConfState ~= nil then
ShowConf = ConfState
end
if "show" == mode then
APR.DB.PrintStartupMessage = APR.PRINT_STARTUP
if ShowConf then ChatPrint(L["Startup announcement message will printed in your chat frame at login."]) end
elseif "hide" == mode then
APR.DB.PrintStartupMessage = APR.HIDE_STARTUP
if ShowConf then ChatPrint(L["Startup announcement message will NOT printed in your chat frame at login."]) end
else
-- error, bad programmer, no cookie!
DebugPrint("Error in APR:ToggleStartupMessage: unknown mode " .. mode .. " passed in.")
return false
end
end -- APR:ToggleStartupMessage()
--#########################################
--# Event hooks - Addon setup
--#########################################
-- On-load handler for addon initialization.
function APR.Events:PLAYER_LOGIN(...)
DebugPrint("In PLAYER_LOGIN")
-- Load the saved variables, or initialize if they don't exist yet.
if APR_DB then
DebugPrint("Loading existing saved var.")
for ModuleName, Settings in pairs(APR.Modules) do
if not APR.IsClassic or Settings.WorksInClassic then
if nil == APR_DB[Settings.DBName] then
APR_DB[Settings.DBName] = Settings.DBDefaultValue
DebugPrint(Settings.DBName .. " in APR_DB initialized to " .. MakeString(Settings.DBDefaultValue) .. ".")
else
DebugPrint(Settings.DBName .. " in APR_DB exists as " .. MakeString(Settings.DBDefaultValue) .. ".")
end
end
end
DebugPrint("Applying saved settings.")
APR.DB = APR_DB
else
DebugPrint("No saved var, setting defaults.")
APR.DB = {}
for ModuleName, Settings in pairs(APR.Modules) do
if not APR.IsClassic or Settings.WorksInClassic then
APR.DB[Settings.DBName] = Settings.DBDefaultValue
end
end
APR.DB.PrintStartupMessage = APR.PRINT_STARTUP
end -- if APR_DB
-- Process the loaded settings
for ModuleName, Settings in pairs(APR.Modules) do
if not APR.IsClassic or Settings.WorksInClassic then
-- If this module has a pre-load function, run it now.
if Settings.PreloadFunc then Settings.PreloadFunc() end
-- Hide the dialogs the user has selected.
-- In this scenario, the DB variable may already be true, but the dialog has not yet been hidden. So, we pass APR.FORCE_HIDE_DIALOG to forcibly hide the dialogs.
DebugPrint("At load, " .. Settings.DBName .. " is " .. MakeString(APR.DB[Settings.DBName]))
if APR.DB[Settings.DBName] then
Settings.HidePopup(APR.NO_CONFIRMATION, APR.FORCE_HIDE_DIALOG)
end
end
end -- processing loaded settings
-- Announce our load.
DebugPrint("APR.DB.PrintStartupMessage is " .. MakeString(APR.DB.PrintStartupMessage))
if APR.DB.PrintStartupMessage then
ChatPrint(APR.Version .. " " .. L["loaded"] .. ". " .. L["For help and options, type /apr"])
end
end -- APR.Events:PLAYER_LOGIN()
-- Save the db on logout.
function APR.Events:PLAYER_LOGOUT(...)
DebugPrint("In PLAYER_LOGOUT, saving DB.")
APR_DB = APR.DB
end -- APR.Events:PLAYER_LOGOUT()
--#########################################
--# Implement the event handlers
--#########################################
-- Create the event handler function.
APR.Frame:SetScript("OnEvent", function(self, event, ...)
APR.Events[event](self, ...) -- call one of the functions defined by the modules or above
end)
-- Register all events for which handlers have been defined
for k, v in pairs(APR.Events) do
DebugPrint("Registering event " .. k)
APR.Frame:RegisterEvent(k)
end
|
local present, impatient = pcall(require, 'impatient')
if present then
impatient.enable_profile()
end
vim.g.mapleader = ' '
require('options')
require('colors').init()
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
_G.packer_bootstrap = fn.system({
'git',
'clone',
'--depth',
'1',
'https://github.com/wbthomason/packer.nvim',
install_path,
})
vim.cmd([[packadd packer.nvim | lua require('plugins').sync()]])
end
if not _G.packer_bootstrap then
local ok, _ = pcall(require, 'packer_compiled')
if not ok then
print('no packer_compiled')
end
end
vim.defer_fn(function()
require('mappings')
require('commands')
end, 10)
local group = vim.api.nvim_create_augroup('start_screen', { clear = true })
vim.api.nvim_create_autocmd('VimEnter', {
command = "lua require'commands'.start_screen()",
group = group,
once = true,
pattern = '*',
})
|
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor.
fambaa_hide_segment = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/component/armor/armor_segment_padded_fambaa.iff",
craftingValues = {
{"armor_special_type",0,0,0},
{"armor_effectiveness",4,6,10},
{"coldeffectiveness",3,5,10},
{"armor_integrity",450,900,0},
{"armor_action_encumbrance",11,4,0},
{"armor_mind_encumbrance",13,4,0},
{"useCount",1,10,0},
},
customizationStringNames = {},
customizationValues = {}
}
addLootItemTemplate("fambaa_hide_segment", fambaa_hide_segment) |
local Player = game.Players.LocalPlayer
local Char = Player.Character
if script.Parent.className ~= "HopperBin" then
local h = Instance.new("HopperBin", Player.Backpack)
h.Name = "Lazers"
script.Parent = h
end
local bin = script.Parent
a=false
cam=nil
function onSelected(mouse)
mouse.Button1Down:connect(function()
local pos1 = Char.Head.Position
local pos2 = mouse.hit.p
local shot = Instance.new("Part")
shot.Parent = workspace
shot.Anchored = true
shot.formFactor = "Custom"
shot.BrickColor = BrickColor.new("Bright red")
shot.Size = Vector3.new(1, 1, 1)
shot.CanCollide = false
shot.CFrame = CFrame.new((pos1 + pos2) / 2, pos2)
local mesh = Instance.new("BlockMesh")
mesh.Parent = shot
mesh.Bevel = 0.1
mesh.Scale = Vector3.new(3, 3, (pos1 - pos2).magnitude)
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait(0.5)
shot:remove()
end)
mouse.KeyDown:connect(function(key)
if key == "q" then
local pos1 = Char.Head.Position
local pos2 = mouse.hit.p
local shot = Instance.new("Part")
shot.Parent = workspace
shot.Anchored = true
shot.formFactor = "Custom"
shot.BrickColor = BrickColor.new("Bright yellow")
shot.Size = Vector3.new(1, 1, 1)
shot.CanCollide = false
shot.CFrame = CFrame.new((pos1 + pos2) / 2, pos2)
local mesh = Instance.new("BlockMesh")
mesh.Parent = shot
mesh.Bevel = 0.1
mesh.Scale = Vector3.new(3, 3, (pos1 - pos2).magnitude)
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait(0.5)
shot:remove()
end
if key == "e" then
local pos1 = Char.Head.Position
local pos2 = mouse.hit.p
local shot = Instance.new("Part")
shot.Parent = workspace
shot.Anchored = true
shot.formFactor = "Custom"
shot.BrickColor = BrickColor.new("Bright green")
shot.Size = Vector3.new(1, 1, 1)
shot.CanCollide = false
shot.CFrame = CFrame.new((pos1 + pos2) / 2, pos2)
local mesh = Instance.new("BlockMesh")
mesh.Parent = shot
mesh.Bevel = 0.1
mesh.Scale = Vector3.new(3, 3, (pos1 - pos2).magnitude)
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait()
local ex = Instance.new("Explosion", workspace)
ex.Position = pos2
for _, v in pairs(game.Players:GetChildren()) do
if v.Name == mouse.Target.Parent.Name then
v.Character:BreakJoints()
end
end
wait(0.5)
shot:remove()
end
if key == "x" then
positio.position = positio.position - Vector3.new(0, 10, 0)
end
if key == "c" then
positio.position = positio.position + Vector3.new(0, 10, 0)
end
if key == "z" then
if not a then
local part = Instance.new("Part",workspace)
cam=game.Workspace.CurrentCamera:clone()
cam.Parent=game.Workspace
game.Workspace.CurrentCamera.CameraSubject = mouse.Target
game.Workspace.CurrentCamera.CameraType=4
a=true
else
game.Workspace.CurrentCamera.CameraSubject=game.Players.LocalPlayer.Character
game.Workspace.CurrentCamera:Remove()
game.Workspace.CurrentCamera=cam
a=false
end
end
end)
end
function onDesel(mouse)
end
bin.Selected:connect(onSelected)
bin.Deselected:connect(onDesel)
|
-----------------------------
-- Invisible Air --
-----------------------------
artoria_strike_air = class({})
function artoria_strike_air:OnSpellStart()
local caster = self:GetCaster()
local target = self:GetCursorTarget()
local point = self:GetCursorPosition() + (caster:GetForwardVector() * 1)
if target then
point = target:GetOrigin()
end
caster:EmitSound("artoria_strike_air")
-- if has special_bonus_artoria_strike_air_2 then reduce cool down
local special_bonus_ability_2 = caster:FindAbilityByName("special_bonus_artoria_strike_air_2")
if special_bonus_ability_2 and special_bonus_ability_2:GetLevel() > 0 then
self:EndCooldown()
local cooldown = self:GetCooldown(self:GetLevel()) - special_bonus_ability_2:GetSpecialValueFor("value")
cooldown = caster:GetCooldownReduction() * cooldown
self:StartCooldown(cooldown)
end
self.bRetracting = false
self.hVictim = nil
self.bDiedInInvisibleAir = false
local particleNameInvi = "particles/custom/artoria/invisible_air/artoria_invisible_air.vpcf"
local particleName = "particles/custom/artoria/strike_air/artoria_strike_air.vpcf"
local fxIndex = ParticleManager:CreateParticle( particleName, PATTACH_POINT , caster )
ParticleManager:SetParticleControl( fxIndex, 3, caster:GetAbsOrigin() )
local immunity_duration = self:GetSpecialValueFor("immunity_duration")
caster:AddNewModifier( caster, self, "modifier_black_king_bar_immune", {Duration = immunity_duration} )
-- get ability cast range
local projectile_distance = self:GetSpecialValueFor("cast_range")
local projectile_speed = self:GetSpecialValueFor("speed")
local projectile_start_radius = self:GetSpecialValueFor("start_radius")
local projectile_end_radius = self:GetSpecialValueFor("end_radius")
-- get direction
local direction = point-caster:GetOrigin()
direction.z = 0
local projectile_direction = direction:Normalized()
local info = {
Source = caster,
Ability = self,
vSpawnOrigin = caster:GetAbsOrigin(),
bDeleteOnHit = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES,
EffectName = particleNameInvi,
fDistance = projectile_distance,
fStartRadius = projectile_start_radius,
fEndRadius = projectile_end_radius,
vVelocity = projectile_direction * projectile_speed,
fExpireTime = GameRules:GetGameTime() + 1.5,
bProvidesVision = false,
}
ProjectileManager:CreateLinearProjectile(info)
Timers:CreateTimer( 1.5, function()
ParticleManager:DestroyParticle( fxIndex, false )
ParticleManager:ReleaseParticleIndex( fxIndex )
end
)
end
function artoria_strike_air:OnProjectileHit_ExtraData(target, vLocation, tData)
if target == nil then return end
local caster = self:GetCaster()
local damage = self:GetSpecialValueFor( "damage" )
local stunDuration = self:GetSpecialValueFor( "stun_duration" )
if caster:HasModifier("modifier_item_aghanims_shard") then
-- perform attack target
self:GetCaster():PerformAttack (
target,
true,
true,
true,
false,
false,
false,
true)
end
if target:IsMagicImmune() then
return
end
local special_bonus_ability_1 = caster:FindAbilityByName("special_bonus_artoria_strike_air_1")
if special_bonus_ability_1 and special_bonus_ability_1:GetLevel() > 0 then
-- add damage
damage = damage + special_bonus_ability_1:GetSpecialValueFor("value")
end
local dmgtable = {
attacker = caster,
victim = target,
damage = damage,
damage_type = DAMAGE_TYPE_MAGICAL,
damage_flags = 0,
ability = self
}
ApplyDamage(dmgtable)
target:AddNewModifier( caster, self, "modifier_stunned", {Duration = stunDuration} )
end
|
--[[
Mod Xpro para Minetest
Copyright (C) 2018 BrunoMine (https://github.com/BrunoMine)
Recebeste uma cópia da GNU Lesser General
Public License junto com esse software,
se não, veja em <http://www.gnu.org/licenses/>.
Eventos de ganho ou perca de XP ao colocar um node
]]
-- Lista de itens que geram recompensa
xpro.place_node_xp_list = {}
-- Chamada global
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
-- Verifica se node gera XP
if xpro.place_node_xp_list[newnode.name] then
if xpro.place_node_xp_list[newnode.name] > 0 then
xpro.add_xp(placer:get_player_name(), xpro.place_node_xp_list[newnode.name])
else
xpro.rem_xp(placer:get_player_name(), math.abs(xpro.place_node_xp_list[newnode.name]))
end
end
end)
-- Registrar item para o evento
xpro.register_on_placenode = function(name, xp)
if tonumber(xp) == 0 then return end
xpro.place_node_xp_list[name] = xp
end
|
local filterShader
local function getFilterShader()
if filterShader == nil then
local shaderFragStr = VFS.LoadFile("shaders/map_blur_drawing.glsl", nil, VFS.MOD)
local shaderTemplate = {
fragment = shaderFragStr,
uniformInt = {
mapTex = 0,
patternTexture = 1,
},
}
local shader = Shaders.Compile(shaderTemplate, "blur")
filterShader = {
shader = shader,
uniforms = {
patternRotationID = gl.GetUniformLocation(shader, "patternRotation"),
strengthID = gl.GetUniformLocation(shader, "strength"),
kernelID = gl.GetUniformLocation(shader, "kernel"),
},
}
end
return filterShader
end
function DrawFilter(opts, x, z, size)
local textures = SB.model.textureManager:getMapTextures(x, z, x + size, z + size)
-- create temporary textures to be used as source for modifying the textures later on
local tmps = gfx:MakeMapTextureCopies(textures)
local shaderObj = getFilterShader()
local shader = shaderObj.shader
local uniforms = shaderObj.uniforms
gl.Blending("disable")
gl.UseShader(shader)
if opts.kernelMode == "blur" then
gl.UniformMatrix(uniforms.kernelID, 0.0625, 0.125, 0.0625, 0.125, 0.25, 0.125, 0.0625, 0.125, 0.0625)
elseif opts.kernelMode == "bottom_sobel" then
gl.UniformMatrix(uniforms.kernelID, -1, -2, -1, 0, 0, 0, 1, 2, 1)
elseif opts.kernelMode == "emboss" then
gl.UniformMatrix(uniforms.kernelID, -2, -1, 0, -1, 1, 1, 0, 1, 2)
elseif opts.kernelMode == "left_sobel" then
gl.UniformMatrix(uniforms.kernelID, 1, 0, -1, 2, 0, -2, 1, 0, -1)
elseif opts.kernelMode == "outline" then
gl.UniformMatrix(uniforms.kernelID, -1, -1, -1, -1, 8, -1, -1, -1, -1)
elseif opts.kernelMode == "right_sobel" then
gl.UniformMatrix(uniforms.kernelID, -1, 0, 1, -2, 0, 2, -1, 0, 1)
elseif opts.kernelMode == "sharpen" then
gl.UniformMatrix(uniforms.kernelID, 0, -1, 0, -1, 5, -1, 0, -1, 0)
elseif opts.kernelMode == "top sobel" then
gl.UniformMatrix(uniforms.kernelID, 1, 2, 1, 0, 0, 0, -1, -2, -1)
end
gl.Uniform(uniforms.strengthID, opts.strength)
gl.Texture(1, SB.model.textureManager:GetTexture(opts.patternTexture))
gl.Uniform(uniforms.patternRotationID, opts.patternRotation)
local tCoord = __GenerateTextureCoords(x, z, size, size, opts)
for i, v in pairs(textures) do
local renderTexture = v.renderTexture
local mapTexture = renderTexture.texture
renderTexture.dirty = true
local mCoord, vCoord = __GenerateMapCoords(v.x, v.y, size, size)
gl.Texture(0, tmps[i])
gl.RenderToTexture(mapTexture, ApplyTexture, mCoord, tCoord, vCoord)
end
CheckGLSL(shader)
-- texture 0 is changed multiple times inside the for loops, but it's OK to disabled it just once here
gl.Texture(0, false)
gl.Texture(1, false)
gl.UseShader(0)
end |
return {
name = 'KeyConstant',
description = 'All the keys you can press. Note that some keys may not be available on your keyboard or system.',
constants = {
{
name = 'a',
description = 'The A key',
},
{
name = 'b',
description = 'The B key',
},
{
name = 'c',
description = 'The C key',
},
{
name = 'd',
description = 'The D key',
},
{
name = 'e',
description = 'The E key',
},
{
name = 'f',
description = 'The F key',
},
{
name = 'g',
description = 'The G key',
},
{
name = 'h',
description = 'The H key',
},
{
name = 'i',
description = 'The I key',
},
{
name = 'j',
description = 'The J key',
},
{
name = 'k',
description = 'The K key',
},
{
name = 'l',
description = 'The L key',
},
{
name = 'm',
description = 'The M key',
},
{
name = 'n',
description = 'The N key',
},
{
name = 'o',
description = 'The O key',
},
{
name = 'p',
description = 'The P key',
},
{
name = 'q',
description = 'The Q key',
},
{
name = 'r',
description = 'The R key',
},
{
name = 's',
description = 'The S key',
},
{
name = 't',
description = 'The T key',
},
{
name = 'u',
description = 'The U key',
},
{
name = 'v',
description = 'The V key',
},
{
name = 'w',
description = 'The W key',
},
{
name = 'x',
description = 'The X key',
},
{
name = 'y',
description = 'The Y key',
},
{
name = 'z',
description = 'The Z key',
},
{
name = '0',
description = 'The zero key',
},
{
name = '1',
description = 'The one key',
},
{
name = '2',
description = 'The two key',
},
{
name = '3',
description = 'The three key',
},
{
name = '4',
description = 'The four key',
},
{
name = '5',
description = 'The five key',
},
{
name = '6',
description = 'The six key',
},
{
name = '7',
description = 'The seven key',
},
{
name = '8',
description = 'The eight key',
},
{
name = '9',
description = 'The nine key',
},
{
name = 'space',
description = 'Space key',
},
{
name = '!',
description = 'Exclamation mark key',
},
{
name = '"',
description = 'Double quote key',
},
{
name = '#',
description = 'Hash key',
},
{
name = '$',
description = 'Dollar key',
},
{
name = '&',
description = 'Ampersand key',
},
{
name = '\'',
description = 'Single quote key',
},
{
name = '(',
description = 'Left parenthesis key',
},
{
name = ')',
description = 'Right parenthesis key',
},
{
name = '*',
description = 'Asterisk key',
},
{
name = '+',
description = 'Plus key',
},
{
name = ',',
description = 'Comma key',
},
{
name = '-',
description = 'Hyphen-minus key',
},
{
name = '.',
description = 'Full stop key',
},
{
name = '/',
description = 'Slash key',
},
{
name = ':',
description = 'Colon key',
},
{
name = ';',
description = 'Semicolon key',
},
{
name = '<',
description = 'Less-than key',
},
{
name = '=',
description = 'Equal key',
},
{
name = '>',
description = 'Greater-than key',
},
{
name = '?',
description = 'Question mark key',
},
{
name = '@',
description = 'At sign key',
},
{
name = '[',
description = 'Left square bracket key',
},
{
name = '\\',
description = 'Backslash key',
},
{
name = ']',
description = 'Right square bracket key',
},
{
name = '^',
description = 'Caret key',
},
{
name = '_',
description = 'Underscore key',
},
{
name = '`',
description = 'Grave accent key',
},
{
name = 'kp0',
description = 'The numpad zero key',
},
{
name = 'kp1',
description = 'The numpad one key',
},
{
name = 'kp2',
description = 'The numpad two key',
},
{
name = 'kp3',
description = 'The numpad three key',
},
{
name = 'kp4',
description = 'The numpad four key',
},
{
name = 'kp5',
description = 'The numpad five key',
},
{
name = 'kp6',
description = 'The numpad six key',
},
{
name = 'kp7',
description = 'The numpad seven key',
},
{
name = 'kp8',
description = 'The numpad eight key',
},
{
name = 'kp9',
description = 'The numpad nine key',
},
{
name = 'kp.',
description = 'The numpad decimal point key',
},
{
name = 'kp/',
description = 'The numpad division key',
},
{
name = 'kp*',
description = 'The numpad multiplication key',
},
{
name = 'kp-',
description = 'The numpad substraction key',
},
{
name = 'kp+',
description = 'The numpad addition key',
},
{
name = 'kpenter',
description = 'The numpad enter key',
},
{
name = 'kp=',
description = 'The numpad equals key',
},
{
name = 'up',
description = 'Up cursor key',
},
{
name = 'down',
description = 'Down cursor key',
},
{
name = 'right',
description = 'Right cursor key',
},
{
name = 'left',
description = 'Left cursor key',
},
{
name = 'home',
description = 'Home key',
},
{
name = 'end',
description = 'End key',
},
{
name = 'pageup',
description = 'Page up key',
},
{
name = 'pagedown',
description = 'Page down key',
},
{
name = 'insert',
description = 'Insert key',
},
{
name = 'backspace',
description = 'Backspace key',
},
{
name = 'tab',
description = 'Tab key',
},
{
name = 'clear',
description = 'Clear key',
},
{
name = 'return',
description = 'Return key',
},
{
name = 'delete',
description = 'Delete key',
},
{
name = 'f1',
description = 'The 1st function key',
},
{
name = 'f2',
description = 'The 2nd function key',
},
{
name = 'f3',
description = 'The 3rd function key',
},
{
name = 'f4',
description = 'The 4th function key',
},
{
name = 'f5',
description = 'The 5th function key',
},
{
name = 'f6',
description = 'The 6th function key',
},
{
name = 'f7',
description = 'The 7th function key',
},
{
name = 'f8',
description = 'The 8th function key',
},
{
name = 'f9',
description = 'The 9th function key',
},
{
name = 'f10',
description = 'The 10th function key',
},
{
name = 'f11',
description = 'The 11th function key',
},
{
name = 'f12',
description = 'The 12th function key',
},
{
name = 'f13',
description = 'The 13th function key',
},
{
name = 'f14',
description = 'The 14th function key',
},
{
name = 'f15',
description = 'The 15th function key',
},
{
name = 'numlock',
description = 'Num-lock key',
},
{
name = 'capslock',
description = 'Caps-lock key',
},
{
name = 'scrollock',
description = 'Scroll-lock key',
},
{
name = 'rshift',
description = 'Right shift key',
},
{
name = 'lshift',
description = 'Left shift key',
},
{
name = 'rctrl',
description = 'Right control key',
},
{
name = 'lctrl',
description = 'Left control key',
},
{
name = 'ralt',
description = 'Right alt key',
},
{
name = 'lalt',
description = 'Left alt key',
},
{
name = 'rmeta',
description = 'Right meta key',
},
{
name = 'lmeta',
description = 'Left meta key',
},
{
name = 'lsuper',
description = 'Left super key',
},
{
name = 'rsuper',
description = 'Right super key',
},
{
name = 'mode',
description = 'Mode key',
},
{
name = 'compose',
description = 'Compose key',
},
{
name = 'pause',
description = 'Pause key',
},
{
name = 'escape',
description = 'Escape key',
},
{
name = 'help',
description = 'Help key',
},
{
name = 'print',
description = 'Print key',
},
{
name = 'sysreq',
description = 'System request key',
},
{
name = 'break',
description = 'Break key',
},
{
name = 'menu',
description = 'Menu key',
},
{
name = 'power',
description = 'Power key',
},
{
name = 'euro',
description = 'Euro (€) key',
},
{
name = 'undo',
description = 'Undo key',
},
{
name = 'www',
description = 'WWW key',
},
{
name = 'mail',
description = 'Mail key',
},
{
name = 'calculator',
description = 'Calculator key',
},
{
name = 'appsearch',
description = 'Application search key',
},
{
name = 'apphome',
description = 'Application home key',
},
{
name = 'appback',
description = 'Application back key',
},
{
name = 'appforward',
description = 'Application forward key',
},
{
name = 'apprefresh',
description = 'Application refresh key',
},
{
name = 'appbookmarks',
description = 'Application bookmarks key',
},
},
} |
local dt = require "decisiontree._env"
-- Interface for all decisionForestTrainers
local DFT = torch.class("dt.DecisionForestTrainer", dt)
-- Train a DecisionForest with examples, a table of valid featureIds and a dataset (i.e. sortedExamplesByFeatureId)
function DFT:train(examples, validFeatureIds, dataset)
assert(torch.type(examples) == "table")
assert(torch.isTypeOf(examples[1], "dt.LabeledExample"))
assert(torch.type(validFeatureIds) == 'table')
assert(torch.type(dataset) == 'table')
for k,v in pairs(dataset) do
assert(torch.type(v) == 'table')
assert(torch.isTypeOf(v[1], 'dt.LabeledExample'))
break
end
-- dataset is a table mapping featureIds to sorted lists of LabeledExamples
-- e.g. {featureId={example1,example2,example3}}
error"Not Implemented"
end
|
local function TestFunction(name)
for _, func in ipairs(APIDocumentation.functions) do
-- print(func:GetFullName(false, false))
local fullName
if func.System.Namespace then
fullName = format("%s.%s", func.System.Namespace, func.Name)
else
fullName = func.Name
end
if fullName == name then
print(Wowpedia:GetPageText(func))
break
end
end
end
TestFunction("C_Calendar.CanSendInvite") -- no arguments, one return value
TestFunction("C_Calendar.EventSetTitle") -- one argument, no return values
TestFunction("C_AuctionHouse.MakeItemKey") -- three optional args
TestFunction("C_Calendar.EventSetClubId") -- first argument optional
TestFunction("C_ArtifactUI.GetAppearanceInfo") -- two optional returns
TestFunction("C_Club.CreateClub") -- optional arguments in middle
-- TestFunction("C_ChatInfo.SendAddonMessage") -- string arguments
-- TestFunction("UnitPowerDisplayMod") -- enum transclude argument
-- TestFunction("C_Calendar.GetClubCalendarEvents") -- structure transclude arguments
-- TestFunction("C_AccountInfo.IsGUIDBattleNetAccountType") -- bool return
-- TestFunction("C_AuctionHouse.GetItemKeyInfo") -- struct inline returns
-- TestFunction("C_ActionBar.FindFlyoutActionButtons") -- number[] return
-- TestFunction("C_AuctionHouse.GetTimeLeftBandInfo") -- transclude argument
-- TestFunction("C_CovenantSanctumUI.GetSanctumType") -- inline enum return
-- TestFunction("C_BattleNet.GetAccountInfoByID") -- bnet test
-- TestFunction("C_UIWidgetManager.GetDoubleStateIconRowVisualizationInfo") -- non and transclude enums
-- TestFunction("C_UIWidgetManager.GetIconAndTextWidgetVisualizationInfo") -- non and transclude enums
-- TestFunction("C_AreaPoiInfo.GetAreaPOISecondsLeft") -- documentation
-- TestFunction("C_ArtifactUI.GetEquippedArtifactNumRelicSlots") -- argument documentation
-- TestFunction("C_ArtifactUI.GetMetaPowerInfo") -- StrideIndex
-- TestFunction("C_MapExplorationInfo.GetExploredMapTextures") -- structure in structure
-- TestFunction("SetPortraitTexture") -- table type, no mixin or innertype
-- TestFunction("C_Map.GetMapInfo") -- incongruent system name and namespace
-- TestFunction("GetUnitPowerBarInfo") -- no system namespace
local function TestEvent(name)
for _, event in ipairs(APIDocumentation.events) do
-- print(event:GetFullName(false, false))
if event.LiteralName == name then
print(Wowpedia:GetPageText(event))
break
end
end
end
-- TestEvent("ACTIONBAR_SHOWGRID") -- no payload
-- TestEvent("ITEM_SEARCH_RESULTS_UPDATED") -- struct, nilable
-- TestEvent("TRACKED_ACHIEVEMENT_UPDATE") -- optional params
-- TestEvent("AUCTION_HOUSE_AUCTION_CREATED") -- documentation
-- TestEvent("CLUB_MESSAGE_HISTORY_RECEIVED") -- documentation in payload
-- TestEvent("CONTRIBUTION_CHANGED") -- StrideIndex
-- TestEvent("HONOR_XP_UPDATE") -- Unit system
local function TestTable(name)
local apiTable = Wowpedia.complexTypes[name]
-- print(Wowpedia:GetTableTransclude(apiTable))
print(Wowpedia:GetTableText(apiTable, true))
end
-- enums
-- TestTable("UIWidgetVisualizationType")
-- TestTable("AuctionHouseTimeLeftBand") -- anonymous system
-- TestTable("PowerType") -- Unit system
-- structures
-- TestTable("BidInfo") -- struct and enum
-- TestTable("ArtifactArtInfo") -- mixins
-- TestTable("ItemKey") -- nilable, default
-- TestTable("AuctionHouseBrowseQuery") -- innertype enum
-- TestTable("ItemSearchResultInfo") -- innertype string
-- TestTable("ItemKeyInfo") -- nilable, bool
-- TestTable("ClubMessageIdentifier") -- documentation in field
-- TestTable("QuestWatchConsts") -- constants
-- TestTable("BNetGameAccountInfo")
-- missing
-- TestTable("CalendarTime")
-- TestTable("AppearanceSourceInfo")
-- TestTable("GuildTabardInfo")
local function PrintWowpediaLinks(name)
local fsFunc = ": {{api|%s}}"
local fsEvent = ": {{api|t=e|%s}}"
for _, system in ipairs(APIDocumentation.systems) do
if (system.Namespace or system.Name) == name then
for _, func in ipairs(system.Functions) do
print(fsFunc:format(func.Name))
end
for _, event in ipairs(system.Events) do
print(fsEvent:format(event.LiteralName))
end
break
end
end
end
-- PrintWowpediaLinks("Unit")
-- PrintWowpediaLinks("Expansion")
|
-- test code for bipartite matching
require 'nn'
require 'hdf5'
import 'matching_loss.lua'
cmd = torch.CmdLine()
cmd:option('-file' , '../../workspace/model/matching.asc')
params = cmd:parse(arg)
print(params)
method = 'matching'
outpath = '../../workspace'
outpath = string.format("%s/%s/" , outpath , method)
if not path.exists(outpath) then
os.execute("mkdir " .. outpath)
end
function load_image_feat()
local file = hdf5.open('../../workspace/test/test_feat_vgg_without_ft.mat' , 'r')
local data = file:read('feat_vgg'):all()
print (#data)
file:close()
return data:transpose(3,1):double()
end
function load_box()
local file = hdf5.open('../../workspace/test/edgebox_test.mat' , 'r')
local data = file:read('box'):all()
print (#data)
file:close()
return data:transpose(2,1):double()+1
end
function load_idx()
local file = hdf5.open('../../workspace/test/test_idx.mat' , 'r')
local data = file:read('test_sen_idx'):all()
print (#data)
file:close()
return data:transpose(2,1)
end
function load_phrase_feat()
local file = hdf5.open('../../workspace/test/testpv_pca.mat' , 'r')
local data = file:read('testpv_pca'):all()
print (#data)
file:close()
return data:transpose(2,1)
end
function write_to_file(fp , out)
local fw = io.open(fp , 'w')
for i=1,out:size()[1] do
fw:write(string.format("%f" , out[{i,1}]))
for j=2,out:size()[2] do
fw:write(string.format(" %d" , out[{i,j}]))
end
fw:write("\n")
end
fw:close()
end
--load data
feat_pv = load_phrase_feat()
feat_vgg = load_image_feat()
idx = load_idx()
box = load_box()
file = torch.DiskFile(params.file , 'r')
prl = file:readObject()
loss_function = nn.matching_loss(0,0)
--global parameters
dim_img = feat_vgg:size()[2]
dim_pv = feat_pv:size()[2]
num_sample = feat_vgg:size()[1]
num_sen = 5
fid = io.open('../../workspace/test/testID.txt' , 'r')
out = torch.Tensor(feat_vgg:size()[2],5)
cnt = 0
pos = 0
testvisual = torch.zeros(18000,1)
for i = 1,num_sample do
id = fid:read()
for j=1,num_sen do
vgg = feat_vgg[i]
pv = feat_pv[{{cnt+1,cnt+idx[{i,j}]},{}}]
cnt = cnt+idx[{i,j}]
feat = prl:forward({vgg,pv})
vgg = feat[1]
pv = feat[2]
idxx = torch.Tensor({vgg:size()[1]})
idxy = torch.Tensor({pv:size()[1]})
loss_x = loss_function:forward({{vgg,pv} , idxx , idxy , torch.zeros(pv:size()[1])})
for k=1,pv:size()[1] do
pos = pos+1
fp = string.format("%s%s_%d_%d.txt" , outpath , id , j , k)
out[{{},{1}}] = torch.zeros(vgg:size()[1] , 1)
if loss_function.pred[k] > 0 then
out[{loss_function.pred[k],1}] = loss_function.W[{loss_function.pred[k] , k}]
testvisual[{pos,1}] = 1
end
out[{{},{2,5}}] = box[{{(i-1)*100+1,i*100},{}}]
write_to_file(fp , out)
end
end
if i % 10 == 0 then
print(i)
end
end
|
return {
summary = 'Convert a point from world space to collider space.',
description = [[
Converts a point from world coordinates into local coordinates relative to the Collider.
]],
arguments = {
{
name = 'wx',
type = 'number',
description = 'The x coordinate of the world point.'
},
{
name = 'wy',
type = 'number',
description = 'The y coordinate of the world point.'
},
{
name = 'wz',
type = 'number',
description = 'The z coordinate of the world point.'
}
},
returns = {
{
name = 'x',
type = 'number',
description = 'The x position of the local-space point.'
},
{
name = 'y',
type = 'number',
description = 'The y position of the local-space point.'
},
{
name = 'z',
type = 'number',
description = 'The z position of the local-space point.'
}
},
related = {
'Collider:getWorldPoint',
'Collider:getLocalVector',
'Collider:getWorldVector'
}
}
|
-- a proper user system --
local lib = {}
local dotos = require("dotos")
local fs = require("fs")
local settings = require("settings")
local hash = dofile("/dotos/core/sha256.lua").digest
local ucfg = "/.users.cfg"
local function ensure()
if not fs.exists(ucfg) or not settings.get(ucfg, "admin") then
settings.set(ucfg, "admin", tostring(hash("admin")):gsub(".",
function(c)return ("%02x"):format(c:byte())end))
end
end
function lib.auth(name, pw)
checkArg(1, name, "string")
checkArg(2, pw, "string")
if not lib.exists(name) then
return nil, "that user does not exist"
end
return settings.get(ucfg, name) == tostring(hash(pw)):gsub(".",
function(c)return ("%02x"):format(c:byte())end)
end
local threads = {}
function lib.threads(t)
lib.threads = nil
threads = t
end
function lib.runas(name, pw, ...)
if not lib.auth(name, pw) then
return nil, "bad credentials"
end
local old = dotos.getuser()
local tid = dotos.getpid()
threads[tid].user = name
local result = table.pack(pcall(dotos.spawn, ...))
threads[tid].user = old
return assert(table.unpack(result, 1, result.n))
end
function lib.exists(name)
checkArg(1, name, "string")
ensure()
return not not settings.get(ucfg, name)
end
return lib
|
---@class CS.FairyGUI.MaterialManager
---@field public firstMaterialInFrame boolean
---@type CS.FairyGUI.MaterialManager
CS.FairyGUI.MaterialManager = { }
---@param value (fun(obj:CS.UnityEngine.Material):void)
function CS.FairyGUI.MaterialManager:add_onCreateNewMaterial(value) end
---@param value (fun(obj:CS.UnityEngine.Material):void)
function CS.FairyGUI.MaterialManager:remove_onCreateNewMaterial(value) end
---@return number
---@param keywords CS.System.Collections.Generic.IList_CS.System.String
function CS.FairyGUI.MaterialManager:GetFlagsByKeywords(keywords) end
---@return CS.UnityEngine.Material
---@param flags number
---@param blendMode number
---@param group number
function CS.FairyGUI.MaterialManager:GetMaterial(flags, blendMode, group) end
function CS.FairyGUI.MaterialManager:DestroyMaterials() end
function CS.FairyGUI.MaterialManager:RefreshMaterials() end
return CS.FairyGUI.MaterialManager
|
--
------------------------------------------------------------------------------
-- File: dwark.lpeg.http.lua
--
-- Usage: Used by worker to match http headers
--
-- Description:
--
-- Options: ---
-- Requirements: ---
-- Bugs: ---
-- Notes: ---
-- Author: YOUR NAME (), <>
-- Organization:
-- Version: 1.0
-- Created: 15-10-19
-- Revision: ---
------------------------------------------------------------------------------
--
local core = require "dwark.lpeg"
local abnf = core.abnf
local Ct = core.Ct
local Cg = core.Cg
local P = core.P
local number = abnf.DIGIT^1
local dotnr = number * P"." * number
local version = P"HTTP/" * dotnr
local explain = abnf.PCHAR^0 -- all printable chars (visible + space)
local key = (1-P":")^1
local val = (1-abnf.CRLF)^1
--[[ http patterns ]]
local status = Ct(
Cg(version, "version") * abnf.WSP
* Cg(number, "code") * abnf.WSP
* Cg(explain, "status")
)
local header = Ct(
Cg(key, "k") * P":" * abnf.WSP^0
* Cg(val, "v"))
return {
status = status,
header = header
}
|
local gfs = require("gears.filesystem")
local naughty = require("naughty")
local display = true
awesome.connect_signal("signal::battery", function(value)
if value < 11 then
naughty.notification({
title = "Battery Status",
text = "Running low at " .. value .. "%",
image = gfs.get_configuration_dir() .. "icons/ghosts/battery.png"
})
end
if (value > 94 and display) then
naughty.notification({
title = "Battery Status",
text = "Running high at " .. value .. "%",
image = gfs.get_configuration_dir() .. "icons/ghosts/battery.png"
})
display = false
end
end)
awesome.connect_signal("signal::charger", function(plugged)
if plugged then
naughty.notification({
title = "Battery Status",
text = "Charging",
image = gfs.get_configuration_dir() ..
"icons/ghosts/battery_charging.png"
})
display = true
end
end)
|
--[[
This file is part of cvetool. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/libertine-linux/cvetool/master/COPYRIGHT. No part of cvetool, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
Copyright © 2015 The developers of cvetool. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/libertine-linux/cvetool/master/COPYRIGHT.
]]--
local halimede = require('halimede')
local cvetool = require('cvetool')
local toml = require('toml')
local lfs = require('syscall.lfs')
local dir = lfs.dir
local attributes = lfs.attributes
local findCves = cvetool.findCves
local FileHandleStream = halimede.io.FileHandleStream
local exception = halimede.exception
local Node = toml.Node
local folderSeparator = halimede.packageConfiguration.folderSeparator
local shortOptionName = 'i'
local longOptionName = 'input'
local optionDescription = ('-%s, --%s'):format(shortOptionName, longOptionName)
local function findAllNvdXmlFiles(options)
local nvdDatabaseFolderPath = options['nvd-database']
local iterator, stateOrError = dir(nvdDatabaseFolderPath)
if iterator == nil then
exception.throw("Could not use '--nvd-database' '%s'", nvdDatabaseFolderPath)
end
local nvdXmlFiles = {}
local state = stateOrError
local directoryEntryName
while true do
local directoryEntryName = iterator(state)
if directoryEntryName == nil then
break
end
local stringFilePath = nvdDatabaseFolderPath .. folderSeparator .. directoryEntryName
if stringFilePath:endsWith('.xml') then
local attributeMode, errorMessage = attributes(stringFilePath, 'mode')
if attributeMode ~= nil and attributeMode == 'file' then
nvdXmlFiles[#nvdXmlFiles + 1] = stringFilePath
end
end
end
return nvdXmlFiles
end
local function commandAction(options)
local nvdXmlFiles = findAllNvdXmlFiles(options)
if #nvdXmlFiles == 0 then
return
end
local toml = Node.parseFromStringPathOrStandardIn(options[longOptionName], longOptionName, true)
local name = toml:stringOrDefault('name', longOptionName, '(unspecified)')
local cpe = toml:tableOfStrings('CPE', longOptionName)
local cve = toml:node('CVE', longOptionName)
local fixed = cve:tableOfStringsOrEmptyIfMissing('fixed', longOptionName)
local irrelevant = cve:tableOfStringsOrEmptyIfMissing('irrelevant', longOptionName)
local suppressed = cve:tableOfStringsOrEmptyIfMissing('suppressed', longOptionName)
for _, nvdXmlFilePathString in ipairs(nvdXmlFiles) do
findCves(cpe, nvdXmlFilePathString, '', function(cveId, summary)
if fixed[cveId] then
return
end
if irrelevant[cveId] then
return
end
if suppressed[cveId] then
return
end
hasNewCves = true
print(name .. '\t' .. cveId .. '\t' .. summary)
end)
collectgarbage()
end
if hasNewCves then
os.exit(2)
end
end
local function parseCommandLine(cliargs)
local command = cliargs:command('nvd', 'Checks all NVD XML database files to see if new CVEs are present; if so, exits with code 2')
command:action(commandAction)
command:option(optionDescription .. '=FILEPATH', '\tFILEPATH to nvd.toml; - is standard in', '-')
command:option('-n, --nvd-database=FOLDERPATH', '\tFOLDERPATH to a folder containing NVD CVE xml files downloaded using download-nvd', '.')
return command
end
halimede.modulefunction(parseCommandLine)
|
local theme={colors={normal={blue={0.4,0.85098039215686,0.93725490196078,1},green={0.65098039215686,0.88627450980392,0.18039215686275,1},cyan={0.63137254901961,0.93725490196078,0.89411764705882,1},white={0.97254901960784,0.97254901960784,0.94901960784314,1},red={0.97647058823529,0.14901960784314,0.44705882352941,1},magenta={0.68235294117647,0.50588235294118,1.0,1},black={0.15294117647059,0.15686274509804,0.13333333333333,1},yellow={0.95686274509804,0.74901960784314,0.45882352941176,1}},primary={background={0.15294117647059,0.15686274509804,0.13333333333333,1},foreground={0.97254901960784,0.97254901960784,0.94901960784314,1}},bright={blue={0.64705882352941,0.62352941176471,0.52156862745098,1},green={0.21960784313725,0.21960784313725,0.18823529411765,1},cyan={0.8,0.4,0.2,1},white={0.97647058823529,0.97254901960784,0.96078431372549,1},red={0.9921568627451,0.5921568627451,0.12156862745098,1},magenta={0.96078431372549,0.95686274509804,0.94509803921569,1},black={0.45882352941176,0.44313725490196,0.36862745098039,1},yellow={0.28627450980392,0.28235294117647,0.24313725490196,1}},cursor={text={0.15294117647059,0.15686274509804,0.13333333333333,1},cursor={0.97254901960784,0.97254901960784,0.94901960784314,1}}}}
return theme.colors |
cc = cc or {}
---CCBReader object
---@class CCBReader : Ref
local CCBReader = {}
cc.CCBReader = CCBReader
--------------------------------
--
---@param name string
---@return CCBReader
function CCBReader:addOwnerOutletName(name) end
--------------------------------
--
---@return array_table
function CCBReader:getOwnerCallbackNames() end
--------------------------------
--
---@param eventType int
---@return CCBReader
function CCBReader:addDocumentCallbackControlEvents(eventType) end
--------------------------------
--
---@param ccbRootPath char
---@return CCBReader
function CCBReader:setCCBRootPath(ccbRootPath) end
--------------------------------
--
---@param node Node
---@return CCBReader
function CCBReader:addOwnerOutletNode(node) end
--------------------------------
--
---@return array_table
function CCBReader:getOwnerCallbackNodes() end
--------------------------------
--
---@param seq CCBSequence
---@return bool
function CCBReader:readSoundKeyframesForSeq(seq) end
--------------------------------
--
---@return string
function CCBReader:getCCBRootPath() end
--------------------------------
--
---@return array_table
function CCBReader:getOwnerCallbackControlEvents() end
--------------------------------
--
---@return array_table
function CCBReader:getOwnerOutletNodes() end
--------------------------------
--
---@return string
function CCBReader:readUTF8() end
--------------------------------
--
---@param type int
---@return CCBReader
function CCBReader:addOwnerCallbackControlEvents(type) end
--------------------------------
--
---@return array_table
function CCBReader:getOwnerOutletNames() end
--------------------------------
---js setActionManager<br>
---lua setActionManager
---@param pAnimationManager CCBAnimationManager
---@return CCBReader
function CCBReader:setAnimationManager(pAnimationManager) end
--------------------------------
--
---@param seq CCBSequence
---@return bool
function CCBReader:readCallbackKeyframesForSeq(seq) end
--------------------------------
--
---@return array_table
function CCBReader:getAnimationManagersForNodes() end
--------------------------------
--
---@return array_table
function CCBReader:getNodesWithAnimationManagers() end
--------------------------------
---js getActionManager<br>
---lua getActionManager
---@return CCBAnimationManager
function CCBReader:getAnimationManager() end
--------------------------------
--
---@param scale float
---@return CCBReader
function CCBReader:setResolutionScale(scale) end
--------------------------------
---@overload fun(CCBReader):CCBReader
---@overload fun(NodeLoaderLibrary, CCBMemberVariableAssigner, CCBSelectorResolver, NodeLoaderListener):CCBReader
---@overload fun():CCBReader
---@param pNodeLoaderLibrary NodeLoaderLibrary
---@param pCCBMemberVariableAssigner CCBMemberVariableAssigner
---@param pCCBSelectorResolver CCBSelectorResolver
---@param pNodeLoaderListener NodeLoaderListener
---@return CCBReader
function CCBReader:CCBReader(pNodeLoaderLibrary, pCCBMemberVariableAssigner, pCCBSelectorResolver, pNodeLoaderListener) end
return CCBReader |
--[[
闪光
]]
local THIS_MODULE = ...
local FlashLight = class("FlashLight", require("app.main.modules.ui.FrameBase"))
--[[
构造函数
config
params 额外参数
name 名称
csb csb文件
widgets 组件表
bindings 绑定表
]]
function FlashLight:ctor(config)
self:setup(config)
self:retain()
end
-- 析构函数
function FlashLight:dtor()
self:delete()
self:release()
end
--[[
打开窗口
config
opacity 透明度
duration 持续时间
blinks 闪烁次数
onComplete 完成回调
]]
function FlashLight:OnOpen(config)
self.pl_flash:setOpacity(config.opacity or 255)
self.pl_flash:runAction(cc.Sequence:create(cc.Hide:create(),
cc.Blink:create(config.duration or 1, config.blinks or 1),
cc.Hide:create(),cc.CallFunc:create(function()
self:closeFrame()
if config.onComplete then config.onComplete() end
end)))
end
return FlashLight
|
return {'nomade','nomaden','nomadenbestaan','nomadenleven','nomadenstam','nomadentent','nomadenvolk','nomadisch','nomadisme','nomen','nomenclatuur','nominaal','nominalisme','nominalist','nominalistisch','nominatie','nominatief','nomineren','nomografie','nomogram','nomothetisch','nomadencultuur','nominatielijst','nominatieronde','nomden','nomadenstammen','nomadische','nomenclaturen','nomina','nominale','nominaties','nominatieven','nomineer','nomineerde','nomineerden','nomineert','nomogrammen','nomothetische','nominalisten','nominalistische','nominatieve','nomadenvolken','nomadenvolkeren'} |
modifier_neutral_champion = class({})
function modifier_neutral_champion:IsPurgable()
return false
end
function modifier_neutral_champion:DeclareFunctions()
return {MODIFIER_PROPERTY_TOOLTIP}
end
function modifier_neutral_champion:OnTooltip()
return self:GetStackCount()
end
function modifier_neutral_champion:GetTexture()
return "granite_golem_bash"
end |
-- trim a string.
function trim(s)
return s:match'^%s*(.*%S)' or ''
end
---
-- Splits a string on the given pattern, returned as a table of the delimited strings.
-- @param str the string to parse through
-- @param pat the pattern/delimiter to look for in str
-- @return a table of the delimited strings. If pat is empty, returns str. If str is not given, aka '' is given, then it returns an empty table.
function split(str, pat)
if pat == '' then
return str
end
local t = {} -- NOTE: use {n = 0} in Lua-5.0
local fpat = "(.-)" .. pat
local last_end = 1
local s, e, cap = str:find(fpat, 1)
while s do
if s ~= 1 or cap ~= "" then
table.insert(t,cap)
end
last_end = e+1
s, e, cap = str:find(fpat, last_end)
end
if last_end <= #str then
cap = str:sub(last_end)
table.insert(t, cap)
end
return t
end
function managePlayers(channel, isDuringGame)
if channel ~= nil then
print("Managing Players...")
channel:push("players")
isDuringGame = false --isDuringGame or false
local isManaging = true
while isManaging do
print("\nOptions (Choose one by entering the number, first letter, or full command):")
print("\t1. A[dd]: Create a new player/Change a player's name")
print("\t2. C[hange]: Edit a player's points")
print("\t3. D[elete]: Remove a player from the game")
print("\t4. L[ist]: List all players")
--print("\t5. T[est]: Test player buttons")
print("\t5. R[eturn]: Go back to previous menu")
local option = trim(io.read()):lower()
if option == "add" or option == "a" or option == "1" then
if not isDuringGame then print("Please note that adding a new player sets that buzzer to zero points.") end
print("Player Name?")
local playerName = trim(io.read())
if playerName ~= "" then
channel:push("add || "..playerName)
print("Switch over to the video program and have the player press their button.")
local playerInfo = playerChannel:demand()
playerInfo = split(playerInfo, " || ")
players[playerInfo[3]] = {["name"] = playerInfo[2], ["index"] = playerInfo[3], ["points"] = 0}
print("Player "..playerInfo[2].." is set to button "..playerInfo[3].."!")
else
print("Cannot have a player with no name. Try again.")
end
elseif option == "change" or option == "c" or option == "2" then
print("Which player?")
local playerName = trim(io.read())
if playerName ~= "" then
local playerButton = getPlayerButton(playerName)
if playerButton ~= nil then
print("Their current point value:"..players[playerButton].points..". Enter new point value:")
-- ERROR CHECK HERE!!!
local newPoints = tonumber(trim(io.read()))
if newPoints ~= nil then
players[playerButton].points = newPoints
channel:push("edit || "..playerButton.." || "..newPoints)
print("Player "..playerName.." now has "..newPoints.." points.")
else
print("Invalid point value! Try again.")
end
else
print("Player name cannot be empty. Try again.")
end
else
print("Could not find player \""..playerName.."\"... Try again.")
end
elseif option == "delete" or option == "d" or option == "3" then
print("Which player?")
local playerName = trim(io.read())
if playerName ~= "" then
local playerButton = getPlayerButton(playerName)
if playerButton ~= nil then
channel:push("remove || "..playerButton)
print("Player "..playerName.." has been removed from the game.")
else
print("Empty string, try again.")
end
else
print("Could not find player \""..playerName.."\"... Try again.")
end
--elseif option == "test" or option == "t" then
elseif option == "list" or option == "l" or option == "4" then
printPlayers()
elseif option == "return" or option == "r" or option == "5" then
print("Returning to previous menu...")
isManaging = false
else
print("Bad option, try again.")
end
end
end
return true
end
function getPlayerButton(playerName)
for key, value in pairs(players) do
if value.name:lower() == playerName:lower() then
return key
end
end
return nil
end
function printPlayerByIndex(button)
if players[button] ~= nil then
print("Button "..players[button].index..": "..players[button].name.." ("..players[button].points.." points)")
end
end
function printPlayerByName(name)
for key, value in pairs(players) do
if value.name == name then
printPlayerByIndex(key)
break
end
end
end
function printPlayers()
for key, value in pairs(players) do
printPlayerByIndex(key)
end
end
function sendMessage(beginningMessage, channelMessage)
if channel ~= nil then
print(beginningMessage)
channel:push(channelMessage)
end
end
function printBeginGameMessage()
-- options for when the game is playing should be here.
print("\nControls for game:")
print("\ty: Correct Answer")
print("\tn: Incorrect Answer")
print("\tp: Toggle Pause")
print("\t]: Go to Next Image")
--print("\tf: Fullscreen (please pause the game before doing so)")
--print("\t[: Quick Skip Backwards")
--print("\ts\n\t\tStop Game")
print("\nSwitch to this screen to edit player scores if necessary.\n")
end
function beginGame(channel)
if channel ~= nil then
print("To begin the game, please switch to the game board window.")
channel:push("start")
gameStartChannel:demand()
printBeginGameMessage()
local isWaitingForMessage = true
local currImage = ""
-- look for "LostFocus" or "GameOver"
while isWaitingForMessage do
if gameStartChannel:getCount() > 0 then
for i = 1, gameStartChannel:getCount() do
local action = gameStartChannel:pop()
if action == "LostFocus" then
-- show options for editing players. ...I think?
managePlayers(channel, true)
printBeginGameMessage()
print(currImage)
elseif action == "GameOver" then
isWaitingForMessage = false
elseif action:find("update || ") then
-- "update || <button number> || <new point value>"
action = split(action, " || ")
local player = players[action[2]]
local newPoints = tonumber(action[3])
if (newPoints < player.points) then
print("\t"..player.name.." lost "..tostring(player.points - newPoints).." point(s)... They now have "..newPoints)
else
print("\t"..player.name.." won "..tostring(newPoints - player.points).." point(s)! They now have "..newPoints)
end
print()
players[action[2]].points = tonumber(action[3])
elseif action:find("NextImage || ") then
action = split(action, " || ")
print(action[2])
currImage = action[2]
elseif action:find("buzzedPlayer || ") then
action = split(action, " || ")
print("\t"..action[2].."'s Turn!")
end
end
end
end
end
return true
end
function reloadImages(channel)
if channel ~= nil then
print("Reloading image folder...")
channel:push("reload")
end
return true
end
function setFullscreen(channel)
if channel ~= nil then
print("Toggling fullscreen...")
channel:push("fullscreen")
end
return true
end
function pauseGame(channel)
if channel ~= nil then
print("Toggling pause...")
channel:push("pause")
end
return true
end
function manageSettings(channel)
if channel ~= nil then
while true do
print("\nSetting Options (Type in the number of the command you want):")
print("\t1. Change pixel size")
print("\t2. Change length of time for an image to be onscreen")
--print("\t3. Toggle Image Checking Mode")
print("\t3. Toggle Randomly Ordered Images")
--print("\t5. Manage Point Distribution")
--print("\t5. Show current settings")
print("\t4. Return to previous menu")
local option = trim(io.read()):lower()
if option == "1" then
print("Enter new pixel size:")
local size = tonumber(trim(io.read()):lower())
if size == nil then
print("Not a valid entry. Try again.")
else
print("Pixel size is now "..size..".")
channel:push("pixelSize || "..size)
end
elseif option == "2" then
print("Enter new amount of time:")
local time = tonumber(trim(io.read()):lower())
if time == nil then
print("Not a valid entry. Try again.")
else
print("Game time is now "..time..".")
channel:push("gameTime || "..time)
end
--[[elseif option == "3" then
print("Toggling image checking mode...")
channel:push("isCheckingImages")]]
elseif option == "3" then
print("Toggling random order of images...")
channel:push("isRandomFiles")
elseif option == "4" then
break
end
end
end
return true
end
function exitProgram(channel)
if channel ~= nil then
print("Goodbye!")
channel:push("exit")
end
return false
end
-- do a do-while loop, waiting for the user's input
print("\nWelcome to MnA Anime Eyes, the ghetto version!")
print("(Phyllis made this, she promises you'll have a more graphical backend in the future)")
print()
local channel = love.thread.getChannel("Console")
playerChannel = love.thread.getChannel("AddPlayer")
gameStartChannel = love.thread.getChannel("GameStart")
players = {}
local consoleIsRunning = true
local saveDirectory = channel:demand()
print("The directory for placing images is "..saveDirectory)
while consoleIsRunning do
print("\nOptions (Choose one by entering the number, first letter, or full command):")
print("\t1. Players: Manage players")
print("\t2. S[tart]: Begin the round")
print("\t3. R[eload]: Reload the image folder")
--print("\t4. F[ullscreen]: Toggle fullscreen")
--print("\tP[ause]\n\t\tToggle pause")
print("\t4. Settings: Configure game settings")
print("\t5. Q[uit]: Exit the program")
print("\nHow to toggle fullscreen: Switch to the Game Window and press 'f'.\n")
local option = trim(io.read()):lower()
--print(option.." : did it newline tho")
if option == "players" or option == "1" then
consoleIsRunning = managePlayers(channel)
--elseif option == "p" or option == "pause" then
--consoleIsRunning = pauseGame(channel)
elseif option == "start" or option == "s" or option == "2" then
consoleIsRunning = beginGame(channel)
elseif option == "reload" or option == "r" or option == "3" then
consoleIsRunning = reloadImages(channel)
--[[elseif option == "fullscreen" or option == "f" or option == "4" then
consoleIsRunning = setFullscreen(channel)]]
elseif option == "settings" or option == "4" then
consoleIsRunning = manageSettings(channel)
elseif option == "quit" or option == "q" or option == "5" then
consoleIsRunning = exitProgram(channel)
else
print("Bad option, try again.")
end
--consoleIsRunning = false
if channel:peek() == "exit" then
--exitProgram(channel)
consoleIsRunning = false
end
end
|
module(..., package.seeall)
-- This module implements a level 7 firewall app that consumes the result
-- of DPI scanning done by l7spy.
--
-- The firewall rules are a table mapping protocol names to either
-- * a simple action ("drop", "reject", "accept")
-- * a pfmatch expression
local bit = require("bit")
local ffi = require("ffi")
local link = require("core.link")
local packet = require("core.packet")
local datagram = require("lib.protocol.datagram")
local ether = require("lib.protocol.ethernet")
local icmp = require("lib.protocol.icmp.header")
local ipv4 = require("lib.protocol.ipv4")
local ipv6 = require("lib.protocol.ipv6")
local tcp = require("lib.protocol.tcp")
local match = require("pf.match")
ffi.cdef[[
void syslog(int priority, const char*format, ...);
]]
-- constants from <syslog.h> for syslog priority argument
local LOG_USER = 8
local LOG_INFO = 6
-- network constants
local ETHER_PROTO_IPV4 = 0x0800
local ETHER_PROTO_IPV6 = 0x86dd
local IP_PROTO_ICMPV4 = 1
local IP_PROTO_TCP = 6
local IP_PROTO_ICMPV6 = 58
L7Fw = {}
L7Fw.__index = L7Fw
-- create a new firewall app object given an instance of Scanner
-- and firewall rules
function L7Fw:new(config)
local obj = { local_ipv4 = config.local_ipv4,
local_ipv6 = config.local_ipv6,
local_macaddr = config.local_macaddr,
scanner = config.scanner,
rules = config.rules,
-- this map tracks flows to compiled pfmatch functions
-- so that we only compile them once per flow
handler_map = {},
-- log level for logging filtered packets
logging = config.logging or "off",
-- for stats
accepted = 0,
rejected = 0,
dropped = 0,
total = 0 }
assert(obj.logging == "on" or obj.logging == "off",
("invalid log level: %s"):format(obj.logging))
return setmetatable(obj, self)
end
-- called by pfmatch handlers, just drop the packet on the floor
function L7Fw:drop(pkt, len)
if self.logging == "on" then
self:log_packet("DROP")
end
packet.free(self.current_packet)
self.dropped = self.dropped + 1
end
-- called by pfmatch handler, handle rejection response
function L7Fw:reject(pkt, len)
link.transmit(self.output.reject, self:make_reject_response())
self.rejected = self.rejected + 1
if self.logging == "on" then
self:log_packet("REJECT")
end
packet.free(self.current_packet)
end
-- called by pfmatch handler, forward packet
function L7Fw:accept(pkt, len)
link.transmit(self.output.output, self.current_packet)
self.accepted = self.accepted + 1
end
function L7Fw:push()
local i = assert(self.input.input, "input port not found")
local o = assert(self.output.output, "output port not found")
local rules = self.rules
local scanner = self.scanner
assert(self.output.reject, "output port for reject policy not found")
while not link.empty(i) do
local pkt = link.receive(i)
local flow = scanner:get_flow(pkt)
-- so that pfmatch handler methods can access the original packet
self.current_packet = pkt
self.total = self.total + 1
if flow then
local name = scanner:protocol_name(flow.protocol)
local policy = rules[name] or rules["default"]
self.current_protocol = name
if policy == "accept" then
self:accept(pkt.data, pkt.length)
elseif policy == "drop" then
self:drop(pkt.data, pkt.length)
elseif policy == "reject" then
self:reject(pkt.data, pkt.length)
-- handle a pfmatch string case
elseif type(policy) == "string" then
if self.handler_map[policy] then
-- we've already compiled a matcher for this policy
self.handler_map[policy](self, pkt.data, pkt.length, flow.packets)
else
local opts = { extra_args = { "flow_count" } }
local handler = match.compile(policy, opts)
self.handler_map[policy] = handler
handler(self, pkt.data, pkt.length, flow.packets)
end
-- TODO: what should the default policy be if there is none specified?
else
self:accept(pkt.data, pkt.length)
end
else
-- TODO: we may wish to have a default policy for packets
-- without detected flows instead of just forwarding
self:accept(pkt.data, pkt.length)
end
end
end
function L7Fw:report()
local accepted, rejected, dropped =
self.accepted, self.rejected, self.dropped
local total = self.total
local a_pct = math.ceil((accepted / total) * 100)
local r_pct = math.ceil((rejected / total) * 100)
local d_pct = math.ceil((dropped / total) * 100)
print(("Accepted packets: %d (%d%%)"):format(accepted, a_pct))
print(("Rejected packets: %d (%d%%)"):format(rejected, r_pct))
print(("Dropped packets: %d (%d%%)"):format(dropped, d_pct))
end
local logging_priority = bit.bor(LOG_USER, LOG_INFO)
function L7Fw:log_packet(type)
local pkt = self.current_packet
local protocol = self.current_protocol
local eth_h = ether:new_from_mem(pkt.data, pkt.length)
local ip_h
if eth_h:type() == ETHER_PROTO_IPV4 then
ip_h = ipv4:new_from_mem(pkt.data + eth_h:sizeof(),
pkt.length - eth_h:sizeof())
elseif eth_h:type() == ETHER_PROTO_IPV6 then
ip_h = ipv6:new_from_mem(pkt.data + eth_h:sizeof(),
pkt.length - eth_h:sizeof())
end
local msg = string.format("[Snabbwall %s] PROTOCOL=%s MAC=%s SRC=%s DST=%s",
type, protocol,
ether:ntop(eth_h:src()),
ip_h:ntop(ip_h:src()),
ip_h:ntop(ip_h:dst()))
ffi.C.syslog(logging_priority, msg)
end
-- create either an ICMP port unreachable packet or a TCP RST to
-- send in case of a reject policy
function L7Fw:make_reject_response()
local pkt = self.current_packet
local ether_orig = ether:new_from_mem(pkt.data, pkt.length)
local ip_orig
if ether_orig:type() == ETHER_PROTO_IPV4 then
ip_orig = ipv4:new_from_mem(pkt.data + ether_orig:sizeof(),
pkt.length - ether_orig:sizeof())
elseif ether_orig:type() == ETHER_PROTO_IPV6 then
ip_orig = ipv6:new_from_mem(pkt.data + ether_orig:sizeof(),
pkt.length - ether_orig:sizeof())
else
-- no responses to non-IP packes
return
end
local is_tcp = false
local ip_protocol
if ip_orig:version() == 4 then
if ip_orig:protocol() == 6 then
is_tcp = true
ip_protocol = IP_PROTO_TCP
else
ip_protocol = IP_PROTO_ICMPV4
end
else
if ip_orig:next_header() == 6 then
is_tcp = true
ip_protocol = IP_PROTO_TCP
else
ip_protocol = IP_PROTO_ICMPV6
end
end
local dgram = datagram:new()
local ether_h, ip_h
if ip_orig:version() == 4 then
ether_h = ether:new({ dst = ether_orig:src(),
src = self.local_macaddr,
type = ETHER_PROTO_IPV4 })
assert(self.local_ipv4, "config is missing local_ipv4")
ip_h = ipv4:new({ dst = ip_orig:src(),
src = ipv4:pton(self.local_ipv4),
protocol = ip_protocol,
ttl = 64 })
else
ether_h = ether:new({ dst = ether_orig:src(),
src = self.local_macaddr,
type = ETHER_PROTO_IPV6 })
assert(self.local_ipv6, "config is missing local_ipv6")
ip_h = ipv6:new({ dst = ip_orig:src(),
src = ipv6:pton(self.local_ipv6),
next_header = ip_protocol,
ttl = 64 })
end
if is_tcp then
local tcp_orig = tcp:new_from_mem(pkt.data + ether_orig:sizeof() +
ip_orig:sizeof(),
pkt.length - ether_orig:sizeof() -
ip_orig:sizeof())
local tcp_h = tcp:new({src_port = tcp_orig:dst_port(),
dst_port = tcp_orig:src_port(),
seq_num = tcp_orig:seq_num() + 1,
ack_num = tcp_orig:ack_num() + 1,
ack = 1,
rst = 1,
-- minimum TCP header size is 5 words
offset = 5 })
-- checksum needs a non-nil first argument, but we have zero payload bytes
-- so give a bogus value
tcp_h:checksum(ffi.new("uint8_t[0]"), 0)
dgram:push(tcp_h)
if ip_h:version() == 4 then
ip_h:total_length(ip_h:sizeof() + tcp_h:sizeof())
else
ip_h:payload_length(ip_h:sizeof() + tcp_h:sizeof())
end
else
local icmp_h
if ip_h:version() == 4 then
-- ICMPv4 code & type for "port unreachable"
icmp_h = icmp:new(3, 3)
else
-- ICMPv6 code & type for "administratively prohibited"
icmp_h = icmp:new(1, 1)
end
dgram:payload(ffi.new("uint8_t [4]"), 4)
if ip_h:version() == 4 then
dgram:payload(ip_orig:header(), ip_orig:sizeof())
-- ICMPv4 port unreachable errors come with the original IPv4
-- header and 8 bytes of the original payload
dgram:payload(pkt.data + ether_orig:sizeof() + ip_orig:sizeof(), 8)
icmp_h:checksum(dgram:payload())
dgram:push(icmp_h)
ip_h:total_length(ip_h:sizeof() + icmp_h:sizeof() +
4 + -- extra zero bytes
ip_orig:sizeof() + 8)
else
-- ICMPv6 destination unreachable packets contain up to 1232 bytes
-- of the original packet
-- (the minimum MTU 1280 - IPv6 header length - ICMPv6 header)
local payload_len =
math.min(1232, pkt.length - ether_orig:sizeof() - ip_orig:sizeof())
dgram:payload(ip_orig:header(), ip_orig:sizeof())
dgram:payload(pkt.data + ether_orig:sizeof() + ip_orig:sizeof(),
payload_len)
local mem, len = dgram:payload()
icmp_h:checksum(mem, len, ip_h)
dgram:push(icmp_h)
ip_h:payload_length(icmp_h:sizeof() +
4 + -- extra zero bytes
ip_orig:sizeof() + payload_len)
end
end
dgram:push(ip_h)
dgram:push(ether_h)
return dgram:packet()
end
function selftest()
local savefile = require("pf.savefile")
local pflua = require("pf")
local function test(name, packet, pflang)
local fake_self = { local_ipv4 = "192.168.42.42",
local_ipv6 = "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
local_macaddr = "01:23:45:67:89:ab",
current_packet = { data = packet.packet,
length = packet.len } }
local response = L7Fw.make_reject_response(fake_self)
local pred = pf.compile_filter(pflang)
assert(pred(response.data, response.length),
string.format("test %s failed", name))
end
local base_dir = "./program/wall/tests/data/"
local dhcp = savefile.load_packets(base_dir .. "dhcp.pcap")
local dhcpv6 = savefile.load_packets(base_dir .. "dhcpv6.pcap")
local v4http = savefile.load_packets(base_dir .. "http.cap")
local v6http = savefile.load_packets(base_dir .. "v6-http.cap")
test("icmpv4-1", dhcp[2], [[ether proto ip]])
test("icmpv4-2", dhcp[2], [[ip proto icmp]])
test("icmpv4-3", dhcp[2], [[icmp and dst net 192.168.0.1]])
test("icmpv4-3", dhcp[2], [[icmp[icmptype] = 3 and icmp[icmpcode] = 3]])
test("icmpv6-1", dhcpv6[1], [[ether proto ip6]])
-- TODO: ip6 protochain is not implemented in pflang
--test("icmpv6-2", dhcpv6[1], [[ip6 protochain 58]])
-- it would be nice to test the icmp type & code here, but pflang
-- does not have good support for dereferencing ip6 protocols
test("icmpv6-3", dhcpv6[1], [[icmp6 and dst net fe80::a00:27ff:fefe:8f95]])
test("tcpv4-1", v4http[5], [[ether proto ip]])
test("tcpv4-2", v4http[5], [[tcp and tcp[tcpflags] & (tcp-rst|tcp-ack) != 0]])
test("tcpv6-1", v6http[50], [[ether proto ip6]])
test("tcpv6-2", v6http[50], [[tcp]])
print("selftest ok")
end
|
function permgen(a, n)
if n == 0 then
coroutine.yield(a)
else
for i = 1, n do
a[n], a[i] = a[i], a[n]
permgen(a, n - 1)
a[n], a[i] = a[i], a[n]
end
end
end
function printResult(a)
for i, v in ipairs(a) do
io.write(v, " ")
end
io.write("\n")
end
function perm(a)
local n = (#a)
return coroutine.wrap(
function()
permgen(a, n)
end
)
end
for p in perm {"a", "b", "c"} do
printResult(p)
end
|
local ov_functions = {}
ov_functions.disable_technology = function (technology) -- disable technology (may be a table containing a list of technologies)
if type(technology) == "table" then
for tk, tech in pairs(technology) do
data.raw["technology"][tech].enabled = false
end
else
data.raw["technology"][technology].enabled = false
end
end
ov_functions.enable_technology = function (technology) -- enable technology (may be a table containing a list of technologies)
if type(technology) == "table" then
for tk, tech in pairs(technology) do
data.raw["technology"][tech].enabled = true
end
else
data.raw["technology"][technology].enabled = true
end
end
return ov_functions |
local TAB_NAME = table.remove(KEYS, 1)
local to_return = {}
for i=1, #KEYS, 2 do
local key, increment = KEYS[i], tonumber(KEYS[i + 1])
local value = redis.call('hincrby', TAB_NAME, key, increment)
table.insert(to_return, value)
local has_a_listener = (redis.call('hget', 'shl-' .. TAB_NAME, key) == tostring(value))
if has_a_listener then
redis.call('publish', 'rshl', TAB_NAME .. '-' .. key)
redis.call('hdel', 'shl-' .. TAB_NAME, key)
end
end
return table.concat(to_return, ';') |
local ffi = require("ffi")
local C = ffi.C
local FontMonger = require("FontMonger")
local GraphicGroup = require("GraphicGroup")
local Gradient = require("Gradient")
local GFontFaceIcon = {}
---[[
setmetatable(GFontFaceIcon, {
__index = GraphicGroup
})
--]]
local GFontFaceIcon_mt = {
__index = GFontFaceIcon;
}
function GFontFaceIcon.getPreferredSize()
return {width = 150, height = 160};
end
function GFontFaceIcon.new(self, obj)
local size = GFontFaceIcon:getPreferredSize()
local obj = GraphicGroup:new(obj)
obj.fontMonger = obj.fontMonger or FontMonger:new()
obj.frame = {x=0,y=0,width = size.width, height = size.height}
obj.gradient = Gradient.LinearGradient({
values = {obj.frame.width/4, 0, obj.frame.width/2, obj.frame.height};
stops = {
{offset = 0.0, uint32 = 0xFFf0f0f0},
{offset = 1.0, uint32 = 0xFFb0bcb0},
}
});
setmetatable(obj, GFontFaceIcon_mt)
return obj;
end
--[[
Mouse Action
]]
function GFontFaceIcon.mouseExit(self, event)
--print("GFontFaceIcon.mouseExit:")
self.isHovering = false;
end
function GFontFaceIcon.mouseMove(self, event)
--print("GFontFaceIcon.mousemove: ", event.x, event.y, event.subactivity)
if event.subactivity == "mousehover" then
self.isHovering = true
end
end
--[[
function GFontFaceIcon.mouseEvent(self, event)
print("GFontFaceIcon.mouseEvent: ", event.activity, event.subactivity)
end
--]]
function GFontFaceIcon.drawPlaccard(self, ctx)
-- first draw white backround for whole cell
-- when hovering
if self.isHovering then
--print("DRAW HOVER")
ctx:stroke(0xC0)
ctx:strokeWidth(1)
ctx:fill(0x00, 0xff, 0xff, 0x7f)
ctx:rect(0, 0, self.frame.width, self.frame.height)
end
-- now draw a sub-rectangle to show the font style
ctx:strokeWidth(1)
ctx:stroke(30)
ctx:strokeJoin(C.BL_STROKE_JOIN_ROUND)
--ctx:fill(210)
ctx:setFillStyle(self.gradient)
local p = BLPath()
p:moveTo(0,0)
p:lineTo(self.frame.width - 30, 0)
p:quadTo(self.frame.width-20,0, self.frame.width-20, 20)
p:quadTo(self.frame.width,20, self.frame.width, 30)
--p:lineTo(self.frame.width, 20)
p:lineTo(self.frame.width, 100)
p:lineTo(0, 100)
p:close()
ctx:fillPath(p)
ctx:strokePath(p)
-- make a little triangle tab
local p2 = BLPath()
ctx:stroke(30)
ctx:fill(160) -- should be gradient
p2:moveTo(self.frame.width-30,0)
p2:lineTo(self.frame.width,30)
--p2:lineTo(self.frame.width-20, 20)
--p2:close()
--ctx:fillPath(p2)
ctx:strokePath(p2)
end
function GFontFaceIcon.drawSampleText(self, ctx)
-- draw a little bit of text on the background
ctx:textAlign(MIDDLE, BASELINE)
ctx:textFont(self.familyName);
ctx:textSize(32)
ctx:stroke(0)
ctx:fill(0)
ctx:text("Abg", self.frame.width/2, 68)
end
function GFontFaceIcon.drawName(self, ctx)
local face = ctx.FontFace
ctx:textAlign(MIDDLE, BASELINE)
ctx:textFont("segoe ui")
ctx:textSize(10)
ctx:text(face.info.fullName, self.frame.width/2, 140)
--print("face: ", face.info.fullName, face.info.subFamilyName)
end
function GFontFaceIcon.drawBackground(self, ctx)
self:drawPlaccard(ctx)
self:drawSampleText(ctx)
self:drawName(ctx)
end
function GFontFaceIcon.draw(self, ctx)
self:drawBackground(ctx)
end
return GFontFaceIcon |
-- Make such a thing
minetest.register_tool("durapick:bronze_pick", {
description = "Durable Bronze Pickaxe",
inventory_image = "durapick_bronze.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=1,
groupcaps={
cracky = {times={[1]=4.50, [2]=1.80, [3]=0.90}, uses=(durapick_durability_bronze * durapick_durability_factor), maxlevel=2},
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1}
})
if durapick_previous_pick then
minetest.register_craft({
type = "shaped",
output = "durapick:bronze_pick 1",
recipe = {
{durapick_resource_bronze, "durapick:stone_pick", durapick_resource_bronze},
{"", durapick_stick, ""},
{"", durapick_stick, ""}
},
})
else
minetest.register_craft({
type = "shaped",
output = "durapick:bronze_pick 1",
recipe = {
{durapick_resource_bronze, durapick_resource_bronze, durapick_resource_bronze},
{"", durapick_stick, ""},
{"", durapick_stick, ""}
},
})
end |
local make_grid = require 'grid.grid'
local type, math_random = type, math.random
local make_sidewinder_gen
do
local step = function(self)
local x, y, grid = self._x, self._y, self._grid
if y ~= 0 then
if math.random(0, 1) == 0 and x ~= self._w - 1 then
self._grid:setr(x, y, false)
else
self._grid:setb(math_random(self._curx, x), y - 1, false)
if x ~= self._w - 1 then self._curx = x + 1 else self._curx = 0 end
end
else
if self._x ~= self._w - 1 then
self._grid:setr(x, y, false)
end
end
end
local generate = function(self)
for x, y in self._grid:iter() do
self._x, self._y = x, y
self:step()
end
end
local iter = function(self)
end
local get_grid = function(self)
return self._grid
end
make_sidewinder_gen = function(rows, columns)
return
{
step = step;
generate = generate;
iter = iter;
get_grid = get_grid;
_grid = make_grid(rows, columns, true, false);
_h = columns;
_w = rows;
_x = false;
_y = false;
_curx = 0;
}
end
end
return make_sidewinder_gen
|
local Native = {}
--@remove@
---@param i integer
---@return race
function Native.ConvertRace(i) end
---@param i integer
---@return alliancetype
function Native.ConvertAllianceType(i) end
---@param i integer
---@return racepreference
function Native.ConvertRacePref(i) end
---@param i integer
---@return igamestate
function Native.ConvertIGameState(i) end
---@param i integer
---@return fgamestate
function Native.ConvertFGameState(i) end
---@param i integer
---@return playerstate
function Native.ConvertPlayerState(i) end
---@param i integer
---@return playerscore
function Native.ConvertPlayerScore(i) end
---@param i integer
---@return playergameresult
function Native.ConvertPlayerGameResult(i) end
---@param i integer
---@return unitstate
function Native.ConvertUnitState(i) end
---@param i integer
---@return aidifficulty
function Native.ConvertAIDifficulty(i) end
---@param i integer
---@return gameevent
function Native.ConvertGameEvent(i) end
---@param i integer
---@return playerevent
function Native.ConvertPlayerEvent(i) end
---@param i integer
---@return playerunitevent
function Native.ConvertPlayerUnitEvent(i) end
---@param i integer
---@return widgetevent
function Native.ConvertWidgetEvent(i) end
---@param i integer
---@return dialogevent
function Native.ConvertDialogEvent(i) end
---@param i integer
---@return unitevent
function Native.ConvertUnitEvent(i) end
---@param i integer
---@return limitop
function Native.ConvertLimitOp(i) end
---@param i integer
---@return unittype
function Native.ConvertUnitType(i) end
---@param i integer
---@return gamespeed
function Native.ConvertGameSpeed(i) end
---@param i integer
---@return placement
function Native.ConvertPlacement(i) end
---@param i integer
---@return startlocprio
function Native.ConvertStartLocPrio(i) end
---@param i integer
---@return gamedifficulty
function Native.ConvertGameDifficulty(i) end
---@param i integer
---@return gametype
function Native.ConvertGameType(i) end
---@param i integer
---@return mapflag
function Native.ConvertMapFlag(i) end
---@param i integer
---@return mapvisibility
function Native.ConvertMapVisibility(i) end
---@param i integer
---@return mapsetting
function Native.ConvertMapSetting(i) end
---@param i integer
---@return mapdensity
function Native.ConvertMapDensity(i) end
---@param i integer
---@return mapcontrol
function Native.ConvertMapControl(i) end
---@param i integer
---@return playercolor
function Native.ConvertPlayerColor(i) end
---@param i integer
---@return playerslotstate
function Native.ConvertPlayerSlotState(i) end
---@param i integer
---@return volumegroup
function Native.ConvertVolumeGroup(i) end
---@param i integer
---@return camerafield
function Native.ConvertCameraField(i) end
---@param i integer
---@return blendmode
function Native.ConvertBlendMode(i) end
---@param i integer
---@return raritycontrol
function Native.ConvertRarityControl(i) end
---@param i integer
---@return texmapflags
function Native.ConvertTexMapFlags(i) end
---@param i integer
---@return fogstate
function Native.ConvertFogState(i) end
---@param i integer
---@return effecttype
function Native.ConvertEffectType(i) end
---@param i integer
---@return version
function Native.ConvertVersion(i) end
---@param i integer
---@return itemtype
function Native.ConvertItemType(i) end
---@param i integer
---@return attacktype
function Native.ConvertAttackType(i) end
---@param i integer
---@return damagetype
function Native.ConvertDamageType(i) end
---@param i integer
---@return weapontype
function Native.ConvertWeaponType(i) end
---@param i integer
---@return soundtype
function Native.ConvertSoundType(i) end
---@param i integer
---@return pathingtype
function Native.ConvertPathingType(i) end
---@param i integer
---@return mousebuttontype
function Native.ConvertMouseButtonType(i) end
---@param i integer
---@return animtype
function Native.ConvertAnimType(i) end
---@param i integer
---@return subanimtype
function Native.ConvertSubAnimType(i) end
---@param i integer
---@return originframetype
function Native.ConvertOriginFrameType(i) end
---@param i integer
---@return framepointtype
function Native.ConvertFramePointType(i) end
---@param i integer
---@return textaligntype
function Native.ConvertTextAlignType(i) end
---@param i integer
---@return frameeventtype
function Native.ConvertFrameEventType(i) end
---@param i integer
---@return oskeytype
function Native.ConvertOsKeyType(i) end
---@param i integer
---@return abilityintegerfield
function Native.ConvertAbilityIntegerField(i) end
---@param i integer
---@return abilityrealfield
function Native.ConvertAbilityRealField(i) end
---@param i integer
---@return abilitybooleanfield
function Native.ConvertAbilityBooleanField(i) end
---@param i integer
---@return abilitystringfield
function Native.ConvertAbilityStringField(i) end
---@param i integer
---@return abilityintegerlevelfield
function Native.ConvertAbilityIntegerLevelField(i) end
---@param i integer
---@return abilityreallevelfield
function Native.ConvertAbilityRealLevelField(i) end
---@param i integer
---@return abilitybooleanlevelfield
function Native.ConvertAbilityBooleanLevelField(i) end
---@param i integer
---@return abilitystringlevelfield
function Native.ConvertAbilityStringLevelField(i) end
---@param i integer
---@return abilityintegerlevelarrayfield
function Native.ConvertAbilityIntegerLevelArrayField(i) end
---@param i integer
---@return abilityreallevelarrayfield
function Native.ConvertAbilityRealLevelArrayField(i) end
---@param i integer
---@return abilitybooleanlevelarrayfield
function Native.ConvertAbilityBooleanLevelArrayField(i) end
---@param i integer
---@return abilitystringlevelarrayfield
function Native.ConvertAbilityStringLevelArrayField(i) end
---@param i integer
---@return unitintegerfield
function Native.ConvertUnitIntegerField(i) end
---@param i integer
---@return unitrealfield
function Native.ConvertUnitRealField(i) end
---@param i integer
---@return unitbooleanfield
function Native.ConvertUnitBooleanField(i) end
---@param i integer
---@return unitstringfield
function Native.ConvertUnitStringField(i) end
---@param i integer
---@return unitweaponintegerfield
function Native.ConvertUnitWeaponIntegerField(i) end
---@param i integer
---@return unitweaponrealfield
function Native.ConvertUnitWeaponRealField(i) end
---@param i integer
---@return unitweaponbooleanfield
function Native.ConvertUnitWeaponBooleanField(i) end
---@param i integer
---@return unitweaponstringfield
function Native.ConvertUnitWeaponStringField(i) end
---@param i integer
---@return itemintegerfield
function Native.ConvertItemIntegerField(i) end
---@param i integer
---@return itemrealfield
function Native.ConvertItemRealField(i) end
---@param i integer
---@return itembooleanfield
function Native.ConvertItemBooleanField(i) end
---@param i integer
---@return itemstringfield
function Native.ConvertItemStringField(i) end
---@param i integer
---@return movetype
function Native.ConvertMoveType(i) end
---@param i integer
---@return targetflag
function Native.ConvertTargetFlag(i) end
---@param i integer
---@return armortype
function Native.ConvertArmorType(i) end
---@param i integer
---@return heroattribute
function Native.ConvertHeroAttribute(i) end
---@param i integer
---@return defensetype
function Native.ConvertDefenseType(i) end
---@param i integer
---@return regentype
function Native.ConvertRegenType(i) end
---@param i integer
---@return unitcategory
function Native.ConvertUnitCategory(i) end
---@param i integer
---@return pathingflag
function Native.ConvertPathingFlag(i) end
---@param orderIdString string
---@return integer
function Native.OrderId(orderIdString) end
---@param orderId integer
---@return string
function Native.OrderId2String(orderId) end
---@param unitIdString string
---@return integer
function Native.UnitId(unitIdString) end
---@param unitId integer
---@return string
function Native.UnitId2String(unitId) end
---@param abilityIdString string
---@return integer
function Native.AbilityId(abilityIdString) end
---@param abilityId integer
---@return string
function Native.AbilityId2String(abilityId) end
---@param objectId integer
---@return string
function Native.GetObjectName(objectId) end
---@return integer
function Native.GetBJMaxPlayers() end
---@return integer
function Native.GetBJPlayerNeutralVictim() end
---@return integer
function Native.GetBJPlayerNeutralExtra() end
---@return integer
function Native.GetBJMaxPlayerSlots() end
---@return integer
function Native.GetPlayerNeutralPassive() end
---@return integer
function Native.GetPlayerNeutralAggressive() end
---@param degrees float
---@return float
function Native.Deg2Rad(degrees) end
---@param radians float
---@return float
function Native.Rad2Deg(radians) end
---@param radians float
---@return float
function Native.Sin(radians) end
---@param radians float
---@return float
function Native.Cos(radians) end
---@param radians float
---@return float
function Native.Tan(radians) end
---@param y float
---@return float
function Native.Asin(y) end
---@param x float
---@return float
function Native.Acos(x) end
---@param x float
---@return float
function Native.Atan(x) end
---@param y float
---@param x float
---@return float
function Native.Atan2(y, x) end
---@param x float
---@return float
function Native.SquareRoot(x) end
---@param x float
---@param power float
---@return float
function Native.Pow(x, power) end
---@param r float
---@return integer
function Native.MathRound(r) end
---@param i integer
---@return float
function Native.I2R(i) end
---@param r float
---@return integer
function Native.R2I(r) end
---@param i integer
---@return string
function Native.I2S(i) end
---@param r float
---@return string
function Native.R2S(r) end
---@param r float
---@param width integer
---@param precision integer
---@return string
function Native.R2SW(r, width, precision) end
---@param s string
---@return integer
function Native.S2I(s) end
---@param s string
---@return float
function Native.S2R(s) end
---@param h handle
---@return integer
function Native.GetHandleId(h) end
---@param source string
---@param start integer
---@param end_ integer
---@return string
function Native.SubString(source, start, end_) end
---@param s string
---@return integer
function Native.StringLength(s) end
---@param source string
---@param upper boolean
---@return string
function Native.StringCase(source, upper) end
---@param s string
---@return integer
function Native.StringHash(s) end
---@param source string
---@return string
function Native.GetLocalizedString(source) end
---@param source string
---@return integer
function Native.GetLocalizedHotkey(source) end
---@param name string
---@return void
function Native.SetMapName(name) end
---@param description string
---@return void
function Native.SetMapDescription(description) end
---@param teamcount integer
---@return void
function Native.SetTeams(teamcount) end
---@param playercount integer
---@return void
function Native.SetPlayers(playercount) end
---@param startLoc integer
---@param x float
---@param y float
---@return void
function Native.DefineStartLocation(startLoc, x, y) end
---@param startLoc integer
---@param loc location
---@return void
function Native.DefineStartLocationLoc(startLoc, loc) end
---@param startLoc integer
---@param prioSlotCount integer
---@return void
function Native.SetStartLocPrioCount(startLoc, prioSlotCount) end
---@param startLoc integer
---@param prioSlotIndex integer
---@param otherStartLocIndex integer
---@param priority startlocprio
---@return void
function Native.SetStartLocPrio(startLoc, prioSlotIndex, otherStartLocIndex, priority) end
---@param startLoc integer
---@param prioSlotIndex integer
---@return integer
function Native.GetStartLocPrioSlot(startLoc, prioSlotIndex) end
---@param startLoc integer
---@param prioSlotIndex integer
---@return startlocprio
function Native.GetStartLocPrio(startLoc, prioSlotIndex) end
---@param startLoc integer
---@param prioSlotCount integer
---@return void
function Native.SetEnemyStartLocPrioCount(startLoc, prioSlotCount) end
---@param startLoc integer
---@param prioSlotIndex integer
---@param otherStartLocIndex integer
---@param priority startlocprio
---@return void
function Native.SetEnemyStartLocPrio(startLoc, prioSlotIndex, otherStartLocIndex, priority) end
---@param gameType gametype
---@param value boolean
---@return void
function Native.SetGameTypeSupported(gameType, value) end
---@param mapFlag mapflag
---@param value boolean
---@return void
function Native.SetMapFlag(mapFlag, value) end
---@param placementType placement
---@return void
function Native.SetGamePlacement(placementType) end
---@param speed gamespeed
---@return void
function Native.SetGameSpeed(speed) end
---@param difficulty gamedifficulty
---@return void
function Native.SetGameDifficulty(difficulty) end
---@param density mapdensity
---@return void
function Native.SetResourceDensity(density) end
---@param density mapdensity
---@return void
function Native.SetCreatureDensity(density) end
---@return integer
function Native.GetTeams() end
---@return integer
function Native.GetPlayers() end
---@param gameType gametype
---@return boolean
function Native.IsGameTypeSupported(gameType) end
---@return gametype
function Native.GetGameTypeSelected() end
---@param mapFlag mapflag
---@return boolean
function Native.IsMapFlagSet(mapFlag) end
---@return placement
function Native.GetGamePlacement() end
---@return gamespeed
function Native.GetGameSpeed() end
---@return gamedifficulty
function Native.GetGameDifficulty() end
---@return mapdensity
function Native.GetResourceDensity() end
---@return mapdensity
function Native.GetCreatureDensity() end
---@param startLocation integer
---@return float
function Native.GetStartLocationX(startLocation) end
---@param startLocation integer
---@return float
function Native.GetStartLocationY(startLocation) end
---@param startLocation integer
---@return location
function Native.GetStartLocationLoc(startLocation) end
---@param player player
---@param team integer
---@return void
function Native.SetPlayerTeam(player, team) end
---@param player player
---@param startLocIndex integer
---@return void
function Native.SetPlayerStartLocation(player, startLocIndex) end
---@param player player
---@param startLocIndex integer
---@return void
function Native.ForcePlayerStartLocation(player, startLocIndex) end
---@param player player
---@param color playercolor
---@return void
function Native.SetPlayerColor(player, color) end
---@param sourcePlayer player
---@param otherPlayer player
---@param allianceSetting alliancetype
---@param value boolean
---@return void
function Native.SetPlayerAlliance(sourcePlayer, otherPlayer, allianceSetting, value) end
---@param sourcePlayer player
---@param otherPlayer player
---@param resource playerstate
---@param rate integer
---@return void
function Native.SetPlayerTaxRate(sourcePlayer, otherPlayer, resource, rate) end
---@param player player
---@param racePreference racepreference
---@return void
function Native.SetPlayerRacePreference(player, racePreference) end
---@param player player
---@param value boolean
---@return void
function Native.SetPlayerRaceSelectable(player, value) end
---@param player player
---@param controlType mapcontrol
---@return void
function Native.SetPlayerController(player, controlType) end
---@param player player
---@param name string
---@return void
function Native.SetPlayerName(player, name) end
---@param player player
---@param flag boolean
---@return void
function Native.SetPlayerOnScoreScreen(player, flag) end
---@param player player
---@return integer
function Native.GetPlayerTeam(player) end
---@param player player
---@return integer
function Native.GetPlayerStartLocation(player) end
---@param player player
---@return playercolor
function Native.GetPlayerColor(player) end
---@param player player
---@return boolean
function Native.GetPlayerSelectable(player) end
---@param player player
---@return mapcontrol
function Native.GetPlayerController(player) end
---@param player player
---@return playerslotstate
function Native.GetPlayerSlotState(player) end
---@param sourcePlayer player
---@param otherPlayer player
---@param resource playerstate
---@return integer
function Native.GetPlayerTaxRate(sourcePlayer, otherPlayer, resource) end
---@param player player
---@param pref racepreference
---@return boolean
function Native.IsPlayerRacePrefSet(player, pref) end
---@param player player
---@return string
function Native.GetPlayerName(player) end
---@return timer
function Native.CreateTimer() end
---@param timer timer
---@return void
function Native.DestroyTimer(timer) end
---@param timer timer
---@param timeout float
---@param periodic boolean
---@param handlerFunc function
---@return void
function Native.TimerStart(timer, timeout, periodic, handlerFunc) end
---@param timer timer
---@return float
function Native.TimerGetElapsed(timer) end
---@param timer timer
---@return float
function Native.TimerGetRemaining(timer) end
---@param timer timer
---@return float
function Native.TimerGetTimeout(timer) end
---@param timer timer
---@return void
function Native.PauseTimer(timer) end
---@param timer timer
---@return void
function Native.ResumeTimer(timer) end
---@return timer
function Native.GetExpiredTimer() end
---@return group
function Native.CreateGroup() end
---@param group group
---@return void
function Native.DestroyGroup(group) end
---@param group group
---@param unit unit
---@return boolean
function Native.GroupAddUnit(group, unit) end
---@param group group
---@param unit unit
---@return boolean
function Native.GroupRemoveUnit(group, unit) end
---@param group group
---@param addGroup group
---@return integer
function Native.BlzGroupAddGroupFast(group, addGroup) end
---@param group group
---@param removeGroup group
---@return integer
function Native.BlzGroupRemoveGroupFast(group, removeGroup) end
---@param group group
---@return void
function Native.GroupClear(group) end
---@param group group
---@return integer
function Native.BlzGroupGetSize(group) end
---@param group group
---@param index integer
---@return unit
function Native.BlzGroupUnitAt(group, index) end
---@param group group
---@param unitname string
---@param filter boolexpr
---@return void
function Native.GroupEnumUnitsOfType(group, unitname, filter) end
---@param group group
---@param player player
---@param filter boolexpr
---@return void
function Native.GroupEnumUnitsOfPlayer(group, player, filter) end
---@param group group
---@param unitname string
---@param filter boolexpr
---@param countLimit integer
---@return void
function Native.GroupEnumUnitsOfTypeCounted(group, unitname, filter, countLimit) end
---@param group group
---@param r rect
---@param filter boolexpr
---@return void
function Native.GroupEnumUnitsInRect(group, r, filter) end
---@param group group
---@param r rect
---@param filter boolexpr
---@param countLimit integer
---@return void
function Native.GroupEnumUnitsInRectCounted(group, r, filter, countLimit) end
---@param group group
---@param x float
---@param y float
---@param radius float
---@param filter boolexpr
---@return void
function Native.GroupEnumUnitsInRange(group, x, y, radius, filter) end
---@param group group
---@param loc location
---@param radius float
---@param filter boolexpr
---@return void
function Native.GroupEnumUnitsInRangeOfLoc(group, loc, radius, filter) end
---@param group group
---@param x float
---@param y float
---@param radius float
---@param filter boolexpr
---@param countLimit integer
---@return void
function Native.GroupEnumUnitsInRangeCounted(group, x, y, radius, filter, countLimit) end
---@param group group
---@param loc location
---@param radius float
---@param filter boolexpr
---@param countLimit integer
---@return void
function Native.GroupEnumUnitsInRangeOfLocCounted(group, loc, radius, filter, countLimit) end
---@param group group
---@param player player
---@param filter boolexpr
---@return void
function Native.GroupEnumUnitsSelected(group, player, filter) end
---@param group group
---@param order string
---@return boolean
function Native.GroupImmediateOrder(group, order) end
---@param group group
---@param order integer
---@return boolean
function Native.GroupImmediateOrderById(group, order) end
---@param group group
---@param order string
---@param x float
---@param y float
---@return boolean
function Native.GroupPointOrder(group, order, x, y) end
---@param group group
---@param order string
---@param loc location
---@return boolean
function Native.GroupPointOrderLoc(group, order, loc) end
---@param group group
---@param order integer
---@param x float
---@param y float
---@return boolean
function Native.GroupPointOrderById(group, order, x, y) end
---@param group group
---@param order integer
---@param loc location
---@return boolean
function Native.GroupPointOrderByIdLoc(group, order, loc) end
---@param group group
---@param order string
---@param targetWidget widget
---@return boolean
function Native.GroupTargetOrder(group, order, targetWidget) end
---@param group group
---@param order integer
---@param targetWidget widget
---@return boolean
function Native.GroupTargetOrderById(group, order, targetWidget) end
---@param group group
---@param callback function
---@return void
function Native.ForGroup(group, callback) end
---@param group group
---@return unit
function Native.FirstOfGroup(group) end
---@return force
function Native.CreateForce() end
---@param force force
---@return void
function Native.DestroyForce(force) end
---@param force force
---@param player player
---@return void
function Native.ForceAddPlayer(force, player) end
---@param force force
---@param player player
---@return void
function Native.ForceRemovePlayer(force, player) end
---@param force force
---@param player player
---@return boolean
function Native.BlzForceHasPlayer(force, player) end
---@param force force
---@return void
function Native.ForceClear(force) end
---@param force force
---@param filter boolexpr
---@return void
function Native.ForceEnumPlayers(force, filter) end
---@param force force
---@param filter boolexpr
---@param countLimit integer
---@return void
function Native.ForceEnumPlayersCounted(force, filter, countLimit) end
---@param force force
---@param player player
---@param filter boolexpr
---@return void
function Native.ForceEnumAllies(force, player, filter) end
---@param force force
---@param player player
---@param filter boolexpr
---@return void
function Native.ForceEnumEnemies(force, player, filter) end
---@param force force
---@param callback function
---@return void
function Native.ForForce(force, callback) end
---@param minx float
---@param miny float
---@param maxx float
---@param maxy float
---@return rect
function Native.Rect(minx, miny, maxx, maxy) end
---@param min location
---@param max location
---@return rect
function Native.RectFromLoc(min, max) end
---@param rect rect
---@return void
function Native.RemoveRect(rect) end
---@param rect rect
---@param minx float
---@param miny float
---@param maxx float
---@param maxy float
---@return void
function Native.SetRect(rect, minx, miny, maxx, maxy) end
---@param rect rect
---@param min location
---@param max location
---@return void
function Native.SetRectFromLoc(rect, min, max) end
---@param rect rect
---@param centerX float
---@param centerY float
---@return void
function Native.MoveRectTo(rect, centerX, centerY) end
---@param rect rect
---@param centerLoc location
---@return void
function Native.MoveRectToLoc(rect, centerLoc) end
---@param rect rect
---@return float
function Native.GetRectCenterX(rect) end
---@param rect rect
---@return float
function Native.GetRectCenterY(rect) end
---@param rect rect
---@return float
function Native.GetRectMinX(rect) end
---@param rect rect
---@return float
function Native.GetRectMinY(rect) end
---@param rect rect
---@return float
function Native.GetRectMaxX(rect) end
---@param rect rect
---@return float
function Native.GetRectMaxY(rect) end
---@return region
function Native.CreateRegion() end
---@param region region
---@return void
function Native.RemoveRegion(region) end
---@param region region
---@param r rect
---@return void
function Native.RegionAddRect(region, r) end
---@param region region
---@param r rect
---@return void
function Native.RegionClearRect(region, r) end
---@param region region
---@param x float
---@param y float
---@return void
function Native.RegionAddCell(region, x, y) end
---@param region region
---@param loc location
---@return void
function Native.RegionAddCellAtLoc(region, loc) end
---@param region region
---@param x float
---@param y float
---@return void
function Native.RegionClearCell(region, x, y) end
---@param region region
---@param loc location
---@return void
function Native.RegionClearCellAtLoc(region, loc) end
---@param x float
---@param y float
---@return location
function Native.Location(x, y) end
---@param loc location
---@return void
function Native.RemoveLocation(loc) end
---@param loc location
---@param x float
---@param y float
---@return void
function Native.MoveLocation(loc, x, y) end
---@param loc location
---@return float
function Native.GetLocationX(loc) end
---@param loc location
---@return float
function Native.GetLocationY(loc) end
---@param loc location
---@return float
function Native.GetLocationZ(loc) end
---@param region region
---@param unit unit
---@return boolean
function Native.IsUnitInRegion(region, unit) end
---@param region region
---@param x float
---@param y float
---@return boolean
function Native.IsPointInRegion(region, x, y) end
---@param region region
---@param loc location
---@return boolean
function Native.IsLocationInRegion(region, loc) end
---@return rect
function Native.GetWorldBounds() end
---@return trigger
function Native.CreateTrigger() end
---@param trigger trigger
---@return void
function Native.DestroyTrigger(trigger) end
---@param trigger trigger
---@return void
function Native.ResetTrigger(trigger) end
---@param trigger trigger
---@return void
function Native.EnableTrigger(trigger) end
---@param trigger trigger
---@return void
function Native.DisableTrigger(trigger) end
---@param trigger trigger
---@return boolean
function Native.IsTriggerEnabled(trigger) end
---@param trigger trigger
---@param flag boolean
---@return void
function Native.TriggerWaitOnSleeps(trigger, flag) end
---@param trigger trigger
---@return boolean
function Native.IsTriggerWaitOnSleeps(trigger) end
---@return unit
function Native.GetFilterUnit() end
---@return unit
function Native.GetEnumUnit() end
---@return destructable
function Native.GetFilterDestructable() end
---@return destructable
function Native.GetEnumDestructable() end
---@return item
function Native.GetFilterItem() end
---@return item
function Native.GetEnumItem() end
---@param taggedString string
---@return string
function Native.ParseTags(taggedString) end
---@return player
function Native.GetFilterPlayer() end
---@return player
function Native.GetEnumPlayer() end
---@return trigger
function Native.GetTriggeringTrigger() end
---@return eventid
function Native.GetTriggerEventId() end
---@param trigger trigger
---@return integer
function Native.GetTriggerEvalCount(trigger) end
---@param trigger trigger
---@return integer
function Native.GetTriggerExecCount(trigger) end
---@param funcName string
---@return void
function Native.ExecuteFunc(funcName) end
---@param operandA boolexpr
---@param operandB boolexpr
---@return boolexpr
function Native.And(operandA, operandB) end
---@param operandA boolexpr
---@param operandB boolexpr
---@return boolexpr
function Native.Or(operandA, operandB) end
---@param operand boolexpr
---@return boolexpr
function Native.Not(operand) end
---@param func function
---@return conditionfunc
function Native.Condition(func) end
---@param c conditionfunc
---@return void
function Native.DestroyCondition(c) end
---@param func function
---@return filterfunc
function Native.Filter(func) end
---@param f filterfunc
---@return void
function Native.DestroyFilter(f) end
---@param e boolexpr
---@return void
function Native.DestroyBoolExpr(e) end
---@param trigger trigger
---@param varName string
---@param opcode limitop
---@param limitval float
---@return event
function Native.TriggerRegisterVariableEvent(trigger, varName, opcode, limitval) end
---@param trigger trigger
---@param timeout float
---@param periodic boolean
---@return event
function Native.TriggerRegisterTimerEvent(trigger, timeout, periodic) end
---@param trigger trigger
---@param t timer
---@return event
function Native.TriggerRegisterTimerExpireEvent(trigger, t) end
---@param trigger trigger
---@param state gamestate
---@param opcode limitop
---@param limitval float
---@return event
function Native.TriggerRegisterGameStateEvent(trigger, state, opcode, limitval) end
---@param trigger trigger
---@param dialog dialog
---@return event
function Native.TriggerRegisterDialogEvent(trigger, dialog) end
---@param trigger trigger
---@param button button
---@return event
function Native.TriggerRegisterDialogButtonEvent(trigger, button) end
---@return gamestate
function Native.GetEventGameState() end
---@param trigger trigger
---@param gameEvent gameevent
---@return event
function Native.TriggerRegisterGameEvent(trigger, gameEvent) end
---@return player
function Native.GetWinningPlayer() end
---@param trigger trigger
---@param region region
---@param filter boolexpr
---@return event
function Native.TriggerRegisterEnterRegion(trigger, region, filter) end
---@return region
function Native.GetTriggeringRegion() end
---@return unit
function Native.GetEnteringUnit() end
---@param trigger trigger
---@param region region
---@param filter boolexpr
---@return event
function Native.TriggerRegisterLeaveRegion(trigger, region, filter) end
---@return unit
function Native.GetLeavingUnit() end
---@param trigger trigger
---@param t trackable
---@return event
function Native.TriggerRegisterTrackableHitEvent(trigger, t) end
---@param trigger trigger
---@param t trackable
---@return event
function Native.TriggerRegisterTrackableTrackEvent(trigger, t) end
---@param trigger trigger
---@param ability integer
---@param order string
---@return event
function Native.TriggerRegisterCommandEvent(trigger, ability, order) end
---@param trigger trigger
---@param upgrade integer
---@return event
function Native.TriggerRegisterUpgradeCommandEvent(trigger, upgrade) end
---@return trackable
function Native.GetTriggeringTrackable() end
---@return button
function Native.GetClickedButton() end
---@return dialog
function Native.GetClickedDialog() end
---@return float
function Native.GetTournamentFinishSoonTimeRemaining() end
---@return integer
function Native.GetTournamentFinishNowRule() end
---@return player
function Native.GetTournamentFinishNowPlayer() end
---@param player player
---@return integer
function Native.GetTournamentScore(player) end
---@return string
function Native.GetSaveBasicFilename() end
---@param trigger trigger
---@param player player
---@param playerEvent playerevent
---@return event
function Native.TriggerRegisterPlayerEvent(trigger, player, playerEvent) end
---@return player
function Native.GetTriggerPlayer() end
---@param trigger trigger
---@param player player
---@param playerUnitEvent playerunitevent
---@param filter boolexpr
---@return event
function Native.TriggerRegisterPlayerUnitEvent(trigger, player, playerUnitEvent, filter) end
---@return unit
function Native.GetLevelingUnit() end
---@return unit
function Native.GetLearningUnit() end
---@return integer
function Native.GetLearnedSkill() end
---@return integer
function Native.GetLearnedSkillLevel() end
---@return unit
function Native.GetRevivableUnit() end
---@return unit
function Native.GetRevivingUnit() end
---@return unit
function Native.GetAttacker() end
---@return unit
function Native.GetRescuer() end
---@return unit
function Native.GetDyingUnit() end
---@return unit
function Native.GetKillingUnit() end
---@return unit
function Native.GetDecayingUnit() end
---@return unit
function Native.GetConstructingStructure() end
---@return unit
function Native.GetCancelledStructure() end
---@return unit
function Native.GetConstructedStructure() end
---@return unit
function Native.GetResearchingUnit() end
---@return integer
function Native.GetResearched() end
---@return integer
function Native.GetTrainedUnitType() end
---@return unit
function Native.GetTrainedUnit() end
---@return unit
function Native.GetDetectedUnit() end
---@return unit
function Native.GetSummoningUnit() end
---@return unit
function Native.GetSummonedUnit() end
---@return unit
function Native.GetTransportUnit() end
---@return unit
function Native.GetLoadedUnit() end
---@return unit
function Native.GetSellingUnit() end
---@return unit
function Native.GetSoldUnit() end
---@return unit
function Native.GetBuyingUnit() end
---@return item
function Native.GetSoldItem() end
---@return unit
function Native.GetChangingUnit() end
---@return player
function Native.GetChangingUnitPrevOwner() end
---@return unit
function Native.GetManipulatingUnit() end
---@return item
function Native.GetManipulatedItem() end
---@return item
function Native.BlzGetAbsorbingItem() end
---@return boolean
function Native.BlzGetManipulatedItemWasAbsorbed() end
---@return item
function Native.BlzGetStackingItemSource() end
---@return item
function Native.BlzGetStackingItemTarget() end
---@return integer
function Native.BlzGetStackingItemTargetPreviousCharges() end
---@return unit
function Native.GetOrderedUnit() end
---@return integer
function Native.GetIssuedOrderId() end
---@return float
function Native.GetOrderPointX() end
---@return float
function Native.GetOrderPointY() end
---@return location
function Native.GetOrderPointLoc() end
---@return widget
function Native.GetOrderTarget() end
---@return destructable
function Native.GetOrderTargetDestructable() end
---@return item
function Native.GetOrderTargetItem() end
---@return unit
function Native.GetOrderTargetUnit() end
---@return unit
function Native.GetSpellAbilityUnit() end
---@return integer
function Native.GetSpellAbilityId() end
---@return ability
function Native.GetSpellAbility() end
---@return location
function Native.GetSpellTargetLoc() end
---@return float
function Native.GetSpellTargetX() end
---@return float
function Native.GetSpellTargetY() end
---@return destructable
function Native.GetSpellTargetDestructable() end
---@return item
function Native.GetSpellTargetItem() end
---@return unit
function Native.GetSpellTargetUnit() end
---@param trigger trigger
---@param player player
---@param alliance alliancetype
---@return event
function Native.TriggerRegisterPlayerAllianceChange(trigger, player, alliance) end
---@param trigger trigger
---@param player player
---@param state playerstate
---@param opcode limitop
---@param limitval float
---@return event
function Native.TriggerRegisterPlayerStateEvent(trigger, player, state, opcode, limitval) end
---@return playerstate
function Native.GetEventPlayerState() end
---@param trigger trigger
---@param player player
---@param chatMessageToDetect string
---@param exactMatchOnly boolean
---@return event
function Native.TriggerRegisterPlayerChatEvent(trigger, player, chatMessageToDetect, exactMatchOnly) end
---@return string
function Native.GetEventPlayerChatString() end
---@return string
function Native.GetEventPlayerChatStringMatched() end
---@param trigger trigger
---@param widget widget
---@return event
function Native.TriggerRegisterDeathEvent(trigger, widget) end
---@return unit
function Native.GetTriggerUnit() end
---@param trigger trigger
---@param unit unit
---@param state unitstate
---@param opcode limitop
---@param limitval float
---@return event
function Native.TriggerRegisterUnitStateEvent(trigger, unit, state, opcode, limitval) end
---@return unitstate
function Native.GetEventUnitState() end
---@param trigger trigger
---@param unit unit
---@param event unitevent
---@return event
function Native.TriggerRegisterUnitEvent(trigger, unit, event) end
---@return float
function Native.GetEventDamage() end
---@return unit
function Native.GetEventDamageSource() end
---@return player
function Native.GetEventDetectingPlayer() end
---@param trigger trigger
---@param unit unit
---@param event unitevent
---@param filter boolexpr
---@return event
function Native.TriggerRegisterFilterUnitEvent(trigger, unit, event, filter) end
---@return unit
function Native.GetEventTargetUnit() end
---@param trigger trigger
---@param unit unit
---@param range float
---@param filter boolexpr
---@return event
function Native.TriggerRegisterUnitInRange(trigger, unit, range, filter) end
---@param trigger trigger
---@param condition boolexpr
---@return triggercondition
function Native.TriggerAddCondition(trigger, condition) end
---@param trigger trigger
---@param condition triggercondition
---@return void
function Native.TriggerRemoveCondition(trigger, condition) end
---@param trigger trigger
---@return void
function Native.TriggerClearConditions(trigger) end
---@param trigger trigger
---@param actionFunc function
---@return triggeraction
function Native.TriggerAddAction(trigger, actionFunc) end
---@param trigger trigger
---@param action triggeraction
---@return void
function Native.TriggerRemoveAction(trigger, action) end
---@param trigger trigger
---@return void
function Native.TriggerClearActions(trigger) end
---@param timeout float
---@return void
function Native.TriggerSleepAction(timeout) end
---@param s sound
---@param offset float
---@return void
function Native.TriggerWaitForSound(s, offset) end
---@param trigger trigger
---@return boolean
function Native.TriggerEvaluate(trigger) end
---@param trigger trigger
---@return void
function Native.TriggerExecute(trigger) end
---@param trigger trigger
---@return void
function Native.TriggerExecuteWait(trigger) end
---@return void
function Native.TriggerSyncStart() end
---@return void
function Native.TriggerSyncReady() end
---@param widget widget
---@return float
function Native.GetWidgetLife(widget) end
---@param widget widget
---@param life float
---@return void
function Native.SetWidgetLife(widget, life) end
---@param widget widget
---@return float
function Native.GetWidgetX(widget) end
---@param widget widget
---@return float
function Native.GetWidgetY(widget) end
---@return widget
function Native.GetTriggerWidget() end
---@param objectid integer
---@param x float
---@param y float
---@param face float
---@param scale float
---@param variation integer
---@return destructable
function Native.CreateDestructable(objectid, x, y, face, scale, variation) end
---@param objectid integer
---@param x float
---@param y float
---@param z float
---@param face float
---@param scale float
---@param variation integer
---@return destructable
function Native.CreateDestructableZ(objectid, x, y, z, face, scale, variation) end
---@param objectid integer
---@param x float
---@param y float
---@param face float
---@param scale float
---@param variation integer
---@return destructable
function Native.CreateDeadDestructable(objectid, x, y, face, scale, variation) end
---@param objectid integer
---@param x float
---@param y float
---@param z float
---@param face float
---@param scale float
---@param variation integer
---@return destructable
function Native.CreateDeadDestructableZ(objectid, x, y, z, face, scale, variation) end
---@param d destructable
---@return void
function Native.RemoveDestructable(d) end
---@param d destructable
---@return void
function Native.KillDestructable(d) end
---@param d destructable
---@param flag boolean
---@return void
function Native.SetDestructableInvulnerable(d, flag) end
---@param d destructable
---@return boolean
function Native.IsDestructableInvulnerable(d) end
---@param r rect
---@param filter boolexpr
---@param actionFunc function
---@return void
function Native.EnumDestructablesInRect(r, filter, actionFunc) end
---@param d destructable
---@return integer
function Native.GetDestructableTypeId(d) end
---@param d destructable
---@return float
function Native.GetDestructableX(d) end
---@param d destructable
---@return float
function Native.GetDestructableY(d) end
---@param d destructable
---@param life float
---@return void
function Native.SetDestructableLife(d, life) end
---@param d destructable
---@return float
function Native.GetDestructableLife(d) end
---@param d destructable
---@param max float
---@return void
function Native.SetDestructableMaxLife(d, max) end
---@param d destructable
---@return float
function Native.GetDestructableMaxLife(d) end
---@param d destructable
---@param life float
---@param birth boolean
---@return void
function Native.DestructableRestoreLife(d, life, birth) end
---@param d destructable
---@param animation string
---@return void
function Native.QueueDestructableAnimation(d, animation) end
---@param d destructable
---@param animation string
---@return void
function Native.SetDestructableAnimation(d, animation) end
---@param d destructable
---@param speedFactor float
---@return void
function Native.SetDestructableAnimationSpeed(d, speedFactor) end
---@param d destructable
---@param flag boolean
---@return void
function Native.ShowDestructable(d, flag) end
---@param d destructable
---@return float
function Native.GetDestructableOccluderHeight(d) end
---@param d destructable
---@param height float
---@return void
function Native.SetDestructableOccluderHeight(d, height) end
---@param d destructable
---@return string
function Native.GetDestructableName(d) end
---@return destructable
function Native.GetTriggerDestructable() end
---@param itemid integer
---@param x float
---@param y float
---@return item
function Native.CreateItem(itemid, x, y) end
---@param item item
---@return void
function Native.RemoveItem(item) end
---@param item item
---@return player
function Native.GetItemPlayer(item) end
---@param i item
---@return integer
function Native.GetItemTypeId(i) end
---@param i item
---@return float
function Native.GetItemX(i) end
---@param i item
---@return float
function Native.GetItemY(i) end
---@param i item
---@param x float
---@param y float
---@return void
function Native.SetItemPosition(i, x, y) end
---@param item item
---@param flag boolean
---@return void
function Native.SetItemDropOnDeath(item, flag) end
---@param i item
---@param flag boolean
---@return void
function Native.SetItemDroppable(i, flag) end
---@param i item
---@param flag boolean
---@return void
function Native.SetItemPawnable(i, flag) end
---@param item item
---@param player player
---@param changeColor boolean
---@return void
function Native.SetItemPlayer(item, player, changeColor) end
---@param item item
---@param flag boolean
---@return void
function Native.SetItemInvulnerable(item, flag) end
---@param item item
---@return boolean
function Native.IsItemInvulnerable(item) end
---@param item item
---@param show boolean
---@return void
function Native.SetItemVisible(item, show) end
---@param item item
---@return boolean
function Native.IsItemVisible(item) end
---@param item item
---@return boolean
function Native.IsItemOwned(item) end
---@param item item
---@return boolean
function Native.IsItemPowerup(item) end
---@param item item
---@return boolean
function Native.IsItemSellable(item) end
---@param item item
---@return boolean
function Native.IsItemPawnable(item) end
---@param itemId integer
---@return boolean
function Native.IsItemIdPowerup(itemId) end
---@param itemId integer
---@return boolean
function Native.IsItemIdSellable(itemId) end
---@param itemId integer
---@return boolean
function Native.IsItemIdPawnable(itemId) end
---@param r rect
---@param filter boolexpr
---@param actionFunc function
---@return void
function Native.EnumItemsInRect(r, filter, actionFunc) end
---@param item item
---@return integer
function Native.GetItemLevel(item) end
---@param item item
---@return itemtype
function Native.GetItemType(item) end
---@param item item
---@param unitId integer
---@return void
function Native.SetItemDropID(item, unitId) end
---@param item item
---@return string
function Native.GetItemName(item) end
---@param item item
---@return integer
function Native.GetItemCharges(item) end
---@param item item
---@param charges integer
---@return void
function Native.SetItemCharges(item, charges) end
---@param item item
---@return integer
function Native.GetItemUserData(item) end
---@param item item
---@param data integer
---@return void
function Native.SetItemUserData(item, data) end
---@param id player
---@param unitid integer
---@param x float
---@param y float
---@param face float
---@return unit
function Native.CreateUnit(id, unitid, x, y, face) end
---@param player player
---@param unitname string
---@param x float
---@param y float
---@param face float
---@return unit
function Native.CreateUnitByName(player, unitname, x, y, face) end
---@param id player
---@param unitid integer
---@param loc location
---@param face float
---@return unit
function Native.CreateUnitAtLoc(id, unitid, loc, face) end
---@param id player
---@param unitname string
---@param loc location
---@param face float
---@return unit
function Native.CreateUnitAtLocByName(id, unitname, loc, face) end
---@param player player
---@param unitid integer
---@param x float
---@param y float
---@param face float
---@return unit
function Native.CreateCorpse(player, unitid, x, y, face) end
---@param unit unit
---@return void
function Native.KillUnit(unit) end
---@param unit unit
---@return void
function Native.RemoveUnit(unit) end
---@param unit unit
---@param show boolean
---@return void
function Native.ShowUnit(unit, show) end
---@param unit unit
---@param unitState unitstate
---@param val float
---@return void
function Native.SetUnitState(unit, unitState, val) end
---@param unit unit
---@param x float
---@return void
function Native.SetUnitX(unit, x) end
---@param unit unit
---@param y float
---@return void
function Native.SetUnitY(unit, y) end
---@param unit unit
---@param x float
---@param y float
---@return void
function Native.SetUnitPosition(unit, x, y) end
---@param unit unit
---@param loc location
---@return void
function Native.SetUnitPositionLoc(unit, loc) end
---@param unit unit
---@param facingAngle float
---@return void
function Native.SetUnitFacing(unit, facingAngle) end
---@param unit unit
---@param facingAngle float
---@param duration float
---@return void
function Native.SetUnitFacingTimed(unit, facingAngle, duration) end
---@param unit unit
---@param speed float
---@return void
function Native.SetUnitMoveSpeed(unit, speed) end
---@param unit unit
---@param height float
---@param rate float
---@return void
function Native.SetUnitFlyHeight(unit, height, rate) end
---@param unit unit
---@param turnSpeed float
---@return void
function Native.SetUnitTurnSpeed(unit, turnSpeed) end
---@param unit unit
---@param propWindowAngle float
---@return void
function Native.SetUnitPropWindow(unit, propWindowAngle) end
---@param unit unit
---@param acquireRange float
---@return void
function Native.SetUnitAcquireRange(unit, acquireRange) end
---@param unit unit
---@param creepGuard boolean
---@return void
function Native.SetUnitCreepGuard(unit, creepGuard) end
---@param unit unit
---@return float
function Native.GetUnitAcquireRange(unit) end
---@param unit unit
---@return float
function Native.GetUnitTurnSpeed(unit) end
---@param unit unit
---@return float
function Native.GetUnitPropWindow(unit) end
---@param unit unit
---@return float
function Native.GetUnitFlyHeight(unit) end
---@param unit unit
---@return float
function Native.GetUnitDefaultAcquireRange(unit) end
---@param unit unit
---@return float
function Native.GetUnitDefaultTurnSpeed(unit) end
---@param unit unit
---@return float
function Native.GetUnitDefaultPropWindow(unit) end
---@param unit unit
---@return float
function Native.GetUnitDefaultFlyHeight(unit) end
---@param unit unit
---@param player player
---@param changeColor boolean
---@return void
function Native.SetUnitOwner(unit, player, changeColor) end
---@param unit unit
---@param color playercolor
---@return void
function Native.SetUnitColor(unit, color) end
---@param unit unit
---@param scaleX float
---@param scaleY float
---@param scaleZ float
---@return void
function Native.SetUnitScale(unit, scaleX, scaleY, scaleZ) end
---@param unit unit
---@param timeScale float
---@return void
function Native.SetUnitTimeScale(unit, timeScale) end
---@param unit unit
---@param blendTime float
---@return void
function Native.SetUnitBlendTime(unit, blendTime) end
---@param unit unit
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.SetUnitVertexColor(unit, red, green, blue, alpha) end
---@param unit unit
---@param animation string
---@return void
function Native.QueueUnitAnimation(unit, animation) end
---@param unit unit
---@param animation string
---@return void
function Native.SetUnitAnimation(unit, animation) end
---@param unit unit
---@param animation integer
---@return void
function Native.SetUnitAnimationByIndex(unit, animation) end
---@param unit unit
---@param animation string
---@param rarity raritycontrol
---@return void
function Native.SetUnitAnimationWithRarity(unit, animation, rarity) end
---@param unit unit
---@param animProperties string
---@param add boolean
---@return void
function Native.AddUnitAnimationProperties(unit, animProperties, add) end
---@param unit unit
---@param bone string
---@param lookAtTarget unit
---@param offsetX float
---@param offsetY float
---@param offsetZ float
---@return void
function Native.SetUnitLookAt(unit, bone, lookAtTarget, offsetX, offsetY, offsetZ) end
---@param unit unit
---@return void
function Native.ResetUnitLookAt(unit) end
---@param unit unit
---@param byWhichPlayer player
---@param flag boolean
---@return void
function Native.SetUnitRescuable(unit, byWhichPlayer, flag) end
---@param unit unit
---@param range float
---@return void
function Native.SetUnitRescueRange(unit, range) end
---@param hero unit
---@param str integer
---@param permanent boolean
---@return void
function Native.SetHeroStr(hero, str, permanent) end
---@param hero unit
---@param agi integer
---@param permanent boolean
---@return void
function Native.SetHeroAgi(hero, agi, permanent) end
---@param hero unit
---@param int integer
---@param permanent boolean
---@return void
function Native.SetHeroInt(hero, int, permanent) end
---@param hero unit
---@param includeBonuses boolean
---@return integer
function Native.GetHeroStr(hero, includeBonuses) end
---@param hero unit
---@param includeBonuses boolean
---@return integer
function Native.GetHeroAgi(hero, includeBonuses) end
---@param hero unit
---@param includeBonuses boolean
---@return integer
function Native.GetHeroInt(hero, includeBonuses) end
---@param hero unit
---@param howManyLevels integer
---@return boolean
function Native.UnitStripHeroLevel(hero, howManyLevels) end
---@param hero unit
---@return integer
function Native.GetHeroXP(hero) end
---@param hero unit
---@param xpVal integer
---@param showEyeCandy boolean
---@return void
function Native.SetHeroXP(hero, xpVal, showEyeCandy) end
---@param hero unit
---@return integer
function Native.GetHeroSkillPoints(hero) end
---@param hero unit
---@param skillPointDelta integer
---@return boolean
function Native.UnitModifySkillPoints(hero, skillPointDelta) end
---@param hero unit
---@param xpToAdd integer
---@param showEyeCandy boolean
---@return void
function Native.AddHeroXP(hero, xpToAdd, showEyeCandy) end
---@param hero unit
---@param level integer
---@param showEyeCandy boolean
---@return void
function Native.SetHeroLevel(hero, level, showEyeCandy) end
---@param hero unit
---@return integer
function Native.GetHeroLevel(hero) end
---@param unit unit
---@return integer
function Native.GetUnitLevel(unit) end
---@param hero unit
---@return string
function Native.GetHeroProperName(hero) end
---@param hero unit
---@param flag boolean
---@return void
function Native.SuspendHeroXP(hero, flag) end
---@param hero unit
---@return boolean
function Native.IsSuspendedXP(hero) end
---@param hero unit
---@param abilcode integer
---@return void
function Native.SelectHeroSkill(hero, abilcode) end
---@param unit unit
---@param abilcode integer
---@return integer
function Native.GetUnitAbilityLevel(unit, abilcode) end
---@param unit unit
---@param abilcode integer
---@return integer
function Native.DecUnitAbilityLevel(unit, abilcode) end
---@param unit unit
---@param abilcode integer
---@return integer
function Native.IncUnitAbilityLevel(unit, abilcode) end
---@param unit unit
---@param abilcode integer
---@param level integer
---@return integer
function Native.SetUnitAbilityLevel(unit, abilcode, level) end
---@param hero unit
---@param x float
---@param y float
---@param doEyecandy boolean
---@return boolean
function Native.ReviveHero(hero, x, y, doEyecandy) end
---@param hero unit
---@param loc location
---@param doEyecandy boolean
---@return boolean
function Native.ReviveHeroLoc(hero, loc, doEyecandy) end
---@param unit unit
---@param exploded boolean
---@return void
function Native.SetUnitExploded(unit, exploded) end
---@param unit unit
---@param flag boolean
---@return void
function Native.SetUnitInvulnerable(unit, flag) end
---@param unit unit
---@param flag boolean
---@return void
function Native.PauseUnit(unit, flag) end
---@param hero unit
---@return boolean
function Native.IsUnitPaused(hero) end
---@param unit unit
---@param flag boolean
---@return void
function Native.SetUnitPathing(unit, flag) end
---@return void
function Native.ClearSelection() end
---@param unit unit
---@param flag boolean
---@return void
function Native.SelectUnit(unit, flag) end
---@param unit unit
---@return integer
function Native.GetUnitPointValue(unit) end
---@param unitType integer
---@return integer
function Native.GetUnitPointValueByType(unitType) end
---@param unit unit
---@param item item
---@return boolean
function Native.UnitAddItem(unit, item) end
---@param unit unit
---@param itemId integer
---@return item
function Native.UnitAddItemById(unit, itemId) end
---@param unit unit
---@param itemId integer
---@param itemSlot integer
---@return boolean
function Native.UnitAddItemToSlotById(unit, itemId, itemSlot) end
---@param unit unit
---@param item item
---@return void
function Native.UnitRemoveItem(unit, item) end
---@param unit unit
---@param itemSlot integer
---@return item
function Native.UnitRemoveItemFromSlot(unit, itemSlot) end
---@param unit unit
---@param item item
---@return boolean
function Native.UnitHasItem(unit, item) end
---@param unit unit
---@param itemSlot integer
---@return item
function Native.UnitItemInSlot(unit, itemSlot) end
---@param unit unit
---@return integer
function Native.UnitInventorySize(unit) end
---@param unit unit
---@param item item
---@param x float
---@param y float
---@return boolean
function Native.UnitDropItemPoint(unit, item, x, y) end
---@param unit unit
---@param item item
---@param slot integer
---@return boolean
function Native.UnitDropItemSlot(unit, item, slot) end
---@param unit unit
---@param item item
---@param target widget
---@return boolean
function Native.UnitDropItemTarget(unit, item, target) end
---@param unit unit
---@param item item
---@return boolean
function Native.UnitUseItem(unit, item) end
---@param unit unit
---@param item item
---@param x float
---@param y float
---@return boolean
function Native.UnitUseItemPoint(unit, item, x, y) end
---@param unit unit
---@param item item
---@param target widget
---@return boolean
function Native.UnitUseItemTarget(unit, item, target) end
---@param unit unit
---@return float
function Native.GetUnitX(unit) end
---@param unit unit
---@return float
function Native.GetUnitY(unit) end
---@param unit unit
---@return location
function Native.GetUnitLoc(unit) end
---@param unit unit
---@return float
function Native.GetUnitFacing(unit) end
---@param unit unit
---@return float
function Native.GetUnitMoveSpeed(unit) end
---@param unit unit
---@return float
function Native.GetUnitDefaultMoveSpeed(unit) end
---@param unit unit
---@param unitState unitstate
---@return float
function Native.GetUnitState(unit, unitState) end
---@param unit unit
---@return player
function Native.GetOwningPlayer(unit) end
---@param unit unit
---@return integer
function Native.GetUnitTypeId(unit) end
---@param unit unit
---@return race
function Native.GetUnitRace(unit) end
---@param unit unit
---@return string
function Native.GetUnitName(unit) end
---@param unit unit
---@return integer
function Native.GetUnitFoodUsed(unit) end
---@param unit unit
---@return integer
function Native.GetUnitFoodMade(unit) end
---@param unitId integer
---@return integer
function Native.GetFoodMade(unitId) end
---@param unitId integer
---@return integer
function Native.GetFoodUsed(unitId) end
---@param unit unit
---@param useFood boolean
---@return void
function Native.SetUnitUseFood(unit, useFood) end
---@param unit unit
---@return location
function Native.GetUnitRallyPoint(unit) end
---@param unit unit
---@return unit
function Native.GetUnitRallyUnit(unit) end
---@param unit unit
---@return destructable
function Native.GetUnitRallyDestructable(unit) end
---@param unit unit
---@param group group
---@return boolean
function Native.IsUnitInGroup(unit, group) end
---@param unit unit
---@param force force
---@return boolean
function Native.IsUnitInForce(unit, force) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitOwnedByPlayer(unit, player) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitAlly(unit, player) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitEnemy(unit, player) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitVisible(unit, player) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitDetected(unit, player) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitInvisible(unit, player) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitFogged(unit, player) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitMasked(unit, player) end
---@param unit unit
---@param player player
---@return boolean
function Native.IsUnitSelected(unit, player) end
---@param unit unit
---@param race race
---@return boolean
function Native.IsUnitRace(unit, race) end
---@param unit unit
---@param unitType unittype
---@return boolean
function Native.IsUnitType(unit, unitType) end
---@param unit unit
---@param specifiedUnit unit
---@return boolean
function Native.IsUnit(unit, specifiedUnit) end
---@param unit unit
---@param otherUnit unit
---@param distance float
---@return boolean
function Native.IsUnitInRange(unit, otherUnit, distance) end
---@param unit unit
---@param x float
---@param y float
---@param distance float
---@return boolean
function Native.IsUnitInRangeXY(unit, x, y, distance) end
---@param unit unit
---@param loc location
---@param distance float
---@return boolean
function Native.IsUnitInRangeLoc(unit, loc, distance) end
---@param unit unit
---@return boolean
function Native.IsUnitHidden(unit) end
---@param unit unit
---@return boolean
function Native.IsUnitIllusion(unit) end
---@param unit unit
---@param transport unit
---@return boolean
function Native.IsUnitInTransport(unit, transport) end
---@param unit unit
---@return boolean
function Native.IsUnitLoaded(unit) end
---@param unitId integer
---@return boolean
function Native.IsHeroUnitId(unitId) end
---@param unitId integer
---@param unitType unittype
---@return boolean
function Native.IsUnitIdType(unitId, unitType) end
---@param unit unit
---@param player player
---@param share boolean
---@return void
function Native.UnitShareVision(unit, player, share) end
---@param unit unit
---@param suspend boolean
---@return void
function Native.UnitSuspendDecay(unit, suspend) end
---@param unit unit
---@param unitType unittype
---@return boolean
function Native.UnitAddType(unit, unitType) end
---@param unit unit
---@param unitType unittype
---@return boolean
function Native.UnitRemoveType(unit, unitType) end
---@param unit unit
---@param abilityId integer
---@return boolean
function Native.UnitAddAbility(unit, abilityId) end
---@param unit unit
---@param abilityId integer
---@return boolean
function Native.UnitRemoveAbility(unit, abilityId) end
---@param unit unit
---@param permanent boolean
---@param abilityId integer
---@return boolean
function Native.UnitMakeAbilityPermanent(unit, permanent, abilityId) end
---@param unit unit
---@param removePositive boolean
---@param removeNegative boolean
---@return void
function Native.UnitRemoveBuffs(unit, removePositive, removeNegative) end
---@param unit unit
---@param removePositive boolean
---@param removeNegative boolean
---@param magic boolean
---@param physical boolean
---@param timedLife boolean
---@param aura boolean
---@param autoDispel boolean
---@return void
function Native.UnitRemoveBuffsEx(unit, removePositive, removeNegative, magic, physical, timedLife, aura, autoDispel) end
---@param unit unit
---@param removePositive boolean
---@param removeNegative boolean
---@param magic boolean
---@param physical boolean
---@param timedLife boolean
---@param aura boolean
---@param autoDispel boolean
---@return boolean
function Native.UnitHasBuffsEx(unit, removePositive, removeNegative, magic, physical, timedLife, aura, autoDispel) end
---@param unit unit
---@param removePositive boolean
---@param removeNegative boolean
---@param magic boolean
---@param physical boolean
---@param timedLife boolean
---@param aura boolean
---@param autoDispel boolean
---@return integer
function Native.UnitCountBuffsEx(unit, removePositive, removeNegative, magic, physical, timedLife, aura, autoDispel) end
---@param unit unit
---@param add boolean
---@return void
function Native.UnitAddSleep(unit, add) end
---@param unit unit
---@return boolean
function Native.UnitCanSleep(unit) end
---@param unit unit
---@param add boolean
---@return void
function Native.UnitAddSleepPerm(unit, add) end
---@param unit unit
---@return boolean
function Native.UnitCanSleepPerm(unit) end
---@param unit unit
---@return boolean
function Native.UnitIsSleeping(unit) end
---@param unit unit
---@return void
function Native.UnitWakeUp(unit) end
---@param unit unit
---@param buffId integer
---@param duration float
---@return void
function Native.UnitApplyTimedLife(unit, buffId, duration) end
---@param unit unit
---@param flag boolean
---@return boolean
function Native.UnitIgnoreAlarm(unit, flag) end
---@param unit unit
---@return boolean
function Native.UnitIgnoreAlarmToggled(unit) end
---@param unit unit
---@return void
function Native.UnitResetCooldown(unit) end
---@param unit unit
---@param constructionPercentage integer
---@return void
function Native.UnitSetConstructionProgress(unit, constructionPercentage) end
---@param unit unit
---@param upgradePercentage integer
---@return void
function Native.UnitSetUpgradeProgress(unit, upgradePercentage) end
---@param unit unit
---@param flag boolean
---@return void
function Native.UnitPauseTimedLife(unit, flag) end
---@param unit unit
---@param flag boolean
---@return void
function Native.UnitSetUsesAltIcon(unit, flag) end
---@param unit unit
---@param delay float
---@param radius float
---@param x float
---@param y float
---@param amount float
---@param attack boolean
---@param ranged boolean
---@param attackType attacktype
---@param damageType damagetype
---@param weaponType weapontype
---@return boolean
function Native.UnitDamagePoint(unit, delay, radius, x, y, amount, attack, ranged, attackType, damageType, weaponType) end
---@param unit unit
---@param target widget
---@param amount float
---@param attack boolean
---@param ranged boolean
---@param attackType attacktype
---@param damageType damagetype
---@param weaponType weapontype
---@return boolean
function Native.UnitDamageTarget(unit, target, amount, attack, ranged, attackType, damageType, weaponType) end
---@param unit unit
---@param order string
---@return boolean
function Native.IssueImmediateOrder(unit, order) end
---@param unit unit
---@param order integer
---@return boolean
function Native.IssueImmediateOrderById(unit, order) end
---@param unit unit
---@param order string
---@param x float
---@param y float
---@return boolean
function Native.IssuePointOrder(unit, order, x, y) end
---@param unit unit
---@param order string
---@param loc location
---@return boolean
function Native.IssuePointOrderLoc(unit, order, loc) end
---@param unit unit
---@param order integer
---@param x float
---@param y float
---@return boolean
function Native.IssuePointOrderById(unit, order, x, y) end
---@param unit unit
---@param order integer
---@param loc location
---@return boolean
function Native.IssuePointOrderByIdLoc(unit, order, loc) end
---@param unit unit
---@param order string
---@param targetWidget widget
---@return boolean
function Native.IssueTargetOrder(unit, order, targetWidget) end
---@param unit unit
---@param order integer
---@param targetWidget widget
---@return boolean
function Native.IssueTargetOrderById(unit, order, targetWidget) end
---@param unit unit
---@param order string
---@param x float
---@param y float
---@param instantTargetWidget widget
---@return boolean
function Native.IssueInstantPointOrder(unit, order, x, y, instantTargetWidget) end
---@param unit unit
---@param order integer
---@param x float
---@param y float
---@param instantTargetWidget widget
---@return boolean
function Native.IssueInstantPointOrderById(unit, order, x, y, instantTargetWidget) end
---@param unit unit
---@param order string
---@param targetWidget widget
---@param instantTargetWidget widget
---@return boolean
function Native.IssueInstantTargetOrder(unit, order, targetWidget, instantTargetWidget) end
---@param unit unit
---@param order integer
---@param targetWidget widget
---@param instantTargetWidget widget
---@return boolean
function Native.IssueInstantTargetOrderById(unit, order, targetWidget, instantTargetWidget) end
---@param peon unit
---@param unitToBuild string
---@param x float
---@param y float
---@return boolean
function Native.IssueBuildOrder(peon, unitToBuild, x, y) end
---@param peon unit
---@param unitId integer
---@param x float
---@param y float
---@return boolean
function Native.IssueBuildOrderById(peon, unitId, x, y) end
---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitToBuild string
---@return boolean
function Native.IssueNeutralImmediateOrder(forWhichPlayer, neutralStructure, unitToBuild) end
---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitId integer
---@return boolean
function Native.IssueNeutralImmediateOrderById(forWhichPlayer, neutralStructure, unitId) end
---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitToBuild string
---@param x float
---@param y float
---@return boolean
function Native.IssueNeutralPointOrder(forWhichPlayer, neutralStructure, unitToBuild, x, y) end
---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitId integer
---@param x float
---@param y float
---@return boolean
function Native.IssueNeutralPointOrderById(forWhichPlayer, neutralStructure, unitId, x, y) end
---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitToBuild string
---@param target widget
---@return boolean
function Native.IssueNeutralTargetOrder(forWhichPlayer, neutralStructure, unitToBuild, target) end
---@param forWhichPlayer player
---@param neutralStructure unit
---@param unitId integer
---@param target widget
---@return boolean
function Native.IssueNeutralTargetOrderById(forWhichPlayer, neutralStructure, unitId, target) end
---@param unit unit
---@return integer
function Native.GetUnitCurrentOrder(unit) end
---@param unit unit
---@param amount integer
---@return void
function Native.SetResourceAmount(unit, amount) end
---@param unit unit
---@param amount integer
---@return void
function Native.AddResourceAmount(unit, amount) end
---@param unit unit
---@return integer
function Native.GetResourceAmount(unit) end
---@param waygate unit
---@return float
function Native.WaygateGetDestinationX(waygate) end
---@param waygate unit
---@return float
function Native.WaygateGetDestinationY(waygate) end
---@param waygate unit
---@param x float
---@param y float
---@return void
function Native.WaygateSetDestination(waygate, x, y) end
---@param waygate unit
---@param activate boolean
---@return void
function Native.WaygateActivate(waygate, activate) end
---@param waygate unit
---@return boolean
function Native.WaygateIsActive(waygate) end
---@param itemId integer
---@param currentStock integer
---@param stockMax integer
---@return void
function Native.AddItemToAllStock(itemId, currentStock, stockMax) end
---@param unit unit
---@param itemId integer
---@param currentStock integer
---@param stockMax integer
---@return void
function Native.AddItemToStock(unit, itemId, currentStock, stockMax) end
---@param unitId integer
---@param currentStock integer
---@param stockMax integer
---@return void
function Native.AddUnitToAllStock(unitId, currentStock, stockMax) end
---@param unit unit
---@param unitId integer
---@param currentStock integer
---@param stockMax integer
---@return void
function Native.AddUnitToStock(unit, unitId, currentStock, stockMax) end
---@param itemId integer
---@return void
function Native.RemoveItemFromAllStock(itemId) end
---@param unit unit
---@param itemId integer
---@return void
function Native.RemoveItemFromStock(unit, itemId) end
---@param unitId integer
---@return void
function Native.RemoveUnitFromAllStock(unitId) end
---@param unit unit
---@param unitId integer
---@return void
function Native.RemoveUnitFromStock(unit, unitId) end
---@param slots integer
---@return void
function Native.SetAllItemTypeSlots(slots) end
---@param slots integer
---@return void
function Native.SetAllUnitTypeSlots(slots) end
---@param unit unit
---@param slots integer
---@return void
function Native.SetItemTypeSlots(unit, slots) end
---@param unit unit
---@param slots integer
---@return void
function Native.SetUnitTypeSlots(unit, slots) end
---@param unit unit
---@return integer
function Native.GetUnitUserData(unit) end
---@param unit unit
---@param data integer
---@return void
function Native.SetUnitUserData(unit, data) end
---@param number integer
---@return player
function Native.Player(number) end
---@return player
function Native.GetLocalPlayer() end
---@param player player
---@param otherPlayer player
---@return boolean
function Native.IsPlayerAlly(player, otherPlayer) end
---@param player player
---@param otherPlayer player
---@return boolean
function Native.IsPlayerEnemy(player, otherPlayer) end
---@param player player
---@param force force
---@return boolean
function Native.IsPlayerInForce(player, force) end
---@param player player
---@return boolean
function Native.IsPlayerObserver(player) end
---@param x float
---@param y float
---@param player player
---@return boolean
function Native.IsVisibleToPlayer(x, y, player) end
---@param loc location
---@param player player
---@return boolean
function Native.IsLocationVisibleToPlayer(loc, player) end
---@param x float
---@param y float
---@param player player
---@return boolean
function Native.IsFoggedToPlayer(x, y, player) end
---@param loc location
---@param player player
---@return boolean
function Native.IsLocationFoggedToPlayer(loc, player) end
---@param x float
---@param y float
---@param player player
---@return boolean
function Native.IsMaskedToPlayer(x, y, player) end
---@param loc location
---@param player player
---@return boolean
function Native.IsLocationMaskedToPlayer(loc, player) end
---@param player player
---@return race
function Native.GetPlayerRace(player) end
---@param player player
---@return integer
function Native.GetPlayerId(player) end
---@param player player
---@param includeIncomplete boolean
---@return integer
function Native.GetPlayerUnitCount(player, includeIncomplete) end
---@param player player
---@param unitName string
---@param includeIncomplete boolean
---@param includeUpgrades boolean
---@return integer
function Native.GetPlayerTypedUnitCount(player, unitName, includeIncomplete, includeUpgrades) end
---@param player player
---@param includeIncomplete boolean
---@return integer
function Native.GetPlayerStructureCount(player, includeIncomplete) end
---@param player player
---@param playerState playerstate
---@return integer
function Native.GetPlayerState(player, playerState) end
---@param player player
---@param playerScore playerscore
---@return integer
function Native.GetPlayerScore(player, playerScore) end
---@param sourcePlayer player
---@param otherPlayer player
---@param allianceSetting alliancetype
---@return boolean
function Native.GetPlayerAlliance(sourcePlayer, otherPlayer, allianceSetting) end
---@param player player
---@return float
function Native.GetPlayerHandicap(player) end
---@param player player
---@return float
function Native.GetPlayerHandicapXP(player) end
---@param player player
---@return float
function Native.GetPlayerHandicapReviveTime(player) end
---@param player player
---@return float
function Native.GetPlayerHandicapDamage(player) end
---@param player player
---@param handicap float
---@return void
function Native.SetPlayerHandicap(player, handicap) end
---@param player player
---@param handicap float
---@return void
function Native.SetPlayerHandicapXP(player, handicap) end
---@param player player
---@param handicap float
---@return void
function Native.SetPlayerHandicapReviveTime(player, handicap) end
---@param player player
---@param handicap float
---@return void
function Native.SetPlayerHandicapDamage(player, handicap) end
---@param player player
---@param techid integer
---@param maximum integer
---@return void
function Native.SetPlayerTechMaxAllowed(player, techid, maximum) end
---@param player player
---@param techid integer
---@return integer
function Native.GetPlayerTechMaxAllowed(player, techid) end
---@param player player
---@param techid integer
---@param levels integer
---@return void
function Native.AddPlayerTechResearched(player, techid, levels) end
---@param player player
---@param techid integer
---@param setToLevel integer
---@return void
function Native.SetPlayerTechResearched(player, techid, setToLevel) end
---@param player player
---@param techid integer
---@param specificonly boolean
---@return boolean
function Native.GetPlayerTechResearched(player, techid, specificonly) end
---@param player player
---@param techid integer
---@param specificonly boolean
---@return integer
function Native.GetPlayerTechCount(player, techid, specificonly) end
---@param player player
---@param owner integer
---@return void
function Native.SetPlayerUnitsOwner(player, owner) end
---@param player player
---@param toWhichPlayers force
---@param flag boolean
---@return void
function Native.CripplePlayer(player, toWhichPlayers, flag) end
---@param player player
---@param abilid integer
---@param avail boolean
---@return void
function Native.SetPlayerAbilityAvailable(player, abilid, avail) end
---@param player player
---@param playerState playerstate
---@param value integer
---@return void
function Native.SetPlayerState(player, playerState, value) end
---@param player player
---@param gameResult playergameresult
---@return void
function Native.RemovePlayer(player, gameResult) end
---@param player player
---@return void
function Native.CachePlayerHeroData(player) end
---@param forWhichPlayer player
---@param state fogstate
---@param where rect
---@param useSharedVision boolean
---@return void
function Native.SetFogStateRect(forWhichPlayer, state, where, useSharedVision) end
---@param forWhichPlayer player
---@param state fogstate
---@param centerx float
---@param centerY float
---@param radius float
---@param useSharedVision boolean
---@return void
function Native.SetFogStateRadius(forWhichPlayer, state, centerx, centerY, radius, useSharedVision) end
---@param forWhichPlayer player
---@param state fogstate
---@param center location
---@param radius float
---@param useSharedVision boolean
---@return void
function Native.SetFogStateRadiusLoc(forWhichPlayer, state, center, radius, useSharedVision) end
---@param enable boolean
---@return void
function Native.FogMaskEnable(enable) end
---@return boolean
function Native.IsFogMaskEnabled() end
---@param enable boolean
---@return void
function Native.FogEnable(enable) end
---@return boolean
function Native.IsFogEnabled() end
---@param forWhichPlayer player
---@param state fogstate
---@param where rect
---@param useSharedVision boolean
---@param afterUnits boolean
---@return fogmodifier
function Native.CreateFogModifierRect(forWhichPlayer, state, where, useSharedVision, afterUnits) end
---@param forWhichPlayer player
---@param state fogstate
---@param centerx float
---@param centerY float
---@param radius float
---@param useSharedVision boolean
---@param afterUnits boolean
---@return fogmodifier
function Native.CreateFogModifierRadius(forWhichPlayer, state, centerx, centerY, radius, useSharedVision, afterUnits) end
---@param forWhichPlayer player
---@param state fogstate
---@param center location
---@param radius float
---@param useSharedVision boolean
---@param afterUnits boolean
---@return fogmodifier
function Native.CreateFogModifierRadiusLoc(forWhichPlayer, state, center, radius, useSharedVision, afterUnits) end
---@param fogModifier fogmodifier
---@return void
function Native.DestroyFogModifier(fogModifier) end
---@param fogModifier fogmodifier
---@return void
function Native.FogModifierStart(fogModifier) end
---@param fogModifier fogmodifier
---@return void
function Native.FogModifierStop(fogModifier) end
---@return version
function Native.VersionGet() end
---@param version version
---@return boolean
function Native.VersionCompatible(version) end
---@param version version
---@return boolean
function Native.VersionSupported(version) end
---@param doScoreScreen boolean
---@return void
function Native.EndGame(doScoreScreen) end
---@param level string
---@param doScoreScreen boolean
---@return void
function Native.ChangeLevel(level, doScoreScreen) end
---@param doScoreScreen boolean
---@return void
function Native.RestartGame(doScoreScreen) end
---@return void
function Native.ReloadGame() end
---@param r race
---@return void
function Native.SetCampaignMenuRace(r) end
---@param campaignIndex integer
---@return void
function Native.SetCampaignMenuRaceEx(campaignIndex) end
---@return void
function Native.ForceCampaignSelectScreen() end
---@param saveFileName string
---@param doScoreScreen boolean
---@return void
function Native.LoadGame(saveFileName, doScoreScreen) end
---@param saveFileName string
---@return void
function Native.SaveGame(saveFileName) end
---@param sourceDirName string
---@param destDirName string
---@return boolean
function Native.RenameSaveDirectory(sourceDirName, destDirName) end
---@param sourceDirName string
---@return boolean
function Native.RemoveSaveDirectory(sourceDirName) end
---@param sourceSaveName string
---@param destSaveName string
---@return boolean
function Native.CopySaveGame(sourceSaveName, destSaveName) end
---@param saveName string
---@return boolean
function Native.SaveGameExists(saveName) end
---@param maxCheckpointSaves integer
---@return void
function Native.SetMaxCheckpointSaves(maxCheckpointSaves) end
---@param saveFileName string
---@param showWindow boolean
---@return void
function Native.SaveGameCheckpoint(saveFileName, showWindow) end
---@return void
function Native.SyncSelections() end
---@param floatGameState fgamestate
---@param value float
---@return void
function Native.SetFloatGameState(floatGameState, value) end
---@param floatGameState fgamestate
---@return float
function Native.GetFloatGameState(floatGameState) end
---@param integerGameState igamestate
---@param value integer
---@return void
function Native.SetIntegerGameState(integerGameState, value) end
---@param integerGameState igamestate
---@return integer
function Native.GetIntegerGameState(integerGameState) end
---@param cleared boolean
---@return void
function Native.SetTutorialCleared(cleared) end
---@param campaignNumber integer
---@param missionNumber integer
---@param available boolean
---@return void
function Native.SetMissionAvailable(campaignNumber, missionNumber, available) end
---@param campaignNumber integer
---@param available boolean
---@return void
function Native.SetCampaignAvailable(campaignNumber, available) end
---@param campaignNumber integer
---@param available boolean
---@return void
function Native.SetOpCinematicAvailable(campaignNumber, available) end
---@param campaignNumber integer
---@param available boolean
---@return void
function Native.SetEdCinematicAvailable(campaignNumber, available) end
---@return gamedifficulty
function Native.GetDefaultDifficulty() end
---@param g gamedifficulty
---@return void
function Native.SetDefaultDifficulty(g) end
---@param button integer
---@param visible boolean
---@return void
function Native.SetCustomCampaignButtonVisible(button, visible) end
---@param button integer
---@return boolean
function Native.GetCustomCampaignButtonVisible(button) end
---@return void
function Native.DoNotSaveReplay() end
---@return dialog
function Native.DialogCreate() end
---@param dialog dialog
---@return void
function Native.DialogDestroy(dialog) end
---@param dialog dialog
---@return void
function Native.DialogClear(dialog) end
---@param dialog dialog
---@param messageText string
---@return void
function Native.DialogSetMessage(dialog, messageText) end
---@param dialog dialog
---@param buttonText string
---@param hotkey integer
---@return button
function Native.DialogAddButton(dialog, buttonText, hotkey) end
---@param dialog dialog
---@param doScoreScreen boolean
---@param buttonText string
---@param hotkey integer
---@return button
function Native.DialogAddQuitButton(dialog, doScoreScreen, buttonText, hotkey) end
---@param player player
---@param dialog dialog
---@param flag boolean
---@return void
function Native.DialogDisplay(player, dialog, flag) end
---@return boolean
function Native.ReloadGameCachesFromDisk() end
---@param campaignFile string
---@return gamecache
function Native.InitGameCache(campaignFile) end
---@param cache gamecache
---@return boolean
function Native.SaveGameCache(cache) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@param value integer
---@return void
function Native.StoreInteger(cache, missionKey, key, value) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@param value float
---@return void
function Native.StoreReal(cache, missionKey, key, value) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@param value boolean
---@return void
function Native.StoreBoolean(cache, missionKey, key, value) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@param unit unit
---@return boolean
function Native.StoreUnit(cache, missionKey, key, unit) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@param value string
---@return boolean
function Native.StoreString(cache, missionKey, key, value) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.SyncStoredInteger(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.SyncStoredReal(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.SyncStoredBoolean(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.SyncStoredUnit(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.SyncStoredString(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
function Native.HaveStoredInteger(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
function Native.HaveStoredReal(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
function Native.HaveStoredBoolean(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
function Native.HaveStoredUnit(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
function Native.HaveStoredString(cache, missionKey, key) end
---@param cache gamecache
---@return void
function Native.FlushGameCache(cache) end
---@param cache gamecache
---@param missionKey string
---@return void
function Native.FlushStoredMission(cache, missionKey) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.FlushStoredInteger(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.FlushStoredReal(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.FlushStoredBoolean(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.FlushStoredUnit(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return void
function Native.FlushStoredString(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return integer
function Native.GetStoredInteger(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return float
function Native.GetStoredReal(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return boolean
function Native.GetStoredBoolean(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@return string
function Native.GetStoredString(cache, missionKey, key) end
---@param cache gamecache
---@param missionKey string
---@param key string
---@param forWhichPlayer player
---@param x float
---@param y float
---@param facing float
---@return unit
function Native.RestoreUnit(cache, missionKey, key, forWhichPlayer, x, y, facing) end
---@return hashtable
function Native.InitHashtable() end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param value integer
---@return void
function Native.SaveInteger(table, parentKey, childKey, value) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param value float
---@return void
function Native.SaveReal(table, parentKey, childKey, value) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param value boolean
---@return void
function Native.SaveBoolean(table, parentKey, childKey, value) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param value string
---@return boolean
function Native.SaveStr(table, parentKey, childKey, value) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param player player
---@return boolean
function Native.SavePlayerHandle(table, parentKey, childKey, player) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param widget widget
---@return boolean
function Native.SaveWidgetHandle(table, parentKey, childKey, widget) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param destructable destructable
---@return boolean
function Native.SaveDestructableHandle(table, parentKey, childKey, destructable) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param item item
---@return boolean
function Native.SaveItemHandle(table, parentKey, childKey, item) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param unit unit
---@return boolean
function Native.SaveUnitHandle(table, parentKey, childKey, unit) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param ability ability
---@return boolean
function Native.SaveAbilityHandle(table, parentKey, childKey, ability) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param timer timer
---@return boolean
function Native.SaveTimerHandle(table, parentKey, childKey, timer) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param trigger trigger
---@return boolean
function Native.SaveTriggerHandle(table, parentKey, childKey, trigger) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param triggercondition triggercondition
---@return boolean
function Native.SaveTriggerConditionHandle(table, parentKey, childKey, triggercondition) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param triggeraction triggeraction
---@return boolean
function Native.SaveTriggerActionHandle(table, parentKey, childKey, triggeraction) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param event event
---@return boolean
function Native.SaveTriggerEventHandle(table, parentKey, childKey, event) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param force force
---@return boolean
function Native.SaveForceHandle(table, parentKey, childKey, force) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param group group
---@return boolean
function Native.SaveGroupHandle(table, parentKey, childKey, group) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param loc location
---@return boolean
function Native.SaveLocationHandle(table, parentKey, childKey, loc) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param rect rect
---@return boolean
function Native.SaveRectHandle(table, parentKey, childKey, rect) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param boolexpr boolexpr
---@return boolean
function Native.SaveBooleanExprHandle(table, parentKey, childKey, boolexpr) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param sound sound
---@return boolean
function Native.SaveSoundHandle(table, parentKey, childKey, sound) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param effect effect
---@return boolean
function Native.SaveEffectHandle(table, parentKey, childKey, effect) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param unitpool unitpool
---@return boolean
function Native.SaveUnitPoolHandle(table, parentKey, childKey, unitpool) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param itempool itempool
---@return boolean
function Native.SaveItemPoolHandle(table, parentKey, childKey, itempool) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param quest quest
---@return boolean
function Native.SaveQuestHandle(table, parentKey, childKey, quest) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param questitem questitem
---@return boolean
function Native.SaveQuestItemHandle(table, parentKey, childKey, questitem) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param defeatcondition defeatcondition
---@return boolean
function Native.SaveDefeatConditionHandle(table, parentKey, childKey, defeatcondition) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param timerdialog timerdialog
---@return boolean
function Native.SaveTimerDialogHandle(table, parentKey, childKey, timerdialog) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param leaderboard leaderboard
---@return boolean
function Native.SaveLeaderboardHandle(table, parentKey, childKey, leaderboard) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param multiboard multiboard
---@return boolean
function Native.SaveMultiboardHandle(table, parentKey, childKey, multiboard) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param multiboarditem multiboarditem
---@return boolean
function Native.SaveMultiboardItemHandle(table, parentKey, childKey, multiboarditem) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param trackable trackable
---@return boolean
function Native.SaveTrackableHandle(table, parentKey, childKey, trackable) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param dialog dialog
---@return boolean
function Native.SaveDialogHandle(table, parentKey, childKey, dialog) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param button button
---@return boolean
function Native.SaveButtonHandle(table, parentKey, childKey, button) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param texttag texttag
---@return boolean
function Native.SaveTextTagHandle(table, parentKey, childKey, texttag) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param lightning lightning
---@return boolean
function Native.SaveLightningHandle(table, parentKey, childKey, lightning) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param image image
---@return boolean
function Native.SaveImageHandle(table, parentKey, childKey, image) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param ubersplat ubersplat
---@return boolean
function Native.SaveUbersplatHandle(table, parentKey, childKey, ubersplat) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param region region
---@return boolean
function Native.SaveRegionHandle(table, parentKey, childKey, region) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param fogState fogstate
---@return boolean
function Native.SaveFogStateHandle(table, parentKey, childKey, fogState) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param fogModifier fogmodifier
---@return boolean
function Native.SaveFogModifierHandle(table, parentKey, childKey, fogModifier) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param agent agent
---@return boolean
function Native.SaveAgentHandle(table, parentKey, childKey, agent) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param hashtable hashtable
---@return boolean
function Native.SaveHashtableHandle(table, parentKey, childKey, hashtable) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@param frameHandle framehandle
---@return boolean
function Native.SaveFrameHandle(table, parentKey, childKey, frameHandle) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return integer
function Native.LoadInteger(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return float
function Native.LoadReal(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolean
function Native.LoadBoolean(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return string
function Native.LoadStr(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return player
function Native.LoadPlayerHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return widget
function Native.LoadWidgetHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return destructable
function Native.LoadDestructableHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return item
function Native.LoadItemHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return unit
function Native.LoadUnitHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return ability
function Native.LoadAbilityHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return timer
function Native.LoadTimerHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return trigger
function Native.LoadTriggerHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return triggercondition
function Native.LoadTriggerConditionHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return triggeraction
function Native.LoadTriggerActionHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return event
function Native.LoadTriggerEventHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return force
function Native.LoadForceHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return group
function Native.LoadGroupHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return location
function Native.LoadLocationHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return rect
function Native.LoadRectHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolexpr
function Native.LoadBooleanExprHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return sound
function Native.LoadSoundHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return effect
function Native.LoadEffectHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return unitpool
function Native.LoadUnitPoolHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return itempool
function Native.LoadItemPoolHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return quest
function Native.LoadQuestHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return questitem
function Native.LoadQuestItemHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return defeatcondition
function Native.LoadDefeatConditionHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return timerdialog
function Native.LoadTimerDialogHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return leaderboard
function Native.LoadLeaderboardHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return multiboard
function Native.LoadMultiboardHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return multiboarditem
function Native.LoadMultiboardItemHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return trackable
function Native.LoadTrackableHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return dialog
function Native.LoadDialogHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return button
function Native.LoadButtonHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return texttag
function Native.LoadTextTagHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return lightning
function Native.LoadLightningHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return image
function Native.LoadImageHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return ubersplat
function Native.LoadUbersplatHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return region
function Native.LoadRegionHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return fogstate
function Native.LoadFogStateHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return fogmodifier
function Native.LoadFogModifierHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return hashtable
function Native.LoadHashtableHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return framehandle
function Native.LoadFrameHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolean
function Native.HaveSavedInteger(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolean
function Native.HaveSavedReal(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolean
function Native.HaveSavedBoolean(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolean
function Native.HaveSavedString(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return boolean
function Native.HaveSavedHandle(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return void
function Native.RemoveSavedInteger(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return void
function Native.RemoveSavedReal(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return void
function Native.RemoveSavedBoolean(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return void
function Native.RemoveSavedString(table, parentKey, childKey) end
---@param table hashtable
---@param parentKey integer
---@param childKey integer
---@return void
function Native.RemoveSavedHandle(table, parentKey, childKey) end
---@param table hashtable
---@return void
function Native.FlushParentHashtable(table) end
---@param table hashtable
---@param parentKey integer
---@return void
function Native.FlushChildHashtable(table, parentKey) end
---@param lowBound integer
---@param highBound integer
---@return integer
function Native.GetRandomInt(lowBound, highBound) end
---@param lowBound float
---@param highBound float
---@return float
function Native.GetRandomReal(lowBound, highBound) end
---@return unitpool
function Native.CreateUnitPool() end
---@param pool unitpool
---@return void
function Native.DestroyUnitPool(pool) end
---@param pool unitpool
---@param unitId integer
---@param weight float
---@return void
function Native.UnitPoolAddUnitType(pool, unitId, weight) end
---@param pool unitpool
---@param unitId integer
---@return void
function Native.UnitPoolRemoveUnitType(pool, unitId) end
---@param pool unitpool
---@param forWhichPlayer player
---@param x float
---@param y float
---@param facing float
---@return unit
function Native.PlaceRandomUnit(pool, forWhichPlayer, x, y, facing) end
---@return itempool
function Native.CreateItemPool() end
---@param itemPool itempool
---@return void
function Native.DestroyItemPool(itemPool) end
---@param itemPool itempool
---@param itemId integer
---@param weight float
---@return void
function Native.ItemPoolAddItemType(itemPool, itemId, weight) end
---@param itemPool itempool
---@param itemId integer
---@return void
function Native.ItemPoolRemoveItemType(itemPool, itemId) end
---@param itemPool itempool
---@param x float
---@param y float
---@return item
function Native.PlaceRandomItem(itemPool, x, y) end
---@param level integer
---@return integer
function Native.ChooseRandomCreep(level) end
---@return integer
function Native.ChooseRandomNPBuilding() end
---@param level integer
---@return integer
function Native.ChooseRandomItem(level) end
---@param type itemtype
---@param level integer
---@return integer
function Native.ChooseRandomItemEx(type, level) end
---@param seed integer
---@return void
function Native.SetRandomSeed(seed) end
---@param a float
---@param b float
---@param c float
---@param d float
---@param e float
---@return void
function Native.SetTerrainFog(a, b, c, d, e) end
---@return void
function Native.ResetTerrainFog() end
---@param a float
---@param b float
---@param c float
---@param d float
---@param e float
---@return void
function Native.SetUnitFog(a, b, c, d, e) end
---@param style integer
---@param zstart float
---@param zend float
---@param density float
---@param red float
---@param green float
---@param blue float
---@return void
function Native.SetTerrainFogEx(style, zstart, zend, density, red, green, blue) end
---@param toPlayer player
---@param x float
---@param y float
---@param message string
---@return void
function Native.DisplayTextToPlayer(toPlayer, x, y, message) end
---@param toPlayer player
---@param x float
---@param y float
---@param duration float
---@param message string
---@return void
function Native.DisplayTimedTextToPlayer(toPlayer, x, y, duration, message) end
---@param toPlayer player
---@param x float
---@param y float
---@param duration float
---@param message string
---@return void
function Native.DisplayTimedTextFromPlayer(toPlayer, x, y, duration, message) end
---@return void
function Native.ClearTextMessages() end
---@param terrainDNCFile string
---@param unitDNCFile string
---@return void
function Native.SetDayNightModels(terrainDNCFile, unitDNCFile) end
---@param portraitDNCFile string
---@return void
function Native.SetPortraitLight(portraitDNCFile) end
---@param skyModelFile string
---@return void
function Native.SetSkyModel(skyModelFile) end
---@param b boolean
---@return void
function Native.EnableUserControl(b) end
---@param b boolean
---@return void
function Native.EnableUserUI(b) end
---@param b boolean
---@return void
function Native.SuspendTimeOfDay(b) end
---@param r float
---@return void
function Native.SetTimeOfDayScale(r) end
---@return float
function Native.GetTimeOfDayScale() end
---@param flag boolean
---@param fadeDuration float
---@return void
function Native.ShowInterface(flag, fadeDuration) end
---@param flag boolean
---@return void
function Native.PauseGame(flag) end
---@param unit unit
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.UnitAddIndicator(unit, red, green, blue, alpha) end
---@param widget widget
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.AddIndicator(widget, red, green, blue, alpha) end
---@param x float
---@param y float
---@param duration float
---@return void
function Native.PingMinimap(x, y, duration) end
---@param x float
---@param y float
---@param duration float
---@param red integer
---@param green integer
---@param blue integer
---@param extraEffects boolean
---@return void
function Native.PingMinimapEx(x, y, duration, red, green, blue, extraEffects) end
---@param unit unit
---@param red integer
---@param green integer
---@param blue integer
---@param pingPath string
---@param fogVisibility fogstate
---@return minimapicon
function Native.CreateMinimapIconOnUnit(unit, red, green, blue, pingPath, fogVisibility) end
---@param where location
---@param red integer
---@param green integer
---@param blue integer
---@param pingPath string
---@param fogVisibility fogstate
---@return minimapicon
function Native.CreateMinimapIconAtLoc(where, red, green, blue, pingPath, fogVisibility) end
---@param x float
---@param y float
---@param red integer
---@param green integer
---@param blue integer
---@param pingPath string
---@param fogVisibility fogstate
---@return minimapicon
function Native.CreateMinimapIcon(x, y, red, green, blue, pingPath, fogVisibility) end
---@param key string
---@return string
function Native.SkinManagerGetLocalPath(key) end
---@param pingId minimapicon
---@return void
function Native.DestroyMinimapIcon(pingId) end
---@param minimapIcon minimapicon
---@param visible boolean
---@return void
function Native.SetMinimapIconVisible(minimapIcon, visible) end
---@param minimapIcon minimapicon
---@param doDestroy boolean
---@return void
function Native.SetMinimapIconOrphanDestroy(minimapIcon, doDestroy) end
---@param flag boolean
---@return void
function Native.EnableOcclusion(flag) end
---@param introText string
---@return void
function Native.SetIntroShotText(introText) end
---@param introModelPath string
---@return void
function Native.SetIntroShotModel(introModelPath) end
---@param b boolean
---@return void
function Native.EnableWorldFogBoundary(b) end
---@param modelName string
---@return void
function Native.PlayModelCinematic(modelName) end
---@param movieName string
---@return void
function Native.PlayCinematic(movieName) end
---@param key string
---@return void
function Native.ForceUIKey(key) end
---@return void
function Native.ForceUICancel() end
---@return void
function Native.DisplayLoadDialog() end
---@param iconPath string
---@return void
function Native.SetAltMinimapIcon(iconPath) end
---@param flag boolean
---@return void
function Native.DisableRestartMission(flag) end
---@return texttag
function Native.CreateTextTag() end
---@param t texttag
---@return void
function Native.DestroyTextTag(t) end
---@param t texttag
---@param s string
---@param height float
---@return void
function Native.SetTextTagText(t, s, height) end
---@param t texttag
---@param x float
---@param y float
---@param heightOffset float
---@return void
function Native.SetTextTagPos(t, x, y, heightOffset) end
---@param t texttag
---@param unit unit
---@param heightOffset float
---@return void
function Native.SetTextTagPosUnit(t, unit, heightOffset) end
---@param t texttag
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.SetTextTagColor(t, red, green, blue, alpha) end
---@param t texttag
---@param xvel float
---@param yvel float
---@return void
function Native.SetTextTagVelocity(t, xvel, yvel) end
---@param t texttag
---@param flag boolean
---@return void
function Native.SetTextTagVisibility(t, flag) end
---@param t texttag
---@param flag boolean
---@return void
function Native.SetTextTagSuspended(t, flag) end
---@param t texttag
---@param flag boolean
---@return void
function Native.SetTextTagPermanent(t, flag) end
---@param t texttag
---@param age float
---@return void
function Native.SetTextTagAge(t, age) end
---@param t texttag
---@param lifespan float
---@return void
function Native.SetTextTagLifespan(t, lifespan) end
---@param t texttag
---@param fadepoint float
---@return void
function Native.SetTextTagFadepoint(t, fadepoint) end
---@param reserved integer
---@return void
function Native.SetReservedLocalHeroButtons(reserved) end
---@return integer
function Native.GetAllyColorFilterState() end
---@param state integer
---@return void
function Native.SetAllyColorFilterState(state) end
---@return boolean
function Native.GetCreepCampFilterState() end
---@param state boolean
---@return void
function Native.SetCreepCampFilterState(state) end
---@param enableAlly boolean
---@param enableCreep boolean
---@return void
function Native.EnableMinimapFilterButtons(enableAlly, enableCreep) end
---@param state boolean
---@param ui boolean
---@return void
function Native.EnableDragSelect(state, ui) end
---@param state boolean
---@param ui boolean
---@return void
function Native.EnablePreSelect(state, ui) end
---@param state boolean
---@param ui boolean
---@return void
function Native.EnableSelect(state, ui) end
---@param trackableModelPath string
---@param x float
---@param y float
---@param facing float
---@return trackable
function Native.CreateTrackable(trackableModelPath, x, y, facing) end
---@return quest
function Native.CreateQuest() end
---@param quest quest
---@return void
function Native.DestroyQuest(quest) end
---@param quest quest
---@param title string
---@return void
function Native.QuestSetTitle(quest, title) end
---@param quest quest
---@param description string
---@return void
function Native.QuestSetDescription(quest, description) end
---@param quest quest
---@param iconPath string
---@return void
function Native.QuestSetIconPath(quest, iconPath) end
---@param quest quest
---@param required boolean
---@return void
function Native.QuestSetRequired(quest, required) end
---@param quest quest
---@param completed boolean
---@return void
function Native.QuestSetCompleted(quest, completed) end
---@param quest quest
---@param discovered boolean
---@return void
function Native.QuestSetDiscovered(quest, discovered) end
---@param quest quest
---@param failed boolean
---@return void
function Native.QuestSetFailed(quest, failed) end
---@param quest quest
---@param enabled boolean
---@return void
function Native.QuestSetEnabled(quest, enabled) end
---@param quest quest
---@return boolean
function Native.IsQuestRequired(quest) end
---@param quest quest
---@return boolean
function Native.IsQuestCompleted(quest) end
---@param quest quest
---@return boolean
function Native.IsQuestDiscovered(quest) end
---@param quest quest
---@return boolean
function Native.IsQuestFailed(quest) end
---@param quest quest
---@return boolean
function Native.IsQuestEnabled(quest) end
---@param quest quest
---@return questitem
function Native.QuestCreateItem(quest) end
---@param questItem questitem
---@param description string
---@return void
function Native.QuestItemSetDescription(questItem, description) end
---@param questItem questitem
---@param completed boolean
---@return void
function Native.QuestItemSetCompleted(questItem, completed) end
---@param questItem questitem
---@return boolean
function Native.IsQuestItemCompleted(questItem) end
---@return defeatcondition
function Native.CreateDefeatCondition() end
---@param condition defeatcondition
---@return void
function Native.DestroyDefeatCondition(condition) end
---@param condition defeatcondition
---@param description string
---@return void
function Native.DefeatConditionSetDescription(condition, description) end
---@return void
function Native.FlashQuestDialogButton() end
---@return void
function Native.ForceQuestDialogUpdate() end
---@param t timer
---@return timerdialog
function Native.CreateTimerDialog(t) end
---@param dialog timerdialog
---@return void
function Native.DestroyTimerDialog(dialog) end
---@param dialog timerdialog
---@param title string
---@return void
function Native.TimerDialogSetTitle(dialog, title) end
---@param dialog timerdialog
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.TimerDialogSetTitleColor(dialog, red, green, blue, alpha) end
---@param dialog timerdialog
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.TimerDialogSetTimeColor(dialog, red, green, blue, alpha) end
---@param dialog timerdialog
---@param speedMultFactor float
---@return void
function Native.TimerDialogSetSpeed(dialog, speedMultFactor) end
---@param dialog timerdialog
---@param display boolean
---@return void
function Native.TimerDialogDisplay(dialog, display) end
---@param dialog timerdialog
---@return boolean
function Native.IsTimerDialogDisplayed(dialog) end
---@param dialog timerdialog
---@param timeRemaining float
---@return void
function Native.TimerDialogSetRealTimeRemaining(dialog, timeRemaining) end
---@return leaderboard
function Native.CreateLeaderboard() end
---@param lb leaderboard
---@return void
function Native.DestroyLeaderboard(lb) end
---@param lb leaderboard
---@param show boolean
---@return void
function Native.LeaderboardDisplay(lb, show) end
---@param lb leaderboard
---@return boolean
function Native.IsLeaderboardDisplayed(lb) end
---@param lb leaderboard
---@return integer
function Native.LeaderboardGetItemCount(lb) end
---@param lb leaderboard
---@param count integer
---@return void
function Native.LeaderboardSetSizeByItemCount(lb, count) end
---@param lb leaderboard
---@param label string
---@param value integer
---@param p player
---@return void
function Native.LeaderboardAddItem(lb, label, value, p) end
---@param lb leaderboard
---@param index integer
---@return void
function Native.LeaderboardRemoveItem(lb, index) end
---@param lb leaderboard
---@param p player
---@return void
function Native.LeaderboardRemovePlayerItem(lb, p) end
---@param lb leaderboard
---@return void
function Native.LeaderboardClear(lb) end
---@param lb leaderboard
---@param ascending boolean
---@return void
function Native.LeaderboardSortItemsByValue(lb, ascending) end
---@param lb leaderboard
---@param ascending boolean
---@return void
function Native.LeaderboardSortItemsByPlayer(lb, ascending) end
---@param lb leaderboard
---@param ascending boolean
---@return void
function Native.LeaderboardSortItemsByLabel(lb, ascending) end
---@param lb leaderboard
---@param p player
---@return boolean
function Native.LeaderboardHasPlayerItem(lb, p) end
---@param lb leaderboard
---@param p player
---@return integer
function Native.LeaderboardGetPlayerIndex(lb, p) end
---@param lb leaderboard
---@param label string
---@return void
function Native.LeaderboardSetLabel(lb, label) end
---@param lb leaderboard
---@return string
function Native.LeaderboardGetLabelText(lb) end
---@param toPlayer player
---@param lb leaderboard
---@return void
function Native.PlayerSetLeaderboard(toPlayer, lb) end
---@param toPlayer player
---@return leaderboard
function Native.PlayerGetLeaderboard(toPlayer) end
---@param lb leaderboard
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.LeaderboardSetLabelColor(lb, red, green, blue, alpha) end
---@param lb leaderboard
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.LeaderboardSetValueColor(lb, red, green, blue, alpha) end
---@param lb leaderboard
---@param showLabel boolean
---@param showNames boolean
---@param showValues boolean
---@param showIcons boolean
---@return void
function Native.LeaderboardSetStyle(lb, showLabel, showNames, showValues, showIcons) end
---@param lb leaderboard
---@param item integer
---@param val integer
---@return void
function Native.LeaderboardSetItemValue(lb, item, val) end
---@param lb leaderboard
---@param item integer
---@param val string
---@return void
function Native.LeaderboardSetItemLabel(lb, item, val) end
---@param lb leaderboard
---@param item integer
---@param showLabel boolean
---@param showValue boolean
---@param showIcon boolean
---@return void
function Native.LeaderboardSetItemStyle(lb, item, showLabel, showValue, showIcon) end
---@param lb leaderboard
---@param item integer
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.LeaderboardSetItemLabelColor(lb, item, red, green, blue, alpha) end
---@param lb leaderboard
---@param item integer
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.LeaderboardSetItemValueColor(lb, item, red, green, blue, alpha) end
---@return multiboard
function Native.CreateMultiboard() end
---@param lb multiboard
---@return void
function Native.DestroyMultiboard(lb) end
---@param lb multiboard
---@param show boolean
---@return void
function Native.MultiboardDisplay(lb, show) end
---@param lb multiboard
---@return boolean
function Native.IsMultiboardDisplayed(lb) end
---@param lb multiboard
---@param minimize boolean
---@return void
function Native.MultiboardMinimize(lb, minimize) end
---@param lb multiboard
---@return boolean
function Native.IsMultiboardMinimized(lb) end
---@param lb multiboard
---@return void
function Native.MultiboardClear(lb) end
---@param lb multiboard
---@param label string
---@return void
function Native.MultiboardSetTitleText(lb, label) end
---@param lb multiboard
---@return string
function Native.MultiboardGetTitleText(lb) end
---@param lb multiboard
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.MultiboardSetTitleTextColor(lb, red, green, blue, alpha) end
---@param lb multiboard
---@return integer
function Native.MultiboardGetRowCount(lb) end
---@param lb multiboard
---@return integer
function Native.MultiboardGetColumnCount(lb) end
---@param lb multiboard
---@param count integer
---@return void
function Native.MultiboardSetColumnCount(lb, count) end
---@param lb multiboard
---@param count integer
---@return void
function Native.MultiboardSetRowCount(lb, count) end
---@param lb multiboard
---@param showValues boolean
---@param showIcons boolean
---@return void
function Native.MultiboardSetItemsStyle(lb, showValues, showIcons) end
---@param lb multiboard
---@param value string
---@return void
function Native.MultiboardSetItemsValue(lb, value) end
---@param lb multiboard
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.MultiboardSetItemsValueColor(lb, red, green, blue, alpha) end
---@param lb multiboard
---@param width float
---@return void
function Native.MultiboardSetItemsWidth(lb, width) end
---@param lb multiboard
---@param iconPath string
---@return void
function Native.MultiboardSetItemsIcon(lb, iconPath) end
---@param lb multiboard
---@param row integer
---@param column integer
---@return multiboarditem
function Native.MultiboardGetItem(lb, row, column) end
---@param mbi multiboarditem
---@return void
function Native.MultiboardReleaseItem(mbi) end
---@param mbi multiboarditem
---@param showValue boolean
---@param showIcon boolean
---@return void
function Native.MultiboardSetItemStyle(mbi, showValue, showIcon) end
---@param mbi multiboarditem
---@param val string
---@return void
function Native.MultiboardSetItemValue(mbi, val) end
---@param mbi multiboarditem
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.MultiboardSetItemValueColor(mbi, red, green, blue, alpha) end
---@param mbi multiboarditem
---@param width float
---@return void
function Native.MultiboardSetItemWidth(mbi, width) end
---@param mbi multiboarditem
---@param iconFileName string
---@return void
function Native.MultiboardSetItemIcon(mbi, iconFileName) end
---@param flag boolean
---@return void
function Native.MultiboardSuppressDisplay(flag) end
---@param x float
---@param y float
---@return void
function Native.SetCameraPosition(x, y) end
---@param x float
---@param y float
---@return void
function Native.SetCameraQuickPosition(x, y) end
---@param x1 float
---@param y1 float
---@param x2 float
---@param y2 float
---@param x3 float
---@param y3 float
---@param x4 float
---@param y4 float
---@return void
function Native.SetCameraBounds(x1, y1, x2, y2, x3, y3, x4, y4) end
---@return void
function Native.StopCamera() end
---@param duration float
---@return void
function Native.ResetToGameCamera(duration) end
---@param x float
---@param y float
---@return void
function Native.PanCameraTo(x, y) end
---@param x float
---@param y float
---@param duration float
---@return void
function Native.PanCameraToTimed(x, y, duration) end
---@param x float
---@param y float
---@param zOffsetDest float
---@return void
function Native.PanCameraToWithZ(x, y, zOffsetDest) end
---@param x float
---@param y float
---@param zOffsetDest float
---@param duration float
---@return void
function Native.PanCameraToTimedWithZ(x, y, zOffsetDest, duration) end
---@param cameraModelFile string
---@return void
function Native.SetCinematicCamera(cameraModelFile) end
---@param x float
---@param y float
---@param radiansToSweep float
---@param duration float
---@return void
function Native.SetCameraRotateMode(x, y, radiansToSweep, duration) end
---@param field camerafield
---@param value float
---@param duration float
---@return void
function Native.SetCameraField(field, value, duration) end
---@param field camerafield
---@param offset float
---@param duration float
---@return void
function Native.AdjustCameraField(field, offset, duration) end
---@param unit unit
---@param xoffset float
---@param yoffset float
---@param inheritOrientation boolean
---@return void
function Native.SetCameraTargetController(unit, xoffset, yoffset, inheritOrientation) end
---@param unit unit
---@param xoffset float
---@param yoffset float
---@return void
function Native.SetCameraOrientController(unit, xoffset, yoffset) end
---@return camerasetup
function Native.CreateCameraSetup() end
---@param setup camerasetup
---@param field camerafield
---@param value float
---@param duration float
---@return void
function Native.CameraSetupSetField(setup, field, value, duration) end
---@param setup camerasetup
---@param field camerafield
---@return float
function Native.CameraSetupGetField(setup, field) end
---@param setup camerasetup
---@param x float
---@param y float
---@param duration float
---@return void
function Native.CameraSetupSetDestPosition(setup, x, y, duration) end
---@param setup camerasetup
---@return location
function Native.CameraSetupGetDestPositionLoc(setup) end
---@param setup camerasetup
---@return float
function Native.CameraSetupGetDestPositionX(setup) end
---@param setup camerasetup
---@return float
function Native.CameraSetupGetDestPositionY(setup) end
---@param setup camerasetup
---@param doPan boolean
---@param panTimed boolean
---@return void
function Native.CameraSetupApply(setup, doPan, panTimed) end
---@param setup camerasetup
---@param zDestOffset float
---@return void
function Native.CameraSetupApplyWithZ(setup, zDestOffset) end
---@param setup camerasetup
---@param doPan boolean
---@param forceDuration float
---@return void
function Native.CameraSetupApplyForceDuration(setup, doPan, forceDuration) end
---@param setup camerasetup
---@param zDestOffset float
---@param forceDuration float
---@return void
function Native.CameraSetupApplyForceDurationWithZ(setup, zDestOffset, forceDuration) end
---@param setup camerasetup
---@param label string
---@return void
function Native.BlzCameraSetupSetLabel(setup, label) end
---@param setup camerasetup
---@return string
function Native.BlzCameraSetupGetLabel(setup) end
---@param mag float
---@param velocity float
---@return void
function Native.CameraSetTargetNoise(mag, velocity) end
---@param mag float
---@param velocity float
---@return void
function Native.CameraSetSourceNoise(mag, velocity) end
---@param mag float
---@param velocity float
---@param vertOnly boolean
---@return void
function Native.CameraSetTargetNoiseEx(mag, velocity, vertOnly) end
---@param mag float
---@param velocity float
---@param vertOnly boolean
---@return void
function Native.CameraSetSourceNoiseEx(mag, velocity, vertOnly) end
---@param factor float
---@return void
function Native.CameraSetSmoothingFactor(factor) end
---@param distance float
---@return void
function Native.CameraSetFocalDistance(distance) end
---@param scale float
---@return void
function Native.CameraSetDepthOfFieldScale(scale) end
---@param filename string
---@return void
function Native.SetCineFilterTexture(filename) end
---@param mode blendmode
---@return void
function Native.SetCineFilterBlendMode(mode) end
---@param flags texmapflags
---@return void
function Native.SetCineFilterTexMapFlags(flags) end
---@param minu float
---@param minv float
---@param maxu float
---@param maxv float
---@return void
function Native.SetCineFilterStartUV(minu, minv, maxu, maxv) end
---@param minu float
---@param minv float
---@param maxu float
---@param maxv float
---@return void
function Native.SetCineFilterEndUV(minu, minv, maxu, maxv) end
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.SetCineFilterStartColor(red, green, blue, alpha) end
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.SetCineFilterEndColor(red, green, blue, alpha) end
---@param duration float
---@return void
function Native.SetCineFilterDuration(duration) end
---@param flag boolean
---@return void
function Native.DisplayCineFilter(flag) end
---@return boolean
function Native.IsCineFilterDisplayed() end
---@param portraitUnitId integer
---@param color playercolor
---@param speakerTitle string
---@param text string
---@param sceneDuration float
---@param voiceoverDuration float
---@return void
function Native.SetCinematicScene(portraitUnitId, color, speakerTitle, text, sceneDuration, voiceoverDuration) end
---@return void
function Native.EndCinematicScene() end
---@param flag boolean
---@return void
function Native.ForceCinematicSubtitles(flag) end
---@param cinematicAudio boolean
---@return void
function Native.SetCinematicAudio(cinematicAudio) end
---@param margin integer
---@return float
function Native.GetCameraMargin(margin) end
---@return float
function Native.GetCameraBoundMinX() end
---@return float
function Native.GetCameraBoundMinY() end
---@return float
function Native.GetCameraBoundMaxX() end
---@return float
function Native.GetCameraBoundMaxY() end
---@param field camerafield
---@return float
function Native.GetCameraField(field) end
---@return float
function Native.GetCameraTargetPositionX() end
---@return float
function Native.GetCameraTargetPositionY() end
---@return float
function Native.GetCameraTargetPositionZ() end
---@return location
function Native.GetCameraTargetPositionLoc() end
---@return float
function Native.GetCameraEyePositionX() end
---@return float
function Native.GetCameraEyePositionY() end
---@return float
function Native.GetCameraEyePositionZ() end
---@return location
function Native.GetCameraEyePositionLoc() end
---@param environmentName string
---@return void
function Native.NewSoundEnvironment(environmentName) end
---@param fileName string
---@param looping boolean
---@param is3D boolean
---@param stopwhenoutofrange boolean
---@param fadeInRate integer
---@param fadeOutRate integer
---@param eaxSetting string
---@return sound
function Native.CreateSound(fileName, looping, is3D, stopwhenoutofrange, fadeInRate, fadeOutRate, eaxSetting) end
---@param fileName string
---@param looping boolean
---@param is3D boolean
---@param stopwhenoutofrange boolean
---@param fadeInRate integer
---@param fadeOutRate integer
---@param SLKEntryName string
---@return sound
function Native.CreateSoundFilenameWithLabel(fileName, looping, is3D, stopwhenoutofrange, fadeInRate, fadeOutRate, SLKEntryName) end
---@param soundLabel string
---@param looping boolean
---@param is3D boolean
---@param stopwhenoutofrange boolean
---@param fadeInRate integer
---@param fadeOutRate integer
---@return sound
function Native.CreateSoundFromLabel(soundLabel, looping, is3D, stopwhenoutofrange, fadeInRate, fadeOutRate) end
---@param soundLabel string
---@param fadeInRate integer
---@param fadeOutRate integer
---@return sound
function Native.CreateMIDISound(soundLabel, fadeInRate, fadeOutRate) end
---@param soundHandle sound
---@param soundLabel string
---@return void
function Native.SetSoundParamsFromLabel(soundHandle, soundLabel) end
---@param soundHandle sound
---@param cutoff float
---@return void
function Native.SetSoundDistanceCutoff(soundHandle, cutoff) end
---@param soundHandle sound
---@param channel integer
---@return void
function Native.SetSoundChannel(soundHandle, channel) end
---@param soundHandle sound
---@param volume integer
---@return void
function Native.SetSoundVolume(soundHandle, volume) end
---@param soundHandle sound
---@param pitch float
---@return void
function Native.SetSoundPitch(soundHandle, pitch) end
---@param soundHandle sound
---@param millisecs integer
---@return void
function Native.SetSoundPlayPosition(soundHandle, millisecs) end
---@param soundHandle sound
---@param minDist float
---@param maxDist float
---@return void
function Native.SetSoundDistances(soundHandle, minDist, maxDist) end
---@param soundHandle sound
---@param inside float
---@param outside float
---@param outsideVolume integer
---@return void
function Native.SetSoundConeAngles(soundHandle, inside, outside, outsideVolume) end
---@param soundHandle sound
---@param x float
---@param y float
---@param z float
---@return void
function Native.SetSoundConeOrientation(soundHandle, x, y, z) end
---@param soundHandle sound
---@param x float
---@param y float
---@param z float
---@return void
function Native.SetSoundPosition(soundHandle, x, y, z) end
---@param soundHandle sound
---@param x float
---@param y float
---@param z float
---@return void
function Native.SetSoundVelocity(soundHandle, x, y, z) end
---@param soundHandle sound
---@param unit unit
---@return void
function Native.AttachSoundToUnit(soundHandle, unit) end
---@param soundHandle sound
---@return void
function Native.StartSound(soundHandle) end
---@param soundHandle sound
---@param killWhenDone boolean
---@param fadeOut boolean
---@return void
function Native.StopSound(soundHandle, killWhenDone, fadeOut) end
---@param soundHandle sound
---@return void
function Native.KillSoundWhenDone(soundHandle) end
---@param musicName string
---@param random boolean
---@param index integer
---@return void
function Native.SetMapMusic(musicName, random, index) end
---@return void
function Native.ClearMapMusic() end
---@param musicName string
---@return void
function Native.PlayMusic(musicName) end
---@param musicName string
---@param frommsecs integer
---@param fadeinmsecs integer
---@return void
function Native.PlayMusicEx(musicName, frommsecs, fadeinmsecs) end
---@param fadeOut boolean
---@return void
function Native.StopMusic(fadeOut) end
---@return void
function Native.ResumeMusic() end
---@param musicFileName string
---@return void
function Native.PlayThematicMusic(musicFileName) end
---@param musicFileName string
---@param frommsecs integer
---@return void
function Native.PlayThematicMusicEx(musicFileName, frommsecs) end
---@return void
function Native.EndThematicMusic() end
---@param volume integer
---@return void
function Native.SetMusicVolume(volume) end
---@param millisecs integer
---@return void
function Native.SetMusicPlayPosition(millisecs) end
---@param volume integer
---@return void
function Native.SetThematicMusicVolume(volume) end
---@param millisecs integer
---@return void
function Native.SetThematicMusicPlayPosition(millisecs) end
---@param soundHandle sound
---@param duration integer
---@return void
function Native.SetSoundDuration(soundHandle, duration) end
---@param soundHandle sound
---@return integer
function Native.GetSoundDuration(soundHandle) end
---@param musicFileName string
---@return integer
function Native.GetSoundFileDuration(musicFileName) end
---@param vgroup volumegroup
---@param scale float
---@return void
function Native.VolumeGroupSetVolume(vgroup, scale) end
---@return void
function Native.VolumeGroupReset() end
---@param soundHandle sound
---@return boolean
function Native.GetSoundIsPlaying(soundHandle) end
---@param soundHandle sound
---@return boolean
function Native.GetSoundIsLoading(soundHandle) end
---@param soundHandle sound
---@param byPosition boolean
---@param rectwidth float
---@param rectheight float
---@return void
function Native.RegisterStackedSound(soundHandle, byPosition, rectwidth, rectheight) end
---@param soundHandle sound
---@param byPosition boolean
---@param rectwidth float
---@param rectheight float
---@return void
function Native.UnregisterStackedSound(soundHandle, byPosition, rectwidth, rectheight) end
---@param soundHandle sound
---@param animationLabel string
---@return boolean
function Native.SetSoundFacialAnimationLabel(soundHandle, animationLabel) end
---@param soundHandle sound
---@param groupLabel string
---@return boolean
function Native.SetSoundFacialAnimationGroupLabel(soundHandle, groupLabel) end
---@param soundHandle sound
---@param animationSetFilepath string
---@return boolean
function Native.SetSoundFacialAnimationSetFilepath(soundHandle, animationSetFilepath) end
---@param soundHandle sound
---@param speakerName string
---@return boolean
function Native.SetDialogueSpeakerNameKey(soundHandle, speakerName) end
---@param soundHandle sound
---@return string
function Native.GetDialogueSpeakerNameKey(soundHandle) end
---@param soundHandle sound
---@param dialogueText string
---@return boolean
function Native.SetDialogueTextKey(soundHandle, dialogueText) end
---@param soundHandle sound
---@return string
function Native.GetDialogueTextKey(soundHandle) end
---@param where rect
---@param effectID integer
---@return weathereffect
function Native.AddWeatherEffect(where, effectID) end
---@param effect weathereffect
---@return void
function Native.RemoveWeatherEffect(effect) end
---@param effect weathereffect
---@param enable boolean
---@return void
function Native.EnableWeatherEffect(effect, enable) end
---@param x float
---@param y float
---@param radius float
---@param depth float
---@param duration integer
---@param permanent boolean
---@return terraindeformation
function Native.TerrainDeformCrater(x, y, radius, depth, duration, permanent) end
---@param x float
---@param y float
---@param radius float
---@param depth float
---@param duration integer
---@param count integer
---@param spaceWaves float
---@param timeWaves float
---@param radiusStartPct float
---@param limitNeg boolean
---@return terraindeformation
function Native.TerrainDeformRipple(x, y, radius, depth, duration, count, spaceWaves, timeWaves, radiusStartPct, limitNeg) end
---@param x float
---@param y float
---@param dirX float
---@param dirY float
---@param distance float
---@param speed float
---@param radius float
---@param depth float
---@param trailTime integer
---@param count integer
---@return terraindeformation
function Native.TerrainDeformWave(x, y, dirX, dirY, distance, speed, radius, depth, trailTime, count) end
---@param x float
---@param y float
---@param radius float
---@param minDelta float
---@param maxDelta float
---@param duration integer
---@param updateInterval integer
---@return terraindeformation
function Native.TerrainDeformRandom(x, y, radius, minDelta, maxDelta, duration, updateInterval) end
---@param deformation terraindeformation
---@param duration integer
---@return void
function Native.TerrainDeformStop(deformation, duration) end
---@return void
function Native.TerrainDeformStopAll() end
---@param modelName string
---@param x float
---@param y float
---@return effect
function Native.AddSpecialEffect(modelName, x, y) end
---@param modelName string
---@param where location
---@return effect
function Native.AddSpecialEffectLoc(modelName, where) end
---@param modelName string
---@param targetWidget widget
---@param attachPointName string
---@return effect
function Native.AddSpecialEffectTarget(modelName, targetWidget, attachPointName) end
---@param effect effect
---@return void
function Native.DestroyEffect(effect) end
---@param abilityString string
---@param t effecttype
---@param x float
---@param y float
---@return effect
function Native.AddSpellEffect(abilityString, t, x, y) end
---@param abilityString string
---@param t effecttype
---@param where location
---@return effect
function Native.AddSpellEffectLoc(abilityString, t, where) end
---@param abilityId integer
---@param t effecttype
---@param x float
---@param y float
---@return effect
function Native.AddSpellEffectById(abilityId, t, x, y) end
---@param abilityId integer
---@param t effecttype
---@param where location
---@return effect
function Native.AddSpellEffectByIdLoc(abilityId, t, where) end
---@param modelName string
---@param t effecttype
---@param targetWidget widget
---@param attachPoint string
---@return effect
function Native.AddSpellEffectTarget(modelName, t, targetWidget, attachPoint) end
---@param abilityId integer
---@param t effecttype
---@param targetWidget widget
---@param attachPoint string
---@return effect
function Native.AddSpellEffectTargetById(abilityId, t, targetWidget, attachPoint) end
---@param codeName string
---@param checkVisibility boolean
---@param x1 float
---@param y1 float
---@param x2 float
---@param y2 float
---@return lightning
function Native.AddLightning(codeName, checkVisibility, x1, y1, x2, y2) end
---@param codeName string
---@param checkVisibility boolean
---@param x1 float
---@param y1 float
---@param z1 float
---@param x2 float
---@param y2 float
---@param z2 float
---@return lightning
function Native.AddLightningEx(codeName, checkVisibility, x1, y1, z1, x2, y2, z2) end
---@param bolt lightning
---@return boolean
function Native.DestroyLightning(bolt) end
---@param bolt lightning
---@param checkVisibility boolean
---@param x1 float
---@param y1 float
---@param x2 float
---@param y2 float
---@return boolean
function Native.MoveLightning(bolt, checkVisibility, x1, y1, x2, y2) end
---@param bolt lightning
---@param checkVisibility boolean
---@param x1 float
---@param y1 float
---@param z1 float
---@param x2 float
---@param y2 float
---@param z2 float
---@return boolean
function Native.MoveLightningEx(bolt, checkVisibility, x1, y1, z1, x2, y2, z2) end
---@param bolt lightning
---@return float
function Native.GetLightningColorA(bolt) end
---@param bolt lightning
---@return float
function Native.GetLightningColorR(bolt) end
---@param bolt lightning
---@return float
function Native.GetLightningColorG(bolt) end
---@param bolt lightning
---@return float
function Native.GetLightningColorB(bolt) end
---@param bolt lightning
---@param r float
---@param g float
---@param b float
---@param a float
---@return boolean
function Native.SetLightningColor(bolt, r, g, b, a) end
---@param abilityString string
---@param t effecttype
---@param index integer
---@return string
function Native.GetAbilityEffect(abilityString, t, index) end
---@param abilityId integer
---@param t effecttype
---@param index integer
---@return string
function Native.GetAbilityEffectById(abilityId, t, index) end
---@param abilityString string
---@param t soundtype
---@return string
function Native.GetAbilitySound(abilityString, t) end
---@param abilityId integer
---@param t soundtype
---@return string
function Native.GetAbilitySoundById(abilityId, t) end
---@param x float
---@param y float
---@return integer
function Native.GetTerrainCliffLevel(x, y) end
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.SetWaterBaseColor(red, green, blue, alpha) end
---@param val boolean
---@return void
function Native.SetWaterDeforms(val) end
---@param x float
---@param y float
---@return integer
function Native.GetTerrainType(x, y) end
---@param x float
---@param y float
---@return integer
function Native.GetTerrainVariance(x, y) end
---@param x float
---@param y float
---@param terrainType integer
---@param variation integer
---@param area integer
---@param shape integer
---@return void
function Native.SetTerrainType(x, y, terrainType, variation, area, shape) end
---@param x float
---@param y float
---@param t pathingtype
---@return boolean
function Native.IsTerrainPathable(x, y, t) end
---@param x float
---@param y float
---@param t pathingtype
---@param flag boolean
---@return void
function Native.SetTerrainPathable(x, y, t, flag) end
---@param file string
---@param sizeX float
---@param sizeY float
---@param sizeZ float
---@param posX float
---@param posY float
---@param posZ float
---@param originX float
---@param originY float
---@param originZ float
---@param imageType integer
---@return image
function Native.CreateImage(file, sizeX, sizeY, sizeZ, posX, posY, posZ, originX, originY, originZ, imageType) end
---@param image image
---@return void
function Native.DestroyImage(image) end
---@param image image
---@param flag boolean
---@return void
function Native.ShowImage(image, flag) end
---@param image image
---@param flag boolean
---@param height float
---@return void
function Native.SetImageConstantHeight(image, flag, height) end
---@param image image
---@param x float
---@param y float
---@param z float
---@return void
function Native.SetImagePosition(image, x, y, z) end
---@param image image
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@return void
function Native.SetImageColor(image, red, green, blue, alpha) end
---@param image image
---@param flag boolean
---@return void
function Native.SetImageRender(image, flag) end
---@param image image
---@param flag boolean
---@return void
function Native.SetImageRenderAlways(image, flag) end
---@param image image
---@param flag boolean
---@param useWaterAlpha boolean
---@return void
function Native.SetImageAboveWater(image, flag, useWaterAlpha) end
---@param image image
---@param imageType integer
---@return void
function Native.SetImageType(image, imageType) end
---@param x float
---@param y float
---@param name string
---@param red integer
---@param green integer
---@param blue integer
---@param alpha integer
---@param forcePaused boolean
---@param noBirthTime boolean
---@return ubersplat
function Native.CreateUbersplat(x, y, name, red, green, blue, alpha, forcePaused, noBirthTime) end
---@param splat ubersplat
---@return void
function Native.DestroyUbersplat(splat) end
---@param splat ubersplat
---@return void
function Native.ResetUbersplat(splat) end
---@param splat ubersplat
---@return void
function Native.FinishUbersplat(splat) end
---@param splat ubersplat
---@param flag boolean
---@return void
function Native.ShowUbersplat(splat, flag) end
---@param splat ubersplat
---@param flag boolean
---@return void
function Native.SetUbersplatRender(splat, flag) end
---@param splat ubersplat
---@param flag boolean
---@return void
function Native.SetUbersplatRenderAlways(splat, flag) end
---@param player player
---@param x float
---@param y float
---@param radius float
---@param addBlight boolean
---@return void
function Native.SetBlight(player, x, y, radius, addBlight) end
---@param player player
---@param r rect
---@param addBlight boolean
---@return void
function Native.SetBlightRect(player, r, addBlight) end
---@param player player
---@param x float
---@param y float
---@param addBlight boolean
---@return void
function Native.SetBlightPoint(player, x, y, addBlight) end
---@param player player
---@param loc location
---@param radius float
---@param addBlight boolean
---@return void
function Native.SetBlightLoc(player, loc, radius, addBlight) end
---@param id player
---@param x float
---@param y float
---@param face float
---@return unit
function Native.CreateBlightedGoldmine(id, x, y, face) end
---@param x float
---@param y float
---@return boolean
function Native.IsPointBlighted(x, y) end
---@param x float
---@param y float
---@param radius float
---@param doodadID integer
---@param nearestOnly boolean
---@param animName string
---@param animRandom boolean
---@return void
function Native.SetDoodadAnimation(x, y, radius, doodadID, nearestOnly, animName, animRandom) end
---@param r rect
---@param doodadID integer
---@param animName string
---@param animRandom boolean
---@return void
function Native.SetDoodadAnimationRect(r, doodadID, animName, animRandom) end
---@param num player
---@param script string
---@return void
function Native.StartMeleeAI(num, script) end
---@param num player
---@param script string
---@return void
function Native.StartCampaignAI(num, script) end
---@param num player
---@param command integer
---@param data integer
---@return void
function Native.CommandAI(num, command, data) end
---@param p player
---@param pause boolean
---@return void
function Native.PauseCompAI(p, pause) end
---@param num player
---@return aidifficulty
function Native.GetAIDifficulty(num) end
---@param hUnit unit
---@return void
function Native.RemoveGuardPosition(hUnit) end
---@param hUnit unit
---@return void
function Native.RecycleGuardPosition(hUnit) end
---@param num player
---@return void
function Native.RemoveAllGuardPositions(num) end
---@param cheatStr string
---@return void
function Native.Cheat(cheatStr) end
---@return boolean
function Native.IsNoVictoryCheat() end
---@return boolean
function Native.IsNoDefeatCheat() end
---@param filename string
---@return void
function Native.Preload(filename) end
---@param timeout float
---@return void
function Native.PreloadEnd(timeout) end
---@return void
function Native.PreloadStart() end
---@return void
function Native.PreloadRefresh() end
---@return void
function Native.PreloadEndEx() end
---@return void
function Native.PreloadGenClear() end
---@return void
function Native.PreloadGenStart() end
---@param filename string
---@return void
function Native.PreloadGenEnd(filename) end
---@param filename string
---@return void
function Native.Preloader(filename) end
---@param enable boolean
---@return void
function Native.BlzHideCinematicPanels(enable) end
---@param testType string
---@return void
function Native.AutomationSetTestType(testType) end
---@param testName string
---@return void
function Native.AutomationTestStart(testName) end
---@return void
function Native.AutomationTestEnd() end
---@return void
function Native.AutomationTestingFinished() end
---@return float
function Native.BlzGetTriggerPlayerMouseX() end
---@return float
function Native.BlzGetTriggerPlayerMouseY() end
---@return location
function Native.BlzGetTriggerPlayerMousePosition() end
---@return mousebuttontype
function Native.BlzGetTriggerPlayerMouseButton() end
---@param abilCode integer
---@param tooltip string
---@param level integer
---@return void
function Native.BlzSetAbilityTooltip(abilCode, tooltip, level) end
---@param abilCode integer
---@param tooltip string
---@param level integer
---@return void
function Native.BlzSetAbilityActivatedTooltip(abilCode, tooltip, level) end
---@param abilCode integer
---@param extendedTooltip string
---@param level integer
---@return void
function Native.BlzSetAbilityExtendedTooltip(abilCode, extendedTooltip, level) end
---@param abilCode integer
---@param extendedTooltip string
---@param level integer
---@return void
function Native.BlzSetAbilityActivatedExtendedTooltip(abilCode, extendedTooltip, level) end
---@param abilCode integer
---@param researchTooltip string
---@param level integer
---@return void
function Native.BlzSetAbilityResearchTooltip(abilCode, researchTooltip, level) end
---@param abilCode integer
---@param researchExtendedTooltip string
---@param level integer
---@return void
function Native.BlzSetAbilityResearchExtendedTooltip(abilCode, researchExtendedTooltip, level) end
---@param abilCode integer
---@param level integer
---@return string
function Native.BlzGetAbilityTooltip(abilCode, level) end
---@param abilCode integer
---@param level integer
---@return string
function Native.BlzGetAbilityActivatedTooltip(abilCode, level) end
---@param abilCode integer
---@param level integer
---@return string
function Native.BlzGetAbilityExtendedTooltip(abilCode, level) end
---@param abilCode integer
---@param level integer
---@return string
function Native.BlzGetAbilityActivatedExtendedTooltip(abilCode, level) end
---@param abilCode integer
---@param level integer
---@return string
function Native.BlzGetAbilityResearchTooltip(abilCode, level) end
---@param abilCode integer
---@param level integer
---@return string
function Native.BlzGetAbilityResearchExtendedTooltip(abilCode, level) end
---@param abilCode integer
---@param iconPath string
---@return void
function Native.BlzSetAbilityIcon(abilCode, iconPath) end
---@param abilCode integer
---@return string
function Native.BlzGetAbilityIcon(abilCode) end
---@param abilCode integer
---@param iconPath string
---@return void
function Native.BlzSetAbilityActivatedIcon(abilCode, iconPath) end
---@param abilCode integer
---@return string
function Native.BlzGetAbilityActivatedIcon(abilCode) end
---@param abilCode integer
---@return integer
function Native.BlzGetAbilityPosX(abilCode) end
---@param abilCode integer
---@return integer
function Native.BlzGetAbilityPosY(abilCode) end
---@param abilCode integer
---@param x integer
---@return void
function Native.BlzSetAbilityPosX(abilCode, x) end
---@param abilCode integer
---@param y integer
---@return void
function Native.BlzSetAbilityPosY(abilCode, y) end
---@param abilCode integer
---@return integer
function Native.BlzGetAbilityActivatedPosX(abilCode) end
---@param abilCode integer
---@return integer
function Native.BlzGetAbilityActivatedPosY(abilCode) end
---@param abilCode integer
---@param x integer
---@return void
function Native.BlzSetAbilityActivatedPosX(abilCode, x) end
---@param abilCode integer
---@param y integer
---@return void
function Native.BlzSetAbilityActivatedPosY(abilCode, y) end
---@param unit unit
---@return integer
function Native.BlzGetUnitMaxHP(unit) end
---@param unit unit
---@param hp integer
---@return void
function Native.BlzSetUnitMaxHP(unit, hp) end
---@param unit unit
---@return integer
function Native.BlzGetUnitMaxMana(unit) end
---@param unit unit
---@param mana integer
---@return void
function Native.BlzSetUnitMaxMana(unit, mana) end
---@param item item
---@param name string
---@return void
function Native.BlzSetItemName(item, name) end
---@param item item
---@param description string
---@return void
function Native.BlzSetItemDescription(item, description) end
---@param item item
---@return string
function Native.BlzGetItemDescription(item) end
---@param item item
---@param tooltip string
---@return void
function Native.BlzSetItemTooltip(item, tooltip) end
---@param item item
---@return string
function Native.BlzGetItemTooltip(item) end
---@param item item
---@param extendedTooltip string
---@return void
function Native.BlzSetItemExtendedTooltip(item, extendedTooltip) end
---@param item item
---@return string
function Native.BlzGetItemExtendedTooltip(item) end
---@param item item
---@param iconPath string
---@return void
function Native.BlzSetItemIconPath(item, iconPath) end
---@param item item
---@return string
function Native.BlzGetItemIconPath(item) end
---@param unit unit
---@param name string
---@return void
function Native.BlzSetUnitName(unit, name) end
---@param unit unit
---@param heroProperName string
---@return void
function Native.BlzSetHeroProperName(unit, heroProperName) end
---@param unit unit
---@param weaponIndex integer
---@return integer
function Native.BlzGetUnitBaseDamage(unit, weaponIndex) end
---@param unit unit
---@param baseDamage integer
---@param weaponIndex integer
---@return void
function Native.BlzSetUnitBaseDamage(unit, baseDamage, weaponIndex) end
---@param unit unit
---@param weaponIndex integer
---@return integer
function Native.BlzGetUnitDiceNumber(unit, weaponIndex) end
---@param unit unit
---@param diceNumber integer
---@param weaponIndex integer
---@return void
function Native.BlzSetUnitDiceNumber(unit, diceNumber, weaponIndex) end
---@param unit unit
---@param weaponIndex integer
---@return integer
function Native.BlzGetUnitDiceSides(unit, weaponIndex) end
---@param unit unit
---@param diceSides integer
---@param weaponIndex integer
---@return void
function Native.BlzSetUnitDiceSides(unit, diceSides, weaponIndex) end
---@param unit unit
---@param weaponIndex integer
---@return float
function Native.BlzGetUnitAttackCooldown(unit, weaponIndex) end
---@param unit unit
---@param cooldown float
---@param weaponIndex integer
---@return void
function Native.BlzSetUnitAttackCooldown(unit, cooldown, weaponIndex) end
---@param effect effect
---@param player player
---@return void
function Native.BlzSetSpecialEffectColorByPlayer(effect, player) end
---@param effect effect
---@param r integer
---@param g integer
---@param b integer
---@return void
function Native.BlzSetSpecialEffectColor(effect, r, g, b) end
---@param effect effect
---@param alpha integer
---@return void
function Native.BlzSetSpecialEffectAlpha(effect, alpha) end
---@param effect effect
---@param scale float
---@return void
function Native.BlzSetSpecialEffectScale(effect, scale) end
---@param effect effect
---@param x float
---@param y float
---@param z float
---@return void
function Native.BlzSetSpecialEffectPosition(effect, x, y, z) end
---@param effect effect
---@param height float
---@return void
function Native.BlzSetSpecialEffectHeight(effect, height) end
---@param effect effect
---@param timeScale float
---@return void
function Native.BlzSetSpecialEffectTimeScale(effect, timeScale) end
---@param effect effect
---@param time float
---@return void
function Native.BlzSetSpecialEffectTime(effect, time) end
---@param effect effect
---@param yaw float
---@param pitch float
---@param roll float
---@return void
function Native.BlzSetSpecialEffectOrientation(effect, yaw, pitch, roll) end
---@param effect effect
---@param yaw float
---@return void
function Native.BlzSetSpecialEffectYaw(effect, yaw) end
---@param effect effect
---@param pitch float
---@return void
function Native.BlzSetSpecialEffectPitch(effect, pitch) end
---@param effect effect
---@param roll float
---@return void
function Native.BlzSetSpecialEffectRoll(effect, roll) end
---@param effect effect
---@param x float
---@return void
function Native.BlzSetSpecialEffectX(effect, x) end
---@param effect effect
---@param y float
---@return void
function Native.BlzSetSpecialEffectY(effect, y) end
---@param effect effect
---@param z float
---@return void
function Native.BlzSetSpecialEffectZ(effect, z) end
---@param effect effect
---@param loc location
---@return void
function Native.BlzSetSpecialEffectPositionLoc(effect, loc) end
---@param effect effect
---@return float
function Native.BlzGetLocalSpecialEffectX(effect) end
---@param effect effect
---@return float
function Native.BlzGetLocalSpecialEffectY(effect) end
---@param effect effect
---@return float
function Native.BlzGetLocalSpecialEffectZ(effect) end
---@param effect effect
---@return void
function Native.BlzSpecialEffectClearSubAnimations(effect) end
---@param effect effect
---@param subAnim subanimtype
---@return void
function Native.BlzSpecialEffectRemoveSubAnimation(effect, subAnim) end
---@param effect effect
---@param subAnim subanimtype
---@return void
function Native.BlzSpecialEffectAddSubAnimation(effect, subAnim) end
---@param effect effect
---@param anim animtype
---@return void
function Native.BlzPlaySpecialEffect(effect, anim) end
---@param effect effect
---@param anim animtype
---@param timeScale float
---@return void
function Native.BlzPlaySpecialEffectWithTimeScale(effect, anim, timeScale) end
---@param anim animtype
---@return string
function Native.BlzGetAnimName(anim) end
---@param unit unit
---@return float
function Native.BlzGetUnitArmor(unit) end
---@param unit unit
---@param armorAmount float
---@return void
function Native.BlzSetUnitArmor(unit, armorAmount) end
---@param unit unit
---@param abilId integer
---@param flag boolean
---@return void
function Native.BlzUnitHideAbility(unit, abilId, flag) end
---@param unit unit
---@param abilId integer
---@param flag boolean
---@param hideUI boolean
---@return void
function Native.BlzUnitDisableAbility(unit, abilId, flag, hideUI) end
---@param unit unit
---@return void
function Native.BlzUnitCancelTimedLife(unit) end
---@param unit unit
---@return boolean
function Native.BlzIsUnitSelectable(unit) end
---@param unit unit
---@return boolean
function Native.BlzIsUnitInvulnerable(unit) end
---@param unit unit
---@return void
function Native.BlzUnitInterruptAttack(unit) end
---@param unit unit
---@return float
function Native.BlzGetUnitCollisionSize(unit) end
---@param abilId integer
---@param level integer
---@return integer
function Native.BlzGetAbilityManaCost(abilId, level) end
---@param abilId integer
---@param level integer
---@return float
function Native.BlzGetAbilityCooldown(abilId, level) end
---@param unit unit
---@param abilId integer
---@param level integer
---@param cooldown float
---@return void
function Native.BlzSetUnitAbilityCooldown(unit, abilId, level, cooldown) end
---@param unit unit
---@param abilId integer
---@param level integer
---@return float
function Native.BlzGetUnitAbilityCooldown(unit, abilId, level) end
---@param unit unit
---@param abilId integer
---@return float
function Native.BlzGetUnitAbilityCooldownRemaining(unit, abilId) end
---@param unit unit
---@param abilCode integer
---@return void
function Native.BlzEndUnitAbilityCooldown(unit, abilCode) end
---@param unit unit
---@param abilCode integer
---@param cooldown float
---@return void
function Native.BlzStartUnitAbilityCooldown(unit, abilCode, cooldown) end
---@param unit unit
---@param abilId integer
---@param level integer
---@return integer
function Native.BlzGetUnitAbilityManaCost(unit, abilId, level) end
---@param unit unit
---@param abilId integer
---@param level integer
---@param manaCost integer
---@return void
function Native.BlzSetUnitAbilityManaCost(unit, abilId, level, manaCost) end
---@param unit unit
---@return float
function Native.BlzGetLocalUnitZ(unit) end
---@param player player
---@param techid integer
---@param levels integer
---@return void
function Native.BlzDecPlayerTechResearched(player, techid, levels) end
---@param damage float
---@return void
function Native.BlzSetEventDamage(damage) end
---@return unit
function Native.BlzGetEventDamageTarget() end
---@return attacktype
function Native.BlzGetEventAttackType() end
---@return damagetype
function Native.BlzGetEventDamageType() end
---@return weapontype
function Native.BlzGetEventWeaponType() end
---@param attackType attacktype
---@return boolean
function Native.BlzSetEventAttackType(attackType) end
---@param damageType damagetype
---@return boolean
function Native.BlzSetEventDamageType(damageType) end
---@param weaponType weapontype
---@return boolean
function Native.BlzSetEventWeaponType(weaponType) end
---@return boolean
function Native.BlzGetEventIsAttack() end
---@param dataType integer
---@param player player
---@param param1 string
---@param param2 string
---@param param3 boolean
---@param param4 integer
---@param param5 integer
---@param param6 integer
---@return integer
function Native.RequestExtraIntegerData(dataType, player, param1, param2, param3, param4, param5, param6) end
---@param dataType integer
---@param player player
---@param param1 string
---@param param2 string
---@param param3 boolean
---@param param4 integer
---@param param5 integer
---@param param6 integer
---@return boolean
function Native.RequestExtraBooleanData(dataType, player, param1, param2, param3, param4, param5, param6) end
---@param dataType integer
---@param player player
---@param param1 string
---@param param2 string
---@param param3 boolean
---@param param4 integer
---@param param5 integer
---@param param6 integer
---@return string
function Native.RequestExtraStringData(dataType, player, param1, param2, param3, param4, param5, param6) end
---@param dataType integer
---@param player player
---@param param1 string
---@param param2 string
---@param param3 boolean
---@param param4 integer
---@param param5 integer
---@param param6 integer
---@return float
function Native.RequestExtraRealData(dataType, player, param1, param2, param3, param4, param5, param6) end
---@param unit unit
---@return float
function Native.BlzGetUnitZ(unit) end
---@param enableSelection boolean
---@param enableSelectionCircle boolean
---@return void
function Native.BlzEnableSelections(enableSelection, enableSelectionCircle) end
---@return boolean
function Native.BlzIsSelectionEnabled() end
---@return boolean
function Native.BlzIsSelectionCircleEnabled() end
---@param setup camerasetup
---@param doPan boolean
---@param forcedDuration float
---@param easeInDuration float
---@param easeOutDuration float
---@param smoothFactor float
---@return void
function Native.BlzCameraSetupApplyForceDurationSmooth(setup, doPan, forcedDuration, easeInDuration, easeOutDuration, smoothFactor) end
---@param enable boolean
---@return void
function Native.BlzEnableTargetIndicator(enable) end
---@return boolean
function Native.BlzIsTargetIndicatorEnabled() end
---@param show boolean
---@return void
function Native.BlzShowTerrain(show) end
---@param show boolean
---@return void
function Native.BlzShowSkyBox(show) end
---@param fps integer
---@return void
function Native.BlzStartRecording(fps) end
---@return void
function Native.BlzEndRecording() end
---@param unit unit
---@param show boolean
---@return void
function Native.BlzShowUnitTeamGlow(unit, show) end
---@param frameType originframetype
---@param index integer
---@return framehandle
function Native.BlzGetOriginFrame(frameType, index) end
---@param enable boolean
---@return void
function Native.BlzEnableUIAutoPosition(enable) end
---@param enable boolean
---@return void
function Native.BlzHideOriginFrames(enable) end
---@param a integer
---@param r integer
---@param g integer
---@param b integer
---@return integer
function Native.BlzConvertColor(a, r, g, b) end
---@param TOCFile string
---@return boolean
function Native.BlzLoadTOCFile(TOCFile) end
---@param name string
---@param owner framehandle
---@param priority integer
---@param createContext integer
---@return framehandle
function Native.BlzCreateFrame(name, owner, priority, createContext) end
---@param name string
---@param owner framehandle
---@param createContext integer
---@return framehandle
function Native.BlzCreateSimpleFrame(name, owner, createContext) end
---@param typeName string
---@param name string
---@param owner framehandle
---@param inherits string
---@param createContext integer
---@return framehandle
function Native.BlzCreateFrameByType(typeName, name, owner, inherits, createContext) end
---@param frame framehandle
---@return void
function Native.BlzDestroyFrame(frame) end
---@param frame framehandle
---@param point framepointtype
---@param relative framehandle
---@param relativePoint framepointtype
---@param x float
---@param y float
---@return void
function Native.BlzFrameSetPoint(frame, point, relative, relativePoint, x, y) end
---@param frame framehandle
---@param point framepointtype
---@param x float
---@param y float
---@return void
function Native.BlzFrameSetAbsPoint(frame, point, x, y) end
---@param frame framehandle
---@return void
function Native.BlzFrameClearAllPoints(frame) end
---@param frame framehandle
---@param relative framehandle
---@return void
function Native.BlzFrameSetAllPoints(frame, relative) end
---@param frame framehandle
---@param visible boolean
---@return void
function Native.BlzFrameSetVisible(frame, visible) end
---@param frame framehandle
---@return boolean
function Native.BlzFrameIsVisible(frame) end
---@param name string
---@param createContext integer
---@return framehandle
function Native.BlzGetFrameByName(name, createContext) end
---@param frame framehandle
---@return string
function Native.BlzFrameGetName(frame) end
---@param frame framehandle
---@return void
function Native.BlzFrameClick(frame) end
---@param frame framehandle
---@param text string
---@return void
function Native.BlzFrameSetText(frame, text) end
---@param frame framehandle
---@return string
function Native.BlzFrameGetText(frame) end
---@param frame framehandle
---@param text string
---@return void
function Native.BlzFrameAddText(frame, text) end
---@param frame framehandle
---@param size integer
---@return void
function Native.BlzFrameSetTextSizeLimit(frame, size) end
---@param frame framehandle
---@return integer
function Native.BlzFrameGetTextSizeLimit(frame) end
---@param frame framehandle
---@param color integer
---@return void
function Native.BlzFrameSetTextColor(frame, color) end
---@param frame framehandle
---@param flag boolean
---@return void
function Native.BlzFrameSetFocus(frame, flag) end
---@param frame framehandle
---@param modelFile string
---@param cameraIndex integer
---@return void
function Native.BlzFrameSetModel(frame, modelFile, cameraIndex) end
---@param frame framehandle
---@param enabled boolean
---@return void
function Native.BlzFrameSetEnable(frame, enabled) end
---@param frame framehandle
---@return boolean
function Native.BlzFrameGetEnable(frame) end
---@param frame framehandle
---@param alpha integer
---@return void
function Native.BlzFrameSetAlpha(frame, alpha) end
---@param frame framehandle
---@return integer
function Native.BlzFrameGetAlpha(frame) end
---@param frame framehandle
---@param primaryProp integer
---@param flags integer
---@return void
function Native.BlzFrameSetSpriteAnimate(frame, primaryProp, flags) end
---@param frame framehandle
---@param texFile string
---@param flag integer
---@param blend boolean
---@return void
function Native.BlzFrameSetTexture(frame, texFile, flag, blend) end
---@param frame framehandle
---@param scale float
---@return void
function Native.BlzFrameSetScale(frame, scale) end
---@param frame framehandle
---@param tooltip framehandle
---@return void
function Native.BlzFrameSetTooltip(frame, tooltip) end
---@param frame framehandle
---@param enable boolean
---@return void
function Native.BlzFrameCageMouse(frame, enable) end
---@param frame framehandle
---@param value float
---@return void
function Native.BlzFrameSetValue(frame, value) end
---@param frame framehandle
---@return float
function Native.BlzFrameGetValue(frame) end
---@param frame framehandle
---@param minValue float
---@param maxValue float
---@return void
function Native.BlzFrameSetMinMaxValue(frame, minValue, maxValue) end
---@param frame framehandle
---@param stepSize float
---@return void
function Native.BlzFrameSetStepSize(frame, stepSize) end
---@param frame framehandle
---@param width float
---@param height float
---@return void
function Native.BlzFrameSetSize(frame, width, height) end
---@param frame framehandle
---@param color integer
---@return void
function Native.BlzFrameSetVertexColor(frame, color) end
---@param frame framehandle
---@param level integer
---@return void
function Native.BlzFrameSetLevel(frame, level) end
---@param frame framehandle
---@param parent framehandle
---@return void
function Native.BlzFrameSetParent(frame, parent) end
---@param frame framehandle
---@return framehandle
function Native.BlzFrameGetParent(frame) end
---@param frame framehandle
---@return float
function Native.BlzFrameGetHeight(frame) end
---@param frame framehandle
---@return float
function Native.BlzFrameGetWidth(frame) end
---@param frame framehandle
---@param fileName string
---@param height float
---@param flags integer
---@return void
function Native.BlzFrameSetFont(frame, fileName, height, flags) end
---@param frame framehandle
---@param vert textaligntype
---@param horz textaligntype
---@return void
function Native.BlzFrameSetTextAlignment(frame, vert, horz) end
---@param frame framehandle
---@return integer
function Native.BlzFrameGetChildrenCount(frame) end
---@param frame framehandle
---@param index integer
---@return framehandle
function Native.BlzFrameGetChild(frame, index) end
---@param trigger trigger
---@param frame framehandle
---@param eventId frameeventtype
---@return event
function Native.BlzTriggerRegisterFrameEvent(trigger, frame, eventId) end
---@return framehandle
function Native.BlzGetTriggerFrame() end
---@return frameeventtype
function Native.BlzGetTriggerFrameEvent() end
---@return float
function Native.BlzGetTriggerFrameValue() end
---@return string
function Native.BlzGetTriggerFrameText() end
---@param trigger trigger
---@param player player
---@param prefix string
---@param fromServer boolean
---@return event
function Native.BlzTriggerRegisterPlayerSyncEvent(trigger, player, prefix, fromServer) end
---@param prefix string
---@param data string
---@return boolean
function Native.BlzSendSyncData(prefix, data) end
---@return string
function Native.BlzGetTriggerSyncPrefix() end
---@return string
function Native.BlzGetTriggerSyncData() end
---@param trigger trigger
---@param player player
---@param key oskeytype
---@param metaKey integer
---@param keyDown boolean
---@return event
function Native.BlzTriggerRegisterPlayerKeyEvent(trigger, player, key, metaKey, keyDown) end
---@return oskeytype
function Native.BlzGetTriggerPlayerKey() end
---@return integer
function Native.BlzGetTriggerPlayerMetaKey() end
---@return boolean
function Native.BlzGetTriggerPlayerIsKeyDown() end
---@param enable boolean
---@return void
function Native.BlzEnableCursor(enable) end
---@param x integer
---@param y integer
---@return void
function Native.BlzSetMousePos(x, y) end
---@return integer
function Native.BlzGetLocalClientWidth() end
---@return integer
function Native.BlzGetLocalClientHeight() end
---@return boolean
function Native.BlzIsLocalClientActive() end
---@return unit
function Native.BlzGetMouseFocusUnit() end
---@param texFile string
---@return boolean
function Native.BlzChangeMinimapTerrainTex(texFile) end
---@return string
function Native.BlzGetLocale() end
---@param effect effect
---@return float
function Native.BlzGetSpecialEffectScale(effect) end
---@param effect effect
---@param x float
---@param y float
---@param z float
---@return void
function Native.BlzSetSpecialEffectMatrixScale(effect, x, y, z) end
---@param effect effect
---@return void
function Native.BlzResetSpecialEffectMatrix(effect) end
---@param unit unit
---@param abilId integer
---@return ability
function Native.BlzGetUnitAbility(unit, abilId) end
---@param unit unit
---@param index integer
---@return ability
function Native.BlzGetUnitAbilityByIndex(unit, index) end
---@param player player
---@param recipient integer
---@param message string
---@return void
function Native.BlzDisplayChatMessage(player, recipient, message) end
---@param unit unit
---@param flag boolean
---@return void
function Native.BlzPauseUnitEx(unit, flag) end
---@param unit unit
---@param facingAngle float
---@return void
function Native.BlzSetUnitFacingEx(unit, facingAngle) end
---@param abilityId integer
---@param order string
---@return commandbuttoneffect
function Native.CreateCommandButtonEffect(abilityId, order) end
---@param uprgade integer
---@return commandbuttoneffect
function Native.CreateUpgradeCommandButtonEffect(uprgade) end
---@param abilityId integer
---@return commandbuttoneffect
function Native.CreateLearnCommandButtonEffect(abilityId) end
---@param effect commandbuttoneffect
---@return void
function Native.DestroyCommandButtonEffect(effect) end
---@param x integer
---@param y integer
---@return integer
function Native.BlzBitOr(x, y) end
---@param x integer
---@param y integer
---@return integer
function Native.BlzBitAnd(x, y) end
---@param x integer
---@param y integer
---@return integer
function Native.BlzBitXor(x, y) end
---@param ability ability
---@param field abilitybooleanfield
---@return boolean
function Native.BlzGetAbilityBooleanField(ability, field) end
---@param ability ability
---@param field abilityintegerfield
---@return integer
function Native.BlzGetAbilityIntegerField(ability, field) end
---@param ability ability
---@param field abilityrealfield
---@return float
function Native.BlzGetAbilityRealField(ability, field) end
---@param ability ability
---@param field abilitystringfield
---@return string
function Native.BlzGetAbilityStringField(ability, field) end
---@param ability ability
---@param field abilitybooleanlevelfield
---@param level integer
---@return boolean
function Native.BlzGetAbilityBooleanLevelField(ability, field, level) end
---@param ability ability
---@param field abilityintegerlevelfield
---@param level integer
---@return integer
function Native.BlzGetAbilityIntegerLevelField(ability, field, level) end
---@param ability ability
---@param field abilityreallevelfield
---@param level integer
---@return float
function Native.BlzGetAbilityRealLevelField(ability, field, level) end
---@param ability ability
---@param field abilitystringlevelfield
---@param level integer
---@return string
function Native.BlzGetAbilityStringLevelField(ability, field, level) end
---@param ability ability
---@param field abilitybooleanlevelarrayfield
---@param level integer
---@param index integer
---@return boolean
function Native.BlzGetAbilityBooleanLevelArrayField(ability, field, level, index) end
---@param ability ability
---@param field abilityintegerlevelarrayfield
---@param level integer
---@param index integer
---@return integer
function Native.BlzGetAbilityIntegerLevelArrayField(ability, field, level, index) end
---@param ability ability
---@param field abilityreallevelarrayfield
---@param level integer
---@param index integer
---@return float
function Native.BlzGetAbilityRealLevelArrayField(ability, field, level, index) end
---@param ability ability
---@param field abilitystringlevelarrayfield
---@param level integer
---@param index integer
---@return string
function Native.BlzGetAbilityStringLevelArrayField(ability, field, level, index) end
---@param ability ability
---@param field abilitybooleanfield
---@param value boolean
---@return boolean
function Native.BlzSetAbilityBooleanField(ability, field, value) end
---@param ability ability
---@param field abilityintegerfield
---@param value integer
---@return boolean
function Native.BlzSetAbilityIntegerField(ability, field, value) end
---@param ability ability
---@param field abilityrealfield
---@param value float
---@return boolean
function Native.BlzSetAbilityRealField(ability, field, value) end
---@param ability ability
---@param field abilitystringfield
---@param value string
---@return boolean
function Native.BlzSetAbilityStringField(ability, field, value) end
---@param ability ability
---@param field abilitybooleanlevelfield
---@param level integer
---@param value boolean
---@return boolean
function Native.BlzSetAbilityBooleanLevelField(ability, field, level, value) end
---@param ability ability
---@param field abilityintegerlevelfield
---@param level integer
---@param value integer
---@return boolean
function Native.BlzSetAbilityIntegerLevelField(ability, field, level, value) end
---@param ability ability
---@param field abilityreallevelfield
---@param level integer
---@param value float
---@return boolean
function Native.BlzSetAbilityRealLevelField(ability, field, level, value) end
---@param ability ability
---@param field abilitystringlevelfield
---@param level integer
---@param value string
---@return boolean
function Native.BlzSetAbilityStringLevelField(ability, field, level, value) end
---@param ability ability
---@param field abilitybooleanlevelarrayfield
---@param level integer
---@param index integer
---@param value boolean
---@return boolean
function Native.BlzSetAbilityBooleanLevelArrayField(ability, field, level, index, value) end
---@param ability ability
---@param field abilityintegerlevelarrayfield
---@param level integer
---@param index integer
---@param value integer
---@return boolean
function Native.BlzSetAbilityIntegerLevelArrayField(ability, field, level, index, value) end
---@param ability ability
---@param field abilityreallevelarrayfield
---@param level integer
---@param index integer
---@param value float
---@return boolean
function Native.BlzSetAbilityRealLevelArrayField(ability, field, level, index, value) end
---@param ability ability
---@param field abilitystringlevelarrayfield
---@param level integer
---@param index integer
---@param value string
---@return boolean
function Native.BlzSetAbilityStringLevelArrayField(ability, field, level, index, value) end
---@param ability ability
---@param field abilitybooleanlevelarrayfield
---@param level integer
---@param value boolean
---@return boolean
function Native.BlzAddAbilityBooleanLevelArrayField(ability, field, level, value) end
---@param ability ability
---@param field abilityintegerlevelarrayfield
---@param level integer
---@param value integer
---@return boolean
function Native.BlzAddAbilityIntegerLevelArrayField(ability, field, level, value) end
---@param ability ability
---@param field abilityreallevelarrayfield
---@param level integer
---@param value float
---@return boolean
function Native.BlzAddAbilityRealLevelArrayField(ability, field, level, value) end
---@param ability ability
---@param field abilitystringlevelarrayfield
---@param level integer
---@param value string
---@return boolean
function Native.BlzAddAbilityStringLevelArrayField(ability, field, level, value) end
---@param ability ability
---@param field abilitybooleanlevelarrayfield
---@param level integer
---@param value boolean
---@return boolean
function Native.BlzRemoveAbilityBooleanLevelArrayField(ability, field, level, value) end
---@param ability ability
---@param field abilityintegerlevelarrayfield
---@param level integer
---@param value integer
---@return boolean
function Native.BlzRemoveAbilityIntegerLevelArrayField(ability, field, level, value) end
---@param ability ability
---@param field abilityreallevelarrayfield
---@param level integer
---@param value float
---@return boolean
function Native.BlzRemoveAbilityRealLevelArrayField(ability, field, level, value) end
---@param ability ability
---@param field abilitystringlevelarrayfield
---@param level integer
---@param value string
---@return boolean
function Native.BlzRemoveAbilityStringLevelArrayField(ability, field, level, value) end
---@param item item
---@param index integer
---@return ability
function Native.BlzGetItemAbilityByIndex(item, index) end
---@param item item
---@param abilCode integer
---@return ability
function Native.BlzGetItemAbility(item, abilCode) end
---@param item item
---@param abilCode integer
---@return boolean
function Native.BlzItemAddAbility(item, abilCode) end
---@param item item
---@param field itembooleanfield
---@return boolean
function Native.BlzGetItemBooleanField(item, field) end
---@param item item
---@param field itemintegerfield
---@return integer
function Native.BlzGetItemIntegerField(item, field) end
---@param item item
---@param field itemrealfield
---@return float
function Native.BlzGetItemRealField(item, field) end
---@param item item
---@param field itemstringfield
---@return string
function Native.BlzGetItemStringField(item, field) end
---@param item item
---@param field itembooleanfield
---@param value boolean
---@return boolean
function Native.BlzSetItemBooleanField(item, field, value) end
---@param item item
---@param field itemintegerfield
---@param value integer
---@return boolean
function Native.BlzSetItemIntegerField(item, field, value) end
---@param item item
---@param field itemrealfield
---@param value float
---@return boolean
function Native.BlzSetItemRealField(item, field, value) end
---@param item item
---@param field itemstringfield
---@param value string
---@return boolean
function Native.BlzSetItemStringField(item, field, value) end
---@param item item
---@param abilCode integer
---@return boolean
function Native.BlzItemRemoveAbility(item, abilCode) end
---@param unit unit
---@param field unitbooleanfield
---@return boolean
function Native.BlzGetUnitBooleanField(unit, field) end
---@param unit unit
---@param field unitintegerfield
---@return integer
function Native.BlzGetUnitIntegerField(unit, field) end
---@param unit unit
---@param field unitrealfield
---@return float
function Native.BlzGetUnitRealField(unit, field) end
---@param unit unit
---@param field unitstringfield
---@return string
function Native.BlzGetUnitStringField(unit, field) end
---@param unit unit
---@param field unitbooleanfield
---@param value boolean
---@return boolean
function Native.BlzSetUnitBooleanField(unit, field, value) end
---@param unit unit
---@param field unitintegerfield
---@param value integer
---@return boolean
function Native.BlzSetUnitIntegerField(unit, field, value) end
---@param unit unit
---@param field unitrealfield
---@param value float
---@return boolean
function Native.BlzSetUnitRealField(unit, field, value) end
---@param unit unit
---@param field unitstringfield
---@param value string
---@return boolean
function Native.BlzSetUnitStringField(unit, field, value) end
---@param unit unit
---@param field unitweaponbooleanfield
---@param index integer
---@return boolean
function Native.BlzGetUnitWeaponBooleanField(unit, field, index) end
---@param unit unit
---@param field unitweaponintegerfield
---@param index integer
---@return integer
function Native.BlzGetUnitWeaponIntegerField(unit, field, index) end
---@param unit unit
---@param field unitweaponrealfield
---@param index integer
---@return float
function Native.BlzGetUnitWeaponRealField(unit, field, index) end
---@param unit unit
---@param field unitweaponstringfield
---@param index integer
---@return string
function Native.BlzGetUnitWeaponStringField(unit, field, index) end
---@param unit unit
---@param field unitweaponbooleanfield
---@param index integer
---@param value boolean
---@return boolean
function Native.BlzSetUnitWeaponBooleanField(unit, field, index, value) end
---@param unit unit
---@param field unitweaponintegerfield
---@param index integer
---@param value integer
---@return boolean
function Native.BlzSetUnitWeaponIntegerField(unit, field, index, value) end
---@param unit unit
---@param field unitweaponrealfield
---@param index integer
---@param value float
---@return boolean
function Native.BlzSetUnitWeaponRealField(unit, field, index, value) end
---@param unit unit
---@param field unitweaponstringfield
---@param index integer
---@param value string
---@return boolean
function Native.BlzSetUnitWeaponStringField(unit, field, index, value) end
---@param unit unit
---@return integer
function Native.BlzGetUnitSkin(unit) end
---@param item item
---@return integer
function Native.BlzGetItemSkin(item) end
---@param unit unit
---@param skinId integer
---@return void
function Native.BlzSetUnitSkin(unit, skinId) end
---@param item item
---@param skinId integer
---@return void
function Native.BlzSetItemSkin(item, skinId) end
---@param itemid integer
---@param x float
---@param y float
---@param skinId integer
---@return item
function Native.BlzCreateItemWithSkin(itemid, x, y, skinId) end
---@param id player
---@param unitid integer
---@param x float
---@param y float
---@param face float
---@param skinId integer
---@return unit
function Native.BlzCreateUnitWithSkin(id, unitid, x, y, face, skinId) end
---@param objectid integer
---@param x float
---@param y float
---@param face float
---@param scale float
---@param variation integer
---@param skinId integer
---@return destructable
function Native.BlzCreateDestructableWithSkin(objectid, x, y, face, scale, variation, skinId) end
---@param objectid integer
---@param x float
---@param y float
---@param z float
---@param face float
---@param scale float
---@param variation integer
---@param skinId integer
---@return destructable
function Native.BlzCreateDestructableZWithSkin(objectid, x, y, z, face, scale, variation, skinId) end
---@param objectid integer
---@param x float
---@param y float
---@param face float
---@param scale float
---@param variation integer
---@param skinId integer
---@return destructable
function Native.BlzCreateDeadDestructableWithSkin(objectid, x, y, face, scale, variation, skinId) end
---@param objectid integer
---@param x float
---@param y float
---@param z float
---@param face float
---@param scale float
---@param variation integer
---@param skinId integer
---@return destructable
function Native.BlzCreateDeadDestructableZWithSkin(objectid, x, y, z, face, scale, variation, skinId) end
---@param player player
---@return integer
function Native.BlzGetPlayerTownHallCount(player) end
---@type boolean
Native.FALSE = nil
---@type boolean
Native.TRUE = nil
---@type integer
Native.JASS_MAX_ARRAY_SIZE = nil
---@type integer
Native.PLAYER_NEUTRAL_PASSIVE = nil
---@type integer
Native.PLAYER_NEUTRAL_AGGRESSIVE = nil
---@type playercolor
Native.PLAYER_COLOR_RED = nil
---@type playercolor
Native.PLAYER_COLOR_BLUE = nil
---@type playercolor
Native.PLAYER_COLOR_CYAN = nil
---@type playercolor
Native.PLAYER_COLOR_PURPLE = nil
---@type playercolor
Native.PLAYER_COLOR_YELLOW = nil
---@type playercolor
Native.PLAYER_COLOR_ORANGE = nil
---@type playercolor
Native.PLAYER_COLOR_GREEN = nil
---@type playercolor
Native.PLAYER_COLOR_PINK = nil
---@type playercolor
Native.PLAYER_COLOR_LIGHT_GRAY = nil
---@type playercolor
Native.PLAYER_COLOR_LIGHT_BLUE = nil
---@type playercolor
Native.PLAYER_COLOR_AQUA = nil
---@type playercolor
Native.PLAYER_COLOR_BROWN = nil
---@type playercolor
Native.PLAYER_COLOR_MAROON = nil
---@type playercolor
Native.PLAYER_COLOR_NAVY = nil
---@type playercolor
Native.PLAYER_COLOR_TURQUOISE = nil
---@type playercolor
Native.PLAYER_COLOR_VIOLET = nil
---@type playercolor
Native.PLAYER_COLOR_WHEAT = nil
---@type playercolor
Native.PLAYER_COLOR_PEACH = nil
---@type playercolor
Native.PLAYER_COLOR_MINT = nil
---@type playercolor
Native.PLAYER_COLOR_LAVENDER = nil
---@type playercolor
Native.PLAYER_COLOR_COAL = nil
---@type playercolor
Native.PLAYER_COLOR_SNOW = nil
---@type playercolor
Native.PLAYER_COLOR_EMERALD = nil
---@type playercolor
Native.PLAYER_COLOR_PEANUT = nil
---@type race
Native.RACE_HUMAN = nil
---@type race
Native.RACE_ORC = nil
---@type race
Native.RACE_UNDEAD = nil
---@type race
Native.RACE_NIGHTELF = nil
---@type race
Native.RACE_DEMON = nil
---@type race
Native.RACE_OTHER = nil
---@type playergameresult
Native.PLAYER_GAME_RESULT_VICTORY = nil
---@type playergameresult
Native.PLAYER_GAME_RESULT_DEFEAT = nil
---@type playergameresult
Native.PLAYER_GAME_RESULT_TIE = nil
---@type playergameresult
Native.PLAYER_GAME_RESULT_NEUTRAL = nil
---@type alliancetype
Native.ALLIANCE_PASSIVE = nil
---@type alliancetype
Native.ALLIANCE_HELP_REQUEST = nil
---@type alliancetype
Native.ALLIANCE_HELP_RESPONSE = nil
---@type alliancetype
Native.ALLIANCE_SHARED_XP = nil
---@type alliancetype
Native.ALLIANCE_SHARED_SPELLS = nil
---@type alliancetype
Native.ALLIANCE_SHARED_VISION = nil
---@type alliancetype
Native.ALLIANCE_SHARED_CONTROL = nil
---@type alliancetype
Native.ALLIANCE_SHARED_ADVANCED_CONTROL = nil
---@type alliancetype
Native.ALLIANCE_RESCUABLE = nil
---@type alliancetype
Native.ALLIANCE_SHARED_VISION_FORCED = nil
---@type version
Native.VERSION_REIGN_OF_CHAOS = nil
---@type version
Native.VERSION_FROZEN_THRONE = nil
---@type attacktype
Native.ATTACK_TYPE_NORMAL = nil
---@type attacktype
Native.ATTACK_TYPE_MELEE = nil
---@type attacktype
Native.ATTACK_TYPE_PIERCE = nil
---@type attacktype
Native.ATTACK_TYPE_SIEGE = nil
---@type attacktype
Native.ATTACK_TYPE_MAGIC = nil
---@type attacktype
Native.ATTACK_TYPE_CHAOS = nil
---@type attacktype
Native.ATTACK_TYPE_HERO = nil
---@type damagetype
Native.DAMAGE_TYPE_UNKNOWN = nil
---@type damagetype
Native.DAMAGE_TYPE_NORMAL = nil
---@type damagetype
Native.DAMAGE_TYPE_ENHANCED = nil
---@type damagetype
Native.DAMAGE_TYPE_FIRE = nil
---@type damagetype
Native.DAMAGE_TYPE_COLD = nil
---@type damagetype
Native.DAMAGE_TYPE_LIGHTNING = nil
---@type damagetype
Native.DAMAGE_TYPE_POISON = nil
---@type damagetype
Native.DAMAGE_TYPE_DISEASE = nil
---@type damagetype
Native.DAMAGE_TYPE_DIVINE = nil
---@type damagetype
Native.DAMAGE_TYPE_MAGIC = nil
---@type damagetype
Native.DAMAGE_TYPE_SONIC = nil
---@type damagetype
Native.DAMAGE_TYPE_ACID = nil
---@type damagetype
Native.DAMAGE_TYPE_FORCE = nil
---@type damagetype
Native.DAMAGE_TYPE_DEATH = nil
---@type damagetype
Native.DAMAGE_TYPE_MIND = nil
---@type damagetype
Native.DAMAGE_TYPE_PLANT = nil
---@type damagetype
Native.DAMAGE_TYPE_DEFENSIVE = nil
---@type damagetype
Native.DAMAGE_TYPE_DEMOLITION = nil
---@type damagetype
Native.DAMAGE_TYPE_SLOW_POISON = nil
---@type damagetype
Native.DAMAGE_TYPE_SPIRIT_LINK = nil
---@type damagetype
Native.DAMAGE_TYPE_SHADOW_STRIKE = nil
---@type damagetype
Native.DAMAGE_TYPE_UNIVERSAL = nil
---@type weapontype
Native.WEAPON_TYPE_WHOKNOWS = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_LIGHT_CHOP = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_MEDIUM_CHOP = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_HEAVY_CHOP = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_LIGHT_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_MEDIUM_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_HEAVY_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_MEDIUM_BASH = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_HEAVY_BASH = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_MEDIUM_STAB = nil
---@type weapontype
Native.WEAPON_TYPE_METAL_HEAVY_STAB = nil
---@type weapontype
Native.WEAPON_TYPE_WOOD_LIGHT_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_WOOD_MEDIUM_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_WOOD_HEAVY_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_WOOD_LIGHT_BASH = nil
---@type weapontype
Native.WEAPON_TYPE_WOOD_MEDIUM_BASH = nil
---@type weapontype
Native.WEAPON_TYPE_WOOD_HEAVY_BASH = nil
---@type weapontype
Native.WEAPON_TYPE_WOOD_LIGHT_STAB = nil
---@type weapontype
Native.WEAPON_TYPE_WOOD_MEDIUM_STAB = nil
---@type weapontype
Native.WEAPON_TYPE_CLAW_LIGHT_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_CLAW_MEDIUM_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_CLAW_HEAVY_SLICE = nil
---@type weapontype
Native.WEAPON_TYPE_AXE_MEDIUM_CHOP = nil
---@type weapontype
Native.WEAPON_TYPE_ROCK_HEAVY_BASH = nil
---@type pathingtype
Native.PATHING_TYPE_ANY = nil
---@type pathingtype
Native.PATHING_TYPE_WALKABILITY = nil
---@type pathingtype
Native.PATHING_TYPE_FLYABILITY = nil
---@type pathingtype
Native.PATHING_TYPE_BUILDABILITY = nil
---@type pathingtype
Native.PATHING_TYPE_PEONHARVESTPATHING = nil
---@type pathingtype
Native.PATHING_TYPE_BLIGHTPATHING = nil
---@type pathingtype
Native.PATHING_TYPE_FLOATABILITY = nil
---@type pathingtype
Native.PATHING_TYPE_AMPHIBIOUSPATHING = nil
---@type mousebuttontype
Native.MOUSE_BUTTON_TYPE_LEFT = nil
---@type mousebuttontype
Native.MOUSE_BUTTON_TYPE_MIDDLE = nil
---@type mousebuttontype
Native.MOUSE_BUTTON_TYPE_RIGHT = nil
---@type animtype
Native.ANIM_TYPE_BIRTH = nil
---@type animtype
Native.ANIM_TYPE_DEATH = nil
---@type animtype
Native.ANIM_TYPE_DECAY = nil
---@type animtype
Native.ANIM_TYPE_DISSIPATE = nil
---@type animtype
Native.ANIM_TYPE_STAND = nil
---@type animtype
Native.ANIM_TYPE_WALK = nil
---@type animtype
Native.ANIM_TYPE_ATTACK = nil
---@type animtype
Native.ANIM_TYPE_MORPH = nil
---@type animtype
Native.ANIM_TYPE_SLEEP = nil
---@type animtype
Native.ANIM_TYPE_SPELL = nil
---@type animtype
Native.ANIM_TYPE_PORTRAIT = nil
---@type subanimtype
Native.SUBANIM_TYPE_ROOTED = nil
---@type subanimtype
Native.SUBANIM_TYPE_ALTERNATE_EX = nil
---@type subanimtype
Native.SUBANIM_TYPE_LOOPING = nil
---@type subanimtype
Native.SUBANIM_TYPE_SLAM = nil
---@type subanimtype
Native.SUBANIM_TYPE_THROW = nil
---@type subanimtype
Native.SUBANIM_TYPE_SPIKED = nil
---@type subanimtype
Native.SUBANIM_TYPE_FAST = nil
---@type subanimtype
Native.SUBANIM_TYPE_SPIN = nil
---@type subanimtype
Native.SUBANIM_TYPE_READY = nil
---@type subanimtype
Native.SUBANIM_TYPE_CHANNEL = nil
---@type subanimtype
Native.SUBANIM_TYPE_DEFEND = nil
---@type subanimtype
Native.SUBANIM_TYPE_VICTORY = nil
---@type subanimtype
Native.SUBANIM_TYPE_TURN = nil
---@type subanimtype
Native.SUBANIM_TYPE_LEFT = nil
---@type subanimtype
Native.SUBANIM_TYPE_RIGHT = nil
---@type subanimtype
Native.SUBANIM_TYPE_FIRE = nil
---@type subanimtype
Native.SUBANIM_TYPE_FLESH = nil
---@type subanimtype
Native.SUBANIM_TYPE_HIT = nil
---@type subanimtype
Native.SUBANIM_TYPE_WOUNDED = nil
---@type subanimtype
Native.SUBANIM_TYPE_LIGHT = nil
---@type subanimtype
Native.SUBANIM_TYPE_MODERATE = nil
---@type subanimtype
Native.SUBANIM_TYPE_SEVERE = nil
---@type subanimtype
Native.SUBANIM_TYPE_CRITICAL = nil
---@type subanimtype
Native.SUBANIM_TYPE_COMPLETE = nil
---@type subanimtype
Native.SUBANIM_TYPE_GOLD = nil
---@type subanimtype
Native.SUBANIM_TYPE_LUMBER = nil
---@type subanimtype
Native.SUBANIM_TYPE_WORK = nil
---@type subanimtype
Native.SUBANIM_TYPE_TALK = nil
---@type subanimtype
Native.SUBANIM_TYPE_FIRST = nil
---@type subanimtype
Native.SUBANIM_TYPE_SECOND = nil
---@type subanimtype
Native.SUBANIM_TYPE_THIRD = nil
---@type subanimtype
Native.SUBANIM_TYPE_FOURTH = nil
---@type subanimtype
Native.SUBANIM_TYPE_FIFTH = nil
---@type subanimtype
Native.SUBANIM_TYPE_ONE = nil
---@type subanimtype
Native.SUBANIM_TYPE_TWO = nil
---@type subanimtype
Native.SUBANIM_TYPE_THREE = nil
---@type subanimtype
Native.SUBANIM_TYPE_FOUR = nil
---@type subanimtype
Native.SUBANIM_TYPE_FIVE = nil
---@type subanimtype
Native.SUBANIM_TYPE_SMALL = nil
---@type subanimtype
Native.SUBANIM_TYPE_MEDIUM = nil
---@type subanimtype
Native.SUBANIM_TYPE_LARGE = nil
---@type subanimtype
Native.SUBANIM_TYPE_UPGRADE = nil
---@type subanimtype
Native.SUBANIM_TYPE_DRAIN = nil
---@type subanimtype
Native.SUBANIM_TYPE_FILL = nil
---@type subanimtype
Native.SUBANIM_TYPE_CHAINLIGHTNING = nil
---@type subanimtype
Native.SUBANIM_TYPE_EATTREE = nil
---@type subanimtype
Native.SUBANIM_TYPE_PUKE = nil
---@type subanimtype
Native.SUBANIM_TYPE_FLAIL = nil
---@type subanimtype
Native.SUBANIM_TYPE_OFF = nil
---@type subanimtype
Native.SUBANIM_TYPE_SWIM = nil
---@type subanimtype
Native.SUBANIM_TYPE_ENTANGLE = nil
---@type subanimtype
Native.SUBANIM_TYPE_BERSERK = nil
---@type racepreference
Native.RACE_PREF_HUMAN = nil
---@type racepreference
Native.RACE_PREF_ORC = nil
---@type racepreference
Native.RACE_PREF_NIGHTELF = nil
---@type racepreference
Native.RACE_PREF_UNDEAD = nil
---@type racepreference
Native.RACE_PREF_DEMON = nil
---@type racepreference
Native.RACE_PREF_RANDOM = nil
---@type racepreference
Native.RACE_PREF_USER_SELECTABLE = nil
---@type mapcontrol
Native.MAP_CONTROL_USER = nil
---@type mapcontrol
Native.MAP_CONTROL_COMPUTER = nil
---@type mapcontrol
Native.MAP_CONTROL_RESCUABLE = nil
---@type mapcontrol
Native.MAP_CONTROL_NEUTRAL = nil
---@type mapcontrol
Native.MAP_CONTROL_CREEP = nil
---@type mapcontrol
Native.MAP_CONTROL_NONE = nil
---@type gametype
Native.GAME_TYPE_MELEE = nil
---@type gametype
Native.GAME_TYPE_FFA = nil
---@type gametype
Native.GAME_TYPE_USE_MAP_SETTINGS = nil
---@type gametype
Native.GAME_TYPE_BLIZ = nil
---@type gametype
Native.GAME_TYPE_ONE_ON_ONE = nil
---@type gametype
Native.GAME_TYPE_TWO_TEAM_PLAY = nil
---@type gametype
Native.GAME_TYPE_THREE_TEAM_PLAY = nil
---@type gametype
Native.GAME_TYPE_FOUR_TEAM_PLAY = nil
---@type mapflag
Native.MAP_FOG_HIDE_TERRAIN = nil
---@type mapflag
Native.MAP_FOG_MAP_EXPLORED = nil
---@type mapflag
Native.MAP_FOG_ALWAYS_VISIBLE = nil
---@type mapflag
Native.MAP_USE_HANDICAPS = nil
---@type mapflag
Native.MAP_OBSERVERS = nil
---@type mapflag
Native.MAP_OBSERVERS_ON_DEATH = nil
---@type mapflag
Native.MAP_FIXED_COLORS = nil
---@type mapflag
Native.MAP_LOCK_RESOURCE_TRADING = nil
---@type mapflag
Native.MAP_RESOURCE_TRADING_ALLIES_ONLY = nil
---@type mapflag
Native.MAP_LOCK_ALLIANCE_CHANGES = nil
---@type mapflag
Native.MAP_ALLIANCE_CHANGES_HIDDEN = nil
---@type mapflag
Native.MAP_CHEATS = nil
---@type mapflag
Native.MAP_CHEATS_HIDDEN = nil
---@type mapflag
Native.MAP_LOCK_SPEED = nil
---@type mapflag
Native.MAP_LOCK_RANDOM_SEED = nil
---@type mapflag
Native.MAP_SHARED_ADVANCED_CONTROL = nil
---@type mapflag
Native.MAP_RANDOM_HERO = nil
---@type mapflag
Native.MAP_RANDOM_RACES = nil
---@type mapflag
Native.MAP_RELOADED = nil
---@type placement
Native.MAP_PLACEMENT_RANDOM = nil
---@type placement
Native.MAP_PLACEMENT_FIXED = nil
---@type placement
Native.MAP_PLACEMENT_USE_MAP_SETTINGS = nil
---@type placement
Native.MAP_PLACEMENT_TEAMS_TOGETHER = nil
---@type startlocprio
Native.MAP_LOC_PRIO_LOW = nil
---@type startlocprio
Native.MAP_LOC_PRIO_HIGH = nil
---@type startlocprio
Native.MAP_LOC_PRIO_NOT = nil
---@type mapdensity
Native.MAP_DENSITY_NONE = nil
---@type mapdensity
Native.MAP_DENSITY_LIGHT = nil
---@type mapdensity
Native.MAP_DENSITY_MEDIUM = nil
---@type mapdensity
Native.MAP_DENSITY_HEAVY = nil
---@type gamedifficulty
Native.MAP_DIFFICULTY_EASY = nil
---@type gamedifficulty
Native.MAP_DIFFICULTY_NORMAL = nil
---@type gamedifficulty
Native.MAP_DIFFICULTY_HARD = nil
---@type gamedifficulty
Native.MAP_DIFFICULTY_INSANE = nil
---@type gamespeed
Native.MAP_SPEED_SLOWEST = nil
---@type gamespeed
Native.MAP_SPEED_SLOW = nil
---@type gamespeed
Native.MAP_SPEED_NORMAL = nil
---@type gamespeed
Native.MAP_SPEED_FAST = nil
---@type gamespeed
Native.MAP_SPEED_FASTEST = nil
---@type playerslotstate
Native.PLAYER_SLOT_STATE_EMPTY = nil
---@type playerslotstate
Native.PLAYER_SLOT_STATE_PLAYING = nil
---@type playerslotstate
Native.PLAYER_SLOT_STATE_LEFT = nil
---@type volumegroup
Native.SOUND_VOLUMEGROUP_UNITMOVEMENT = nil
---@type volumegroup
Native.SOUND_VOLUMEGROUP_UNITSOUNDS = nil
---@type volumegroup
Native.SOUND_VOLUMEGROUP_COMBAT = nil
---@type volumegroup
Native.SOUND_VOLUMEGROUP_SPELLS = nil
---@type volumegroup
Native.SOUND_VOLUMEGROUP_UI = nil
---@type volumegroup
Native.SOUND_VOLUMEGROUP_MUSIC = nil
---@type volumegroup
Native.SOUND_VOLUMEGROUP_AMBIENTSOUNDS = nil
---@type volumegroup
Native.SOUND_VOLUMEGROUP_FIRE = nil
---@type igamestate
Native.GAME_STATE_DIVINE_INTERVENTION = nil
---@type igamestate
Native.GAME_STATE_DISCONNECTED = nil
---@type fgamestate
Native.GAME_STATE_TIME_OF_DAY = nil
---@type playerstate
Native.PLAYER_STATE_GAME_RESULT = nil
---@type playerstate
Native.PLAYER_STATE_RESOURCE_GOLD = nil
---@type playerstate
Native.PLAYER_STATE_RESOURCE_LUMBER = nil
---@type playerstate
Native.PLAYER_STATE_RESOURCE_HERO_TOKENS = nil
---@type playerstate
Native.PLAYER_STATE_RESOURCE_FOOD_CAP = nil
---@type playerstate
Native.PLAYER_STATE_RESOURCE_FOOD_USED = nil
---@type playerstate
Native.PLAYER_STATE_FOOD_CAP_CEILING = nil
---@type playerstate
Native.PLAYER_STATE_GIVES_BOUNTY = nil
---@type playerstate
Native.PLAYER_STATE_ALLIED_VICTORY = nil
---@type playerstate
Native.PLAYER_STATE_PLACED = nil
---@type playerstate
Native.PLAYER_STATE_OBSERVER_ON_DEATH = nil
---@type playerstate
Native.PLAYER_STATE_OBSERVER = nil
---@type playerstate
Native.PLAYER_STATE_UNFOLLOWABLE = nil
---@type playerstate
Native.PLAYER_STATE_GOLD_UPKEEP_RATE = nil
---@type playerstate
Native.PLAYER_STATE_LUMBER_UPKEEP_RATE = nil
---@type playerstate
Native.PLAYER_STATE_GOLD_GATHERED = nil
---@type playerstate
Native.PLAYER_STATE_LUMBER_GATHERED = nil
---@type playerstate
Native.PLAYER_STATE_NO_CREEP_SLEEP = nil
---@type unitstate
Native.UNIT_STATE_LIFE = nil
---@type unitstate
Native.UNIT_STATE_MAX_LIFE = nil
---@type unitstate
Native.UNIT_STATE_MANA = nil
---@type unitstate
Native.UNIT_STATE_MAX_MANA = nil
---@type aidifficulty
Native.AI_DIFFICULTY_NEWBIE = nil
---@type aidifficulty
Native.AI_DIFFICULTY_NORMAL = nil
---@type aidifficulty
Native.AI_DIFFICULTY_INSANE = nil
---@type playerscore
Native.PLAYER_SCORE_UNITS_TRAINED = nil
---@type playerscore
Native.PLAYER_SCORE_UNITS_KILLED = nil
---@type playerscore
Native.PLAYER_SCORE_STRUCT_BUILT = nil
---@type playerscore
Native.PLAYER_SCORE_STRUCT_RAZED = nil
---@type playerscore
Native.PLAYER_SCORE_TECH_PERCENT = nil
---@type playerscore
Native.PLAYER_SCORE_FOOD_MAXPROD = nil
---@type playerscore
Native.PLAYER_SCORE_FOOD_MAXUSED = nil
---@type playerscore
Native.PLAYER_SCORE_HEROES_KILLED = nil
---@type playerscore
Native.PLAYER_SCORE_ITEMS_GAINED = nil
---@type playerscore
Native.PLAYER_SCORE_MERCS_HIRED = nil
---@type playerscore
Native.PLAYER_SCORE_GOLD_MINED_TOTAL = nil
---@type playerscore
Native.PLAYER_SCORE_GOLD_MINED_UPKEEP = nil
---@type playerscore
Native.PLAYER_SCORE_GOLD_LOST_UPKEEP = nil
---@type playerscore
Native.PLAYER_SCORE_GOLD_LOST_TAX = nil
---@type playerscore
Native.PLAYER_SCORE_GOLD_GIVEN = nil
---@type playerscore
Native.PLAYER_SCORE_GOLD_RECEIVED = nil
---@type playerscore
Native.PLAYER_SCORE_LUMBER_TOTAL = nil
---@type playerscore
Native.PLAYER_SCORE_LUMBER_LOST_UPKEEP = nil
---@type playerscore
Native.PLAYER_SCORE_LUMBER_LOST_TAX = nil
---@type playerscore
Native.PLAYER_SCORE_LUMBER_GIVEN = nil
---@type playerscore
Native.PLAYER_SCORE_LUMBER_RECEIVED = nil
---@type playerscore
Native.PLAYER_SCORE_UNIT_TOTAL = nil
---@type playerscore
Native.PLAYER_SCORE_HERO_TOTAL = nil
---@type playerscore
Native.PLAYER_SCORE_RESOURCE_TOTAL = nil
---@type playerscore
Native.PLAYER_SCORE_TOTAL = nil
---@type gameevent
Native.EVENT_GAME_VICTORY = nil
---@type gameevent
Native.EVENT_GAME_END_LEVEL = nil
---@type gameevent
Native.EVENT_GAME_VARIABLE_LIMIT = nil
---@type gameevent
Native.EVENT_GAME_STATE_LIMIT = nil
---@type gameevent
Native.EVENT_GAME_TIMER_EXPIRED = nil
---@type gameevent
Native.EVENT_GAME_ENTER_REGION = nil
---@type gameevent
Native.EVENT_GAME_LEAVE_REGION = nil
---@type gameevent
Native.EVENT_GAME_TRACKABLE_HIT = nil
---@type gameevent
Native.EVENT_GAME_TRACKABLE_TRACK = nil
---@type gameevent
Native.EVENT_GAME_SHOW_SKILL = nil
---@type gameevent
Native.EVENT_GAME_BUILD_SUBMENU = nil
---@type playerevent
Native.EVENT_PLAYER_STATE_LIMIT = nil
---@type playerevent
Native.EVENT_PLAYER_ALLIANCE_CHANGED = nil
---@type playerevent
Native.EVENT_PLAYER_DEFEAT = nil
---@type playerevent
Native.EVENT_PLAYER_VICTORY = nil
---@type playerevent
Native.EVENT_PLAYER_LEAVE = nil
---@type playerevent
Native.EVENT_PLAYER_CHAT = nil
---@type playerevent
Native.EVENT_PLAYER_END_CINEMATIC = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_ATTACKED = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_RESCUED = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_DEATH = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_DECAY = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_DETECTED = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_HIDDEN = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SELECTED = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_DESELECTED = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_CONSTRUCT_START = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_CONSTRUCT_FINISH = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_UPGRADE_START = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_UPGRADE_CANCEL = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_UPGRADE_FINISH = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_TRAIN_START = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_TRAIN_CANCEL = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_TRAIN_FINISH = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_RESEARCH_START = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_RESEARCH_CANCEL = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_RESEARCH_FINISH = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_ISSUED_ORDER = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER = nil
---@type playerunitevent
Native.EVENT_PLAYER_HERO_LEVEL = nil
---@type playerunitevent
Native.EVENT_PLAYER_HERO_SKILL = nil
---@type playerunitevent
Native.EVENT_PLAYER_HERO_REVIVABLE = nil
---@type playerunitevent
Native.EVENT_PLAYER_HERO_REVIVE_START = nil
---@type playerunitevent
Native.EVENT_PLAYER_HERO_REVIVE_CANCEL = nil
---@type playerunitevent
Native.EVENT_PLAYER_HERO_REVIVE_FINISH = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SUMMON = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_DROP_ITEM = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_PICKUP_ITEM = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_USE_ITEM = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_LOADED = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_DAMAGED = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_DAMAGING = nil
---@type unitevent
Native.EVENT_UNIT_DAMAGED = nil
---@type unitevent
Native.EVENT_UNIT_DAMAGING = nil
---@type unitevent
Native.EVENT_UNIT_DEATH = nil
---@type unitevent
Native.EVENT_UNIT_DECAY = nil
---@type unitevent
Native.EVENT_UNIT_DETECTED = nil
---@type unitevent
Native.EVENT_UNIT_HIDDEN = nil
---@type unitevent
Native.EVENT_UNIT_SELECTED = nil
---@type unitevent
Native.EVENT_UNIT_DESELECTED = nil
---@type unitevent
Native.EVENT_UNIT_STATE_LIMIT = nil
---@type unitevent
Native.EVENT_UNIT_ACQUIRED_TARGET = nil
---@type unitevent
Native.EVENT_UNIT_TARGET_IN_RANGE = nil
---@type unitevent
Native.EVENT_UNIT_ATTACKED = nil
---@type unitevent
Native.EVENT_UNIT_RESCUED = nil
---@type unitevent
Native.EVENT_UNIT_CONSTRUCT_CANCEL = nil
---@type unitevent
Native.EVENT_UNIT_CONSTRUCT_FINISH = nil
---@type unitevent
Native.EVENT_UNIT_UPGRADE_START = nil
---@type unitevent
Native.EVENT_UNIT_UPGRADE_CANCEL = nil
---@type unitevent
Native.EVENT_UNIT_UPGRADE_FINISH = nil
---@type unitevent
Native.EVENT_UNIT_TRAIN_START = nil
---@type unitevent
Native.EVENT_UNIT_TRAIN_CANCEL = nil
---@type unitevent
Native.EVENT_UNIT_TRAIN_FINISH = nil
---@type unitevent
Native.EVENT_UNIT_RESEARCH_START = nil
---@type unitevent
Native.EVENT_UNIT_RESEARCH_CANCEL = nil
---@type unitevent
Native.EVENT_UNIT_RESEARCH_FINISH = nil
---@type unitevent
Native.EVENT_UNIT_ISSUED_ORDER = nil
---@type unitevent
Native.EVENT_UNIT_ISSUED_POINT_ORDER = nil
---@type unitevent
Native.EVENT_UNIT_ISSUED_TARGET_ORDER = nil
---@type unitevent
Native.EVENT_UNIT_HERO_LEVEL = nil
---@type unitevent
Native.EVENT_UNIT_HERO_SKILL = nil
---@type unitevent
Native.EVENT_UNIT_HERO_REVIVABLE = nil
---@type unitevent
Native.EVENT_UNIT_HERO_REVIVE_START = nil
---@type unitevent
Native.EVENT_UNIT_HERO_REVIVE_CANCEL = nil
---@type unitevent
Native.EVENT_UNIT_HERO_REVIVE_FINISH = nil
---@type unitevent
Native.EVENT_UNIT_SUMMON = nil
---@type unitevent
Native.EVENT_UNIT_DROP_ITEM = nil
---@type unitevent
Native.EVENT_UNIT_PICKUP_ITEM = nil
---@type unitevent
Native.EVENT_UNIT_USE_ITEM = nil
---@type unitevent
Native.EVENT_UNIT_LOADED = nil
---@type widgetevent
Native.EVENT_WIDGET_DEATH = nil
---@type dialogevent
Native.EVENT_DIALOG_BUTTON_CLICK = nil
---@type dialogevent
Native.EVENT_DIALOG_CLICK = nil
---@type gameevent
Native.EVENT_GAME_LOADED = nil
---@type gameevent
Native.EVENT_GAME_TOURNAMENT_FINISH_SOON = nil
---@type gameevent
Native.EVENT_GAME_TOURNAMENT_FINISH_NOW = nil
---@type gameevent
Native.EVENT_GAME_SAVE = nil
---@type gameevent
Native.EVENT_GAME_CUSTOM_UI_FRAME = nil
---@type playerevent
Native.EVENT_PLAYER_ARROW_LEFT_DOWN = nil
---@type playerevent
Native.EVENT_PLAYER_ARROW_LEFT_UP = nil
---@type playerevent
Native.EVENT_PLAYER_ARROW_RIGHT_DOWN = nil
---@type playerevent
Native.EVENT_PLAYER_ARROW_RIGHT_UP = nil
---@type playerevent
Native.EVENT_PLAYER_ARROW_DOWN_DOWN = nil
---@type playerevent
Native.EVENT_PLAYER_ARROW_DOWN_UP = nil
---@type playerevent
Native.EVENT_PLAYER_ARROW_UP_DOWN = nil
---@type playerevent
Native.EVENT_PLAYER_ARROW_UP_UP = nil
---@type playerevent
Native.EVENT_PLAYER_MOUSE_DOWN = nil
---@type playerevent
Native.EVENT_PLAYER_MOUSE_UP = nil
---@type playerevent
Native.EVENT_PLAYER_MOUSE_MOVE = nil
---@type playerevent
Native.EVENT_PLAYER_SYNC_DATA = nil
---@type playerevent
Native.EVENT_PLAYER_KEY = nil
---@type playerevent
Native.EVENT_PLAYER_KEY_DOWN = nil
---@type playerevent
Native.EVENT_PLAYER_KEY_UP = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SELL = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_CHANGE_OWNER = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SELL_ITEM = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SPELL_CHANNEL = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SPELL_CAST = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SPELL_EFFECT = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SPELL_FINISH = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_SPELL_ENDCAST = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_PAWN_ITEM = nil
---@type playerunitevent
Native.EVENT_PLAYER_UNIT_STACK_ITEM = nil
---@type unitevent
Native.EVENT_UNIT_SELL = nil
---@type unitevent
Native.EVENT_UNIT_CHANGE_OWNER = nil
---@type unitevent
Native.EVENT_UNIT_SELL_ITEM = nil
---@type unitevent
Native.EVENT_UNIT_SPELL_CHANNEL = nil
---@type unitevent
Native.EVENT_UNIT_SPELL_CAST = nil
---@type unitevent
Native.EVENT_UNIT_SPELL_EFFECT = nil
---@type unitevent
Native.EVENT_UNIT_SPELL_FINISH = nil
---@type unitevent
Native.EVENT_UNIT_SPELL_ENDCAST = nil
---@type unitevent
Native.EVENT_UNIT_PAWN_ITEM = nil
---@type unitevent
Native.EVENT_UNIT_STACK_ITEM = nil
---@type limitop
Native.LESS_THAN = nil
---@type limitop
Native.LESS_THAN_OR_EQUAL = nil
---@type limitop
Native.EQUAL = nil
---@type limitop
Native.GREATER_THAN_OR_EQUAL = nil
---@type limitop
Native.GREATER_THAN = nil
---@type limitop
Native.NOT_EQUAL = nil
---@type unittype
Native.UNIT_TYPE_HERO = nil
---@type unittype
Native.UNIT_TYPE_DEAD = nil
---@type unittype
Native.UNIT_TYPE_STRUCTURE = nil
---@type unittype
Native.UNIT_TYPE_FLYING = nil
---@type unittype
Native.UNIT_TYPE_GROUND = nil
---@type unittype
Native.UNIT_TYPE_ATTACKS_FLYING = nil
---@type unittype
Native.UNIT_TYPE_ATTACKS_GROUND = nil
---@type unittype
Native.UNIT_TYPE_MELEE_ATTACKER = nil
---@type unittype
Native.UNIT_TYPE_RANGED_ATTACKER = nil
---@type unittype
Native.UNIT_TYPE_GIANT = nil
---@type unittype
Native.UNIT_TYPE_SUMMONED = nil
---@type unittype
Native.UNIT_TYPE_STUNNED = nil
---@type unittype
Native.UNIT_TYPE_PLAGUED = nil
---@type unittype
Native.UNIT_TYPE_SNARED = nil
---@type unittype
Native.UNIT_TYPE_UNDEAD = nil
---@type unittype
Native.UNIT_TYPE_MECHANICAL = nil
---@type unittype
Native.UNIT_TYPE_PEON = nil
---@type unittype
Native.UNIT_TYPE_SAPPER = nil
---@type unittype
Native.UNIT_TYPE_TOWNHALL = nil
---@type unittype
Native.UNIT_TYPE_ANCIENT = nil
---@type unittype
Native.UNIT_TYPE_TAUREN = nil
---@type unittype
Native.UNIT_TYPE_POISONED = nil
---@type unittype
Native.UNIT_TYPE_POLYMORPHED = nil
---@type unittype
Native.UNIT_TYPE_SLEEPING = nil
---@type unittype
Native.UNIT_TYPE_RESISTANT = nil
---@type unittype
Native.UNIT_TYPE_ETHEREAL = nil
---@type unittype
Native.UNIT_TYPE_MAGIC_IMMUNE = nil
---@type itemtype
Native.ITEM_TYPE_PERMANENT = nil
---@type itemtype
Native.ITEM_TYPE_CHARGED = nil
---@type itemtype
Native.ITEM_TYPE_POWERUP = nil
---@type itemtype
Native.ITEM_TYPE_ARTIFACT = nil
---@type itemtype
Native.ITEM_TYPE_PURCHASABLE = nil
---@type itemtype
Native.ITEM_TYPE_CAMPAIGN = nil
---@type itemtype
Native.ITEM_TYPE_MISCELLANEOUS = nil
---@type itemtype
Native.ITEM_TYPE_UNKNOWN = nil
---@type itemtype
Native.ITEM_TYPE_ANY = nil
---@type itemtype
Native.ITEM_TYPE_TOME = nil
---@type camerafield
Native.CAMERA_FIELD_TARGET_DISTANCE = nil
---@type camerafield
Native.CAMERA_FIELD_FARZ = nil
---@type camerafield
Native.CAMERA_FIELD_ANGLE_OF_ATTACK = nil
---@type camerafield
Native.CAMERA_FIELD_FIELD_OF_VIEW = nil
---@type camerafield
Native.CAMERA_FIELD_ROLL = nil
---@type camerafield
Native.CAMERA_FIELD_ROTATION = nil
---@type camerafield
Native.CAMERA_FIELD_ZOFFSET = nil
---@type camerafield
Native.CAMERA_FIELD_NEARZ = nil
---@type camerafield
Native.CAMERA_FIELD_LOCAL_PITCH = nil
---@type camerafield
Native.CAMERA_FIELD_LOCAL_YAW = nil
---@type camerafield
Native.CAMERA_FIELD_LOCAL_ROLL = nil
---@type blendmode
Native.BLEND_MODE_NONE = nil
---@type blendmode
Native.BLEND_MODE_DONT_CARE = nil
---@type blendmode
Native.BLEND_MODE_KEYALPHA = nil
---@type blendmode
Native.BLEND_MODE_BLEND = nil
---@type blendmode
Native.BLEND_MODE_ADDITIVE = nil
---@type blendmode
Native.BLEND_MODE_MODULATE = nil
---@type blendmode
Native.BLEND_MODE_MODULATE_2X = nil
---@type raritycontrol
Native.RARITY_FREQUENT = nil
---@type raritycontrol
Native.RARITY_RARE = nil
---@type texmapflags
Native.TEXMAP_FLAG_NONE = nil
---@type texmapflags
Native.TEXMAP_FLAG_WRAP_U = nil
---@type texmapflags
Native.TEXMAP_FLAG_WRAP_V = nil
---@type texmapflags
Native.TEXMAP_FLAG_WRAP_UV = nil
---@type fogstate
Native.FOG_OF_WAR_MASKED = nil
---@type fogstate
Native.FOG_OF_WAR_FOGGED = nil
---@type fogstate
Native.FOG_OF_WAR_VISIBLE = nil
---@type integer
Native.CAMERA_MARGIN_LEFT = nil
---@type integer
Native.CAMERA_MARGIN_RIGHT = nil
---@type integer
Native.CAMERA_MARGIN_TOP = nil
---@type integer
Native.CAMERA_MARGIN_BOTTOM = nil
---@type effecttype
Native.EFFECT_TYPE_EFFECT = nil
---@type effecttype
Native.EFFECT_TYPE_TARGET = nil
---@type effecttype
Native.EFFECT_TYPE_CASTER = nil
---@type effecttype
Native.EFFECT_TYPE_SPECIAL = nil
---@type effecttype
Native.EFFECT_TYPE_AREA_EFFECT = nil
---@type effecttype
Native.EFFECT_TYPE_MISSILE = nil
---@type effecttype
Native.EFFECT_TYPE_LIGHTNING = nil
---@type soundtype
Native.SOUND_TYPE_EFFECT = nil
---@type soundtype
Native.SOUND_TYPE_EFFECT_LOOPED = nil
---@type originframetype
Native.ORIGIN_FRAME_GAME_UI = nil
---@type originframetype
Native.ORIGIN_FRAME_COMMAND_BUTTON = nil
---@type originframetype
Native.ORIGIN_FRAME_HERO_BAR = nil
---@type originframetype
Native.ORIGIN_FRAME_HERO_BUTTON = nil
---@type originframetype
Native.ORIGIN_FRAME_HERO_HP_BAR = nil
---@type originframetype
Native.ORIGIN_FRAME_HERO_MANA_BAR = nil
---@type originframetype
Native.ORIGIN_FRAME_HERO_BUTTON_INDICATOR = nil
---@type originframetype
Native.ORIGIN_FRAME_ITEM_BUTTON = nil
---@type originframetype
Native.ORIGIN_FRAME_MINIMAP = nil
---@type originframetype
Native.ORIGIN_FRAME_MINIMAP_BUTTON = nil
---@type originframetype
Native.ORIGIN_FRAME_SYSTEM_BUTTON = nil
---@type originframetype
Native.ORIGIN_FRAME_TOOLTIP = nil
---@type originframetype
Native.ORIGIN_FRAME_UBERTOOLTIP = nil
---@type originframetype
Native.ORIGIN_FRAME_CHAT_MSG = nil
---@type originframetype
Native.ORIGIN_FRAME_UNIT_MSG = nil
---@type originframetype
Native.ORIGIN_FRAME_TOP_MSG = nil
---@type originframetype
Native.ORIGIN_FRAME_PORTRAIT = nil
---@type originframetype
Native.ORIGIN_FRAME_WORLD_FRAME = nil
---@type originframetype
Native.ORIGIN_FRAME_SIMPLE_UI_PARENT = nil
---@type originframetype
Native.ORIGIN_FRAME_PORTRAIT_HP_TEXT = nil
---@type originframetype
Native.ORIGIN_FRAME_PORTRAIT_MANA_TEXT = nil
---@type originframetype
Native.ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR = nil
---@type originframetype
Native.ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR_LABEL = nil
---@type framepointtype
Native.FRAMEPOINT_TOPLEFT = nil
---@type framepointtype
Native.FRAMEPOINT_TOP = nil
---@type framepointtype
Native.FRAMEPOINT_TOPRIGHT = nil
---@type framepointtype
Native.FRAMEPOINT_LEFT = nil
---@type framepointtype
Native.FRAMEPOINT_CENTER = nil
---@type framepointtype
Native.FRAMEPOINT_RIGHT = nil
---@type framepointtype
Native.FRAMEPOINT_BOTTOMLEFT = nil
---@type framepointtype
Native.FRAMEPOINT_BOTTOM = nil
---@type framepointtype
Native.FRAMEPOINT_BOTTOMRIGHT = nil
---@type textaligntype
Native.TEXT_JUSTIFY_TOP = nil
---@type textaligntype
Native.TEXT_JUSTIFY_MIDDLE = nil
---@type textaligntype
Native.TEXT_JUSTIFY_BOTTOM = nil
---@type textaligntype
Native.TEXT_JUSTIFY_LEFT = nil
---@type textaligntype
Native.TEXT_JUSTIFY_CENTER = nil
---@type textaligntype
Native.TEXT_JUSTIFY_RIGHT = nil
---@type frameeventtype
Native.FRAMEEVENT_CONTROL_CLICK = nil
---@type frameeventtype
Native.FRAMEEVENT_MOUSE_ENTER = nil
---@type frameeventtype
Native.FRAMEEVENT_MOUSE_LEAVE = nil
---@type frameeventtype
Native.FRAMEEVENT_MOUSE_UP = nil
---@type frameeventtype
Native.FRAMEEVENT_MOUSE_DOWN = nil
---@type frameeventtype
Native.FRAMEEVENT_MOUSE_WHEEL = nil
---@type frameeventtype
Native.FRAMEEVENT_CHECKBOX_CHECKED = nil
---@type frameeventtype
Native.FRAMEEVENT_CHECKBOX_UNCHECKED = nil
---@type frameeventtype
Native.FRAMEEVENT_EDITBOX_TEXT_CHANGED = nil
---@type frameeventtype
Native.FRAMEEVENT_POPUPMENU_ITEM_CHANGED = nil
---@type frameeventtype
Native.FRAMEEVENT_MOUSE_DOUBLECLICK = nil
---@type frameeventtype
Native.FRAMEEVENT_SPRITE_ANIM_UPDATE = nil
---@type frameeventtype
Native.FRAMEEVENT_SLIDER_VALUE_CHANGED = nil
---@type frameeventtype
Native.FRAMEEVENT_DIALOG_CANCEL = nil
---@type frameeventtype
Native.FRAMEEVENT_DIALOG_ACCEPT = nil
---@type frameeventtype
Native.FRAMEEVENT_EDITBOX_ENTER = nil
---@type oskeytype
Native.OSKEY_BACKSPACE = nil
---@type oskeytype
Native.OSKEY_TAB = nil
---@type oskeytype
Native.OSKEY_CLEAR = nil
---@type oskeytype
Native.OSKEY_RETURN = nil
---@type oskeytype
Native.OSKEY_SHIFT = nil
---@type oskeytype
Native.OSKEY_CONTROL = nil
---@type oskeytype
Native.OSKEY_ALT = nil
---@type oskeytype
Native.OSKEY_PAUSE = nil
---@type oskeytype
Native.OSKEY_CAPSLOCK = nil
---@type oskeytype
Native.OSKEY_KANA = nil
---@type oskeytype
Native.OSKEY_HANGUL = nil
---@type oskeytype
Native.OSKEY_JUNJA = nil
---@type oskeytype
Native.OSKEY_FINAL = nil
---@type oskeytype
Native.OSKEY_HANJA = nil
---@type oskeytype
Native.OSKEY_KANJI = nil
---@type oskeytype
Native.OSKEY_ESCAPE = nil
---@type oskeytype
Native.OSKEY_CONVERT = nil
---@type oskeytype
Native.OSKEY_NONCONVERT = nil
---@type oskeytype
Native.OSKEY_ACCEPT = nil
---@type oskeytype
Native.OSKEY_MODECHANGE = nil
---@type oskeytype
Native.OSKEY_SPACE = nil
---@type oskeytype
Native.OSKEY_PAGEUP = nil
---@type oskeytype
Native.OSKEY_PAGEDOWN = nil
---@type oskeytype
Native.OSKEY_END = nil
---@type oskeytype
Native.OSKEY_HOME = nil
---@type oskeytype
Native.OSKEY_LEFT = nil
---@type oskeytype
Native.OSKEY_UP = nil
---@type oskeytype
Native.OSKEY_RIGHT = nil
---@type oskeytype
Native.OSKEY_DOWN = nil
---@type oskeytype
Native.OSKEY_SELECT = nil
---@type oskeytype
Native.OSKEY_PRINT = nil
---@type oskeytype
Native.OSKEY_EXECUTE = nil
---@type oskeytype
Native.OSKEY_PRINTSCREEN = nil
---@type oskeytype
Native.OSKEY_INSERT = nil
---@type oskeytype
Native.OSKEY_DELETE = nil
---@type oskeytype
Native.OSKEY_HELP = nil
---@type oskeytype
Native.OSKEY_0 = nil
---@type oskeytype
Native.OSKEY_1 = nil
---@type oskeytype
Native.OSKEY_2 = nil
---@type oskeytype
Native.OSKEY_3 = nil
---@type oskeytype
Native.OSKEY_4 = nil
---@type oskeytype
Native.OSKEY_5 = nil
---@type oskeytype
Native.OSKEY_6 = nil
---@type oskeytype
Native.OSKEY_7 = nil
---@type oskeytype
Native.OSKEY_8 = nil
---@type oskeytype
Native.OSKEY_9 = nil
---@type oskeytype
Native.OSKEY_A = nil
---@type oskeytype
Native.OSKEY_B = nil
---@type oskeytype
Native.OSKEY_C = nil
---@type oskeytype
Native.OSKEY_D = nil
---@type oskeytype
Native.OSKEY_E = nil
---@type oskeytype
Native.OSKEY_F = nil
---@type oskeytype
Native.OSKEY_G = nil
---@type oskeytype
Native.OSKEY_H = nil
---@type oskeytype
Native.OSKEY_I = nil
---@type oskeytype
Native.OSKEY_J = nil
---@type oskeytype
Native.OSKEY_K = nil
---@type oskeytype
Native.OSKEY_L = nil
---@type oskeytype
Native.OSKEY_M = nil
---@type oskeytype
Native.OSKEY_N = nil
---@type oskeytype
Native.OSKEY_O = nil
---@type oskeytype
Native.OSKEY_P = nil
---@type oskeytype
Native.OSKEY_Q = nil
---@type oskeytype
Native.OSKEY_R = nil
---@type oskeytype
Native.OSKEY_S = nil
---@type oskeytype
Native.OSKEY_T = nil
---@type oskeytype
Native.OSKEY_U = nil
---@type oskeytype
Native.OSKEY_V = nil
---@type oskeytype
Native.OSKEY_W = nil
---@type oskeytype
Native.OSKEY_X = nil
---@type oskeytype
Native.OSKEY_Y = nil
---@type oskeytype
Native.OSKEY_Z = nil
---@type oskeytype
Native.OSKEY_LMETA = nil
---@type oskeytype
Native.OSKEY_RMETA = nil
---@type oskeytype
Native.OSKEY_APPS = nil
---@type oskeytype
Native.OSKEY_SLEEP = nil
---@type oskeytype
Native.OSKEY_NUMPAD0 = nil
---@type oskeytype
Native.OSKEY_NUMPAD1 = nil
---@type oskeytype
Native.OSKEY_NUMPAD2 = nil
---@type oskeytype
Native.OSKEY_NUMPAD3 = nil
---@type oskeytype
Native.OSKEY_NUMPAD4 = nil
---@type oskeytype
Native.OSKEY_NUMPAD5 = nil
---@type oskeytype
Native.OSKEY_NUMPAD6 = nil
---@type oskeytype
Native.OSKEY_NUMPAD7 = nil
---@type oskeytype
Native.OSKEY_NUMPAD8 = nil
---@type oskeytype
Native.OSKEY_NUMPAD9 = nil
---@type oskeytype
Native.OSKEY_MULTIPLY = nil
---@type oskeytype
Native.OSKEY_ADD = nil
---@type oskeytype
Native.OSKEY_SEPARATOR = nil
---@type oskeytype
Native.OSKEY_SUBTRACT = nil
---@type oskeytype
Native.OSKEY_DECIMAL = nil
---@type oskeytype
Native.OSKEY_DIVIDE = nil
---@type oskeytype
Native.OSKEY_F1 = nil
---@type oskeytype
Native.OSKEY_F2 = nil
---@type oskeytype
Native.OSKEY_F3 = nil
---@type oskeytype
Native.OSKEY_F4 = nil
---@type oskeytype
Native.OSKEY_F5 = nil
---@type oskeytype
Native.OSKEY_F6 = nil
---@type oskeytype
Native.OSKEY_F7 = nil
---@type oskeytype
Native.OSKEY_F8 = nil
---@type oskeytype
Native.OSKEY_F9 = nil
---@type oskeytype
Native.OSKEY_F10 = nil
---@type oskeytype
Native.OSKEY_F11 = nil
---@type oskeytype
Native.OSKEY_F12 = nil
---@type oskeytype
Native.OSKEY_F13 = nil
---@type oskeytype
Native.OSKEY_F14 = nil
---@type oskeytype
Native.OSKEY_F15 = nil
---@type oskeytype
Native.OSKEY_F16 = nil
---@type oskeytype
Native.OSKEY_F17 = nil
---@type oskeytype
Native.OSKEY_F18 = nil
---@type oskeytype
Native.OSKEY_F19 = nil
---@type oskeytype
Native.OSKEY_F20 = nil
---@type oskeytype
Native.OSKEY_F21 = nil
---@type oskeytype
Native.OSKEY_F22 = nil
---@type oskeytype
Native.OSKEY_F23 = nil
---@type oskeytype
Native.OSKEY_F24 = nil
---@type oskeytype
Native.OSKEY_NUMLOCK = nil
---@type oskeytype
Native.OSKEY_SCROLLLOCK = nil
---@type oskeytype
Native.OSKEY_OEM_NEC_EQUAL = nil
---@type oskeytype
Native.OSKEY_OEM_FJ_JISHO = nil
---@type oskeytype
Native.OSKEY_OEM_FJ_MASSHOU = nil
---@type oskeytype
Native.OSKEY_OEM_FJ_TOUROKU = nil
---@type oskeytype
Native.OSKEY_OEM_FJ_LOYA = nil
---@type oskeytype
Native.OSKEY_OEM_FJ_ROYA = nil
---@type oskeytype
Native.OSKEY_LSHIFT = nil
---@type oskeytype
Native.OSKEY_RSHIFT = nil
---@type oskeytype
Native.OSKEY_LCONTROL = nil
---@type oskeytype
Native.OSKEY_RCONTROL = nil
---@type oskeytype
Native.OSKEY_LALT = nil
---@type oskeytype
Native.OSKEY_RALT = nil
---@type oskeytype
Native.OSKEY_BROWSER_BACK = nil
---@type oskeytype
Native.OSKEY_BROWSER_FORWARD = nil
---@type oskeytype
Native.OSKEY_BROWSER_REFRESH = nil
---@type oskeytype
Native.OSKEY_BROWSER_STOP = nil
---@type oskeytype
Native.OSKEY_BROWSER_SEARCH = nil
---@type oskeytype
Native.OSKEY_BROWSER_FAVORITES = nil
---@type oskeytype
Native.OSKEY_BROWSER_HOME = nil
---@type oskeytype
Native.OSKEY_VOLUME_MUTE = nil
---@type oskeytype
Native.OSKEY_VOLUME_DOWN = nil
---@type oskeytype
Native.OSKEY_VOLUME_UP = nil
---@type oskeytype
Native.OSKEY_MEDIA_NEXT_TRACK = nil
---@type oskeytype
Native.OSKEY_MEDIA_PREV_TRACK = nil
---@type oskeytype
Native.OSKEY_MEDIA_STOP = nil
---@type oskeytype
Native.OSKEY_MEDIA_PLAY_PAUSE = nil
---@type oskeytype
Native.OSKEY_LAUNCH_MAIL = nil
---@type oskeytype
Native.OSKEY_LAUNCH_MEDIA_SELECT = nil
---@type oskeytype
Native.OSKEY_LAUNCH_APP1 = nil
---@type oskeytype
Native.OSKEY_LAUNCH_APP2 = nil
---@type oskeytype
Native.OSKEY_OEM_1 = nil
---@type oskeytype
Native.OSKEY_OEM_PLUS = nil
---@type oskeytype
Native.OSKEY_OEM_COMMA = nil
---@type oskeytype
Native.OSKEY_OEM_MINUS = nil
---@type oskeytype
Native.OSKEY_OEM_PERIOD = nil
---@type oskeytype
Native.OSKEY_OEM_2 = nil
---@type oskeytype
Native.OSKEY_OEM_3 = nil
---@type oskeytype
Native.OSKEY_OEM_4 = nil
---@type oskeytype
Native.OSKEY_OEM_5 = nil
---@type oskeytype
Native.OSKEY_OEM_6 = nil
---@type oskeytype
Native.OSKEY_OEM_7 = nil
---@type oskeytype
Native.OSKEY_OEM_8 = nil
---@type oskeytype
Native.OSKEY_OEM_AX = nil
---@type oskeytype
Native.OSKEY_OEM_102 = nil
---@type oskeytype
Native.OSKEY_ICO_HELP = nil
---@type oskeytype
Native.OSKEY_ICO_00 = nil
---@type oskeytype
Native.OSKEY_PROCESSKEY = nil
---@type oskeytype
Native.OSKEY_ICO_CLEAR = nil
---@type oskeytype
Native.OSKEY_PACKET = nil
---@type oskeytype
Native.OSKEY_OEM_RESET = nil
---@type oskeytype
Native.OSKEY_OEM_JUMP = nil
---@type oskeytype
Native.OSKEY_OEM_PA1 = nil
---@type oskeytype
Native.OSKEY_OEM_PA2 = nil
---@type oskeytype
Native.OSKEY_OEM_PA3 = nil
---@type oskeytype
Native.OSKEY_OEM_WSCTRL = nil
---@type oskeytype
Native.OSKEY_OEM_CUSEL = nil
---@type oskeytype
Native.OSKEY_OEM_ATTN = nil
---@type oskeytype
Native.OSKEY_OEM_FINISH = nil
---@type oskeytype
Native.OSKEY_OEM_COPY = nil
---@type oskeytype
Native.OSKEY_OEM_AUTO = nil
---@type oskeytype
Native.OSKEY_OEM_ENLW = nil
---@type oskeytype
Native.OSKEY_OEM_BACKTAB = nil
---@type oskeytype
Native.OSKEY_ATTN = nil
---@type oskeytype
Native.OSKEY_CRSEL = nil
---@type oskeytype
Native.OSKEY_EXSEL = nil
---@type oskeytype
Native.OSKEY_EREOF = nil
---@type oskeytype
Native.OSKEY_PLAY = nil
---@type oskeytype
Native.OSKEY_ZOOM = nil
---@type oskeytype
Native.OSKEY_NONAME = nil
---@type oskeytype
Native.OSKEY_PA1 = nil
---@type oskeytype
Native.OSKEY_OEM_CLEAR = nil
---@type abilityintegerfield
Native.ABILITY_IF_BUTTON_POSITION_NORMAL_X = nil
---@type abilityintegerfield
Native.ABILITY_IF_BUTTON_POSITION_NORMAL_Y = nil
---@type abilityintegerfield
Native.ABILITY_IF_BUTTON_POSITION_ACTIVATED_X = nil
---@type abilityintegerfield
Native.ABILITY_IF_BUTTON_POSITION_ACTIVATED_Y = nil
---@type abilityintegerfield
Native.ABILITY_IF_BUTTON_POSITION_RESEARCH_X = nil
---@type abilityintegerfield
Native.ABILITY_IF_BUTTON_POSITION_RESEARCH_Y = nil
---@type abilityintegerfield
Native.ABILITY_IF_MISSILE_SPEED = nil
---@type abilityintegerfield
Native.ABILITY_IF_TARGET_ATTACHMENTS = nil
---@type abilityintegerfield
Native.ABILITY_IF_CASTER_ATTACHMENTS = nil
---@type abilityintegerfield
Native.ABILITY_IF_PRIORITY = nil
---@type abilityintegerfield
Native.ABILITY_IF_LEVELS = nil
---@type abilityintegerfield
Native.ABILITY_IF_REQUIRED_LEVEL = nil
---@type abilityintegerfield
Native.ABILITY_IF_LEVEL_SKIP_REQUIREMENT = nil
---@type abilitybooleanfield
Native.ABILITY_BF_HERO_ABILITY = nil
---@type abilitybooleanfield
Native.ABILITY_BF_ITEM_ABILITY = nil
---@type abilitybooleanfield
Native.ABILITY_BF_CHECK_DEPENDENCIES = nil
---@type abilityrealfield
Native.ABILITY_RF_ARF_MISSILE_ARC = nil
---@type abilitystringfield
Native.ABILITY_SF_NAME = nil
---@type abilitystringfield
Native.ABILITY_SF_ICON_ACTIVATED = nil
---@type abilitystringfield
Native.ABILITY_SF_ICON_RESEARCH = nil
---@type abilitystringfield
Native.ABILITY_SF_EFFECT_SOUND = nil
---@type abilitystringfield
Native.ABILITY_SF_EFFECT_SOUND_LOOPING = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MANA_COST = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_WAVES = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_SHARDS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_UNITS_TELEPORTED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_IMAGES = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_UAN1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MORPHING_FLAGS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_STRENGTH_BONUS_NRG5 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DEFENSE_BONUS_NRG6 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_TARGETS_HIT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DETECTION_TYPE_OFS1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_OSF2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_EFN1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_HRE1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_STACK_FLAGS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MINIMUM_NUMBER_OF_UNITS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_NDP3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_UNITS_CREATED_NRC2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SHIELD_LIFE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MANA_LOSS_AMS4 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_GOLD_PER_INTERVAL_BGM1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_NUMBER_OF_MINERS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_CARGO_CAPACITY = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_DEV3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_CREEP_LEVEL_DEV1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_GOLD_PER_INTERVAL_EGM1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DEFENSE_REDUCTION = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DETECTION_TYPE_FLA1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_FLARE_COUNT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_GOLD = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MINING_CAPACITY = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_GYD1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DAMAGE_TO_TREE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_LUMBER_CAPACITY = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_GOLD_CAPACITY = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DEFENSE_INCREASE_INF2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_INTERACTION_TYPE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_GOLD_COST_NDT1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_LUMBER_COST_NDT2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DETECTION_TYPE_NDT3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_STACKING_TYPE_POI4 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_STACKING_TYPE_POA5 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_PLY1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_POS1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MOVEMENT_UPDATE_FREQUENCY_PRG1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ATTACK_UPDATE_FREQUENCY_PRG2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MANA_LOSS_PRG6 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UNITS_SUMMONED_TYPE_ONE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UNITS_SUMMONED_TYPE_TWO = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_UNITS_SUMMONED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ALLOW_WHEN_FULL_REJ3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_UNITS_CHARGED_TO_CASTER = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_UNITS_AFFECTED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DEFENSE_INCREASE_ROA2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_UNITS_ROA7 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ROOTED_WEAPONS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UPROOTED_WEAPONS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UPROOTED_DEFENSE_TYPE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ACCUMULATION_STEP = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_OWLS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_STACKING_TYPE_SPO4 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_UNITS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SPIDER_CAPACITY = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_INTERVALS_BEFORE_CHANGING_TREES = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_AGILITY_BONUS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_INTELLIGENCE_BONUS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_STRENGTH_BONUS_ISTR = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ATTACK_BONUS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DEFENSE_BONUS_IDEF = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMON_1_AMOUNT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMON_2_AMOUNT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_EXPERIENCE_GAINED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_HIT_POINTS_GAINED_IHPG = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MANA_POINTS_GAINED_IMPG = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_HIT_POINTS_GAINED_IHP2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MANA_POINTS_GAINED_IMP2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DAMAGE_BONUS_DICE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ARMOR_PENALTY_IARP = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ENABLED_ATTACK_INDEX_IOB5 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_LEVELS_GAINED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_LIFE_GAINED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_MANA_GAINED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_GOLD_GIVEN = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_LUMBER_GIVEN = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DETECTION_TYPE_IFA1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_ICRE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MOVEMENT_SPEED_BONUS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_HIT_POINTS_REGENERATED_PER_SECOND = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SIGHT_RANGE_BONUS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DAMAGE_PER_DURATION = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MANA_USED_PER_SECOND = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_EXTRA_MANA_REQUIRED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DETECTION_RADIUS_IDET = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MANA_LOSS_PER_UNIT_IDIM = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DAMAGE_TO_SUMMONED_UNITS_IDID = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_IREC = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DELAY_AFTER_DEATH_SECONDS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_RESTORED_LIFE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_RESTORED_MANA__1_FOR_CURRENT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_HIT_POINTS_RESTORED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MANA_POINTS_RESTORED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_ITPM = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_CAD1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_TERRAIN_DEFORMATION_DURATION_MS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_UNITS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DETECTION_TYPE_DET1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_GOLD_COST_PER_STRUCTURE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_LUMBER_COST_PER_USE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DETECTION_TYPE_NSP3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_SWARM_UNITS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_SWARM_UNITS_PER_TARGET = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NBA2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_NCH1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ATTACKS_PREVENTED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_EFK3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_ESV1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_EXH1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ITEM_CAPACITY = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_SPL2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ALLOW_WHEN_FULL_IRL3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_DISPELLED_UNITS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_LURES = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NEW_TIME_OF_DAY_HOUR = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NEW_TIME_OF_DAY_MINUTE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_UNITS_CREATED_MEC1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MINIMUM_SPELLS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_SPELLS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DISABLED_ATTACK_INDEX = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ENABLED_ATTACK_INDEX_GRA4 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAXIMUM_ATTACKS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_BUILDING_TYPES_ALLOWED_NPR1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_BUILDING_TYPES_ALLOWED_NSA1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ATTACK_MODIFICATION = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_COUNT_NPA5 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UPGRADE_LEVELS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NDO2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_BEASTS_PER_SECOND = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_TARGET_TYPE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_OPTIONS = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ARMOR_PENALTY_NAB3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_WAVE_COUNT_NHS6 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_CREEP_LEVEL_NTM3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MISSILE_COUNT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SPLIT_ATTACK_COUNT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_GENERATION_COUNT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ROCK_RING_COUNT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_WAVE_COUNT_NVC2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_PREFER_HOSTILES_TAU1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_PREFER_FRIENDLIES_TAU2 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_MAX_UNITS_TAU3 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NUMBER_OF_PULSES = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_TYPE_HWE1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_UIN4 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_OSF1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_TYPE_EFNU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_TYPE_NBAU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_TYPE_NTOU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_TYPE_ESVU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_TYPES = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SUMMONED_UNIT_TYPE_NDOU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ALTERNATE_FORM_UNIT_EMEU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_PLAGUE_WARD_UNIT_TYPE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ALLOWED_UNIT_TYPE_BTL1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_NEW_UNIT_TYPE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_RESULTING_UNIT_TYPE_ENT1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_CORPSE_UNIT_TYPE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_ALLOWED_UNIT_TYPE_LOA1 = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UNIT_TYPE_FOR_LIMIT_CHECK = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_WARD_UNIT_TYPE_STAU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_EFFECT_ABILITY = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_CONVERSION_UNIT = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UNIT_TO_PRESERVE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UNIT_TYPE_ALLOWED = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SWARM_UNIT_TYPE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_RESULTING_UNIT_TYPE_COAU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UNIT_TYPE_EXHU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_WARD_UNIT_TYPE_HWDU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_LURE_UNIT_TYPE = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UNIT_TYPE_IPMU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_FACTORY_UNIT_ID = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_SPAWN_UNIT_ID_NFYU = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_DESTRUCTIBLE_ID = nil
---@type abilityintegerlevelfield
Native.ABILITY_ILF_UPGRADE_TYPE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CASTING_TIME = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DURATION_NORMAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DURATION_HERO = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_COOLDOWN = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AREA_OF_EFFECT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CAST_RANGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_HBZ2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUILDING_REDUCTION_HBZ4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_HBZ5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAXIMUM_DAMAGE_PER_WAVE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_REGENERATION_INCREASE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CASTING_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_OWW1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_OWW2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_OCR3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_EVADE_OCR4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_DEALT_PERCENT_OMI2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_TAKEN_PERCENT_OMI3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ANIMATION_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_TRANSITION_TIME = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OWK2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BACKSTAB_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AMOUNT_HEALED_DAMAGED_UDC1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_CONVERTED_TO_MANA = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_CONVERTED_TO_LIFE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_UAU1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_REGENERATION_INCREASE_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_EVADE_EEV1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_INTERVAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_DRAINED_PER_SECOND_EIM2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUFFER_MANA_REQUIRED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_MANA_DRAINED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BOLT_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BOLT_LIFETIME = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ALTITUDE_ADJUSTMENT_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LANDING_DELAY_TIME = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ALTERNATE_FORM_HIT_POINT_BONUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVE_SPEED_BONUS_INFO_PANEL_ONLY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_BONUS_INFO_PANEL_ONLY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_REGENERATION_RATE_PER_SECOND = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_STUN_DURATION_USL1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_DAMAGE_STOLEN_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_UCS1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_DAMAGE_UCS2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DISTANCE_UCS3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FINAL_AREA_UCS4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_UIN1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_IMPACT_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_TARGET_OCL1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_REDUCTION_PER_TARGET = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EFFECT_DELAY_OEQ1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_TO_BUILDINGS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_UNITS_SLOWED_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FINAL_AREA_OEQ4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_EER1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_DEALT_TO_ATTACKERS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_HEALED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HEAL_INTERVAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUILDING_REDUCTION_ETQ3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_INITIAL_IMMUNITY_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_LIFE_DRAINED_PER_SECOND_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUILDING_REDUCTION_UDD2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ARMOR_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ARMOR_BONUS_UFA2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AREA_OF_EFFECT_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_UFN2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_HFA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_DEALT_ESF1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_INTERVAL_ESF2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUILDING_REDUCTION_ESF3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEFENSE_BONUS_HAV1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HIT_POINT_BONUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_HAV3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_HAV4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_BASH = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_MULTIPLIER_HBH2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_HBH3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_MISS_HBH4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_HTB1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AOE_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_HTC2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HTC3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HTC4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ARMOR_BONUS_HAD1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AMOUNT_HEALED_DAMAGED_HHB1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EXTRA_DAMAGE_HCA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_HCA2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_FACTOR_HCA3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OAE1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_OAE2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_REINCARNATION_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_OSH1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAXIMUM_DAMAGE_OSH2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DISTANCE_OSH3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FINAL_AREA_OSH4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_GRAPHIC_DELAY_NFD1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_GRAPHIC_DURATION_NFD2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_NFD3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_AMS1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_AMS2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AURA_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_APL2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DURATION_OF_PLAGUE_WARD = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AMOUNT_OF_HIT_POINTS_REGENERATED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_DAMAGE_INCREASE_AKB1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_LOSS_ADM1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_ADM2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EXPANSION_AMOUNT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_INTERVAL_DURATION_BGM2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_RADIUS_OF_MINING_RING = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_BLO1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_BLO2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SCALING_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HIT_POINTS_PER_SECOND_CAN1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_HIT_POINTS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_DEV2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_UPDATE_FREQUENCY_CHD1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_UPDATE_FREQUENCY_CHD2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_CHD3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_CRI1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_CRI2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_REDUCTION_CRI3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_MISS_CRS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FULL_DAMAGE_AMOUNT_DDA2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_PARTIAL_DAMAGE_RADIUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_PARTIAL_DAMAGE_AMOUNT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUILDING_DAMAGE_FACTOR_SDS1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_DAMAGE_UCO5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVE_SPEED_BONUS_UCO6 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_TAKEN_PERCENT_DEF1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_DEALT_PERCENT_DEF2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_DEF3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_FACTOR_DEF4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_DEF5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_DEFLECT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_PIERCING = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_SPELLS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_RIP_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EAT_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HIT_POINTS_GAINED_EAT3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AIR_UNIT_LOWER_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AIR_UNIT_HEIGHT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MELEE_ATTACK_RANGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_INTERVAL_DURATION_EGM2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EFFECT_DELAY_FLA2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MINING_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_RADIUS_OF_GRAVESTONES = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_RADIUS_OF_CORPSES = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HIT_POINTS_GAINED_HEA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_INCREASE_PERCENT_INF1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AUTOCAST_RANGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_REGEN_RATE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_GRAPHIC_DELAY_LIT1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_GRAPHIC_DURATION_LIT2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_LSH1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_GAINED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HIT_POINTS_GAINED_MBT2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AUTOCAST_REQUIREMENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_WATER_HEIGHT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ACTIVATION_DELAY_MIN1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_INVISIBILITY_TRANSITION_TIME = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ACTIVATION_RADIUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AMOUNT_REGENERATED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_POI1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_FACTOR_POI2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POI3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EXTRA_DAMAGE_POA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_POA2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_FACTOR_POA3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POA4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_AMPLIFICATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_STOMP_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_DEALT_WAR2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FULL_DAMAGE_RADIUS_WAR3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HALF_DAMAGE_RADIUS_WAR4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_PRG3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_UNIT_PAUSE_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HERO_PAUSE_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HIT_POINTS_GAINED_REJ1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_POINTS_GAINED_REJ2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MINIMUM_LIFE_REQUIRED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MINIMUM_MANA_REQUIRED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_REPAIR_COST_RATIO = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_REPAIR_TIME_RATIO = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_POWERBUILD_COST = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_POWERBUILD_RATE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_NAVAL_RANGE_BONUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_INCREASE_PERCENT_ROA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_REGENERATION_RATE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_REGEN = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_INCREASE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SALVAGE_COST_RATIO = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_IN_FLIGHT_SIGHT_RADIUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HOVERING_SIGHT_RADIUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HOVERING_HEIGHT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DURATION_OF_OWLS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FADE_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAY_NIGHT_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ACTION_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SLO1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_FACTOR_SLO2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_SPO1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SPO2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_FACTOR_SPO3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ACTIVATION_DELAY_STA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DETECTION_RADIUS_STA2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DETONATION_RADIUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_STUN_DURATION_STA4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_BONUS_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_UHF2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LUMBER_PER_INTERVAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ART_ATTACHMENT_HEIGHT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_TELEPORT_AREA_WIDTH = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_TELEPORT_AREA_HEIGHT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_STOLEN_PER_ATTACK = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_IDAM = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_HIT_UNITS_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_HIT_HEROS_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_HIT_SUMMONS_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DELAY_FOR_TARGET_EFFECT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_DEALT_PERCENT_OF_NORMAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_RECEIVED_MULTIPLIER = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_REGENERATION_BONUS_AS_FRACTION_OF_NORMAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_ISPI = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_IDPS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_DAMAGE_INCREASE_CAC1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_COR1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_INCREASE_ISX1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_WRS1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_TERRAIN_DEFORMATION_AMPLITUDE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_CTC1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EXTRA_DAMAGE_TO_TARGET = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_CTC3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_REDUCTION_CTC4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_CTB1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CASTING_DELAY_SECONDS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_LOSS_PER_UNIT_DTN1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_DTN2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_TRANSITION_TIME_SECONDS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_DRAINED_PER_SECOND_NMR1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_REDUCE_DAMAGE_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MINIMUM_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_IGNORED_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FULL_DAMAGE_DEALT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FULL_DAMAGE_INTERVAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HALF_DAMAGE_DEALT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HALF_DAMAGE_INTERVAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUILDING_REDUCTION_HFS5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAXIMUM_DAMAGE_HFS6 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_PER_HIT_POINT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_ABSORBED_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_WAVE_DISTANCE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_WAVE_TIME_SECONDS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_DEALT_UIM3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AIR_TIME_SECONDS_UIM4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_UNIT_RELEASE_INTERVAL_SECONDS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_RETURN_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_RETURN_THRESHOLD = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_RETURNED_DAMAGE_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_RECEIVED_DAMAGE_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEFENSE_BONUS_UTS3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_NBA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NBA3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_PER_SUMMONED_HITPOINT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHARGE_FOR_CURRENT_LIFE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HIT_POINTS_DRAINED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_POINTS_DRAINED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DRAIN_INTERVAL_SECONDS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_TRANSFERRED_PER_SECOND = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_TRANSFERRED_PER_SECOND = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BONUS_LIFE_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BONUS_LIFE_DECAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BONUS_MANA_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BONUS_MANA_DECAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_MISS_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_MODIFIER = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_MODIFIER = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_TDG1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_TDG2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MEDIUM_DAMAGE_PER_SECOND = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SMALL_DAMAGE_RADIUS_TDG4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SMALL_DAMAGE_PER_SECOND = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_AIR_TIME_SECONDS_TSP1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MINIMUM_HIT_INTERVAL_SECONDS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_NBF5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAXIMUM_RANGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MINIMUM_RANGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_TARGET_EFK1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAXIMUM_TOTAL_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAXIMUM_SPEED_ADJUSTMENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DECAYING_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_ESH2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_FACTOR_ESH3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DECAY_POWER = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_INITIAL_DAMAGE_ESH5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAXIMUM_LIFE_ABSORBED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAXIMUM_MANA_ABSORBED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_BSK1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_INCREASE_BSK2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_TAKEN_INCREASE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_PER_UNIT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_PER_UNIT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_PER_BUFF = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_PER_BUFF = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_DVM5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_FAK1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MEDIUM_DAMAGE_FACTOR_FAK2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SMALL_DAMAGE_FACTOR_FAK3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FULL_DAMAGE_RADIUS_FAK4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HALF_DAMAGE_RADIUS_FAK5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EXTRA_DAMAGE_PER_SECOND = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_LIQ2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_REDUCTION_LIQ3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAGIC_DAMAGE_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_UNIT_DAMAGE_PER_MANA_POINT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HERO_DAMAGE_PER_MANA_POINT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_UNIT_MAXIMUM_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HERO_MAXIMUM_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_COOLDOWN = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_SPL1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_REGENERATED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_REGENERATED = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_LOSS_PER_UNIT_IDC1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_IDC2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ACTIVATION_DELAY_IMO2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LURE_INTERVAL_SECONDS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_ISR1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_REDUCTION_ISR2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_IPV1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_STEAL_AMOUNT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_RESTORED_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MANA_RESTORED_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACH_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_REMOVE_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HERO_REGENERATION_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_UNIT_REGENERATION_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_NSA4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HIT_POINTS_PER_SECOND_NSA5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_IXS1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_IXS2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SHIELD_COOLDOWN_TIME = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_NDO1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NDO3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_FLK1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SMALL_DAMAGE_RADIUS_FLK2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FULL_DAMAGE_AMOUNT_FLK3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MEDIUM_DAMAGE_AMOUNT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SMALL_DAMAGE_AMOUNT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HBN1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HBN2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_MANA_DRAINED_UNITS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_RATIO_UNITS_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_MANA_DRAINED_HEROS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_RATIO_HEROS_PERCENT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SUMMONED_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_NCA1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_INITIAL_DAMAGE_PXF1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_PXF2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PER_SECOND_MLS1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BEAST_COLLISION_RADIUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_AMOUNT_NST3 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_RADIUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FOLLOW_THROUGH_TIME = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ART_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NAB1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NAB2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_PRIMARY_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SECONDARY_DAMAGE = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_INTERVAL_NAB6 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_GOLD_COST_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LUMBER_COST_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVE_SPEED_BONUS_NEG1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_BONUS_NEG2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_AMOUNT_NCS1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_INTERVAL_NCS2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_DAMAGE_NCS4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NCS5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_EFFECT_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SPAWN_INTERVAL_NSY1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SPAWN_UNIT_DURATION = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SPAWN_UNIT_OFFSET = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LEASH_RANGE_NSY5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SPAWN_INTERVAL_NFY1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LEASH_RANGE_NFY2 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_CHANCE_TO_DEMOLISH = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_MULTIPLIER_BUILDINGS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_MULTIPLIER_UNITS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_MULTIPLIER_HEROES = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BONUS_DAMAGE_MULTIPLIER = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEATH_DAMAGE_FULL_AMOUNT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEATH_DAMAGE_FULL_AREA = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEATH_DAMAGE_HALF_AMOUNT = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEATH_DAMAGE_HALF_AREA = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DEATH_DAMAGE_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_AMOUNT_NSO1 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PERIOD = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_DAMAGE_PENALTY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NSO4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NSO5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_SPLIT_DELAY = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_MAX_HITPOINT_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_LIFE_DURATION_SPLIT_BONUS = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_WAVE_INTERVAL = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NVC4 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_FULL_DAMAGE_AMOUNT_NVC5 = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_HALF_DAMAGE_FACTOR = nil
---@type abilityreallevelfield
Native.ABILITY_RLF_INTERVAL_BETWEEN_PULSES = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_PERCENT_BONUS_HAB2 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_USE_TELEPORT_CLUSTERING_HMT3 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_NEVER_MISS_OCR5 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_EXCLUDE_ITEM_DAMAGE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_BACKSTAB_DAMAGE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_INHERIT_UPGRADES_UAN3 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_MANA_CONVERSION_AS_PERCENT = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_LIFE_CONVERSION_AS_PERCENT = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_LEAVE_TARGET_ALIVE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_PERCENT_BONUS_UAU3 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_DAMAGE_IS_PERCENT_RECEIVED = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_MELEE_BONUS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_RANGED_BONUS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_FLAT_BONUS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_NEVER_MISS_HBH5 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_PERCENT_BONUS_HAD2 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_CAN_DEACTIVATE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_RAISED_UNITS_ARE_INVULNERABLE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_PERCENTAGE_OAR2 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_SUMMON_BUSY_UNITS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_CREATES_BLIGHT = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_EXPLODES_ON_DEATH = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_ALWAYS_AUTOCAST_FAE2 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_REGENERATE_ONLY_AT_NIGHT = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_SHOW_SELECT_UNIT_BUTTON = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_SHOW_UNIT_INDICATOR = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_CHARGE_OWNING_PLAYER = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_PERCENTAGE_ARM2 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_TARGET_IS_INVULNERABLE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_TARGET_IS_MAGIC_IMMUNE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_KILL_ON_CASTER_DEATH = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_NO_TARGET_REQUIRED_REJ4 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_ACCEPTS_GOLD = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_ACCEPTS_LUMBER = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_PREFER_HOSTILES_ROA5 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_PREFER_FRIENDLIES_ROA6 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_ROOTED_TURNING = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_ALWAYS_AUTOCAST_SLO3 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_HIDE_BUTTON = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_USE_TELEPORT_CLUSTERING_ITP2 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_DOES_NOT_BLOCK_BUILDINGS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_AUTO_ACQUIRE_ATTACK_TARGETS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS_GHO2 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_DO_NOT_BLOCK_BUILDINGS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_INCLUDE_RANGED_DAMAGE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_INCLUDE_MELEE_DAMAGE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_MOVE_TO_PARTNER = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_CAN_BE_DISPELLED = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_IGNORE_FRIENDLY_BUFFS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_DROP_ITEMS_ON_DEATH = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_CAN_USE_ITEMS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_CAN_GET_ITEMS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_CAN_DROP_ITEMS = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_REPAIRS_ALLOWED = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_CASTER_ONLY_SPLASH = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_NO_TARGET_REQUIRED_IRL4 = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_DISPEL_ON_ATTACK = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_AMOUNT_IS_RAW_VALUE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_SHARED_SPELL_COOLDOWN = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_SLEEP_ONCE = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_ALLOW_ON_ANY_PLAYER_SLOT = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_DISABLE_OTHER_ABILITIES = nil
---@type abilitybooleanlevelfield
Native.ABILITY_BLF_ALLOW_BOUNTY = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_ICON_NORMAL = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_CASTER = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_TARGET = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_SPECIAL = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_EFFECT = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_AREA_EFFECT = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_LIGHTNING_EFFECTS = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_MISSILE_ART = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_TOOLTIP_LEARN = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_TOOLTIP_LEARN_EXTENDED = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_TOOLTIP_NORMAL = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_TOOLTIP_TURN_OFF = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_TOOLTIP_TURN_OFF_EXTENDED = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_NORMAL_FORM_UNIT_EME1 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_SPAWNED_UNITS = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_ABILITY_FOR_UNIT_CREATION = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_NORMAL_FORM_UNIT_MIL1 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_ALTERNATE_FORM_UNIT_MIL2 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_BASE_ORDER_ID_ANS5 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_MORPH_UNITS_GROUND = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_MORPH_UNITS_AIR = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_MORPH_UNITS_AMPHIBIOUS = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_MORPH_UNITS_WATER = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_UNIT_TYPE_ONE = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_UNIT_TYPE_TWO = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_UNIT_TYPE_SOD2 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_SUMMON_1_UNIT_TYPE = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_SUMMON_2_UNIT_TYPE = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_RACE_TO_CONVERT = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_PARTNER_UNIT_TYPE = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_PARTNER_UNIT_TYPE_ONE = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_PARTNER_UNIT_TYPE_TWO = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_REQUIRED_UNIT_TYPE = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_CONVERTED_UNIT_TYPE = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_SPELL_LIST = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_BASE_ORDER_ID_SPB5 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_BASE_ORDER_ID_NCL6 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_ABILITY_UPGRADE_1 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_ABILITY_UPGRADE_2 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_ABILITY_UPGRADE_3 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_ABILITY_UPGRADE_4 = nil
---@type abilitystringlevelfield
Native.ABILITY_SLF_SPAWN_UNIT_ID_NSY2 = nil
---@type itemintegerfield
Native.ITEM_IF_LEVEL = nil
---@type itemintegerfield
Native.ITEM_IF_NUMBER_OF_CHARGES = nil
---@type itemintegerfield
Native.ITEM_IF_COOLDOWN_GROUP = nil
---@type itemintegerfield
Native.ITEM_IF_MAX_HIT_POINTS = nil
---@type itemintegerfield
Native.ITEM_IF_HIT_POINTS = nil
---@type itemintegerfield
Native.ITEM_IF_PRIORITY = nil
---@type itemintegerfield
Native.ITEM_IF_ARMOR_TYPE = nil
---@type itemintegerfield
Native.ITEM_IF_TINTING_COLOR_RED = nil
---@type itemintegerfield
Native.ITEM_IF_TINTING_COLOR_GREEN = nil
---@type itemintegerfield
Native.ITEM_IF_TINTING_COLOR_BLUE = nil
---@type itemintegerfield
Native.ITEM_IF_TINTING_COLOR_ALPHA = nil
---@type itemrealfield
Native.ITEM_RF_SCALING_VALUE = nil
---@type itembooleanfield
Native.ITEM_BF_DROPPED_WHEN_CARRIER_DIES = nil
---@type itembooleanfield
Native.ITEM_BF_CAN_BE_DROPPED = nil
---@type itembooleanfield
Native.ITEM_BF_PERISHABLE = nil
---@type itembooleanfield
Native.ITEM_BF_INCLUDE_AS_RANDOM_CHOICE = nil
---@type itembooleanfield
Native.ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED = nil
---@type itembooleanfield
Native.ITEM_BF_CAN_BE_SOLD_TO_MERCHANTS = nil
---@type itembooleanfield
Native.ITEM_BF_ACTIVELY_USED = nil
---@type itemstringfield
Native.ITEM_SF_MODEL_USED = nil
---@type unitintegerfield
Native.UNIT_IF_DEFENSE_TYPE = nil
---@type unitintegerfield
Native.UNIT_IF_ARMOR_TYPE = nil
---@type unitintegerfield
Native.UNIT_IF_LOOPING_FADE_IN_RATE = nil
---@type unitintegerfield
Native.UNIT_IF_LOOPING_FADE_OUT_RATE = nil
---@type unitintegerfield
Native.UNIT_IF_AGILITY = nil
---@type unitintegerfield
Native.UNIT_IF_INTELLIGENCE = nil
---@type unitintegerfield
Native.UNIT_IF_STRENGTH = nil
---@type unitintegerfield
Native.UNIT_IF_AGILITY_PERMANENT = nil
---@type unitintegerfield
Native.UNIT_IF_INTELLIGENCE_PERMANENT = nil
---@type unitintegerfield
Native.UNIT_IF_STRENGTH_PERMANENT = nil
---@type unitintegerfield
Native.UNIT_IF_AGILITY_WITH_BONUS = nil
---@type unitintegerfield
Native.UNIT_IF_INTELLIGENCE_WITH_BONUS = nil
---@type unitintegerfield
Native.UNIT_IF_STRENGTH_WITH_BONUS = nil
---@type unitintegerfield
Native.UNIT_IF_GOLD_BOUNTY_AWARDED_NUMBER_OF_DICE = nil
---@type unitintegerfield
Native.UNIT_IF_GOLD_BOUNTY_AWARDED_BASE = nil
---@type unitintegerfield
Native.UNIT_IF_GOLD_BOUNTY_AWARDED_SIDES_PER_DIE = nil
---@type unitintegerfield
Native.UNIT_IF_LUMBER_BOUNTY_AWARDED_NUMBER_OF_DICE = nil
---@type unitintegerfield
Native.UNIT_IF_LUMBER_BOUNTY_AWARDED_BASE = nil
---@type unitintegerfield
Native.UNIT_IF_LUMBER_BOUNTY_AWARDED_SIDES_PER_DIE = nil
---@type unitintegerfield
Native.UNIT_IF_LEVEL = nil
---@type unitintegerfield
Native.UNIT_IF_FORMATION_RANK = nil
---@type unitintegerfield
Native.UNIT_IF_ORIENTATION_INTERPOLATION = nil
---@type unitintegerfield
Native.UNIT_IF_ELEVATION_SAMPLE_POINTS = nil
---@type unitintegerfield
Native.UNIT_IF_TINTING_COLOR_RED = nil
---@type unitintegerfield
Native.UNIT_IF_TINTING_COLOR_GREEN = nil
---@type unitintegerfield
Native.UNIT_IF_TINTING_COLOR_BLUE = nil
---@type unitintegerfield
Native.UNIT_IF_TINTING_COLOR_ALPHA = nil
---@type unitintegerfield
Native.UNIT_IF_MOVE_TYPE = nil
---@type unitintegerfield
Native.UNIT_IF_TARGETED_AS = nil
---@type unitintegerfield
Native.UNIT_IF_UNIT_CLASSIFICATION = nil
---@type unitintegerfield
Native.UNIT_IF_HIT_POINTS_REGENERATION_TYPE = nil
---@type unitintegerfield
Native.UNIT_IF_PLACEMENT_PREVENTED_BY = nil
---@type unitintegerfield
Native.UNIT_IF_PRIMARY_ATTRIBUTE = nil
---@type unitrealfield
Native.UNIT_RF_STRENGTH_PER_LEVEL = nil
---@type unitrealfield
Native.UNIT_RF_AGILITY_PER_LEVEL = nil
---@type unitrealfield
Native.UNIT_RF_INTELLIGENCE_PER_LEVEL = nil
---@type unitrealfield
Native.UNIT_RF_HIT_POINTS_REGENERATION_RATE = nil
---@type unitrealfield
Native.UNIT_RF_MANA_REGENERATION = nil
---@type unitrealfield
Native.UNIT_RF_DEATH_TIME = nil
---@type unitrealfield
Native.UNIT_RF_FLY_HEIGHT = nil
---@type unitrealfield
Native.UNIT_RF_TURN_RATE = nil
---@type unitrealfield
Native.UNIT_RF_ELEVATION_SAMPLE_RADIUS = nil
---@type unitrealfield
Native.UNIT_RF_FOG_OF_WAR_SAMPLE_RADIUS = nil
---@type unitrealfield
Native.UNIT_RF_MAXIMUM_PITCH_ANGLE_DEGREES = nil
---@type unitrealfield
Native.UNIT_RF_MAXIMUM_ROLL_ANGLE_DEGREES = nil
---@type unitrealfield
Native.UNIT_RF_SCALING_VALUE = nil
---@type unitrealfield
Native.UNIT_RF_ANIMATION_RUN_SPEED = nil
---@type unitrealfield
Native.UNIT_RF_SELECTION_SCALE = nil
---@type unitrealfield
Native.UNIT_RF_SELECTION_CIRCLE_HEIGHT = nil
---@type unitrealfield
Native.UNIT_RF_SHADOW_IMAGE_HEIGHT = nil
---@type unitrealfield
Native.UNIT_RF_SHADOW_IMAGE_WIDTH = nil
---@type unitrealfield
Native.UNIT_RF_SHADOW_IMAGE_CENTER_X = nil
---@type unitrealfield
Native.UNIT_RF_SHADOW_IMAGE_CENTER_Y = nil
---@type unitrealfield
Native.UNIT_RF_ANIMATION_WALK_SPEED = nil
---@type unitrealfield
Native.UNIT_RF_DEFENSE = nil
---@type unitrealfield
Native.UNIT_RF_SIGHT_RADIUS = nil
---@type unitrealfield
Native.UNIT_RF_PRIORITY = nil
---@type unitrealfield
Native.UNIT_RF_SPEED = nil
---@type unitrealfield
Native.UNIT_RF_OCCLUDER_HEIGHT = nil
---@type unitrealfield
Native.UNIT_RF_HP = nil
---@type unitrealfield
Native.UNIT_RF_MANA = nil
---@type unitrealfield
Native.UNIT_RF_ACQUISITION_RANGE = nil
---@type unitrealfield
Native.UNIT_RF_CAST_BACK_SWING = nil
---@type unitrealfield
Native.UNIT_RF_CAST_POINT = nil
---@type unitrealfield
Native.UNIT_RF_MINIMUM_ATTACK_RANGE = nil
---@type unitbooleanfield
Native.UNIT_BF_RAISABLE = nil
---@type unitbooleanfield
Native.UNIT_BF_DECAYABLE = nil
---@type unitbooleanfield
Native.UNIT_BF_IS_A_BUILDING = nil
---@type unitbooleanfield
Native.UNIT_BF_USE_EXTENDED_LINE_OF_SIGHT = nil
---@type unitbooleanfield
Native.UNIT_BF_NEUTRAL_BUILDING_SHOWS_MINIMAP_ICON = nil
---@type unitbooleanfield
Native.UNIT_BF_HERO_HIDE_HERO_INTERFACE_ICON = nil
---@type unitbooleanfield
Native.UNIT_BF_HERO_HIDE_HERO_MINIMAP_DISPLAY = nil
---@type unitbooleanfield
Native.UNIT_BF_HERO_HIDE_HERO_DEATH_MESSAGE = nil
---@type unitbooleanfield
Native.UNIT_BF_HIDE_MINIMAP_DISPLAY = nil
---@type unitbooleanfield
Native.UNIT_BF_SCALE_PROJECTILES = nil
---@type unitbooleanfield
Native.UNIT_BF_SELECTION_CIRCLE_ON_WATER = nil
---@type unitbooleanfield
Native.UNIT_BF_HAS_WATER_SHADOW = nil
---@type unitstringfield
Native.UNIT_SF_NAME = nil
---@type unitstringfield
Native.UNIT_SF_PROPER_NAMES = nil
---@type unitstringfield
Native.UNIT_SF_GROUND_TEXTURE = nil
---@type unitstringfield
Native.UNIT_SF_SHADOW_IMAGE_UNIT = nil
---@type unitweaponintegerfield
Native.UNIT_WEAPON_IF_ATTACK_DAMAGE_NUMBER_OF_DICE = nil
---@type unitweaponintegerfield
Native.UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE = nil
---@type unitweaponintegerfield
Native.UNIT_WEAPON_IF_ATTACK_DAMAGE_SIDES_PER_DIE = nil
---@type unitweaponintegerfield
Native.UNIT_WEAPON_IF_ATTACK_MAXIMUM_NUMBER_OF_TARGETS = nil
---@type unitweaponintegerfield
Native.UNIT_WEAPON_IF_ATTACK_ATTACK_TYPE = nil
---@type unitweaponintegerfield
Native.UNIT_WEAPON_IF_ATTACK_WEAPON_SOUND = nil
---@type unitweaponintegerfield
Native.UNIT_WEAPON_IF_ATTACK_AREA_OF_EFFECT_TARGETS = nil
---@type unitweaponintegerfield
Native.UNIT_WEAPON_IF_ATTACK_TARGETS_ALLOWED = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_BACKSWING_POINT = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_DAMAGE_POINT = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_BASE_COOLDOWN = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_DAMAGE_LOSS_FACTOR = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_DAMAGE_FACTOR_MEDIUM = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_DAMAGE_FACTOR_SMALL = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_DAMAGE_SPILL_DISTANCE = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_DAMAGE_SPILL_RADIUS = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_PROJECTILE_SPEED = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_PROJECTILE_ARC = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_FULL_DAMAGE = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_MEDIUM_DAMAGE = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_SMALL_DAMAGE = nil
---@type unitweaponrealfield
Native.UNIT_WEAPON_RF_ATTACK_RANGE = nil
---@type unitweaponbooleanfield
Native.UNIT_WEAPON_BF_ATTACK_SHOW_UI = nil
---@type unitweaponbooleanfield
Native.UNIT_WEAPON_BF_ATTACKS_ENABLED = nil
---@type unitweaponbooleanfield
Native.UNIT_WEAPON_BF_ATTACK_PROJECTILE_HOMING_ENABLED = nil
---@type unitweaponstringfield
Native.UNIT_WEAPON_SF_ATTACK_PROJECTILE_ART = nil
---@type movetype
Native.MOVE_TYPE_UNKNOWN = nil
---@type movetype
Native.MOVE_TYPE_FOOT = nil
---@type movetype
Native.MOVE_TYPE_FLY = nil
---@type movetype
Native.MOVE_TYPE_HORSE = nil
---@type movetype
Native.MOVE_TYPE_HOVER = nil
---@type movetype
Native.MOVE_TYPE_FLOAT = nil
---@type movetype
Native.MOVE_TYPE_AMPHIBIOUS = nil
---@type movetype
Native.MOVE_TYPE_UNBUILDABLE = nil
---@type targetflag
Native.TARGET_FLAG_NONE = nil
---@type targetflag
Native.TARGET_FLAG_GROUND = nil
---@type targetflag
Native.TARGET_FLAG_AIR = nil
---@type targetflag
Native.TARGET_FLAG_STRUCTURE = nil
---@type targetflag
Native.TARGET_FLAG_WARD = nil
---@type targetflag
Native.TARGET_FLAG_ITEM = nil
---@type targetflag
Native.TARGET_FLAG_TREE = nil
---@type targetflag
Native.TARGET_FLAG_WALL = nil
---@type targetflag
Native.TARGET_FLAG_DEBRIS = nil
---@type targetflag
Native.TARGET_FLAG_DECORATION = nil
---@type targetflag
Native.TARGET_FLAG_BRIDGE = nil
---@type defensetype
Native.DEFENSE_TYPE_LIGHT = nil
---@type defensetype
Native.DEFENSE_TYPE_MEDIUM = nil
---@type defensetype
Native.DEFENSE_TYPE_LARGE = nil
---@type defensetype
Native.DEFENSE_TYPE_FORT = nil
---@type defensetype
Native.DEFENSE_TYPE_NORMAL = nil
---@type defensetype
Native.DEFENSE_TYPE_HERO = nil
---@type defensetype
Native.DEFENSE_TYPE_DIVINE = nil
---@type defensetype
Native.DEFENSE_TYPE_NONE = nil
---@type heroattribute
Native.HERO_ATTRIBUTE_STR = nil
---@type heroattribute
Native.HERO_ATTRIBUTE_INT = nil
---@type heroattribute
Native.HERO_ATTRIBUTE_AGI = nil
---@type armortype
Native.ARMOR_TYPE_WHOKNOWS = nil
---@type armortype
Native.ARMOR_TYPE_FLESH = nil
---@type armortype
Native.ARMOR_TYPE_METAL = nil
---@type armortype
Native.ARMOR_TYPE_WOOD = nil
---@type armortype
Native.ARMOR_TYPE_ETHREAL = nil
---@type armortype
Native.ARMOR_TYPE_STONE = nil
---@type regentype
Native.REGENERATION_TYPE_NONE = nil
---@type regentype
Native.REGENERATION_TYPE_ALWAYS = nil
---@type regentype
Native.REGENERATION_TYPE_BLIGHT = nil
---@type regentype
Native.REGENERATION_TYPE_DAY = nil
---@type regentype
Native.REGENERATION_TYPE_NIGHT = nil
---@type unitcategory
Native.UNIT_CATEGORY_GIANT = nil
---@type unitcategory
Native.UNIT_CATEGORY_UNDEAD = nil
---@type unitcategory
Native.UNIT_CATEGORY_SUMMONED = nil
---@type unitcategory
Native.UNIT_CATEGORY_MECHANICAL = nil
---@type unitcategory
Native.UNIT_CATEGORY_PEON = nil
---@type unitcategory
Native.UNIT_CATEGORY_SAPPER = nil
---@type unitcategory
Native.UNIT_CATEGORY_TOWNHALL = nil
---@type unitcategory
Native.UNIT_CATEGORY_ANCIENT = nil
---@type unitcategory
Native.UNIT_CATEGORY_NEUTRAL = nil
---@type unitcategory
Native.UNIT_CATEGORY_WARD = nil
---@type unitcategory
Native.UNIT_CATEGORY_STANDON = nil
---@type unitcategory
Native.UNIT_CATEGORY_TAUREN = nil
---@type pathingflag
Native.PATHING_FLAG_UNWALKABLE = nil
---@type pathingflag
Native.PATHING_FLAG_UNFLYABLE = nil
---@type pathingflag
Native.PATHING_FLAG_UNBUILDABLE = nil
---@type pathingflag
Native.PATHING_FLAG_UNPEONHARVEST = nil
---@type pathingflag
Native.PATHING_FLAG_BLIGHTED = nil
---@type pathingflag
Native.PATHING_FLAG_UNFLOATABLE = nil
---@type pathingflag
Native.PATHING_FLAG_UNAMPHIBIOUS = nil
---@type pathingflag
Native.PATHING_FLAG_UNITEMPLACABLE = nil
--@end-remove@
--@classic@
local _native = require('jass.common')
--@end-classic@
--@reforge@
local _native = _G
--@end-reforge@
for _, v in ipairs(require('lib.stdlib.native._generated._globals')) do
Native[v] = _native[v]
end
return Native
|
require("awful.autofocus")
awful = require("awful")
awful.rules = require("awful.rules")
beautiful = require("beautiful")
naughty = require("naughty")
-- Simple function to load additional LUA files.
function loadrc(name, mod)
local success
local result
-- Which file? In rc/ or in lib/?
local path = awful.util.getdir("config") .. "/" ..
(mod and "lib" or "rc") .. "/" .. name .. ".lua"
-- If the module is already loaded, don't load it again
if mod and package.loaded[mod] then return package.loaded[mod] end
-- Execute the RC/module file
success, result = pcall(function() return dofile(path) end)
if not success then
naughty.notify({
preset = naughty.config.presets.critical,
title = "Error while loading an RC file",
text = "When loading `" .. name .. "`, got the following error:\n" .. result
})
return print("E: error loading RC file '" .. name .. "': " .. result)
end
-- Is it a module?
if mod then
return package.loaded[mod]
end
return result
end
-- Error handling
loadrc("errors")
-- Global configuration
modkey = "Mod4"
config = {}
config.keys = {}
config.keys.global = {}
config.buttons = {}
config.terminal = "urxvt"
config.term_cmd = config.terminal .. " -e "
config.editor = os.getenv("EDITOR") or "vim"
config.browser = os.getenv("BROWSER") or "chromium"
config.layouts = {
awful.layout.suit.tile, -- 1
awful.layout.suit.tile.bottom, -- 2
awful.layout.suit.fair, -- 3
awful.layout.suit.max, -- 4
awful.layout.suit.magnifier, -- 5
awful.layout.suit.floating -- 6
}
loadrc("appearance")
loadrc("wibar")
loadrc("tags")
loadrc("bindings")
loadrc("rules")
loadrc("signals")
|
function Player:onBrowseField(position)
return true
end
function Player:onLook(thing, position, distance)
local utf8 = require("data/lib/utf8")
local description = utf8.convert("You see " .. thing:getDescription(distance))
if self:getGroup():getAccess() then
if thing:isItem() then
description = string.format("%s\nItem ID: %d", description, thing:getId())
local actionId = thing:getActionId()
if actionId ~= 0 then
description = string.format("%s, Action ID: %d", description, actionId)
end
local uniqueId = thing:getAttribute(ITEM_ATTRIBUTE_UNIQUEID)
if uniqueId > 0 and uniqueId < 65536 then
description = string.format("%s, Unique ID: %d", description, uniqueId)
end
local itemType = thing:getType()
local transformEquipId = itemType:getTransformEquipId()
local transformDeEquipId = itemType:getTransformDeEquipId()
if transformEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onEquip).", description, transformEquipId)
elseif transformDeEquipId ~= 0 then
description = string.format("%s\nTransforms to: %d (onDeEquip).", description, transformDeEquipId)
end
local decayId = itemType:getDecayId()
if decayId ~= -1 then
description = string.format("%s\nDecay to: %d", description, decayId)
end
elseif thing:isCreature() then
local str = "%s\nHealth: %d / %d"
if thing:isPlayer() and thing:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, thing:getMana(), thing:getMaxMana())
end
description = string.format(str, description, thing:getHealth(), thing:getMaxHealth()) .. "."
end
local position = thing:getPosition()
description = string.format(
"%s\nPosition: %d, %d, %d.",
description, position.x, position.y, position.z
)
if thing:isCreature() then
if thing:isPlayer() then
description = string.format("%s\nIP: %s.", description, Game.convertIpToString(thing:getIp()))
end
end
end
self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
function Player:onLookInBattleList(creature, distance)
local description = "You see " .. creature:getDescription(distance)
if self:getGroup():getAccess() then
local str = "%s\nHealth: %d / %d"
if creature:isPlayer() and creature:getMaxMana() > 0 then
str = string.format("%s, Mana: %d / %d", str, creature:getMana(), creature:getMaxMana())
end
description = string.format(str, description, creature:getHealth(), creature:getMaxHealth()) .. "."
local position = creature:getPosition()
description = string.format(
"%s\nPosition: %d, %d, %d.",
description, position.x, position.y, position.z
)
if creature:isPlayer() then
description = string.format("%s\nIP: %s.", description, Game.convertIpToString(creature:getIp()))
end
end
self:sendTextMessage(MESSAGE_INFO_DESCR, description)
end
function Player:onLookInTrade(partner, item, distance)
self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. item:getDescription(distance))
end
function Player:onLookInShop(itemType, count)
return true
end
function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
local tile = Tile(toPosition)
if tile and tile:getHouse() ~= nil then
if tile:getItemCount() == 9 then
self:sendCancelMessage("You can't add more items to this tile.")
return false
else
local peso = item:getWeight()
local pesoMaximo = 1500000
local itens = tile:getItems()
if itens then
for i = 1, #itens do
peso = peso + itens[i]:getWeight()
end
end
if peso > pesoMaximo then
self:sendCancelMessage("You can't add more items to this tile.")
return false
end
end
end
local verificarItem = false
if isInArray(itensMovimentoDesativado, item:getActionId()) then
verificarItem = true
elseif item:isContainer() then
for k, actionId in pairs(itensMovimentoDesativado) do
if #item:getAllItemsByAction(false, actionId) > 0 then
verificarItem = true
end
end
end
local movimentoBloqueado = false
if verificarItem then
movimentoBloqueado = true
if fromPosition.x == CONTAINER_POSITION and toPosition.x == CONTAINER_POSITION then
if toCylinder:isItem() then
if item:getTopParent() == toCylinder:getTopParent() then
movimentoBloqueado = false
end
end
end
end
if toPosition.x == CONTAINER_POSITION then
local containerId = toPosition.y - 64
local container = self:getContainerById(containerId)
if not container then
return true
end
local tile = Tile(container:getPosition())
for _, item in ipairs(tile:getItems()) do
if item:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == 2^31 - 1 and item:getName() == container:getName() then
movimentoBloqueado = true
end
end
end
if item:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == 2^31 - 1 then
movimentoBloqueado = true
end
if movimentoBloqueado then
self:sendCancelMessage("You can't move this item.")
return false
end
if toPosition.x ~= CONTAINER_POSITION then
return true
end
if item:getTopParent() == self and bit.band(toPosition.y, 0x40) == 0 then
local itemType, moveItem = ItemType(item:getId())
if bit.band(itemType:getSlotPosition(), SLOTP_TWO_HAND) ~= 0 and toPosition.y == CONST_SLOT_LEFT then
moveItem = self:getSlotItem(CONST_SLOT_RIGHT)
elseif itemType:getWeaponType() == WEAPON_SHIELD and toPosition.y == CONST_SLOT_RIGHT then
moveItem = self:getSlotItem(CONST_SLOT_LEFT)
if moveItem and bit.band(ItemType(moveItem:getId()):getSlotPosition(), SLOTP_TWO_HAND) == 0 then
return true
end
end
if moveItem then
local parent = item:getParent()
if parent:getSize() == parent:getCapacity() then
self:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_CONTAINERNOTENOUGHROOM))
return false
else
return moveItem:moveTo(parent)
end
end
end
return true
end
function Player:onMoveCreature(creature, fromPosition, toPosition)
return true
end
local function hasPendingReport(name, targetName, reportType)
local f = io.open(string.format("data/reports/players/%s-%s-%d.txt", name, targetName, reportType), "r")
if f then
io.close(f)
return true
else
return false
end
end
function Player:onReportRuleViolation(targetName, reportType, reportReason, comment, translation)
local name = self:getName()
if hasPendingReport(name, targetName, reportType) then
self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your report is being processed.")
return
end
local file = io.open(string.format("data/reports/players/%s-%s-%d.txt", name, targetName, reportType), "a")
if not file then
self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "There was an error when processing your report, please contact a gamemaster.")
return
end
io.output(file)
io.write("------------------------------\n")
io.write("Reported by: " .. name .. "\n")
io.write("Target: " .. targetName .. "\n")
io.write("Type: " .. reportType .. "\n")
io.write("Reason: " .. reportReason .. "\n")
io.write("Comment: " .. comment .. "\n")
if reportType ~= REPORT_TYPE_BOT then
io.write("Translation: " .. translation .. "\n")
end
io.write("------------------------------\n")
io.close(file)
self:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("Thank you for reporting %s. Your report will be processed by %s team as soon as possible.", targetName, configManager.getString(configKeys.SERVER_NAME)))
return
end
function Player:onReportBug(message, position, category)
if self:getAccountType() == ACCOUNT_TYPE_NORMAL then
return false
end
local name = self:getName()
local file = io.open("data/reports/bugs/" .. name .. " report.txt", "a")
if not file then
self:sendTextMessage(MESSAGE_EVENT_DEFAULT, "There was an error when processing your report, please contact a gamemaster.")
return true
end
io.output(file)
io.write("------------------------------\n")
io.write("Name: " .. name)
if category == BUG_CATEGORY_MAP then
io.write(" [Map position: " .. position.x .. ", " .. position.y .. ", " .. position.z .. "]")
end
local playerPosition = self:getPosition()
io.write(" [Player Position: " .. playerPosition.x .. ", " .. playerPosition.y .. ", " .. playerPosition.z .. "]\n")
io.write("Comment: " .. message .. "\n")
io.close(file)
self:sendTextMessage(MESSAGE_EVENT_DEFAULT, "Your report has been sent to " .. configManager.getString(configKeys.SERVER_NAME) .. ".")
return true
end
function Player:onTurn(direction)
if self:getDirection() == direction and self:getGroup():getAccess() then
local nextPosition = self:getPosition()
nextPosition:getNextPosition(direction)
self:teleportTo(nextPosition, true)
end
return true
end
function Player:onTradeRequest(target, item)
if item:isContainer() then
for k, actionId in pairs(itensMovimentoDesativado) do
verificarItens = item:getAllItemsByAction(false, actionId)
if #verificarItens > 0 then
self:sendCancelMessage("You can't trade this item.")
return false
end
end
end
if isInArray(itensMovimentoDesativado, item:getActionId()) then
self:sendCancelMessage("You can't trade this item.")
return false
end
return true
end
function Player:onTradeAccept(target, item, targetItem)
return true
end
local soulCondition = Condition(CONDITION_SOUL, CONDITIONID_DEFAULT)
soulCondition:setTicks(4 * 60 * 1000)
soulCondition:setParameter(CONDITION_PARAM_SOULGAIN, 1)
local function useStamina(player)
local staminaMinutes = player:getStamina()
if staminaMinutes == 0 then
return
end
local playerId = player:getId()
local currentTime = os.time()
local timePassed = currentTime - nextUseStaminaTime[playerId]
if timePassed <= 0 then
return
end
if timePassed > 60 then
if staminaMinutes > 2 then
staminaMinutes = staminaMinutes - 2
else
staminaMinutes = 0
end
nextUseStaminaTime[playerId] = currentTime + 120
else
staminaMinutes = staminaMinutes - 1
nextUseStaminaTime[playerId] = currentTime + 60
end
player:setStamina(staminaMinutes)
end
function Player:onGainExperience(source, exp, rawExp)
if not source or source:isPlayer() then
return exp
end
-- Soul regeneration
local vocation = self:getVocation()
if self:getSoul() < vocation:getMaxSoul() and exp >= self:getLevel() then
soulCondition:setParameter(CONDITION_PARAM_SOULTICKS, vocation:getSoulGainTicks() * 1000)
self:addCondition(soulCondition)
end
-- Apply experience stage multiplier
exp = exp * Game.getExperienceStage(self:getLevel())
-- Stamina modifier
if configManager.getBoolean(configKeys.STAMINA_SYSTEM) then
useStamina(self)
local staminaMinutes = self:getStamina()
if staminaMinutes > 2400 and self:isPremium() then
exp = exp * 1.5
elseif staminaMinutes <= 840 then
exp = exp * 0.5
end
end
return exp
end
function Player:onLoseExperience(exp)
return exp
end
function Player:onGainSkillTries(skill, tries)
if APPLY_SKILL_MULTIPLIER == false then
return tries
end
if skill == SKILL_MAGLEVEL then
return tries * configManager.getNumber(configKeys.RATE_MAGIC)
end
return tries * configManager.getNumber(configKeys.RATE_SKILL)
end
|
local root = fs.ydwe_devpath()
local w3xparser = require 'w3xparser'
local mpq = root / 'share' / 'zh-CN' / 'mpq'
local info = load(io.load(root / 'plugin' / 'w3x2lni' / 'script' / 'core' / 'info.lua'))()
local typedefine = {
aibuffer = 3,
armortype = 3,
attackbits = 0,
attacktype = 3,
attributetype = 3,
bool = 0,
channelflags = 0,
channeltype = 0,
combatsound = 3,
deathtype = 0,
defensetype = 3,
defensetypeint = 0,
detectiontype = 0,
fullflags = 0,
int = 0,
interactionflags = 0,
itemclass = 3,
lightningeffect = 3,
morphflags = 0,
movetype = 3,
pathinglistprevent = 3,
pathinglistrequire = 3,
pickflags = 0,
real = 1,
regentype = 3,
shadowimage = 3,
silenceflags = 0,
spelldetail = 0,
stackflags = 0,
targetlist = 3,
targettype = 3,
teamcolor = 0,
techavail = 0,
unitclass = 3,
unitrace = 3,
unreal = 2,
upgradeclass = 3,
upgradeeffect = 3,
versionflags = 0,
weapontype = 3,
}
local select = select
local tonumber = tonumber
local tostring = tostring
local string_unpack = string.unpack
local string_pack = string.pack
local string_lower = string.lower
local string_sub = string.sub
local math_floor = math.floor
local table_concat = table.concat
local buf_pos
local unpack_buf
local unpack_pos
local has_level
local metadata
local check_bufs
local function set_pos(...)
unpack_pos = select(-1, ...)
return ...
end
local function unpack(str)
return set_pos(string_unpack(str, unpack_buf, unpack_pos))
end
local function unpack_data(name)
local id, type = unpack 'c4l'
local id = id:match '%Z+'
local except
local meta = metadata[id]
if meta then
except = typedefine[string_lower(meta.type)] or 3
else
except = type
end
if type ~= except then
if type == 3 or except == 3 then
except = type
else
check_bufs[#check_bufs+1] = string_sub(unpack_buf, buf_pos, unpack_pos - 5)
check_bufs[#check_bufs+1] = string_pack('l', except)
buf_pos = unpack_pos
end
end
if has_level then
unpack 'll'
if type ~= except then
check_bufs[#check_bufs+1] = string_sub(unpack_buf, buf_pos, unpack_pos - 1)
buf_pos = unpack_pos
end
end
local value
if type == 0 then
value = unpack 'l'
elseif type == 1 or type == 2 then
value = unpack 'f'
else
value = unpack 'z'
end
if type ~= except then
local format, newvalue
if except == 0 then
format = 'l'
newvalue = math_floor(value)
elseif except == 1 or except == 2 then
format = 'f'
newvalue = value + 0.0
end
check_bufs[#check_bufs+1] = string_pack(format, newvalue)
buf_pos = unpack_pos
log.debug(('convert object type:[%s][%s] - [%d][%s] --> [%d][%s]'):format(name, id, type, value, except, newvalue))
end
unpack 'l'
end
local function unpack_obj()
local parent, name, count = unpack 'c4c4l'
for i = 1, count do
unpack_data(name == '\0\0\0\0' and parent or name)
end
end
local function unpack_chunk()
local count = unpack 'l'
for i = 1, count do
unpack_obj()
end
end
local function unpack_head()
unpack 'l'
end
local function check(type, buf)
buf_pos = 1
unpack_pos = 1
unpack_buf = buf
has_level = info.key.max_level[type]
if type == 'doodad' then
metadata = w3xparser.slk(io.load(mpq / 'doodads' / info.metadata[type]))
else
metadata = w3xparser.slk(io.load(mpq / 'units' / info.metadata[type]))
end
check_bufs = {}
unpack_head()
unpack_chunk()
unpack_chunk()
if buf_pos > 1 then
check_bufs[#check_bufs+1] = unpack_buf:sub(buf_pos)
return table_concat(check_bufs)
end
return buf
end
local function init()
local storm = require 'virtual_storm'
for _, type in ipairs {'ability', 'unit', 'item', 'doodad', 'destructable', 'buff', 'upgrade'} do
local filename = info.obj[type]
virtual_mpq.force_watch(filename, function ()
return check(type, storm.load_file(filename))
end)
end
end
init()
|
return {
tllwin = {
activatewhenbuilt = true,
buildangle = 8192,
buildcostenergy = 134,
buildcostmetal = 48,
builder = false,
buildpic = "tllwin.dds",
buildtime = 1500,
category = "ALL SURFACE",
collisionvolumeoffsets = "0 -3 0",
collisionvolumescales = "38 52 38",
collisionvolumetype = "box",
corpse = "dead",
description = "Produces Energy",
digger = 1,
energyuse = 0,
explodeas = "WIND_EX",
footprintx = 3,
footprintz = 3,
icontype = "building",
idleautoheal = 5,
idletime = 1800,
losemitheight = 39,
mass = 39,
maxdamage = 180,
maxslope = 10,
maxwaterdepth = 0,
name = "Wind Trap",
noautofire = false,
objectname = "tllwin",
radardistance = 0,
radaremitheight = 38,
selfdestructas = "SMALL_BUILDING",
sightdistance = 210,
unitname = "tllwin",
windgenerator = 120,
yardmap = "ooooooooo",
customparams = {
buildpic = "tllwin.dds",
faction = "TLL",
},
featuredefs = {
dead = {
blocking = true,
damage = 389,
description = "Wind Trap Wreckage",
featuredead = "heap",
footprintx = 4,
footprintz = 4,
metal = 29,
object = "tllwin_dead",
reclaimable = true,
customparams = {
fromunit = 1,
},
},
heap = {
blocking = false,
damage = 486,
description = "Wind Trap Debris",
footprintx = 4,
footprintz = 4,
metal = 15,
object = "4x4f",
reclaimable = true,
customparams = {
fromunit = 1,
},
},
},
sfxtypes = {
pieceexplosiongenerators = {
[1] = "piecetrail5",
[2] = "piecetrail5",
[3] = "piecetrail4",
[4] = "piecetrail6",
},
},
sounds = {
canceldestruct = "cancel2",
deactivate = "tllwindstop",
underattack = "tllwarning",
working = "tllwind2",
count = {
[1] = "tllcount",
[2] = "tllcount",
[3] = "tllcount",
[4] = "tllcount",
[5] = "tllcount",
[6] = "tllcount",
},
select = {
[1] = "tllwindsel",
},
},
},
}
|
--------------------------------------------------------------------------
-- GTFO_Recount.lua
--------------------------------------------------------------------------
--[[
GTFO & Recount Integration
Author: Zensunim of Malygos
Change Log:
v4.1
- Added Recount Integration
v4.6
- Fixed label text
]]--
function GTFO_Recount()
local L = LibStub("AceLocale-3.0"):GetLocale("Recount");
local DetailTitles={}
DetailTitles.GTFOEvents={
TopNames = L["Type"],
TopCount = L["Count"],
TopAmount = L["Damage"],
BotNames = L["Ability Name"],
BotMin = L["Min"],
BotAvg = L["Avg"],
BotMax = L["Max"],
BotAmount = L["Count"]
}
local RecountGTFO = {}
function RecountGTFO:DataModesGTFO(data, num)
if not data then return 0 end
if num == 1 then
return (data.Fights[Recount.db.profile.CurDataSet].GTFOEventDamage or 0), tostring((data.Fights[Recount.db.profile.CurDataSet].GTFOEvents or 0))
else
return (data.Fights[Recount.db.profile.CurDataSet].GTFOEventDamage or 0), {{data.Fights[Recount.db.profile.CurDataSet].GTFOEvent,": "..GTFOLocal.Recount_Name,DetailTitles.GTFOEvents}}
end
end
function RecountGTFO:TooltipFuncsGTFO(name,data)
local SortedData,total
GameTooltip:ClearLines()
GameTooltip:AddLine(name)
Recount:AddSortedTooltipData(GTFOLocal.Recount_Name,data and data.Fights[Recount.db.profile.CurDataSet] and data.Fights[Recount.db.profile.CurDataSet].GTFOEvent,4)
GameTooltip:AddLine("<"..L["Click for more Details"]..">",0,0.9,0);
end
Recount:AddModeTooltip(GTFOLocal.Recount_Name,RecountGTFO.DataModesGTFO,RecountGTFO.TooltipFuncsGTFO,nil,nil,nil,nil)
function GTFO_RecordRecount(source, alertID, SpellName, damage)
local sourceData = Recount.db2.combatants[source];
if not sourceData then
GTFO_DebugPrint("No source combatant found in Recount for "..tostring(source).."!");
return;
end
local alertType = GTFO_GetAlertType(alertID);
if not alertType then
return;
end
Recount:SetActive(sourceData);
Recount:AddAmount(sourceData, "GTFOEvents", 1);
Recount:AddAmount(sourceData, "GTFOEventDamage", damage);
Recount:AddTableDataStats(sourceData, "GTFOEvent", alertType, SpellName, damage);
end
GTFO_DebugPrint("Recount integration loaded.");
return true;
end
|
MonkTimers_GlobalSettings = nil
MonkTimers_Profiles = nil
|
--ゼアル・アライアンス
--
--Script by 龙骑
function c101104209.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104209,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(c101104209.spcon)
e1:SetCost(c101104209.spcost)
e1:SetTarget(c101104209.sptg)
e1:SetOperation(c101104209.spop)
c:RegisterEffect(e1)
end
function c101104209.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsType(TYPE_XYZ)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
end
function c101104209.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101104209.cfilter,1,e:GetHandler(),tp)
end
function c101104209.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>10 end
Duel.PayLPCost(tp,Duel.GetLP(tp)-10)
end
function c101104209.spfilter(c,e,tp)
return c:IsSetCard(0x107f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c101104209.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101104209.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_DECK,0,1,nil)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c101104209.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101104209.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(c101104209.indval)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101104209,1))
end
Duel.SpecialSummonComplete()
--to deck top
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101104209,2))
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
function c101104209.indval(e,c)
return not c:IsSetCard(0x48)
end |
--- A LuaJIT FFI binding for Telegram's Database Library (TDLib)'s JSON interface.
-- @module luajit-tdlib
-- @alias tdlib
local ffi = require("ffi")
local Client = require("luajit-tdlib.Client")
local tdlib = {}
--- The loaded FFI object of tdlib (clib or nil).
-- @local
-- @field _clib
--- Initializes the TDLib library, must be done before creating any client instances.
-- @tparam ?string libPath The path into the TDLib shared library, defaults to `./libtdjson.so`.
-- @raise Error on library loading failure.
-- @usage local tdlib = require("luajit-tdlib")
--tdlib.initialize("./libtdjson.so")
function tdlib.initialize(libPath)
if tdlib._clib then return error("tdlib has been already initialized!") end
ffi.cdef[[
void * td_json_client_create();
void td_json_client_send(void *client, const char *request);
const char * td_json_client_receive(void *client, double timeout);
const char * td_json_client_execute(void *client, const char *request);
void td_json_client_destroy(void *client);
]]
tdlib._clib = ffi.load(libPath or "./libtdjson.so")
end
--- Creates a new instance of TDLib.
-- @treturn Client The created instance of TDLib.
-- @raise Error if tdlib was not initialized.
-- @usage local tdlib = require("luajit-tdlib")
-- tdlib.initialize("./libtdjson.so")
-- local client = tdlib.newClient()
-- client:destroy()
function tdlib.newClient()
if not tdlib._clib then return error("tdlib has not been initialized yet!") end
return Client(tdlib._clib)
end
return tdlib |
require 'Coat'
local string = require 'string'
abstract 'Smc.Generator'
has.suffix = { is = 'ro', isa = 'string', required = true }
has.srcfileBase = { is = 'ro', isa = 'string', required = true }
has.targetfileBase = { is = 'ro', isa = 'string', required = true }
has.scopeSep = { is = 'ro', isa = 'string', default = '.' }
has.next_generator = { is = 'ro', isa = 'Smc.Generator' }
has.castType = { is = 'rw', isa = 'string', default = 'dynamic_cast' }
has.accessLevel = { is = 'rw', isa = 'string', default = 'public' }
has.srcDirectory = { is = 'rw', isa = 'string', default = '' }
has.headerDirectory = { is = 'rw', isa = 'string' }
has.graphLevel = { is = 'rw', isa = 'number', default = 0 }
has.debugLevel = { is = 'rw', isa = 'number', default = -1 }
has.serialFlag = { is = 'rw', isa = 'boolean', default = false }
has.noExceptionFlag = { is = 'rw', isa = 'boolean', default = false }
has.noCatchFlag = { is = 'rw', isa = 'boolean', default = false }
has.noStreamFlag = { is = 'rw', isa = 'boolean', default = false }
has.reflectFlag = { is = 'rw', isa = 'boolean', default = false }
has.syncFlag = { is = 'rw', isa = 'boolean', default = false }
has.genericFlag = { is = 'rw', isa = 'boolean', default = false }
has.java7Flag = { is = 'rw', isa = 'boolean', default = false }
has.stream = { is = 'rw', isa = 'file' }
has.guardCount = { is = 'rw', isa = 'number' }
has.guardIndex = { is = 'rw', isa = 'number' }
has.debugLevel0 = { is = 'ro', lazy_build = true }
has.debugLevel1 = { is = 'ro', lazy_build = true }
has.graphLevel1 = { is = 'ro', lazy_build = true }
has.graphLevel2 = { is = 'ro', lazy_build = true }
has.catchFlag = { is = 'ro', lazy_build = true }
has.template = { is = 'ro', lazy_build = true }
function method:_build_debugLevel0 ()
return self.debugLevel >= 0
end
function method:_build_debugLevel1 ()
return self.debugLevel >= 1
end
function method:_build_graphLevel1 ()
return self.graphLevel >= 1
end
function method:_build_graphLevel2 ()
return self.graphLevel >= 2
end
function method:_build_catchFlag ()
return not self.noCatchFlag
end
function method:generate(fsm, stream)
local tmpl = self.template
tmpl.fsm = fsm
tmpl.generator = self
local output, msg = tmpl 'TOP'
stream:write(output)
if msg then error(msg) end
end
function method:sourceFile(path, basename, suffix)
suffix = suffix or self.suffix
return path .. basename .. "." .. suffix
end
|
--------------------------------------------------------------------------------
-- Function : FTP Upload Demo
-- Author : ArisHu(50362)
-- Note : This demo use luasocket ftp, this module can only be run
-- with Lua interpreter 5.1, so first parameter of lagent.execute
-- should be 1
--------------------------------------------------------------------------------
local lagent = require("utils.LAgent")
lagent.execute(1, [[
local ftp = require('socket.ftp')
local ltn12 = require('ltn12')
]], [[
ftp.put{
host = '192.168.3.3',
user = 'hwc',
password = 'hwc123456',
-- command = 'appe',
argument = '/smarthome.rar',
type = 'i',
source = ltn12.source.file(io.open('D:\\demo\\smarthome.rar', 'rb'))
}
]])
local res, errMsg = lagent.getResults()
if errMsg then
print("Upload failed: ", tostring(errMsg))
end
print("Upload Successfully") |
insulate("config", function()
it("defaults", function()
stub(os, "getenv")
local config = require("plugins.mtag.config")
assert.is_equal(config.controller.hostname, nil)
assert.is_equal(config.controller.port, 443)
assert.is_equal(config.controller.prefix, "")
assert.is_equal(config.controller.secret, nil)
assert.is_equal(config.controller.ssl, true)
assert.is_equal(config.controller.ssl_verify, true)
assert.is_equal(config.redis.hostname, nil)
assert.is_equal(config.redis.port, 6379)
assert.is_equal(config.redis.pool_size, 10)
assert.is_equal(config.redis.backlog, nil)
assert.is_equal(config.redis.timeout, 1)
assert.is_equal(config.redis.ssl, false)
assert.is_equal(config.redis.ssl_verify, false)
assert.is_equal(config.redis.shared_dict_failover, true)
end)
end)
insulate("config", function()
it("all parameters set", function()
stub(os, "getenv")
os.getenv.on_call_with("MTAG_CONTROLLER_HOST").returns("controller:81")
os.getenv.on_call_with("MTAG_CONTROLLER_PREFIX").returns("/some/profix")
os.getenv.on_call_with("MTAG_CONTROLLER_SECRET").returns("SeCrEt")
os.getenv.on_call_with("MTAG_CONTROLLER_SSL").returns("false ")
os.getenv.on_call_with("MTAG_CONTROLLER_SSL_VERIFY").returns(" false")
os.getenv.on_call_with("MTAG_REDIS_HOST").returns("redis:1234")
os.getenv.on_call_with("MTAG_REDIS_POOL_SIZE").returns(" 20")
os.getenv.on_call_with("MTAG_REDIS_BACKLOG").returns("19 ")
os.getenv.on_call_with("MTAG_REDIS_TIMEOUT").returns(" 2 ")
os.getenv.on_call_with("MTAG_REDIS_SSL").returns("false ")
os.getenv.on_call_with("MTAG_REDIS_SSL_VERIFY").returns(" false")
os.getenv.on_call_with("MTAG_REDIS_SHARED_DICT_FAILOVER").returns(" false ")
local config = require("plugins.mtag.config")
assert.is_equal(config.controller.hostname, "controller")
assert.is_equal(config.controller.port, 81)
assert.is_equal(config.controller.prefix, "/some/profix")
assert.is_equal(config.controller.secret, "SeCrEt")
assert.is_equal(config.controller.ssl, false)
assert.is_equal(config.controller.ssl_verify, false)
assert.is_equal(config.redis.hostname, "redis")
assert.is_equal(config.redis.port, 1234)
assert.is_equal(config.redis.pool_size, 20)
assert.is_equal(config.redis.backlog, 19)
assert.is_equal(config.redis.timeout, 2)
assert.is_equal(config.redis.ssl, false)
assert.is_equal(config.redis.ssl_verify, false)
assert.is_equal(config.redis.shared_dict_failover, false)
end)
end)
insulate("config", function()
it("wrong booleans", function()
stub(os, "getenv")
-- TODO
end)
end)
insulate("config", function()
it("wrong integers", function()
stub(os, "getenv")
-- TODO
end)
end)
|
--[[
The main reducer for the app's store
]]
local Root = script.Parent.Parent
local CorePackages = game:GetService("CorePackages")
local PurchasePromptDeps = require(CorePackages.PurchasePromptDeps)
local Rodux = PurchasePromptDeps.Rodux
local PromptRequestReducer = require(script.Parent.PromptRequestReducer)
local ProductInfoReducer = require(script.Parent.ProductInfoReducer)
local PremiumProductsReducer = require(script.Parent.PremiumProductsReducer)
local NativeUpsellReducer = require(script.Parent.NativeUpsellReducer)
local PromptStateReducer = require(script.Parent.PromptStateReducer)
local PurchaseErrorReducer = require(script.Parent.PurchaseErrorReducer)
local AccountInfoReducer = require(script.Parent.AccountInfoReducer)
local PurchasingStartTimeReducer = require(script.Parent.PurchasingStartTimeReducer)
local HasCompletedPurchaseReducer = require(script.Parent.HasCompletedPurchaseReducer)
local GamepadEnabledReducer = require(script.Parent.GamepadEnabledReducer)
local ABVariationReducer = require(script.Parent.ABVariationReducer)
local WindowStateReducer = require(script.Parent.WindowStateReducer)
local ButtonStateReducer = require(script.Parent.ButtonStateReducer)
local Reducer = Rodux.combineReducers({
promptRequest = PromptRequestReducer,
productInfo = ProductInfoReducer,
premiumProductInfo = PremiumProductsReducer,
nativeUpsell = NativeUpsellReducer,
promptState = PromptStateReducer,
purchaseError = PurchaseErrorReducer,
accountInfo = AccountInfoReducer,
purchasingStartTime = PurchasingStartTimeReducer,
hasCompletedPurchase = HasCompletedPurchaseReducer,
gamepadEnabled = GamepadEnabledReducer,
abVariations = ABVariationReducer,
windowState = WindowStateReducer,
buttonState = ButtonStateReducer,
})
return Reducer
|
--------------
-- Includes --
--------------
#include 'include/internal_events.lua'
addEvent('onPlayerChatting', true)
addEvent('onClientPlayerChatting', true)
----------------------
-- Global variables --
----------------------
local WHITE = tocolor(255, 255, 255)
local BLACK = tocolor(0, 0, 0)
local g_ChatMsgs = {}
local g_ChattingPlayers = {}
local g_Chatting = false
local g_ChatTexture = false
--------------------------------
-- Local function definitions --
--------------------------------
local function update()
local ticks = getTickCount()
for player, msgs in pairs(g_ChatMsgs) do
local i = 1
while (i <= #msgs) do
while(i <= #msgs and ticks - msgs[i][1] > 5000) do
table.remove(msgs, i)
end
i = i + 1
end
end
if(g_Chatting ~= isChatBoxInputActive()) then
g_Chatting = not g_Chatting
triggerServerEvent('onPlayerChatting', g_Me, g_Chatting)
end
end
local function onRender()
local cx, cy, cz = getCameraMatrix()
local localDim = getElementDimension(localPlayer)
for player, msgs in pairs(g_ChatMsgs) do
local x, y, z = getElementPosition(player)
local dim = getElementDimension(player)
local dist = getDistanceBetweenPoints3D(x, y, z, cx, cy, cz)
local dead = isPlayerDead(player)
if(dist < 50 and not dead and dim == localDim) then
local screen_x, screen_y = getScreenFromWorldPosition(x, y, z + 1)
if(screen_x and isLineOfSightClear(x, y, z, cx, cy, cz, true, false, true, true)) then
local scale = 5 / math.max(math.sqrt(dist), 0.1)
local g_FontH = dxGetFontHeight(scale)
screen_y = screen_y - #msgs * (g_FontH + 5)
for i, msg in ipairs(msgs) do
dxDrawText(msg[2], screen_x + 2, screen_y + i * ( g_FontH + scale ) + 2, screen_x + 2, 0, BLACK, scale, 'default', 'center')
dxDrawText(msg[2], screen_x, screen_y + i * ( g_FontH + scale ), screen_x, 0, WHITE, scale, 'default', 'center')
end
end
end
end
for player, v in pairs(g_ChattingPlayers) do
local x, y, z = getElementPosition(player)
local dist = getDistanceBetweenPoints3D(x, y, z, cx, cy, cz)
local dim = getElementDimension(player)
local dead = isPlayerDead(player)
if(dist < 50 and not dead and dim == localDim) then
local screen_x, screen_y = getScreenFromWorldPosition(x, y, z + 1)
if(screen_x and isLineOfSightClear(x, y, z, cx, cy, cz, true, false, true, true)) then
local size = 200 / math.max(math.sqrt(dist), 0.1)
dxDrawImage(screen_x - size / 2, screen_y - size / 2, size, size, g_ChatTexture)
end
end
end
end
local function onPlayerChat(message)
assert(message)
-- Check if messages has not been disabled
if(not Settings.msgAboveCar) then return end
-- Check if payer is visible
if(not isElementStreamedIn(source)) then return end
-- Add message to rendering
if(not g_ChatMsgs[source]) then
g_ChatMsgs[source] = {}
end
table.insert(g_ChatMsgs[source], { getTickCount (), message })
end
local function onPlayerChatting(chatting)
g_ChattingPlayers[source] = chatting and true or nil
end
local function onPlayerQuit()
g_ChatMsgs[source] = nil
g_ChattingPlayers[source] = nil
end
------------
-- Events --
------------
addInitFunc(function()
addInternalEventHandler($(EV_CLIENT_PLAYER_CHAT), onPlayerChat)
addEventHandler('onClientPlayerChatting', g_Root, onPlayerChatting)
addEventHandler('onClientRender', g_Root, onRender)
addEventHandler('onClientPlayerQuit', g_Root, onPlayerQuit)
g_ChatTexture = dxCreateTexture('chat_icon/chat.png')
setTimer(update, 250, 0)
end)
addInitFunc(function()
Settings.register
{
name = 'msgAboveCar',
default = true,
cast = tobool,
createGui = function(wnd, x, y, w)
local cb = guiCreateCheckBox(x, y, w, 20, "Display chat messages above players", Settings.msgAboveCar, false, wnd)
return 20, cb
end,
acceptGui = function(cb)
Settings.msgAboveCar = guiCheckBoxGetSelected(cb)
end,
}
end, -2000)
|
--# selene: allow(unused_variable)
---@diagnostic disable: unused-local
-- Graphical, interactive tool for choosing/searching data
--
-- Notes:
-- * This module was influenced heavily by Choose, by Steven Degutis (https://github.com/sdegutis/choose)
---@class hs.chooser
local M = {}
hs.chooser = M
-- Get or attach/detach a toolbar to/from the chooser.
--
-- Parameters:
-- * `toolbar` - An `hs.webview.toolbar` object to be attached to the chooser. If `nil` is supplied, the current toolbar will be removed
--
-- Returns:
-- * if a toolbarObject or explicit nil is specified, returns the hs.chooser object; otherwise returns the current toolbarObject or nil, if no toolbar is attached to the chooser.
--
-- Notes:
-- * this method is a convenience wrapper for the `hs.webview.toolbar.attachToolbar` function.
--
-- * If the toolbarObject is currently attached to another window when this method is called, it will be detached from the original window and attached to the chooser. If you wish to attach the same toolbar to multiple chooser objects, see `hs.webview.toolbar:copy`.
---@return hs.chooser
function M:attachedToolbar(toolbar, ...) end
-- Sets the background of the chooser between light and dark
--
-- Parameters:
-- * beDark - A optional boolean, true to be dark, false to be light. If this parameter is omitted, the current setting will be returned
--
-- Returns:
-- * The `hs.chooser` object or a boolean, true if the window is dark, false if it is light
--
-- Notes:
-- * The text colors will not automatically change when you toggle the darkness of the chooser window, you should also set appropriate colors with `hs.chooser:fgColor()` and `hs.chooser:subTextColor()`
---@return hs.chooser
function M:bgDark(beDark, ...) end
-- Cancels the chooser
--
-- Parameters:
-- * None
--
-- Returns:
-- * The `hs.chooser` object
---@return hs.chooser
function M:cancel() end
-- Sets the choices for a chooser
--
-- Parameters:
-- * choices - Either a function to call when the list of choices is needed, or nil to remove any existing choices/callback, or a table containing static choices.
--
-- Returns:
-- * The `hs.chooser` object
--
-- Notes:
-- * The table of choices (be it provided statically, or returned by the callback) must contain at least the following keys for each choice:
-- * text - A string or hs.styledtext object that will be shown as the main text of the choice
-- * Each choice may also optionally contain the following keys:
-- * subText - A string or hs.styledtext object that will be shown underneath the main text of the choice
-- * image - An `hs.image` image object that will be displayed next to the choice
-- * valid - A boolean that defaults to `true`, if set to `false` selecting the choice will invoke the `invalidCallback` method instead of dismissing the chooser
-- * Any other keys/values in each choice table will be retained by the chooser and returned to the completion callback when a choice is made. This is useful for storing UUIDs or other non-user-facing information, however, it is important to note that you should not store userdata objects in the table - it is run through internal conversion functions, so only basic Lua types should be stored.
-- * If a function is given, it will be called once, when the chooser window is displayed. The results are then cached until this method is called again, or `hs.chooser:refreshChoicesCallback()` is called.
-- * If you're using a hs.styledtext object for text or subText choices, make sure you specify a color, otherwise your text could appear transparent depending on the bgDark setting.
--
-- Example:
-- ```lua
-- local choices = {
-- {
-- ["text"] = "First Choice",
-- ["subText"] = "This is the subtext of the first choice",
-- ["uuid"] = "0001"
-- },
-- { ["text"] = "Second Option",
-- ["subText"] = "I wonder what I should type here?",
-- ["uuid"] = "Bbbb"
-- },
-- { ["text"] = hs.styledtext.new("Third Possibility", {font={size=18}, color=hs.drawing.color.definedCollections.hammerspoon.green}),
-- ["subText"] = "What a lot of choosing there is going on here!",
-- ["uuid"] = "III3"
-- },
-- }```
---@return hs.chooser
function M:choices(choices, ...) end
-- Deletes a chooser
--
-- Parameters:
-- * None
--
-- Returns:
-- * None
function M:delete() end
-- Sets the foreground color of the chooser
--
-- Parameters:
-- * color - An optional table containing a color specification (see `hs.drawing.color`), or nil to restore the default color. If this parameter is omitted, the existing color will be returned
--
-- Returns:
-- * The `hs.chooser` object or a color table
---@return hs.chooser
function M:fgColor(color, ...) end
-- A global callback function used for various hs.chooser events
--
-- Notes:
-- * This callback should accept two parameters:
-- * An `hs.chooser` object
-- * A string containing the name of the event to handle. Possible values are:
-- * `willOpen` - An hs.chooser is about to be shown on screen
-- * `didClose` - An hs.chooser has just been removed from the screen
-- * There is a default global callback that uses the `willOpen` event to remember which window has focus, and the `didClose` event to restore focus back to the original window. If you want to use this in addition to your own callback, you can call it as `hs.chooser._defaultGlobalCallback(event)`
M.globalCallback = nil
-- Hides the chooser
--
-- Parameters:
-- * None
--
-- Returns:
-- * The `hs.chooser` object
---@return hs.chooser
function M:hide() end
-- Sets/clears a callback for when the chooser window is hidden
--
-- Parameters:
-- * fn - An optional function that will be called when the chooser window is hidden. If this parameter is omitted, the existing callback will be removed.
--
-- Returns:
-- * The hs.chooser object
--
-- Notes:
-- * This callback is called *after* the chooser is hidden.
-- * This callback is called *after* hs.chooser.globalCallback.
---@return hs.chooser
function M:hideCallback(fn) end
-- Sets/clears a callback for invalid choices
--
-- Parameters:
-- * fn - An optional function that will be called whenever the user select an choice set as invalid. If this parameter is omitted, the existing callback will be removed.
--
-- Returns:
-- * The `hs.chooser` object
--
-- Notes:
-- * The callback may accept one argument, it will be a table containing whatever information you supplied for the item the user chose.
-- * To display a context menu, see `hs.menubar`, specifically the `:popupMenu()` method
---@return hs.chooser
function M:invalidCallback(fn) end
-- Checks if the chooser is currently displayed
--
-- Parameters:
-- * None
--
-- Returns:
-- * A boolean, true if the chooser is displayed on screen, false if not
---@return boolean
function M:isVisible() end
-- Creates a new chooser object
--
-- Parameters:
-- * completionFn - A function that will be called when the chooser is dismissed. It should accept one parameter, which will be nil if the user dismissed the chooser window, otherwise it will be a table containing whatever information you supplied for the item the user chose.
--
-- Returns:
-- * An `hs.chooser` object
--
-- Notes:
-- * As of macOS Sierra and later, if you want a `hs.chooser` object to appear above full-screen windows you must hide the Hammerspoon Dock icon first using: `hs.dockicon.hide()`
---@return hs.chooser
function M.new(completionFn, ...) end
-- Sets/gets placeholder text that is shown in the query text field when no other text is present
--
-- Parameters:
-- * placeholderText - An optional string for placeholder text. If this parameter is omitted, the existing placeholder text will be returned.
--
-- Returns:
-- * The hs.chooser object, or the existing placeholder text
---@return hs.chooser
function M:placeholderText(placeholderText, ...) end
-- Sets/gets the search string
--
-- Parameters:
-- * queryString - An optional string to search for, or an explicit nil to clear the query. If omitted, the current contents of the search box are returned
--
-- Returns:
-- * The `hs.chooser` object or a string
--
-- Notes:
-- * You can provide an explicit nil or empty string to clear the current query string.
---@return hs.chooser
function M:query(queryString, ...) end
-- Sets/clears a callback for when the search query changes
--
-- Parameters:
-- * fn - An optional function that will be called whenever the search query changes. If this parameter is omitted, the existing callback will be removed.
--
-- Returns:
-- * The hs.chooser object
--
-- Notes:
-- * As the user is typing, the callback function will be called for every keypress. You may wish to do filtering on each call, or you may wish to use a delayed `hs.timer` object to only react when they have finished typing.
-- * The callback function should accept a single argument:
-- * A string containing the new search query
---@return hs.chooser
function M:queryChangedCallback(fn) end
-- Refreshes the choices data from a callback
--
-- Parameters:
-- * reload - An optional parameter that reloads the chooser results to take into account the current query string (defaults to `false`)
--
-- Returns:
-- * The `hs.chooser` object
--
-- Notes:
-- * This method will do nothing if you have not set a function with `hs.chooser:choices()`
---@return hs.chooser
function M:refreshChoicesCallback(reload, ...) end
-- Sets/clears a callback for right clicking on choices
--
-- Parameters:
-- * fn - An optional function that will be called whenever the user right clicks on a choice. If this parameter is omitted, the existing callback will be removed.
--
-- Returns:
-- * The `hs.chooser` object
--
-- Notes:
-- * The callback may accept one argument, the row the right click occurred in or 0 if there is currently no selectable row where the right click occurred. To determine the location of the mouse pointer at the right click, see `hs.mouse`.
-- * To display a context menu, see `hs.menubar`, specifically the `:popupMenu()` method
---@return hs.chooser
function M:rightClickCallback(fn) end
-- Gets/Sets the number of rows that will be shown
--
-- Parameters:
-- * numRows - An optional number of choices to show (i.e. the vertical height of the chooser window). If this parameter is omitted, the current value will be returned
--
-- Returns:
-- * The `hs.chooser` object or a number
---@return hs.chooser
function M:rows(numRows, ...) end
-- Gets/Sets whether the chooser should search in the sub-text of each item
--
-- Parameters:
-- * searchSubText - An optional boolean, true to search sub-text, false to not search sub-text. If this parameter is omitted, the current configuration value will be returned
--
-- Returns:
-- * The `hs.chooser` object if a value was set, or a boolean if no parameter was passed
--
-- Notes:
-- * This should be used before a chooser has been displayed
---@return hs.chooser
function M:searchSubText(searchSubText, ...) end
-- Closes the chooser by selecting the specified row, or the currently selected row if not given
--
-- Parameters:
-- * `row` - an optional integer specifying the row to select.
--
-- Returns:
-- * The `hs.chooser` object
---@return hs.chooser
function M:select(row, ...) end
-- Get or set the currently selected row
--
-- Parameters:
-- * `row` - an optional integer specifying the row to select.
--
-- Returns:
-- * If an argument is provided, returns the hs.chooser object; otherwise returns a number containing the row currently selected (i.e. the one highlighted in the UI)
---@return number
function M:selectedRow(row, ...) end
-- Returns the contents of the currently selected or specified row
--
-- Parameters:
-- * `row` - an optional integer specifying the specific row to return the contents of
--
-- Returns:
-- * a table containing whatever information was supplied for the row currently selected or an empty table if no row is selected or the specified row does not exist.
function M:selectedRowContents(row, ...) end
-- Displays the chooser
--
-- Parameters:
-- * An optional `hs.geometry` point object describing the absolute screen co-ordinates for the top left point of the chooser window. Defaults to centering the window on the primary screen
--
-- Returns:
-- * The hs.chooser object
---@return hs.chooser
function M:show(topLeftPoint, ...) end
-- Sets/clears a callback for when the chooser window is shown
--
-- Parameters:
-- * fn - An optional function that will be called when the chooser window is shown. If this parameter is omitted, the existing callback will be removed.
--
-- Returns:
-- * The hs.chooser object
--
-- Notes:
-- * This callback is called *after* the chooser is shown. To execute code just before it's shown (and/or after it's removed) see `hs.chooser.globalCallback`
---@return hs.chooser
function M:showCallback(fn) end
-- Sets the sub-text color of the chooser
--
-- Parameters:
-- * color - An optional table containing a color specification (see `hs.drawing.color`), or nil to restore the default color. If this parameter is omitted, the existing color will be returned
--
-- Returns:
-- * The `hs.chooser` object or a color table
---@return hs.chooser
function M:subTextColor(color, ...) end
-- Gets/Sets the width of the chooser
--
-- Parameters:
-- * percent - An optional number indicating the percentage of the width of the screen that the chooser should occupy. If this parameter is omitted, the current width will be returned
--
-- Returns:
-- * The `hs.chooser` object or a number
--
-- Notes:
-- * This should be used before a chooser has been displayed
---@return hs.chooser
function M:width(percent, ...) end
|
-----------------------
-- Addon and Modules --
-----------------------
local DS = LibStub("AceAddon-3.0"):GetAddon("Doom Shards", true)
if not DS then return end
local CD = DS:GetModule("display")
if not CD then return end
local WA = DS:NewModule("weakauras", "AceEvent-3.0")
--------------
-- Upvalues --
--------------
local assert = assert
local type = type
---------
-- API --
---------
function DS:GetPrediction(position)
local indicator = CD.indicators[position]
if indicator then
return indicator.tick, indicator.resourceChance
end
end
---------------
-- Functions --
---------------
local function WeakAurasLoaded()
local WeakAuras_ScanEvents = WeakAuras.ScanEvents
function WA:DOOM_SHARDS_DISPLAY_UPDATE()
WeakAuras_ScanEvents("DOOM_SHARDS_DISPLAY_UPDATE")
end
WA:RegisterMessage("DOOM_SHARDS_DISPLAY_UPDATE")
end
function WA:OnEnable()
if IsAddOnLoaded("WeakAuras") then -- optionalDeps produces bugs with some addons
WeakAurasLoaded()
else
WA:RegisterEvent("ADDON_LOADED", function(_, name)
if name == "WeakAuras" then
WeakAurasLoaded()
end
end)
end
end
function WA:OnDisable()
self:UnregisterMessage("DOOM_SHARDS_DISPLAY_UPDATE")
end
|
local S = mobs.intllib
-- Npc by TenPlus1
mobs.npc_drops = {
"default:pick_steel", "mobs:meat", "default:sword_steel",
"default:shovel_steel", "farming:bread", "bucket:bucket_water"
}
mobs:register_mob("mobs_npc:npc", {
type = "npc",
passive = false,
damage = 3,
attack_type = "dogfight",
attacks_monsters = true,
attack_npcs = false,
owner_loyal = true,
pathfinding = true,
hp_min = 10,
hp_max = 20,
armor = 100,
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
visual = "mesh",
mesh = "mobs_character.b3d",
drawtype = "front",
textures = {
{"mobs_npc.png"},
{"mobs_npc2.png"}, -- female by nuttmeg20
},
child_texture = {
{"mobs_npc_baby.png"}, -- derpy baby by AmirDerAssassine
},
makes_footstep_sound = true,
sounds = {},
walk_velocity = 2,
run_velocity = 3,
jump = true,
drops = {
{name = "default:wood", chance = 1, min = 1, max = 3},
{name = "default:apple", chance = 2, min = 1, max = 2},
{name = "default:axe_stone", chance = 5, min = 1, max = 1},
},
water_damage = 0,
lava_damage = 2,
light_damage = 0,
follow = {"farming:bread", "mobs:meat", "default:diamond"},
view_range = 15,
owner = "",
order = "follow",
fear_height = 3,
animation = {
speed_normal = 30,
speed_run = 30,
stand_start = 0,
stand_end = 79,
walk_start = 168,
walk_end = 187,
run_start = 168,
run_end = 187,
punch_start = 200,
punch_end = 219,
},
on_rightclick = function(self, clicker)
-- feed to heal npc
if mobs:feed_tame(self, clicker, 8, true, true) then return end
-- capture npc with net or lasso
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
-- protect npc with mobs:protector
if mobs:protect(self, clicker) then return end
local item = clicker:get_wielded_item()
local name = clicker:get_player_name()
-- right clicking with gold lump drops random item from mobs.npc_drops
if item:get_name() == "default:gold_lump" then
if not mobs.is_creative(name) then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:get_pos()
pos.y = pos.y + 0.5
local drops = self.npc_drops or mobs.npc_drops
minetest.add_item(pos, {
name = drops[math.random(1, #drops)]
})
minetest.chat_send_player(name, S("NPC dropped you an item for gold!"))
return
end
-- by right-clicking owner can switch npc between follow and stand
if self.owner and self.owner == name then
if self.order == "follow" then
self.order = "stand"
minetest.chat_send_player(name, S("NPC stands still."))
else
self.order = "follow"
minetest.chat_send_player(name, S("NPC will follow you."))
end
end
end,
})
mobs:spawn({
name = "mobs_npc:npc",
nodes = {"default:brick"},
neighbors = {"default:grass_3"},
min_light = 10,
chance = 10000,
active_object_count = 1,
min_height = 0,
day_toggle = true,
})
mobs:register_egg("mobs_npc:npc", S("Npc"), "default_brick.png", 1)
-- compatibility
mobs:alias_mob("mobs:npc", "mobs_npc:npc")
|
print(require 'lib.skill_manager':new():get("test1").text)
|
#!/usr/bin/lua
local nkey = "slow"
local mode = "time"
do
local i = 1
while i <= #arg do
if arg[i] == "--fast" then nkey = "fast"
elseif arg[i] == "--medium" then nkey = "medium"
elseif arg[i] == "--slow" then nkey = "slow"
elseif arg[i] == "--time" then mode = "time"
elseif arg[i] == "--perf" then mode = "perf"
end
i = i + 1
end
end
-- fast : runs on a blink of an eye (for testing / debugging)
-- medium : the aot version takes more than 1 second
-- slow : the jit version takes more than 1 second
local benchs = {
{ name = "binarytrees", fast = 5, medium = 16, slow = 16 },
{ name = "fannkuch", fast = 5, medium = 10, slow = 11 },
{ name = "fasta", fast = 100, medium = 1000000, slow = 2500000 },
{ name = "knucleotide", fast = 100, medium = 1000000, slow = 1000000 },
{ name = "mandelbrot", fast = 20, medium = 2000, slow = 4000 },
{ name = "nbody", fast = 100, medium = 1000000, slow = 5000000 },
{ name = "spectralnorm", fast = 100, medium = 1000, slow = 4000 },
}
local impls = {
{ name = "jit", suffix = "", interpreter = "luajit", compile = false },
{ name = "jof", suffix = "", interpreter = "luajit -j off", compile = false },
{ name = "lua", suffix = "", interpreter = "../src/lua", compile = false, },
{ name = "aot", suffix = "_aot", interpreter = "../src/lua", compile = "../src/luaot" },
{ name = "trm", suffix = "_trm", interpreter = "../src/lua", compile = "../src/luaot-trampoline"},
}
--
-- Shell
--
local function quote(s)
if string.find(s, '^[A-Za-z0-9_./]*$') then
return s
else
return "'" .. s:gsub("'", "'\\''") .. "'"
end
end
local function prepare(cmd_fmt, ...)
local params = table.pack(...)
return (string.gsub(cmd_fmt, '([%%][%%]?)(%d*)', function(s, i)
if s == "%" then
return quote(params[tonumber(i)])
else
return "%"..i
end
end))
end
local function run(cmd_fmt, ...)
return (os.execute(prepare(cmd_fmt, ...)))
end
local function exists(filename)
return run("test -f %1", filename)
end
--
-- Recompile
--
io.stderr:write("Recompiling the compiler...\n")
assert(run("cd .. && make guess --quiet >&2"))
io.stderr:write("...done\n")
for _, b in ipairs(benchs) do
for _, s in ipairs(impls) do
local mod = b.name .. s.suffix
if s.compile and not exists(mod .. ".so") then
assert(run(s.compile.." %1.lua -o %2.c", b.name, mod))
assert(run("../scripts/compile %2.c", b.name, mod))
end
end
end
--
-- Execute
--
local function bench_cmd(b, impl)
local module
if string.match(impl.interpreter, "luajit") and exists(b.name.."_jit.lua") then
module = b.name .. "_jit"
else
module = b.name .. impl.suffix
end
local n = assert(b[nkey])
return prepare(impl.interpreter .. " main.lua %1 %2 > /dev/null", module, n)
end
if mode == "time" then
for _, b in ipairs(benchs) do
for _, impl in ipairs(impls) do
local cmd = bench_cmd(b, impl)
for rep = 1, 20 do
print(string.format("RUN %s %s %s", b.name, impl.name, rep))
assert(run("/usr/bin/time -p sh -c %1 2>&1", cmd))
print()
end
end
end
elseif mode == "perf" then
for _, b in ipairs(benchs) do
for _, impl in ipairs(impls) do
if impl.name == "lua" or impl.name == "cor" then
local cmd = bench_cmd(b, impl)
--print(string.format("RUN %s %s %s", b.name, impl.name, rep))
assert(run("LANG=C perf stat sh -c %1 2>&1", cmd))
print()
end
end
end
else
error("impossible")
end
|
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local model = require "game.model.role_model"
local CCommander = require "game.model.role.commander"
local commander_config = require "game.template.commander"
local _M = model:extends()
_M.class = "role.commanders"
_M.push_name = "commanders"
_M.changed_name_in_role = "commanders"
_M.is_list = true
_M.child_model = CCommander
_M.is_key_num = true
function _M:__up_version()
_M.super.__up_version(self)
end
function _M:init()
end
function _M:choose_commander(id)
if not id then id = 1 end
local p,w= commander_config:get_choose_commander(id)
if self.child_num == 0 then
local commander = CCommander:new(self.role,{p=p,w=w})
commander:go_battle()
self:conscripts(commander)
end
end
function _M:get_commanders(pid,mrank)
local commanders = {}
local num = 0
for id,commander in pairs(self.data) do
if commander:get_pid() == pid then
if not mrank or mrank == commander:get_mrank_lev() then
num = num + 1
commanders[id] = commander
end
end
end
return num,commanders
end
function _M:conscripts(commander)
if not commander or commander.class ~= "commander" then return false end
self.max_id = self.max_id + 1
_M.super.append(self,self.max_id,commander)
return self.max_id
end
function _M:retire(id)
if not self.data[id] then return false end
_M.super.remove(self,id)
return commander
end
function _M:gain_more(profit)
for id,commander in pairs(profit) do
self:conscripts(commander)
end
end
function _M:consume_more(cost)
for id,commander in pairs(cost) do
self:retire(id)
end
end
function _M:check_weapon()
for i,v in pairs(self.data) do
v:check_weapon()
end
end
function _M:reset_mrank_bless()
for i,v in pairs(self.data) do
v:reset_mrank_bless()
end
end
function _M:get_p()
local p = nil
for i,commander in pairs(self.data) do
if commander.data.j == 1 then
p = commander.data.p
break
end
end
return p
end
function _M:get_base_skill_level()
for i,commander in pairs(self.data) do
if commander then
return commander.data.s[101] or 0
end
end
end
return _M |
--[[
Carbon for Lua
#class Collections.Tuple
#inherits OOP.Object
#description {
A disposable List object for quick vararg transformations.
}
]]
local Carbon, self = ...
local OOP = Carbon.OOP
local vunpack = unpack
local unpack
if (Carbon.Support.jit and jit.status()) then
unpack = Carbon.Unpack
else
unpack = vunpack or table.unpack
end
local Tuple = OOP:Class()
:Attributes {
PooledInstantiation = true,
PoolSize = 16,
ExplicitInitialization = true,
SparseInstances = true
}
--[[#method 1 {
class public @Tuple Tuple:New(...)
-alias: object public @void Tuple:Init(...)
optional ...: The values to initialize the Tuple with.
Creates a new Tuple.
}]]
function Tuple:Init(...)
self.Unpack = self.class.Unpack
self.Destroy = self.class.Destroy
for i = 1, select("#", ...) do
self[i] = select(i, ...)
end
end
--[[#method {
object public ... Tuple:Unpack()
Unpacks and destroys the Tuple, returning all its values.
}]]
function Tuple:Unpack()
return self:Destroy(unpack(self))
end
--[[#method {
object public ... Tuple:Destroy(...)
optional ...: Data to pipe through this method.
Destroys the tuple, passing any arguments that it was given as return values.
This will put the tuple back into the main buffer, usually.
}]]
function Tuple:Destroy(...)
for i = 1, #self do
self[i] = nil
end
return ...
end
Carbon.Metadata:RegisterMethods(Tuple, self)
return Tuple |
--[[
====================================================================
Licensed under the MIT license
--------------------------------------------------------------------
More information on the license at
https://github.com/0aoq/RobloxScriptUtility/blob/main/LICENSE
====================================================================
]]
local export = {}
function export:print(s: string)
print("[Utility]: " .. s)
end
function export:warn(s: string)
warn("[Utility]: " .. s)
end
function export:error(s: string)
error("[Utility]: " .. s)
end
return export
|
local ffi = require("ffi")
local C = ffi.C
local blapi = require("blend2d")
local function addStops(gradient, stops)
if not stops then return false end
for _,stop in ipairs(stops) do
if stop.uint32 then
gradient:addStopRgba32(stop.offset, stop.uint32)
elseif stop.obj == BLRgba32 then
gradient:addStopRgba32(stop.offset, stop.obj.value)
end
end
return gradient
end
--[[
You can create a linear gradient in one fell swoop by specifying
all the value and stops information at once.
The radial and conical gradients use a similar construct
local gr1 = LinearGradient({values = {0, 0, 256, 256},
stops = {
{offset = 0.0, uint32 = 0xFFFFFFFF},
{offset = 0.5, uint32 = 0xFFFFAF00},
{offset = 1.0, uint32 = 0xFFFF0000}
}
})
]]
local function LinearGradient(params)
if not params then
return nil, "must specify gradient parameters"
end
if not params.values then
return nil, "must specify linear gradient values"
end
local extendMode = params.extendMode or C.BL_EXTEND_MODE_PAD
local values = BLLinearGradientValues(params.values)
local obj = ffi.new("struct BLGradientCore")
local bResult = blapi.blGradientInitAs(obj, C.BL_GRADIENT_TYPE_LINEAR, values, extendMode, nil, 0, nil) ;
if bResult ~= C.BL_SUCCESS then
return nil, bResult;
end
addStops(obj, params.stops)
return obj;
end
local function RadialGradient(params)
if not params then
return nil, "must specify gradient parameters"
end
if not params.values then
return nil, "must specify linear gradient values"
end
local extendMode = params.extendMode or C.BL_EXTEND_MODE_PAD
local values = BLRadialGradientValues(params.values)
local obj = ffi.new("struct BLGradientCore")
local bResult = blapi.blGradientInitAs(obj, C.BL_GRADIENT_TYPE_RADIAL, values, extendMode, nil, 0, nil) ;
if bResult ~= C.BL_SUCCESS then
return nil, bResult;
end
addStops(obj, params.stops)
return obj;
end
local function ConicalGradient(params)
if not params then
return nil, "must specify gradient parameters"
end
if not params.values then
return nil, "must specify linear gradient values"
end
local extendMode = params.extendMode or C.BL_EXTEND_MODE_PAD
local values = BLConicalGradientValues(params.values)
local obj = ffi.new("struct BLGradientCore")
local bResult = blapi.blGradientInitAs(obj, C.BL_GRADIENT_TYPE_CONICAL, values, extendMode, nil, 0, nil) ;
if bResult ~= C.BL_SUCCESS then
return nil, bResult;
end
addStops(obj, params.stops)
return obj;
end
return {
LinearGradient = LinearGradient;
RadialGradient = RadialGradient;
ConicalGradient = ConicalGradient;
} |
testfiledir = "./test/testfiles-bibunits"
testsuppdir = testfiledir .. "/support"
checkruns = 3
function runtest_tasks(name)
return "bibtex -terse bu1; bibtex -terse bu2"
end
|
--[[ Created by Grid2 original authors, modified by Michael ]]--
local Grid2 = Grid2
local Grid2Frame = Grid2Frame
local min = min
local max = max
local pairs = pairs
local ipairs = ipairs
local AlignPoints = Grid2.AlignPoints
local SetSizeMethods = { HORIZONTAL = "SetWidth", VERTICAL = "SetHeight" }
local GetSizeMethods = { HORIZONTAL = "GetWidth", VERTICAL = "GetHeight" }
local function Bar_CreateHH(self, parent)
local bar = self:CreateFrame("StatusBar", parent)
bar.myIndicator = self
bar.myValues = {}
bar:SetStatusBarColor(0,0,0,0)
bar:SetMinMaxValues(0, 1)
bar:SetValue(0)
end
-- Warning Do not put bar:SetValue() methods inside this function because for some reason the bar is not updated&painted
-- on current frame (the bar update is delayed to the next frame), but extra bar textures are updated on current frame.
-- generating a graphic glitch because main bar & extra bars are displayed out of sync (in diferente frames)
-- In this case we are talking about screen frames like in frames per second.
local function Bar_OnFrameUpdate(bar)
local self = bar.myIndicator
local direction = self.direction
local horizontal = self.horizontal
local points = self.alignPoints
local barSize = bar[self.GetSizeMethod](bar)
local myTextures = bar.myTextures
local myValues = bar.myValues
local valueTo = myValues[1] or 0
local valueMax = valueTo
local maxIndex = 0
if self.reverse then
valueMax, valueTo = 0, -valueTo
end
for i=2,bar.myMaxIndex do
local texture = myTextures[i]
local value = myValues[i] or 0
if value>0 then
local size, offset
maxIndex = i
if texture.myReverse then
size = min(value, valueTo)
offset = valueTo - size
valueTo = valueTo - value
elseif texture.myNoOverlap then
size = min(value, 1-valueMax)
offset = valueMax
valueTo = valueMax + value
valueMax = valueTo
else
offset = max(valueTo,0)
valueTo = valueTo + value
size = min(valueTo,1) - offset
valueMax = max(valueMax, valueTo)
end
if size>0 then
if horizontal then
texture:SetPoint( points[1], bar, points[1], direction*offset*barSize, 0)
else
texture:SetPoint( points[1], bar, points[1], 0, direction*offset*barSize)
end
texture:mySetSize( size * barSize )
texture:Show()
else
texture:Hide()
end
else
texture:Hide()
end
end
bar.myMaxIndex = maxIndex
if self.backColor then
local texture = myTextures[#myTextures]
local size = self.backMainAnchor and myValues[1] or valueMax
if size<1 then
texture:SetPoint( points[2], bar, points[2], 0, 0)
texture:mySetSize( (1-size) * barSize )
texture:Show()
else
texture:Hide()
end
end
end
-- {{{ Optimization: Updating modified bars only on next frame repaint
local updates = {}
local EnableDelayedUpdates = function()
CreateFrame("Frame", nil, Grid2LayoutFrame):SetScript("OnUpdate", function()
for bar in pairs(updates) do
Bar_OnFrameUpdate(bar)
end
wipe(updates)
end)
EnableDelayedUpdates = Grid2.Dummy
end
-- Warning: This is an overrided indicator:Update() NOT the standard indicator:OnUpdate()
-- We are calling bar:SetValue()/bar:SetMainBarValue() here instead of inside Bar_OnFrameUpdate() because the
-- StatusBar texture is not updated inmmediatly like the additional bars textures, generating a graphic glitch.
local function Bar_Update(self, parent, unit, status)
if unit then
local bar = parent[self.name]
local values = bar.myValues
if status then
local index = self.priorities[status]
local value = status:GetPercent(unit) or 0
values[index] = value
if value>0 and index>bar.myMaxIndex then
bar.myMaxIndex = index -- Optimization to avoid updating bars with zero value
end
if index==1 then
bar:SetMainBarValue(value)
end
if self.backColor or bar.myMaxIndex>1 then
updates[bar] = true
end
else
for i, status in ipairs(self.statuses) do
values[i] = status:GetPercent(unit) or 0
end
bar.myMaxIndex = #self.statuses
bar:SetMainBarValue(values[1] or 0)
updates[bar] = true
end
end
end
-- }}}
local function Bar_Layout(self, parent)
local bar = parent[self.name]
local orient = self.orientation
local level = parent:GetFrameLevel() + self.frameLevel
local width = self.width or parent.container:GetWidth()
local height = self.height or parent.container:GetHeight()
local color = self.textureColor
-- main bar
bar:SetParent(parent)
bar:ClearAllPoints()
bar:SetOrientation(orient)
bar:SetReverseFill(self.reverseFill)
bar:SetFrameLevel(level)
bar:SetStatusBarTexture(self.texture)
local barTexture = bar:GetStatusBarTexture()
barTexture:SetDrawLayer("ARTWORK", 0)
if color then bar:SetStatusBarColor(color.r, color.g, color.b, min(self.opacity, color.a or 1) ) end
bar:SetSize(width, height)
bar:SetPoint(self.anchor, parent.container, self.anchorRel, self.offsetx, self.offsety)
bar:SetValue(0)
bar.SetMainBarValue = self.reverse and Grid2.Dummy or bar.SetValue
-- extra bars
local textures = bar.myTextures or { barTexture }
for i=1,self.barCount do
local setup = self.bars[i]
local texture = textures[i+1] or bar:CreateTexture()
texture.mySetSize = texture[ self.SetSizeMethod ]
texture.myReverse = setup.reverse
texture.myNoOverlap = setup.noOverlap
texture:SetTexture( setup.texture or self.texture )
texture:SetDrawLayer("ARTWORK", setup.sublayer or 1)
local c = setup.color
if c then texture:SetVertexColor( c.r, c.g, c.b, min(self.opacity, c.a or 1) ) end
texture:ClearAllPoints()
texture:SetSize( width, height )
textures[i+1] = texture
end
for i=self.barCount+2,#textures do
textures[i]:Hide()
end
bar.myTextures = textures
bar.myMaxIndex = #self.statuses
bar:Show()
end
local function Bar_GetBlinkFrame(self, parent)
return parent[self.name]
end
local function Bar_SetOrientation(self, orientation)
self.orientation = orientation
self.dbx.orientation = orientation
end
local function Bar_Disable(self, parent)
local bar = parent[self.name]
if bar.myTextures then
for _,texture in ipairs(bar.myTextures) do
texture:Hide()
end
end
bar:Hide()
bar:SetParent(nil)
bar:ClearAllPoints()
end
local function Bar_UpdateDB(self)
local dbx = self.dbx
local theme = Grid2Frame.db.profile
local orient = dbx.orientation or theme.orientation
self.orientation = orient
self.SetSizeMethod = SetSizeMethods[orient]
self.GetSizeMethod = GetSizeMethods[orient]
self.alignPoints = AlignPoints[orient][not dbx.reverseFill]
local l = dbx.location
self.frameLevel = dbx.level or 1
self.anchor = l.point
self.anchorRel = l.relPoint
self.offsetx = l.x
self.offsety = l.y
self.width = dbx.width
self.height = dbx.height
self.direction = dbx.reverseFill and -1 or 1
self.horizontal = (orient == "HORIZONTAL")
self.reverseFill = dbx.reverseFill
self.textureColor = dbx.textureColor
self.backColor = dbx.backColor
self.backMainAnchor = dbx.backMainAnchor
self.opacity = dbx.opacity or 1
self.reverse = dbx.reverseMainBar
self.backTexture = Grid2:MediaFetch("statusbar", dbx.backTexture or theme.barTexture, "Gradient")
self.texture = Grid2:MediaFetch("statusbar", dbx.texture or theme.barTexture, "Gradient")
self.textureSublayer= 0
self.bars = {}
self.barCount = dbx.barCount or 0
for i=1,self.barCount do
local bar = self.bars[i] or {}
local setup = dbx["bar"..i]
if setup then
bar.texture = Grid2:MediaFetch("statusbar", setup.texture or dbx.texture or theme.barTexture, "Gradient")
bar.reverse = setup.reverse
bar.noOverlap = setup.noOverlap
bar.color = setup.color
bar.sublayer = i
end
self.bars[i] = bar
end
if self.backColor then
self.barCount = self.barCount + 1
self.bars[self.barCount] = { texture = self.backTexture, color = dbx.backColor, sublayer = 0 }
end
end
--{{ Bar Color indicator
local function BarColor_OnUpdate(self, parent, unit, status)
if status then
self:SetBarColor(parent, status:GetColor(unit))
else
self:SetBarColor(parent, 0, 0, 0, 0)
end
end
local function BarColor_SetBarColor(self, parent, r, g, b, a)
parent[self.parentName]:SetStatusBarColor(r, g, b, min(self.opacity,a or 1) )
end
local function BarColor_SetBarColorInverted(self, parent, r, g, b, a)
parent[self.parentName]:SetStatusBarColor(0, 0, 0, min(self.opacity, 0.8) )
parent.container:SetVertexColor(r, g, b, a)
end
local function BarColor_UpdateDB(self)
local dbx = self.dbx
self.SetBarColor = dbx.invertColor and BarColor_SetBarColorInverted or BarColor_SetBarColor
self.OnUpdate = dbx.textureColor and Grid2.Dummy or BarColor_OnUpdate
self.opacity = dbx.opacity or 1
end
--- }}}
local function Create(indicatorKey, dbx)
local Bar = Grid2.indicators[indicatorKey] or Grid2.indicatorPrototype:new(indicatorKey)
Bar.dbx = dbx
-- Hack to caculate status index fast: statuses[priorities[status]] == status
Bar.sortStatuses = function (a,b) return Bar.priorities[a] < Bar.priorities[b] end
Bar.Create = Bar_CreateHH
Bar.GetBlinkFrame = Bar_GetBlinkFrame
Bar.SetOrientation = Bar_SetOrientation
Bar.Disable = Bar_Disable
Bar.Layout = Bar_Layout
Bar.Update = Bar_Update
Bar.UpdateDB = Bar_UpdateDB
Bar_UpdateDB(Bar)
Grid2:RegisterIndicator(Bar, { "percent" })
EnableDelayedUpdates()
local colorKey = indicatorKey .. "-color"
local BarColor = Grid2.indicators[colorKey] or Grid2.indicatorPrototype:new(colorKey)
BarColor.dbx = dbx
BarColor.parentName = indicatorKey
BarColor.Create = Grid2.Dummy
BarColor.Layout = Grid2.Dummy
BarColor.UpdateDB = BarColor_UpdateDB
BarColor_UpdateDB(BarColor)
Grid2:RegisterIndicator(BarColor, { "color" })
Bar.sideKick = BarColor
return Bar, BarColor
end
Grid2.setupFunc["multibar"] = Create
Grid2.setupFunc["multibar-color"] = Grid2.Dummy
|
local nvim_lsp = require('lspconfig')
-- Map keys only after attach
local on_attach = function(_, bufnr)
-- Set omnifunc
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Set key mapping
local opts = { noremap=true, silent=true }
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
-- vim.o.tagfunc = 'v:lua.vim.lsp.tagfunc'
buf_set_keymap('n', '<C-]>', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', '<C-w>]', '<cmd>vsplit<CR><cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', '<C-w><C-]>', '<cmd>vsplit<CR><cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gs', '<cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('i', '<C-f>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '<leader>r', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap('n', '<leader>c', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
buf_set_keymap('v', '<leader>f', '<cmd>lua vim.lsp.buf.range_formatting()<CR>', opts)
end
local lsp_capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
local lsp_flags = { debounce_text_changes = 150 }
-- LSP servers
local servers = {
'pylsp', 'gopls', 'clangd', 'bashls', 'rust_analyzer', 'html', 'jsonls', 'tsserver', 'svelte',
'java_language_server', 'vimls', 'texlab', 'terraformls'
}
local server_cmds = {
java_language_server = { "java_language_server" },
html = { "vscode-html-languageserver", "--stdio" },
jsonls = { "vscode-json-languageserver", "--stdio" },
}
for _, lsp in ipairs(servers) do
local setup_config = {
on_attach = on_attach,
flags = lsp_flags,
capabilities = lsp_capabilities,
}
local cmd = server_cmds[lsp]
if cmd then
setup_config.cmd = cmd
end
nvim_lsp[lsp].setup(setup_config)
end
-- Special config for lua
local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")
nvim_lsp.sumneko_lua.setup {
on_attach = on_attach,
flags = lsp_flags,
capabilities = lsp_capabilities,
cmd = { 'lua-language-server' };
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Setup your lua path
path = runtime_path,
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
}
|
-- Portefeuille
require("math/math")
Portefeuillef={}
function Portefeuillef.GetVect(self,vect)
local counti = 1
local luaVect = {}
local tiVect = "["
string.gsub(vect, "([^,]*),*", function(val)
if tiNspire.toNumber(val)~=nil then
luaVect[counti]=val
if counti~=1 then
tiVect=tiVect..","
end
tiVect=tiVect..tostring(val)
counti=counti+1
end
return ""
end)
tiVect=tiVect.."]"
return luaVect,tiVect,counti-1
end
function Portefeuillef.toRhoIdx(i,j,n)
local count = n
local res=j-n
for a=1,i,1
do
count = count-1
res = res+count
end
return res
end
function Portefeuillef.toCovIdx(i,j,n)
local count = n
local res=j-n
for a=1,i,1
do
res = res+count
count = count-1
end
return res
end
function Portefeuillef.matriceVarianceCovarianceUsingPondEcartTypeCorrelation(self,X,sigmaVect,rhoVect)
local rhoLuaVect,rhoTiVect,countRho=Portefeuillef.GetVect(self,rhoVect)
local sigmaLuaVect,sigmaTiVect,countsigma=Portefeuillef.GetVect(self,sigmaVect)
local XLuaVect,XTiVect,countX=Portefeuillef.GetVect(self,X)
local expected=tiNspire.approx("nPr("..tostring(countX)..",2)/2")
if countRho~=tiNspire.toNumber(expected) then
self:appendToResult("Attention : Il devrait y avoir "..tostring(expected).." correlation != "..tostring(countRho))
else
self:appendToResult("number of correlation found "..tostring(countRho).." as expected "..tostring(expected))
end
if countsigma~= countX then
self:appendToResult("Attention : countsigma="..tostring(countsigma).." != countX="..tostring(countX))
end
self:appendToResult("\nIl y a "..tostring(countX).." actifs dans le portefeuille\n")
self:appendMathToResult("X="..tostring(XTiVect))
self:appendMathToResult(c_sigma.."="..tostring(sigmaTiVect))
self:appendMathToResult(c_rho.."="..tostring(rhoTiVect))
local matriceCours="["
local matriceIntermediaire="["
local matriceResult ="["
for i=1,countX,1
do
if i~=1 then
matriceCours=matriceCours..";"
matriceResult = matriceResult ..";"
matriceIntermediaire=matriceIntermediaire..";"
end
for j=1,countX,1
do
if j~=1 then
matriceCours=matriceCours..","
matriceResult =matriceResult ..","
matriceIntermediaire =matriceIntermediaire..","
end
local calc = ""
if i==j then
matriceCours=matriceCours..c_sigma..tostring(i).."^2"
calc="("..tostring(sigmaLuaVect[i])..")^2"
else
local a,b
if i<j then
a=i
b=j
else
b=i
a=j
end
matriceCours=matriceCours..c_rho..tostring(a).."_"..tostring(b).."*"..c_sigma..tostring(i).."*"..c_sigma..tostring(j)
calc=tostring(rhoLuaVect[Portefeuillef.toRhoIdx(a,b,countX)]).."*"..tostring(sigmaLuaVect[i]).."*"..tostring(sigmaLuaVect[j])
end
matriceIntermediaire=matriceIntermediaire..tostring(calc)
matriceResult =matriceResult ..tostring(tiNspire.execute(tostring(calc)))
print("loop : "..tostring(i)..","..tostring(j))
end
end
matriceCours=matriceCours.."]"
matriceResult =matriceResult .."]"
matriceIntermediaire =matriceIntermediaire .."]"
self:appendToResult("\nMatriceCov=")
self:appendMathToResult(matriceCours)
self:appendToResult("=")
self:appendMathToResult(matriceIntermediaire)
self:appendToResult("=")
self:appendMathToResult(matriceResult)
self:appendToResult("=")
self:appendMathToResult(tiNspire.approx(matriceResult))
return XTiVect,sigmaTiVect,rhoTiVect,matriceResult
end
function matriceFunctionDutilite(self,X,sigmaVect,rhoVect)
end
function Portefeuillef.toVectLet(count)
local res=""
if tonumber(count) ~= nil then
for i=1,count,1
do
if i>1 then
res=res..","
end
res=res..string.char(65+i-1)
end
end
return res
end
function Portefeuillef.compositionPortefeuilleZ(self,Rvect,sigmaVect,rhoVect,rf)
local rhoLuaVect,rhoTiVect,countRho=Portefeuillef.GetVect(self,rhoVect)
local sigmaLuaVect,sigmaTiVect,countsigma=Portefeuillef.GetVect(self,sigmaVect)
local RLuaVect,RTiVect,countR=Portefeuillef.GetVect(self,Rvect)
local expected=tiNspire.approx("nPr("..tostring(countsigma)..",2)/2")
-- check coherence
if countRho~=tiNspire.toNumber(expected) then
self:appendToResult("Attention : Il devrait y avoir "..tostring(expected).." correlation != "..tostring(countRho).."\n")
else
self:appendToResult("number of correlation found "..tostring(countRho).." as expected "..tostring(expected).."\n")
end
if countsigma~= countR then
self:appendToResult("Attention : countsigma="..tostring(countsigma).." != countR="..tostring(countR).."\n")
end
self:appendToResult("Il y a "..tostring(countsigma).." actifs dans le portefeuille\n")
self:appendToResult("Existe-t-il une oportunit"..e_acute.." d'arbitrage, si oui comment?\n")
self:appendToResult("Le portefeuille Z={"..Portefeuillef.toVectLet(countsigma).."} \n")
if countsigma==2 then
Portefeuillef.compositionPortefeuilleZ2(self,Rvect,sigmaVect,rhoVect,rf,sigmaLuaVect,RLuaVect,rhoLuaVect[1])
end
end
function Portefeuillef.compositionPortefeuilleAversionRisque(self,Rvect,sigmaVect,rhoVect,thetha)
local rhoLuaVect,rhoTiVect,countRho=Portefeuillef.GetVect(self,rhoVect)
local sigmaLuaVect,sigmaTiVect,countsigma=Portefeuillef.GetVect(self,sigmaVect)
local RLuaVect,RTiVect,countR=Portefeuillef.GetVect(self,Rvect)
local expected=tiNspire.approx("nPr("..tostring(countsigma)..",2)/2")
-- check coherence
if countRho~=tiNspire.toNumber(expected) then
self:appendToResult("Attention : Il devrait y avoir "..tostring(expected).." correlation != "..tostring(countRho).."\n")
else
self:appendToResult("number of correlation found "..tostring(countRho).." as expected "..tostring(expected).."\n")
end
if countsigma~= countR then
self:appendToResult("Attention : countsigma="..tostring(countsigma).." != countR="..tostring(countR).."\n")
end
self:appendToResult("Il y a "..tostring(countsigma).." actifs dans le portefeuille\n")
self:appendToResult("Le portefeuille P={"..Portefeuillef.toVectLet(countsigma).."} \n")
if countsigma==2 then
Portefeuillef.compositionPortefeuilleAversion2(self,Rvect,sigmaVect,rhoVect,thetha,sigmaLuaVect,RLuaVect,rhoLuaVect[1])
end
end
function Portefeuillef.compositionPortefeuilleZ2(self,Rvect,sigmaVect,rhoVect,rf,sigmaLuaVect,RLuaVect,rho)
if sigmaLuaVect~=nil then
local rhoN=tiNspire.toNumber(rho)
local XLuaVect={}
if rhoN==-1 then
self:appendMathToResult("XA=("..c_sigma.."B/("..c_sigma.."A+"..c_sigma.."B)="..tostring(sigmaLuaVect[2]).."/("..tostring(sigmaLuaVect[1]).."+"..tostring(sigmaLuaVect[2])..")")
self:appendToResult("\n")
local res = tiNspire.execute(tostring(sigmaLuaVect[2]).."/("..tostring(sigmaLuaVect[1]).."+"..tostring(sigmaLuaVect[2])..")")
self:appendMathToResult("="..tostring(res))
self:appendMathToResult("="..tostring(tiNspire.approx(res)))
self:appendToResult("\n")
local resB = tiNspire.execute("1-("..tostring(res)..")")
self:appendMathToResult("XB=1-XA=1-"..tostring(res).."="..tostring(resB).."="..tostring(tiNspire.approx(resB)))
self:appendToResult("\n")
self:appendToResult("Donc : ")
XLuaVect[1]=res
XLuaVect[2]=resB
elseif rhoN==1 then
self:appendToResult("cas non trait"..e_acute.." pas de portefeuille Z\n")
return
elseif rhoN==0 then
self:appendMathToResult("XA=(("..c_sigma.."B^2)/("..c_sigma.."A^2+"..c_sigma.."B^2))=(("..tostring(sigmaLuaVect[2])..")^2/(("..tostring(sigmaLuaVect[1])..")^2+("..tostring(sigmaLuaVect[2])..")^2)")
self:appendToResult("\n")
local res = tiNspire.execute("("..tostring(sigmaLuaVect[2])..")^2/(("..tostring(sigmaLuaVect[1])..")^2+("..tostring(sigmaLuaVect[2])..")^2)")
self:appendMathToResult("="..tostring(res))
self:appendMathToResult("="..tostring(tiNspire.approx(res)))
self:appendToResult("\n")
local resB = tiNspire.execute("1-("..tostring(res)..")")
self:appendMathToResult("XB=1-XA=1-"..tostring(res).."="..tostring(resB).."="..tostring(tiNspire.approx(resB)))
self:appendToResult("\n")
self:appendToResult("Donc : ")
XLuaVect[1]=res
XLuaVect[2]=resB
else
--cas general
self:appendMathToResult("XA=("..c_sigma.."B^2-"..c_sigma.."A*"..c_sigma.."B*"..c_rho.."AB)/("..c_sigma.."A^2+"..c_sigma.."B^2-2*"..c_sigma.."A*"..c_sigma.."B*"..c_rho.."AB))")
self:appendToResult("\n")
local calcRes = "((("..tostring(sigmaLuaVect[2])..")^2-"..tostring(sigmaLuaVect[1]).."*"..tostring(sigmaLuaVect[2]).."*"..tostring(rho)..")/(("..tostring(sigmaLuaVect[1])..")^2+("..tostring(sigmaLuaVect[2])..")^2-2*"..tostring(sigmaLuaVect[1]).."*"..tostring(sigmaLuaVect[2]).."*"..tostring(rho).."))"
self:appendMathToResult("="..tostring(calcRes))
local res = tiNspire.execute(tostring(calcRes))
self:appendMathToResult("="..tostring(res))
self:appendMathToResult("="..tostring(tiNspire.approx(res)))
self:appendToResult("\n")
local resB = tiNspire.execute("1-("..tostring(res)..")")
self:appendMathToResult("XB=1-XA=1-"..tostring(res).."="..tostring(resB).."="..tostring(tiNspire.approx(resB)))
self:appendToResult("\n")
self:appendToResult("Donc : ")
XLuaVect[1]=res
XLuaVect[2]=resB
end
self:appendMathToResult("=Z={"..tostring(XLuaVect[1]).."*A;"..tostring(XLuaVect[2]).."*B}")
self:appendToResult("\n")
-- save result
varValue["X"]=tostring(XLuaVect[1])..","..tostring(XLuaVect[2])
local rendement = Portefeuillef.rendementPortefeuille(self,XLuaVect,RLuaVect,2)
self:appendToResult("\n")
Portefeuillef.OAPortefeuille(self,rendement,rf,XLuaVect)
end
Portefeuillef.courscompositionPortefeuilleZ2(self,rho)
end
function Portefeuillef.compositionPortefeuilleAversion2(self,Rvect,sigmaVect,rhoVect,thetha,sigmaLuaVect,RLuaVect,rho)
local XLuaVect={}
self:appendMathToResult("XA=(RA-RB+"..c_theta.."*("..c_sigma.."B^2-"..c_rho.."*"..c_sigma.."A*"..c_sigma.."B))/("..c_theta.."*("..c_sigma.."A^2+"..c_sigma.."B^2-2"..c_rho.."*"..c_sigma.."A*"..c_sigma.."B))")
local calcStr = "("..tostring(RLuaVect[1]).."-"..tostring(RLuaVect[2]).."+"..tostring(thetha).."*(("..tostring(sigmaLuaVect[2])..")^2-"..tostring(rho).."*"..tostring(sigmaLuaVect[1]).."*"..tostring(sigmaLuaVect[2]).."))/("..tostring(thetha).."*(("..tostring(sigmaLuaVect[1])..")^2+("..tostring(sigmaLuaVect[2])..")^2-2*"..tostring(rho).."*"..tostring(sigmaLuaVect[1]).."*"..tostring(sigmaLuaVect[2]).."))"
self:appendToResult("\n")
self:appendMathToResult("XA="..tostring(calcStr))
self:appendToResult("\n")
local resultXa = tiNspire.execute(tostring(calcStr))
self:appendMathToResult("XA="..tostring(resultXa))
self:appendMathToResult("="..tostring(tiNspire.approx(tostring(resultXa))))
calcStr = "(1-"..tostring(resultXa)..")"
self:appendMathToResult("XB=1-XA="..calcStr)
local resultXb = tiNspire.execute(tostring(calcStr))
self:appendMathToResult("="..tostring(resultXb));
self:appendMathToResult("="..tostring(tiNspire.approx(tostring(resultXb))))
XLuaVect[1]=resultXa
XLuaVect[2]=resultXb
varValue["X"]=tostring(XLuaVect[1])..","..tostring(XLuaVect[2])
self:appendToResult("\n")
self:appendMathToResult("=P={"..tostring(XLuaVect[1]).."*A;"..tostring(XLuaVect[2]).."*B}")
end
function Portefeuillef.OAPortefeuille(self,rendement,rf,XLuaVect)
--
local deltaEq = 0.1
local count = table.getn(XLuaVect)
local rendAp = tiNspire.approx(rendement)
local res=""
if tonumber(count) ~= nil then
for i=1,count,1
do
if i>1 then
res=res..","
end
local c=string.char(65+i-1)
res=res..tostring(XLuaVect[i]).."*"..c
end
end
local rendNum = tiNspire.toNumber(tostring(rendement))
local rfNum = tiNspire.toNumber(tostring(rf))
local delta = tiNspire.toNumber(tiNspire.abs(tostring(rendement).."-"..tostring(rf)))
if rendNum ~=nil and delta~=nil and rfNum~=nil then
if delta<deltaEq then
self:appendToResult("pas d'OA car "..tostring(rendAp).." et "..tostring(rf).." sont proche(=)")
elseif rendNum <rfNum then
self:appendToResult("ici OA car "..tostring(rendAp).."% < "..tostring(rf).."%\n")
self:appendToResult("Donc vente "..a_acute.." decouvert du portefeuille z et achat de rf :\n")
self:appendToResult("ici VAD :")
self:appendMathToResult(tostring(res))
self:appendToResult("et position longue rf \n")
else
self:appendToResult("ici OA car "..tostring(rendAp).."% > "..tostring(rf).."%\n")
self:appendToResult("Donc achat du portefeuille z et position courte sur rf :\n")
self:appendToResult("ici achat :")
self:appendMathToResult(tostring(res))
self:appendToResult("\n et position courte rf \n")
end
else
self:appendToResult("rf or rendement is null!\n")
end
end
function Portefeuillef.rendementPortefeuille(self,XLuaVect,RLuaVect,count)
local res=""
local resCalc=""
if tonumber(count) ~= nil then
for i=1,count,1
do
if i>1 then
res=res.."+"
resCalc=resCalc.."+"
end
local c=string.char(65+i-1)
res=res.."X"..c.."*R"..c
resCalc=resCalc..tostring(XLuaVect[i]).."*"..tostring(RLuaVect[i])
end
end
self:appendMathToResult("R="..tostring(res).."="..tostring(resCalc));
local resFromCalc = tiNspire.execute(tostring(resCalc))
self:appendMathToResult("="..tostring(resFromCalc))
self:appendMathToResult("="..tostring(tiNspire.approx(resFromCalc)))
return resFromCalc
end
function Portefeuillef.courscompositionPortefeuilleZ2(self,rho)
self:appendMathToResult("Rp=X1*R1+X2+R2")
self:appendToResult(" avec ");
self:appendMathToResult("X2=1-X1")
self:appendToResult("\n")
self:appendMathToResult(c_sigma.."p^2=X1*"..c_sigma.."1^2+(1-X1)^2*"..c_sigma.."2^2+2*"..c_rho.."1_2*"..c_sigma.."1*"..c_sigma.."2*X1*(1-X1)")
self:appendToResult("\n")
self:appendMathToResult("Rp="..sum_sym.."(xi*Ri,i,1,N)")
self:appendToResult("\n")
self:appendMathToResult(c_sigma.."p^2="..sum_sym.."("..sum_sym.."(xi*xj*"..c_sigma.."ij,j,1,N),i,1,N)")
self:appendToResult("\n")
local rhoN=tiNspire.toNumber(rho)
if rhoN==-1 then
self:appendMathToResult(c_rho.."1_2=-1")
self:appendToResult("\n")
self:appendMathToResult("X1=("..c_sigma.."2/("..c_sigma.."1+"..c_sigma.."2))")
elseif rhoN==1 then
self:appendMathToResult(c_rho.."1_2=1")
self:appendToResult("\n")
self:appendMathToResult(c_sigma.."p=X1*"..c_sigma.."1+(1-X1)*"..c_sigma.."2")
self:appendToResult("\n")
self:appendMathToResult("X1=("..c_sigma.."p-"..c_sigma.."2)/("..c_sigma.."1-"..c_sigma.."2)")
self:appendToResult("\n")
self:appendMathToResult("Rp=((R2-((R1-R2)/("..c_sigma.."1-"..c_sigma.."2))*"..c_sigma.."2)+((R1-R2)/("..c_sigma.."1-"..c_sigma.."2))*"..c_sigma.."p")
elseif rhoN==0 then
self:appendMathToResult(c_rho.."1_2=0")
self:appendToResult("\n")
self:appendMathToResult("X1min=(("..c_sigma.."2^2)/("..c_sigma.."1^2+"..c_sigma.."2^2))")
else
self:appendMathToResult(c_rho.."1_2="..tostring(rhoN))
self:appendToResult("\n")
self:appendMathToResult(c_sigma.."p=(X1^2)/("..c_sigma.."1^2+(1-X1)^2*"..c_sigma.."2^2+2*X1*(1-X1)*"..c_sigma.."1*"..c_sigma.."2*"..c_rho.."1_2)^(1/2)")
self:appendToResult("\n")
self:appendMathToResult("X1min=("..c_sigma.."2^2-"..c_sigma.."1*"..c_sigma.."2*"..c_rho.."1_2)/("..c_sigma.."1^2+"..c_sigma.."2^2-2*"..c_sigma.."1*"..c_sigma.."2*"..c_rho.."1_2))")
end
self:appendToResult("\n")
self:appendMathToResult("X2=1-X1")
self:appendToResult("\n")
end
function Portefeuillef.sansActifSansRisqueMinimisationDeRisque(self,covVect,rp,Rvect)
if covVect ~= nil and Rvect ~= nil then
local covLuaVect,covTiVect,countCov=Portefeuillef.GetVect(self,covVect)
local RvectLuaVect,RvectTiVect,countRvect=Portefeuillef.GetVect(self,Rvect)
local expected=tiNspire.approx("(nPr("..tostring(countRvect)..",2)/2)+"..tostring(countRvect))
if countCov~=tiNspire.toNumber(expected) then
self:appendToResult("Attention : Il devrait y avoir "..tostring(expected).." cov(i,j) != "..tostring(countCov))
else
self:appendToResult("number of covariance found "..tostring(countCov).." as expected "..tostring(expected))
end
self:appendToResult("\nIl y a "..tostring(countRvect).." actifs dans le portefeuille\n")
self:appendMathToResult("R="..tostring(RvectTiVect))
self:appendMathToResult("Covij="..tostring(covTiVect))
local matriceCours="["
local matriceIntermediaire="["
local matriceResult ="["
for i=1,countRvect,1
do
if i~=1 then
matriceCours=matriceCours..";"
matriceResult = matriceResult ..";"
matriceIntermediaire=matriceIntermediaire..";"
end
for j=1,countRvect,1
do
if j~=1 then
matriceCours=matriceCours..","
matriceResult =matriceResult ..","
matriceIntermediaire =matriceIntermediaire..","
end
local calc = ""
local a,b
if i<j then
a=i
b=j
else
b=i
a=j
end
matriceCours=matriceCours.."2*"..c_sigma..tostring(i).."_"..tostring(j)
calc="2*"..tostring(covLuaVect[Portefeuillef.toCovIdx(a,b,countRvect)])
matriceIntermediaire=matriceIntermediaire..tostring(calc)
matriceResult =matriceResult ..tostring(tiNspire.execute(tostring(calc)))
if i==countRvect then
if j==countRvect then
matriceCours=matriceCours..",r"..tostring(i)..",1;"
matriceResult =matriceResult ..","..tostring(RvectLuaVect[i])..",1;"
matriceIntermediaire =matriceIntermediaire..","..tostring(RvectLuaVect[i])..",1;"
for k=1,countRvect,1
do
if k~=1 then
matriceCours=matriceCours..","
matriceResult =matriceResult ..","
matriceIntermediaire =matriceIntermediaire..","
end
matriceCours=matriceCours.."r"..tostring(k)
matriceResult =matriceResult..tostring(RvectLuaVect[k])
matriceIntermediaire =matriceIntermediaire..tostring(RvectLuaVect[k])
end
matriceCours=matriceCours..",0,0;"
matriceResult =matriceResult ..",0,0;"
matriceIntermediaire =matriceIntermediaire..",0,0;"
for k=1,countRvect,1
do
if k~=1 then
matriceCours=matriceCours..","
matriceResult =matriceResult ..","
matriceIntermediaire =matriceIntermediaire..","
end
matriceCours=matriceCours.."1"
matriceResult =matriceResult.."1"
matriceIntermediaire =matriceIntermediaire.."1"
end
matriceCours=matriceCours..",0,0"
matriceResult =matriceResult ..",0,0"
matriceIntermediaire =matriceIntermediaire..",0,0"
end
elseif j==countRvect then
matriceCours=matriceCours..",r"..tostring(i)..",1"
matriceResult =matriceResult..","..tostring(RvectLuaVect[i])..",1"
matriceIntermediaire =matriceIntermediaire..","..tostring(RvectLuaVect[i])..",1"
end
print("loop : "..tostring(i)..","..tostring(j))
end
end
matriceCours=matriceCours.."]"
matriceIntermediaire =matriceIntermediaire .."]"
matriceResult =matriceResult .."]"
varValue["AMat"] = tostring(matriceResult)
self:appendToResult("\nA=")
self:appendMathToResult(matriceCours)
self:appendToResult("=")
self:appendMathToResult(matriceIntermediaire)
self:appendToResult("=")
self:appendMathToResult(matriceResult)
self:appendToResult("=")
self:appendMathToResult(tiNspire.approx(matriceResult))
if rp ~=nil then
Portefeuillef.constructTMat(rp,countRvect)
end
end
end
function Portefeuillef.constructTMat(rp,count)
local tMat="["
for i=1,count,1
do
if i~=1 then
tMat=tMat..";"
end
tMat=tMat.."0"
end
tMat=tMat..";"..tostring(rp)..";1]"
varValue["tMat"]=tMat
end
function Portefeuillef.coursSansActifSansRisqueMinimisationDeRisque(self)
self:appendMathToResult(c_sigma.."x^2=V(Rx)->min")
self:appendToResult("\n")
self:appendMathToResult("E(Rx)=rp*")
self:appendToResult("\n")
self:appendMathToResult("{min "..sum_sym.."("..sum_sym.."(xi*xj*"..c_sigma.."i,j,1,N),i,1,N);"..sum_sym.."(xi*ri,i,1,N)=rp*;"..sum_sym.."(xi,i,1,N)=1}");
self:appendToResult("\n Ce probleme revient "..a_acute.." la minimisation du Lagrangien suivant:\n")
self:appendMathToResult("L(Xi,"..c_lambda.."1,"..c_lambda.."2)="..sum_sym.."("..sum_sym.."(xi*xj*"..c_sigma.."i,j,1,N),i,1,N)+"..c_lambda.."1*("..sum_sym.."(xi*ri,i,1,N)-rp*)+"..c_lambda.."2*("..sum_sym.."(xi,i,1,N)-1)")
end
function Portefeuillef.portefeuilleEff(self)
self:appendToResult("Ptf efficient : \n")
self:appendMathToResult("{X=(1/"..c_theta..")*V^(-1)*(RM-1rf);Xf=1-1X}")
self:appendToResult("\n")
end
|
local DEBUG_MOVEMENT = GetConVar("rsnb_debug_movement")
function ENT:MovementInaccessableInit()
self.inaccessable_data = {}
end
function ENT:GetCnavInaccessableData( cnav )
if not IsValid( cnav ) then return nil end
local data = self.inaccessable_data[tostring(cnav:GetID())]
return data
end
function ENT:MarkCnavInaccessable( cnav, reason, obstruction )
if DEBUG_MOVEMENT:GetBool() then
print( "MarkCnavInaccessable", cnav, reason, obstruction )
end
if not IsValid( cnav ) then return nil end
-- Updates existing data.
local existing_data = self:GetCnavInaccessableData( cnav )
if existing_data then
if not table.HasValue( existing_data.obstructions, obstruction ) then
table.insert( existing_data.obstructions, obstruction )
end
existing_data.time = CurTime()
existing_data.repeats = existing_data.repeats + 1
return
end
-- Creates new data.
local data = {
time = CurTime(),
repeats = 0,
obstructions = {obstruction}
}
self.inaccessable_data[tostring(cnav:GetID())] = data
end
function ENT:ClearCnavInaccessableData( cnav )
if DEBUG_MOVEMENT:GetBool() then
print( "ClearCnavInaccessableData", cnav )
end
self.inaccessable_data[tostring(cnav:GetID())] = nil
end |
return [[da
dab
dabbed
dabber
dabbers
dabbing
dabble
dabbled
dabbler
dabblers
dabbles
dabbling
dabblingly
dabblings
dabchick
dabchicks
dabs
dabster
dabsters
dace
daces
dacha
dachas
dachshund
dachshunds
dacite
dacker
dackered
dackering
dackers
dacoit
dacoitage
dacoitages
dacoities
dacoits
dacoity
dactyl
dactylar
dactylic
dactylist
dactylists
dactyls
dad
daddies
daddle
daddled
daddles
daddling
daddock
daddocks
daddy
dado
dadoes
dados
dads
dae
daedal
daedalic
daemon
daemonic
daemons
daff
daffier
daffiest
daffing
daffings
daffodil
daffodilly
daffodils
daffs
daffy
daft
daftar
daftars
dafter
daftest
daftly
daftness
dag
dagaba
dagabas
dagga
daggas
dagged
dagger
daggers
dagging
daggle
daggled
daggles
daggling
daggy
daglock
daglocks
dago
dagoba
dagobas
dagoes
dagos
dags
daguerrean
dagwood
dagwoods
dah
dahabieh
dahabiehs
dahl
dahlia
dahlias
dahls
dahs
daiker
daikered
daikering
daikers
daikon
daikons
dailies
daily
daimen
daimio
daimios
daimon
daimonic
daimons
daint
daintier
dainties
daintiest
daintily
daintiness
dainty
daiquiri
daiquiris
dairies
dairy
dairying
dairyings
dairymaid
dairymaids
dairyman
dairymen
dairywoman
dairywomen
dais
daises
daisied
daisies
daisy
daisywheel
dak
dakoit
dakoits
daks
dal
dale
dales
dalesman
dalesmen
dali
dalis
dalle
dalles
dalliance
dalliances
dallied
dallier
dalliers
dallies
dallop
dallops
dally
dallying
dalmatic
dalmatics
dals
dalt
dalts
dam
damage
damageable
damaged
damages
damaging
damagingly
daman
damans
damar
damars
damascene
damascened
damascenes
damask
damasked
damasking
damasks
damassin
damassins
dambrod
dambrods
dame
dames
damfool
dammar
dammars
damme
dammed
dammer
dammers
dammes
damming
dammit
dammits
damn
damnable
damnably
damnation
damnations
damnatory
damned
damnedest
damnified
damnifies
damnify
damnifying
damning
damns
damoisel
damoisels
damosel
damosels
damozel
damozels
damp
damped
dampen
dampened
dampener
dampeners
dampening
dampens
damper
dampers
dampest
damping
dampish
damply
dampness
damps
dampy
dams
damsel
damselfish
damselfly
damsels
damson
damsons
dan
dance
danceable
danced
dancer
dancers
dances
dancette
dancettes
dancing
dancings
dandelion
dandelions
dander
dandered
dandering
danders
dandiacal
dandier
dandies
dandiest
dandified
dandifies
dandify
dandifying
dandily
dandiprat
dandiprats
dandle
dandled
dandler
dandlers
dandles
dandling
dandriff
dandruff
dandy
dandyish
dandyism
dang
danged
danger
dangerous
dangers
danging
dangle
dangled
dangler
danglers
dangles
dangling
danglings
dangly
dangs
danio
danios
dank
danker
dankest
dankish
dankness
dannebrog
dannebrogs
dans
danseur
danseurs
danseuse
danseuses
danthonia
dap
daphne
daphnes
daphnid
dapped
dapper
dapperer
dapperest
dapperling
dapperly
dapperness
dappers
dapping
dapple
dappled
dapples
dappling
daps
dapsone
daraf
darafs
darbies
darcies
darcy
darcys
dare
dared
dareful
dares
darg
dari
daric
darics
daring
daringly
dariole
darioles
daris
dark
darken
darkened
darkening
darkens
darker
darkest
darkey
darkeys
darkie
darkies
darkish
darkle
darkled
darkles
darkling
darklings
darkly
darkmans
darkness
darks
darksome
darky
darling
darlings
darn
darned
darnel
darnels
darner
darners
darning
darnings
darns
darraign
darshan
darshans
dart
dartboard
dartboards
darted
darter
darters
darting
dartingly
dartle
dartled
dartles
dartling
dartre
dartrous
darts
das
dash
dashboard
dashboards
dashed
dasheen
dasheens
dasher
dashers
dashes
dashiki
dashikis
dashing
dashingly
dassie
dassies
dastard
dastardly
dastards
dasypod
dasypods
dasyure
dasyures
data
database
databases
datable
databus
databuses
dataflow
dataglove
datagloves
datamation
dataria
datarias
dataries
datary
date
dateable
dated
dateless
dateline
datelines
dater
daters
dates
dating
datival
dative
datives
datolite
datum
datura
daturas
daub
daube
daubed
dauber
dauberies
daubers
daubery
daubier
daubiest
daubing
daubings
daubs
dauby
daud
dauds
daughter
daughterly
daughters
daunder
daundered
daundering
daunders
daunt
daunted
daunter
daunters
daunting
dauntless
daunts
dauphin
dauphine
dauphines
dauphiness
dauphins
daur
daut
dauted
dautie
dauties
dauting
dauts
daven
davened
davening
davenport
davenports
davens
davit
davits
daw
dawdle
dawdled
dawdler
dawdlers
dawdles
dawdling
dawdlingly
dawish
dawk
dawks
dawn
dawned
dawning
dawnings
dawns
daws
dawt
dawted
dawtie
dawties
dawting
dawts
day
daybreak
daybreaks
daydream
daydreamed
daydreamer
daydreams
daydreamt
dayglo
daylight
daylights
daylong
daymark
daymarks
daynt
dayroom
dayrooms
days
daysman
daysmen
dayspring
daysprings
daystar
daystars
daytale
daytime
daytimes
daze
dazed
dazedly
dazes
dazing
dazzle
dazzled
dazzlement
dazzler
dazzlers
dazzles
dazzling
dazzlingly
dazzlings
deacon
deaconess
deaconhood
deaconries
deaconry
deacons
deaconship
deactivate
dead
deaden
deadened
deadener
deadeners
deadening
deadenings
deadens
deader
deaders
deadest
deadhead
deadheaded
deadheads
deadlier
deadliest
deadlight
deadlights
deadline
deadlines
deadliness
deadlock
deadlocked
deadlocks
deadly
deadness
deadstock
deaf
deafen
deafened
deafening
deafenings
deafens
deafer
deafest
deafly
deafness
deal
dealbate
dealbation
dealer
dealers
dealership
dealfish
dealfishes
dealing
dealings
deals
dealt
dean
deaner
deaneries
deaners
deanery
deans
deanship
deanships
dear
dearbought
deare
dearer
dearest
dearie
dearies
dearling
dearly
dearn
dearness
dears
dearth
dearths
deary
deasil
deaspirate
death
deathful
deathless
deathlier
deathliest
deathlike
deathly
deaths
deathsman
deathward
deathwards
deathy
deave
deaved
deaves
deaving
deb
debacle
debacles
debag
debagged
debagging
debags
debar
debark
debarked
debarking
debarks
debarment
debarments
debarrass
debarred
debarring
debars
debase
debased
debasement
debaser
debasers
debases
debasing
debasingly
debatable
debate
debateable
debated
debateful
debatement
debater
debaters
debates
debating
debatingly
debauch
debauched
debauchee
debauchees
debaucher
debauchers
debauchery
debauches
debauching
debbies
debby
debel
debelled
debelling
debels
debenture
debentured
debentures
debile
debilitate
debility
debit
debited
debiting
debitor
debitors
debits
debonair
debonairly
debone
deboned
debones
deboning
debonnaire
debosh
deboshed
deboshes
deboshing
deboss
debossed
debosses
debossing
debouch
debouche
debouched
debouches
debouching
debouchure
debride
debrided
debrides
debriding
debrief
debriefed
debriefing
debriefs
debris
debruised
debs
debt
debted
debtee
debtees
debtor
debtors
debts
debug
debugged
debugger
debuggers
debugging
debugs
debunk
debunked
debunking
debunks
debus
debussed
debusses
debussing
debut
debutant
debutante
debutantes
debutants
debuts
decachord
decachords
decad
decadal
decade
decadence
decadences
decadency
decadent
decadently
decadents
decades
decads
decaff
decagon
decagonal
decagons
decagram
decagramme
decagrams
decagynous
decahedral
decahedron
decal
decalcify
decalitre
decalitres
decalogist
decalogue
decalogues
decals
decamerous
decametre
decametres
decamp
decamped
decamping
decampment
decamps
decanal
decane
decani
decant
decantate
decanted
decanter
decanters
decanting
decants
decapitate
decapod
decapodal
decapodan
decapodous
decapods
decarb
decarbed
decarbing
decarbs
decare
decares
decastere
decasteres
decastich
decastichs
decastyle
decastyles
decathlete
decathlon
decathlons
decaudate
decaudated
decaudates
decay
decayed
decaying
decays
deccie
deccies
decease
deceased
deceases
deceasing
decedent
deceit
deceitful
deceits
deceivable
deceivably
deceive
deceived
deceiver
deceivers
deceives
deceiving
decelerate
decemvir
decemviral
decemviri
decemvirs
decencies
decency
decennary
decennial
decennium
decenniums
decennoval
decent
decently
deceptible
deception
deceptions
deceptious
deceptive
deceptory
decern
decerned
decerning
decerns
decession
decessions
deciare
deciares
decibel
decibels
decidable
decide
decided
decidedly
decider
deciders
decides
deciding
decidua
deciduae
decidual
deciduas
deciduate
deciduous
decigram
decigramme
decigrams
decile
deciles
deciliter
deciliters
decilitre
decilitres
decillion
decillions
decimal
decimalise
decimalism
decimalist
decimalize
decimally
decimals
decimate
decimated
decimates
decimating
decimation
decimator
decimators
decime
decimes
decimeter
decimeters
decimetre
decimetres
decinormal
decipher
deciphered
decipherer
deciphers
decision
decisions
decisive
decisively
decistere
decisteres
decivilise
decivilize
deck
decked
decker
deckers
decking
deckle
deckles
decko
deckoed
deckoing
deckos
decks
declaim
declaimant
declaimed
declaimer
declaimers
declaiming
declaims
declarable
declarant
declarants
declarator
declare
declared
declaredly
declarer
declarers
declares
declaring
declass
declasse
declassed
declassee
declassees
declasses
declassify
declassing
declension
declinable
declinal
declinate
declinator
decline
declined
declines
declining
declivity
declivous
declutch
declutched
declutches
deco
decoct
decocted
decoctible
decocting
decoction
decoctions
decoctive
decocts
decode
decoded
decoder
decoders
decodes
decoding
decoherer
decoherers
decoke
decoked
decokes
decoking
decollate
decollated
decollates
decollator
decollete
decolonise
decolonize
decolor
decolorant
decolorate
decolored
decoloring
decolorise
decolorize
decolors
decolour
decoloured
decolours
decomplex
decompose
decomposed
decomposer
decomposes
decompound
decompress
decongest
decongests
decontrol
decontrols
decor
decorate
decorated
decorates
decorating
decoration
decorative
decorator
decorators
decorous
decorously
decors
decorum
decorums
decoupage
decouple
decoupled
decouples
decoupling
decoy
decoyed
decoying
decoys
decrassify
decrease
decreased
decreases
decreasing
decree
decreeable
decreed
decreeing
decrees
decreet
decreets
decrement
decrements
decrepit
decrescent
decretal
decretals
decretist
decretists
decretive
decretory
decrew
decrial
decrials
decried
decrier
decries
decrown
decrowned
decrowning
decrowns
decry
decrying
decrypt
decrypted
decrypting
decryption
decrypts
decubitus
decuman
decumans
decumbence
decumbency
decumbent
decuple
decupled
decuples
decupling
decuria
decurias
decuries
decurion
decurions
decurrency
decurrent
decursion
decursions
decursive
decurve
decurved
decurves
decurving
decury
decussate
decussated
decussates
dedal
dedalian
dedans
dedicant
dedicants
dedicate
dedicated
dedicatee
dedicatees
dedicates
dedicating
dedication
dedicative
dedicator
dedicators
dedicatory
dedimus
dedimuses
deduce
deduced
deducement
deduces
deducible
deducing
deduct
deducted
deductible
deducting
deduction
deductions
deductive
deducts
dee
deed
deeded
deedful
deedier
deediest
deedily
deeding
deedless
deeds
deedy
deeing
deejay
deejays
deek
deem
deemed
deeming
deems
deemster
deemsters
deep
deepen
deepened
deepening
deepens
deeper
deepest
deeply
deepmost
deepness
deeps
deer
deerberry
deere
deerlet
deerlets
deerskin
deerskins
dees
def
deface
defaced
defacement
defacer
defacers
defaces
defacing
defacingly
defalcate
defalcator
defamation
defamatory
defame
defamed
defamer
defamers
defames
defaming
defamings
defat
defats
defatted
defatting
default
defaulted
defaulter
defaulters
defaulting
defaults
defeasance
defeasible
defeat
defeated
defeating
defeatism
defeatist
defeatists
defeats
defeature
defecate
defecated
defecates
defecating
defecation
defecator
defecators
defect
defected
defectible
defecting
defection
defections
defective
defectives
defector
defectors
defects
defence
defenceman
defences
defend
defendable
defendant
defendants
defended
defender
defenders
defending
defends
defense
defenseman
defenses
defensible
defensibly
defensive
defer
deferable
deference
deferences
deferent
deferents
deferment
deferments
deferrable
deferral
deferrals
deferred
deferrer
deferrers
deferring
defers
defiance
defiances
defiant
defiantly
deficience
deficiency
deficient
deficients
deficit
deficits
defied
defier
defiers
defies
defilade
defiladed
defilades
defilading
defile
defiled
defilement
defiler
defilers
defiles
defiling
definable
definably
define
defined
definement
definer
definers
defines
definienda
definiens
defining
definite
definitely
definition
definitive
definitude
deflagrate
deflate
deflated
deflater
deflaters
deflates
deflating
deflation
deflations
deflator
deflators
deflect
deflected
deflecting
deflection
deflective
deflector
deflectors
deflects
deflex
deflexed
deflexes
deflexing
deflexion
deflexions
deflexure
deflexures
deflorate
deflorated
deflorates
deflower
deflowered
deflowerer
deflowers
defluent
defluxion
defoliant
defoliants
defoliate
defoliated
defoliates
defoliator
deforce
deforced
deforces
deforciant
deforcing
deforest
deforested
deforests
deform
deformable
deformed
deformedly
deformer
deformers
deforming
deformity
deforms
defoul
defouled
defouling
defouls
defraud
defrauded
defrauder
defrauders
defrauding
defrauds
defray
defrayable
defrayal
defrayals
defrayed
defrayer
defrayers
defraying
defrayment
defrays
defreeze
defreezes
defreezing
defrock
defrocked
defrocking
defrocks
defrost
defrosted
defroster
defrosters
defrosting
defrosts
defroze
defrozen
deft
defter
deftest
deftly
deftness
defunct
defunction
defunctive
defuncts
defuse
defused
defuses
defusing
defuze
defuzed
defuzes
defuzing
defy
defying
degage
degauss
degaussed
degausses
degaussing
degender
degeneracy
degenerate
degradable
degrade
degraded
degrades
degrading
degrease
degreased
degreases
degreasing
degree
degrees
degression
degressive
degum
degummed
degumming
degums
degust
degustate
degustated
degustates
degusted
degusting
degusts
dehisce
dehisced
dehiscence
dehiscent
dehisces
dehiscing
dehorn
dehorned
dehorner
dehorners
dehorning
dehorns
dehort
dehorted
dehorter
dehorters
dehorting
dehorts
dehumanise
dehumanize
dehumidify
dehydrate
dehydrated
dehydrates
dehydrator
deicidal
deicide
deicides
deictic
deictics
deid
deific
deifical
deified
deifier
deifiers
deifies
deiform
deify
deifying
deign
deigned
deigning
deigns
deil
deils
deinosaur
deinosaurs
deionise
deionised
deionises
deionising
deionize
deionized
deionizes
deionizing
deiparous
deiseal
deism
deist
deistic
deistical
deists
deities
deity
deixis
deject
dejecta
dejected
dejectedly
dejecting
dejection
dejections
dejectory
dejects
dejeune
dejeuner
dejeuners
dejeunes
dekko
dekkoed
dekkoing
dekkos
del
delaine
delaminate
delapse
delapsion
delapsions
delate
delated
delates
delating
delation
delator
delators
delay
delayed
delayer
delayers
delaying
delayingly
delays
dele
deleble
delectable
delectably
delegable
delegacies
delegacy
delegate
delegated
delegates
delegating
delegation
delenda
delete
deleted
deletes
deleting
deletion
deletions
deletive
deletory
delf
delfs
delft
deli
delibate
deliberate
delible
delicacies
delicacy
delicate
delicately
delicates
delice
delices
delicious
delict
delicts
deligation
delight
delighted
delightful
delighting
delights
delimit
delimitate
delimited
delimiting
delimits
delineable
delineate
delineated
delineates
delineator
delineavit
delinquent
deliquesce
deliquium
deliquiums
deliration
deliria
deliriant
deliriants
delirious
delirium
deliriums
delis
deliver
delivered
deliverer
deliverers
deliveries
delivering
deliverly
delivers
delivery
dell
dells
delouse
deloused
delouses
delousing
delph
delphin
delphinia
delphinium
delphinoid
delphs
dels
delta
deltaic
deltas
deltiology
deltoid
delubrum
delubrums
deludable
delude
deluded
deluder
deluders
deludes
deluding
deluge
deluged
deluges
deluging
delundung
delundungs
delusion
delusional
delusions
delusive
delusively
delusory
delustrant
delve
delved
delver
delvers
delves
delving
demagogic
demagogism
demagogue
demagogues
demagogy
demain
demains
deman
demand
demandable
demandant
demandants
demanded
demander
demanders
demanding
demands
demanned
demanning
demans
demantoid
demarcate
demarcated
demarcates
demarche
demarches
demark
demarked
demarking
demarks
deme
demean
demeaned
demeaning
demeanor
demeanors
demeanour
demeanours
demeans
dement
dementate
dementated
dementates
demented
dementedly
dementi
dementia
dementias
dementing
dementis
dements
demerara
demerge
demerged
demerger
demergers
demerges
demerging
demerit
demerits
demersal
demerse
demersed
demersion
demersions
demes
demesne
demesnes
demies
demigod
demigods
demijohn
demijohns
demipique
demipiques
demirep
demireps
demisable
demise
demised
demises
demising
demiss
demission
demissions
demissive
demissly
demist
demisted
demister
demisters
demisting
demists
demit
demitasse
demitasses
demits
demitted
demitting
demiurge
demiurges
demiurgic
demivolt
demivolte
demivoltes
demivolts
demo
demob
demobbed
demobbing
demobilise
demobilize
demobs
democracy
democrat
democratic
democrats
demode
demoded
demodulate
demography
demoiselle
demolish
demolished
demolisher
demolishes
demolition
demology
demon
demoness
demonesses
demonetise
demonetize
demoniac
demoniacal
demoniacs
demonic
demonise
demonised
demonises
demonising
demonism
demonist
demonists
demonize
demonized
demonizes
demonizing
demonology
demonry
demons
demoralise
demoralize
demos
demote
demoted
demotes
demotic
demoting
demotion
demotions
demotist
demotists
demotivate
demount
demounted
demounting
demounts
dempster
dempsters
demulcent
demulcents
demulsify
demur
demure
demurely
demureness
demurer
demurest
demurrable
demurrage
demurrages
demurral
demurrals
demurred
demurrer
demurrers
demurring
demurs
demy
demyship
demyships
demystify
den
denaries
denarii
denarius
denary
denaturant
denature
denatured
denatures
denaturing
denaturise
denaturize
denay
denazified
denazifies
denazify
dendriform
dendrite
dendrites
dendritic
dendrobium
dendrogram
dendroid
dendroidal
dendrology
dendron
dendrons
dene
denegation
denervate
denervated
denervates
denes
dengue
deniable
deniably
denial
denials
denied
denier
deniers
denies
denigrate
denigrated
denigrates
denigrator
denim
denims
denitrate
denitrated
denitrates
denitrify
denization
denizen
denizened
denizening
denizens
denned
dennet
dennets
denning
denominate
denotable
denotate
denotated
denotates
denotating
denotation
denotative
denote
denoted
denotement
denotes
denoting
denouement
denounce
denounced
denouncer
denouncers
denounces
denouncing
dens
dense
densely
denseness
denser
densest
densified
densifier
densifies
densify
densimeter
densimetry
densities
density
dent
dental
dentalia
dentalium
dentaliums
dentals
dentaria
dentarias
dentaries
dentary
dentate
dentated
dentation
dentations
dented
dentel
dentelle
dentels
dentex
dentexes
denticle
denticles
dentiform
dentifrice
dentil
dentils
dentin
dentine
denting
dentist
dentistry
dentists
dentition
dentitions
dentoid
dents
denture
dentures
denudate
denudated
denudates
denudating
denudation
denude
denuded
denudes
denuding
denunciate
deny
denying
denyingly
deodand
deodands
deodar
deodars
deodate
deodates
deodorant
deodorants
deodorise
deodorised
deodoriser
deodorises
deodorize
deodorized
deodorizer
deodorizes
deontic
deontology
deoppilate
deoxidate
deoxidated
deoxidates
deoxidise
deoxidised
deoxidiser
deoxidises
deoxidize
deoxidized
deoxidizer
deoxidizes
depaint
depainted
depainting
depaints
depart
departed
departer
departers
departing
departings
department
departs
departure
departures
depasture
depastured
depastures
depÍche
depeinct
depend
dependable
dependably
dependance
dependant
dependants
depended
dependence
dependency
dependent
dependents
depending
depends
depict
depicted
depicter
depicters
depicting
depiction
depictions
depictive
depictor
depictors
depicts
depicture
depictured
depictures
depilate
depilated
depilates
depilating
depilation
depilator
depilators
depilatory
deplane
deplaned
deplanes
deplaning
depletable
deplete
depleted
depletes
depleting
depletion
depletions
depletive
depletory
deplorable
deplorably
deplore
deplored
deplores
deploring
deploy
deployed
deploying
deployment
deploys
deplume
deplumed
deplumes
depluming
depolarise
depolarize
depone
deponed
deponent
deponents
depones
deponing
depopulate
deport
deported
deportee
deportees
deporting
deportment
deports
deposable
deposal
deposals
depose
deposed
deposer
deposers
deposes
deposing
deposit
depositary
deposited
depositing
deposition
depositive
depositor
depositors
depository
deposits
depot
depots
deprave
depraved
depravedly
depraves
depraving
depravity
deprecable
deprecate
deprecated
deprecates
deprecator
depreciate
depredate
depredated
depredates
depredator
deprehend
depress
depressant
depressed
depresses
depressing
depression
depressive
depressor
depressors
deprivable
deprival
deprivals
deprive
deprived
deprives
depriving
deprogram
deprograms
depside
depsides
depth
depthless
depths
depurant
depurants
depurate
depurated
depurates
depurating
depuration
depurative
depurator
depurators
depuratory
deputation
depute
deputed
deputes
deputies
deputing
deputise
deputised
deputises
deputising
deputize
deputized
deputizes
deputizing
deputy
deracinate
deraign
derail
derailed
derailer
derailers
derailing
derailleur
derailment
derails
derange
deranged
deranges
deranging
derate
derated
derates
derating
deratings
deration
derationed
derations
deray
derbies
derby
dere
deregister
deregulate
derelict
derelicts
derestrict
deride
derided
derider
deriders
derides
deriding
deridingly
derig
derigged
derigging
derigs
derisible
derision
derisions
derisive
derisively
derisory
derivable
derivably
derivate
derivation
derivative
derive
derived
derives
deriving
derm
derma
dermal
dermas
dermatic
dermatitis
dermatogen
dermatoid
dermatome
dermatoses
dermatosis
dermic
dermis
dermises
dermoid
derms
dern
dernier
derogate
derogated
derogately
derogates
derogating
derogation
derogative
derogatory
derrick
derricks
derriËre
derriËres
derringer
derringers
derris
derrises
derry
derth
derths
derv
dervish
dervishes
desalinate
desalinise
desalinize
desalt
desalted
desalting
desaltings
desalts
descale
descaled
descales
descaling
descant
descanted
descanting
descants
descend
descendant
descended
descendent
descender
descenders
descending
descends
descension
descent
descents
deschool
deschooled
deschooler
deschools
descramble
describe
described
describer
describers
describes
describing
descried
descries
descriptor
descrive
descrived
descrives
descriving
descry
descrying
desecrate
desecrated
desecrater
desecrates
desecrator
deselect
deselected
deselects
desert
deserted
deserter
deserters
deserting
desertion
desertions
desertless
deserts
deserve
deserved
deservedly
deserver
deservers
deserves
deserving
desex
desexed
desexes
desexing
deshabille
desiccant
desiccants
desiccate
desiccated
desiccates
desiccator
desiderata
desiderate
desiderium
design
designable
designate
designated
designates
designator
designed
designedly
designer
designers
designful
designing
designless
designment
designs
desilver
desilvered
desilvers
desinence
desinences
desinent
desipience
desipient
desirable
desirably
desire
desired
desireless
desirer
desirers
desires
desiring
desirous
desirously
desist
desistance
desisted
desisting
desists
desk
deskill
deskilled
deskilling
deskills
desks
desktop
desman
desmans
desmid
desmids
desmine
desmodium
desmodiums
desmoid
desmosomal
desmosome
desoeuvre
desolate
desolated
desolately
desolater
desolaters
desolates
desolating
desolation
desolator
desolators
desorb
desorbed
desorbing
desorbs
desorption
despair
despaired
despairful
despairing
despairs
despatch
despatched
despatches
desperado
desperados
desperate
despicable
despicably
despisable
despisal
despise
despised
despiser
despisers
despises
despising
despite
despiteful
despiteous
despites
despoil
despoiled
despoiler
despoilers
despoiling
despoils
despond
desponded
despondent
desponding
desponds
despot
despotat
despotats
despotic
despotical
despotism
despotisms
despots
despumate
despumated
despumates
desquamate
desse
dessert
desserts
desses
dessiatine
destinate
destine
destined
destines
destinies
destining
destiny
destitute
destrier
destriers
destroy
destroyed
destroyer
destroyers
destroying
destroys
destruct
destructed
destructor
destructs
desuetude
desuetudes
desulphur
desultory
desyatin
desyatins
detach
detachable
detached
detachedly
detaches
detaching
detachment
detail
detailed
detailing
details
detain
detainable
detained
detainee
detainees
detainer
detainers
detaining
detainment
detains
detect
detectable
detected
detectible
detecting
detection
detections
detective
detectives
detector
detectors
detects
detent
detente
detention
detentions
detents
detenu
detenue
detenues
detenus
deter
deterge
deterged
detergence
detergency
detergent
detergents
deterges
deterging
determent
determents
determine
determined
determiner
determines
deterred
deterrence
deterrent
deterrents
deterring
deters
detersion
detersions
detersive
detersives
detest
detestable
detestably
detested
detesting
detests
dethrone
dethroned
dethroner
dethroners
dethrones
dethroning
detinue
detinues
detonate
detonated
detonates
detonating
detonation
detonator
detonators
detorsion
detorsions
detort
detorted
detorting
detortion
detortions
detorts
detour
detoured
detouring
detours
detox
detoxicant
detoxicate
detoxified
detoxifies
detoxify
detract
detracted
detracting
detraction
detractive
detractor
detractors
detractory
detracts
detrain
detrained
detraining
detrains
detraque
detraquee
detraquees
detraques
detriment
detriments
detrital
detrition
detritions
detritus
detrude
detruded
detrudes
detruding
detruncate
detrusion
detune
detuned
detunes
detuning
deuce
deuced
deucedly
deuces
deus
deuterate
deuterated
deuterates
deuteride
deuterium
deuteron
deuterons
deuton
deutons
deutoplasm
deutzia
deutzias
deva
devalorise
devalorize
devaluate
devaluated
devaluates
devalue
devalued
devalues
devaluing
devanagari
devas
devastate
devastated
devastates
devastator
devastavit
devel
develled
develling
develop
develope
developed
developer
developers
developing
develops
devels
devest
devested
devesting
devests
deviance
deviances
deviancies
deviancy
deviant
deviants
deviate
deviated
deviates
deviating
deviation
deviations
deviator
deviators
deviatory
device
deviceful
devices
devil
devildom
deviled
deviless
devilesses
devilet
devilets
deviling
devilings
devilish
devilishly
devilism
devilkin
devilkins
devilled
devilling
devilment
devilments
devilries
devilry
devils
devilship
deviltry
devious
deviously
devisable
devisal
devisals
devise
devised
devisee
devisees
deviser
devisers
devises
devising
devisor
devisors
devitalise
devitalize
devitrify
devocalise
devocalize
devoice
devoiced
devoices
devoicing
devoid
devoir
devoirs
devolution
devolve
devolved
devolves
devolving
devonport
devonports
devot
devote
devoted
devotedly
devotee
devotees
devotement
devotes
devoting
devotion
devotional
devotions
devots
devour
devoured
devourer
devourers
devouring
devourment
devours
devout
devoutly
devoutness
dew
dewan
dewani
dewanis
dewans
dewar
dewars
dewater
dewatered
dewatering
dewaters
dewed
dewier
dewiest
dewily
dewiness
dewing
dewitt
dewitted
dewitting
dewitts
dewlap
dewlapped
dewlaps
dewlapt
dewpoint
dews
dewy
dexter
dexterity
dexterous
dexters
dextral
dextrality
dextrally
dextran
dextrin
dextrine
dextrogyre
dextrorse
dextrose
dextrous
dextrously
dey
deys
dhak
dhaks
dhal
dhals
dharma
dharmas
dharmsala
dharmsalas
dharna
dharnas
dhobi
dhobis
dhole
dholes
dholl
dholls
dhoolies
dhooly
dhooti
dhootis
dhoti
dhotis
dhow
dhows
dhurra
dhurras
dhurrie
diabase
diabases
diabasic
diabetes
diabetic
diabetics
diablerie
diableries
diablery
diabolic
diabolical
diabolise
diabolised
diabolises
diabolism
diabolisms
diabolist
diabolize
diabolized
diabolizes
diabolo
diabology
diacaustic
diachronic
diachylon
diachylons
diachylum
diachylums
diacid
diacodion
diacodions
diacodium
diacodiums
diaconal
diaconate
diaconates
diaconicon
diacritic
diacritics
diact
diactinal
diactinic
diadem
diademed
diadems
diadochi
diadrom
diadroms
diaereses
diaeresis
diagenesis
diagenetic
diaglyph
diaglyphs
diagnose
diagnosed
diagnoses
diagnosing
diagnosis
diagnostic
diagometer
diagonal
diagonally
diagonals
diagram
diagrams
diagraph
diagraphic
diagraphs
diagrid
diagrids
diakineses
diakinesis
dial
dialect
dialectal
dialectic
dialectics
dialects
dialed
dialing
dialist
dialists
diallage
diallages
diallagic
diallagoid
dialled
dialler
diallers
dialling
diallings
dialog
dialogic
dialogise
dialogised
dialogises
dialogist
dialogists
dialogite
dialogize
dialogized
dialogizes
dialogue
dialogues
dials
dialysable
dialyse
dialysed
dialyser
dialysers
dialyses
dialysing
dialysis
dialytic
dialyzable
dialyze
dialyzed
dialyzer
dialyzers
dialyzes
dialyzing
diamagnet
diamagnets
diamante
diamantes
diamantine
diameter
diameters
diametral
diametric
diamond
diamonded
diamonds
diamyl
diandrous
dianetics
dianodal
dianoetic
dianthus
dianthuses
diapase
diapason
diapasons
diapause
diapauses
diapedesis
diapedetic
diapente
diapentes
diaper
diapered
diapering
diaperings
diapers
diaphanous
diaphone
diaphones
diaphragm
diaphragms
diaphyses
diaphysis
diapir
diapiric
diapirs
diapyeses
diapyesis
diapyetic
diapyetics
diarch
diarchic
diarchies
diarchy
diarial
diarian
diaries
diarise
diarised
diarises
diarising
diarist
diarists
diarize
diarized
diarizes
diarizing
diarrhea
diarrheal
diarrheic
diarrhoea
diarrhoeal
diarrhoeic
diary
diascope
diascopes
diaskeuast
diaspora
diasporas
diaspore
diastaltic
diastase
diastasic
diastasis
diastatic
diastema
diastemata
diaster
diastole
diastoles
diastolic
diastyle
diastyles
diathermal
diathermic
diathermy
diatheses
diathesis
diathetic
diatom
diatomic
diatomist
diatomists
diatomite
diatoms
diatonic
diatribe
diatribes
diatribist
diatropic
diatropism
diaxon
diaxons
diazepam
diazeuctic
diazeuxis
diazo
diazoes
diazonium
diazos
dib
dibasic
dibbed
dibber
dibbers
dibbing
dibble
dibbled
dibbler
dibblers
dibbles
dibbling
dibs
dibutyl
dicacity
dicast
dicastery
dicastic
dicasts
dice
diced
dicentra
dicentras
dicer
dicers
dices
dicey
dich
dichasia
dichasial
dichasium
dichlorvos
dichogamy
dichord
dichords
dichotomic
dichotomy
dichroic
dichroism
dichroite
dichroitic
dichromat
dichromate
dichromats
dichromic
dichromism
dicier
diciest
dicing
dicings
dick
dickcissel
dickens
dickenses
dicker
dickered
dickering
dickers
dickey
dickeys
dickhead
dickheads
dickie
dickier
dickies
dickiest
dicks
dicky
diclinism
diclinous
dicot
dicots
dicrotic
dicrotism
dicrotous
dict
dicta
dictaphone
dictate
dictated
dictates
dictating
dictation
dictations
dictator
dictators
dictatory
dictatress
dictatrix
dictature
dictatures
diction
dictionary
dictions
dictum
dictums
dicty
dictyogen
dicyclic
dicynodont
did
didactic
didactical
didactics
didactyl
didactyls
didakai
didakais
didapper
didappers
didascalic
diddicoy
diddicoys
diddies
diddle
diddled
diddler
diddlers
diddles
diddling
diddums
diddy
diddycoy
diddycoys
didelphian
didelphic
didelphid
didelphine
didelphous
didgeridoo
didicoi
didicois
didicoy
didicoys
dido
didoes
didos
didrachm
didrachma
didrachmas
didrachms
didst
didymium
didymous
didynamian
didynamous
die
dieb
dieback
diebacks
diebs
died
diedral
diedrals
diËdre
diËdres
diegeses
diegesis
dieldrin
dielectric
dielytra
dielytras
diene
dienes
diereses
dieresis
dies
diesel
dieselise
dieselised
dieselises
dieselize
dieselized
dieselizes
diesels
dieses
diesis
diestrus
diet
dietarian
dietarians
dietary
dieted
dieter
dieters
dietetic
dietetical
dietetics
diethyl
dietician
dieticians
dietine
dietines
dieting
dietist
dietists
dietitian
dietitians
diets
differ
differed
difference
differency
different
differing
differs
difficile
difficult
difficulty
diffidence
diffident
diffluent
difform
difformity
diffract
diffracted
diffracts
diffuse
diffused
diffusedly
diffusely
diffuser
diffusers
diffuses
diffusible
diffusing
diffusion
diffusions
diffusive
dig
digamies
digamist
digamists
digamma
digammas
digamous
digamy
digastric
digest
digested
digestedly
digester
digesters
digestible
digestif
digesting
digestion
digestions
digestive
digestives
digests
diggable
digged
digger
diggers
digging
diggings
dight
dighted
dighting
dights
digit
digital
digitalin
digitalise
digitalize
digitally
digitals
digitate
digitated
digitately
digitation
digitiform
digitise
digitised
digitiser
digitisers
digitises
digitising
digitize
digitized
digitizer
digitizers
digitizes
digitizing
digitorium
digits
digladiate
diglot
diglots
diglyph
diglyphs
dignified
dignifies
dignify
dignifying
dignitary
dignities
dignity
digonal
digoneutic
digraph
digraphs
digress
digressed
digresses
digressing
digression
digressive
digs
digynian
digynous
dihedral
dihedrals
dihedron
dihedrons
dihybrid
dihybrids
dihydric
dijudicate
dika
dike
diked
diker
dikers
dikes
dikey
dikier
dikiest
diking
dikkop
dikkops
diktat
diktats
dilacerate
dilapidate
dilatable
dilatancy
dilatant
dilatation
dilatator
dilatators
dilate
dilated
dilater
dilaters
dilates
dilating
dilation
dilations
dilative
dilator
dilatorily
dilators
dilatory
dildo
dildoe
dildoes
dildos
dilemma
dilemmas
dilemmatic
dilettante
dilettanti
diligence
diligences
diligent
diligently
dill
dilli
dillies
dilling
dillings
dillis
dills
dilly
dillybag
dillybags
dilucidate
diluent
diluents
dilute
diluted
dilutee
dilutees
diluteness
diluter
diluters
dilutes
diluting
dilution
dilutions
dilutor
dilutors
diluvial
diluvian
diluvion
diluvions
diluvium
diluviums
dim
dimble
dimbles
dime
dimension
dimensions
dimer
dimeric
dimerise
dimerised
dimerises
dimerising
dimerism
dimerize
dimerized
dimerizes
dimerizing
dimerous
dimers
dimes
dimeter
dimeters
dimethyl
dimetric
dimidiate
dimidiated
dimidiates
diminish
diminished
diminishes
diminuendo
diminution
diminutive
dimissory
dimity
dimly
dimmed
dimmer
dimmers
dimmest
dimming
dimmish
dimness
dimorph
dimorphic
dimorphism
dimorphous
dimorphs
dimple
dimpled
dimplement
dimples
dimplier
dimpliest
dimpling
dimply
dims
dimwit
dimwits
dimyarian
din
dinanderie
dinar
dinars
dindle
dindled
dindles
dindling
dine
dined
diner
diners
dines
dinette
dinettes
ding
dingbat
dingbats
dinge
dinged
dinger
dingers
dinges
dingeses
dingey
dingeys
dinghies
dinghy
dingier
dingiest
dingily
dinginess
dinging
dingle
dingles
dingo
dingoes
dings
dingus
dinguses
dingy
dinic
dinics
dining
dink
dinked
dinkier
dinkies
dinkiest
dinking
dinks
dinkum
dinky
dinmont
dinmonts
dinned
dinner
dinnerless
dinners
dinning
dinosaur
dinosauric
dinosaurs
dinothere
dinotheres
dins
dint
dinted
dinting
dints
diocesan
diocesans
diocese
dioceses
diode
diodes
dioecious
dioecism
dioestrus
diophysite
diopside
dioptase
diopter
diopters
dioptrate
dioptre
dioptres
dioptric
dioptrical
dioptrics
diorama
dioramas
dioramic
diorism
diorisms
diorite
dioritic
diorthoses
diorthosis
diorthotic
diota
diotas
dioxan
dioxane
dioxide
dioxides
dioxin
dip
dipchick
dipchicks
dipeptide
dipetalous
diphenyl
diphtheria
diphtheric
diphthong
diphthongs
diphyletic
diphyodont
diphysite
diphysites
diplegia
diplex
diploe
diploes
diploid
diploidy
diploma
diplomacy
diplomaed
diplomaing
diplomas
diplomat
diplomate
diplomates
diplomatic
diplomats
diplont
diplonts
diplopia
diplozoa
diplozoon
dipnoan
dipnoans
dipnoous
dipodidae
dipodies
dipody
dipolar
dipole
dipoles
dipped
dipper
dippers
dippier
dippiest
dipping
dippy
dips
dipsades
dipsas
dipso
dipsomania
dipsos
dipteral
dipteran
dipterans
dipterist
dipterists
dipteros
dipteroses
dipterous
diptych
diptychs
dirdum
dirdums
dire
direct
directed
directing
direction
directions
directive
directives
directly
directness
director
directors
directory
directress
directrix
directs
direful
direfully
dirempt
dirempted
dirempting
diremption
dirempts
direr
direst
dirge
dirges
dirham
dirhams
dirhem
dirhems
dirige
dirigent
diriges
dirigible
dirigibles
dirigisme
dirigiste
diriment
dirk
dirked
dirking
dirks
dirl
dirled
dirling
dirls
dirndl
dirndls
dirt
dirtied
dirtier
dirties
dirtiest
dirtily
dirtiness
dirts
dirty
dirtying
disability
disable
disabled
disables
disabling
disabuse
disabused
disabuses
disabusing
disaccord
disadorn
disadorned
disadorns
disadvance
disaffect
disaffects
disaffirm
disaffirms
disagree
disagreed
disagrees
disallied
disallies
disallow
disallowed
disallows
disally
disallying
disamenity
disanalogy
disanchor
disanchors
disanimate
disannul
disannuls
disappear
disappears
disappoint
disapprove
disarm
disarmed
disarmer
disarmers
disarming
disarms
disarrange
disarray
disarrayed
disarrays
disaster
disasters
disastrous
disattire
disavow
disavowal
disavowals
disavowed
disavowing
disavows
disband
disbanded
disbanding
disbands
disbar
disbark
disbarked
disbarking
disbarks
disbarment
disbarred
disbarring
disbars
disbelief
disbeliefs
disbelieve
disbenefit
disbosom
disbosomed
disbosoms
disbowel
disbowels
disbranch
disbud
disbudded
disbudding
disbuds
disburden
disburdens
disbursal
disbursals
disburse
disbursed
disburses
disbursing
disc
discal
discalced
discandy
discant
discanted
discanting
discants
discard
discarded
discarding
discards
discarnate
discase
discased
discases
discasing
disced
discept
discepted
discepting
discepts
discern
discerned
discerner
discerners
discerning
discerns
discerp
discerped
discerping
discerps
discharge
discharged
discharger
discharges
dischuffed
discide
discided
discides
disciding
discinct
discing
disciple
disciples
discipline
discission
disclaim
disclaimed
disclaimer
disclaims
disclose
disclosed
discloses
disclosing
disclosure
disco
discoboli
discobolus
discoed
discoid
discoidal
discoing
discology
discolor
discolored
discolors
discolour
discolours
discomfit
discomfits
discomfort
discommend
discommode
discommon
discommons
discompose
disconcert
disconfirm
disconnect
disconsent
discontent
discophile
discord
discordant
discorded
discordful
discording
discords
discos
discounsel
discount
discounted
discounter
discounts
discourage
discourse
discoursed
discourser
discourses
discover
discovered
discoverer
discovers
discovert
discovery
discredit
discredits
discreet
discreeter
discreetly
discrepant
discrete
discretely
discretion
discretive
discrown
discrowned
discrowns
discs
discure
discursion
discursist
discursive
discursory
discursus
discus
discuses
discuss
discussed
discusses
discussing
discussion
discussive
discutient
disdain
disdained
disdainful
disdaining
disdains
disease
diseased
diseaseful
diseases
diseconomy
disedge
disedged
disedges
disedging
disembark
disembarks
disembody
disembogue
disembowel
disembroil
disemploy
disemploys
disenable
disenabled
disenables
disenchant
disenclose
disendow
disendowed
disendows
disengage
disengaged
disengages
disennoble
disentail
disentails
disenthral
disentitle
disentomb
disentombs
disentrail
disentrain
disentwine
disenvelop
disepalous
disespouse
disesteem
disesteems
diseur
diseurs
diseuse
diseuses
disfame
disfavor
disfavored
disfavors
disfavour
disfavours
disfeature
disfigure
disfigured
disfigures
disforest
disforests
disfrock
disfrocked
disfrocks
disfurnish
disglorify
disgorge
disgorged
disgorges
disgorging
disgown
disgowned
disgowning
disgowns
disgrace
disgraced
disgracer
disgracers
disgraces
disgracing
disgrade
disgraded
disgrades
disgrading
disgruntle
disguise
disguised
disguiser
disguisers
disguises
disguising
disgust
disgusted
disgustful
disgusting
disgusts
dish
dishabille
dishabit
dishable
disharmony
dishearten
dished
dishelm
dishelmed
dishelming
dishelms
disherison
disherit
dishes
dishevel
dishevels
dishful
dishfuls
dishier
dishiest
dishing
dishings
dishonest
dishonesty
dishonor
dishonored
dishonorer
dishonors
dishonour
dishonours
dishouse
dishoused
dishouses
dishousing
dishumour
dishumours
dishwasher
dishy
disillude
disilluded
disilludes
disincline
disinfect
disinfects
disinfest
disinfests
disinherit
disinhibit
disinter
disinters
disinure
disinvest
disinvests
disject
disjected
disjecting
disjection
disjects
disjoin
disjoined
disjoining
disjoins
disjoint
disjointed
disjoints
disjunct
disjunctor
disjune
disjunes
disk
disked
diskette
diskettes
disking
diskless
disks
disleal
dislikable
dislike
disliked
disliken
dislikes
disliking
dislimn
dislimned
dislimning
dislimns
dislocate
dislocated
dislocates
dislodge
dislodged
dislodges
dislodging
disloign
disloyal
disloyally
disloyalty
dismal
dismaler
dismalest
dismality
dismally
dismalness
dismals
disman
dismanned
dismanning
dismans
dismantle
dismantled
dismantler
dismantles
dismask
dismasked
dismasking
dismasks
dismast
dismasted
dismasting
dismasts
dismay
dismayed
dismayful
dismaying
dismays
disme
dismember
dismembers
dismiss
dismissal
dismissals
dismissed
dismisses
dismissing
dismission
dismissive
dismissory
dismoded
dismount
dismounted
dismounts
disobey
disobeyed
disobeying
disobeys
disoblige
disobliged
disobliges
disorder
disordered
disorderly
disorders
disorganic
disorient
disorients
disown
disowned
disowning
disownment
disowns
dispace
dispaced
dispaces
dispacing
disparage
disparaged
disparager
disparages
disparate
disparates
disparity
dispart
disparted
disparting
disparts
dispassion
dispatch
dispatched
dispatcher
dispatches
dispathy
dispauper
dispaupers
dispeace
dispel
dispelled
dispelling
dispels
dispence
dispend
dispensary
dispense
dispensed
dispenser
dispensers
dispenses
dispensing
dispeople
dispeopled
dispeoples
dispermous
dispersal
dispersals
dispersant
disperse
dispersed
disperser
dispersers
disperses
dispersing
dispersion
dispersive
dispersoid
dispirit
dispirited
dispirits
dispiteous
displace
displaced
displaces
displacing
displant
displanted
displants
display
displayed
displayer
displayers
displaying
displays
disple
displease
displeased
displeases
displed
disples
displing
displode
displosion
displume
displumed
displumes
displuming
dispondaic
dispondee
dispondees
dispone
disponed
disponee
disponees
disponer
disponers
dispones
disponge
disponged
disponges
disponging
disponing
disport
disported
disporting
disports
disposable
disposal
disposals
dispose
disposed
disposedly
disposer
disposers
disposes
disposing
disposings
dispositor
dispossess
disposure
disposures
dispraise
dispraised
dispraiser
dispraises
dispread
dispreads
disprinced
disprize
disprized
disprizes
disprizing
disprofit
disprofits
disproof
disproofs
disproval
disprovals
disprove
disproved
disproven
disproves
disproving
dispunge
dispunged
dispunges
dispunging
dispurse
dispursed
dispurses
dispursing
disputable
disputably
disputant
disputants
dispute
disputed
disputer
disputers
disputes
disputing
disqualify
disquiet
disquieted
disquieten
disquieter
disquietly
disquiets
disrate
disrated
disrates
disrating
disregard
disregards
disrelish
disrepair
disrepute
disrespect
disrobe
disrobed
disrobes
disrobing
disroot
disrooted
disrooting
disroots
disrupt
disrupted
disrupter
disrupters
disrupting
disruption
disruptive
disruptor
disruptors
disrupts
diss
dissatisfy
dissaving
disseat
disseated
disseating
disseats
dissect
dissected
dissecting
dissection
dissective
dissector
dissectors
dissects
disseise
disseised
disseises
disseisin
disseising
disseisins
disseisor
disseisors
disseize
disseized
disseizes
disseizin
disseizing
disseizins
disseizor
disseizors
disselboom
dissemble
dissembled
dissembler
dissembles
dissembly
dissension
dissent
dissented
dissenter
dissenters
dissenting
dissents
dissert
dissertate
disserted
disserting
disserts
disserve
disserved
disserves
disservice
disserving
dissever
dissevered
dissevers
disshiver
disshivers
dissidence
dissident
dissidents
dissight
dissights
dissilient
dissimilar
dissimile
dissimiles
dissipable
dissipate
dissipated
dissipates
dissocial
dissociate
dissoluble
dissolute
dissolutes
dissolve
dissolved
dissolvent
dissolves
dissolving
dissonance
dissonancy
dissonant
dissuade
dissuaded
dissuader
dissuaders
dissuades
dissuading
dissuasion
dissuasive
dissuasory
distaff
distaffs
distain
distained
distaining
distains
distal
distally
distance
distanced
distances
distancing
distant
distantly
distaste
distasted
distastes
distasting
distemper
distempers
distend
distended
distending
distends
distension
distensive
distent
distention
disthene
distich
distichal
distichous
distichs
distil
distill
distilland
distillate
distilled
distiller
distillers
distillery
distilling
distills
distils
distinct
distincter
distinctly
distingue
distinguee
distort
distorted
distorting
distortion
distortive
distorts
distract
distracted
distracts
distrain
distrained
distrainee
distrainer
distrainor
distrains
distraint
distraints
distrait
distraite
distraught
distress
distressed
distresses
distribute
district
districted
districts
distringas
distrouble
distrust
distrusted
distruster
distrusts
disturb
disturbant
disturbed
disturber
disturbers
disturbing
disturbs
distyle
distyles
disulfiram
disulphate
disulphide
disunion
disunions
disunite
disunited
disunites
disunities
disuniting
disunity
disusage
disuse
disused
disuses
disusing
disutility
disvalue
disvalued
disvalues
disvaluing
disvouch
disworship
disyllabic
disyllable
disyoke
disyoked
disyokes
disyoking
dit
dita
dital
ditals
ditas
ditch
ditched
ditcher
ditchers
ditches
ditching
dite
dithecal
dithecous
ditheism
ditheist
ditheistic
ditheists
dither
dithered
ditherer
ditherers
dithering
dithers
dithery
dithionate
dithyramb
dithyrambs
ditokous
ditone
ditones
ditriglyph
ditrochean
ditrochee
ditrochees
dits
ditsy
ditt
dittander
dittanders
dittanies
dittany
dittay
dittays
dittied
ditties
ditto
dittoed
dittoing
dittology
dittos
ditts
ditty
dittying
ditzy
diuresis
diuretic
diuretics
diurnal
diurnally
diurnals
diuturnal
diuturnity
div
diva
divagate
divagated
divagates
divagating
divagation
divalent
divalents
divan
divans
divaricate
divas
dive
dived
divellent
diver
diverge
diverged
divergence
divergency
divergent
diverges
diverging
divers
diverse
diversely
diversify
diversion
diversions
diversity
diversly
divert
diverted
divertible
diverting
divertive
diverts
dives
divest
divested
divestible
divesting
divestment
divests
divesture
divi
dividable
dividant
divide
divided
dividedly
dividend
dividends
divider
dividers
divides
dividing
dividings
dividivi
dividual
dividuous
divied
divies
divination
divinator
divinators
divinatory
divine
divined
divinely
divineness
diviner
divineress
diviners
divines
divinest
diving
divings
divining
divinise
divinised
divinises
divinising
divinities
divinity
divinize
divinized
divinizes
divinizing
divisible
divisibly
division
divisional
divisions
divisive
divisively
divisor
divisors
divorce
divorced
divorcee
divorcees
divorcer
divorcers
divorces
divorcing
divorcive
divot
divots
divs
divulgate
divulgated
divulgates
divulge
divulged
divulgence
divulges
divulging
divulsion
divulsions
divulsive
divvied
divvies
divvy
divvying
divying
diwan
diwans
dixie
dixies
dixy
dizain
dizains
dizen
dizygotic
dizzard
dizzards
dizzied
dizzier
dizzies
dizziest
dizzily
dizziness
dizzy
dizzying
dizzyingly
djebel
djebels
djellaba
djellabah
djellabahs
djellabas
djibbah
djinn
djinni
djinns
do
doab
doable
doabs
doat
doated
doater
doaters
doating
doatings
doats
dob
dobbed
dobber
dobbers
dobbies
dobbin
dobbing
dobbins
dobby
dobchick
dobchicks
dobra
dobras
doc
docent
docents
dochmiac
dochmiacal
dochmius
dochmiuses
docibility
docible
docile
docility
docimasies
docimastic
docimasy
docimology
dock
dockage
dockages
docked
docken
dockens
docker
dockers
docket
docketed
docketing
dockets
docking
dockings
dockise
dockised
dockises
dockising
dockize
dockized
dockizes
dockizing
dockland
docklands
docks
dockside
docksides
dockyard
dockyards
docs
doctor
doctoral
doctorate
doctorates
doctored
doctoress
doctorial
doctoring
doctorly
doctors
doctorship
doctress
doctresses
doctrinal
doctrine
doctrines
docudrama
docudramas
document
documental
documented
documents
dod
doddard
dodded
dodder
doddered
dodderer
dodderers
doddering
dodders
doddery
dodding
doddle
doddles
doddy
doddypoll
dodecagon
dodecagons
dodge
dodged
dodgem
dodgems
dodger
dodgers
dodgery
dodges
dodgier
dodgiest
dodging
dodgy
dodkin
dodkins
dodman
dodmans
dodo
dodoes
dodos
dods
doe
doek
doeks
doer
doers
does
doest
doeth
doff
doffed
doffer
doffers
doffing
doffs
dog
dogaressa
dogaressas
dogate
dogates
dogbane
dogbanes
dogberries
dogberry
dogbolt
dogbolts
dogcart
dogcarts
dogdays
doge
doges
dogeship
dogfish
dogfishes
dogfox
dogfoxes
dogged
doggedly
doggedness
dogger
doggerel
doggeries
doggers
doggery
doggess
doggesses
doggie
doggier
doggies
doggiest
dogginess
dogging
doggings
doggish
doggishly
doggo
doggone
doggoned
doggrel
doggy
doghole
dogholes
dogie
doglike
dogma
dogman
dogmas
dogmatic
dogmatical
dogmatics
dogmatise
dogmatised
dogmatiser
dogmatises
dogmatism
dogmatist
dogmatists
dogmatize
dogmatized
dogmatizer
dogmatizes
dogmen
dogs
dogship
dogshore
dogshores
dogsick
dogskin
dogskins
dogsled
dogsleds
dogteeth
dogtooth
dogtown
dogtowns
dogtrot
dogtrots
dogvane
dogvanes
dogwood
dogwoods
dogy
doh
dohs
doiled
doilies
doily
doing
doings
doit
doited
doitit
doitkin
doits
dojo
dojos
dolce
dolces
doldrums
dole
doled
doleful
dolefully
dolent
dolerite
doleritic
doles
dolesome
dolesomely
dolia
dolichos
dolichoses
dolichurus
dolina
doline
doling
dolium
doll
dollar
dollars
dolldom
dolled
dollhood
dollhouse
dollied
dollier
dolliers
dollies
dolliness
dolling
dollish
dollop
dollops
dolls
dolly
dollying
dolma
dolmades
dolman
dolmans
dolmas
dolmen
dolmens
dolomite
dolomites
dolomitic
dolomitise
dolomitize
dolor
dolorific
doloroso
dolorous
dolorously
dolors
dolour
dolours
dolphin
dolphins
dolt
doltish
doltishly
dolts
domain
domainal
domains
domal
domanial
domatia
domatium
dome
domed
domes
domestic
domestics
domett
domical
domicil
domicile
domiciled
domiciles
domiciling
domicils
dominance
dominances
dominancy
dominant
dominantly
dominants
dominate
dominated
dominates
dominating
domination
dominative
dominator
dominators
dominatrix
dominee
domineer
domineered
domineers
dominees
doming
dominical
dominie
dominies
dominion
dominions
domino
dominoes
dominos
domy
don
dona
donah
donahs
donaries
donary
donas
donataries
donatary
donate
donated
donates
donating
donation
donations
donatism
donatistic
donative
donatives
donator
donatories
donators
donatory
donder
dondered
dondering
donders
done
donee
donees
doneness
dong
donga
dongas
donged
donging
dongle
dongles
dongs
doning
donjon
donjons
donkey
donkeys
donnard
donnart
donne
donned
donnee
donnees
donnerd
donnered
donnert
donnes
donning
donnish
donnism
donnot
donnots
donor
donors
dons
donship
donsie
donut
donuts
donzel
doo
doob
doocot
doocots
doodad
doodads
doodah
doodahs
doodle
doodlebug
doodlebugs
doodled
doodler
doodlers
doodles
doodling
doohickey
doohickeys
dook
dooked
dooket
dookets
dooking
dooks
dool
doolally
doolie
doolies
dools
doom
doomed
doomful
dooming
dooms
doomsayer
doomsayers
doomsday
doomsdays
doomsman
doomsmen
doomster
doomsters
doomwatch
doomy
doona
doonas
door
doorbell
doorbells
doorframe
doorframes
doorhandle
doorjamb
doorjambs
doorknob
doorknobs
doorknock
doorknocks
doormat
doormats
doorn
doornail
doornails
doorns
doorpost
doorposts
doors
doorstep
doorsteps
doorstop
doorstops
doorway
doorways
doos
dop
dopa
dopamine
dopant
dopants
dopatta
dopattas
dope
doped
doper
dopers
dopes
dopey
dopier
dopiest
dopiness
doping
dopings
dopped
dopper
doppers
dopping
doppings
dopplerite
dops
dopy
dor
dorad
dorado
dorados
dorads
doree
dorees
dorhawk
dorhawks
dories
dorise
dorised
dorises
dorising
dorize
dorized
dorizes
dorizing
dork
dorks
dorky
dorlach
dorlachs
dorm
dormancy
dormant
dormants
dormer
dormers
dormice
dormie
dormient
dormition
dormitive
dormitory
dormouse
dorms
dormy
dornick
doronicum
dorp
dorps
dorr
dorrs
dors
dorsa
dorsal
dorsally
dorsals
dorse
dorsel
dorsels
dorser
dorsers
dorses
dorsifixed
dorsiflex
dorsigrade
dorsum
dorsums
dort
dorted
dorter
dorters
dorting
dortour
dortours
dorts
dorty
dory
dos
dosage
dosages
dose
dosed
doses
dosh
dosimeter
dosimeters
dosimetry
dosing
dosiology
dosology
doss
dossal
dossals
dossed
dossel
dossels
dosser
dossers
dosses
dossier
dossiers
dossil
dossils
dossing
dost
dot
dotage
dotages
dotal
dotant
dotard
dotards
dotation
dotations
dote
doted
doter
doters
dotes
doth
dotier
dotiest
doting
dotingly
dotings
dotish
dots
dotted
dotterel
dotterels
dottier
dottiest
dottiness
dotting
dottle
dottler
dottles
dottrel
dottrels
dotty
doty
douane
douanier
douaniers
douar
douars
double
doubled
doubleness
doubler
doublers
doubles
doublet
doubleton
doubletons
doubletree
doublets
doubling
doublings
doubloon
doubloons
doublure
doublures
doubly
doubt
doubtable
doubted
doubter
doubters
doubtful
doubtfully
doubting
doubtingly
doubtings
doubtless
doubts
douc
douce
doucely
douceness
doucepere
doucet
douceur
douceurs
douche
douched
douches
douching
doucine
doucines
doucs
dough
doughfaced
doughier
doughiest
doughiness
doughnut
doughnuts
doughs
dought
doughtier
doughtiest
doughtily
doughty
doughy
doulocracy
doum
douma
doumas
doums
doup
doups
dour
doura
douras
dourer
dourest
dourine
dourly
dourness
douse
doused
douser
dousers
douses
dousing
douzeper
douzepers
dove
dovecot
dovecote
dovecotes
dovecots
dovekie
dovekies
dovelet
dovelets
dovelike
dover
dovered
dovering
dovers
doves
dovetail
dovetailed
dovetails
dovish
dow
dowable
dowager
dowagers
dowd
dowdier
dowdies
dowdiest
dowdily
dowdiness
dowds
dowdy
dowdyish
dowdyism
dowed
dowel
dowelled
dowelling
dowels
dower
dowered
dowering
dowerless
dowers
dowf
dowie
dowing
dowitcher
dowitchers
dowl
dowlas
down
downa
downbeat
downbeats
downbow
downbows
downburst
downbursts
downcome
downcomer
downcomers
downcomes
downed
downer
downers
downfall
downfallen
downfalls
downflow
downflows
downgrade
downgraded
downgrades
downhill
downhills
downhole
downhome
downier
downiest
downiness
downing
downland
downlands
download
downloaded
downloads
downlooked
downmost
downpipe
downpipes
downplay
downplayed
downplays
downpour
downpours
downrange
downright
downrush
downrushes
downs
downside
downsize
downsized
downsizes
downsizing
downspout
downspouts
downstage
downstair
downstairs
downstate
downstream
downstroke
downswing
downswings
downtime
downtimes
downtrend
downtrends
downturn
downturns
downward
downwardly
downwards
downwind
downy
dowp
dowps
dowries
dowry
dows
dowse
dowsed
dowser
dowsers
dowses
dowset
dowsing
doxies
doxography
doxologies
doxology
doxy
doyen
doyenne
doyennes
doyens
doyley
doyleys
doylies
doyly
doze
dozed
dozen
dozens
dozenth
dozenths
dozer
dozers
dozes
dozier
doziest
doziness
dozing
dozings
dozy
drab
drabbed
drabber
drabbers
drabbest
drabbet
drabbing
drabbish
drabble
drabbled
drabbler
drabblers
drabbles
drabbling
drabblings
drabby
drably
drabness
drabs
drachm
drachma
drachmae
drachmai
drachmas
drachms
drack
dracone
dracones
draconian
draconic
draconism
draconites
dracontic
drad
draff
draffish
draffs
draffy
draft
drafted
draftee
draftees
drafter
drafters
draftier
draftiest
draftiness
drafting
drafts
draftsman
draftsmen
drafty
drag
dragee
dragees
dragged
dragging
draggle
draggled
draggles
draggling
draggy
dragline
draglines
dragoman
dragomans
dragomen
dragon
dragoness
dragonet
dragonets
dragonfly
dragonhead
dragonise
dragonised
dragonises
dragonish
dragonism
dragonize
dragonized
dragonizes
dragonlike
dragonnade
dragons
dragoon
dragooned
dragooning
dragoons
drags
dragsman
dragsmen
dragster
dragsters
drail
drailed
drailing
drails
drain
drainable
drainage
drainages
drainboard
drained
drainer
drainers
draining
drains
draisine
drake
drakes
drakestone
dram
drama
dramas
dramatic
dramatical
dramatics
dramatise
dramatised
dramatises
dramatist
dramatists
dramatize
dramatized
dramatizes
dramaturg
dramaturge
dramaturgy
drammed
dramming
drammock
drammocks
drams
drank
drant
dranted
dranting
drants
drap
drape
draped
draper
draperied
draperies
drapers
drapery
drapes
drapet
draping
drapped
drappie
drappies
drapping
draps
drastic
drat
dratchell
dratchells
drats
dratted
draught
draughted
draughtier
draughting
draughtman
draughtmen
draughts
draughty
drave
draw
drawable
drawback
drawbacks
drawbridge
drawee
drawees
drawer
drawers
drawing
drawings
drawl
drawled
drawler
drawlers
drawling
drawlingly
drawls
drawn
draws
dray
drayage
drayman
draymen
drays
drazel
drazels
dread
dreaded
dreader
dreaders
dreadful
dreadfully
dreading
dreadless
dreadlocks
dreadly
dreads
dream
dreamboat
dreamboats
dreamed
dreamer
dreameries
dreamers
dreamery
dreamful
dreamhole
dreamholes
dreamier
dreamiest
dreamily
dreaminess
dreaming
dreamingly
dreamings
dreamland
dreamlands
dreamless
dreamlike
dreams
dreamt
dreamwhile
dreamy
drear
drearier
dreariest
drearihead
drearily
dreariment
dreariness
drearing
drearisome
dreary
dreck
drecky
dredge
dredged
dredger
dredgers
dredges
dredging
dree
dreed
dreeing
drees
dreg
dreggier
dreggiest
dregginess
dreggy
dregs
dreich
dreikanter
drek
drench
drenched
drencher
drenchers
drenches
drenching
drent
drepanium
drepaniums
dress
dressage
dressed
dresser
dressers
dresses
dressier
dressiest
dressing
dressings
dressmake
dressmaker
dressy
drest
drew
drey
dreys
drib
dribble
dribbled
dribbler
dribblers
dribbles
dribblet
dribblets
dribbling
dribbly
driblet
driblets
dribs
dried
drier
driers
dries
driest
drift
driftage
driftages
drifted
drifter
drifters
driftier
driftiest
drifting
driftless
driftpin
driftpins
drifts
drifty
drill
drilled
driller
drillers
drilling
drills
drily
drink
drinkable
drinker
drinkers
drinking
drinkings
drinks
drip
dripped
drippier
drippiest
dripping
drippings
drippy
drips
drisheen
drivable
drive
driveable
drivel
drivelled
driveller
drivellers
drivelling
drivels
driven
driver
driverless
drivers
drives
driveway
driveways
driving
drizzle
drizzled
drizzles
drizzlier
drizzliest
drizzling
drizzly
drogher
droghers
drogue
drogues
droit
droits
drÙle
drÙles
droll
drolled
droller
drolleries
drollery
drollest
drolling
drollings
drollish
drollness
drolls
drolly
drome
dromedary
dromes
dromic
dromical
dromoi
dromon
dromond
dromonds
dromons
dromos
drone
droned
drones
drongo
drongoes
drongos
droning
droningly
dronish
dronishly
drony
droob
droobs
droog
droogish
droogs
drook
drooked
drooking
drookings
drookit
drooks
drool
drooled
drooling
drools
droop
drooped
droopier
droopiest
droopily
droopiness
drooping
droopingly
droops
droopy
drop
dropflies
dropfly
drophead
droplet
dropped
dropper
droppers
dropping
droppings
drops
dropsical
dropsied
dropsy
dropwise
drosera
droseras
droshkies
droshky
droskies
drosky
drosometer
drosophila
dross
drossier
drossiest
drossiness
drossy
drostdy
drought
droughtier
droughts
droughty
drouk
drouked
drouking
droukings
droukit
drouks
drouth
drouthier
drouthiest
drouths
drouthy
drove
drover
drovers
droves
droving
drow
drown
drownded
drowned
drowner
drowners
drowning
drownings
drowns
drows
drowse
drowsed
drowses
drowsier
drowsiest
drowsily
drowsiness
drowsing
drowsy
drub
drubbed
drubbing
drubbings
drubs
drucken
drudge
drudged
drudger
drudgeries
drudgers
drudgery
drudges
drudging
drudgingly
drudgism
drudgisms
drug
drugged
drugger
druggers
drugget
druggets
druggie
druggies
drugging
druggist
druggists
druggy
drugs
druidic
druidical
druidism
drum
drumbeat
drumbeats
drumble
drumfire
drumfish
drumfishes
drumhead
drumheads
drumlier
drumliest
drumlin
drumlins
drumly
drummed
drummer
drummers
drumming
drums
drumstick
drumsticks
drunk
drunkard
drunkards
drunken
drunkenly
drunker
drunkest
drunks
drupaceous
drupe
drupel
drupelet
drupelets
drupels
drupes
druse
druses
drusy
druthers
druxy
dry
dryad
dryades
dryads
drybeat
dryer
dryers
drying
dryings
dryish
dryly
dryness
drysalter
drysalters
drysaltery
dso
dsobo
dsobos
dsomo
dsomos
dsos
duad
duads
dual
dualin
dualism
dualisms
dualist
dualistic
dualists
dualities
duality
dually
duals
duan
duans
duarchies
duarchy
dub
dubbed
dubbin
dubbing
dubbings
dubbins
dubiety
dubiosity
dubious
dubiously
dubitable
dubitably
dubitancy
dubitate
dubitated
dubitates
dubitating
dubitation
dubitative
dubnium
dubs
ducal
ducally
ducat
ducatoon
ducatoons
ducats
ducdame
duce
duces
duchess
duchesse
duchesses
duchies
duchy
duck
duckbill
duckbills
ducked
ducker
duckers
duckfooted
duckie
duckier
duckies
duckiest
ducking
duckings
duckling
ducklings
ducks
duckshove
duckshoved
duckshoves
duckweed
duckweeds
ducky
duct
ductile
ductility
ductless
ducts
dud
dudder
dudderies
dudders
duddery
duddie
duddier
duddiest
duddy
dude
dudeen
dudeens
dudes
dudgeon
dudgeons
dudish
dudism
duds
due
dueful
duel
duelled
dueller
duellers
duelling
duellings
duellist
duellists
duello
duellos
duels
duende
duendes
duenna
duennas
dues
duet
duets
duetted
duetti
duetting
duettino
duettinos
duettist
duettists
duetto
duettos
duetts
duff
duffed
duffel
duffer
dufferdom
duffers
duffing
duffle
duffs
dug
dugong
dugongs
dugout
dugouts
dugs
duiker
duikers
duke
duked
dukedom
dukedoms
dukeling
dukelings
dukeries
dukery
dukes
dukeship
dukeships
duking
dukkeripen
dulcamara
dulcamaras
dulcet
dulcian
dulciana
dulcianas
dulcians
dulcified
dulcifies
dulcify
dulcifying
dulciloquy
dulcimer
dulcimers
dulcite
dulcitol
dulcitone
dulcitones
dulcitude
dulcose
dule
dules
dulia
dull
dullard
dullards
dulled
duller
dullest
dulling
dullish
dullness
dulls
dullsville
dully
dulness
dulocracy
dulosis
dulotic
dulse
dulses
duly
duma
dumaist
dumaists
dumas
dumb
dumbbell
dumbbells
dumber
dumbest
dumbfound
dumbfounds
dumbledore
dumbly
dumbness
dumbo
dumbos
dumbstruck
dumbwaiter
dumdum
dumdums
dumfound
dumfounded
dumfounds
dumka
dumky
dummerer
dummerers
dummied
dummies
dumminess
dummkopf
dummkopfs
dummy
dummying
dumose
dumosity
dump
dumpbin
dumpbins
dumped
dumper
dumpers
dumpier
dumpies
dumpiest
dumpiness
dumping
dumpish
dumpishly
dumpling
dumplings
dumps
dumpy
dun
dunce
duncedom
duncery
dunces
dunch
dunched
dunches
dunching
dunder
dunderhead
dunderpate
dunders
dune
dunes
dung
dungaree
dungarees
dunged
dungeon
dungeoner
dungeoners
dungeons
dunghill
dunghills
dungier
dungiest
dunging
dungs
dungy
dunite
duniwassal
dunk
dunked
dunking
dunks
dunlin
dunlins
dunnage
dunnages
dunnakin
dunnakins
dunned
dunner
dunnest
dunnies
dunning
dunnish
dunnite
dunno
dunnock
dunnocks
dunny
duns
dunt
dunted
dunting
dunts
duo
duodecimal
duodecimo
duodecimos
duodena
duodenal
duodenary
duodenitis
duodenum
duodenums
duologue
duologues
duomi
duomo
duomos
duopolies
duopoly
duos
duotone
duotones
dup
dupability
dupable
dupatta
dupattas
dupe
duped
duper
duperies
dupers
dupery
dupes
duping
dupion
dupions
duple
duplet
duplets
duplex
duplexer
duplexers
duplexes
duplicand
duplicands
duplicate
duplicated
duplicates
duplicator
duplicity
duply
dupondii
dupondius
duppies
duppy
dura
durability
durable
durables
durably
dural
duralumin
duramen
duramens
durance
durant
duras
duration
durational
durations
durative
duratives
durbar
durbars
dure
dured
dures
duress
duresses
durgan
durgans
durian
durians
during
durion
durions
durmast
durmasts
durn
durns
duro
duros
duroy
durra
durras
durrie
durst
durukuli
durukulis
durum
durums
durzi
durzis
dusk
dusked
duskier
duskiest
duskily
duskiness
dusking
duskish
duskishly
duskly
duskness
dusks
dusky
dust
dustbin
dustbins
dusted
duster
dusters
dustier
dustiest
dustily
dustiness
dusting
dustless
dustman
dustmen
dustproof
dusts
dusty
dutch
dutches
duteous
duteously
dutiable
dutied
duties
dutiful
dutifully
duty
duumvir
duumviral
duumvirate
duumviri
duumvirs
duvet
duvetine
duvetines
duvets
duvetyn
duvetyne
duvetynes
duvetyns
dux
duxelles
duxes
duyker
duykers
dvandva
dvandvas
dwale
dwales
dwalm
dwalmed
dwalming
dwalms
dwam
dwams
dwang
dwangs
dwarf
dwarfed
dwarfing
dwarfish
dwarfishly
dwarfism
dwarfs
dwarves
dwaum
dwaumed
dwauming
dwaums
dweeb
dweebs
dwell
dwelled
dweller
dwellers
dwelling
dwellings
dwells
dwelt
dwindle
dwindled
dwindles
dwindling
dwine
dwined
dwines
dwining
dyable
dyad
dyadic
dyads
dyarchies
dyarchy
dybbuk
dybbuks
dye
dyeable
dyed
dyeing
dyeings
dyeline
dyelines
dyer
dyers
dyes
dyester
dyesters
dyestuff
dyestuffs
dying
dyingly
dyingness
dyings
dyke
dyked
dykes
dykey
dykier
dykiest
dyking
dynamic
dynamical
dynamics
dynamise
dynamised
dynamises
dynamising
dynamism
dynamist
dynamistic
dynamists
dynamitard
dynamite
dynamited
dynamiter
dynamiters
dynamites
dynamiting
dynamize
dynamized
dynamizes
dynamizing
dynamo
dynamogeny
dynamos
dynamotor
dynamotors
dynast
dynastic
dynastical
dynasties
dynasts
dynasty
dynatron
dynatrons
dyne
dynes
dynode
dynodes
dyophysite
dyothelete
dyothelism
dysarthria
dyschroa
dyschroia
dyscrasia
dyscrasite
dysenteric
dysentery
dysgenic
dysgenics
dysgraphia
dyskinesia
dyslectic
dyslectics
dyslexia
dyslexic
dyslexics
dyslogy
dysodile
dysodyle
dyspathy
dyspepsia
dyspepsy
dyspeptic
dyspeptics
dysphagia
dysphagic
dysphasia
dysphemism
dysphonia
dysphonic
dysphoria
dysphoric
dysplasia
dysplastic
dyspnea
dyspneal
dyspneic
dyspnoea
dyspraxia
dysprosium
dystectic
dysthymia
dystocia
dystocias
dystonia
dystonias
dystonic
dystopia
dystopian
dystopias
dystrophia
dystrophic
dystrophin
dystrophy
dysuria
dysuric
dysury
dytiscid
dytiscids
dyvour
dyvours
dzeren
dzerens
dzho
dzhos
dziggetai
dziggetais
dzo
dzos]] |
local nightfox = require('nightfox')
local opt = vim.opt
local augroup = require('vim_ext').augroup
nightfox.setup({
fox = 'nightfox',
transparent = false,
alt_nc = true,
terminal_colors = true,
styles = {
comments = 'italic',
keywords = 'bold',
},
inverse = {
visual = false,
},
hlgroups = {
IndentBlanklineChar = { fg = '${comment}' },
IndentBlanklineContextChar = { fg = '${pink}' },
IndentBlanklineSpaceChar = { fg = '${comment}' },
IndentBlanklineSpaceCharBlankLine = { fg = 'NONE' },
DapBreakpointSign = { fg = '${red}' },
DebugBreakpointSign = { fg = '${red}' },
DapBreakpointLine = { bg = '${diff.delete}' },
DebugBreakpointLine = { bg = '${diff.delete}' },
TSTag = { fg = '${red}' },
TSTagDelimiter = { fg = '${fg}' },
htmlTag = { fg = '${red}' },
htmlEndTag = { fg = '${red}' },
NvimTreeExecFile = { style = 'bold' },
NvimTreeGitDirty = { fg = '${git.change}' },
NvimTreeGitStaged = { fg = '${green_br}' },
NvimTreeGitMerge = { fg = '${orange}' },
NvimTreeGitRenamed = { fg = '${green_dm}' },
NvimTreeGitNew = { fg = '${git.add}' },
NvimTreeGitDeleted = { fg = '${git.delete}' },
},
})
nightfox.load()
opt.list = true
opt.listchars:append('space:⋅')
opt.listchars:append('eol:↴')
opt.colorcolumn = '120'
opt.cursorline = true
augroup('BgHighlight', {
{ 'WinEnter', '*', 'setlocal cursorline' },
{ 'WinLeave', '*', 'setlocal nocursorline' },
})
opt.background = 'dark'
require('indent_blankline').setup({
show_end_of_line = true,
space_char_blank_line = ' ',
show_current_context = true,
show_current_context_start = true,
})
|
--Copyright: https://github.com/coolsnowwolf/luci/tree/master/applications/luci-app-cpufreq
--Planner: https://github.com/unifreq/openwrt_packit
--Extended support: https://github.com/ophub/luci-app-amlogic
--Function: Support multi-core
local mp
--Remove the spaces in the string
function trim(str)
--return (string.gsub(str, "^%s*(.-)%s*$", "%1"))
return (string.gsub(str, "%s+", ""))
end
--split
function string.split(e, t)
e = tostring(e)
t = tostring(t)
if (t == '') then return false end
local a, o = 0, {}
for i, t in function() return string.find(e, t, a, true) end do
table.insert(o, string.sub(e, a, i - 1))
a = t + 1
end
table.insert(o, string.sub(e, a))
return o
end
--Auto-complete node
local check_config_settings = luci.sys.exec("uci get amlogic.@settings[0].governor0 2>/dev/null") or ""
if (trim(check_config_settings) == "") then
luci.sys.exec("uci delete amlogic.@settings[0] 2>/dev/null")
luci.sys.exec("uci set amlogic.armcpu='settings' 2>/dev/null")
luci.sys.exec("uci commit amlogic 2>/dev/null")
end
mp = Map("amlogic")
mp.title = translate("CPU Freq Settings")
mp.description = translate("Set CPU Scaling Governor to Max Performance or Balance Mode")
s = mp:section(NamedSection, "armcpu", "settings")
s.anonymouse = true
local cpu_policys = luci.sys.exec("ls /sys/devices/system/cpu/cpufreq | grep -E 'policy[0-9]{1,3}' | xargs") or "policy0"
policy_array = string.split(cpu_policys, " ")
for tt, policy_name in ipairs(policy_array) do
--Dynamic tab, automatically changes according to the number of cores, begin ------
policy_name = tostring(trim(policy_name))
policy_id = tostring(trim(string.gsub(policy_name, "policy", "")))
tab_name = policy_name
tab_id = tostring(trim("tab" .. policy_id))
cpu_freqs = nixio.fs.readfile(trim("/sys/devices/system/cpu/cpufreq/" .. policy_name .. "/scaling_available_frequencies")) or "100000"
cpu_freqs = string.sub(cpu_freqs, 1, -3)
cpu_governors = nixio.fs.readfile(trim("/sys/devices/system/cpu/cpufreq/" .. policy_name .. "/scaling_available_governors")) or "performance"
cpu_governors = string.sub(cpu_governors, 1, -3)
freq_array = string.split(cpu_freqs, " ")
governor_array = string.split(cpu_governors, " ")
s:tab(tab_id, tab_name)
tab_core_type = s:taboption(tab_id, DummyValue, trim("core_type" .. policy_id), translate("Microarchitectures:"))
tab_core_type.default = luci.sys.exec("cat /sys/devices/system/cpu/cpu" .. policy_id .. "/uevent | grep -E '^OF_COMPATIBLE_0.*' | tr -d 'OF_COMPATIBLE_0=' | xargs") or "Unknown"
tab_core_type.rmempty = false
governor = s:taboption(tab_id, ListValue, trim("governor" .. policy_id), translate("CPU Scaling Governor:"))
for t, e in ipairs(governor_array) do
if e ~= "" then governor:value(e, translate(e, string.upper(e))) end
end
governor.default = "schedutil"
governor.rmempty = false
minfreq = s:taboption(tab_id, ListValue, trim("minfreq" .. policy_id), translate("Min Freq:"))
for t, e in ipairs(freq_array) do
if e ~= "" then minfreq:value(e) end
end
minfreq.default = "500000"
minfreq.rmempty = false
maxfreq = s:taboption(tab_id, ListValue, trim("maxfreq" .. policy_id), translate("Max Freq:"))
for t, e in ipairs(freq_array) do
if e ~= "" then maxfreq:value(e) end
end
maxfreq.default = "1512000"
maxfreq.rmempty = false
--Dynamic tab, automatically changes according to the number of cores, end ------
end
return mp
|
-----------------------------------
-- Ability: Ancient Circle
-- Grants resistance, defense, and attack against dragons to party members within the area of effect.
-- Obtained: Dragoon Level 5
-- Recast Time: 5:00
-- Duration: 03:00
-----------------------------------
require("scripts/globals/settings")
require("scripts/globals/status")
-----------------------------------
function onAbilityCheck(player,target,ability)
return 0,0
end
function onUseAbility(player,target,ability)
local duration = 180 + player:getMod(tpz.mod.ANCIENT_CIRCLE_DURATION)
target:addStatusEffect(tpz.effect.ANCIENT_CIRCLE,15,0,duration)
end
|
-- A mpris music widget using playerctl
-- Imports
local awful = require("awful")
local wibox = require("wibox")
local utils = require("lib.utils")
-- Locals
local dpi = require("beautiful.xresources").apply_dpi
-- Code
function spawn_widget(tbl)
widget = wibox({
screen = tbl.screen,
visible = true,
width = 300,
height = 300,
bg = "#000000",
shape = utils.rrect(beautiful.border_radius),
ontop = true,
})
awful.placement.top_right(widget, { margins = 10 })
widget:setup {
{layout = wibox.container.margin},
{
markup = '0 - 0';
layout = wibox.widget.textbox,
align = 'center',
valign = 'center',
},
{layout = wibox.container.margin},
layout = wibox.layout.align.vertical,
}
end
-- Exports
return {
widget = spawn_widget,
}
|
-- Copyright (C) by qlee
local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_gc = ffi.gc
local ffi_str = ffi.string
local C = ffi.C
local setmetatable = setmetatable
local _M = { _VERSION = '1.0' }
local mt = { __index = _M }
ffi.cdef[[
typedef struct engine_st ENGINE;
typedef struct env_md_ctx_st EVP_MD_CTX;
typedef struct env_md_st EVP_MD;
const EVP_MD *EVP_sha3_224(void);
const EVP_MD *EVP_sha3_256(void);
const EVP_MD *EVP_sha3_384(void);
const EVP_MD *EVP_sha3_512(void);
const EVP_MD *EVP_shake128(void);
const EVP_MD *EVP_shake256(void);
EVP_MD_CTX *EVP_MD_CTX_new(void);
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
]]
local hash
hash = {
["sha3-224"] = C.EVP_sha3_224(),
["sha3-256"] = C.EVP_sha3_256(),
["sha3-384"] = C.EVP_sha3_384(),
["sha3-512"] = C.EVP_sha3_512(),
["shake128"] = C.EVP_shake128(),
["shake256"] = C.EVP_shake256(),
}
_M.hash = hash
local max_digest_len = 64
local buf = ffi_new("char[?]", max_digest_len)
local outlen = ffi_new("unsigned int[1]")
local ctx_ptr_type = ffi.typeof("EVP_MD_CTX")
function _M.new(self, _hash)
local method = hash[_hash]
if not method then
return nil
end
local ctx = C.EVP_MD_CTX_new()
if ctx == nil then
return nil
end
ffi_gc(ctx, C.EVP_MD_CTX_free)
if C.EVP_DigestInit_ex(ctx, method, nil) == 0 then
return nil
end
return setmetatable({ _ctx = ctx }, mt)
end
function _M.update(self, s)
return C.EVP_DigestUpdate(self._ctx, s, #s)
end
function _M.final(self)
if C.EVP_DigestFinal_ex(self._ctx, buf, outlen) == 0 then
return nil
end
return ffi_str(buf, outlen[0])
end
function _M.reset(self)
return C.EVP_MD_reset(self._ctx) == 1
end
return _M
|
package.path = package.path .. ";tests/?.lua"
local testlib = require("testlib")
local alphabet_str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
local alphabet = {}
for i = 1, #alphabet_str do
alphabet[i] = alphabet_str:sub(i, i)
end
local function check_table(db, t)
for i,v in ipairs(t) do
local k = v[1]
testlib.check_doc(db, k, v[2])
end
local found = 0
db:changes(0, 0, function(di) found = found + 1 end)
if found ~= #t then
error("Expected " .. #t .. " results, found " .. found)
end
end
function make_val(size)
local chars = {}
for i = 1, size do
chars[i] = alphabet[math.random(1, #alphabet)]
end
return table.concat(chars)
end
function test_big_bulk(dbname)
print "Making data set..."
local t = {}
for i = 0, 40000, 5 do
table.insert(t, {"k" .. i, make_val(i), 1})
end
print "Saving data set..."
local db = couch.open(dbname, true)
db:save_bulk(t)
db:commit()
print "Checking data set..."
check_table(db, t)
db:close()
local db = couch.open(dbname)
check_table(db, t)
end
function test_big_sequential(dbname)
print "Making & saving data set..."
local db = couch.open(dbname, true)
local t = {}
for i = 0, 40000, 5 do
local k = "k" .. i
local v = make_val(i)
table.insert(t, {k, v, 1})
db:save(k, v, 1)
end
db:commit()
print "Checking data set..."
check_table(db, t)
db:close()
local db = couch.open(dbname)
check_table(db, t)
end
testlib.run_test("Big item test bulk", test_big_bulk)
testlib.run_test("Big item test sequential", test_big_sequential)
|
--[[
TheNexusAvenger
Implementation of a command.
--]]
local BaseCommand = require(script.Parent.Parent:WaitForChild("BaseCommand"))
local Command = BaseCommand:Extend()
--[[
Creates the command.
--]]
function Command:__new()
self:InitializeSuper("mute","BasicCommands","Mutes a set of players. Admins can not be muted.")
self.Arguments = {
{
Type = "nexusAdminPlayers",
Name = "Players",
Description = "Players to mute.",
},
}
--Create the remote event.
local MutePlayerEvent = Instance.new("RemoteEvent")
MutePlayerEvent.Name = "MutePlayer"
MutePlayerEvent.Parent = self.API.EventContainer
self.MutePlayerEvent = MutePlayerEvent
end
--[[
Runs the command.
--]]
function Command:Run(CommandContext,Players)
self.super:Run(CommandContext)
--Mute the players.
for _,Player in pairs(Players) do
if self.API.Authorization:GetAdminLevel(Player) >= 0 then
self:SendError("You can't mute admins.")
else
self.MutePlayerEvent:FireClient(Player)
end
end
end
return Command |
function EntityListToTable(entityList)
PROFILE("EntityListToTable")
assert(entityList ~= nil)
local result = {}
for _, ent in ientitylist( entityList ) do
if ent ~= nil then
result[#result+1] = ent
end
end
return result
end
function GetEntitiesForTeamTypeWithinXZRange(className, teamType, origin, range)
assert(type(className) == "string")
assert(type(teamType) == "number")
assert(origin ~= nil)
assert(type(range) == "number")
local function inRangeXZFilterFunction(entity)
local inRange = (entity:GetOrigin() - origin):GetLengthSquaredXZ() <= (range * range)
return inRange and HasMixin(entity, "Team") and entity:GetTeamType() == teamType
end
return GetEntitiesWithFilter(Shared.GetEntitiesWithClassname(className), inRangeXZFilterFunction)
end |
RegisterServerEvent("kickForBeingAnAFKDouchebag")
AddEventHandler("kickForBeingAnAFKDouchebag", function()
DropPlayer(source, "Vous étiez afk.")
end) |
local Anagram = {}
Anagram.__index = Anagram
function Anagram:new(str)
local self = setmetatable({}, Anagram)
self.original = str
self.sorted = sortString(str)
return self
end
function Anagram:match(strs)
local result = {}
for _, str in ipairs(strs) do
strToMatch = sortString(str)
if (str ~= self.original and strToMatch == self.sorted) then table.insert(result, str) end
end
return result
end
-- helper
function sortString (str)
local letters = {}
local str = str:lower()
for char in string.gmatch(str, ".") do table.insert(letters, char) end
table.sort(letters)
return table.concat(letters)
end
return Anagram
|
require "nacl"
require "emscripten"
solution "platform-web"
platforms { "PNaCl" }
-- This hack just makes the VS project and also the makefile output their configurations in the idiomatic order
if _ACTION == "gmake" then
configurations { "Release", "Debug", "DebugOpt" }
else
configurations { "Debug", "DebugOpt", "Release" }
end
startproject "viewer"
group "libs"
dofile "3rdparty/lua/project.lua"
dofile "ud/udPlatform/project.lua"
dofile "ud/udPointCloud/project.lua"
group "hal"
halSuffix = "nacl"
dofile "hal/project.lua"
group ""
dofile "libep/project.lua"
dofile "kernel/project.lua"
dofile "viewer/project.lua"
-- group "plugins"
-- dofile "plugin/viewer/project.lua"
|
-- entities
local entities = __pointers__.entities
local p = entities:at(1)
print('Container: ' .. tostring(entities))
print('Type: ' .. tostring(p))
print('Pos: ' .. p.pos)
p.pos = camera:getPosition()
p.vel = vec2.new(0, 0)
print('New Pos: ' .. p.pos)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.