content stringlengths 5 1.05M |
|---|
function bang(sig)
g = g or 0
g = g + 1
n = 20
list = {n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n}
return list[1 + g % #list]
end |
LhdRoomCcsView = class("LhdRoomCcsView")
LhdRoomCcsView.onCreationComplete = function (slot0)
ClassUtil.extends(slot0, BaseGameRoomView, true, slot0.entranceBtnDic)
slot0.controller:adjustSlimWidth(slot0.layerTop.btnRule, UIConfig.ALIGN_LEFT, 80)
slot0:customCtor()
end
LhdRoomCcsView.customCtor = function (slot0)
slot0:initMembers()
slot0:initUIName()
slot0:initScrollView()
slot0:initSelfInfo()
slot0:initQucikStartBtn()
end
LhdRoomCcsView.initUIName = function (slot0)
slot0.roomSV = slot0.layerRoomList.content_sv
slot0.btnBack = slot0.layerTop.btnBack
slot0.btnHelp = slot0.layerTop.btnRule
slot0.selfName = slot0.layerBottom.txtName
slot0.selfScore = slot0.layerBottom.userScore
slot0.roomContent = slot0.layerRoomList.layerContent
slot0.btnQuickStart = slot0.layerBottom.btnQuickStart
slot0.selfScore:setStrBaseWidth(28)
end
LhdRoomCcsView.initQucikStartBtn = function (slot0)
slot1 = slot0.controller:createSpine(LHD_SPINE.RoomQuickStart)
slot1:setLocalZOrder(-1)
slot0.btnQuickStart:addChild(slot1)
slot1:setPosition(217.5, 49)
slot1:setAnimation(0, LHD_SPINE.RoomQuickStart.PlayName, LHD_SPINE.RoomQuickStart.Loop)
end
LhdRoomCcsView.initMembers = function (slot0)
slot0.entranceBtnPos = {}
slot0.entranceBtnDic = {}
slot0.bInitSpine = false
end
LhdRoomCcsView.initScrollView = function (slot0)
slot0.roomSV:setContentSize(slot1)
slot0.roomSV:setClippingEnabled(false)
slot0.roomSV:setIsCenterWhileNeed(true)
slot0.roomSV:addContentChild(slot0.roomContent)
slot0.roomSV:setInnerContainerSize(slot0.roomContent:getContentSize())
DisplayUtil.setAllCascadeOpacityEnabled(slot0.roomSV)
slot2 = 1
slot3 = 1
while slot2 <= 10 do
if slot0.roomContent["btn" .. slot2] then
slot0.entranceBtnDic[slot2] = slot4
slot4.roomKind = slot2
slot0.entranceBtnPos[slot3] = DisplayUtil.ccpCopy(slot4:getPosition())
slot3 = slot3 + 1
slot0.roomSV:addBtn2HandleTouchOperate(slot4)
if LHD_SPINE["RoomEntranceSpine" .. slot2] then
slot6 = slot0.controller:createSpine(slot5)
slot6:setLocalZOrder(-1)
slot4:addChild(slot6)
slot6:setPosition(157.5, 232.5)
slot6:setAnimation(0, slot5.PlayName, slot5.Loop)
end
end
slot2 = slot2 + 1
end
slot0._originX, slot0._originY = slot0.roomContent:getPosition()
end
LhdRoomCcsView.initSelfInfo = function (slot0)
Hero.pNickNameChangedSignal:add(slot0.onNickNameChanged, slot0)
slot0:onUserScoreChanged()
slot0:onNickNameChanged()
end
LhdRoomCcsView.onShow = function (slot0)
TweenLite.to(slot0:getParent():getParent().layerNotice, 0.4, {
x = 432,
y = 658
})
slot0.roomSV:jumpTo(0)
slot0:updateRoomList()
Hero.userScoreChangedSignal:add(slot0.onUserScoreChanged, slot0)
Hero.userInsureChangedSignal:add(slot0.onUserScoreChanged, slot0)
slot0:onUserScoreChanged()
slot0:playEntryAnimation()
end
LhdRoomCcsView.playEntryAnimation = function (slot0)
slot0.layerRoomList:setCascadeOpacityEnabled(true)
slot0.layerTop:setCascadeOpacityEnabled(true)
slot0.layerBottom:setCascadeOpacityEnabled(true)
if slot0._roomCount >= 5 then
slot3, slot4 = slot0.layerRoomList.content_sv:getPosition()
slot0.layerRoomList.layerContent:setPosition(slot5, slot2)
slot0.layerRoomList.layerContent.setOpacity(slot6, 0)
slot0.layerRoomList.layerContent.runAction(slot6, cc.Sequence:create(cc.DelayTime:create(0.1), cc.FadeTo:create(0.1, 255)))
slot0.layerRoomList.layerContent:runAction(cc.Sequence:create(cc.DelayTime:create(0.3), cc.EaseBackOut:create(cc.MoveTo:create(1, cc.p(slot0._originX, slot0._originY)))))
else
slot2 = cc.p(slot0._originX, slot0._originY)
slot0.layerRoomList.layerContent.setOpacity(slot1, 0)
slot0.layerRoomList.layerContent.setPosition(slot1, slot2.x + 100, slot2.y)
slot0.layerRoomList.layerContent.runAction(slot1, cc.FadeTo:create(0.3, 255))
slot0.layerRoomList.layerContent:runAction(cc.EaseBackOut:create(cc.MoveTo:create(0.4, slot2)))
end
slot2 = cc.p(slot0.layerTop.getPosition(slot1))
slot0.layerTop.setOpacity(slot1, 0)
slot0.layerTop.setPosition(slot1, slot2.x, slot2.y + 60)
slot0.layerTop.runAction(slot1, cc.FadeTo:create(0.3, 255))
slot0.layerTop.runAction(slot1, cc.EaseBackOut:create(cc.MoveTo:create(0.4, slot2)))
slot4 = cc.p(slot0.layerBottom.getPosition(slot3))
slot0.layerBottom.setOpacity(slot3, 0)
slot0.layerBottom.setPosition(slot3, slot4.x, slot4.y - 60)
slot0.layerBottom.runAction(slot3, cc.FadeTo:create(0.3, 255))
slot0.layerBottom:runAction(cc.EaseBackOut:create(cc.MoveTo:create(0.4, slot4)))
end
LhdRoomCcsView.onHide = function (slot0)
Hero.userScoreChangedSignal:remove(slot0.onUserScoreChanged, slot0)
Hero.userInsureChangedSignal:remove(slot0.onUserScoreChanged, slot0)
end
LhdRoomCcsView.updateRoomList = function (slot0)
slot1 = gameMgr:getServerVosDicEx()[slot0.model:getGameKind()] or {}
slot2 = 1
slot3 = 0
slot4 = {}
while slot2 <= 10 do
slot5 = slot1[slot2]
if slot0.entranceBtnDic[slot2] then
DisplayUtil.setVisible(slot6, slot5 ~= nil)
if slot5 then
slot6:setPosition(slot0.entranceBtnPos[slot3 + 1])
if slot0.bInitSpine == false then
end
slot4[slot3] = slot6
slot0:updateRoomBtn(slot6, slot5, slot2)
end
end
slot2 = slot2 + 1
end
slot0.bInitSpine = true
slot5 = 0
slot0._roomCount = slot3
if slot3 > 0 then
slot5 = math.max(slot5, 50 + slot4[slot3].getPositionX(slot6) + slot4[slot3].getScaleX(slot6) * slot4[slot3].getContentSize(slot6).width * slot4[slot3]:getAnchorPoint().x)
end
slot0.roomSV:setInnerContainerSize(cc.size(slot5, slot0.roomContent:getContentSize().height))
if display.width <= slot5 then
slot7 = 80
if math.abs(slot6) < 10 then
slot7 = 0
end
if display.width <= CONFIG_CUR_WIDTH then
slot7 = slot7 + 20
end
slot0.roomSV:setPositionX(-slot6 + slot7)
else
slot0.roomSV:setPositionX((CONFIG_DESIGN_WIDTH - display.width) * 0.5 + math.max(40, (display.width - slot5) * 0.5))
end
slot0._roomsWidth = slot5
end
LhdRoomCcsView.updateRoomBtn = function (slot0, slot1, slot2, slot3)
if slot3 == 1 and slot1.imgFree then
else
slot1.txtNeed_tf:setHtmlText(HtmlUtil.createArtNumWithHansUnits(slot2._miniNeed / LHD_BET_SCORE_RATE_VIEW, "#lhd_room_zhunru_%s.png"))
end
if slot1.imgOnline then
slot4 = nil
if slot2._totalOnline < 40 and slot2._totalOnline >= 0 then
slot4 = LHD_ROOM_STATUS_0_40
elseif slot2._totalOnline >= 40 and slot2._totalOnline < 80 then
slot4 = LHD_ROOM_STATUS_40_80
elseif slot2._totalOnline >= 80 then
slot4 = LHD_ROOM_STATUS_80
end
if slot4 == nil then
slot1.imgOnline:setVisible(false)
return
end
slot1.imgOnline:setVisible(true)
slot1.imgOnline:loadTexture(slot4)
end
end
LhdRoomCcsView.onBtnClick = function (slot0, slot1, slot2)
if slot1 == slot0.btnBack then
slot0.controller:exitGame()
elseif slot1 == slot0.btnHelp then
slot0.model:setIsShowingRule(true)
elseif slot1 == slot0.btnQuickStart then
slot0.controller:quickStartGame()
elseif slot1.roomKind then
slot0.controller:requestEnterRoom(slot1.roomKind)
end
end
LhdRoomCcsView.onNickNameChanged = function (slot0)
slot0.selfName:setString(StringUtil.truncate(Hero:getPNickName(), 10, nil, 2))
end
LhdRoomCcsView.onUserScoreChanged = function (slot0)
slot0.selfScore:setStrTxt(HtmlUtil.createArtNumDot(Hero:getUserScore() / LHD_BET_SCORE_RATE_VIEW, "#lhd_score_%s.png"))
slot0.controller:setHeadBg(slot0.layerBottom.head, GAME_STATE.ROOM)
end
LhdRoomCcsView.destroy = function (slot0)
Hero.pNickNameChangedSignal:remove(slot0.onNickNameChanged, slot0)
destroySomeObj(slot0.layerBottom.userScore)
destroySomeObj(slot0.layerTop.btnBack)
destroySomeObj(slot0.layerTop.btnKSKS)
destroySomeObj(slot0.layerBottom.head)
destroySomeObj(slot0.roomSV)
BaseGameRoomView.destroy(slot0)
end
return
|
require('spec/setup/busted')()
local Direction = require('__stdlib__/stdlib/area/direction')
describe('Direction Functions', function()
local d = defines.direction
describe('.next_direction', function()
local nd = Direction.next_direction
it('returns the next 4way direction clockwise', function()
for i=0, 7, 2 do
assert.same(i, nd(i-2))
end
assert.same(d.north, nd(d.west))
assert.same(d.south, nd(nd(0)))
end)
it('returns the next 8way direction clockwise', function()
for i=0, 7, 1 do
assert.same(i, nd(i-1, false, true))
end
assert.same(d.north, nd(d.northwest, false, true))
end)
it('returns the next 4way direction counter-clockwise', function()
for i=7, 0, 2 do
assert.same(i, nd(i+2))
end
assert.same(d.west, nd(d.north, true))
end)
it('returns the next 8way direction counter-clockwise', function()
for i=7, 0, 1 do
assert.same(i, nd(i+1), true, true)
end
assert.same(d.northwest, nd(d.north, true, true))
end)
end)
describe('.direction_to_orientation', function()
it('should convert a direction to an orientation', function()
local dto = Direction.direction_to_orientation
assert.same(0, dto(0))
assert.same(.25, dto(2))
assert.same(.5, dto(4))
assert.same(.75, dto(6))
assert.same(.125, dto(1))
assert.same(.375, dto(3))
assert.same(.625, dto(5))
assert.same(.875, dto(7))
end)
end)
describe('.opposite_direction', function()
it ('should return the opposite direction', function ()
local od = Direction.opposite_direction
assert.same(d.west, od(d.east))
assert.same(d.southwest, od(d.northeast))
end)
end)
describe('.orientation_to_4way', function()
it('should ', function()
assert.same(0, Direction.orientation_to_4way(.124))
assert.same(2, Direction.orientation_to_4way(.125))
assert.same(4, Direction.orientation_to_4way(.624))
assert.same(0, Direction.orientation_to_4way(.875))
end)
end)
describe('.orientation_to_8way', function()
it('should ', function()
assert.same(0, Direction.orientation_to_8way(.06))
assert.same(1, Direction.orientation_to_8way(.0625))
assert.same(5, Direction.orientation_to_8way(.628))
assert.same(4, Direction.orientation_to_8way(.501))
end)
end)
end)
|
require "scripts.common";
local Video =
{
init = false;
Properties =
{
SizeDropDownText = {default = EntityId()},
DisplayDropDownText = {default = EntityId()},
SizeDropDown = {default = EntityId()},
DisplayDropDown = {default = EntityId()},
AspectRatio4_3 = {default = EntityId()},
AspectRatio16_9 = {default = EntityId()},
AspectRatio16_10 = {default = EntityId()},
CustomRes = {default = EntityId()},
UseCurrentRes = {default = EntityId()},
UseBasicRenderingSettings = {default = EntityId()},
UseAdvancedRenderingSettings = {default = EntityId()},
TextureLow = {default = EntityId()},
TextureMed = {default = EntityId()},
TextureHigh = {default = EntityId()},
EffectLow = {default = EntityId()},
EffectMed = {default = EntityId()},
EffectHigh = {default = EntityId()},
ShadowLow = {default = EntityId()},
ShadowMed = {default = EntityId()},
ShadowHigh = {default = EntityId()},
AnimatePortrait = {default = EntityId()},
AntiAliasing = {default = EntityId()},
AdditiveLightPass = {default = EntityId()},
Specular = {default = EntityId()},
WorldLighting = {default = EntityId()},
SpecularAndLightBlooms = {default = EntityId()},
AmbientOcclusions = {default = EntityId()},
HighQualityDashboard = {default = EntityId()},
NormalMaps = {default = EntityId()},
AtmosphericFog = {default = EntityId()},
TreeWind = {default = EntityId()},
Grass = {default = EntityId()},
GameScreenRenderQuality = {default = EntityId()},
MaxFramePerSecond = {default = EntityId()},
},
}
function Video:OnTick(deltaTime, timePoint)
self.tickBusHandler:Disconnect()
-- Get the canvas entityId
-- This is done after the OnActivate when the canvas is fully initialized
self.canvasEntityId = UiElementBus.Event.GetCanvas(self.entityId)
if( self.canvasEntityId ) then
if self.canvasNotificationHandler then
self.canvasNotificationHandler:Disconnect()
self.canvasNotificationHandler = nil
end
self.canvasNotificationHandler = UiCanvasNotificationBus.Connect(self, self.canvasEntityId)
end
if self.init == false then
self:LoadSettings()
end
end
function Video:OnActivate()
self.tickBusHandler = TickBus.Connect(self);
self.canvasNotificationHandler = nil
end
function Video:OnAction(entityId, actionName)
if actionName == "DefaultSettings" then
self:DefaultSettings()
end
if actionName == "ScreenSizeSelected" then
local text = UiTextBus.Event.GetText(self.Properties.SizeDropDownText)
SettingsRequestBus.Broadcast.SetSettingValue("ScreenSize",tostring(text), "Video")
self:SetSize()
end
if actionName == "DisplayModeSelected" then
local text = UiTextBus.Event.GetText(self.Properties.DisplayDropDownText)
SettingsRequestBus.Broadcast.SetSettingValue("DisplayMode",tostring(text), "Video")
self:SetSize()
end
if actionName == "AspectRatio4:3" then
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio4:3",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio4_3)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio16_9, false)
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio16_10, false)
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio16:9",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio16_9)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio16:10",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio16_10)), "Video")
end
if actionName == "AspectRatio16:9" then
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio16:9",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio16_9)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio4_3, false)
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio16_10, false)
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio4:3",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio4_3)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio16:10",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio16_10)), "Video")
end
if actionName == "AspectRatio16:10" then
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio16:10",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio16_10)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio16_9, false)
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio4_3, false)
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio16:9",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio16_9)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio4:3",tostring(UiCheckboxBus.Event.GetState(self.Properties.AspectRatio4_3)), "Video")
end
if actionName == "CustomRes" then
SettingsRequestBus.Broadcast.SetSettingValue("CustomRes",tostring(UiCheckboxBus.Event.GetState(self.Properties.CustomRes)), "Video")
end
if actionName == "UseCurrentRes" then
SettingsRequestBus.Broadcast.SetSettingValue("UseCurrentRes",tostring(UiCheckboxBus.Event.GetState(self.Properties.UseCurrentRes)), "Video")
end
if actionName == "UseBasicRenderingSettings" then
SettingsRequestBus.Broadcast.SetSettingValue("UseBasicRenderingSettings",tostring(UiCheckboxBus.Event.GetState(self.Properties.UseBasicRenderingSettings)), "Video")
end
if actionName == "UseAdvancedRenderingSettings" then
SettingsRequestBus.Broadcast.SetSettingValue("UseAdvancedRenderingSettings",tostring(UiCheckboxBus.Event.GetState(self.Properties.UseAdvancedRenderingSettings)), "Video")
end
if actionName == "TextureLow" then
SettingsRequestBus.Broadcast.SetSettingValue("TextureLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureLow)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.TextureMed, false)
UiCheckboxBus.Event.SetState(self.Properties.TextureHigh, false)
SettingsRequestBus.Broadcast.SetSettingValue("TextureMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureMed)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("TextureHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureHigh)), "Video")
end
if actionName == "TextureMed" then
SettingsRequestBus.Broadcast.SetSettingValue("TextureMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureMed)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.TextureLow, false)
UiCheckboxBus.Event.SetState(self.Properties.TextureHigh, false)
SettingsRequestBus.Broadcast.SetSettingValue("TextureLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureLow)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("TextureHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureHigh)), "Video")
end
if actionName == "TextureHigh" then
SettingsRequestBus.Broadcast.SetSettingValue("TextureHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureHigh)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.TextureLow, false)
UiCheckboxBus.Event.SetState(self.Properties.TextureMed, false)
SettingsRequestBus.Broadcast.SetSettingValue("TextureLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureLow)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("TextureMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.TextureMed)), "Video")
end
if actionName == "EffectLow" then
SettingsRequestBus.Broadcast.SetSettingValue("EffectLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectLow)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.EffectHigh, false)
UiCheckboxBus.Event.SetState(self.Properties.EffectMed, false)
SettingsRequestBus.Broadcast.SetSettingValue("EffectMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectMed)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("EffectHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectHigh)), "Video")
end
if actionName == "EffectMed" then
SettingsRequestBus.Broadcast.SetSettingValue("EffectMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectMed)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.EffectLow, false)
UiCheckboxBus.Event.SetState(self.Properties.EffectHigh, false)
SettingsRequestBus.Broadcast.SetSettingValue("EffectLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectLow)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("EffectHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectHigh)), "Video")
end
if actionName == "EffectHigh" then
SettingsRequestBus.Broadcast.SetSettingValue("EffectHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectHigh)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.EffectLow, false)
UiCheckboxBus.Event.SetState(self.Properties.EffectMed, false)
SettingsRequestBus.Broadcast.SetSettingValue("EffectLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectLow)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("EffectMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.EffectMed)), "Video")
end
if actionName == "ShadowLow" then
SettingsRequestBus.Broadcast.SetSettingValue("ShadowLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowLow)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.ShadowMed, false)
UiCheckboxBus.Event.SetState(self.Properties.ShadowHigh, false)
SettingsRequestBus.Broadcast.SetSettingValue("ShadowMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowMed)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("ShadowHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowHigh)), "Video")
end
if actionName == "ShadowMed" then
SettingsRequestBus.Broadcast.SetSettingValue("ShadowMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowMed)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.ShadowLow, false)
UiCheckboxBus.Event.SetState(self.Properties.ShadowHigh, false)
SettingsRequestBus.Broadcast.SetSettingValue("ShadowLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowLow)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("ShadowHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowHigh)), "Video")
end
if actionName == "ShadowHigh" then
SettingsRequestBus.Broadcast.SetSettingValue("ShadowHigh",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowHigh)), "Video")
UiCheckboxBus.Event.SetState(self.Properties.ShadowLow, false)
UiCheckboxBus.Event.SetState(self.Properties.ShadowMed, false)
SettingsRequestBus.Broadcast.SetSettingValue("ShadowLow",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowLow)), "Video")
SettingsRequestBus.Broadcast.SetSettingValue("ShadowMed",tostring(UiCheckboxBus.Event.GetState(self.Properties.ShadowMed)), "Video")
end
if actionName == "GameScreenRenderQualityChanged" then
local Parent = UiElementBus.Event.GetParent(entityId)
local Text = UiElementBus.Event.FindDescendantByName(Parent,"Text")
SettingsRequestBus.Broadcast.SetSettingValue("GameScreenRenderQuality",tostring(UiSliderBus.Event.GetValue(self.Properties.GameScreenRenderQuality)), "Video")
end
if actionName == "MaxFramePerSecondChanged" then
local Parent = UiElementBus.Event.GetParent(entityId)
local Text = UiElementBus.Event.FindDescendantByName(Parent,"Text")
SettingsRequestBus.Broadcast.SetSettingValue("MaxFramePerSecond",tostring(UiSliderBus.Event.GetValue(self.Properties.MaxFramePerSecond)), "Video")
end
if actionName == "AnimatePortrait" then
SettingsRequestBus.Broadcast.SetSettingValue("AnimatePortrait",tostring(UiCheckboxBus.Event.GetState(self.Properties.AnimatePortrait)), "Video")
end
if actionName == "AntiAliasing" then
SettingsRequestBus.Broadcast.SetSettingValue("AntiAliasing",tostring(UiCheckboxBus.Event.GetState(self.Properties.AntiAliasing)), "Video")
end
if actionName == "AdditiveLightPass" then
SettingsRequestBus.Broadcast.SetSettingValue("AdditiveLightPass",tostring(UiCheckboxBus.Event.GetState(self.Properties.AdditiveLightPass)), "Video")
end
if actionName == "Specular" then
SettingsRequestBus.Broadcast.SetSettingValue("Specular",tostring(UiCheckboxBus.Event.GetState(self.Properties.Specular)), "Video")
end
if actionName == "WorldLighting" then
SettingsRequestBus.Broadcast.SetSettingValue("WorldLighting",tostring(UiCheckboxBus.Event.GetState(self.Properties.WorldLighting)), "Video")
end
if actionName == "SpecularAndLightBlooms" then
SettingsRequestBus.Broadcast.SetSettingValue("SpecularAndLightBlooms",tostring(UiCheckboxBus.Event.GetState(self.Properties.SpecularAndLightBlooms)), "Video")
end
if actionName == "AmbientOcclusions" then
SettingsRequestBus.Broadcast.SetSettingValue("AmbientOcclusions",tostring(UiCheckboxBus.Event.GetState(self.Properties.AmbientOcclusions)), "Video")
end
if actionName == "HighQualityDashboard" then
SettingsRequestBus.Broadcast.SetSettingValue("HighQualityDashboard",tostring(UiCheckboxBus.Event.GetState(self.Properties.HighQualityDashboard)), "Video")
end
if actionName == "NormalMaps" then
SettingsRequestBus.Broadcast.SetSettingValue("NormalMaps",tostring(UiCheckboxBus.Event.GetState(self.Properties.NormalMaps)), "Video")
end
if actionName == "AtmosphericFog" then
SettingsRequestBus.Broadcast.SetSettingValue("AtmosphericFog",tostring(UiCheckboxBus.Event.GetState(self.Properties.AtmosphericFog)), "Video")
end
if actionName == "TreeWind" then
SettingsRequestBus.Broadcast.SetSettingValue("TreeWind",tostring(UiCheckboxBus.Event.GetState(self.Properties.TreeWind)), "Video")
end
if actionName == "Grass" then
SettingsRequestBus.Broadcast.SetSettingValue("Grass",tostring(UiCheckboxBus.Event.GetState(self.Properties.Grass)), "Video")
end
end
function Video:SetSize()
local screenSize = SettingsRequestBus.Broadcast.GetSettingValue("ScreenSize","Video")
local text = SettingsRequestBus.Broadcast.GetSettingValue("DisplayMode","Video")
local values=splitstring(screenSize, "x")
if #values >= 2 then
x = tonumber(values[1])
y = tonumber(values[2])
if text == "Borderless Window" or text == "Exclusive Fullscreen" then
SettingsRequestBus.Broadcast.ChangeVideoMode(Vector2(x,y),true);
else
SettingsRequestBus.Broadcast.ChangeVideoMode(Vector2(x,y),false);
end
end
end
function Video:DefaultSettings()
--Set Default Settings
if not UiElementBus.Event.IsEnabled(self.entityId) then
return
end
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio4:3","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio16:9","true", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AspectRatio16:10","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("CustomRes","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("UseCurrentRes","true", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("UseBasicRenderingSettings","true", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("UseAdvancedRenderingSettings","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("TextureLow","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("TextureMed","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("TextureHigh","true", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("EffectLow","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("EffectMed","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("EffectHigh","true", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("ShadowLow","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("ShadowMed","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("ShadowHigh","true", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("GameScreenRenderQuality","0", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("MaxFramePerSecond","0", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AnimatePortrait","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AntiAliasing","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AdditiveLightPass","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("Specular","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("WorldLighting","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("SpecularAndLightBlooms","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AmbientOcclusions","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("HighQualityDashboard","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("NormalMaps","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("AtmosphericFog","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("TreeWind","false", "Video")
SettingsRequestBus.Broadcast.SetSettingValue("Grass","false", "Video")
self:LoadSettings()
end
function Video:GetBool(result)
if result == "true" then
return true
elseif result == "false" then
return false
else
--self:GetDefaultSetting(result)
end
end
function Video:LoadSettings()
--Load Current Settings On Load
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio4_3,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("AspectRatio4:3","Video")))
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio16_9,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("AspectRatio16:9","Video")))
UiCheckboxBus.Event.SetState(self.Properties.AspectRatio16_10,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("AspectRatio16:10","Video")))
UiCheckboxBus.Event.SetState(self.Properties.CustomRes,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("CustomRes","Video")))
UiCheckboxBus.Event.SetState(self.Properties.UseCurrentRes,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("UseCurrentRes","Video")))
UiCheckboxBus.Event.SetState(self.Properties.UseBasicRenderingSettings,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("UseBasicRenderingSettings","Video")))
UiCheckboxBus.Event.SetState(self.Properties.UseAdvancedRenderingSettings,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("UseAdvancedRenderingSettings","Video")))
UiCheckboxBus.Event.SetState(self.Properties.TextureLow,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("TextureLow","Video")))
UiCheckboxBus.Event.SetState(self.Properties.TextureMed,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("TextureMed","Video")))
UiCheckboxBus.Event.SetState(self.Properties.TextureHigh,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("TextureHigh","Video")))
UiCheckboxBus.Event.SetState(self.Properties.EffectLow,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("EffectLow","Video")))
UiCheckboxBus.Event.SetState(self.Properties.EffectMed,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("EffectMed","Video")))
UiCheckboxBus.Event.SetState(self.Properties.EffectHigh,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("EffectHigh","Video")))
UiCheckboxBus.Event.SetState(self.Properties.ShadowLow,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("ShadowLow","Video")))
UiCheckboxBus.Event.SetState(self.Properties.ShadowMed,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("ShadowMed","Video")))
UiCheckboxBus.Event.SetState(self.Properties.ShadowHigh,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("ShadowHigh","Video")))
UiCheckboxBus.Event.SetState(self.Properties.AnimatePortrait,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("AnimatePortrait","Video")))
UiCheckboxBus.Event.SetState(self.Properties.AntiAliasing,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("AntiAliasing","Video")))
UiCheckboxBus.Event.SetState(self.Properties.AdditiveLightPass,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("AdditiveLightPass","Video")))
UiCheckboxBus.Event.SetState(self.Properties.Specular,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("Specular","Video")))
UiCheckboxBus.Event.SetState(self.Properties.WorldLighting,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("WorldLighting","Video")))
UiCheckboxBus.Event.SetState(self.Properties.SpecularAndLightBlooms,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("SpecularAndLightBlooms","Video")))
UiCheckboxBus.Event.SetState(self.Properties.AmbientOcclusions,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("AmbientOcclusions","Video")))
UiCheckboxBus.Event.SetState(self.Properties.HighQualityDashboard,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("HighQualityDashboard","Video")))
UiCheckboxBus.Event.SetState(self.Properties.NormalMaps,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("NormalMaps","Video")))
UiCheckboxBus.Event.SetState(self.Properties.AtmosphericFog,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("AtmosphericFog","Video")))
UiCheckboxBus.Event.SetState(self.Properties.TreeWind,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("TreeWind","Video")))
--UiCheckboxBus.Event.SetState(self.Properties.Grass,self:GetBool(SettingsRequestBus.Broadcast.GetSettingValue("Grass ","Video")))
UiSliderBus.Event.SetValue(self.Properties.GameScreenRenderQuality,SettingsRequestBus.Broadcast.GetSettingValue("GameScreenRenderQuality","Video"))
UiSliderBus.Event.SetValue(self.Properties.MaxFramePerSecond,SettingsRequestBus.Broadcast.GetSettingValue("MaxFramePerSecond","Video"))
if self.init == false then
self.init = true
end
end
return Video; |
---@class Server : zombie.network.Server
---@field private name String
---@field private ip String
---@field private localIP String
---@field private port String
---@field private serverpwd String
---@field private description String
---@field private userName String
---@field private pwd String
---@field private lastUpdate int
---@field private players String
---@field private maxPlayers String
---@field private open boolean
---@field private bPublic boolean
---@field private version String
---@field private mods String
---@field private passwordProtected boolean
---@field private steamId String
---@field private ping String
---@field private hosted boolean
Server = {}
---@public
---@param arg0 String
---@return void
function Server:setLocalIP(arg0) end
---@public
---@param ip String
---@return void
function Server:setIp(ip) end
---@public
---@param arg0 String
---@return void
function Server:setSteamId(arg0) end
---@public
---@param description String
---@return void
function Server:setDescription(description) end
---@public
---@param name String
---@return void
function Server:setName(name) end
---@public
---@return String
function Server:getPing() end
---@public
---@return boolean
function Server:isHosted() end
---@public
---@return boolean
function Server:isPasswordProtected() end
---@public
---@return boolean
function Server:isOpen() end
---@public
---@param pwd String
---@return void
function Server:setPwd(pwd) end
---@public
---@return String
function Server:getIp() end
---@public
---@return boolean
function Server:isPublic() end
---@public
---@return String
function Server:getMaxPlayers() end
---@public
---@param arg0 String
---@return void
function Server:setPing(arg0) end
---@public
---@return int
function Server:getLastUpdate() end
---@public
---@param arg0 boolean
---@return void
function Server:setHosted(arg0) end
---@public
---@param version String
---@return void
function Server:setVersion(version) end
---@public
---@return String
function Server:getDescription() end
---@public
---@param userName String
---@return void
function Server:setUserName(userName) end
---@public
---@param mods String
---@return void
function Server:setMods(mods) end
---@public
---@return String
function Server:getMods() end
---@public
---@param lastUpdate int
---@return void
function Server:setLastUpdate(lastUpdate) end
---@public
---@return String
function Server:getPort() end
---@public
---@return String
function Server:getVersion() end
---@public
---@param players String
---@return void
function Server:setPlayers(players) end
---@public
---@return String
function Server:getServerPassword() end
---@public
---@param open boolean
---@return void
function Server:setOpen(open) end
---@public
---@param maxPlayers String
---@return void
function Server:setMaxPlayers(maxPlayers) end
---@public
---@return String
function Server:getLocalIP() end
---@public
---@return String
function Server:getSteamId() end
---@public
---@return String
function Server:getPwd() end
---@public
---@return String
function Server:getUserName() end
---@public
---@param arg0 String
---@return void
function Server:setServerPassword(arg0) end
---@public
---@param arg0 boolean
---@return void
function Server:setPasswordProtected(arg0) end
---@public
---@param port String
---@return void
function Server:setPort(port) end
---@public
---@return String
function Server:getName() end
---@public
---@return String
function Server:getPlayers() end
---@public
---@param arg0 boolean
---@return void
function Server:setPublic(arg0) end
|
local get_room_from_jid = module:require "util".get_room_from_jid;
local st = require "util.stanza";
local json = require "util.json";
module:log("info", "Loading module polls");
local muc_component_host = module:get_option_string("muc_component");
if muc_component_host ~= nil then
log("info", "Starting module %s", tostring(muc_component_host));
end
function on_message(event)
log("debug", "Recieved Message %s", tostring(event.stanza));
if event.stanza.attr.type == "error" then
return;
end
local polls = event.stanza:get_child('polls', 'http://jitsi.org/jitmeet');
if polls then
local roomAddress = polls.attr.room;
local room = get_room_from_jid(roomAddress);
if not room then
log("warn", "No room found %s", roomAddress);
return false;
end
log("info", "%s", tostring(polls.attr.poll));
if polls.attr.poll then
room.poll = polls.attr.poll;
log("info", "Saved current poll in room %s", room.jid);
else
room.poll = nil
log("info", "Removed current poll from room %s", room.jid);
end
return true;
else
return false;
end
end
function occupant_joined(event)
local room = event.room;
local occupant = event.occupant;
if room.poll then
log("info", "Informed occupant %s about poll %s", tostring(occupant.jid), room.poll);
local body_json = {};
body_json.type = 'polls';
body_json.poll = room.poll;
local stanza = st.message({
from = module.host;
to = occupant.jid;
})
:tag("json-message", {xmlns='http://jitsi.org/jitmeet'})
:text(json.encode(body_json)):up();
room:route_stanza(stanza);
end
end
function room_created(event)
log("info", "room created");
local room = event.room;
room.poll = nil;
end
module:hook("message/host", on_message);
-- executed on every host added internally in prosody, including components
function process_host(host)
if host == muc_component_host then -- the conference muc component
module:log("info","Hook to muc events on %s", host);
local muc_module = module:context(host);
muc_module:hook("muc-room-created", room_created, -1);
muc_module:hook("muc-occupant-joined", occupant_joined, -1);
end
end
if prosody.hosts[muc_component_host] == nil then
module:log("info","No muc component found, will listen for it: %s", muc_component_host)
-- when a host or component is added
prosody.events.add_handler("host-activated", process_host);
else
process_host(muc_component_host);
end |
s = eng.Scene()
s:clear()
s:createPhysicsPlane()
--eng.setSunDir(1, -1, 0)
eng.setSunIntensity(0.2)
eng.setAmbientSky(128, 128, 128)
eng.setAmbientGround(230, 255, 230)
core.printcon("Adding object")
ground = s:createModel("ground", "plane.h3dm")
obj = s:createModel("soldier", "soldier.h3dm")
-- obj:loadAnimation("soldier.h3da")
obj:loadCharacterAnim("controller1.json")
--obj = s:createModel("soldier", "soldier.h3dm")
--obj:loadCharacterAnim("test-animator.json")
obj["animchar"]:debug()
light = s:createPointLight("test")
light:move(0.5, 1, 0.5)
light["light"]["color"] = core.Color(1, 0, 0, 1)
eng.addTimer(30, "update_param")
function update_param(id)
input = eng.Input()
anim = obj:getCharacterAnim()
if input:keyPressed(eng.KEY_UP) then
anim:setParam("Direction", anim:getParam("Direction") + 0.01)
elseif input:keyPressed(eng.KEY_DOWN) then
anim:setParam("Direction", anim:getParam("Direction") - 0.01)
end
anim:setParam("Walk", input:keyPressed(eng.KEY_SPACE))
end |
-- Version 1.4.3
include("MasterGear/MasterGearFunctions.lua")
include('THHelper/THHelper.lua')
include('HasteTracker/HasteTracker.lua')
function get_sets()
mode = 1
cp_mode = false
combat = false
throwing = false
killer_effect = false
get_set_for_job_from_json()
modes = {}
for k, v in pairs(sets) do
if k:startswith("Mode_") then
local number = tonumber(k:slice(6, 6))
if number then
modes[number] = {name = k:slice(7), set = sets[k]}
else
windower.add_to_chat(122, "Please format mode sets as Mode_<num><name>. E.g 'Mode_1Hybrid")
end
end
end
if #modes == 0 then
modes[1] = { name = "NoModesDefined", set = nil }
end
sets.Idle = set_combine(sets["IdleRegen"], sets["Movement"])
if custom_get_sets and type(custom_get_sets) == 'function' then
custom_get_sets()
end
print_mode()
print_th_mode()
if sets["Throwing"] then print_throwing() end
end
function precast(spell)
if custom_precast and type(custom_precast) == 'function' and custom_precast(spell) then
elseif spell.action_type == 'Magic' then
if sets[modes[mode].name .. "Fastcast"] then equip(sets[modes[mode].name .. "Fastcast"])
else equip(sets["Fastcast"]) end
elseif spell.type=="WeaponSkill" then
if ws and ws[spell.english] then
local setToUse = nil
if sets[modes[mode].name .. spell.english] then setToUse = sets[modes[mode].name .. spell.english]
else setToUse = ws[spell.english].set end
if ws[spell.english].tp_bonus then
local maxTP = 3000
if player.tp < maxTP then
setToUse = set_combine(setToUse, sets["TPBonus"])
end
end
if spell.element == world.weather_element or spell.element == world.day_element then
setToUse = set_combine(setToUse, sets["WeatherObi"])
end
if killer_effect then
setToUse = set_combine(setToUse, sets["KillerEffect"])
end
equip(setToUse)
end
elseif spell.action_type == "Ranged Attack" then equip(sets["Snapshot"])
elseif sets["Precast_" .. modes[mode].name .. spell.english] then equip(sets["Precast_" .. modes[mode].name .. spell.english])
elseif sets["Precast_" .. spell.english] then equip(sets["Precast_" .. spell.english])
end
end
function midcast(spell)
if custom_midcast and type(custom_midcast) == 'function' and custom_midcast(spell) then
elseif spell.action_type == "Ranged Attack" then equip(sets["Midshot"])
elseif sets["Midcast_" .. modes[mode].name ..spell.english] then equip(sets["Midcast_" .. modes[mode].name ..spell.english])
elseif sets["Midcast_" .. spell.english] then equip(sets["Midcast_" .. spell.english])
end
end
function aftercast(spell)
if custom_aftercast and type(custom_aftercast) == 'function' and custom_aftercast(spell) then
elseif combat or player.status == "Engaged" then
equip(modes[mode].set)
else
equip(sets.Idle)
end
end
function status_change(new,old)
if custom_status_change and type(custom_status_change) == 'function' and custom_status_change(new,old) then
elseif new == 'Engaged' then
equip(modes[mode].set)
on_status_change_for_th(new, old)
elseif T{'Idle','Resting'}:contains(new) then
on_status_change_for_th(new, old)
if combat == true then
equip(modes[mode].set)
else
equip(sets.Idle)
end
end
end
windower.register_event('zone change', function()
if custom_zone_change and type(custom_zone_change) == 'function' and custom_zone_change() then
elseif world.area:contains("Adoulin") then
equip(set_combine(sets.Idle, sets["Adoulin"]))
else
if combat == true then
equip(modes[mode].set)
else
equip(sets.Idle)
end
end
end)
function self_command(command)
local args = T{}
if type(command) == 'string' then
args = T(command:split(' '))
if #args == 0 then
return
end
end
if args[1] == "cp" then
if cp_mode == false then
add_to_chat(122, "CP mode on")
enable("back")
equip(sets["CP"])
disable("back")
cp_mode = true
elseif cp_mode == true then
add_to_chat(122, "CP mode off")
enable("back")
cp_mode = false
end
elseif args[1] == "mode" then
if args[2] and type(tonumber(args[2])) == 'number' then
nextMode = tonumber(args[2])
if nextMode == nil then
add_to_chat(122, "Invalid mode number")
else
if modes[nextMode] == nil then
add_to_chat(122, "Invalid node number")
else
mode = nextMode
print_mode()
end
end
else
mode = mode + 1
if modes[mode] == nil then
mode = 1
end
print_mode()
end
elseif args[1] == "combat" then
if combat == true then
add_to_chat(122, "combat off!")
combat = false
if player.status ~= "Engaged" then
equip(sets.Idle)
else
equip(modes[mode].set)
end
else
add_to_chat(122, "combat on!")
combat = true
equip(modes[mode].set)
end
elseif args[1] == "thtagged" then
if player.status == "Engaged" then
equip(modes[mode].set)
end
elseif args[1] == "throwing" then
if sets["Throwing"] then
if throwing == false then
throwing = true
equip(sets["Throwing"])
disable("ammo")
AmmoDisabled = true
else
throwing = false
enable("ammo")
AmmoDisabled = false
end
print_throwing()
else
add_to_chat(122, "No Throwing set defined")
end
elseif args[1] == "killer" then
if killer_effect == false then
killer_effect = true
else
killer_effect = false
end
add_to_chat(122, "Killer Effect: " .. tostring(killer_effect))
elseif custom_command and type(custom_command) == 'function' then
custom_command(args)
end
end
function print_mode()
printString = "Current mode: "
for i = 1, 9, 1 do
if i == mode then
printString = printString .. "[" .. i .. ":" .. modes[i].name .. "] "
elseif modes[i] == nil then
break
else
printString = printString .. i .. ":" .. modes[i].name .. " "
end
end
add_to_chat(122, printString)
end
function print_throwing()
if throwing == true then
add_to_chat(122, "Boomerang: On")
else
add_to_chat(122, "Boomerang: Off")
end
end |
-- Do not edit! This file was generated by blocks/signal/complexphase_spec.py
local radio = require('radio')
local jigs = require('tests.jigs')
jigs.TestBlock(radio.ComplexPhaseBlock, {
{
desc = "256 ComplexFloat32 input, 256 Float32 output",
args = {},
inputs = {radio.types.ComplexFloat32.vector_from_array({{-0.73127151, 0.69486749}, {0.52754927, -0.48986191}, {-0.00912983, -0.10101787}, {0.30318594, 0.57744670}, {-0.81228077, -0.94330502}, {0.67153019, -0.13446586}, {0.52456015, -0.99578792}, {-0.10922561, 0.44308007}, {-0.54247558, 0.89054137}, {0.80285490, -0.93882000}, {-0.94910830, 0.08282494}, {0.87829834, -0.23759152}, {-0.56680119, -0.15576684}, {-0.94191837, -0.55661666}, {-0.12422481, -0.00837552}, {-0.53383112, -0.53826690}, {-0.56243795, -0.08079307}, {-0.42043677, -0.95702058}, {0.67515594, 0.11290865}, {0.28458872, -0.62818748}, {0.98508680, 0.71989304}, {-0.75822008, -0.33460963}, {0.44296879, 0.42238355}, {0.87288117, -0.15578599}, {0.66007137, 0.34061113}, {-0.39326301, 0.17516121}, {0.76495802, 0.69239485}, {0.01056764, 0.17800452}, {-0.93094832, -0.51452005}, {0.59480852, -0.17137200}, {-0.65398520, 0.09759752}, {0.40608153, 0.34897169}, {-0.25059396, -0.12207674}, {0.01685298, 0.55688524}, {0.04187684, -0.21348982}, {-0.02061296, -0.94085008}, {-0.91302544, 0.40676415}, {0.96637541, 0.18636747}, {-0.21280062, -0.65930158}, {0.00447712, 0.96415329}, {0.54104626, 0.07923490}, {0.72057962, -0.53564775}, {0.02754333, 0.90493482}, {0.15558961, -0.08173654}, {-0.46144104, 0.09599262}, {0.91423255, -0.98858166}, {0.56731045, 0.64097184}, {0.77235913, 0.48100683}, {0.61827981, 0.03735657}, {0.12271573, -0.14781864}, {-0.88775343, 0.74002033}, {0.13999867, -0.60032117}, {0.00944094, -0.03014978}, {-0.28642008, -0.30784416}, {0.07695759, 0.24697889}, {0.22490492, -0.08370640}, {-0.94405001, -0.54078996}, {-0.64557749, 0.16892174}, {0.72201771, 0.59687787}, {0.59419513, 0.63287473}, {-0.48941192, 0.68348968}, {0.34622705, -0.83353174}, {-0.96661872, -0.97087997}, {0.51117355, -0.50088155}, {-0.78102273, 0.24960417}, {-0.31115428, -0.86096931}, {-0.68074894, 0.05476080}, {-0.66371012, -0.45417112}, {0.42317989, -0.09059674}, {-0.35599643, -0.05245798}, {-0.95273077, -0.22688580}, {-0.15816264, -0.62392139}, {-0.78247666, 0.79963702}, {0.02023196, -0.58181804}, {0.21129727, 0.63407934}, {-0.95836377, -0.96427095}, {-0.70707649, 0.43767095}, {-0.67954481, 0.40921125}, {0.35635161, 0.08940433}, {-0.55880052, 0.95118904}, {0.59562171, 0.03319904}, {-0.55360842, 0.29701284}, {-0.21020398, 0.15169193}, {-0.35750839, 0.26189572}, {-0.88242978, -0.40278813}, {0.93580663, 0.75106847}, {-0.38722676, 0.71702880}, {-0.37927276, 0.87857687}, {0.48768425, -0.16765547}, {-0.49528381, -0.98303950}, {0.75743574, -0.92416686}, {0.63882822, 0.92440224}, {0.14056113, -0.65696579}, {0.73556215, 0.94755048}, {0.40804628, 0.01774749}, {-0.24406233, -0.30613822}, {-0.58847648, 0.34830603}, {-0.13409975, -0.61176270}, {-0.79115158, 0.33191505}, {-0.40785465, -0.00040016}, {-0.34930867, 0.74324304}, {0.79935658, -0.96381402}, {-0.59829396, -0.34451860}, {0.97409946, 0.56540078}, {-0.32180870, -0.57394040}, {0.34891015, 0.67540216}, {0.86437494, -0.31230038}, {0.76478642, 0.37422037}, {-0.03100256, 0.97101647}, {-0.53071910, 0.45093039}, {-0.83063954, -0.66061169}, {0.82197559, -0.57406360}, {0.51823235, 0.20041765}, {0.68226439, -0.26378399}, {-0.31942952, -0.41756943}, {0.73483962, 0.20796506}, {0.90861493, 0.77453023}, {-0.72930807, 0.10234095}, {-0.79145002, -0.92172438}, {-0.85361314, 0.73233670}, {0.57623291, 0.65701193}, {-0.31820506, 0.23037209}, {0.56380719, -0.24392074}, {0.14156306, -0.55257183}, {-0.83651346, -0.46655273}, {0.78153634, 0.12889367}, {0.85013437, -0.08446148}, {-0.44563445, 0.57402933}, {0.65553629, -0.97523654}, {0.34082329, -0.81663376}, {-0.76979506, 0.77012014}, {-0.91995299, -0.52073330}, {0.97631699, -0.15797283}, {-0.76888371, -0.66523314}, {-0.51715940, 0.48801285}, {-0.79433179, 0.82152885}, {-0.24344546, 0.94052809}, {0.81844544, -0.41195285}, {-0.49317971, -0.04597981}, {-0.79974169, 0.30410039}, {-0.92075950, -0.97898769}, {0.96516722, -0.40890029}, {0.19314128, -0.10031093}, {-0.37343827, -0.87407041}, {0.82678401, 0.93962657}, {0.93959302, -0.77727538}, {-0.56961346, 0.23561376}, {0.95990574, 0.08582640}, {0.37637961, 0.32366887}, {-0.48182800, 0.08320452}, {-0.38535777, -0.50723761}, {-0.83726245, -0.43842655}, {0.96675342, -0.10419552}, {0.30402106, 0.28693217}, {0.88146901, -0.21904290}, {-0.38643140, -0.34551716}, {-0.36652973, 0.69426954}, {0.78700048, -0.39438137}, {-0.33133319, 0.08845083}, {0.15797088, 0.19192508}, {-0.50980401, -0.95925194}, {-0.51248139, -0.85534495}, {0.10240951, -0.85816729}, {-0.84974039, 0.27076420}, {-0.41835687, 0.58436954}, {-0.01347791, 0.72529793}, {-0.69164079, 0.00285917}, {0.58996701, -0.84578598}, {0.89845592, -0.65351576}, {0.55241799, 0.96979177}, {0.64310026, -0.36043200}, {-0.78624445, 0.02871650}, {0.83871394, -0.41302100}, {0.78751761, -0.71663874}, {0.82096338, -0.93648010}, {-0.36786264, 0.80617654}, {0.60771257, 0.81430751}, {0.68143702, 0.49236977}, {0.37919036, -0.64369029}, {-0.13472399, -0.68420619}, {0.42964891, 0.33555749}, {-0.49482721, -0.87117159}, {0.92677176, 0.61650527}, {0.09853987, 0.08275530}, {0.70258534, -0.09338064}, {-0.20857909, -0.32266170}, {-0.48406181, -0.95118302}, {0.29287767, -0.16663224}, {0.14120726, -0.87535673}, {-0.29011312, -0.72343177}, {-0.74974197, -0.48177409}, {0.65786874, -0.20440537}, {-0.19783570, 0.22488984}, {-0.53294069, -0.98504567}, {0.05740348, 0.00179924}, {0.29767919, -0.12336609}, {0.37302625, 0.46284387}, {-0.52325064, -0.00985550}, {-0.04234622, -0.54987586}, {-0.17550774, 0.12081487}, {0.81387901, 0.83541310}, {-0.44954929, 0.29283035}, {-0.90360534, -0.85689718}, {0.02338342, 0.75484818}, {-0.68106455, 0.53205574}, {0.76601923, -0.37639597}, {0.38511392, 0.69798225}, {-0.25677133, 0.40256533}, {0.47283623, 0.18915559}, {0.71255422, 0.79320872}, {0.92015761, 0.14246538}, {-0.64744818, -0.49880919}, {-0.56476265, 0.13903470}, {0.51550025, -0.89573354}, {0.36327291, 0.43430653}, {-0.30403697, 0.03011161}, {-0.67040372, 0.45979229}, {-0.91858262, 0.96244210}, {0.61588746, 0.25689700}, {-0.46494752, 0.82572573}, {0.91887766, -0.72174770}, {0.55151451, 0.68386173}, {0.31943470, 0.40081555}, {-0.10988253, 0.84861559}, {0.94241506, -0.23529337}, {0.60542303, -0.13415682}, {-0.67049158, -0.34906545}, {-0.74733984, 0.81776953}, {0.91884816, -0.76162654}, {0.20135815, -0.18355180}, {-0.76381993, -0.40904897}, {-0.50356728, 0.49915361}, {-0.99198210, -0.62032259}, {-0.12245386, -0.95793062}, {0.25505316, 0.21125507}, {0.67066473, -0.58678836}, {-0.43043676, 0.08467886}, {-0.45354861, 0.17147619}, {-0.49823555, 0.36705431}, {0.58218145, 0.61730921}, {0.94723225, 0.09075401}, {-0.01838144, 0.71139538}, {0.53813475, 0.14108926}, {-0.23348723, -0.43190512}, {-0.78372163, 0.61509818}, {-0.76385695, 0.49453047}, {0.09057418, 0.92989063}, {0.52213132, 0.94703954}, {-0.72681195, 0.00074295}, {0.14515658, -0.37749708}, {0.00606498, -0.28636247}, {0.05678794, -0.99831057}, {-0.11537134, -0.10089571}, {-0.39040163, -0.20119449}, {0.56617463, 0.36682576}, {-0.01540173, 0.29533648}})},
outputs = {radio.types.Float32.vector_from_array({2.38171530, -0.74837267, -1.66092980, 1.08731341, -2.28169990, -0.19762439, -1.08595574, 1.81249166, 2.11791849, -0.86330587, 3.05454707, -0.26419032, -2.87339616, -2.60786200, -3.07427216, -2.35205698, -2.99892068, -1.98473203, 0.16570008, -1.14542425, 0.63109386, -2.72598934, 0.76161438, -0.17661376, 0.47638264, 2.72256660, 0.73564816, 1.51149869, -2.63669133, -0.28051582, 2.99345088, 0.70990509, -2.68827820, 1.54054260, -1.37710178, -1.59270167, 2.72247696, 0.19051316, -1.88300693, 1.56615281, 0.14541388, -0.63923585, 1.54036891, -0.48370895, 2.93649006, -0.82445157, 0.84628654, 0.55699855, 0.06034680, -0.87792331, 2.44670439, -1.34168494, -1.26733339, -2.32015872, 1.26873541, -0.35630107, -2.62138295, 2.88567042, 0.69079906, 0.81690967, 2.19221234, -1.17710757, -2.35399532, -0.77522910, 2.83226490, -1.91759074, 3.06132340, -2.54148746, -0.21090205, -2.99529004, -2.90780473, -1.81906414, 2.34534836, -1.53603661, 1.24913454, -2.35312200, 2.58732915, 2.59956861, 0.24581422, 2.10195589, 0.05568085, 2.64917040, 2.51648927, 2.50934792, -2.71338511, 0.67631787, 2.06596327, 1.97831964, -0.33112177, -2.03750229, -0.88422531, 0.96608770, -1.36001921, 0.91068864, 0.04346642, -2.24384546, 2.60716701, -1.78658557, 2.74436069, -3.14061141, 2.01013994, -0.87840277, -2.61913109, 0.52590871, -2.08181763, 1.09396017, -0.34670770, 0.45506197, 1.60271335, 2.43729639, -2.46972132, -0.60964799, 0.36901742, -0.36892781, -2.22381163, 0.27579528, 0.70590287, 3.00217700, -2.28029799, 2.43251514, 0.85080594, 2.51495743, -0.40831679, -1.32000089, -2.63283038, 0.16345210, -0.09902579, 2.23093486, -0.97898525, -1.17542183, 2.35598326, -2.62651563, -0.16041456, -2.42834377, 2.38518286, 2.33936477, 1.82407665, -0.46631268, -3.04863000, 2.77822876, -2.32555366, -0.40073293, -0.47901976, -1.97456312, 0.84919387, -0.69113547, 2.74938488, 0.08917414, 0.71024412, 2.97059393, -2.22048831, -2.65921021, -0.10736435, 0.75648874, -0.24356410, -2.41203403, 2.05654192, -0.46454290, 2.88072181, 0.88213611, -2.05929399, -2.11059189, -1.45202291, 2.83312082, 2.19212151, 1.58937669, 3.13745880, -0.96172529, -0.62886417, 1.05301058, -0.51083845, 3.10508537, -0.45758587, -0.73831099, -0.85103369, 1.99888134, 0.92967147, 0.62569797, -1.03843880, -1.76521468, 0.66305017, -2.08735561, 0.58699900, 0.69855160, -0.13213560, -2.14465976, -2.04154253, -0.51727432, -1.41086018, -1.95218468, -2.57044673, -0.30125186, 2.29228234, -2.06672764, 0.03133349, -0.39288068, 0.89244145, -3.12275982, -1.64765513, 2.53871250, 0.79845399, 2.56424332, -2.38271952, 1.53982854, 2.47841334, -0.45671675, 1.06660807, 2.13857412, 0.38054484, 0.83891088, 0.15360750, -2.48514819, 2.90021014, -1.04858160, 0.87422532, 3.04287529, 2.54043078, 2.33288193, 0.39517459, 2.08362436, -0.66581607, 0.89212221, 0.89791065, 1.69956434, -0.24466865, -0.21806818, -2.66159248, 2.31122494, -0.69211185, -0.73917001, -2.64992619, 2.36059618, -2.58275151, -1.69793844, 0.69174773, -0.71879345, 2.94734550, 2.78012729, 2.50665259, 0.81467533, 0.09551811, 1.59662914, 0.25641084, -2.06639290, 2.47616267, 2.56703854, 1.47369957, 1.06693256, 3.14057040, -1.20370233, -1.54962015, -1.51397347, -2.42302895, -2.66573858, 0.57489902, 1.62289882})}
},
}, {epsilon = 1.0e-06})
|
function mainm.init()
connectm.init()
--hostm.init()
localm.init()
optionsm.init()
mapm.init()
modsm.init()
gui_load_gss("menu-common")
gui_load_gss("main-menu")
local menu = gui_group({id = "menu", group = "main"})
local title = gui_button({id = "titlehax", label = "Gusanos Menu"})
local continueBtn = gui_button({id = "continue", label = "X"})
local win = gui_window({id = "win"})
local localBtn = gui_button({id = "split", label = "Practice"})
local connectBtn = gui_button({id = "multi", label = "Multiplayer"})
local optionsBtn = gui_button({id = "options", label = "Options"})
local modsBtn = gui_button({id = "mods", label = "Mods"})
local quitBtn = gui_button({id = "exit", label = "Quit"})
win:add({connectBtn, quitBtn, localBtn, optionsBtn, modsBtn})
menu:add({win})
gui_root():add(menu)
local status = gui_label({id = "status"})
--status:set_visibility(true)
--gui_root():add(status)
msgm.init()
local function showStatus(txt)
status:set_visibility(true)
status:set_text(txt)
end
local function hideStatus()
status:set_visibility(false)
end
function bindings.transferUpdate(file, bps, done, size)
msgm.show("Recieving " .. file .. ", " .. floor(100 * done / size) .. "%, " .. round(bps/1000, 2) .. " kB/s")
end
function bindings.transferFinished()
hideStatus()
end
function bindings.gameError(err)
if err == Error.MapLoading then
msgm.show("Could not load map")
elseif err == Error.ModLoading then
msgm.show("Could not load mod")
elseif err == Error.MapNotFound then
msgm.show("Could not find the map")
elseif err == Error.ModNotFound then
msgm.show("Could not find the mod")
end
end
function bindings.networkStateChange(state)
if state == Network.Connecting then
msgm.show("Connecting...")
elseif state == Network.Disconnecting then
if wrongPassword then
msgm.show("Incorrect password")
wrongPassword = false
else
msgm.show("Disconnecting...")
end
elseif state == Network.Disconnected then
msgm.show("Disconnected")
end
end
function bindings.gameEnded(reason)
if reason == EndReason.ServerQuit then
msgm.show("Server disconnected")
elseif reason == EndReason.ServerChangeMap then
msgm.show("Server is changing map...")
elseif reason == EndReason.Kicked then
if tooManyPlayers then
msgm.show("Too many players...")
tooManyPlayers = false
else
msgm.show("You got kicked from the server")
end
elseif reason == EndReason.IncompatibleProtocol then
msgm.show("Your version of gusanos isn't compatible with the server's")
elseif reason == EndReason.IncompatibleData then
msgm.show("Your promode is incompatible with the server's")
end
end
--[[
local menu = gui_load_xml("main-menu")
local win = menu:child("main-win")
local connectBtn = win:child("main-connect")
local hostBtn = win:child("main-host")
local quitBtn = win:child("main-quit")
local continueBtn = menu:child("main-continue")
local options = gui_group({id = "options"})
gui_root():add(options)
local function make_key_control(w, name)
local k = console_key_for_action(name)
w:set_lock(true)
w:set_text(key_name(k))
function w:onKeyDown(newk)
if self:is_active() then
local oldaction = console_action_for_key(newk)
if oldaction then
self:set_text("Used by " .. oldaction)
else
local n = key_name(newk)
console_bind(newk, name)
console_bind(k, nil) -- Unbind old
self:set_text(n)
self:deactivate()
k = newk
end
return true
end
end
end
for _, v in ipairs({"+P0_FIRE", "+P0_CHANGE", "+P0_JUMP"}) do
local t = gui_edit()
options:add({t})
make_key_control(t, v)
end
]]
function mainm.isShown()
return connectm.isShown() or menu:is_visible()
end
function mainm.show()
if not menu:is_visible() then
menu:set_visibility(true)
menu:focus()
win:focus()
connectBtn:focus()
end
end
function mainm.hide()
menu:set_visibility(false)
end
function continueBtn:onAction()
if map_is_loaded() then
mainm.hide()
end
end
function localBtn:onAction()
console.game = "promode"
mainm.hide()
localm.show()
end
function optionsBtn:onAction()
mainm.hide()
optionsm.show()
end
function modsBtn:onAction()
mainm.hide()
modsm.show()
end
function connectBtn:onAction()
mainm.hide()
connectm.show()
end
function quitBtn:onAction()
quit()
end
function menu:onKeyDown(k)
if k == Keys.ESC and map_is_loaded() then
if (not firstLoad) then
mainm.hide()
end
return true
end
end
if map_is_loaded() then
mainm.hide()
else
mainm.show()
end
function bindings.gameEnded()
mainm.show()
end
end
|
-- See LICENSE for terms
local options
local UpdateRate
-- fired when settings are changed/init
local function ModOptions()
UpdateRate()
if not GameState.gameplay then
return
end
-- update spawn times
local CalcNextSpawnProject = CalcNextSpawnProject
local day = UICity.day
local g_SpecialProjectNextSpawn = g_SpecialProjectNextSpawn
for id, item in pairs(g_SpecialProjectNextSpawn) do
-- if the next spawn time is larger then the max option then recalc
if item.day > (day + options:GetProperty(id .. "_Max")) then
CalcNextSpawnProject(id)
end
end
end
-- load default/saved settings
function OnMsg.ModsReloaded()
options = CurrentModOptions
ModOptions()
end
-- fired when option is changed
function OnMsg.ApplyModOptions(id)
if id ~= CurrentModId then
return
end
ModOptions()
end
UpdateRate = function()
-- ClassesPostprocess fires earlier than ModsReloaded (well probably just for me)
if not options then
return
end
local POIPresets = POIPresets
for id, poi in pairs(POIPresets) do
poi.spawn_period.from = options:GetProperty(id .. "_Min")
poi.spawn_period.to = options:GetProperty(id .. "_Max")
end
end
OnMsg.ClassesPostprocess = UpdateRate
-- could do load game, but I think from mod options is better
--~ OnMsg.LoadGame = UpdateRate
|
-- This file validates player input
net.Receive("job_exam_submit_exam", function(len, ply)
local ent = net.ReadEntity()
if ent.Config.LimitToJob and ply:Team() ~= ent.Config.LimitToJob then return end
if xWhitelist.Users[ply:SteamID64()].whitelist[ent.Config.Whitelist] then return end
if xWhitelist.Users[ply:SteamID64()].blacklist[ent.Config.Whitelist] then XYZShit.Msg("Exam", Color(33, 80, 118), "You're blacklisted!", ply) return end
if ent.Chances[ply:SteamID64()] and ent.Chances[ply:SteamID64()] >= 3 then ply:changeTeam(GAMEMODE.DefaultTeam, true) return end
if not licensedUsers[ply:SteamID64()] then return end
local exam_answers = net.ReadTable()
local score = 0 -- The score AKA the amount of correct answers.
for k, v in SortedPairs( exam_answers ) do
if ent.Config.Questions[k].CorrectAnswer == v then
score = score + 1
end
end
-- Loop finished, time to check final results!
if score >= ent.Config.AmountCorrectToPass then
hook.Run("JobExamPassed", ply, ent)
-- The player passed the exam, give whitelists
XYZShit.Msg("Exam", Color(33, 80, 118), string.format("You passed the exam. You got %s answers correct (out of the required %s). You are now a "..team.GetName(ent.Config.Team)..".", score, ent.Config.AmountCorrectToPass), ply)
XYZShit.Msg("Exam", Color(33, 80, 118), "Please join the relevant Discord: https://discord.gg/"..ent.Config.DInvite..".", ply)
xWhitelist.Core.AddWhitelist(ply:SteamID64(), ent.Config.Whitelist)
XYZShit.Webhook.Post(ent.Config.Webhook, nil, string.format("%s (%s) passed the exam. They got %s answers correct (out of the required %s).", string.gsub(ply:Nick(), "@", ""), ply:SteamID64(), score, ent.Config.AmountCorrectToPass))
ply:changeTeam(ent.Config.Team, true)
else
if ent.Chances[ply:SteamID64()] then
ent.Chances[ply:SteamID64()] = ent.Chances[ply:SteamID64()] + 1
if ent.Chances[ply:SteamID64()] == 3 then ply:changeTeam(GAMEMODE.DefaultTeam, true) end -- Failed 3 times, change team
else
ent.Chances[ply:SteamID64()] = 1
end
-- The player didn't pass the exam...
XYZShit.Webhook.Post(ent.Config.Webhook, nil, string.format("%s (%s) failed the exam. They got %s answers correct (out of the required %s).", string.gsub(ply:Nick(), "@", ""), ply:SteamID64(), score, ent.Config.AmountCorrectToPass))
XYZShit.Msg("Exam", Color(33, 80, 118), string.format("You failed the exam. You got %s answers correct (out of the required %s).", score, ent.Config.AmountCorrectToPass), ply)
end
end)
hook.Add("xWhitelistUnwhitelist", "JobExamSetToMaxChancesOnDemo", function(ply, steamid, jobName, jobTbl)
-- TODO: better way of handling this
if jobName == "Police Officer" then
for k, v in ipairs(ents.FindByClass("police_exam_npc")) do
v.Chances[steamid] = 3
end
elseif jobName == "Candidate Firefighter" then
for k, v in ipairs(ents.FindByClass("fr_exam_npc")) do
v.Chances[steamid] = 3
end
end
end) |
--------------------------------------------------------------------------------
function Spawn( entityKeyValues )
if not IsServer() then
return
end
if thisEntity == nil then
return
end
hBladeFuryAbility = thisEntity:FindAbilityByName( "creature_juggernaut_blade_fury" )
thisEntity:SetContextThink( "JuggernautThink", JuggernautThink, 1 )
end
--------------------------------------------------------------------------------
function JuggernautThink()
if GameRules:IsGamePaused() == true then
return 0.5
end
local flEarlyReturn = InitialRoomMobLogic( thisEntity )
if flEarlyReturn ~= nil then
return flEarlyReturn
end
local hClosestPlayer = GetClosestPlayerInRoomOrReturnToSpawn( thisEntity )
if hClosestPlayer == nil then
return 0.5
end
--[[
if thisEntity.bRunningAway then
local vRandomDestination = thisEntity:GetAbsOrigin() + RandomVector( 800 )
MoveOrder( thisEntity, vRandomDestination )
return 5.0
end
]]
if thisEntity.stage and thisEntity.stage == 2 then
if hBladeFuryAbility and hBladeFuryAbility:IsCooldownReady() then
CastBladeFuryAbility()
--[[
local vRandomDestination = thisEntity:GetAbsOrigin() + RandomVector( 800 )
MoveOrder( thisEntity, vRandomDestination )
-- @todo: say something funny as I run away
thisEntity.bRunningAway = true
]]
return 5.0
end
end
return 0.5
end
--------------------------------------------------------------------------------
function CastBladeFuryAbility()
ExecuteOrderFromTable({
UnitIndex = thisEntity:entindex(),
OrderType = DOTA_UNIT_ORDER_CAST_NO_TARGET,
AbilityIndex = hBladeFuryAbility:entindex()
})
end
--------------------------------------------------------------------------------
|
--[[Notas do programador:
Esta macro está comentada em pt-br pelo publico que ela tem como alvo
Desculpe, mas não segui as convensões de cleanCode do Lua como "is_X" para bool
OS COMENTÁRIOS DA VERSÃO 'B' FORAM REMOVIDOS POR SEREM OBSOLETOS, VEJA A VERSÃO 'A' PARA UMA VERSÃO
COM COMENTÁRIOS PARA INICIANTES EM PROGRAMAÇÃO (e ser integrada com a ficha)
se quiser me contactar por qualquer motivo (relacionado ou não com esta macro),
meu email é: [matheusberaldodias@gmail.com]
]]
local quantidadeExplodida = 0
local minimo = 10
local modificadorDadoADado = 0
local explodir = false
local asterisco = false
local barra = false
local plus = false
local mensagem = "Rolando..."
local mensagemCritico = " yeeeey"
local input = parameter
local quantidade = tonumber(arg[1])
local DadosRolados = {}
local Apostas = {Conjuntos = {}, Total = 0}
local posicaoAsterisco = string.find(input,"*")
local posicaoBarra = string.find(input,"/")
local posicaoPlus = string.find(input, "+")
if input == "easteregg" then enviar("easteregg")end;
function EnviarTutorial()
escrever([[
[§B][§K10]Comando: "/7s Dados +x/z*"
[Dados]A quantidade de dados rolados
[§K11][+x] Para vantagens como "Liceu", soma "x" em todo dado rolado
[/z] "z" será o número mínimo para gerar aposta (padrão: 10)
[*] Explodir dados 10
[§K2][Atenção!] Siga a ordem para evitar erros, mas apenas caso algum dos dois primeiros não for determinado, aparecerá um popup"
[§K15][V1.0b]
]]);
end;
function CalcularApostas()
minimo = tonumber(minimo)
TirarUm();
if #DadosRolados>2 then
for i=0, #DadosRolados/2 do
TirarPar();
end;
end;
if #DadosRolados>2 then
for i=1, #DadosRolados/3 do
TirarTrio();
end;
end;
end;
function TirarUm()
table.sort(DadosRolados)
for i=#DadosRolados, 1, -1 do
if DadosRolados[i] >= minimo then
Apostas.Total = Apostas.Total+1
table.insert(Apostas.Conjuntos, 1, math.floor(DadosRolados[i]))
table.remove(DadosRolados, i)
end;
end;
end;
function TirarPar()
for i=#DadosRolados, 1, -1 do
for j=1, i-1, 1 do
soma = DadosRolados[j]+DadosRolados[i]
if soma >= minimo then
Apostas.Total = Apostas.Total+1
table.insert(Apostas.Conjuntos, 1, DadosRolados[i].. " + ".. DadosRolados[j])
table.remove(DadosRolados, i)
table.remove(DadosRolados, j)
return;
end;
end;
end;
end;
if input == "easteregg" then enviar("anticopia") end;
function TirarTrio()
for i=#DadosRolados, 1, -1 do
for j=1, i-2, 1 do
if #DadosRolados > 2 then
for k=j+1, i-1, 1 do
if DadosRolados[j]~= null and DadosRolados[k]~= null and DadosRolados[i] ~= null then
soma = DadosRolados[j]+DadosRolados[k]+DadosRolados[i]
if soma >= minimo then
Apostas.Total = Apostas.Total+1
table.insert(Apostas.Conjuntos, 1, DadosRolados[i].." + ".. DadosRolados[k].. " + ".. DadosRolados[j])
table.remove(DadosRolados, i)
table.remove(DadosRolados, j)
table.remove(DadosRolados, k)
end;
end;
end;
end;
end;
end;
end;
function RerolarDado()
antigoDado = DadosRolados[1]
table.remove(DadosRolados, 1 )
novoDado = rolar("1d10","rerolando pela perícia de nível maior que 3")
table.insert( DadosRolados, math.floor(novoDado+modificadorDadoADado))
table.sort(DadosRolados);
enviar("[§K11](" ..antigoDado-modificadorDadoADado.. "->" ..novoDado..")")
CalcularApostas();
end;
if input == "easteregg" then enviar("matheusberaldodias@gmail.com") return; end;
if posicaoAsterisco ~= null then
asterisco = true
end;
if posicaoBarra ~= null then
barra = true
end;
if posicaoPlus ~= null then
plus = true
end;
if input == "help" then
EnviarTutorial()
return;
end;
if tonumber(quantidade) == nil then
enviar("[§K4] Woopsie owo, looks like yuwu tipped wwong >///<") --Retirar este texto uwu caso você não goste da piada.
return;
elseif (tonumber(quantidade)>0)==false then
enviar("[§K4] Woopsie owo, looks like yuwu tipped wwong >///<") --Retirar este texto uwu caso você não goste da piada.
return;
end;
if plus == true then
modificadorDadoADado = tonumber(string.sub(input,posicaoPlus+1,posicaoPlus+1))
end;
if asterisco == true then
explodir = true;
input = string.sub(input,0,posicaoAsterisco-1)
end;
if barra == true then
local tamanhoInput = string.len(input)
minimo = string.sub(input,posicaoBarra+1,tamanhoInput)
end;
strRolagem = quantidade.."d10"
resultado, dado = rolar(strRolagem, mensagem);
for i=1, quantidade, 1 do
DadosRolados[i] = (math.floor(dado.ops[1].resultados[i]));
table.sort(DadosRolados);
end;
if explodir == true then
for k=1, quantidade, 1 do
if DadosRolados[k] == 10 then
quantidadeExplodida = quantidadeExplodida+1
end;
end;
if quantidadeExplodida~=0 then
resultado, dadoExpl = rolar(quantidadeExplodida.."d10", "Explosões ".. mensagemCritico);
end;
for i=1, quantidadeExplodida, 1 do
table.insert(DadosRolados, 1, math.floor(dadoExpl.ops[1].resultados[i]))
end;
end;
table.sort(DadosRolados);
for j=1, quantidade+quantidadeExplodida, 1 do
DadosRolados[j] = math.floor(DadosRolados[j]+modificadorDadoADado);
end;
CalcularApostas();
enviar("[§K10]Apostas: [§K11]".. Apostas.Total);
wait(10)
if modificadorDadoADado ~= 0 then
enviar("[§K10][+"..modificadorDadoADado.."] Conjuntos:[§K11] ".. string.sub(utils.tableToStr(Apostas.Conjuntos),2,-2))
wait(10)
enviar("[§K10][+"..modificadorDadoADado.."] Dados Sobrando:[§K11] ".. string.sub(utils.tableToStr(DadosRolados),2,-2))
else
enviar("[§K10]Conjuntos:[§K11] ".. string.sub(utils.tableToStr(Apostas.Conjuntos),2,-2))
wait(10)
enviar("[§K10]Dados Sobrando:[§K11] ".. string.sub(utils.tableToStr(DadosRolados),2,-2))
end;
--Versão 1.0b
--[[Atualizações desde a 0.5:
-Agora ela reconhece trios de dados
-Ela foi fortemente otimizada na hora de combinar dados, agora demanda menos da metade
das combinações de antes
-Foi limpa
]]
|
local API = {
LoveVersion = love.getVersion();
};
local ImageCache = {};
--I'm not sure if Love2D automatically caches objects, but assuming that the wiki said loading an image continously can cause fps drops, I guess not.
API.loadImage = function(self, path) --if the image changes then it will not return the same image
if (ImageCache[path] == nil) then
local Image = love.graphics.newImage(path);
ImageCache[path] = Image;
return Image;
end;
return ImageCache[path];
end;
API.reloadImage = function(self, path)
local Image = love.graphics.newImage(path);
ImageCache[path] = Image;
return Image;
end;
API.getCacheImage = function(self, path)
return ImageCache[path];
end;
Application = API; |
return {
IntroMusic = love.audio.newSource("assets/sounds/intro.flac", "static"),
TitleMusic = love.audio.newSource("assets/sounds/title&menu.flac", "static")
}
|
function SpawnPoints()
return {
Metalworker = {
{ worldX = 10 + 25, worldY = 4 + 56, posX = 229, posY = 263, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 254, posY = 131, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 13, posY = 100, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 58, posX = 180, posY = 155, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 28, worldY = 4 + 59, posX = 210, posY = 168, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
burgerflipper = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 127, posY = 143, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 72, posY = 117, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 58, posX = 30, posY = 141, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 261, posY = 96, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 193, posY = 85, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
burglar = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 170, posY = 283, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 277, posY = 97, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 19, posY = 89, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
carpenter = {
{ worldX = 10 + 25, worldY = 4 + 56, posX = 229, posY = 263, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 285, posY = 63, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 278, posY = 258, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 168, posY = 251, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 97, posY = 247, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 155, posY = 167, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 60, posX = 269, posY = 203, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 243, posY = 130, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 39, posY = 36, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 162, posY = 88, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
chef = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 57, posX = 208, posY = 166, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 198, posY = 147, posZ = 1 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 149, posY = 124, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 58, posX = 27, posY = 138, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 170, posY = 283, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 219, posY = 109, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
constructionworker = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 285, posY = 63, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 278, posY = 258, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 168, posY = 251, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 155, posY = 167, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 60, posX = 51, posY = 191, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 218, posY = 111, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 40, posY = 42, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 150, posY = 93, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
doctor = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 57, posX = 178, posY = 123, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 198, posY = 147, posZ = 1 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 149, posY = 124, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 77, posY = 39, posZ = 2 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 97, posY = 61, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
electrician = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 198, posY = 147, posZ = 1 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 149, posY = 124, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 13, posY = 100, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 58, posX = 67, posY = 140, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 27, worldY = 4 + 59, posX = 212, posY = 155, posZ = 5 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 168, posY = 251, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 255, posY = 288, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 216, posY = 132, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 243, posY = 130, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
engineer = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 230, posY = 236, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 288, posY = 41, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 198, posY = 147, posZ = 1 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 149, posY = 124, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 224, posY = 70, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 27, worldY = 4 + 59, posX = 212, posY = 155, posZ = 5 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 168, posY = 251, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 26, posY = 149, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
farmer = {
{ worldX = 10 + 25, worldY = 4 + 55, posX = 128, posY = 228, posZ = 1 },
{ worldX = 10 + 25, worldY = 4 + 56, posX = 229, posY = 263, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 57, posX = 187, posY = 45, posZ = 3 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 205, posY = 141, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 278, posY = 258, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 13, posY = 100, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 284, posY = 30, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 26, worldY = 4 + 59, posX = 79, posY = 154, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 24, posY = 249, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 17, posY = 16, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 260, posY = 256, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 60, posX = 54, posY = 192, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 243, posY = 130, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
fireofficer = {
{ worldX = 10 + 29, worldY = 4 + 55, posX = 196, posY = 26, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 127, posY = 143, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 128, posY = 233, posZ = 0 },
{ worldX = 10 + 35, worldY = 4 + 60, posX = 113, posY = 157, posZ = 4 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
fisherman = {
{ worldX = 10 + 25, worldY = 4 + 55, posX = 128, posY = 228, posZ = 1 },
{ worldX = 10 + 25, worldY = 4 + 56, posX = 229, posY = 263, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 127, posY = 143, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 13, posY = 100, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 243, posY = 130, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 77, posY = 39, posZ = 2 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
fitnessinstructor = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 57, posX = 233, posY = 157, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 198, posY = 147, posZ = 1 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 149, posY = 124, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 255, posY = 288, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 243, posY = 130, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
lumberjack = {
{ worldX = 10 + 25, worldY = 4 + 56, posX = 229, posY = 263, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 127, posY = 143, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 58, posX = 146, posY = 163, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 255, posY = 288, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 60, posX = 269, posY = 203, posZ = 0 },
{ worldX = 10 + 35, worldY = 4 + 60, posX = 113, posY = 157, posZ = 4 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 243, posY = 130, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 182, posY = 147, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
nurse = {
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 57, posX = 178, posY = 123, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 170, posY = 283, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
parkranger = {
{ worldX = 10 + 29, worldY = 4 + 55, posX = 196, posY = 26, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 60, posX = 269, posY = 203, posZ = 0 },
{ worldX = 10 + 35, worldY = 4 + 60, posX = 113, posY = 157, posZ = 4 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
policeofficer = {
{ worldX = 10 + 29, worldY = 4 + 55, posX = 196, posY = 26, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 127, posY = 143, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 35, worldY = 4 + 60, posX = 113, posY = 157, posZ = 4 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 130, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
repairman = {
{ worldX = 10 + 25, worldY = 4 + 56, posX = 229, posY = 263, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 57, posX = 187, posY = 45, posZ = 3 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 178, posY = 133, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 27, worldY = 4 + 58, posX = 67, posY = 140, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 58, posX = 110, posY = 52, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 34, worldY = 4 + 59, posX = 184, posY = 252, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 77, posY = 39, posZ = 2 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
securityguard = {
{ worldX = 10 + 29, worldY = 4 + 55, posX = 196, posY = 26, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 181, posY = 125, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 28, worldY = 4 + 59, posX = 100, posY = 53, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 229, posY = 55, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
unemployed = {
{ worldX = 10 + 25, worldY = 4 + 56, posX = 229, posY = 263, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 198, posY = 147, posZ = 1 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 26, worldY = 4 + 59, posX = 6, posY = 75, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 59, posX = 36, posY = 98, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 195, posY = 91, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 243, posY = 130, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 127, posY = 37, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 124, posY = 143, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
},
veteran = {
{ worldX = 10 + 29, worldY = 4 + 55, posX = 196, posY = 26, posZ = 0 },
{ worldX = 10 + 25, worldY = 4 + 56, posX = 229, posY = 263, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 56, posX = 50, posY = 154, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 127, posY = 143, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 149, posY = 124, posZ = 0 },
{ worldX = 10 + 40, worldY = 4 + 57, posX = 146, posY = 226, posZ = 0 },
{ worldX = 10 + 26, worldY = 4 + 58, posX = 13, posY = 100, posZ = 0 },
{ worldX = 10 + 28, worldY = 4 + 58, posX = 182, posY = 55, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 118, posY = 218, posZ = 1 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 247, posY = 168, posZ = 0 },
{ worldX = 10 + 29, worldY = 4 + 59, posX = 222, posY = 115, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 59, posX = 118, posY = 161, posZ = 0 },
{ worldX = 10 + 35, worldY = 4 + 60, posX = 113, posY = 157, posZ = 4 },
{ worldX = 10 + 37, worldY = 4 + 60, posX = 243, posY = 130, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 86, posY = 57, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 157, posY = 147, posZ = 0 },
{ worldX = 10 + 38, worldY = 4 + 60, posX = 146, posY = 5, posZ = 0 }
}
}
end
|
local Directions = assert(foundation.com.Directions)
local is_blank = assert(foundation.com.is_blank)
local itemstack_split = assert(foundation.com.itemstack_split)
local format_pretty_time = assert(foundation.com.format_pretty_time)
local cluster_devices = assert(yatm.cluster.devices)
local ItemInterface = assert(yatm.items.ItemInterface)
local Energy = assert(yatm.energy)
local grinding_registry = assert(yatm.grinding.grinding_registry)
local fspec = assert(foundation.com.formspec.api)
local function get_auto_grinder_formspec(pos, user)
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
local node_inv_name = "nodemeta:" .. spos
local cio = fspec.calc_inventory_offset
return yatm.formspec_render_split_inv_panel(user, 6, 2, { bg = "machine" }, function (loc, rect)
if loc == "main_body" then
return fspec.list(node_inv_name, "grinder_input", rect.x, rect.y, 1, 1) ..
fspec.list(node_inv_name, "grinder_processing", rect.x + cio(2), rect.y, 1, 1) ..
fspec.list(node_inv_name, "grinder_output", rect.x + cio(4), rect.y, 2, 2)
elseif loc == "footer" then
return fspec.list_ring(node_inv_name, "grinder_input") ..
fspec.list_ring("current_player", "main") ..
fspec.list_ring(node_inv_name, "grinder_output") ..
fspec.list_ring("current_player", "main")
end
return ""
end)
end
local auto_grinder_yatm_network = {
kind = "machine",
groups = {
machine_worker = 1,
energy_consumer = 1,
item_consumer = 1,
item_producer = 1,
},
default_state = "off",
states = {
conflict = "yatm_machines:auto_grinder_error",
error = "yatm_machines:auto_grinder_error",
off = "yatm_machines:auto_grinder_off",
on = "yatm_machines:auto_grinder_on",
},
energy = {
passive_lost = 0,
capacity = 4000,
startup_threshold = 100,
network_charge_bandwidth = 1000,
},
}
local item_interface =
ItemInterface.new_directional(function (self, pos, dir)
local node = minetest.get_node(pos)
local new_dir = Directions.facedir_to_face(node.param2, dir)
if new_dir == Directions.D_UP or new_dir == Directions.D_DOWN then
return "grinder_input"
end
return "grinder_output"
end)
function auto_grinder_yatm_network:work(ctx)
local pos = ctx.pos
local meta = ctx.meta
local node = ctx.node
local inv = meta:get_inventory()
local consumed = 0
if is_blank(meta:get_string("active_recipe")) then
-- check for recipe
local input_stack = inv:get_stack("grinder_input", 1)
local recipe = grinding_registry:find_grinding_recipe(input_stack)
if recipe then
meta:set_string("active_recipe", recipe.name)
meta:set_float("duration", recipe.duration)
meta:set_float("work_time", recipe.duration)
local processing_stack, rest = itemstack_split(input_stack, 1)
inv:add_item("grinder_processing", processing_stack)
inv:set_stack("grinder_input", 1, rest)
yatm.queue_refresh_infotext(pos, node)
else
-- to idle
yatm.devices.set_idle(meta, 1)
end
else
local work_time = meta:get_float("work_time")
work_time = work_time - dtime
if work_time > 0 then
meta:set_float("work_time", work_time)
-- should probably be optional
yatm.queue_refresh_infotext(pos, node)
consumed = consumed + 10
else
local input_stack = inv:get_stack("grinder_processing", 1)
local recipe = grinding_registry:find_grinding_recipe(input_stack)
if recipe then
local room_for_all = true
for _,item_stack in ipairs(recipe.output_item_stacks) do
room_for_all = room_for_all and
inv:room_for_item("grinder_output", item_stack)
end
if room_for_all then
for _,item_stack in ipairs(recipe.output_item_stacks) do
inv:add_item("grinder_output", item_stack)
end
inv:remove_item("grinder_processing", input_stack)
meta:set_string("active_recipe", nil)
meta:set_string("error", nil)
meta:set_float("duration", 0)
meta:set_float("work_time", 0)
yatm.queue_refresh_infotext(pos, node)
else
meta:set_string("error", "output full")
yatm.devices.set_idle(meta, 1)
yatm.queue_refresh_infotext(pos, node)
end
else
inv:add_item("grinder_rejected", input_stack)
inv:remove_item("grinder_processing", input_stack)
meta:set_string("active_recipe", nil)
meta:set_string("error", nil)
meta:set_float("duration", 0)
meta:set_float("work_time", 0)
yatm.queue_refresh_infotext(pos, node)
end
end
end
return consumed
end
local function auto_grinder_refresh_infotext(pos)
local meta = minetest.get_meta(pos)
local recipe_name = meta:get_string("active_recipe") or ""
local work_time = meta:get_float("work_time")
local duration = meta:get_float("duration")
local infotext =
cluster_devices:get_node_infotext(pos) .. "\n" ..
"Energy: " .. Energy.meta_to_infotext(meta, yatm.devices.ENERGY_BUFFER_KEY) .. "\n" ..
"Recipe: " .. recipe_name .. "\n" ..
"Time: " .. format_pretty_time(work_time) .. " / " .. format_pretty_time(duration)
meta:set_string("infotext", infotext)
end
local function auto_grinder_on_construct(pos)
yatm.devices.device_on_construct(pos)
--
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
--
inv:set_size("grinder_input", 1)
inv:set_size("grinder_processing", 1)
inv:set_size("grinder_rejected", 1)
inv:set_size("grinder_output", 4)
end
local function auto_grinder_on_rightclick(pos, node, user)
minetest.show_formspec(
user:get_player_name(),
"yatm_machines:auto_grinder",
get_auto_grinder_formspec(pos, user)
)
end
local groups = {
cracky = 1,
yatm_energy_device = 1,
item_interface_in = 1,
item_interface_out = 1,
}
yatm.devices.register_stateful_network_device({
basename = "yatm_machines:auto_grinder",
description = "Auto Grinder",
groups = groups,
drop = auto_grinder_yatm_network.states.off,
tiles = {
"yatm_auto_grinder_top.off.png",
"yatm_auto_grinder_bottom.png",
"yatm_auto_grinder_side.off.png",
"yatm_auto_grinder_side.off.png^[transformFX",
"yatm_auto_grinder_back.off.png",
"yatm_auto_grinder_front.off.png",
},
paramtype = "none",
paramtype2 = "facedir",
on_construct = auto_grinder_on_construct,
on_rightclick = auto_grinder_on_rightclick,
yatm_network = auto_grinder_yatm_network,
item_interface = item_interface,
refresh_infotext = auto_grinder_refresh_infotext,
}, {
on = {
tiles = {
"yatm_auto_grinder_top.on.png",
"yatm_auto_grinder_bottom.png",
"yatm_auto_grinder_side.on.png",
"yatm_auto_grinder_side.on.png^[transformFX",
"yatm_auto_grinder_back.on.png",
-- "yatm_auto_grinder_front.off.png"
{
name = "yatm_auto_grinder_front.on.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.25
},
},
},
},
error = {
tiles = {
"yatm_auto_grinder_top.error.png",
"yatm_auto_grinder_bottom.png",
"yatm_auto_grinder_side.error.png",
"yatm_auto_grinder_side.error.png^[transformFX",
"yatm_auto_grinder_back.error.png",
"yatm_auto_grinder_front.error.png",
},
},
})
|
local _, ns = ...
local C = ns.C
C["objectivetracker"] = {
enabled = true,
pos = {"TOPRIGHT", "sInterfaceProgressBars", "BOTTOMRIGHT", 0, -10}
}
|
local Atms = Atm.atms
function OnPackageStart()
Delay(5000, function ()
local i = 1
for _ in pairs(Atms) do
local obj = CreatePickup(336, Atms[i].x, Atms[i].y, Atms[i].z - 100)
SetPickupScale(obj, 1.0,1.0,0.5)
SetPickupPropertyValue(obj, "type", "atm", true)
SetPickupPropertyValue(obj, "color", "2aeb3d", true)
i = i + 1
end
end)
end
AddEvent("OnPackageStart", OnPackageStart)
function WithdrawMoney(player, amount)
amount = tonumber(amount)
if GetPlayerBank(player) >= amount then
RemovePlayerBank(player, amount)
AddPlayerMoney(player, amount)
else
CallRemoteEvent(player, "KNotify:Send", "Not enough money on the bank", "#f00")
end
end
AddRemoteEvent("Kuzkay:AtmWithdraw", WithdrawMoney)
function DepositMoney(player, amount)
amount = tonumber(amount)
if GetPlayerMoney(player) >= amount then
RemovePlayerMoney(player, amount)
AddPlayerBank(player, amount)
else
CallRemoteEvent(player, "KNotify:Send", "Not enough cash", "#f00")
end
end
AddRemoteEvent("Kuzkay:AtmDeposit", DepositMoney) |
--[[
If you want to run PlantLife and mods that depend on it, i.e. MoreTrees, Disable the mapgen by
commenting-out the lines starting with "local mgname = " through "end" (I left a note were to start
and stop) Disabling "Snow's" mapgen allows MoreTrees and PlantLife to do their thing until the
issue is figured out. However, the pine and xmas tree code is still needed for when those
saplings grow into trees. --]]
--The *starting* comment looks like this: --[[
--The *closing* comment looks like this: --]]
-- ~ LazyJ, 2014_05_13
-- Part 1: To disable the mapgen, add the *starting* comment under this line.
snow.mapgen = snow.mapgen or {}
local mg = snow.mapgen
-- perlin noise "hills" are not peaks but looking like sinus curve
local function upper_rarity(rarity)
return math.sign(rarity)*math.sin(math.abs(rarity)*math.pi/2)
end
local rarity = snow.mapgen_rarity
local size = snow.mapgen_size
local smooth = snow.smooth_biomes
local nosmooth_rarity, perlin_scale
local function calc_values()
nosmooth_rarity = 1-rarity/50
perlin_scale = size*100/rarity
mg.perlin_scale = perlin_scale
local smooth_rarity_max, smooth_rarity_min, smooth_rarity_dif
if smooth then
local smooth_trans_size = 4 --snow.smooth_trans_size
mg.smooth_rarity_max = upper_rarity(nosmooth_rarity+smooth_trans_size*2/perlin_scale)
mg.smooth_rarity_min = upper_rarity(nosmooth_rarity-smooth_trans_size/perlin_scale)
mg.smooth_rarity_dif = mg.smooth_rarity_max-mg.smooth_rarity_min
end
nosmooth_rarity = upper_rarity(nosmooth_rarity)
mg.nosmooth_rarity = nosmooth_rarity
end
calc_values()
snow.register_on_configuring(function(name, v)
if name == "mapgen_rarity" then
rarity = v
elseif name == "mapgen_size" then
size = v
elseif name == "smooth_biomes" then
smooth = v
else
return
end
-- TODO: if e.g. size and rarity get changed at once, don't calculate the values more times
calc_values()
end)
--Identify the mapgen.
local mgname = minetest.get_mapgen_setting"mg_name"
if not mgname then
minetest.log("error", "[MOD] Snow Biomes: WARNING! mapgen could not be identifyed!")
end
local path = minetest.get_modpath"snow"
if mgname == "v7" then
--Load mapgen_v7 compatibility.
dofile(path.."/src/mapgen_v7.lua")
else
--Load mapgen_v6 compatibility.
dofile(path.."/src/mapgen_v6.lua")
end
-- To complete the commenting-out add the *closing* comment under this line.
local pine_tree = {
axiom="TABff",
rules_a="[&T+f+ff+ff+ff+f]GA",
rules_b="[&T+f+Gf+Gf+Gf]GB",
trunk="default:pinetree",
leaves="snow:needles",
angle=90,
iterations=1,
random_level=0,
trunk_type="single",
thin_branches=true,
}
local xmas_tree = {
axiom="TABff",
rules_a="[&T+f+ff+ff+ff+f]GA",
rules_b="[&T+f+Gf+Gf+Gf]GB",
trunk="default:pinetree",
leaves="snow:needles_decorated",
angle=90,
iterations=1,
random_level=0,
trunk_type="single",
thin_branches=true,
}
--Makes pine tree
function snow.make_pine(pos,snow,xmas)
local minetest = minetest
local try_node = function(pos, node)
local n = minetest.get_node(pos).name
if n == "air"
or n == "ignore" then
minetest.add_node(pos, node)
end
end
if xmas then
minetest.remove_node(pos)
minetest.spawn_tree(pos, xmas_tree)
else
minetest.spawn_tree(pos, pine_tree)
end
if snow then
local x,z = pos.x,pos.z
try_node({x=x+1,y=pos.y+3,z=z+1},{name="default:snow"})
try_node({x=x-1,y=pos.y+3,z=z-1},{name="default:snow"})
try_node({x=x-1,y=pos.y+3,z=z+1},{name="default:snow"})
try_node({x=x+1,y=pos.y+3,z=z-1},{name="default:snow"})
try_node({x=x+1,y=pos.y+5,z=z},{name="default:snow"})
try_node({x=x-1,y=pos.y+5,z=z},{name="default:snow"})
try_node({x=x,y=pos.y+5,z=z+1},{name="default:snow"})
try_node({x=x,y=pos.y+5,z=z-1},{name="default:snow"})
end
if xmas then
try_node({x=pos.x,y=pos.y+7,z=pos.z},{name="snow:star_lit"}) -- Added lit star. ~ LazyJ
elseif snow
and minetest.get_perlin(112,3, 0.5, perlin_scale):get2d({x=pos.x,y=pos.z}) > nosmooth_rarity then
try_node({x=pos.x,y=pos.y+7,z=pos.z},{name="default:snow"})
end
end
--Makes pine tree
function snow.voxelmanip_pine(pos,a,data)
local c_snow = minetest.get_content_id("default:snow")
local c_pine_needles = minetest.get_content_id("snow:needles")
local c_pinetree = minetest.get_content_id("default:pinetree")
local c_air = minetest.get_content_id("air")
local perlin1 = minetest.get_perlin(112,3, 0.5, perlin_scale)
for z = -1,1 do
local z = pos.z + z
for x = -1,1 do
local x = pos.x + x
--Make tree.
for i = 1,2 do
data[a:index(x,pos.y+i,z)] = c_pine_needles
if x ~= 0
and z ~= 0
and perlin1:get2d({x=x,y=z}) > nosmooth_rarity then
local abovenode = a:index(x,pos.y+i+1,z)
data[abovenode] = c_snow
end
end
end
end
for i=3, 4 do
local x = pos.x
local y = pos.y+i
local z = pos.z
data[a:index(x+1,y,z)] = c_pine_needles
data[a:index(x-1,y,z)] = c_pine_needles
data[a:index(x,y,z+1)] = c_pine_needles
data[a:index(x,y,z-1)] = c_pine_needles
if perlin1:get2d({x=x+1,y=z}) > nosmooth_rarity then
data[a:index(x+1,y+1,z)] = c_snow
end
if perlin1:get2d({x=x+1,y=z}) > nosmooth_rarity then
data[a:index(x-1,y+1,z)] = c_snow
end
if perlin1:get2d({x=x,y=z+1}) > nosmooth_rarity then
data[a:index(x,y+1,z+1)] = c_snow
end
if perlin1:get2d({x=x,y=z-1}) > nosmooth_rarity then
data[a:index(x,y+1,z-1)] = c_snow
end
end
for i=0, 4 do
data[a:index(pos.x,pos.y+i,pos.z)] = c_pinetree
end
data[a:index(pos.x,pos.y+5,pos.z)] = c_pine_needles
data[a:index(pos.x,pos.y+6,pos.z)] = c_pine_needles
if perlin1:get2d({x=pos.x,y=pos.z}) > nosmooth_rarity then
data[a:index(pos.x,pos.y+7,pos.z)] = c_snow
end
end
|
--[[ @cond ___LICENSE___
-- Copyright (c) 2017 Zefiros Software.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-- THE SOFTWARE.
--
-- @endcond
--]]
Solver = newclass "Solver"
function Solver:init(loader, root)
self.loader = loader
self.root = root
end
function Solver:solve(lock)
local cost, heuristic, succeeded = math.huge, nil, false
local hasInitial = false
if lock ~= nil then
heuristic = self:getRootSolution()
if heuristic:loadFromLock(lock) then
cost = heuristic:getCost()
hasInitial = true
else
noticef("Current lockfile is invalid, generating a fresh one")
end
end
if not hasInitial then
-- do an initial DFS biased pass to get an upper bound
local rootSolution = self:getRootSolution()
local stack = Stack()
stack:put(rootSolution,rootSolution:getCost())
cost, heuristic, succeeded = self:_branchAndBound(stack, math.huge, nil, 5, false, true)
--print(cost)
end
if (zpm.cli.update() or not lock) and (succeeded or hasInitial) then
-- use a BFS method to optimise
local queue = Queue()
local rootSolution = self:getRootSolution()
queue:put(rootSolution,rootSolution:getCost())
cost, heuristic, succeeded = self:_branchAndBound(queue, cost, heuristic, 5)
--print(cost)
end
return cost, heuristic, succeeded
end
function Solver:_branchAndBound(container, b, best, beam, useCompleteSpace, returnFirst)
if useCompleteSpace == nil then
useCompleteSpace = true
end
if returnFirst == nil then
returnFirst = false
end
--local rejected = 0
local openSolutions = Queue()
while container:getSize() > 0 or openSolutions:getSize() > 0 do
local nextSolution, cost = container:pop()
--print(cost, "@@@@@@@@@@@@@")
--print(table.tostring(nextSolution.tree.closed,5))
if cost < b then
local expanded = nextSolution:expand(b, beam)
if #expanded > 0 then
for _, n in ipairs(expanded) do
local ncost = n:getCost()
if ncost <= b then
container:put(n, ncost)
end
end
end
if nextSolution:isOpen() then
openSolutions:put(nextSolution, cost)
end
if nextSolution:isComplete() then
b = cost
best = nextSolution
if returnFirst then
break
end
end
else
--print(cost, b)
--rejected = rejected + 1
end
if container:getSize() == 0 and openSolutions:getSize() > 0 then
if useCompleteSpace or not best:isComplete() then
local nextSolution, cost = openSolutions:pop()
container:put(nextSolution, cost)
else
-- we found a complete solution and only search our beam
-- not the complete space
break
end
end
end
--print(rejected)
return b, best, (best and best:isComplete())
end
function Solver:getRootSolution()
local solution = Solution(self, nil, nil)
solution.isRoot = true
return solution
end
|
PDM2KVSPoint = {}
setmetatable(PDM2KVSPoint, {__index = HiveBaseModule})
PDM2KVSPoint.new = function (varname)
local this = HiveBaseModule.new(varname)
this.kvspointconv = LoadModule('KVSPointConverter')
setmetatable(this, {__index=PDM2KVSPoint})
return this
end
function PDM2KVSPoint:Do()
self:UpdateValue()
self.kvspointconv:setPointBuffer(self.value.PointData)
return true
end
function PDM2KVSPoint:object()
return self.kvspointconv:getKVSPointData()
end
|
local Observable = require 'observable'
local util = require 'util'
--- Returns an Observable that produces a sliding window of the values produced by the original.
-- @arg {number} size - The size of the window. The returned observable will produce this number
-- of the most recent values as multiple arguments to onNext.
-- @returns {Observable}
function Observable:window(size)
return Observable.create(function(observer)
local window = {}
local function onNext(value)
table.insert(window, value)
if #window >= size then
observer:onNext(util.unpack(window))
table.remove(window, 1)
end
end
local function onError(message)
return observer:onError(message)
end
local function onCompleted()
return observer:onCompleted()
end
return self:subscribe(onNext, onError, onCompleted)
end)
end
|
Talk(65, "阁下远道来此,不知有何贵事?", "talkname65", 0);
Talk(0, "在下特来求见段皇爷,相烦大师通报.", "talkname0", 1);
Talk(65, "段皇爷早已不在尘世,累阁下空走一趟.", "talkname65", 0);
do return end;
|
local function create()
local en = CreateEntity()
--en.transform = CreateComponent("transform")
local transform = en:AddComponent("transform")
--inventory = CreateComponent("inventory")
local inventory = en:AddComponent("inventory")
--en.animation = CreateComponent("animation")
--local animation = en:AddComponent("animation")
--en.components.health = CreateComponent("health")
transform:CreateEntityCapability()
local anim1 = en:AddAnimation("idle", "cycle")
anim1:Init("res/textures/player/idle", 0.5, 4)
local anim1 = en:AddAnimation("left", "cycle")
anim1:Init("res/textures/player/left", 0.5, 4)
local anim1 = en:AddAnimation("right", "cycle")
anim1:Init("res/textures/player/right", 0.5, 4)
local anim1 = en:AddAnimation("up", "cycle")
anim1:Init("res/textures/player/up", 0.5, 4)
local anim1 = en:AddAnimation("down", "cycle")
anim1:Init("res/textures/player/down", 0.5, 4)
en:UseAnimation("idle")
en.name = "player"
--ChangeId(en.id, "player")
function en:OnUpdate(delta)
local x = 0
local y = 0
if GetKey("a") then
x = x - 1.5
end
if GetKey("d") then
x = x + 1.5
end
if GetKey("w") then
y = y - 1.5
end
if GetKey("s") then
y = y + 1.5
end
self.components.transform:move(x, y)
if x < 0 then
self:UseAnimation("left")
elseif x > 0 then
self:UseAnimation("right")
else
if y < 0 then
self:UseAnimation("up")
elseif y > 0 then
self:UseAnimation("down")
else
self:UseAnimation("idle")
end
end
--self.components.animation:update(delta)
--if (isPressed("f")) then
--if self.components.health:damage(1) then
--DeleteEntity(en.id)
--end
--end
--if (isPressed("h")) then
--self.components.health:heal(1)
--end
end
function en:attack(dmg)
print("Ouch: " .. dmg .. "!")
end
local inv = CreateUIItem("container")
for i = 1, 3 do
--inventory:AddSlot(i)
inventory:SetItem(1, "food_bowl")
--inventory:SetAmount(i, i)
local b = CreateUIItem("slot")
b:SetLocation(- (i * 50) - 75, -300)
b:SetSize(24, 24)
b:Init(inventory, i)
inv:AddItem(b)
end
SetContainer("p_inventory", inv)
return en
end
return create |
--- Common fs operations implemented with third-party tools.
local tools = {}
local fs = require("luarocks.fs")
local dir = require("luarocks.dir")
local cfg = require("luarocks.cfg")
local vars = cfg.variables
local dir_stack = {}
--- Obtain current directory.
-- Uses the module's internal directory stack.
-- @return string: the absolute pathname of the current directory.
function tools.current_dir()
local current = cfg.cache_pwd
if not current then
local pipe = io.popen(fs.quiet_stderr(fs.Q(vars.PWD)))
current = pipe:read("*l")
pipe:close()
cfg.cache_pwd = current
end
for _, directory in ipairs(dir_stack) do
current = fs.absolute_name(directory, current)
end
return current
end
--- Change the current directory.
-- Uses the module's internal directory stack. This does not have exact
-- semantics of chdir, as it does not handle errors the same way,
-- but works well for our purposes for now.
-- @param directory string: The directory to switch to.
-- @return boolean or (nil, string): true if successful, (nil, error message) if failed.
function tools.change_dir(directory)
assert(type(directory) == "string")
if fs.is_dir(directory) then
table.insert(dir_stack, directory)
return true
end
return nil, "directory not found: "..directory
end
--- Change directory to root.
-- Allows leaving a directory (e.g. for deleting it) in
-- a crossplatform way.
function tools.change_dir_to_root()
table.insert(dir_stack, "/")
end
--- Change working directory to the previous in the directory stack.
function tools.pop_dir()
local directory = table.remove(dir_stack)
return directory ~= nil
end
--- Run the given command.
-- The command is executed in the current directory in the directory stack.
-- @param cmd string: No quoting/escaping is applied to the command.
-- @return boolean: true if command succeeds (status code 0), false
-- otherwise.
function tools.execute_string(cmd)
local current = fs.current_dir()
if not current then return false end
cmd = fs.command_at(current, cmd)
local code = os.execute(cmd)
if code == 0 or code == true then
return true
else
return false
end
end
--- Internal implementation function for fs.dir.
-- Yields a filename on each iteration.
-- @param at string: directory to list
-- @return nil
function tools.dir_iterator(at)
local pipe = io.popen(fs.command_at(at, fs.Q(vars.LS)))
for file in pipe:lines() do
if file ~= "." and file ~= ".." then
coroutine.yield(file)
end
end
pipe:close()
end
--- Download a remote file.
-- @param url string: URL to be fetched.
-- @param filename string or nil: this function attempts to detect the
-- resulting local filename of the remote file as the basename of the URL;
-- if that is not correct (due to a redirection, for example), the local
-- filename can be given explicitly as this second argument.
-- @return (boolean, string): true and the filename on success,
-- false and the error message on failure.
function tools.use_downloader(url, filename, cache)
assert(type(url) == "string")
assert(type(filename) == "string" or not filename)
filename = fs.absolute_name(filename or dir.base_name(url))
local ok
if cfg.downloader == "wget" then
local wget_cmd = fs.Q(vars.WGET).." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet "
if cfg.connection_timeout and cfg.connection_timeout > 0 then
wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." --tries=1 "
end
if cache then
-- --timestamping is incompatible with --output-document,
-- but that's not a problem for our use cases.
fs.change_dir(dir.dir_name(filename))
ok = fs.execute_quiet(wget_cmd.." --timestamping ", url)
fs.pop_dir()
elseif filename then
ok = fs.execute_quiet(wget_cmd.." --output-document ", filename, url)
else
ok = fs.execute_quiet(wget_cmd, url)
end
elseif cfg.downloader == "curl" then
local curl_cmd = fs.Q(vars.CURL).." "..vars.CURLNOCERTFLAG.." -f -L --user-agent \""..cfg.user_agent.." via curl\" "
if cfg.connection_timeout and cfg.connection_timeout > 0 then
curl_cmd = curl_cmd .. "--connect-timeout "..tonumber(cfg.connection_timeout).." "
end
ok = fs.execute_string(fs.quiet_stderr(curl_cmd..fs.Q(url).." > "..fs.Q(filename)))
end
if ok then
return true, filename
else
return false
end
end
local md5_cmd = {
md5sum = fs.Q(vars.MD5SUM),
openssl = fs.Q(vars.OPENSSL).." md5",
md5 = fs.Q(vars.MD5),
}
--- Get the MD5 checksum for a file.
-- @param file string: The file to be computed.
-- @return string: The MD5 checksum or nil + message
function tools.get_md5(file)
local cmd = md5_cmd[cfg.md5checker]
if not cmd then return nil, "no MD5 checker command configured" end
local pipe = io.popen(cmd.." "..fs.Q(fs.absolute_name(file)))
local computed = pipe:read("*a")
pipe:close()
if computed then
computed = computed:match("("..("%x"):rep(32)..")")
end
if computed then return computed end
return nil, "Failed to compute MD5 hash for file "..tostring(fs.absolute_name(file))
end
return tools
|
local objects =
{
--Maxime
createObject(9054,372.1000100,-284.0000000,1012.0999800,0.0000000,0.0000000,0.0000000,7), --object(chnatwnmll14_lvs,7), (2,7),
createObject(9054,387.7000100,-255.0000000,1012.0999800,0.0000000,0.0000000,0.0000000,7), --object(chnatwnmll14_lvs,7), (3,7),
createObject(10378,424.7000100,-307.7999900,1006.2700200,0.0000000,0.0000000,0.0000000,7), --object(ctiyhallsquare_sfs,7), (1,7),
createObject(9054,438.8999900,-331.2000100,1012.0999800,0.0000000,0.0000000,180.0000000,7), --object(chnatwnmll14_lvs,7), (4,7),
createObject(1337,397.6000100,-68.2000000,891.5999800,0.0000000,0.0000000,0.0000000,7), --object(binnt07_la,7), (4,7),
createObject(9054,423.2999900,-343.0000000,1012.0999800,0.0000000,0.0000000,179.9950000,7), --object(chnatwnmll14_lvs,7), (5,7),
createObject(2436,400.2000100,-295.6000100,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ff_disp2,7), (1,7),
createObject(2433,404.6499900,-295.6000100,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ff_disp1,7), (1,7),
createObject(2436,401.7998000,-295.5996100,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ff_disp2,7), (2,7),
createObject(2433,407.6000100,-294.6000100,1006.2299800,0.0000000,0.0000000,90.0000000,7), --object(cj_ff_disp1,7), (2,7),
createObject(2435,406.6000100,-295.7000100,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ff_conter_2,7), (1,7),
createObject(2434,407.5300000,-295.7000400,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ff_conter_2b,7), (1,7),
createObject(2443,400.2000100,-293.5000000,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ff_frige,7), (2,7),
createObject(14762,405.2999900,-304.7999900,1008.0000000,0.0000000,0.0000000,90.0000000,7), --object(arsewinows,7), (1,7),
createObject(1533,404.0000000,-304.7999900,1006.2399900,0.0000000,0.0000000,180.0000000,7), --object(gen_doorext12,7), (1,7),
createObject(2422,406.7000100,-295.3999900,1007.2650100,0.0000000,0.0000000,0.0000000,7), --object(cj_ff_till,7), (1,7),
createObject(1720,401.7999900,-301.8999900,1006.2399900,0.0000000,0.0000000,270.0000000,7), --object(rest_chair,7), (1,7),
createObject(2555,399.7999900,-293.5000000,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ss_5_m,7), (1,7),
createObject(1720,401.7999900,-301.2000100,1006.2399900,0.0000000,0.0000000,270.0000000,7), --object(rest_chair,7), (2,7),
createObject(2747,401.0000000,-301.5000000,1006.6599700,0.0000000,0.0000000,90.0000000,7), --object(cj_donut_table,7), (1,7),
createObject(2747,410.0000000,-303.7000100,1006.6599700,0.0000000,0.0000000,90.0000000,7), --object(cj_donut_table,7), (2,7),
createObject(1720,409.2000100,-304.0000000,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (3,7),
createObject(1720,409.2000100,-303.2999900,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (4,7),
createObject(1720,400.2000100,-302.0000000,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (5,7),
createObject(1720,400.2000100,-301.2000100,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (6,7),
createObject(2555,400.7999900,-293.5000000,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ss_5_m,7), (2,7),
createObject(2555,401.7999900,-293.5000000,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(cj_ss_5_m,7), (3,7),
createObject(1850,402.3999900,-293.5000000,1005.0100100,0.0000000,0.0000000,0.0000000,7), --object(shop_shelf08,7), (3,7),
createObject(1720,410.7999900,-303.2999900,1006.2399900,0.0000000,0.0000000,269.9950000,7), --object(rest_chair,7), (7,7),
createObject(1720,410.7999900,-304.0000000,1006.2399900,0.0000000,0.0000000,269.9950000,7), --object(rest_chair,7), (8,7),
createObject(1720,410.7999900,-300.2000100,1006.2399900,0.0000000,0.0000000,269.9950000,7), --object(rest_chair,7), (9,7),
createObject(2432,401.1600000,-292.7000100,1007.5800200,0.0000000,0.0000000,0.0000000,7), --object(cj_ff_list3,7), (1,7),
createObject(1720,410.7999900,-300.8999900,1006.2399900,0.0000000,0.0000000,269.9950000,7), --object(rest_chair,7), (10,7),
createObject(2747,410.0000000,-300.5000000,1006.6599700,0.0000000,0.0000000,90.0000000,7), --object(cj_donut_table,7), (3,7),
createObject(1720,410.7999900,-297.2999900,1006.2399900,0.0000000,0.0000000,270.0000000,7), --object(rest_chair,7), (12,7),
createObject(1720,409.2000100,-300.8999900,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (13,7),
createObject(1720,410.7999900,-298.0000000,1006.2399900,0.0000000,0.0000000,270.0000000,7), --object(rest_chair,7), (14,7),
createObject(1720,409.2000100,-300.2000100,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (15,7),
createObject(2747,410.0000000,-297.6000100,1006.6599700,0.0000000,0.0000000,90.0000000,7), --object(cj_donut_table,7), (4,7),
createObject(1720,409.2000100,-297.2999900,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (16,7),
createObject(1720,409.2000100,-298.0000000,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (17,7),
createObject(2635,401.0000000,-299.7000100,1006.6599700,0.0000000,0.0000000,0.0000000,7), --object(cj_pizza_table,7), (2,7),
createObject(1720,401.7999900,-299.7000100,1006.2399900,0.0000000,0.0000000,269.9950000,7), --object(rest_chair,7), (18,7),
createObject(1720,400.2000100,-299.7999900,1006.2399900,0.0000000,0.0000000,90.0000000,7), --object(rest_chair,7), (19,7),
createObject(2414,404.1400100,-293.5759900,1006.2299800,0.0000000,0.0000000,0.0000000,7), --object(shop_counter_3b,7), (1,7),
createObject(2635,405.7999900,-300.3999900,1006.6599700,0.0000000,0.0000000,0.0000000,7), --object(cj_pizza_table,7), (3,7),
createObject(1720,405.7999900,-299.6000100,1006.2399900,0.0000000,0.0000000,0.0000000,7), --object(rest_chair,7), (20,7),
createObject(1720,405.7999900,-301.2000100,1006.2399900,0.0000000,0.0000000,180.0000000,7), --object(rest_chair,7), (21,7),
createObject(3109,409.8999900,-293.0799900,1007.4000200,0.0000000,0.0000000,90.0000000,7), --object(imy_la_door,7), (1,7),
createObject(2247,401.0000000,-301.3999900,1007.5000000,0.0000000,0.0000000,0.0000000,7), --object(plant_pot_15,7), (1,7),
createObject(1510,401.0000000,-301.2000100,1007.0850200,0.0000000,0.0000000,0.0000000,7), --object(dyn_ashtry,7), (1,7),
createObject(2247,409.8999900,-303.6000100,1007.5000000,0.0000000,0.0000000,0.0000000,7), --object(plant_pot_15,7), (2,7),
createObject(2247,409.8999900,-300.3999900,1007.5000000,0.0000000,0.0000000,0.0000000,7), --object(plant_pot_15,7), (3,7),
createObject(2247,409.8999900,-297.5000000,1007.5000000,0.0000000,0.0000000,0.0000000,7), --object(plant_pot_15,7), (4,7),
createObject(2247,405.7999900,-300.2999900,1007.5000000,0.0000000,0.0000000,0.0000000,7), --object(plant_pot_15,7), (5,7),
createObject(2247,401.0000000,-299.6000100,1007.5000000,0.0000000,0.0000000,0.0000000,7), --object(plant_pot_15,7), (6,7),
createObject(2010,400.3999900,-304.1499900,1006.2399900,0.0000000,0.0000000,0.0000000,7), --object(nu_plant3_ofc,7), (1,7),
createObject(1510,409.9500100,-300.2500000,1007.0850200,0.0000000,0.0000000,0.0000000,7), --object(dyn_ashtry,7), (2,7),
createObject(2010,410.8999900,-293.6000100,1006.2000100,0.0000000,0.0000000,0.0000000,7), --object(nu_plant3_ofc,7), (2,7),
createObject(2500,404.2999900,-293.2099900,1007.2700200,0.0000000,0.0000000,0.5200000,7), --object(cj_ff_coffee,7), (1,7),
createObject(2342,404.7999900,-293.5000000,1007.4000200,0.0000000,0.0000000,0.0000000,7), --object(donut_disp,7), (1,7),
createObject(2342,404.7998000,-293.5000000,1007.4099700,0.0000000,0.0000000,0.0000000,7), --object(donut_disp,7), (2,7),
createObject(2342,404.7998000,-293.5000000,1007.4210200,0.0000000,0.0000000,0.0000000,7), --object(donut_disp,7), (3,7),
createObject(2342,404.7998000,-293.5000000,1007.4210200,0.0000000,0.0000000,0.0000000,7), --object(donut_disp,7), (4,7),
createObject(2342,404.7998000,-293.5000000,1007.4310300,0.0000000,0.0000000,0.0000000,7), --object(donut_disp,7), (5,7),
createObject(2342,404.7998000,-293.5000000,1007.4403100,0.0000000,0.0000000,0.0000000,7), --object(donut_disp,7), (6,7),
createObject(2342,404.7998000,-293.5000000,1007.4503200,0.0000000,0.0000000,0.0000000,7), --object(donut_disp,7), (7,7),
createObject(2688,406.2999900,-293.2000100,1008.0000000,0.0000000,0.0000000,0.0000000,7), --object(cj_food_post4,7), (2,7),
createObject(8710,395.5000000,-271.3999900,1036.3000500,90.0000000,0.0000000,0.0000000,7), --object(bnuhotel01_lvs,7), (2,7),
createObject(18608,405.5000000,-302.5000000,1012.0999800,0.0000000,0.0000000,0.0000000,7), --object(counts_lights01,7), (1,7),
}
local col = createColSphere(403.23315, -304.4404, 1007.26221 , 20)
local function watchChanges( )
if getElementDimension( getLocalPlayer( ) ) > 0 and getElementDimension( getLocalPlayer( ) ) ~= getElementDimension( objects[1] ) and getElementInterior( getLocalPlayer( ) ) == getElementInterior( objects[1] ) then
for key, value in pairs( objects ) do
setElementDimension( value, getElementDimension( getLocalPlayer( ) ) )
end
elseif getElementDimension( getLocalPlayer( ) ) == 0 and getElementDimension( objects[1] ) ~= 65535 then
for key, value in pairs( objects ) do
setElementDimension( value, 65535 )
end
end
end
addEventHandler( "onClientColShapeHit", col,
function( element )
if element == getLocalPlayer( ) then
addEventHandler( "onClientRender", root, watchChanges )
end
end
)
addEventHandler( "onClientColShapeLeave", col,
function( element )
if element == getLocalPlayer( ) then
removeEventHandler( "onClientRender", root, watchChanges )
end
end
)
-- Put them standby for now.
for key, value in pairs( objects ) do
setElementDimension( value, 65535 )
end
for index, object in ipairs ( objects ) do
setElementDoubleSided ( object, true )
--setElementCollisionsEnabled ( object, true )
end
|
local AsyncAssetRecord = class("AsyncAssetRecord")
function AsyncAssetRecord:ctor()
self._assetName = "" --资源名字
self._abr = "" --AssetBundleRequest
self._callbackList = {}
end
function AsyncAssetRecord:appendCallback(callback)
table.insert(self._callbackList, callback)
end
--该值不是很准确, 好几帧返回1.0,但isDone是false
function AsyncAssetRecord:percent()
return self._abr.progress
end
function AsyncAssetRecord:isFinish()
return self._abr.isDone
end
function AsyncAssetRecord:asset()
return self._abr.asset
end
return AsyncAssetRecord
|
--[[
Copyright (c) 2015 深圳市辉游科技有限公司.
--]]
local PokecardAI = class('PokecardAI')
local scheduler = require('framework.scheduler')
function PokecardAI:ctor(...)
end
function PokecardAI.grabLord(gameService, pokeGame, currentPlayer)
scheduler.performWithDelayGlobal(
function()
local grabs = {ddz.Actions.GrabbingLord.None, ddz.Actions.GrabbingLord.Grab}
local action = grabs[math.random(1000)%2 + 1]
action = ddz.Actions.GrabbingLord.Grab
gameService:grabLord(currentPlayer.userId, action)
end,
math.random(2) - 0.5)
end
function PokecardAI.playCard(gameService, pokeGame, currentPlayer)
-- local pokeCards = table.copy(currentPlayer.pokeCards, 1, 1)
-- gameService:playCard(currentPlayer.userId, PokeCard.getIdChars(pokeCards))
if currentPlayer:isLord() then
local card = PokecardAI.getAICard(pokeGame, currentPlayer, currentPlayer.prevPlayer, currentPlayer.nextPlayer)
print('player[id: ' .. currentPlayer.userId .. ' ] plays ' .. card:toString())
gameService:playCard(currentPlayer.userId, PokeCard.getIdChars(card.pokeCards))
else
gameService:playCard(currentPlayer.userId, '')
end
do return end
local analyzedCards = currentPlayer.analyzedCards
if currentPlayer:isLord() then
-- 当前玩家是地主
if pokeGame.lastPlay == nil or pokeGame.lastPlay.player.userId == currentPlayer.userId then
-- 上轮是自己或自己是第一个出牌
if #analyzedCards.singlesStraightsCards then
end
else
-- 上手牌是其他玩家
end
else
-- 当前玩家是农民
if pokeGame.lordPlayer.robot then
else
end
end
-- local pokeCards = table.copy(currentPlayer.pokeCards, 1, 1)
-- gameService:playCard(currentPlayer.userId, PokeCard.getIdChars(pokeCards))
end
function PokecardAI.getAICard(pokeGame, currentPlayer, prevPlayer, nextPlayer)
local card = nil
local analyzedCards = currentPlayer.analyzedCards
local straightsCount = #analyzedCards.straightsCards
--dump(analyzedCards, 'analyzedCards => ' , false, 3)
local pairsCount = #analyzedCards.pairsCards
local threesCount = #analyzedCards.threesCards
local bombsCount = #analyzedCards.bombsCards
local threesStraightsCount = #analyzedCards.threesStraightsCards
local singlesCount = #analyzedCards.singlesCards
if straightsCount > 0 then
local prevStraightsCount = #prevPlayer.analyzedCards.straightsCards
local nextStraightsCount = #nextPlayer.analyzedCards.straightsCards
local card = analyzedCards.straightsCards[1]
if prevStraightsCount == 0 and nextStraightsCount == 0 and card.maxPokeValue <= PokeCardValue.QUEEN then
return card
end
if card.minPokeValue <= 5 then
return card
end
local prevLastStraight = prevPlayer.analyzedCards.straightsCards[prevStraightsCount]
local nextLastStraight = nextPlayer.analyzedCards.straightsCards[nextStraightsCount]
local biggestStraightCard = analyzedCards.straightsCards[straightsCount]
if card.maxPokeValue > PokeCardValue.QUEEN then
if analyzedCards.totalHands <= 3 then
return card
end
end
end
local absSinglesCount = singlesCount - threesStraightsCount - threesCount
if absSinglesCount > 4 and analyzedCards.singlesCards[1].maxPokeValue < PokeCardValue.QUEEN then
return analyzedCards.singlesCards[1]
end
if pairsCount > 0 then
local maxPair = analyzedCards.pairsCards[pairsCount]
local prevOverPairs = PokecardAI.findCardGreaterThan(prevPlayer, maxPair)
local nextOverPairs = PokecardAI.findCardGreaterThan(nextPlayer, maxPair)
selfMaxPairBiggest = true
if #prevOverPairs > 0 or #nextOverPairs > 0 then
selfMaxPairBiggest = false
end
return analyzedCards.pairsCards[1]
end
if #analyzedCards.pairsStraightsCards > 0 then
return analyzedCards.pairsStraightsCards[1]
end
if #analyzedCards.threesStraightsCards > 0 then
local card = analyzedCards.threesStraightsCards[1]
local pokeCards = table.dup(card.pokeCards)
local cardLength = card.cardLength
if cardLength <= #analyzedCards.singlesCards then
for i = 1, cardLength do
table.append(pokeCards, analyzedCards.singlesCards[i].pokeCards)
end
elseif cardLength <= #analyzedCards.pairsCards then
for i = 1, cardLength do
table.append(pokeCards, analyzedCards.pairsCards[i].pokeCards)
end
end
return Card.create(pokeCards)
end
if #analyzedCards.threesCards > 0 then
local card = analyzedCards.threesCards[1]
if #analyzedCards.singlesCards > 0 then
return Card.create( table.union(card.pokeCards, analyzedCards.singlesCards[1].pokeCards) )
end
if #analyzedCards.pairsCards > 0 then
return Card.create( table.union(card.pokeCards, analyzedCards.pairsCards[1].pokeCards) )
end
return card
end
if #analyzedCards.pairsCards > 0 then
return analyzedCards.pairsCards[1]
end
if #analyzedCards.singlesCards > 0 then
return analyzedCards.singlesCards[1]
end
if #analyzedCards.bombsCards > 0 then
return analyzedCards.bombsCards[1]
end
if #analyzedCards.rocketCards > 0 then
return analyzedCards.rocketCards[1]
end
return Card.create({currentPlayer.pokeCards[1]})
end
function PokecardAI.findCardGreaterThan(player, testCard)
local analyzedCards = player.analyzedCards
local result = {}
if #player.pokeCards < #testCard.pokeCards then
-- 牌不足,直接返回
return result
elseif testCard:isRocket() then
-- 对方火箭,直接返回
return result
elseif testCard:isBomb() then
-- 炸弹
for _, card in pairs(analyzedCards.bombsCards) do
if card:isGreaterThan(testCard) then
table.insert(result, {card, 0})
end
end
elseif testCard.cardType == CardType.THREE or testCard.cardType == CardType.THREE_WITH_ONE then
-- 三张, 或三带一
for _, card in pairs(analyzedCards.threesCards) do
if card.maxPokeValue > testCard.maxPokeValue then
table.insert(result, {card, 0})
end
end
elseif testCard.cardType == CardType.THREE_WITH_PAIRS then
-- 三带二
local hasPairs = false
local cardBreak = 0
hasPairs = #analyzedCards.pairsCards > 0
if not hasPairs then
hasPairs = #analyzedCards.threesCards > 2
end
if not hasPairs then
hasPairs = #analyzedCards.pairsStraightsCards > 0
cardBreak = 1
end
if not hasPairs then
hasPairs = #analyzedCards.threesStraightsCards > 0
cardBreak = 2
end
if not hasPairs then
-- 没有可用的对子,直接返回
return {}
end
for _, card in pairs(analyzedCards.threesCards) do
if card.maxPokeValue > testCard.maxPokeValue then
table.insert(result, {card, cardBreak})
end
end
elseif testCard.cardType == CardType.THREE_STRAIGHT then
-- 三顺
for _, card in pairs(analyzedCards.threesStraightsCards) do
if card.maxPokeValue > testCard.maxPokeValue and card.cardLength >= testCard.cardLength then
if card.cardLength == testCard.cardLength then
table.insert( result, {card, 0} )
else
table.insert( result, {card, 1} )
end
end
end
elseif testCard.cardType == CardType.PAIRS_STRAIGHT or testCard.cardType == CardType.STRAIGHT then
-- 双顺 -- 单顺
for _, card in pairs(analyzedCards.pairsStraightsCards) do
if card.maxPokeValue > testCard.maxPokeValue and card.cardLength >= testCard.cardLength then
if card.cardLength == testCard.cardLength then
table.insert( result, {card, 0} )
else
table.insert( result, {card, 1} )
end
end
end
elseif testCard.cardType == CardType.PAIRS then
for _, card in pairs(analyzedCards.pairsCards) do
if card.maxPokeValue > testCard.maxPokeValue then
table.insert( result, {card, 0})
end
end
for _, card in pairs(analyzedCards.threesCards) do
if card.maxPokeValue > testCard.maxPokeValue then
table.insert( result, {card, 1})
end
end
for _, card in pairs(analyzedCards.pairsStraightsCards) do
for i=1, #card.pokeCards, 2 do
if card.pokeCards[i].value > card.maxPokeValue then
table.insert( result, {Card.create({card.pokeCards[i], card.pokeCards[i+1]}, 2)} )
end
end
end
for _, card in pairs(analyzedCards.threesStraightsCards) do
for i=1, #card.pokeCards, 3 do
if card.pokeCards[i].value > card.maxPokeValue then
table.insert( result, {Card.create({card.pokeCards[i], card.pokeCards[i+1]}, 2)} )
end
end
end
elseif testCard.cardType == CardType.SINGLE then
for _, card in pairs(analyzedCards.singlesCards) do
if card.maxPokeValue > testCard.maxPokeValue then
table.insert( result, {card, 0} )
end
end
if #result == 0 and #analyzedCards.straightsCards > 0 then
for _, card in pairs(analyzedCards.straightsCards) do
if card.cardLength > 5 then
if card.minPokeValue > testCard.maxPokeValue then
table.insert(result, {Card.create(card.pokeCards[1]), 1})
elseif card.maxPokeValue > testCard.maxPokeValue then
table.insert(result, {Card.create(card.pokeCards[#card.pokeCards]), 1})
end
if #result > 0 then
break
end
end
end
end
--if #result == 0 and #analyzedCards.threesCards do
end
return result
end
return PokecardAI |
-- Local module, loaded into each QA's environment
fibaro = {}
hub = fibaro
local fmt = string.format
function string.split(str, sep)
local fields,s = {},sep or "%s"
str:gsub("([^"..s.."]+)", function(c) fields[#fields + 1] = c end)
return fields
end
function fibaro.alarm(arg1, action)
if type(arg1) == "string" then fibaro.__houseAlarm(arg1)
else
__assert_type(arg1, "number") __assert_type(action, "string")
local url = "/alarms/v1/partitions/"..arg1.."/actions/arm"
if action == "arm" then api.post(url)
elseif action == "disarm" then api.delete(url)
else error("Wrong parameter: "..action..". Available parameters: arm, disarm", 2) end
end
end
function fibaro.__houseAlarm(action)
__assert_type(action, "string")
local url = "/alarms/v1/partitions/actions/arm"
if action == "arm" then api.post(url)
elseif action == "disarm" then api.delete(url)
else error("Wrong parameter: '" .. action .. "'. Available parameters: arm, disarm", 3) end
end
function fibaro.alert( alertType , ids , notification , isCritical , subject )
__assert_type(alertType, "string") __assert_type(ids, "table") __assert_type(notification, "string")
local isDefined = "false"
local actions = {
email = "sendGlobalEmailNotifications",
push = "sendGlobalPushNotifications",
sms = "sendGlobalSMSNotifications",
}
if actions[alertType] == nil then
error("Wrong parameter: '" .. alertType .. "'. Available parameters: email, push", 2)
end
for _, id in ipairs(ids) do __assert_type(id, "number") end
for _, id in ipairs(ids) do
fibaro.call(id, actions[alertType], notification, isDefined)
end
end
--function fibaro.alert(alertType, ids, notification)
-- __assert_type(alertType, "string") __assert_type(ids, "table") __assert_type(notification, "string")
-- local isDefined = "false"
-- local actions = {
-- email = "sendGlobalEmailNotifications",
-- push = "sendGlobalPushNotifications"
-- }
-- if actions[alertType] == nil then
-- error("Wrong parameter: '" .. alertType .. "'. Available parameters: email, push", 2)
-- end
-- for _, id in ipairs(ids) do __assert_type(id, "number") end
-- for _, id in ipairs(ids) do
-- fibaro.call(id, actions[alertType], notification, isDefined)
-- end
--end
function fibaro.emitCustomEvent(name)
__assert_type(name, "string")
api.post("/customEvents/" .. name)
end
function fibaro.call(deviceId, actionName, ...)
__assert_type(actionName, "string")
if type(deviceId) == "table" then
for _, id in pairs(deviceId) do __assert_type(id, "number") end
for _, id in pairs(deviceId) do fibaro.call(id, actionName, ...) end
return
end
__assert_type(deviceId, "number")
local arg= {...}; --arg = #arg > 0 and arg or nil
api.post("/devices/"..deviceId.."/action/"..actionName, { args = arg })
end
function fibaro.callGroupAction(actionName, actionData)
__assert_type(actionName, "string") __assert_type(actionData, "table")
local response, status = api.post("/devices/groupAction/" .. actionName, actionData)
if status ~= 202 then return nil
else return response["devices"] end
end
function fibaro.get(deviceId, propertyName)
__assert_type(deviceId, "number") __assert_type(propertyName, "string")
local property = __fibaro_get_device_property(deviceId, propertyName)
if property then return property.value, property.modified end
end
function fibaro.getValue(deviceId, propertyName)
__assert_type(deviceId, "number") __assert_type(propertyName, "string")
local property = __fibaro_get_device_property(deviceId, propertyName)
if property then return property.value end
end
function fibaro.getType(deviceId)
__assert_type(deviceId, "number")
return (__fibaro_get_device(deviceId) or {}).type
end
function fibaro.getName(deviceId)
__assert_type(deviceId, 'number')
return (__fibaro_get_device(deviceId) or {}).name
end
function fibaro.getRoomID(deviceId)
__assert_type(deviceId, 'number')
return (__fibaro_get_device(deviceId) or {}).roomID
end
function fibaro.getSectionID(deviceId)
__assert_type(deviceId, 'number')
local dev = __fibaro_get_device(deviceId)
if dev ~= nil then return __fibaro_get_room(dev.roomID).sectionID end
end
function fibaro.getRoomName(roomId)
__assert_type(roomId, 'number')
return (__fibaro_get_room(roomId) or {}).name
end
function fibaro.getRoomNameByDeviceID(deviceId)
__assert_type(deviceId, 'number')
local dev = __fibaro_get_device(deviceId)
return dev and fibaro.getRoomName(dev.roomID) or nil
end
function fibaro.getDevicesID(filter)
if type(filter) ~= 'table' or (type(filter) == 'table' and next(filter) == nil) then
return fibaro.getIds(__fibaro_get_devices())
end
local buff={}
local function out(s) buff[#buff+1]=s end
out('/?')
for c, d in pairs(filter) do
if c == 'properties' and d ~= nil and type(d) == 'table' then
for a, b in pairs(d) do
if b == "nil" then out('property='..tostring(a))
else out('property=['.. tostring(a)..','..tostring(b)..']') end
end
elseif c == 'interfaces' and d ~= nil and type(d) == 'table' then
for _,b in pairs(d) do out('interface='..tostring(b)) end
else out(tostring(c).."="..tostring(d)) end
end
local args = table.concat(buff,'&')
return fibaro.getIds(api.get('/devices'..args))
end
function fibaro.getIds(devices)
local ids = {}
for _, a in pairs(devices) do
if a ~= nil and type(a) == 'table' and a['id'] ~= nil and a['id'] > 3 then
table.insert(ids, a['id'])
end
end
return ids
end
function fibaro.getGlobalVariable(name)
__assert_type(name, 'string')
local g = __fibaro_get_global_variable(name)
if g then return g.value, g.modified end
end
function fibaro.setGlobalVariable (name, value)
__assert_type(name, 'string') __assert_type(value, 'string')
api.put("/globalVariables/" .. name, {["value"]=tostring(value), ["invokeScenes"]=true})
end
function fibaro.scene(action, ids)
__assert_type(action, "string") __assert_type(ids, "table")
local availableActions = { execute = true , kill = true}
assert(availableActions[action],"Wrong parameter: " .. action .. ". Available actions: execute, kill")
for _, id in ipairs(ids) do __assert_type(id, "number") end
for _, id in ipairs(ids) do api.post("/scenes/"..id.."/"..action) end
end
function fibaro.profile(action, profileId)
__assert_type(profileId, "number") __assert_type(action, "string")
local availableActions = { activateProfile = "activeProfile"}
assert(availableActions[action],"Wrong parameter: "..action..". Available actions: activateProfile")
api.post("/profiles/"..availableActions[action].."/"..profileId)
end
function fibaro.getPartition(id)
__assert_type(id, "number")
return __fibaro_get_partition(id)
end
function fibaro.setTimeout(timeout, action)
__assert_type(timeout, "number") __assert_type(action, "function")
return setTimeout(action, timeout)
end
function fibaro.clearTimeout(timeoutId)
__assert_type(timeoutId, "table")
clearTimeout(timeoutId)
end
function fibaro.wakeUpDeadDevice(deviceID)
__assert_type(deviceID, 'number')
fibaro.call(1, 'wakeUpDeadDevice', deviceID)
end
function fibaro.sleep(ms)
__assert_type(ms, "number")
__fibaroSleep(ms)
end
local function d2str(...) local r,s={...},{} for i=1,#r do if r[i]~=nil then s[#s+1]=tostring(r[i]) end end return table.concat(s," ") end
function fibaro.debug(tag,...) __assert_type(tag,"string") __fibaro_add_debug_message(tag,d2str(...),"DEBUG") end
function fibaro.warning(tag,...) __assert_type(tag,"string") __fibaro_add_debug_message(tag,d2str(...),"WARNING") end
function fibaro.trace(tag,...) __assert_type(tag,"string") __fibaro_add_debug_message(tag,d2str(...),"TRACE") end
function fibaro.error(tag,...) __assert_type(tag,"string") __fibaro_add_debug_message(tag,d2str(...),"ERROR") end
function fibaro.useAsyncHandler(value)
__assert_type(value, "boolean")
__fibaroUseAsyncHandler(value)
end
function fibaro.getHomeArmState()
local ps,c = api.get("/alarms/v1/partitions") or {},0
for _,p in ipairs(ps) do
c = c + (p.armed and 1 or 0)
end
return c == #ps and "armed" or c == 0 and "disarmed" or "partially_armed"
end
function fibaro.isHomeBreached()
for _,p in ipairs(api.get("/alarms/v1/partitions") or {}) do
if p.breached then return true end
end
return false
end
function fibaro.isPartitionBreached(id)
__assert_type(id, "number")
local p = api.get("/alarms/v1/partitions/"..id)
return p and p.breached
end
function fibaro.getPartitionArmState(id)
__assert_type(value, "number")
local p = api.get("/alarms/v1/partitions/"..id)
if not p then error("Bad partitions id: "..tostring(id)) end
return p.armed and "armed" or "disarmed"
end
function fibaro.getPartitions()
return api.get("/alarms/v1/partitions") or {}
end
function fibaro.callUI(id, action, element, value)
__assert_type(id,"number") __assert_type(action,"string") __assert_type(element,"string")
value = value==nil and "null" or value
local _, code = api.get(fmt("/plugins/callUIEvent?deviceID=%s&eventType=%s&elementName=%s&value=%s",id,action,element,value))
if code == 404 then error(fmt("Device %s does not exists.",id), 3) end
end |
-- ... json.lua
|
return
function(self, node, alternate_handler)
local result
self.printer:inc_indent()
if alternate_handler then
result = alternate_handler(self, node)
else
result = self:process_node(node)
end
self.printer:dec_indent()
return result
end
|
-----------------------------------
-- Area: Cape Teriggan
-- NM: Axesarion the Wanderer
-----------------------------------
local ID = require("scripts/zones/Cape_Teriggan/IDs")
function onMobDisengage(mob)
DespawnMob(mob:getID(), 120)
end
function onMobDeath(mob, player, isKiller)
if (isKiller) then
GetNPCByID(ID.npc.CERMET_HEADSTONE):setLocalVar("cooldown", os.time() + 900)
end
end
|
--proc/filedialogs: standard open and save file dialogs.
--Written by Cosmin Apreutesei. Public Domain.
local yui_path = (...):match('(.-)[^%.]+$')
setfenv(1, require(yui_path:sub(1, -2)))
require(yui_path .. 'comdlg')
OFN_READONLY = 0x00000001
OFN_OVERWRITEPROMPT = 0x00000002
OFN_HIDEREADONLY = 0x00000004
OFN_NOCHANGEDIR = 0x00000008
OFN_SHOWHELP = 0x00000010
OFN_ENABLEHOOK = 0x00000020
OFN_ENABLETEMPLATE = 0x00000040
OFN_ENABLETEMPLATEHANDLE = 0x00000080
OFN_NOVALIDATE = 0x00000100
OFN_ALLOWMULTISELECT = 0x00000200
OFN_EXTENSIONDIFFERENT = 0x00000400
OFN_PATHMUSTEXIST = 0x00000800
OFN_FILEMUSTEXIST = 0x00001000
OFN_CREATEPROMPT = 0x00002000
OFN_SHAREAWARE = 0x00004000
OFN_NOREADONLYRETURN = 0x00008000
OFN_NOTESTFILECREATE = 0x00010000
OFN_NONETWORKBUTTON = 0x00020000
OFN_NOLONGNAMES = 0x00040000 -- force no long names for 4.x modules
OFN_EXPLORER = 0x00080000 -- new look commdlg
OFN_NODEREFERENCELINKS = 0x00100000
OFN_LONGNAMES = 0x00200000 -- force long names for 3.x modules
-- OFN_ENABLEINCLUDENOTIFY and OFN_ENABLESIZING require
-- Windows 2000 or higher to have any effect.
OFN_ENABLEINCLUDENOTIFY = 0x00400000 -- send include message to callback
OFN_ENABLESIZING = 0x00800000
OFN_DONTADDTORECENT = 0x02000000
OFN_FORCESHOWHIDDEN = 0x10000000 -- Show All files including System and hidden files
--FlagsEx Values
OFN_EX_NOPLACESBAR = 0x00000001
-- Return values for the registered message sent to the hook function
-- when a sharing violation occurs. OFN_SHAREFALLTHROUGH allows the
-- filename to be accepted, OFN_SHARENOWARN rejects the name but puts
-- up no warning (returned when the app has already put up a warning
-- message), and OFN_SHAREWARN puts up the default warning message
-- for sharing violations.
--
-- Note: Undefined return values map to OFN_SHAREWARN, but are
-- reserved for future use.
OFN_SHAREFALLTHROUGH = 2
OFN_SHARENOWARN = 1
OFN_SHAREWARN = 0
ffi.cdef[[
typedef UINT_PTR (*LPOFNHOOKPROC) (HWND, UINT, WPARAM, LPARAM);
typedef struct tagOFNW {
DWORD lStructSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCWSTR lpstrFilter;
LPWSTR lpstrCustomFilter;
DWORD nMaxCustFilter;
DWORD nFilterIndex;
LPWSTR lpstrFile;
DWORD nMaxFile;
LPWSTR lpstrFileTitle;
DWORD nMaxFileTitle;
LPCWSTR lpstrInitialDir;
LPCWSTR lpstrTitle;
DWORD Flags;
WORD nFileOffset;
WORD nFileExtension;
LPCWSTR lpstrDefExt;
LPARAM lCustData;
LPOFNHOOKPROC lpfnHook;
LPCWSTR lpTemplateName;
void* pvReserved;
DWORD dwReserved;
DWORD FlagsEx;
} OPENFILENAMEW, *LPOPENFILENAMEW;
BOOL GetSaveFileNameW(LPOPENFILENAMEW);
BOOL GetOpenFileNameW(LPOPENFILENAMEW);
]]
local function set_filter(s)
if type(s) == 'table' then s = table.concat(s,'\0') end
if type(s) == 'string' then s = s..'\0' end
return wcs(s)
end
local function set_filepath(s, info)
local pwcs, sz = wcs_sz(s)
info.lpstrFile = pwcs
info.nMaxFile = sz
end
local function get_filepath(info)
return mbs(info.lpstrFile)
end
OPENFILENAME = struct{
ctype = 'OPENFILENAMEW', size = 'lStructSize',
fields = sfields{
'filepath', '', set_filepath, get_filepath, --in/out
'filename', 'lpstrFileTitle', pass, mbs, --out
'filter', 'lpstrFilter', set_filter, mbs,
'custom_filter', 'lpstrCustomFilter', pass, mbs, --out
'filter_index', 'nFilterIndex', pass, pass,
'initial_dir', 'lpstrInitialDir', wcs, mbs,
'title', 'lpstrTitle', wcs, mbs,
'flags', 'Flags', flags, pass, --OFN_*
'default_ext', 'lpstrDefExt', wcs, mbs,
'flags_ex', 'FlagsEx', flags, pass, --OFN_EX_*
},
init = function(info)
--TODO: make out and in/out buffer allocations declarative.
local p, psz = info.lpstrFile, info.nMaxFile
local wcs, sz = WCS(65536); pin(wcs, info); info.lpstrFile, info.nMaxFile = wcs, sz
if p ~= nil then ffi.copy(wcs, p, psz * 2) end
local wcs, sz = WCS(); pin(wcs, info); info.lpstrFileTitle, info.nMaxFileTitle = wcs, sz
local wcs, sz = WCS(); pin(wcs, info); info.lpstrCustomFilter, info.nMaxCustFilter = wcs, sz
end,
}
function GetSaveFileName(info)
info = OPENFILENAME(info)
return checkcomdlg(comdlg.GetSaveFileNameW(info)), info
end
--custom function, don't look for it in msdn!
--for multiselect, info.lpstrFile contains dir \0 filename1 \0 ... \0\0,
--except if a single file is selected, in which case it's just path \0\0.
--this function extracts and rejoins the dir and filenames to a list of paths.
function GetOpenFileNamePaths(info)
--split at \0 to a list of offset1, size1, ...
local t, i0 = {}, 0
for i = 0, info.nMaxFile - 1 do
if info.lpstrFile[i] == 0 then
local sz = i - i0 - 1
if sz < 0 then break end
t[#t+1] = i0
t[#t+1] = sz
i0 = i + 1
end
end
--convert to utf8
local dt = {}
for i=1,#t,2 do
local offset, size = t[i], t[i+1]
dt[#dt+1] = mbs(info.lpstrFile + offset, size)
end
--if a single file selected, that is the full path
if #dt == 1 then return dt end
--remove dir from the list and prepend it to each filename
local dir = table.remove(dt, 1)
for i=1,#dt do
dt[i] = dir .. '\\' .. dt[i]
end
return dt
end
function GetOpenFileName(info)
info = OPENFILENAME(info)
return checkcomdlg(comdlg.GetOpenFileNameW(info)), info
end
--showcase
if not ... then
local ok, info = GetSaveFileName{
title = 'Save this thing',
filter = {'All Files','*.*','Text Files','*.txt'},
filter_index = 1,
flags = 'OFN_SHOWHELP',
}
print(ok, info.filepath, info.filename, info.filter_index, info.custom_filter)
local ok, info = GetOpenFileName{
title = 'Open\'em up!',
filter = {'All Files','*.*','Text Files','*.txt'},
filter_index = 1,
flags = 'OFN_ALLOWMULTISELECT|OFN_EXPLORER',
}
print(ok, info.filepath, info.filename, info.filter_index, info.custom_filter)
require'pp'(GetOpenFileNamePaths(info))
end
|
local Widget = require "widgets/widget"
local Image = require "widgets/image"
local IceOver = Class(Widget, function(self, owner)
self.owner = owner
Widget._ctor(self, "IceOver")
self:SetClickable(false)
self.img = self:AddChild(Image("images/fx.xml", "ice_over.tex"))
self.img:SetEffect( "shaders/uifade.ksh" )
self.img:SetHAnchor(ANCHOR_MIDDLE)
self.img:SetVAnchor(ANCHOR_MIDDLE)
self.img:SetScaleMode(SCALEMODE_FILLSCREEN)
self:Hide()
self.laststep = 0
self.alpha_min = 1
self.alpha_min_target = 1
self.inst:ListenForEvent("temperaturedelta", function(inst, data) self:OnIceChange() end, self.owner)
end)
function IceOver:OnIceChange()
local temp = self.owner.components.temperature:GetCurrent()
local num_steps = 4
local all_up_thresh = {5, 0, -5, -10}
local freeze_sounds =
{
"dontstarve/winter/freeze_1st",
"dontstarve/winter/freeze_2nd",
"dontstarve/winter/freeze_3rd",
"dontstarve/winter/freeze_4th",
}
local freeze_sounds_names =
{
"freeze_1st",
"freeze_2nd",
"freeze_3rd",
"freeze_4th",
}
--local all_down_thresh = {8, 3, -2, -7}
local up_thresh = all_up_thresh[self.laststep+1]
local down_thresh = all_up_thresh[self.laststep]
if up_thresh and temp < up_thresh and self.laststep < num_steps and (temp <= 5 or GetSeasonManager():IsWinter()) then
if not TheFrontEnd:GetSound():PlayingSound(freeze_sounds_names[self.laststep+1]) then
TheFrontEnd:GetSound():PlaySound(freeze_sounds[self.laststep+1], freeze_sounds_names[self.laststep+1])
end
self.laststep = self.laststep + 1
elseif down_thresh and temp > down_thresh and self.laststep > 0 then
self.laststep = self.laststep - 1
end
if self.laststep == 0 then
self.alpha_min_target = 1
else
local alpha_mins = {
.7, .5, .3, 0
}
self.alpha_min_target = alpha_mins[self.laststep]
self:StartUpdating()
end
end
function IceOver:OnUpdate(dt)
local lspeed = dt*2
self.alpha_min = (1 - lspeed) * self.alpha_min + lspeed *self.alpha_min_target
self.img:SetAlphaRange(self.alpha_min,1)
if self.alpha_min >= .99 then
self:Hide()
self:StopUpdating()
else
self:Show()
end
end
return IceOver |
slot0 = class("NetFleetAttachUpdate", import("....BaseEntity"))
slot0.Fields = {
row = "number",
column = "number",
id = "number"
}
slot0.Setup = function (slot0, slot1)
slot0.id = slot1.item_id
slot0.row = slot1.pos.row
slot0.column = slot1.pos.column
end
return slot0
|
-- --------------------
-- 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 print = TMW.print
local tonumber, pairs =
tonumber, pairs
local UnitAura, UnitIsDeadOrGhost =
UnitAura, UnitIsDeadOrGhost
local GetSpellTexture = TMW.GetSpellTexture
local strlowerCache = TMW.strlowerCache
local isNumber = TMW.isNumber
local Type = TMW.Classes.IconType:New("buffcheck")
Type.name = L["ICONMENU_BUFFCHECK"]
Type.desc = L["ICONMENU_BUFFCHECK_DESC"]
Type.menuIcon = GetSpellTexture(111922)
Type.usePocketWatch = 1
Type.unitType = "unitid"
Type.hasNoGCD = true
Type.canControlGroup = true
local STATE_PRESENT = TMW.CONST.STATE.DEFAULT_HIDE
local STATE_ABSENT = TMW.CONST.STATE.DEFAULT_SHOW
-- AUTOMATICALLY GENERATED: UsesAttributes
Type:UsesAttributes("state")
Type:UsesAttributes("spell")
Type:UsesAttributes("unit, GUID")
Type:UsesAttributes("reverse")
Type:UsesAttributes("auraSourceUnit, auraSourceGUID")
Type:UsesAttributes("start, duration")
Type:UsesAttributes("stack, stackText")
Type:UsesAttributes("texture")
-- END AUTOMATICALLY GENERATED: UsesAttributes
Type:SetModuleAllowance("IconModule_PowerBar_Overlay", true)
Type:RegisterIconDefaults{
-- The unit(s) to check for auras
Unit = "player",
-- What type of aura to check for. Values are "HELPFUL" or "HARMFUL".
-- "EITHER" is not supported by this icon type, although this setting is shared with Buff/Debuff icon types.
BuffOrDebuff = "HELPFUL",
-- Only check auras casted by the player. Appends "|PLAYER" to the UnitAura filter.
OnlyMine = false,
}
Type:RegisterConfigPanel_XMLTemplate(100, "TellMeWhen_ChooseName", {
SUGType = "buffNoDS",
})
Type:RegisterConfigPanel_XMLTemplate(105, "TellMeWhen_Unit", {
implementsConditions = true,
})
Type:RegisterConfigPanel_ConstructorFunc(120, "TellMeWhen_BuffOrDebuff2", function(self)
self:SetTitle(TMW.L["ICONMENU_BUFFTYPE"])
self:BuildSimpleCheckSettingFrame({
numPerRow = 2,
function(check)
check:SetTexts("|cFF00FF00" .. L["ICONMENU_BUFF"], nil)
check:SetSetting("BuffOrDebuff", "HELPFUL")
end,
function(check)
check:SetTexts("|cFFFF0000" .. L["ICONMENU_DEBUFF"], nil)
check:SetSetting("BuffOrDebuff", "HARMFUL")
end,
})
end)
Type:RegisterConfigPanel_ConstructorFunc(125, "TellMeWhen_BuffCheckSettings", function(self)
self:SetTitle(Type.name)
self:BuildSimpleCheckSettingFrame({
function(check)
check:SetTexts(L["ICONMENU_ONLYMINE"], L["ICONMENU_ONLYMINE_DESC"])
check:SetSetting("OnlyMine")
end,
})
end)
Type:RegisterConfigPanel_XMLTemplate(165, "TellMeWhen_IconStates", {
[STATE_ABSENT] = { text = "|cFFFF0000" .. L["ICONMENU_ABSENTONANY"], tooltipText = L["ICONMENU_ABSENTONANY_DESC"], },
[STATE_PRESENT] = { text = "|cFF00FF00" .. L["ICONMENU_PRESENTONALL"], tooltipText = L["ICONMENU_PRESENTONALL_DESC"], },
})
local function Buff_OnEvent(icon, event, arg1)
if event == "UNIT_AURA" and icon.UnitSet.UnitsLookup[arg1] then
-- If the icon is checking the unit, schedule an update for the icon.
icon.NextUpdateTime = 0
elseif event == "TMW_UNITSET_UPDATED" and arg1 == icon.UnitSet then
-- A unit was just added or removed from icon.Units, so schedule an update.
icon.NextUpdateTime = 0
end
end
local huge = math.huge
local function BuffCheck_OnUpdate(icon, time)
-- Upvalue things that will be referenced a lot in our loops.
local Units, NameArray, NameStringArray, NameHash, Filter
= icon.Units, icon.Spells.Array, icon.Spells.StringArray, icon.Spells.Hash, icon.Filter
local AbsentAlpha = icon.States[STATE_ABSENT].Alpha
-- These variables will hold all the attributes that we pass to YieldInfo().
local iconTexture, id, count, duration, expirationTime, caster, useUnit, _
for u = 1, #Units do
local unit = Units[u]
-- UnitSet:UnitExists(unit) is an improved UnitExists() that returns early if the unit
-- is known by TMW.UNITS to definitely exist.
-- Also don't check dead units since the point of this icon type is to check for
-- raid members that are missing raid buffs.
if icon.UnitSet:UnitExists(unit) and not UnitIsDeadOrGhost(unit) then
local _iconTexture, _id, _count, _duration, _expirationTime, _buffName, _caster
for i = 1, #NameArray do
local iName = NameArray[i]
-- Check by name
_buffName, _, _iconTexture, _count, _, _duration, _expirationTime, _caster, _, _, _id = UnitAura(unit, NameStringArray[i], nil, Filter)
-- If the name was found but the ID didnt match, iterate over everything on the unit and check by ID.
if _id and _id ~= iName and isNumber[iName] then
for index = 1, huge do
_buffName, _, _iconTexture, _count, _, _duration, _expirationTime, _caster, _, _, _id = UnitAura(unit, index, Filter)
if not _id or _id == iName then
-- We ran our of auras, or we found what we are looking for. Break spell loop.
break
end
end
end
if _id then
-- We found a matching aura. Break spell loop.
break
end
end
if _id and not useUnit then
-- We found a matching aura, and we haven't recorded one to be used yet,
-- so save it into our final variables to report something present if we
-- don't end up finding anything missing.
iconTexture, id, count, duration, expirationTime, caster, useUnit =
_iconTexture, _id, _count, _duration, _expirationTime, _caster, unit
elseif not _id and AbsentAlpha > 0 and not icon:YieldInfo(true, unit) then
-- If we didn't find a matching aura, and the icon is set to show when we don't find something
-- then report what unit it was. This is the primary point of the icon - to find units that are missing everything.
-- If icon:YieldInfo() returns false, it means we don't need to keep harvesting data.
return
end
end
end
-- We didn't find any units that were missing all the auras being checked.
-- So, report the first unit that we found that has an aura.
icon:YieldInfo(false, useUnit, iconTexture, count, duration, expirationTime, caster, id)
end
function Type:HandleYieldedInfo(icon, iconToSet, unit, iconTexture, count, duration, expirationTime, caster, id)
if not unit then
-- Unit is nil if the icon didn't check any living units.
iconToSet:SetInfo("state; texture; start, duration; stack, stackText; spell; unit, GUID; auraSourceUnit, auraSourceGUID",
0,
icon.FirstTexture,
0, 0,
nil, nil,
icon.Spells.First,
nil, nil,
nil, nil
)
elseif not id then
-- ID is nil if we found a unit that is missing all of the auras that are being checked for.
iconToSet:SetInfo("state; texture; start, duration; stack, stackText; spell; unit, GUID; auraSourceUnit, auraSourceGUID",
STATE_ABSENT,
icon.FirstTexture,
0, 0,
nil, nil,
icon.Spells.First,
unit, nil,
nil, nil
)
elseif id then
-- ID is defined if we didn't find any units that are missing all the auras being checked for.
-- In this case, the data is for the first matching aura found on the first unit checked.
iconToSet:SetInfo("state; texture; start, duration; stack, stackText; spell; unit, GUID; auraSourceUnit, auraSourceGUID",
STATE_PRESENT,
iconTexture,
expirationTime - duration, duration,
count, count,
id,
unit, nil,
caster, nil
)
end
end
function Type:Setup(icon)
icon.Spells = TMW:GetSpells(icon.Name, false)
icon.Units, icon.UnitSet = TMW:GetUnits(icon, icon.Unit, icon:GetSettings().UnitConditions)
-- This icon can't check both buffs and debuffs, but it reuses this setting from buff/debuff icons.
-- So, if it is set to EITHER, then reset it to HELPFUL.
if icon.BuffOrDebuff == "EITHER" then
icon:GetSettings().BuffOrDebuff = "HELPFUL"
icon.BuffOrDebuff = "HELPFUL"
end
-- Setup the filter that will be used by UnitAura in the icon's update function.
icon.Filter = icon.BuffOrDebuff
if icon.OnlyMine then
icon.Filter = icon.Filter .. "|PLAYER"
end
icon.FirstTexture = GetSpellTexture(icon.Spells.First)
icon:SetInfo("texture; reverse", Type:GetConfigIconTexture(icon), true)
-- Setup events and update functions.
if icon.UnitSet.allUnitsChangeOnEvent then
icon:SetUpdateMethod("manual")
icon:RegisterEvent("UNIT_AURA")
icon:SetScript("OnEvent", Buff_OnEvent)
TMW:RegisterCallback("TMW_UNITSET_UPDATED", Buff_OnEvent, icon)
end
icon:SetUpdateFunction(BuffCheck_OnUpdate)
icon:Update()
end
Type:Register(101)
|
object_mobile_naboo_major_franchels = object_mobile_shared_naboo_major_franchels:new {
}
ObjectTemplates:addTemplate(object_mobile_naboo_major_franchels, "object/mobile/naboo_major_franchels.iff")
|
local concat = table.concat
describe("test-files", function()
local TYPES = require("expadom.constants").NODE_TYPES
local getfiles = require("pl.dir").getfiles
local files = getfiles("./spec/03-test-files", "*.in.xml")
table.sort(files)
local readfile = require("pl.utils").readfile
local basename = require("pl.path").basename
local expadom = require "expadom"
for _, inFile in ipairs(files) do
local outFile = inFile:gsub("%.in%.xml", ".out.xml")
local inXml = readfile(inFile)
local outXml = assert(readfile(outFile))
local doc = assert(expadom.parseDocument(inXml))
local descriptionPI = doc.childNodes[1]
assert(descriptionPI.nodeType == TYPES.PROCESSING_INSTRUCTION_NODE,
inFile..": Expected the first element in the xml document to be a ProcessingInstruction with the test description")
it("(".. basename(inFile).." whole) "..descriptionPI.data, function()
assert.same(outXml, concat(doc:write {}))
end)
it("(".. basename(inFile).." chunked) "..descriptionPI.data, function()
local parser = assert(expadom.createParser())
for i = 1, #inXml do
assert(parser:parse(inXml:sub(i,i)))
end
doc = assert(expadom.closeParser(parser))
assert.same(outXml, concat(doc:write {}))
end)
end
end)
|
function Gorge:GetThirdPersonOffset()
local z = -1.8 - self:GetVelocityLength() / self:GetMaxSpeed(true) * 0.4
return Vector(0, 0.9, z)
end
function Gorge:GetFirstPersonFov()
return kGorgeFov
end
function Gorge:GetTooCloseDistance()
return 0.8
end |
--Made by MessorAdmin
local z={["("]=0,["+"]=1,["%"]=2,["@"]=3,["!"]=4,[")"]=5,["*"]=6,["$"]=7,["~"]=8,["^"]=9,["?"]=10,["#"]=11,["&"]=12,["-"]=13,["_"]=14,["="]=15}; setfenv(assert(loadstring((string.gsub(string.gsub(table.concat({
"$$+*^*!$~%^%?(&!=*@*+*&*()&*+*^$)*%$(%-@(%$*+*-*)*?@@$)*%$*$^*@*)*~A%()&*+*^$)*%$@$%%^%_%&!=*@*+*&*()&*+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%(%(%(%(%(%(%(%(%(%(%(%(%(%(%(%+*?@%$)*-*=**$)*~%^%?((%(%(%(%(%(%(%(%(%(%(%(%=!)$!$($)$!$"
,"~%$%%!+*_*_*)*!*(%()&*+*^$)*%$(%@%(%$%_%_%+*_%_!+*-*)*_%_%$%(%@%(%+!!$!$)*-*($!$)*!*(%!$=*(%?*=*^*_*_%$%&%=)=)^%?()*&*@$)*(%?((%(%(%(%(%(%(%(%(%(%(%(%(%(%(%(%)*_*!*?((%(%(%(%(%(%(%(%)*_*!*?((%(%(%(%)*_*!*?()*_*!*^%?($*+*-*)*_%()&*+*^$)*%$@$_%@!~*^*&*!*%))*-*=**$)*!*?@@*=*_*_*)*@*!$~%**)$_*@*!$^*=*_*~%($&*%$^%?((%(%(%(%(%=!)$!$($)$!$~%%%!!^*@$@*=*_*_*)*@*!$)*!*(%&$(%%%_%_%($&*%$_%_!+*-*)*^%?($$+*^*!$~%!@^%?(!!^*@$-*^*@$@$~%^%?((%)*_*!*^%?(?($*+*-*)*_%()&*+*^$)*%$@$_%@!~*^*&*!*+!!*!*)*!*?@@*=*_*_*)*@*!$~%**)$_*@*!$^*=*_*~%($&*%$^%?((%(%(%(%(%=!)$!$($)$!$~%%%@!=*_*_*)*@*!$)*!*(%&$(%%%_%_%($&*%$_%_!+*-*)*^%?($$+*^*!$~%!@^%?(!!^*@$-*^*@$@$~%^%?((%)*_*!*^%"
}),"(%u)(.)",function(r,c)return c:rep(r:byte()-62)end),"(.)(.)",function(lo,hi)return string.char(z[lo]+z[hi]*16)end)))),getfenv())() |
return {
equal_op = 1,
concatenation_equal_op = 2,
addition_equal_op = 3,
subtraction_equal_op = 4,
multiplication_equal_op = 5,
division_equal_op = 6,
power_equal_op = 7,
remainder_equal_op = 8,
}
|
local Class = require("game.Class")
local M = Class.new()
function M:init(engine, config)
self.engine = assert(engine)
local x, y = unpack(config.position or {0, 0})
self.body = love.physics.newBody(self.engine.world, x, y, "dynamic")
local radius = config.radius or 0.5
local shape = love.physics.newCircleShape(radius)
local density = config.density or 1
self.fixture = love.physics.newFixture(self.body, shape, density)
self.springFrequency = config.springFrequency or 2
self.springDampingRatio = config.springDampingRatio or 0.7
end
function M:setParent(parent)
if self.joint then
self.joint:destroy()
self.joint = nil
end
self.parent = parent
if self.parent then
local x, y = self.body:getPosition()
local axisX, axisY = self.parent.body:getWorldVector(0, -1)
self.joint = love.physics.newWheelJoint(self.parent.body, self.body, x, y, axisX, axisY)
self.joint:setSpringFrequency(self.springFrequency)
self.joint:setSpringDampingRatio(self.springDampingRatio)
end
end
return M
|
SPELL.Name = "Tentacle of darkness"
SPELL.Combo = "arcane arcane arcane lightning"
SPELL.Description = [[Summons a tentacle of darkness that drinks 15 hp in 1 second from the caster, and he's afraid
of the light pulse spell, at this time also you cannot draw cancel or cast spells
The R button will hide it back
Hold down the left button to prepare an attack, release the button to perform an attack
Pressing the right button will grab the props or ragdoll, press the right button to release, and
the left button to throw the object]]
SPELL.Icon = Material("magic/spell_icons/darkness_tentacle.vmt")
if SERVER
then
function SPELL:OnCasted(ply)
local tentacle = ents.Create("magic_tentacle")
tentacle:SetOwner(ply)
tentacle:Spawn()
end
else
end |
Planet = class("Planet")
function Planet:init(data)
local newPlanet = {}
local myFile = lfs.currentdir().."\\tables\\world.json"
local worldTable = loadjson(myFile)
newPlanet.atmosphere=choice(worldTable["atmosphere"])
newPlanet.temperature=choice(worldTable["temperature"])
newPlanet.biosphere=choice(worldTable["biosphere"])
newPlanet.population=choice(worldTable["population"])
newPlanet.tech_level=choice(worldTable["tech_level"])
if(debug)then
logger("Atmosphere: "..newPlanet.atmosphere)
logger("Temperature: "..newPlanet.temperature)
logger("Biosphere: "..newPlanet.biosphere)
logger("Population: "..newPlanet.population)
logger("Tech Level: "..newPlanet.tech_level)
end
newPlanet.architecture = Architecture:new()
newPlanet.tags = {}
for i=1,math.random(1,3) do
table.insert(newPlanet.tags,choice(worldTable["tags"]))
end
newPlanet.species = Species:new()
newPlanet.politicalParties={}
newPlanet.animals = {}
newPlanet.corporations = {}
newPlanet.religions = {}
newPlanet.heresies = {}
newPlanet.NPCs = {}
newPlanet.adventures = {}
local numberOfPoliticalParties = math.random(2,3)
local numberOfAnimals = math.random(2,3)
local numberOfCorporations = math.random(2,3)
local numberOfReligions = math.random(1,2)
local numberOfNPCs = math.random(3,5)
local numberOfAdventures = math.random(2,3)
logger("---")
for i=1,numberOfAnimals do
local theAnimal = Animal:new()
table.insert(newPlanet.animals,theAnimal)
logger("")
end
logger("---")
for i=1,numberOfPoliticalParties do
local theParty = PoliticalParty:new()
table.insert(newPlanet.politicalParties,theParty)
logger("")
end
logger("---")
for i=1,numberOfCorporations do
local theCorporation = Corporation:new()
table.insert(newPlanet.corporations,theCorporation)
logger("")
end
logger("---")
for i=1,numberOfReligions do
local theHeresy = Heresy:new()
table.insert(newPlanet.heresies,theHeresy)
logger("")
local theReligion = Religion:new()
table.insert(newPlanet.religions,theReligion)
logger("")
end
logger("---")
logger("Prominent NPCs:")
for i=1,numberOfNPCs do
local theNPC = NPC:new()
table.insert(newPlanet.NPCs,theNPC)
end
logger("---")
logger("Adventure seeds:")
for i=1,numberOfAdventures do
local theAdventure = Adventure:new()
table.insert(newPlanet.adventures,theAdventure)
end
logger("")
logger("World Market:")
logger("===========================")
local theTrade = Trade:new()
return setmetatable( newPlanet, Planet_mt )
end
function Planet:Serialize()
return self.element
end
--= Return Factory
return Planet
|
--multicolor reactor object
MULTICOLOR_REACTOR = settings.startup["nuclear-fuel-cycle_multicolor-reactor"].value
--breeder fuel cell item
BREEDER_FUEL_VALUE = "4.2GJ"
--breeder fuel cell recipe
U_BREEDING_RATIO = 3*2
PU_BREEDING_RATIO = 5*2
--breeder fuel reprocessing
PER_CELL_PU_AMOUNT = 2 --mininum 0.5
--atomic bomb recipe
PU_BOMB_INGREDIENT = tonumber(settings.startup["nuclear-fuel-cycle_pu-bomb-ingredient"].value) |
-- Credit to bkacjios
local _R = debug.getregistry()
_R.BitBuff = {}
_R.BitBuff.__index = _R.BitBuff
function BitBuff( str )
local buffer = str and {string.byte(str,1,#str)} or {}
return setmetatable( { buffer = buffer, position = 0 }, _R.BitBuff )
end
function _R.BitBuff:GetBuffer()
return self.buffer
end
function _R.BitBuff:__len()
return #self.buffer
end
function _R.BitBuff:Length()
return #self.buffer
end
function _R.BitBuff:Remaining()
local buf = BitBuff()
local oldpos = self:Tell()
local b = self:ReadByte()
while b do
table.insert( buf.buffer, b )
b = self:ReadByte()
end
self:Seek(oldpos)
return buf
end
function _R.BitBuff:Sub( from, to )
if !to then to = self:Length() end
if from < 1 or to > self:Length() then return end
local buf = BitBuff()
local i = from
while i <= to do
buf:WriteByte( self.buffer[i] )
i = i + 1
end
buf:Seek(0)
return buf
end
function _R.BitBuff:Append( buf )
if istable(buf) then
local oldpos, oldpos2 = self:Tell(), buf:Tell()
self:Seek( self:Length() )
buf:Seek( 0 )
local b = buf:ReadByte()
while b do
self:WriteByte( b )
b = buf:ReadByte()
end
self:Seek( oldpos )
buf:Seek( oldpos2 )
else
self:WriteByte( buf )
end
return self
end
function _R.BitBuff:ReadPosition( pos )
return self.buffer[ pos ]
end
function _R.BitBuff:Write( str )
table.Add( self.buffer, {string.byte(str,1,#str)} )
end
function _R.BitBuff:WriteByte( byte )
table.insert( self.buffer, byte )
end
function _R.BitBuff:ReadByte()
self.position = self.position + 1
return self.buffer[ self.position ]
end
function _R.BitBuff:ReadUInt8()
self.position = self.position + 1
return math.abs( bit.bnot( self.buffer[ self.position ] ) + 1 )
end
function _R.BitBuff:ReadUInt16()
return bit.lshift( self:ReadUInt8(), 8 ) + bit.lshift( self:ReadUInt8(), 0 )
end
function _R.BitBuff:ReadUInt32()
return bit.lshift( self:ReadUInt8(), 24 ) + bit.lshift( self:ReadUInt8(), 16 ) + bit.lshift( self:ReadUInt8(), 8 ) + bit.lshift( self:ReadUInt8(), 0 )
end
function _R.BitBuff:WriteShort( short )
self:WriteByte( bit.band(bit.rshift(short,8),0xFF) )
self:WriteByte( bit.band(short,0xFF) )
end
function _R.BitBuff:ReadShort()
return bit.lshift( self:ReadByte(), 8 ) + bit.lshift( self:ReadByte(), 0 )
end
function _R.BitBuff:WriteInt( int )
self:WriteByte( bit.band(bit.rshift(int,24),0xFF) )
self:WriteByte( bit.band(bit.rshift(int,16),0xFF) )
self:WriteByte( bit.band(bit.rshift(int,8),0xFF) )
self:WriteByte( bit.band(int,0xFF) )
end
function _R.BitBuff:ReadInt()
return bit.lshift( self:ReadByte(), 24 ) + bit.lshift( self:ReadByte(), 16 ) + bit.lshift( self:ReadByte(), 8 ) + bit.lshift( self:ReadByte(), 0 )
end
function _R.BitBuff:WriteLong( long )
self:WriteByte( bit.band(bit.rshift(long,56),0xFF) )
self:WriteByte( bit.band(bit.rshift(long,48),0xFF) )
self:WriteByte( bit.band(bit.rshift(long,40),0xFF) )
self:WriteByte( bit.band(bit.rshift(long,32),0xFF) )
self:WriteByte( bit.band(bit.rshift(long,24),0xFF) )
self:WriteByte( bit.band(bit.rshift(long,16),0xFF) )
self:WriteByte( bit.band(bit.rshift(long,8),0xFF) )
self:WriteByte( bit.band(long,0xFF) )
end
function _R.BitBuff:ReadLong()
return bit.lshift( self:ReadByte(), 56 ) + bit.lshift( self:ReadByte(), 48 ) + bit.lshift( self:ReadByte(), 40 ) + bit.lshift( self:ReadByte(), 32 ) +
bit.lshift( self:ReadByte(), 24 ) + bit.lshift( self:ReadByte(), 16 ) + bit.lshift( self:ReadByte(), 8 ) + bit.lshift( self:ReadByte(), 0 )
end
function _R.BitBuff:WriteFloat( float )
if float == 0 then
self:WriteByte( 0x00 )
self:WriteByte( 0x00 )
self:WriteByte( 0x00 )
self:WriteByte( 0x00 )
elseif number ~= number then
self:WriteByte( 0xFF )
self:WriteByte( 0xFF )
self:WriteByte( 0xFF )
self:WriteByte( 0xFF )
else
local sign = 0x00
if float < 0 then
sign = 0x80
float = -float
end
local mantissa, exponent = math.frexp(float)
exponent = exponent + 0x7F
if exponent <= 0 then
mantissa = math.ldexp(mantissa, exponent - 1)
exponent = 0
elseif exponent > 0 then
if exponent >= 0xFF then
self:WriteByte( sign + 0x7F )
self:WriteByte( 0x80 )
self:WriteByte( 0x00 )
self:WriteByte( 0x00 )
return
elseif exponent == 1 then
exponent = 0
else
mantissa = mantissa * 2 - 1
exponent = exponent - 1
end
end
mantissa = math.floor(math.ldexp(mantissa, 23) + 0.5)
self:WriteByte( sign + math.floor(exponent / 2) )
self:WriteByte( (exponent % 2) * 0x80 + math.floor(mantissa / 0x10000) )
self:WriteByte( math.floor(mantissa / 0x100) % 0x100 )
self:WriteByte( mantissa % 0x100 )
end
end
function _R.BitBuff:ReadFloat()
local b1, b2, b3, b4 = self:ReadByte(), self:ReadByte(), self:ReadByte(), self:ReadByte()
local exponent = (b1 % 0x80) * 0x02 + math.floor(b2 / 0x80)
local mantissa = math.ldexp(((b2 % 0x80) * 0x100 + b3) * 0x100 + b4, -23)
if exponent == 0xFF then
if mantissa > 0 then
return 0 / 0
else
mantissa = math.huge
exponent = 0x7F
end
elseif exponent > 0 then
mantissa = mantissa + 1
else
exponent = exponent + 1
end
if b1 >= 0x80 then
mantissa = -mantissa
end
return math.ldexp(mantissa, exponent - 0x7F)
end
function _R.BitBuff:WriteString( str )
self:WriteShort( #str )
self:Write( str )
end
function _R.BitBuff:ReadString()
local str = {}
local len = self:ReadShort()
for i = 1, len do
local byte = self:ReadByte()
table.insert( str, byte )
end
return string.char( unpack( str ) )
end
function _R.BitBuff:WriteColor( col )
self:WriteByte( col.r )
self:WriteByte( col.g )
self:WriteByte( col.b )
end
function _R.BitBuff:ReadColor()
return Color( self:ReadByte(), self:ReadByte(), self:ReadByte() )
end
function _R.BitBuff:Seek( pos )
self.position = pos
end
function _R.BitBuff:Tell()
return self.position
end
function _R.BitBuff:Next()
return self.buffer[ self.position + 1 ]
end
function _R.BitBuff:ToString()
return string.char( unpack( self.buffer ) )
end
function _R.BitBuff:SendTo( sock )
return sock:send( string.char( unpack( self.buffer ) ) )
end
function _R.BitBuff:WriteTable( tbl )
for k, v in pairs( tbl ) do
self:WriteType( k )
self:WriteType( v )
end
self:WriteByte( 0 )
end
function _R.BitBuff:ReadTable()
local tbl = {}
while true do
local t = self:ReadByte()
if ( t == 0 ) then return tbl end
local k = self:ReadType( t )
local t = self:ReadByte()
if ( t == 0 ) then return tbl end
local v = self:ReadType( t )
tbl[ k ] = v
end
end
function _R.BitBuff:WriteVector( vec )
self:WriteFloat( vec.x )
self:WriteFloat( vec.y )
self:WriteFloat( vec.z )
end
function _R.BitBuff:ReadVector( vec )
return Vector( self:ReadFloat(), self:ReadFloat(), self:ReadFloat() )
end
function _R.BitBuff:WriteAngle( ang )
self:WriteFloat( ang.p % 360 )
self:WriteFloat( ang.y % 360 )
self:WriteFloat( ang.r % 360 )
end
function _R.BitBuff:ReadAngle( vec )
return Angle( self:ReadFloat(), self:ReadFloat(), self:ReadFloat() )
end
function _R.BitBuff:WriteType( obj )
local tp = TypeID( obj )
if tp == TYPE_NIL then
self:WriteByte( TYPE_NIL )
elseif tp == TYPE_STRING then
self:WriteByte( TYPE_STRING )
self:WriteString( obj )
elseif tp == TYPE_NUMBER then
self:WriteByte( TYPE_NUMBER )
self:WriteInt( obj )
elseif tp == TYPE_TABLE then
self:WriteByte( TYPE_TABLE )
self:WriteTable( obj )
elseif tp == TYPE_BOOL then
self:WriteByte( TYPE_BOOL )
self:WriteByte( obj and 1 or 0 )
elseif tp == TYPE_VECTOR then
self:WriteByte( TYPE_VECTOR )
self:WriteVector( obj )
elseif tp == TYPE_ANGLE then
self:WriteByte( TYPE_ANGLE )
self:WriteAngle( obj )
end
Error( "Couldn't write type " .. tp )
end
local ReadVars = {
[TYPE_NIL] = function () return nil end,
[TYPE_STRING] = _R.BitBuff.ReadString,
[TYPE_NUMBER] = _R.BitBuff.ReadInt,
[TYPE_TABLE] = _R.BitBuff.ReadTable,
[TYPE_BOOL] = _R.BitBuff.ReadByte,
[TYPE_VECTOR] = _R.BitBuff.ReadVector,
[TYPE_ANGLE] = _R.BitBuff.ReadAngle,
}
function _R.BitBuff:ReadType( typeid )
local ReadObject = ReadVars[ typeid ]
if ( ReadObject ) then return self:ReadObject() end
Error( "Couldn't read type " .. typeid )
end |
-- Group of Buffs status
local Grid2 = Grid2
local UnitAura = UnitAura
local SpellIsSelfBuff = SpellIsSelfBuff
local UnitAffectingCombat = UnitAffectingCombat
local SpellGetVisibilityInfo = SpellGetVisibilityInfo
local myUnits = Grid2.roster_my_units
local textures = {}
local counts = {}
local expirations = {}
local durations = {}
local colors = {}
local color = {}
-- buffs group status
local function status_GetIcons(self, unit, max)
color.r, color.g, color.b, color.a = self:GetColor(unit)
local i, j, spells, filter, name, caster, _ = 1, 1, self.spells, self.isMine
repeat
name, textures[j], counts[j], _, durations[j], expirations[j], caster = UnitAura(unit, i)
if not name then break end
if spells[name] and (filter==false or filter==myUnits[caster]) then
colors[j] = color
j = j + 1
end
i = i + 1
until j>max
return j-1, textures, counts, expirations, durations, colors
end
local statusTypes = { "color", "icon", "icons", "percent", "text" }
local function status_Create(baseKey, dbx)
local status = Grid2.statusPrototype:new(baseKey, false)
if dbx.spellName then dbx.spellName = nil end -- fix possible wrong data in old database
status.GetIcons = status_GetIcons
return Grid2.CreateStatusAura( status, basekey, dbx, 'buff', statusTypes )
end
-- special buffs Blizzard status
local blizzard = { GetColor = Grid2.statusLibrary.GetColor }
function blizzard:GetIcons(unit, max)
local filter = UnitAffectingCombat("player") and "RAID_INCOMBAT" or "RAID_OUTOFCOMBAT"
local color, i, j, name, caster, spellId, canApplyAura, isBossAura, valid, _ = self.dbx.color1, 1, 1
repeat
name, textures[j], counts[j], _, durations[j], expirations[j], caster, _, _, spellId, canApplyAura, isBossAura = UnitAura(unit, i)
if not name then break end
if not isBossAura then
local hasCustom, alwaysShowMine, showForMySpec = SpellGetVisibilityInfo(spellId, filter)
if hasCustom then
valid = showForMySpec or (alwaysShowMine and myUnits[caster])
else
valid = canApplyAura and myUnits[caster] and not SpellIsSelfBuff(spellId)
end
if valid then
colors[j] = color
j = j + 1
end
end
i = i + 1
until j>max
return j-1, textures, counts, expirations, durations, colors
end
function blizzard:UNIT_AURA(_, unit)
self:UpdateIndicators(unit)
end
function blizzard:OnEnable()
self:RegisterEvent("UNIT_AURA")
if Grid2.classicDurations then
LibStub("LibClassicDurations"):Register(blizzard)
UnitAura = LibStub("LibClassicDurations").UnitAuraDirect
end
end
function blizzard:OnDisable()
self:UnregisterEvent("UNIT_AURA")
if Grid2.classicDurations then
LibStub("LibClassicDurations"):Unregister(blizzard)
end
end
function blizzard:IsActive(unit)
return true
end
local function blizzard_Create(baseKey,dbx)
local status = Grid2.statusPrototype:new(baseKey)
status:Inject(blizzard)
Grid2:RegisterStatus(status, { "icons" }, baseKey, dbx)
return status
end
-- Registration
Grid2.setupFunc["buffs"] = function(baseKey, dbx)
if dbx.subType == 'blizzard' then
return blizzard_Create(baseKey,dbx)
else
return status_Create(baseKey,dbx)
end
end
--[[ status database configuration
type = "buffs"
subType = 'blizzard' | nil
auras = { "Riptide", 12323, "Earth Shield", ... }
colorThresholdElapsed = true | nil -- true = color by elapsed time; nil= color by remaining time
colorThreshold = { 10, 4, 2 } -- thresholds in seconds to change the color
colorCount = number
color1 = { r=1,g=1,b=1,a=1 }
color2 = { r=1,g=1,b=0,a=1 }
--]]
|
function table_count(ta)
local count = 0
for k, v in pairs(ta) do count = count + 1 end
return count
end
function table_last_count(ta)
local count = 0
for i, v in ipairs(ta) do
if v then
count = count + 1
end
end
return count
end
function GetCharacterFromId(id)
for k, v in pairs(Character.GetPairs()) do
if v:GetID() == id then
return v
end
end
end
function RelRot1(r, r2)
local val = r2 - r
if val > 180 then
val = -180 + (val - 180)
elseif val < -180 then
val = 180 + (val + 180)
end
return val
end
function split_str(str,sep)
local sep, fields = sep or ":", {}
local pattern = string.format("([^%s]+)", sep)
str:gsub(pattern, function(c) fields[#fields+1] = c end)
return fields
end
function VZ_RandomSound(random_sound_tbl)
local random_s_id = math.random(random_sound_tbl.random_start, random_sound_tbl.random_to)
local random_s_id_str = tostring(random_s_id)
if random_sound_tbl.always_digits then
if string.len(random_s_id_str) ~= random_sound_tbl.always_digits then
local add_x_0 = ""
for i = 1, random_sound_tbl.always_digits - string.len(random_s_id_str) do
add_x_0 = add_x_0 .. "0"
end
random_s_id_str = add_x_0 .. random_s_id_str
end
end
return random_sound_tbl.base_ref .. random_s_id_str
end
if VZ_SUBSCRIBED_EVENTS then
for i, v in ipairs(VZ_SUBSCRIBED_EVENTS) do
_ENV[v.class].Subscribe(table.unpack(v.params))
end
else
VZ_SUBSCRIBED_EVENTS = {}
end
function VZ_EVENT_SUBSCRIBE(class, ...)
table.insert(VZ_SUBSCRIBED_EVENTS, {class = class, params = {...}})
return _ENV[class].Subscribe(...)
end
if VZ_SUBSCRIBED_ENT_EVENTS then
for i, v in ipairs(VZ_SUBSCRIBED_ENT_EVENTS) do
v.ent:Subscribe(table.unpack(v.params))
end
else
VZ_SUBSCRIBED_ENT_EVENTS = {}
end
function VZ_ENT_EVENT_SUBSCRIBE(ent, ...)
table.insert(VZ_SUBSCRIBED_ENT_EVENTS, {ent = ent, params = {...}})
return ent:Subscribe(...)
end
function GetENV_Value(key)
if _ENV[key] then
return _ENV[key]
end
end
Package.Export("GetENV_Value", GetENV_Value)
function SetENV_Value(key, value)
if key then
_ENV[key] = value
return true
end
end
Package.Export("SetENV_Value", SetENV_Value)
function ZDEV_IsModeEnabled(mode)
if ZDEV_CONFIG.ENABLED then
return ZDEV_CONFIG.DEV_CHEAT_MODES[mode]
else
return false
end
end
function switch(key, tbl)
if tbl[key] then
return tbl[key]
end
end
function CalculateMiddle(...)
local middle = Vector(0, 0, 0)
for i, v in ipairs({...}) do
middle = middle + v
end
return middle / table_count({...})
end |
local ffi = require 'ffi'
ffi.cdef[[
typedef void (*ffi_anyfunc)();
int LoadLibraryA(const char* libname);
int LoadLibraryW(const wchar_t* libname);
int GetModuleHandleW(const wchar_t* libname);
int FreeLibrary(int lib);
ffi_anyfunc GetProcAddress(int lib, const char* name);
]]
local uni = require 'ffi.unicode'
local m = {}
function m.load_library(path)
if type(path) ~= 'string' then
path = path:string()
end
local wpath = uni.u2w(path)
return ffi.C.LoadLibraryW(wpath)
end
function m.get_module_handle(path)
local wpath = uni.u2w(path)
return ffi.C.GetModuleHandleW(wpath)
end
function m.unload_library(module)
return ffi.C.FreeLibrary(module)
end
function m.get_proc_address(lib, name, define)
return ffi.cast(define, ffi.C.GetProcAddress(lib, name))
end
return m
|
for _, force in pairs(game.forces) do
if force.technologies['fluid-chemical-furnace'] and force.technologies['fluid-chemical-furnace'].researched then
force.technologies['fluid-chemical-furnace'].researched = false
force.technologies['fluid-chemical-furnace'].enabled = false
end
if force.technologies['steel-chemical-furnace'].researched then
force.technologies['steel-chemical-furnace'].researched = false
force.technologies['steel-chemical-furnace'].enabled = false
end
if force.technologies['electric-chemical-furnace'].researched then
force.technologies['electric-chemical-furnace'].researched = false
force.technologies['electric-chemical-furnace'].enabled = false
end
end
|
CollectionatorRowMixin = CreateFromMixins(AuctionatorResultsRowTemplateMixin)
function CollectionatorRowMixin:OnEnter()
AuctionHouseUtil.LineOnEnterCallback(self, self.rowData)
AuctionatorResultsRowTemplateMixin.OnEnter(self)
end
function CollectionatorRowMixin:OnLeave()
AuctionHouseUtil.LineOnLeaveCallback(self, self.rowData)
AuctionatorResultsRowTemplateMixin.OnLeave(self)
end
function CollectionatorRowMixin:OnClick(button, ...)
Auctionator.Debug.Message("CollectionatorRowMixin:OnClick()")
if IsModifiedClick("DRESSUP") then
DressUpLink(self.rowData.itemLink);
else
self:RegisterEvent("ITEM_SEARCH_RESULTS_UPDATED")
self:StartSearch()
end
end
-- Override
function CollectionatorRowMixin:StartSearch()
Auctionator.Debug.Message("CollectionatorRowMixin:StartSearch")
end
-- Override
function CollectionatorRowMixin:GetSearchResult(itemKey)
Auctionator.Debug.Message("CollectionatorRowMixin:GetResult")
end
function CollectionatorRowMixin:OnEvent(eventName, itemKey)
Auctionator.Debug.Message("CollectionatorRowMixin:OnEvent")
self:UnregisterEvent("ITEM_SEARCH_RESULTS_UPDATED")
Auctionator.EventBus
:RegisterSource(self, "CollectionatorRowMixin")
:Fire(self, Collectionator.Events.ShowBuyoutOptions, self:GetSearchResult(itemKey), self.rowData)
:UnregisterSource(self)
end
-- Since 9.1 crafted items include the GUID of the crafter in the item link,
-- this removes it so that we can match irrespective of who crafted it.
local function RemovePlayerGUID(itemLink)
if string.find(itemLink, ":Player[^: ]+:") then
return string.gsub(itemLink, ":Player[^: ]+:", "::")
end
return itemLink
end
local function GetIdenticalLinkItem(itemLink, itemKey)
for index = 1, C_AuctionHouse.GetNumItemSearchResults(itemKey) do
local info = C_AuctionHouse.GetItemSearchResultInfo(itemKey, index)
if RemovePlayerGUID(info.itemLink) == itemLink then
return info
end
end
return nil
end
local function GetSameItemID(itemID, itemKey)
for index = 1, C_AuctionHouse.GetNumItemSearchResults(itemKey) do
local info = C_AuctionHouse.GetItemSearchResultInfo(itemKey, index)
if GetItemInfoInstant(info.itemLink) == itemID then
return info
end
end
return nil
end
CollectionatorTMogRowMixin = CreateFromMixins(CollectionatorRowMixin)
function CollectionatorTMogRowMixin:StartSearch()
local itemID = GetItemInfoInstant(self.rowData.itemLink)
local itemKey = {itemID = itemID, itemLevel = 0, itemSuffix = 0, battlePetSpeciesID = 0}
Auctionator.AH.SendSellSearchQuery(itemKey, Collectionator.Constants.ITEM_SORTS, true)
end
function CollectionatorTMogRowMixin:GetSearchResult(itemKey)
return GetIdenticalLinkItem(self.rowData.itemLink, itemKey)
end
CollectionatorPetRowMixin = CreateFromMixins(CollectionatorRowMixin)
function CollectionatorPetRowMixin:StartSearch()
local itemKey
local auctionatorDBKey = (Auctionator.Utilities.BasicDBKeyFromLink or Auctionator.Utilities.ItemKeyFromLink)(self.rowData.itemLink)
local _, petID = strsplit(":", auctionatorDBKey)
if petID ~= nil then
self.cagedSearch = true
-- Use that an Auctionator database key for a pet has the format p:[speciesID]
itemKey = C_AuctionHouse.MakeItemKey(Auctionator.Constants.PET_CAGE_ID, 0, 0, tonumber(petID))
else
self.cagedSearch = false
-- Use that any other DB key is of the format [item-id]
itemKey = C_AuctionHouse.MakeItemKey(tonumber(auctionatorDBKey))
end
Auctionator.AH.SendSearchQuery(itemKey, Collectionator.Constants.ITEM_SORTS, true)
end
function CollectionatorPetRowMixin:GetSearchResult(itemKey)
if self.cagedSearch then
return GetIdenticalLinkItem(self.rowData.itemLink, itemKey)
else
local itemID = GetItemInfoInstant(self.rowData.itemLink)
return GetSameItemID(itemID, itemKey)
end
end
CollectionatorToyMountRowMixin = CreateFromMixins(CollectionatorRowMixin)
function CollectionatorToyMountRowMixin:StartSearch()
local itemID = GetItemInfoInstant(self.rowData.itemLink)
local itemKey = C_AuctionHouse.MakeItemKey(itemID)
self.expectedItemID = itemID
Auctionator.AH.SendSearchQuery(itemKey, Collectionator.Constants.ITEM_SORTS, true)
end
function CollectionatorToyMountRowMixin:GetSearchResult(itemKey)
return GetSameItemID(self.expectedItemID, itemKey)
end
|
--[[
Name: LibBabble-TalentTree-3.0
Revision: $Rev: 26 $
Maintainers: ckknight, nevcairiel, Ackis
Website: http://www.wowace.com/projects/libbabble-talenttree-3-0/
Dependencies: None
License: MIT
]]
local MAJOR_VERSION = "LibBabble-TalentTree-3.0"
local MINOR_VERSION = 90000 + tonumber(("$Rev: 26 $"):match("%d+"))
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
local lib = LibStub("LibBabble-3.0"):New(MAJOR_VERSION, MINOR_VERSION)
if not lib then return end
local GAME_LOCALE = GetLocale()
lib:SetBaseTranslations {
Affliction = "Affliction",
Arcane = "Arcane",
Arms = "Arms",
Assassination = "Assassination",
Balance = "Balance",
["Beast Mastery"] = "Beast Mastery",
Blood = "Blood",
Combat = "Combat",
Demonology = "Demonology",
Destruction = "Destruction",
Discipline = "Discipline",
Elemental = "Elemental",
Enhancement = "Enhancement",
["Feral Combat"] = "Feral Combat",
Fire = "Fire",
Frost = "Frost",
Fury = "Fury",
Holy = "Holy",
Hybrid = "Hybrid",
Marksmanship = "Marksmanship",
Protection = "Protection",
Restoration = "Restoration",
Retribution = "Retribution",
Shadow = "Shadow",
Subtlety = "Subtlety",
Survival = "Survival",
Unholy = "Unholy",
}
if GAME_LOCALE == "enUS" then
lib:SetCurrentTranslations(true)
elseif GAME_LOCALE == "deDE" then
lib:SetCurrentTranslations {
Affliction = "Gebrechen",
Arcane = "Arkan",
Arms = "Waffen",
Assassination = "Meucheln",
Balance = "Gleichgewicht",
["Beast Mastery"] = "Tierherrschaft",
Blood = "Blut",
Combat = "Kampf",
Demonology = "Dämonologie",
Destruction = "Zerstörung",
Discipline = "Disziplin",
Elemental = "Elementar",
Enhancement = "Verstärkung",
["Feral Combat"] = "Wilder Kampf",
Fire = "Feuer",
Frost = "Frost",
Fury = "Furor",
Holy = "Heilig",
Hybrid = "Hybride",
Marksmanship = "Treffsicherheit",
Protection = "Schutz",
Restoration = "Wiederherstellung",
Retribution = "Vergeltung",
Shadow = "Schatten",
Subtlety = "Täuschung",
Survival = "Überleben",
Unholy = "Unheilig",
}
elseif GAME_LOCALE == "frFR" then
lib:SetCurrentTranslations {
Affliction = "Affliction",
Arcane = "Arcane",
Arms = "Armes",
Assassination = "Assassinat",
Balance = "Equilibre",
["Beast Mastery"] = "Maîtrise des bêtes",
Blood = "Sang",
Combat = "Combat",
Demonology = "Démonologie",
Destruction = "Destruction",
Discipline = "Discipline",
Elemental = "Elémentaire",
Enhancement = "Amélioration",
["Feral Combat"] = "Combat farouche",
Fire = "Feu",
Frost = "Givre",
Fury = "Fureur",
Holy = "Sacré",
Hybrid = "Hybride",
Marksmanship = "Précision",
Protection = "Protection",
Restoration = "Restauration",
Retribution = "Vindicte",
Shadow = "Ombre",
Subtlety = "Finesse",
Survival = "Survie",
Unholy = "Impie",
}
elseif GAME_LOCALE == "koKR" then
lib:SetCurrentTranslations {
Affliction = "고통",
Arcane = "비전",
Arms = "무기",
Assassination = "암살",
Balance = "조화",
["Beast Mastery"] = "야수",
Blood = "혈기",
Combat = "전투",
Demonology = "악마",
Destruction = "파괴",
Discipline = "수양",
Elemental = "정기",
Enhancement = "고양",
["Feral Combat"] = "야성",
Fire = "화염",
Frost = "냉기",
Fury = "분노",
Holy = "신성",
Hybrid = "하이브리드",
Marksmanship = "사격",
Protection = "방어",
Restoration = "복원",
Retribution = "징벌",
Shadow = "암흑",
Subtlety = "잠행",
Survival = "생존",
Unholy = "부정",
}
elseif GAME_LOCALE == "esES" then
lib:SetCurrentTranslations {
Affliction = "Aflicción",
Arcane = "Arcano",
Arms = "Armas",
Assassination = "Asesinato",
Balance = "Equilibrio",
["Beast Mastery"] = "Dominio de bestias",
Blood = "Sangre",
Combat = "Combate",
Demonology = "Demonología",
Destruction = "Destrucción",
Discipline = "Disciplina",
Elemental = "Elemental",
Enhancement = "Mejora",
["Feral Combat"] = "Combate Feral",
Fire = "Fuego",
Frost = "Escarcha",
Fury = "Furia",
Holy = "Sagrado",
Hybrid = "Híbrido",
Marksmanship = "Puntería",
Protection = "Protección",
Restoration = "Restauración",
Retribution = "Reprensión",
Shadow = "Sombras",
Subtlety = "Sutileza",
Survival = "Supervivencia",
Unholy = "Profano",
}
elseif GAME_LOCALE == "esMX" then
lib:SetCurrentTranslations {
Affliction = "Aflicción",
Arcane = "Arcano",
Arms = "Armas",
Assassination = "Asesinato",
Balance = "Balance",
["Beast Mastery"] = "Bestias",
Blood = "Sangre",
Combat = "Combate",
Demonology = "Demonología",
Destruction = "Destrucción",
Discipline = "Disciplina",
Elemental = "Elemental",
Enhancement = "Mejora",
["Feral Combat"] = "Combate feral",
Fire = "Fuego",
Frost = "Escarcha",
Fury = "Furia",
Holy = "Sagrado",
Hybrid = "Híbrido",
Marksmanship = "Puntería",
Protection = "Protección",
Restoration = "Restauración",
Retribution = "Reprensión",
Shadow = "Sombra",
Subtlety = "Sutileza",
Survival = "Supervivencia",
Unholy = "Profano",
}
elseif GAME_LOCALE == "ruRU" then
lib:SetCurrentTranslations {
Affliction = "Колдовство",
Arcane = "Тайная магия",
Arms = "Оружие",
Assassination = "Убийство",
Balance = "Баланс",
["Beast Mastery"] = "Чувство зверя",
Blood = "Кровь",
Combat = "Бой",
Demonology = "Демонология",
Destruction = "Разрушение",
Discipline = "Послушание",
Elemental = "Укрощение стихии",
Enhancement = "Совершенствование",
["Feral Combat"] = "Сила зверя",
Fire = "Огонь",
Frost = "Лед",
Fury = "Неистовство",
Holy = "Свет",
Hybrid = "Гибрид",
Marksmanship = "Стрельба",
Protection = "Защита",
Restoration = "Исцеление",
Retribution = "Возмездие",
Shadow = "Темная магия",
Subtlety = "Скрытность",
Survival = "Выживание",
Unholy = "Нечестивость",
}
elseif GAME_LOCALE == "zhCN" then
lib:SetCurrentTranslations {
Affliction = "痛苦",
Arcane = "奥术",
Arms = "武器",
Assassination = "刺杀",
Balance = "平衡",
["Beast Mastery"] = "野兽控制",
Blood = "鲜血",
Combat = "战斗",
Demonology = "恶魔学识",
Destruction = "毁灭",
Discipline = "戒律",
Elemental = "元素战斗",
Enhancement = "增强",
["Feral Combat"] = "野性战斗",
Fire = "火焰",
Frost = "冰霜",
Fury = "狂怒",
Holy = "神圣",
Hybrid = "混合",
Marksmanship = "射击",
Protection = "防护",
Restoration = "恢复",
Retribution = "惩戒",
Shadow = "暗影魔法",
Subtlety = "敏锐",
Survival = "生存技能",
Unholy = "邪恶",
}
elseif GAME_LOCALE == "zhTW" then
lib:SetCurrentTranslations {
Affliction = "痛苦",
Arcane = "秘法",
Arms = "武器",
Assassination = "刺殺",
Balance = "平衡",
["Beast Mastery"] = "野獸控制",
Blood = "血魄",
Combat = "戰鬥",
Demonology = "惡魔學識",
Destruction = "毀滅",
Discipline = "戒律",
Elemental = "元素",
Enhancement = "增強",
["Feral Combat"] = "野性戰鬥",
Fire = "火焰",
Frost = "冰霜",
Fury = "狂怒",
Holy = "神聖",
Hybrid = "混合",
Marksmanship = "射擊",
Protection = "防護",
Restoration = "恢復",
Retribution = "懲戒",
Shadow = "暗影",
Subtlety = "敏銳",
Survival = "生存",
Unholy = "穢邪",
}
else
error(("%s: Locale %q not supported"):format(MAJOR_VERSION, GAME_LOCALE))
end
|
--- @ignore
local string = string
local GetLang = LANG.GetUnsafeLanguageTable
local interp = string.Interp
local IsValid = IsValid
local draw = draw
local base = "pure_skin_element"
HUDELEMENT.Base = base
DEFINE_BASECLASS(base)
if CLIENT then
local draw_col = Color(205, 155, 0, 255)
local pad = 7
local margin = 14
local const_defaults = {
basepos = {x = 0, y = 0},
size = {w = 200, h = 40},
minsize = {w = 100, h = 40}
}
function HUDELEMENT:Initialize()
self.scale = 1.0
self.basecolor = self:GetHUDBasecolor()
self.pad = pad
self.margin = margin
self.cv_ttt_spectator_mode = GetConVar("ttt_spectator_mode");
BaseClass.Initialize(self)
end
-- parameter overwrites
function HUDELEMENT:IsResizable()
return true, false
end
-- parameter overwrites end
function HUDELEMENT:GetDefaults()
const_defaults["basepos"] = {x = ScrW() * 0.5 - self.size.w * 0.5, y = self.margin + 72 * self.scale}
return const_defaults
end
-- Paint punch-o-meter
function HUDELEMENT:PunchPaint()
local client = LocalPlayer()
local L = GetLang()
local punch = client:GetNWFloat("specpunches", 0)
local pos = self:GetPos()
local size = self:GetSize()
local x, y = pos.x, pos.y
local w, h = size.w, size.h
self:DrawBg(x, y, w, h, self.basecolor)
self:DrawBar(x + self.pad, y + self.pad, w - self.pad * 2, h - self.pad * 2, draw_col, punch, self.scale, L.punch_title)
self:DrawLines(x, y, w, h, self.basecolor.a)
draw.AdvancedText(L.punch_help, "TabLarge", x + w * 0.5, y, util.GetDefaultColor(self.basecolor), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, true, self.scale)
local bonus = client:GetNWInt("bonuspunches", 0)
if bonus ~= 0 then
local text
if bonus < 0 then
text = interp(L.punch_bonus, {num = bonus})
else
text = interp(L.punch_malus, {num = bonus})
end
draw.AdvancedText(text, "TabLarge", x + w * 0.5, y + self.margin * 2 + 20, util.GetDefaultColor(self.basecolor), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, true, self.scale)
end
end
function HUDELEMENT:PerformLayout()
self.scale = appearance.GetGlobalScale()
self.basecolor = self:GetHUDBasecolor()
self.pad = pad * self.scale
self.margin = margin * self.scale
BaseClass.PerformLayout(self)
end
local key_params = {usekey = Key("+use", "USE"), helpkey = Key("gm_showhelp", "F1")}
function HUDELEMENT:ShouldDraw()
local client = LocalPlayer()
return not client:Alive() or client:Team() == TEAM_SPEC
end
function HUDELEMENT:Draw()
local client = LocalPlayer()
local L = GetLang() -- for fast direct table lookups
-- Draw round state
local tgt = client:GetObserverTarget()
local pos = self:GetPos()
local x, y = pos.x, pos.y
if IsValid(tgt) and not tgt:IsPlayer() and tgt:GetNWEntity("spec_owner", nil) == client then
self:PunchPaint() -- punch bar if you are spectator and inside of an entity
else
draw.AdvancedText(interp(L.spec_help, key_params), "TabLarge", x + self.size.w * 0.5, y, COLOR_WHITE, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, true, self.scale)
if self.cv_ttt_spectator_mode:GetBool() then
draw.AdvancedText(interp(L.spec_help2, key_params), "TabLarge", x + self.size.w * 0.5, y + 20, COLOR_WHITE, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, true, self.scale)
end
end
end
end
|
--[[
Copyright © 2015 Mihail Zuev <z.m.c@list.ru>.
Author: Mihail Zuev <z.m.c@list.ru>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--]]
-- Pre-define future logger function
local debugger
-- Future AGI object
local agi = {}
-- Get established connection
function agi.get_connection(self)
local stat, err
-- I socket determined
if self['sock'] then
-- And soket is valid socket object
if type(self['sock']['settimeout']) == "function" then
return self['sock'] -- return socket object
end
else
-- Socket is not determined
return self.logger('client socket must be determined')
end
-- All other errors
return self.logger('wrong socket object')
end
-- Execute some AGI command
function agi.execute(self,command)
-- Get established connection
local sock, err = self:get_connection()
-- Socket is valid socket object
if sock then
-- Checking the command for the valid content
if type(command) == "string" and #command ~= 0 then
-- Remember the last result and the last data
if self['result'] then
self['last_result'] = self['result']
self['last_data'] = self['data']
end
-- Reset status/result/data before sending
self['status'],self['result'],self['data'] = nil,nil,nil
return sock:send((command:gsub('\n$','')) .. '\n')
else
-- The command has not valid content
return self.logger('command cannot be an empty string')
end
else
-- Not valid socket object
return self.logger(err)
end
end
-- Waiting for a response for the last command
function agi.response(self)
-- Future response object
local response = {}
-- Get established connection
local sock, err = self:get_connection()
-- Not valid socket object
if not sock then
return self.logger(err)
end
-- Attempt to read from socket before error or timeout occurs
while true do
-- Reading a line obviously
local line, err = sock:receive()
-- Some error or empty line
if not line or #line == 0 then
-- Error occured and error is not by timeout
if err and err ~= "timeout" then
-- Close the erroneous socket because it is no needed any more
sock:close()
return self.logger(err)
else
-- Return response object if timeout or empty line
return response
end
else
-- No any error and line is not empty
table.insert(response,line) -- Add line to the response object
end
end
end
-- Checking is valid syntax on response
function agi.checkresult(self,response)
-- Parse response by code, result and data itself
local code, result, data = string.match(response, '^(%d+) result=(-?[%d*#]+)%s*%(*([^)(]*)%)*')
-- Parse is successed
if code then
-- Not relatively successful
if not string.match(code,'^[200|510]') then
code, result, data = nil, -1, response
end
-- Set status, result and data for last command
self.status = code
self.result = result and result
self.data = (data and #data ~= 0) and data or result
end
return self.status
end
-- Parse input headers and store they in to the headers array
local function parseheaders(buff)
-- Future array of headers
local headers = {}
-- Checking input data by type of table
if type(buff) ~= "table" then
return debugger("headers buffer must be a table")
end
-- Process input data line by line
for _,line in pairs(buff) do
-- Line is empty
if string.len(line) < 1 then
break
end
-- Parse line by key, value
local k, v = string.match(line, "^agi_([%w|_]+):%s+(.*)$")
-- Store parsed key and value in to headers array
if k and v then
headers[k] = v
end
end
return headers
end
-- Read headers for current connection
local function readheaders(conf)
-- Future buffer
local buff = {}
-- Get established connection
local sock, err = agi.get_connection(conf)
-- Socket is valid socket object
if not sock then return debugger(err) end
-- Attempt to read from socket before error or timeout occurs
while true do
-- Reading a line obviously
local line, err = sock:receive()
-- Some error or empty line
if not line or #line == 0 then
-- Error occured and error is not by timeout
if err and err ~= "timeout" then
-- Close the erroneous socket because it is no needed any more
sock:close()
return debugger(err)
else
-- Timeout occurs but headers buffer is empty
if #buff == 0 and err == 'timeout' then
return debugger('failed to read session headers, timeout occurs')
else
-- Return response object if timeout or empty line
return buff
end
end
else
-- No any error and line is not empty
table.insert(buff,line) -- Add line to the response object
end
end
end
-- Return object with minimal functionality
return setmetatable({
readheaders = readheaders,
parseheaders = parseheaders
},{
-- Construct AGI object from config parameters
__call = function(self,conf)
-- Decorator for logger function
debugger = function(...)
-- Local copy of logger function if set
local logger = conf['logger']
-- Status and message
local stat, msg = ...
-- If the message is not defined, then only one parametr is passed
if not msg then
-- Flip them
msg, stat = stat, nil
end
-- If logger function is defined, then execute it with message passing
if type(logger) == "function" then
logger(string.format("[AGI] %s",msg))
end
-- Return status and message
return stat, msg
end
-- Client socket is not determined
if not conf['sock'] then
return debugger('client socket must be determined')
end
-- Headers is not defined at creation
if not conf['headers'] then
-- Trying to read the incoming headers
local buff, err = self.readheaders(conf)
-- Headers read successfully
if buff then
-- Parse and store
conf['headers'] = self.parseheaders(buff)
-- Parse is fail
if not conf['headers'] then
return debugger("error parse headers")
end
else
-- Some error ocurred when read headers
return debugger(err)
end
end
-- If all right then return AGI session object
return conf and setmetatable({logger = debugger},{__index = setmetatable(conf,{__index = agi})}) or debugger("failed to create AGI session")
end
})
|
local cairo = require("lgi").cairo
local gears = require("gears")
local awful = require("awful")
local wibox = require("wibox")
local os, math, string = os, math, string
local theme = require("themes.powerarrow-gruvbox.theme")
theme.border_width = 0
theme.tasklist_plain_task_name = true
theme.tasklist_disable_icon = true
theme.tasklist_spacing = 3
theme.useless_gap = 8
theme.systray_icon_spacing = 4
-- {{{ Glass borders (experimental)
function theme.titlebar_fn(c)
-- if c.floating then return end
local b_string_color = gears.color(theme.border_focus .. "55")
local b_arrow_color = gears.color(theme.border_focus .. "ff")
local b_weight = 12
local b_string_weight = 4
local b_gutter = 12
local b_arrow = 120
local side = b_weight + b_gutter
local total_width = c.width
local total_height = c.height
-- for some reasons, the client height/width are not the same at first
-- render (when called by request title bar) and when resizing
total_width = total_width + 2 * (b_weight + b_gutter)
local imgTop = cairo.ImageSurface.create(cairo.Format.ARGB32, total_width, side)
local crTop = cairo.Context(imgTop)
crTop:set_source(b_string_color)
crTop:rectangle(0, b_weight / 2 - b_string_weight / 2, total_width, b_string_weight)
crTop:fill()
crTop:set_source(b_arrow_color)
crTop:rectangle(0, 0, b_arrow, b_weight)
crTop:rectangle(0, 0, b_weight, side)
crTop:rectangle(total_width - b_arrow, 0, b_arrow, b_weight)
crTop:rectangle(total_width - b_weight, 0, b_weight, side)
crTop:fill()
local imgBot = cairo.ImageSurface.create(cairo.Format.ARGB32, total_width, side)
local crBot = cairo.Context(imgBot)
crBot:set_source(b_string_color)
crBot:rectangle(0, side - b_weight / 2 - b_string_weight / 2, total_width, b_string_weight)
crBot:fill()
crBot:set_source(b_arrow_color)
crBot:rectangle(0, b_gutter, b_arrow, b_weight)
crBot:rectangle(0, 0, b_weight, side)
crBot:rectangle(total_width - b_weight, 0, b_weight, side)
crBot:rectangle(total_width - b_arrow, b_gutter, b_arrow, b_weight)
crBot:fill()
local imgLeft = cairo.ImageSurface.create(cairo.Format.ARGB32, side, total_height)
local crLeft = cairo.Context(imgLeft)
crLeft:set_source(b_string_color)
crLeft:rectangle(b_weight / 2 - b_string_weight / 2, 0, b_string_weight, total_height)
crLeft:fill()
crLeft:set_source(b_arrow_color)
crLeft:rectangle(0, 0, b_weight, b_arrow - side)
crLeft:rectangle(0, total_height - b_arrow + side, b_weight, b_arrow - side)
crLeft:fill()
local imgRight = cairo.ImageSurface.create(cairo.Format.ARGB32, side, total_height)
local crRight = cairo.Context(imgRight)
crRight:set_source(b_string_color)
crRight:rectangle(b_gutter + b_weight / 2 - b_string_weight / 2, 0, b_string_weight, total_height)
crRight:fill()
crRight:set_source(b_arrow_color)
crRight:rectangle(b_gutter, 0, b_weight, b_arrow - side)
crRight:rectangle(b_gutter, total_height - b_arrow + side, b_weight, b_arrow - side)
crRight:fill()
awful.titlebar(c, {
size = b_weight + b_gutter,
position = "top",
bg_normal = "transparent",
bg_focus = "transparent",
bgimage_focus = imgTop,
}) : setup { layout = wibox.layout.align.horizontal, }
awful.titlebar(c, {
size = b_weight + b_gutter,
position = "left",
bg_normal = "transparent",
bg_focus = "transparent",
bgimage_focus = imgLeft,
}) : setup { layout = wibox.layout.align.horizontal, }
awful.titlebar(c, {
size = b_weight + b_gutter,
position = "right",
bg_normal = "transparent",
bg_focus = "transparent",
bgimage_focus = imgRight,
}) : setup { layout = wibox.layout.align.horizontal, }
awful.titlebar(c, {
size = b_weight + b_gutter,
position = "bottom",
bg_normal = "transparent",
bg_focus = "transparent",
bgimage_focus = imgBot,
}) : setup { layout = wibox.layout.align.horizontal, }
end
local function titlebar_after(c)
-- if c.floating then return end
local b_string_color = gears.color(theme.border_focus .. "55")
local b_arrow_color = gears.color(theme.border_focus .. "ff")
local b_weight = 12
local b_string_weight = 4
local b_gutter = 12
local b_arrow = 120
local side = b_weight + b_gutter
local total_width = c.width
local total_height = c.height
-- for some reasons, the client height/width are not the same at first
-- render (when called by request title bar) and when resizing
total_height = total_height - 2 * (b_weight + b_gutter)
local imgTop = cairo.ImageSurface.create(cairo.Format.ARGB32, total_width, side)
local crTop = cairo.Context(imgTop)
crTop:set_source(b_string_color)
crTop:rectangle(0, b_weight / 2 - b_string_weight / 2, total_width, b_string_weight)
crTop:fill()
crTop:set_source(b_arrow_color)
crTop:rectangle(0, 0, b_arrow, b_weight)
crTop:rectangle(0, 0, b_weight, side)
crTop:rectangle(total_width - b_arrow, 0, b_arrow, b_weight)
crTop:rectangle(total_width - b_weight, 0, b_weight, side)
crTop:fill()
local imgBot = cairo.ImageSurface.create(cairo.Format.ARGB32, total_width, side)
local crBot = cairo.Context(imgBot)
crBot:set_source(b_string_color)
crBot:rectangle(0, side - b_weight / 2 - b_string_weight / 2, total_width, b_string_weight)
crBot:fill()
crBot:set_source(b_arrow_color)
crBot:rectangle(0, b_gutter, b_arrow, b_weight)
crBot:rectangle(0, 0, b_weight, side)
crBot:rectangle(total_width - b_weight, 0, b_weight, side)
crBot:rectangle(total_width - b_arrow, b_gutter, b_arrow, b_weight)
crBot:fill()
local imgLeft = cairo.ImageSurface.create(cairo.Format.ARGB32, side, total_height)
local crLeft = cairo.Context(imgLeft)
crLeft:set_source(b_string_color)
crLeft:rectangle(b_weight / 2 - b_string_weight / 2, 0, b_string_weight, total_height)
crLeft:fill()
crLeft:set_source(b_arrow_color)
crLeft:rectangle(0, 0, b_weight, b_arrow - side)
crLeft:rectangle(0, total_height - b_arrow + side, b_weight, b_arrow - side)
crLeft:fill()
local imgRight = cairo.ImageSurface.create(cairo.Format.ARGB32, side, total_height)
local crRight = cairo.Context(imgRight)
crRight:set_source(b_string_color)
crRight:rectangle(b_gutter + b_weight / 2 - b_string_weight / 2, 0, b_string_weight, total_height)
crRight:fill()
crRight:set_source(b_arrow_color)
crRight:rectangle(b_gutter, 0, b_weight, b_arrow - side)
crRight:rectangle(b_gutter, total_height - b_arrow + side, b_weight, b_arrow - side)
crRight:fill()
awful.titlebar(c, {
size = b_weight + b_gutter,
position = "top",
bg_normal = "transparent",
bg_focus = "transparent",
bgimage_focus = imgTop,
}) : setup { layout = wibox.layout.align.horizontal, }
awful.titlebar(c, {
size = b_weight + b_gutter,
position = "left",
bg_normal = "transparent",
bg_focus = "transparent",
bgimage_focus = imgLeft,
}) : setup { layout = wibox.layout.align.horizontal, }
awful.titlebar(c, {
size = b_weight + b_gutter,
position = "right",
bg_normal = "transparent",
bg_focus = "transparent",
bgimage_focus = imgRight,
}) : setup { layout = wibox.layout.align.horizontal, }
awful.titlebar(c, {
size = b_weight + b_gutter,
position = "bottom",
bg_normal = "transparent",
bg_focus = "transparent",
bgimage_focus = imgBot,
}) : setup { layout = wibox.layout.align.horizontal, }
end
client.connect_signal("property::size", titlebar_after)
-- }}}
return theme
|
local NotificationBindable = Instance.new("BindableFunction")
NotificationBindable.OnInvoke = callback
--
game.StarterGui:SetCore("SendNotification", {
Title = "Dynamic Client";
Text = "ESP v2 Activated.";
Icon = "rbxassetid://5631279864";
Duration = 3;
Callback = NotificationBindable;
})
local client = game.Players.LocalPlayer
local players = game:GetService("Players")
local rs = game:GetService("RunService")
local function clonePart(part, model, character)
if part:IsA("BasePart") then
local head = character:WaitForChild("Head")
local clone = part:Clone()
for i, v in ipairs(clone:GetChildren()) do
if not v:IsA("SpecialMesh") then
v:Destroy()
continue
end
v.TextureId = ""
end
clone.Color = Color3.fromRGB(0, 255, 0)
pcall(function()clone.Size = clone.Size * 0.7 clone.CanCollide = false end)
clone.Parent = model
rs.RenderStepped:connect(function()
if head:IsDescendantOf(workspace) then
clone.CFrame = part.CFrame
clone.Size = part.Size
else
model:Destroy()
return
end
end)
end
end
local function chams(character)
local model = Instance.new("Model")
model.Name = character.Name
model.Parent = workspace
local cham = Instance.new("Highlight",model)
cham.Name = "cham"
cham.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
cham.OutlineColor = Color3.fromRGB(0,0,0)
cham.FillColor = Color3.fromRGB(255,0,0)
cham.FillTransparency = 0
cham.OutlineTransparency = 1
local new = cham:Clone()
new.Parent = character
new.FillColor = Color3.fromRGB(0,255,0)
new.DepthMode = Enum.HighlightDepthMode.Occluded
for i,v in ipairs(character:GetChildren()) do
-- if character has a head then
if character:FindFirstChild("Head") then
clonePart(v, model, character)
end
end
end
for i,v in ipairs(players:GetPlayers()) do
if v~= client then
if v.Character then
chams(v.Character)
end
end
v.CharacterAdded:connect(function()wait(0.1)chams(v.Character)end)
end
players.PlayerAdded:connect(function()
if v~= client then
if v.Character then
chams(v.Character)
end
end
v.CharacterAdded:connect(function()wait(0.1)chams(v.Character)end)
end)
|
local pps = require('pipes')
local log = require('pipes.logger')
pps.dispatch('error',
function(err)
log.error('test2 caught err:'..err)
end)
log.info('test_2 start')
--pps.debug()
--pps.sleep(2000)
--error('test_2 error test')
--[[
2 - 9
3 - 8
4 - 7
5 - 6
6 - 5
7 - 4
8 - 3
9 - 2
2 + 7 (11-2*2)
3 + 5 (11-3*2)
4 + 3 (11-4*2)
5 + 1 (11-5*2)
6 + -1 (11-6*2)
7 + -3 (11-7*2)
n + (11 - n*2)
]]
pps.sleep(1000)
local test1 = pps.newservice('test_1')
pps.send(test1, 123,'hehe')
pps.sleep(1000)
--pps.log('test_2 will call test_1')
local ret,data = pps.call(test1, 'noret', 321)
ret,data = pps.call(test1, 'err', 123)
ret,data = pps.call(test1, 'normal', 123)
print('test2 callRet: ',ret,data)
--[[
pps.sleep(1000)
print('test2 will call again')
ret,data = pps.call(test1, 'err2', 456)
--print('recvCallret: ', ret, data)
pps.sleep(2000)
pps.send(test1, 'ddddd')
]]
|
require "brains/pigbrain"
require "brains/pigguardbrain"
require "brains/werepigbrain"
require "stategraphs/SGpig"
require "stategraphs/SGwerepig"
local assets =
{
Asset("ANIM", "anim/ds_pig_basic.zip"),
Asset("ANIM", "anim/ds_pig_actions.zip"),
Asset("ANIM", "anim/ds_pig_attacks.zip"),
Asset("ANIM", "anim/pig_build.zip"),
Asset("ANIM", "anim/pigspotted_build.zip"),
Asset("ANIM", "anim/pig_guard_build.zip"),
Asset("ANIM", "anim/werepig_build.zip"),
Asset("ANIM", "anim/werepig_basic.zip"),
Asset("ANIM", "anim/werepig_actions.zip"),
Asset("SOUND", "sound/pig.fsb"),
}
local prefabs =
{
"meat",
"monstermeat",
"poop",
"tophat",
"strawhat",
"pigskin",
}
local MAX_TARGET_SHARES = 5
local SHARE_TARGET_DIST = 30
local function ontalk(inst, script)
inst.SoundEmitter:PlaySound("dontstarve/pig/grunt")
end
local function CalcSanityAura(inst, observer)
if inst.components.werebeast
and inst.components.werebeast:IsInWereState() then
return -TUNING.SANITYAURA_LARGE
end
if inst.components.follower and inst.components.follower.leader == observer then
return TUNING.SANITYAURA_SMALL
end
return 0
end
local function ShouldAcceptItem(inst, item)
if inst.components.sleeper:IsAsleep() then
return false
end
if item.components.equippable and item.components.equippable.equipslot == EQUIPSLOTS.HEAD then
return true
end
if item.components.edible then
if (item.components.edible.foodtype == "MEAT" or item.components.edible.foodtype == "HORRIBLE")
and inst.components.follower.leader
and inst.components.follower:GetLoyaltyPercent() > 0.9 then
return false
end
if item.components.edible.foodtype == "VEGGIE" then
local last_eat_time = inst.components.eater:TimeSinceLastEating()
if last_eat_time and last_eat_time < TUNING.PIG_MIN_POOP_PERIOD then
return false
end
if inst.components.inventory:Has(item.prefab, 1) then
return false
end
end
return true
end
end
local function OnGetItemFromPlayer(inst, giver, item)
--I eat food
if item.components.edible then
--meat makes us friends (unless I'm a guard)
if item.components.edible.foodtype == "MEAT" or item.components.edible.foodtype == "HORRIBLE" then
if inst.components.combat.target and inst.components.combat.target == giver then
inst.components.combat:SetTarget(nil)
elseif giver.components.leader and not inst:HasTag("guard") then
inst.SoundEmitter:PlaySound("dontstarve/common/makeFriend")
giver.components.leader:AddFollower(inst)
inst.components.follower:AddLoyaltyTime(item.components.edible:GetHunger() * TUNING.PIG_LOYALTY_PER_HUNGER)
end
end
if inst.components.sleeper:IsAsleep() then
inst.components.sleeper:WakeUp()
end
end
--I wear hats
if item.components.equippable and item.components.equippable.equipslot == EQUIPSLOTS.HEAD then
local current = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HEAD)
if current then
inst.components.inventory:DropItem(current)
end
inst.components.inventory:Equip(item)
inst.AnimState:Show("hat")
end
end
local function OnRefuseItem(inst, item)
inst.sg:GoToState("refuse")
if inst.components.sleeper:IsAsleep() then
inst.components.sleeper:WakeUp()
end
end
local function OnEat(inst, food)
if food.components.edible
and food.components.edible.foodtype == "MEAT"
and inst.components.werebeast
and not inst.components.werebeast:IsInWereState() then
if food.components.edible:GetHealth() < 0 then
inst.components.werebeast:TriggerDelta(1)
end
end
if food.components.edible and food.components.edible.foodtype == "VEGGIE" then
local poo = SpawnPrefab("poop")
poo.Transform:SetPosition(inst.Transform:GetWorldPosition())
end
end
local function OnAttacked(inst, data)
--print(inst, "OnAttacked")
local attacker = data.attacker
inst.components.combat:SetTarget(attacker)
if inst:HasTag("werepig") then
inst.components.combat:ShareTarget(attacker, SHARE_TARGET_DIST, function(dude) return dude:HasTag("werepig") end, MAX_TARGET_SHARES)
elseif inst:HasTag("guard") then
inst.components.combat:ShareTarget(attacker, SHARE_TARGET_DIST, function(dude) return dude:HasTag("pig") and (dude:HasTag("guard") or not attacker:HasTag("pig")) end, MAX_TARGET_SHARES)
else
if not (attacker:HasTag("pig") and attacker:HasTag("guard") ) then
inst.components.combat:ShareTarget(attacker, SHARE_TARGET_DIST, function(dude) return dude:HasTag("pig") and not dude:HasTag("werepig") end, MAX_TARGET_SHARES)
end
end
end
local function OnNewTarget(inst, data)
if inst:HasTag("werepig") then
--print(inst, "OnNewTarget", data.target)
inst.components.combat:ShareTarget(data.target, SHARE_TARGET_DIST, function(dude) return dude:HasTag("werepig") end, MAX_TARGET_SHARES)
end
end
local builds = {"pig_build", "pigspotted_build"}
local guardbuilds = {"pig_guard_build"}
local function NormalRetargetFn(inst)
return FindEntity(inst, TUNING.PIG_TARGET_DIST,
function(guy)
if not guy.LightWatcher or guy.LightWatcher:IsInLight() then
return guy:HasTag("monster") and guy.components.health and not guy.components.health:IsDead() and inst.components.combat:CanTarget(guy) and not
(inst.components.follower.leader ~= nil and guy:HasTag("abigail"))
end
end)
end
local function NormalKeepTargetFn(inst, target)
--give up on dead guys, or guys in the dark, or werepigs
return inst.components.combat:CanTarget(target)
and (not target.LightWatcher or target.LightWatcher:IsInLight())
and not (target.sg and target.sg:HasStateTag("transform") )
end
local function NormalShouldSleep(inst)
if inst.components.follower and inst.components.follower.leader then
local fire = FindEntity(inst, 6, function(ent)
return ent.components.burnable
and ent.components.burnable:IsBurning()
end, {"campfire"})
return DefaultSleepTest(inst) and fire and (not inst.LightWatcher or inst.LightWatcher:IsInLight())
else
return DefaultSleepTest(inst)
end
end
local function SetNormalPig(inst)
inst:RemoveTag("werepig")
inst:RemoveTag("guard")
local brain = require "brains/pigbrain"
inst:SetBrain(brain)
inst:SetStateGraph("SGpig")
inst.AnimState:SetBuild(inst.build)
inst.components.werebeast:SetOnNormalFn(SetNormalPig)
inst.components.sleeper:SetResistance(2)
inst.components.combat:SetDefaultDamage(TUNING.PIG_DAMAGE)
inst.components.combat:SetAttackPeriod(TUNING.PIG_ATTACK_PERIOD)
inst.components.combat:SetKeepTargetFunction(NormalKeepTargetFn)
inst.components.locomotor.runspeed = TUNING.PIG_RUN_SPEED
inst.components.locomotor.walkspeed = TUNING.PIG_WALK_SPEED
inst.components.sleeper:SetSleepTest(NormalShouldSleep)
inst.components.sleeper:SetWakeTest(DefaultWakeTest)
inst.components.lootdropper:SetLoot({})
inst.components.lootdropper:AddRandomLoot("meat",3)
inst.components.lootdropper:AddRandomLoot("pigskin",1)
inst.components.lootdropper.numrandomloot = 1
inst.components.health:SetMaxHealth(TUNING.PIG_HEALTH)
inst.components.combat:SetRetargetFunction(3, NormalRetargetFn)
inst.components.combat:SetTarget(nil)
inst.components.trader:Enable()
inst.components.talker:StopIgnoringAll()
inst.components.combat:SetHurtSound(nil)
end
local function GuardRetargetFn(inst)
local home = inst.components.homeseeker and inst.components.homeseeker.home
--defend the king, then the torch, then myself
local defenseTarget = FindEntity(inst, TUNING.PIG_GUARD_DEFEND_DIST, function(guy) return guy:HasTag("king") end)
if not defenseTarget and home and inst:GetDistanceSqToInst(home) < TUNING.PIG_GUARD_DEFEND_DIST*TUNING.PIG_GUARD_DEFEND_DIST then
defenseTarget = home
end
if not defenseTarget then
defenseTarget = inst
end
local invader = FindEntity(defenseTarget or inst, TUNING.PIG_GUARD_TARGET_DIST, function(guy)
return guy:HasTag("character") and not guy:HasTag("guard")
end)
if not defenseTarget.happy then
if invader
and not (defenseTarget.components.trader and defenseTarget.components.trader:IsTryingToTradeWithMe(invader) )
and not (inst.components.trader and inst.components.trader:IsTryingToTradeWithMe(invader) ) then
return invader
end
if not GetClock():IsDay() and home and home.components.burnable and home.components.burnable:IsBurning() then
local lightThief = FindEntity(home, home.components.burnable:GetLargestLightRadius(), function(guy)
return guy:HasTag("player")
and guy.LightWatcher:IsInLight()
and not (defenseTarget.components.trader and defenseTarget.components.trader:IsTryingToTradeWithMe(guy) )
and not (inst.components.trader and inst.components.trader:IsTryingToTradeWithMe(guy) )
end)
if lightThief then
return lightThief
end
end
end
return FindEntity(defenseTarget, TUNING.PIG_GUARD_DEFEND_DIST, function(guy)
return guy:HasTag("monster")
end)
end
local function GuardKeepTargetFn(inst, target)
local home = inst.components.homeseeker and inst.components.homeseeker.home
if home then
local defendDist = TUNING.PIG_GUARD_DEFEND_DIST
if not GetClock():IsDay() and home.components.burnable and home.components.burnable:IsBurning() then
defendDist = home.components.burnable:GetLargestLightRadius()
end
return home:GetDistanceSqToInst(target) < defendDist*defendDist
and home:GetDistanceSqToInst(inst) < defendDist*defendDist
end
return inst.components.combat:CanTarget(target)
and not (target.sg and target.sg:HasStateTag("transform") )
end
local function GuardShouldSleep(inst)
return false
end
local function GuardShouldWake(inst)
return true
end
local function SetGuardPig(inst)
inst:RemoveTag("werepig")
inst:AddTag("guard")
local brain = require "brains/pigguardbrain"
inst:SetBrain(brain)
inst:SetStateGraph("SGpig")
inst.AnimState:SetBuild(inst.build)
inst.components.werebeast:SetOnNormalFn(SetGuardPig)
inst.components.sleeper:SetResistance(3)
inst.components.health:SetMaxHealth(TUNING.PIG_GUARD_HEALTH)
inst.components.combat:SetDefaultDamage(TUNING.PIG_GUARD_DAMAGE)
inst.components.combat:SetAttackPeriod(TUNING.PIG_GUARD_ATTACK_PERIOD)
inst.components.combat:SetKeepTargetFunction(GuardKeepTargetFn)
inst.components.combat:SetRetargetFunction(1, GuardRetargetFn)
inst.components.combat:SetTarget(nil)
inst.components.locomotor.runspeed = TUNING.PIG_RUN_SPEED
inst.components.locomotor.walkspeed = TUNING.PIG_WALK_SPEED
inst.components.sleeper:SetSleepTest(GuardShouldSleep)
inst.components.sleeper:SetWakeTest(GuardShouldWake)
inst.components.lootdropper:SetLoot({})
inst.components.lootdropper:AddRandomLoot("meat",3)
inst.components.lootdropper:AddRandomLoot("pigskin",1)
inst.components.lootdropper.numrandomloot = 1
inst.components.trader:Enable()
inst.components.talker:StopIgnoringAll()
inst.components.follower:SetLeader(nil)
inst.components.combat:SetHurtSound(nil)
end
local function WerepigRetargetFn(inst)
return FindEntity(inst, TUNING.PIG_TARGET_DIST, function(guy)
return inst.components.combat:CanTarget(guy)
and not guy:HasTag("werepig")
and not (guy.sg and guy.sg:HasStateTag("transform") )
and not guy:HasTag("alwaysblock")
end)
end
local function WerepigKeepTargetFn(inst, target)
return inst.components.combat:CanTarget(target)
and not target:HasTag("werepig")
and not (target.sg and target.sg:HasStateTag("transform") )
end
local function WerepigSleepTest(inst)
return false
end
local function WerepigWakeTest(inst)
return true
end
local function SetWerePig(inst)
inst:AddTag("werepig")
inst:RemoveTag("guard")
local brain = require "brains/werepigbrain"
inst:SetBrain(brain)
inst:SetStateGraph("SGwerepig")
inst.AnimState:SetBuild("werepig_build")
inst.components.sleeper:SetResistance(3)
inst.components.combat:SetDefaultDamage(TUNING.WEREPIG_DAMAGE)
inst.components.combat:SetAttackPeriod(TUNING.WEREPIG_ATTACK_PERIOD)
inst.components.locomotor.runspeed = TUNING.WEREPIG_RUN_SPEED
inst.components.locomotor.walkspeed = TUNING.WEREPIG_WALK_SPEED
inst.components.sleeper:SetSleepTest(WerepigSleepTest)
inst.components.sleeper:SetWakeTest(WerepigWakeTest)
inst.components.lootdropper:SetLoot({"meat","meat", "pigskin"})
inst.components.lootdropper.numrandomloot = 0
inst.components.health:SetMaxHealth(TUNING.WEREPIG_HEALTH)
inst.components.combat:SetTarget(nil)
inst.components.combat:SetRetargetFunction(3, WerepigRetargetFn)
inst.components.combat:SetKeepTargetFunction(WerepigKeepTargetFn)
inst.components.trader:Disable()
inst.components.follower:SetLeader(nil)
inst.components.talker:IgnoreAll()
inst.components.combat:SetHurtSound("dontstarve/creatures/werepig/hurt")
end
local function common()
local inst = CreateEntity()
local trans = inst.entity:AddTransform()
local anim = inst.entity:AddAnimState()
local sound = inst.entity:AddSoundEmitter()
local shadow = inst.entity:AddDynamicShadow()
shadow:SetSize( 1.5, .75 )
inst.Transform:SetFourFaced()
inst.entity:AddLightWatcher()
inst:AddComponent("talker")
inst.components.talker.ontalk = ontalk
inst.components.talker.fontsize = 35
inst.components.talker.font = TALKINGFONT
--inst.components.talker.colour = Vector3(133/255, 140/255, 167/255)
inst.components.talker.offset = Vector3(0,-400,0)
MakeCharacterPhysics(inst, 50, .5)
inst:AddComponent("locomotor") -- locomotor must be constructed before the stategraph
inst.components.locomotor.runspeed = TUNING.PIG_RUN_SPEED --5
inst.components.locomotor.walkspeed = TUNING.PIG_WALK_SPEED --3
inst:AddTag("character")
inst:AddTag("pig")
inst:AddTag("scarytoprey")
anim:SetBank("pigman")
anim:PlayAnimation("idle_loop")
anim:Hide("hat")
------------------------------------------
inst:AddComponent("eater")
inst.components.eater:SetOmnivore()
inst.components.eater:SetCanEatHorrible()
inst.components.eater.strongstomach = true -- can eat monster meat!
inst.components.eater:SetOnEatFn(OnEat)
------------------------------------------
inst:AddComponent("combat")
inst.components.combat.hiteffectsymbol = "pig_torso"
MakeMediumBurnableCharacter(inst, "pig_torso")
inst:AddComponent("named")
inst.components.named.possiblenames = STRINGS.PIGNAMES
inst.components.named:PickNewName()
------------------------------------------
inst:AddComponent("werebeast")
inst.components.werebeast:SetOnWereFn(SetWerePig)
inst.components.werebeast:SetTriggerLimit(4)
------------------------------------------
inst:AddComponent("follower")
inst.components.follower.maxfollowtime = TUNING.PIG_LOYALTY_MAXTIME
------------------------------------------
inst:AddComponent("health")
------------------------------------------
inst:AddComponent("inventory")
------------------------------------------
inst:AddComponent("lootdropper")
------------------------------------------
inst:AddComponent("knownlocations")
------------------------------------------
inst:AddComponent("trader")
inst.components.trader:SetAcceptTest(ShouldAcceptItem)
inst.components.trader.onaccept = OnGetItemFromPlayer
inst.components.trader.onrefuse = OnRefuseItem
------------------------------------------
inst:AddComponent("sanityaura")
inst.components.sanityaura.aurafn = CalcSanityAura
------------------------------------------
inst:AddComponent("sleeper")
------------------------------------------
MakeMediumFreezableCharacter(inst, "pig_torso")
------------------------------------------
inst:AddComponent("inspectable")
inst.components.inspectable.getstatus = function(inst)
if inst:HasTag("werepig") then
return "WEREPIG"
elseif inst:HasTag("guard") then
return "GUARD"
elseif inst.components.follower.leader ~= nil then
return "FOLLOWER"
end
end
------------------------------------------
inst.OnSave = function(inst, data)
data.build = inst.build
end
inst.OnLoad = function(inst, data)
if data then
inst.build = data.build or builds[1]
if not inst.components.werebeast:IsInWereState() then
inst.AnimState:SetBuild(inst.build)
end
end
end
inst:ListenForEvent("attacked", OnAttacked)
inst:ListenForEvent("newcombattarget", OnNewTarget)
return inst
end
local function normal()
local inst = common()
inst.build = builds[math.random(#builds)]
inst.AnimState:SetBuild(inst.build)
SetNormalPig(inst)
return inst
end
local function guard()
local inst = common()
inst.build = guardbuilds[math.random(#guardbuilds)]
inst.AnimState:SetBuild(inst.build)
SetGuardPig(inst)
return inst
end
return Prefab( "common/characters/pigman", normal, assets, prefabs),
Prefab("common/character/pigguard", guard, assets, prefabs)
|
--[[
local byte, char, gsub, gmatch = string.byte, string.char, string.gsub,
string.gmatch
local pairs, error = pairs, error
Encoding<1>:
Result: PASS
Ran 10000 iterations in 85ms
Encoding<12>:
Result: PASS
Ran 10000 iterations in 46ms
Encoding<1>:
Result: PASS
Ran 10000 iterations in 40ms
local function encodeChar(charValue, nested)
if charValue == 0 then return nested and "" or "❤️" end
for _, v in pairs(CHARACTER_VALUES) do
if charValue >= v[1] then
-- val, currentCase = v[1], v[2]
-- return currentCase .. encodeChar(charValue - val)
return v[2] .. encodeChar(charValue - v[1], true)
end
end
end
local function encode(value)
local result = gsub(value, ".", function(c)
return encodeChar(byte(c)) .. "👉👈"
end)
return result
end
Decoding<12>:
Result: PASS
Ran 10000 iterations in 7ms
Decoding<1>:
Result: PASS
Ran 10000 iterations in 7ms
Decoding<4>:
Result: PASS
Ran 10000 iterations in 12ms
Decoding<1>:
Result: PASS
Ran 10000 iterations in 10ms
local CHARACTER_VALUES_LOOKUPIFIED = {
["🫂"] = 200,
["💖"] = 50,
["✨"] = 10,
["🥺"] = 5,
[","] = 1,
["❤"] = 0
}
local concat = table.concat
local function fmt(chr) return concat({byte(chr, 1, -1)}, ", ") end
local function decode(value)
local result = gsub(value, "(.-)👉👈", function(c)
-- https://stackoverflow.com/questions/13235091/extract-the-first-letter-of-a-utf-8-string-with-lua
local code = 0
for char in gmatch(gsub(c, "❤️", "❤"),
"[%z\1-\127\194-\244][\128-\191]*") do
code = code + (CHARACTER_VALUES_LOOKUPIFIED[char] or
error("No such bottom character `" .. char .. "`<" ..
fmt(char) .. "> in `" .. fmt(c) .. "`"))
end
return char(code)
end)
return result
end
]] --
local gsub = string.gsub
local byte = string.byte
local concat = table.concat
local map = require("map")
encoding, decoding = map.encoding, map.decoding
--[[
Encoding<1>:
Result: PASS
Ran 10000 iterations in 11ms
Encoding<12>:
Result: PASS
Ran 10000 iterations in 11ms
Encoding<1>:
Result: PASS
Ran 10000 iterations in 11ms
]]
local function encode(value)
local result = gsub(value, ".",
function(c) return encoding[c] .. "👉👈" end)
return result
end
local function fmt(chr) return concat({byte(chr, 1, -1)}, ", ") end
--[[
Decoding<12>:
Result: PASS
Ran 10000 iterations in 7ms
Decoding<1>:
Result: PASS
Ran 10000 iterations in 9ms
Decoding<1>:
Result: PASS
Ran 10000 iterations in 8ms
]]
local function decode(value)
local result = gsub(value, "(.-)👉👈", function(c)
return (decoding[c] or error("Invalid bottom `" .. fmt(c) .. "`"))
end)
return result
end
return {encode = encode, decode = decode}
|
--focus
local _, cfg = ... --export config
local addon, ns = ... --get addon namespace
local f = CreateFrame("Button","BobFocusHUD",UIParent,"SecureUnitButtonTemplate")
local UnitPowerType = UnitPowerType
f.unit = "focus" --change to unit you want to track
--Make the Health Bar
--background texture
f.back = f:CreateTexture(nil,"BACKGROUND")
f.back:SetSize(unpack(cfg.focus.barsize))
f.back:SetPoint("CENTER",UIParent,cfg.focus.healthx,cfg.focus.healthy)
f.back:SetTexture("Interface\\Addons\\BobHUD\\media\\powerbar")
f.back:SetVertexColor(0,0,0,cfg.focus.alpha)
if cfg.transparency.OOCfade then
f.back:Hide()
end
--health bar
f.hp = CreateFrame("StatusBar",nil,f,"TextStatusBar")
f.hp:SetSize(unpack(cfg.focus.barsize))
f.hp:SetPoint("CENTER",UIParent,cfg.focus.healthx,cfg.focus.healthy)
f.hp:SetStatusBarTexture("Interface\\Addons\\BobHUD\\media\\powerbar")
f.hp:SetStatusBarColor(0,.8,0)
f.hp:SetMinMaxValues(0,1)
f.hp:SetOrientation("VERTICAL")
f.hp:EnableMouse(false)
f.hp:SetAlpha(cfg.focus.alpha)
if cfg.transparency.OOCfade then
f.hp:Hide()
end
--Make the Mana Bar
f:SetAttribute("unit",f.unit)
--background texture
f.back = f:CreateTexture(nil,"BACKGROUND")
f.back:SetSize(unpack(cfg.focus.barsize))
f.back:SetPoint("CENTER",UIParent,cfg.focus.powerx,cfg.focus.powery)
f.back:SetTexture("Interface\\Addons\\BobHUD\\media\\powerbar")
f.back:SetVertexColor(0,0,0,cfg.focus.alpha)
if cfg.transparency.OOCfade then
f.back:Hide()
end
--mana bar
f.mp = CreateFrame("StatusBar",nil,f,"TextStatusBar")
f.mp:SetSize(unpack(cfg.focus.barsize))
f.mp:SetPoint("CENTER",UIParent,cfg.focus.powerx,cfg.focus.powery)
f.mp:SetStatusBarTexture("Interface\\Addons\\BobHUD\\media\\powerbar")
local powercolor = PowerBarColor[select(2, UnitPowerType(f.unit))] or PowerBarColor['MANA']
f.mp:SetStatusBarColor(powercolor.r, powercolor.g, powercolor.b)
f.mp:SetMinMaxValues(0,1)
f.mp:SetOrientation("VERTICAL")
f.mp:EnableMouse(false)
f.mp:SetAlpha(cfg.focus.alpha)
if cfg.transparency.OOCfade then
f.mp:Hide()
end
--Updates the status bar to new health
f:SetScript("OnEvent", function(self, event, unit)
if event == "FOCUS_TARGET_CHANGED" then
--update health
self.hp:SetValue(UnitHealth(unit)/UnitHealthMax(unit))
--update powa
self.mp:SetValue(UnitPower(unit)/UnitPowerMax(unit))
local powercolor = PowerBarColor[select(2, UnitPowerType(f.unit))] or PowerBarColor['MANA']
f.mp:SetStatusBarColor(powercolor.r, powercolor.g, powercolor.b)
elseif event == "UNIT_HEALTH" then
--update health
self.hp:SetValue(UnitHealth(unit)/UnitHealthMax(unit))
elseif event == "UNIT_POWER" then
--update powa
self.mp:SetValue(UnitPower(unit)/UnitPowerMax(unit))
local powercolor = PowerBarColor[select(2, UnitPowerType(f.unit))] or PowerBarColor['MANA']
f.mp:SetStatusBarColor(powercolor.r, powercolor.g, powercolor.b)
end
if cfg.transparency.OOCfade then
if event == "PLAYER_REGEN_ENABLED" or event == "PLAYER_ENTERING_WORLD" then
f.back:Hide()
f.hp:Hide()
f.mp:Hide()
end
if event == "PLAYER_REGEN_DISABLED" then
f.back:Show()
f.hp:Show()
f.mp:Show()
end
end
end)
f:RegisterUnitEvent("FOCUS_TARGET_CHANGED", f.unit)
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:RegisterEvent("PLAYER_REGEN_ENABLED")
f:RegisterUnitEvent("UNIT_HEALTH", f.unit)
f:RegisterUnitEvent("UNIT_POWER", f.unit)
RegisterUnitWatch(f)
|
return {'kuhn','kuhlmann','kuhl','kuhlman'} |
local K, C, L, _ = select(2, ...):unpack()
if InCombatLockdown() then return end
local table = table
local tremove = tremove
local CreateFrame = CreateFrame
local frameFadeManager = CreateFrame("FRAME")
local FADEFRAMES = {}
function K:UIFrameFade_OnUpdate(elapsed)
local index = 1
local frame, fadeInfo
while FADEFRAMES[index] do
frame = FADEFRAMES[index]
fadeInfo = FADEFRAMES[index].fadeInfo
-- Reset the timer if there isn't one, this is just an internal counter
fadeInfo.fadeTimer = (fadeInfo.fadeTimer or 0) + elapsed
fadeInfo.fadeTimer = fadeInfo.fadeTimer + elapsed
-- If the fadeTimer is less then the desired fade time then set the alpha otherwise hold the fade state, call the finished function, or just finish the fade
if ( fadeInfo.fadeTimer < fadeInfo.timeToFade ) then
if ( fadeInfo.mode == "IN" ) then
frame:SetAlpha((fadeInfo.fadeTimer / fadeInfo.timeToFade) * (fadeInfo.endAlpha - fadeInfo.startAlpha) + fadeInfo.startAlpha)
elseif ( fadeInfo.mode == "OUT" ) then
frame:SetAlpha(((fadeInfo.timeToFade - fadeInfo.fadeTimer) / fadeInfo.timeToFade) * (fadeInfo.startAlpha - fadeInfo.endAlpha) + fadeInfo.endAlpha)
end
else
frame:SetAlpha(fadeInfo.endAlpha)
-- If there is a fadeHoldTime then wait until its passed to continue on
if(fadeInfo.fadeHoldTime and fadeInfo.fadeHoldTime > 0) then
fadeInfo.fadeHoldTime = fadeInfo.fadeHoldTime - elapsed
else
-- Complete the fade and call the finished function if there is one
K:UIFrameFadeRemoveFrame(frame)
if ( fadeInfo.finishedFunc ) then
fadeInfo.finishedFunc(fadeInfo.finishedArg1, fadeInfo.finishedArg2, fadeInfo.finishedArg3, fadeInfo.finishedArg4)
fadeInfo.finishedFunc = nil
end
end
end
index = index + 1
end
if ( #FADEFRAMES == 0 ) then
frameFadeManager:SetScript("OnUpdate", nil)
end
end
-- Generic fade function
function K:UIFrameFade(frame, fadeInfo)
if (not frame) then
return
end
if ( not fadeInfo.mode ) then
fadeInfo.mode = "IN"
end
local alpha
if ( fadeInfo.mode == "IN" ) then
if ( not fadeInfo.startAlpha ) then
fadeInfo.startAlpha = 0
end
if ( not fadeInfo.endAlpha ) then
fadeInfo.endAlpha = 1.0
end
alpha = 0
elseif ( fadeInfo.mode == "OUT" ) then
if ( not fadeInfo.startAlpha ) then
fadeInfo.startAlpha = 1.0
end
if ( not fadeInfo.endAlpha ) then
fadeInfo.endAlpha = 0
end
alpha = 1.0
end
frame:SetAlpha(fadeInfo.startAlpha)
frame.fadeInfo = fadeInfo
if not frame:IsProtected() then
frame:Show()
end
local index = 1
while FADEFRAMES[index] do
-- If frame is already set to fade then return
if ( FADEFRAMES[index] == frame ) then
return
end
index = index + 1
end
FADEFRAMES[#FADEFRAMES + 1] = frame
frameFadeManager:SetScript("OnUpdate", K.UIFrameFade_OnUpdate)
end
-- Convenience function to do a simple fade in
function K:UIFrameFadeIn(frame, timeToFade, startAlpha, endAlpha)
local fadeInfo = {}
fadeInfo.mode = "IN"
fadeInfo.timeToFade = timeToFade
fadeInfo.startAlpha = startAlpha
fadeInfo.endAlpha = endAlpha
K:UIFrameFade(frame, fadeInfo)
end
-- Convenience function to do a simple fade out
function K:UIFrameFadeOut(frame, timeToFade, startAlpha, endAlpha)
local fadeInfo = {}
fadeInfo.mode = "OUT"
fadeInfo.timeToFade = timeToFade
fadeInfo.startAlpha = startAlpha
fadeInfo.endAlpha = endAlpha
K:UIFrameFade(frame, fadeInfo)
end
function K:tDeleteItem(table, item)
local index = 1
while table[index] do
if ( item == table[index] ) then
tremove(table, index)
break
else
index = index + 1
end
end
end
function K:UIFrameFadeRemoveFrame(frame)
K:tDeleteItem(FADEFRAMES, frame)
end |
-- Lose Face - An open source face recognition project
-- Copyright (C) 2008-2010 David Capello
-- All rights reserved.
--
-- Description:
-- Uses a common MLP of 3 layers to classify a set of patterns.
--
-- Usage:
-- You can use this script directly running the following command:
--
-- loseface mlp_global.lua PATTERNS_DIR INPUTS HIDDENS SUBJECTS [STOP_GOAL]
--
-- Parameters:
-- PATTERNS_DIR: Directory where patterns are located
-- ("orl_patterns" or "cidisinc_patterns")
-- INPUTS: Number of inputs for the MLP
-- HIDDENS: Number of hidden neurons for the MLP
-- SUBJECTS: Number of outputs for the MLP
-- STOP_GOAL: "fixed" to train 400 epochs or
-- "mse" to try to reach MSE < 2.5e-4
-- (default is "fixed" is you do not specify it)
MSE_GOAL = 2.5e-4
-- MSE_GOAL = 0.1
PATTERNS_DIR = arg[1]
INPUTS = tonumber(arg[2])
HIDDENS = tonumber(arg[3])
SUBJECTS = tonumber(arg[4])
STOP_GOAL = arg[5]
if STOP_GOAL == nil then STOP_GOAL = "fixed" end
print("----------------------------------------------------------------------")
print("INPUTS="..INPUTS)
print("HIDDENS="..HIDDENS)
print("STOP_GOAL = "..STOP_GOAL)
LEARNING_RATE = 0.6
MOMENTUM = 0.1
INIT_WEIGHTS_MIN = -1.0
INIT_WEIGHTS_MAX = 1.0
FOLDS = 5 -- Number of folds to use
FIXED_EPOCHS = 400 -- Number of epochs for STOP_GOAL="fixed"
MAX_EPOCHS_FOR_MSE_GOAL = 4000 -- Maximum number of epochs when STOP_GOAL="mse"
REPEAT_EACH_FOLD = 10 -- Repeat each fold 10 times
----------------------------------------------------------------------
function create_mlp(seed)
ann.init_random(seed)
local mlp = ann.Mlp({ inputs=INPUTS, hiddens=HIDDENS, outputs=SUBJECTS, hiddenfunc=ann.LOGSIG, outputfunc=ann.LOGSIG })
mlp:init({ min=INIT_WEIGHTS_MIN, max=INIT_WEIGHTS_MAX })
return mlp
end
----------------------------------------------------------------------
function do_train_fixed(mlp, train_set, epochs)
return
mlp:train({ learning_rate=LEARNING_RATE,
momentum=MOMENTUM,
set=train_set,
epochs=epochs,
shuffle=1,
goal=ann.BESTMSE })
end
function do_train_mse(mlp, train_set, mse, max_epochs)
return
mlp:train({ learning_rate=LEARNING_RATE,
momentum=MOMENTUM,
set=train_set,
epochs=max_epochs,
shuffle=1,
goal_mse=mse })
end
----------------------------------------------------------------------
function get_fold(k)
local training_set = ann.PatternSet({ file=string.format("%s/%d_fold%d_training.txt", PATTERNS_DIR, INPUTS, k), inputs=INPUTS, outputs=SUBJECTS })
local testing_set = ann.PatternSet({ file=string.format("%s/%d_fold%d_testing.txt", PATTERNS_DIR, INPUTS, k), inputs=INPUTS, outputs=SUBJECTS })
return training_set, testing_set
end
----------------------------------------------------------------------
function prepare_positive_patterns(subject_nth, set)
local positive_set = set:split_by_output({ subject_nth })[1]
positive_set:set_output({ 1 })
return positive_set
end
----------------------------------------------------------------------
function test_mlp(mlp, set)
local hits = 0
local total = 0
for subject_nth = 1,SUBJECTS do
-- Here we call prepare_positive_patterns to get the pattern of
-- 'subject_nth', but we do not use the 'target' for testing,
-- so the outputs of 'positive_set' is irrelevant
local positive_set = prepare_positive_patterns(subject_nth, set)
local outputs = mlp:recall(positive_set)
for j=1,#outputs do
local output = outputs[j]
-- get the max output
local max_pos = 0
for i=1,#output do
--if output[i] > 0 then
if max_pos == 0 or output[max_pos] < output[i] then
max_pos = i
end
--end
end
if max_pos == subject_nth then
hits = hits+1;
end
total = total+1;
end
end
return hits/total
end
----------------------------------------------------------------------
local total_train = 0
local total_test = 0
for i=1,FOLDS do
local train_set, test_set = get_fold(i)
-- Normalize patterns
local n = ann.Normalizer(train_set)
n:normalize(train_set, test_set)
local hits_train = {}
local hits_test = {}
for seed=1,REPEAT_EACH_FOLD do
t1 = os.date()
mlp = create_mlp(seed)
local epochs = 0
if STOP_GOAL == "fixed" then
epochs = do_train_fixed(mlp, train_set, FIXED_EPOCHS)
elseif STOP_GOAL == "mse" then
epochs = do_train_mse(mlp, train_set, MSE_GOAL, MAX_EPOCHS_FOR_MSE_GOAL)
end
t2 = os.date()
table.insert(hits_train, test_mlp(mlp, train_set))
table.insert(hits_test, test_mlp(mlp, test_set))
print(string.format(" RUN#%02d MSE=%.16g Hits TRAIN=%.16g TEST=%.16g\t(%s-%s) epochs=%d",
seed, mlp:mse(train_set),
hits_train[#hits_train],
hits_test[#hits_test], t1, t2, epochs))
end
local accum_train = 0
local accum_test = 0
for j=1,#hits_train do accum_train = accum_train + hits_train[j] end
for j=1,#hits_test do accum_test = accum_test + hits_test[j] end
print("Hits TRAIN="..(accum_train / #hits_train).." TEST="..(accum_test / #hits_test).." ("..#hits_test.." runs) "..os.date())
total_train = total_train + (accum_train / #hits_train)
total_test = total_test + (accum_test / #hits_test)
end
print("AVG TRAIN="..(total_train/FOLDS).." TEST="..(total_test/FOLDS))
|
local _M = require('apicast.cli.environment')
describe('Environment Configuration', function ()
describe('.new', function()
it('accepts default', function()
local default = { foo = 'bar' }
local env = _M.new(default)
assert.contains(default, env:context())
end)
end)
end)
|
local self = {}
GLib.Net.Layer3.Layer2Channel = GLib.MakeConstructor (self, GLib.Net.Layer3.Channel)
function GLib.Net.Layer3.Layer2Channel.ctor (channelName, handler, innerChannel)
if type (channelName) ~= "string" then
innerChannel = channelName
channelName = innerChannel:GetName ()
end
innerChannel = innerChannel or GLib.Net.Layer2.GetChannel (channelName)
innerChannel = innerChannel or GLib.Net.Layer2.RegisterChannel (channelName)
return GLib.Net.Layer3.Layer2Channel.__ictor (channelName, handler, innerChannel)
end
function self:ctor (channelName, handler, innerChannel)
self.InnerChannel = innerChannel
self.InnerChannel:SetHandler (handler)
self:Register ()
end
function self:dtor ()
self:Unregister ()
end
-- Registration
function self:Register ()
if self:IsRegistered () then return end
GLib.Net.Layer3.RegisterChannel (self)
self:SetRegistered (true)
end
function self:Unregister ()
if not self:IsRegistered () then return end
GLib.Net.Layer3.UnregisterChannel (self)
self:SetRegistered (false)
end
-- State
function self:IsOpen (destinationId)
return self.InnerChannel:IsOpen (destinationId)
end
function self:SetOpen (open)
self.InnerChannel:SetOpen (open)
return self
end
-- Packets
function self:DispatchPacket (destinationId, packet)
return self.InnerChannel:DispatchPacket (destinationId, packet)
end
function self:GetMTU ()
return self.InnerChannel:GetMTU ()
end
function self:IsDestinationRoutable (destinationId)
return self.InnerChannel:IsDestinationRoutable (destinationId)
end
-- Handlers
function self:GetHandler ()
return self.InnerChannel:GetHandler ()
end
function self:SetHandler (handler)
self.InnerChannel:SetHandler (handler)
self.Handler = handler
return self
end |
module 'mock'
--------------------------------------------------------------------
CLASS: UIWidgetElementImage ( UIWidgetElement )
:MODEL{}
function UIWidgetElementImage:__init()
self.defaultSprite = false
self.defaultBlend = 'alpha'
self.defaultStretch = true
self.stretch = true
end
function UIWidgetElementImage:setDefaultSprite( sprite )
self.defaultSprite = sprite
end
function UIWidgetElementImage:setDefaultBlend( blend )
self.defaultBlend = blend
end
function UIWidgetElementImage:setDefaultStretch( stretch )
self.defaultStretch = stretch
end
function UIWidgetElementImage:onInit( widget )
local sprite = widget:attachInternal( DeckComponent() )
self.sprite = sprite
self.spriteDeck = false
end
function UIWidgetElementImage:onDestroy( widget )
widget:detach( self.sprite )
end
local function _affirmDeck( data )
if not data then return nil end
if type( data ) == 'string' then --path
local imagePath = data
local deck = mock.Quad2D()
deck:setTexture( imagePath )
local dw, dh = deck:getSize()
deck:setOrigin( dw/2, dh/2 )
deck:update()
return AdHocAsset( deck )
else
if isAdHocAsset( data ) then
return data
elseif isInstance( data, mock.Deck2D ) then
return AdHocAsset( data )
end
end
end
function UIWidgetElementImage:onUpdateStyle( widget, style )
local sprite = self.sprite
local spriteDeck = style:getAsset( self:makeStyleName( 'sprite' ), self.defaultSprite )
spriteDeck = _affirmDeck( spriteDeck )
if self.spriteDeck ~= spriteDeck then
self.spriteDeck = spriteDeck
if not spriteDeck then
sprite:hide()
else
sprite:setDeck( spriteDeck )
sprite:show()
end
end
local blend = style:get( 'blend', self.defaultBlend )
local color = { style:getColor( self:makeStyleName( 'color' ), { 1,1,1,1 } ) }
sprite:setColor( unpack( color ) )
sprite:setBlend( blend )
self.stretch = style:getBoolean( 'stretch', self.defaultStretch )
end
function UIWidgetElementImage:onUpdateSize( widget, style )
local sprite = self.sprite
local ox, oy = self:getOffset()
local x0, y0, x1, y1 = self:getRect()
if self.stretch then
sprite:setRect( x0 + ox, y0 + oy, x1 + ox, y1 + oy )
else
sprite:fitRect( x0 + ox, y0 + oy, x1 + ox, y1 + oy )
end
sprite:setLocZ( self:getZOrder() )
end
|
--[[
#########################
# conky-system-lua-V3 #
# by +WillemO @wim66 #
# v1.0 8-dec-17 #
# #
#########################
]]
--[[TEXT WIDGET v1.3 by Wlourf 25/06/2010
This widget can drawn texts set in the "text_settings" table with some parameters
http://u-scripts.blogspot.com/2010/06/text-widget.html
The parameters (all optionals) are :
text - text to display, default = "Conky is good for you"
use conky_parse to display conky value ie text=conly_parse("${cpu cpu1}")
- coordinates below are relative to top left corner of the conky window
x - x coordinate of first letter (bottom-left), default = center of conky window
y - y coordinate of first letter (bottom-left), default = center of conky window
h_align - horizontal alignement of text relative to point (x,y), default="l"
available values are "l": left, "c" : center, "r" : right
v_align - vertical alignment of text relative to point (x,y), default="b"
available values "t" : top, "m" : middle, "b" : bottom
font_name - name of font to use, default = Free Sans
font_size - size of font to use, default = 14
italic - display text in italic (true/false), default=false
oblique - display text in oblique (true/false), default=false (I don' see the difference with italic!)
bold - display text in bold (true/false), default=false
angle - rotation of text in degrees, default = 0 (horizontal)
colour - table of colours for text, default = plain white {{1,0xFFFFFF,1}}
this table contains one or more tables with format {P,C,A}
P=position of gradient (0 = beginning of text, 1= end of text)
C=hexadecimal colour
A=alpha (opacity) of color (0=invisible,1=opacity 100%)
Examples :
for a plain color {{1,0x00FF00,0.5}}
for a gradient with two colours {{0,0x00FF00,0.5},{1,0x000033,1}}
or {{0.5,0x00FF00,1},{1,0x000033,1}} -with this one, gradient will start in the middle of the text
for a gradient with three colours {{0,0x00FF00,0.5},{0.5,0x000033,1},{1,0x440033,1}}
and so on ...
orientation - in case of gradient, "orientation" defines the starting point of the gradient, default="ww"
there are 8 available starting points : "nw","nn","ne","ee","se","ss","sw","ww"
(n for north, w for west ...)
theses 8 points are the 4 corners + the 4 middles of text's outline
so a gradient "nn" will go from "nn" to "ss" (top to bottom, parallele to text)
a gradient "nw" will go from "nw" to "se" (left-top corner to right-bottom corner)
radial - define a radial gradient (if present at the same time as "orientation", "orientation" will have no effect)
this parameter is a table with 6 numbers : {xa,ya,ra,xb,yb,rb}
they define two circle for the gradient :
xa, ya, xb and yb are relative to x and y values above
reflection_alpha - add a reflection effect (values from 0 to 1) default = 0 = no reflection
other values = starting opacity
reflection_scale - scale of the reflection (default = 1 = height of text)
reflection_length - length of reflection, define where the opacity will be set to zero
calues from 0 to 1, default =1
skew_x,skew_y - skew text around x or y axis
Needs conky 1.8.0
To call this script in the conkyrc, in before-TEXT section:
lua_load /path/to/the/lua/script/text.lua
lua_draw_hook_pre draw_text
v1.0 07/06/2010, Original release
v1.1 10/06/2010 Add "orientation" parameter
v1.2 15/06/2010 Add "h_align", "v_align" and "radial" parameters
v1.3 25/06/2010 Add "reflection_alpha", "reflection_length", "reflection_scale",
"skew_x" et "skew_y"
]]
require 'cairo'
function conky_draw_text()
--BEGIN OF PARAMETRES
if conky_window==nil then return end
local w=conky_window.width
local h=conky_window.height
local xc=w/2
local yc=h/2
local color1={{0,0xE7660B,1}}
local color2={{0,0xFAAD3E,1}}
local color3={{0,0xDCE142,1}}
text_settings={
{
text=conky_parse("${if_existing /usr/bin/lsb_release} ${execi 10000 lsb_release -d | cut -f 2}${else} $distribution ${endif}"),
font_name="ubuntu",
font_size=22,
h_align="c",
x=xc,
y=35,
colour=color1,
},
{
text=conky_parse( "$sysname ${kernel}" ),
x=20,
y=55,
colour=color2,
},
{
text=conky_parse( "Uptime: ${uptime}" ),
x=20,
y=72,
colour=color2,
},
{
text=conky_parse("${execi 6000 cat /proc/cpuinfo | grep -i 'Model name' -m 1 | cut -c14-43}"),
x=20,
y=92,
colour=color2,
},
{
text=conky_parse("CPU: ${execi 5 sensors|grep 'Package'|awk '{print $4}'} ${cpu cpu1}%"),
h_align="c",
x=xc,
y=117,
colour=color2,
},
{
text="Memory",
h_align="c",
x=xc,
y=200,
colour=color3,
},
{
text=conky_parse("Used ${mem} Free ${memeasyfree}"),
x=20,
y=216,
colour=color2,
},
{
text="Disks",
h_align="c",
x=xc,
y=266,
colour=color3,
},
{
text=conky_parse("Root Used ${fs_used /} Free ${fs_free /}"),
x=20,
y=285,
colour=color2,
},
{
text=conky_parse("Home Used ${fs_used /home/} Free ${fs_free /home/}"),
x=20,
y=320,
colour=color2,
},
{
text="Network speed",
h_align="c",
x=xc,
y=360,
colour=color3,
},
{
text="Up",
x=23,
y=380,
colour=color2,
},
{
text=conky_parse(var_NETUP),
h_align="r",
x=120,
y=380,
colour=color2,
},
{
text="Down",
x=142,
y=380,
colour=color2,
},
{
text=conky_parse(var_NETDOWN),
h_align="r",
x=240,
y=380,
colour=color2,
},
{
text="Total",
x=23,
y=442,
colour=color2,
},
{
text=conky_parse(var_TOTALUP),
h_align="r",
x=120,
y=442,
colour=color2,
},
{
text="Total",
x=142,
y=442,
colour=color2,
},
{
text=conky_parse(var_TOTALDOWN),
h_align="r",
x=240,
y=442,
colour=color2,
},
{
text="Processes",
h_align="c",
x=xc,
y=464,
colour=color3,
},
{text=conky_parse("${top name 1}"),x=20,y=480,colour={{0,0X42E147,1}},font_size=16,},
{text=conky_parse("${top name 2}"),x=20,y=498,colour={{0,0X42E147,0.85}},font_size=16,},
{text=conky_parse("${top name 3}"),x=20,y=516,colour={{0,0X42E147,0.70}},font_size=16,},
{text=conky_parse("${top name 4}"),x=20,y=534,colour={{0,0X42E147,0.55}},font_size=16,},
{text=conky_parse("${top name 5}"),x=20,y=552,colour={{0,0X42E147,0.40}},font_size=16,},
{text=conky_parse("${top name 6}"),x=20,y=570,colour={{0,0X42E147,0.25}},font_size=16,},
{text=conky_parse("${top cpu 1}%"),x=228,y=480,h_align="r",colour={{0,0X42E147,1}},font_size=16,},
{text=conky_parse("${top cpu 2}%"),x=228,y=498,h_align="r",colour={{0,0X42E147,0.85}},font_size=16,},
{text=conky_parse("${top cpu 3}%"),x=228,y=516,h_align="r",colour={{0,0X42E147,0.70}},font_size=16,},
{text=conky_parse("${top cpu 4}%"),x=228,y=534,h_align="r",colour={{0,0X42E147,0.55}},font_size=16,},
{text=conky_parse("${top cpu 5}%"),x=228,y=552,h_align="r",colour={{0,0X42E147,0.40}},font_size=16,},
{text=conky_parse("${top cpu 6}%"),x=228,y=570,h_align="r",colour={{0,0X42E147,0.25}},font_size=16,},
{
text=conky_parse("Available updates: ${execi 3000 checkupdates | wc -l}"),
h_align="c",
x=xc,
y=620,
font_size=12,
colour=color3,
},
}
--------------END OF PARAMETERES----------------
if conky_window == nil then return end
if tonumber(conky_parse("$updates"))<3 then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
for i,v in pairs(text_settings) do
cr = cairo_create (cs)
display_text(v)
cairo_destroy(cr)
end
cairo_surface_destroy(cs)
end
function rgb_to_r_g_b2(tcolour)
colour,alpha=tcolour[2],tcolour[3]
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function display_text(t)
local function set_pattern()
--this function set the pattern
if #t.colour==1 then
cairo_set_source_rgba(cr,rgb_to_r_g_b2(t.colour[1]))
else
local pat
if t.radial==nil then
local pts=linear_orientation(t,te)
pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
else
pat = cairo_pattern_create_radial (t.radial[1],t.radial[2],t.radial[3],t.radial[4],t.radial[5],t.radial[6])
end
for i=1, #t.colour do
cairo_pattern_add_color_stop_rgba (pat, t.colour[i][1], rgb_to_r_g_b2(t.colour[i]))
end
cairo_set_source (cr, pat)
end
end
--set default values if needed
if t.text==nil then t.text="Conky is good for you !" end
if t.x==nil then t.x = conky_window.width/2 end
if t.y==nil then t.y = conky_window.height/2 end
if t.colour==nil then t.colour={{0,0XFFFFFF,1},{0.6,0xFFFFFF,0.7}, {1,0xFFFFFF,0.2}} end
if t.font_name==nil then t.font_name="ubuntu" end
if t.font_size==nil then t.font_size=14 end
if t.angle==nil then t.angle=0 end
if t.italic==nil then t.italic=false end
if t.oblique==nil then t.oblique=false end
if t.bold==nil then t.bold=false end
if t.radial ~= nil then
if #t.radial~=6 then
print ("error in radial table")
t.radial=nil
end
end
if t.orientation==nil then t.orientation="nn" end
if t.h_align==nil then t.h_align="l" end
if t.v_align==nil then t.v_align="b" end
if t.reflection_alpha == nil then t.reflection_alpha=0 end
if t.reflection_length == nil then t.reflection_length=1 end
if t.reflection_scale == nil then t.reflection_scale=1 end
if t.skew_x==nil then t.skew_x=0 end
if t.skew_y==nil then t.skew_y=0 end
cairo_translate(cr,t.x,t.y)
cairo_rotate(cr,t.angle*math.pi/180)
cairo_save(cr)
local slant = CAIRO_FONT_SLANT_NORMAL
local weight =CAIRO_FONT_WEIGHT_NORMAL
if t.italic then slant = CAIRO_FONT_SLANT_ITALIC end
if t.oblique then slant = CAIRO_FONT_SLANT_OBLIQUE end
if t.bold then weight = CAIRO_FONT_WEIGHT_BOLD end
cairo_select_font_face(cr, t.font_name, slant,weight)
for i=1, #t.colour do
if #t.colour[i]~=3 then
print ("error in color table")
t.colour[i]={1,0xFFFFFF,1}
end
end
local matrix0 = cairo_matrix_t:create()
skew_x,skew_y=t.skew_x/t.font_size,t.skew_y/t.font_size
cairo_matrix_init (matrix0, 1,skew_y,skew_x,1,0,0)
cairo_transform(cr,matrix0)
cairo_set_font_size(cr,t.font_size)
te=cairo_text_extents_t:create()
cairo_text_extents (cr,t.text,te)
set_pattern()
mx,my=0,0
if t.h_align=="c" then
mx=-te.width/2
elseif t.h_align=="r" then
mx=-te.width
end
if t.v_align=="m" then
my=-te.height/2-te.y_bearing
elseif t.v_align=="t" then
my=-te.y_bearing
end
cairo_move_to(cr,mx,my)
cairo_show_text(cr,t.text)
if t.reflection_alpha ~= 0 then
local matrix1 = cairo_matrix_t:create()
cairo_set_font_size(cr,t.font_size)
cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(te.height+te.y_bearing+my)*(1+t.reflection_scale))
cairo_set_font_size(cr,t.font_size)
te=cairo_text_extents_t:create()
cairo_text_extents (cr,t.text,te)
cairo_transform(cr,matrix1)
set_pattern()
cairo_move_to(cr,mx,my)
cairo_show_text(cr,t.text)
local pat2 = cairo_pattern_create_linear (0,
(te.y_bearing+te.height+my),
0,
te.y_bearing+my)
cairo_pattern_add_color_stop_rgba (pat2, 0,1,0,0,1-t.reflection_alpha)
cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
cairo_set_line_width(cr,1)
dy=te.x_bearing
if dy<0 then dy=dy*(-1) end
cairo_rectangle(cr,mx+te.x_bearing,te.y_bearing+te.height+my,te.width+dy,-te.height*1.05)
cairo_clip_preserve(cr)
cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
--cairo_stroke(cr)
cairo_mask(cr,pat2)
cairo_pattern_destroy(pat2)
cairo_set_operator(cr,CAIRO_OPERATOR_OVER)
end
end
function linear_orientation(t,te)
local w,h=te.width,te.height
local xb,yb=te.x_bearing,te.y_bearing
if t.h_align=="c" then
xb=xb-w/2
elseif t.h_align=="r" then
xb=xb-w
end
if t.v_align=="m" then
yb=-h/2
elseif t.v_align=="t" then
yb=0
end
if t.orientation=="nn" then
p={xb+w/2,yb,xb+w/2,yb+h}
elseif t.orientation=="ne" then
p={xb+w,yb,xb,yb+h}
elseif t.orientation=="ww" then
p={xb,h/2,xb+w,h/2}
elseif vorientation=="se" then
p={xb+w,yb+h,xb,yb}
elseif t.orientation=="ss" then
p={xb+w/2,yb+h,xb+w/2,yb}
elseif vorientation=="ee" then
p={xb+w,h/2,xb,h/2}
elseif t.orientation=="sw" then
p={xb,yb+h,xb+w,yb}
elseif t.orientation=="nw" then
p={xb,yb,xb+w,yb+h}
end
return p
end
|
-- DOC: http://w3.impa.br/~diego/software/luasocket/tcp.html
-- module table
local luasocket_ssl = {}
local type = type
local assert = assert
local luasocket = require("mqtt.luasocket")
-- Open network connection to .host and .port in conn table
-- Store opened socket to conn table
-- Returns true on success, or false and error text on failure
function luasocket_ssl.connect(conn)
assert(type(conn.secure_params) == "table", "expecting .secure_params to be a table")
-- open usual TCP connection
local ok, err = luasocket.connect(conn)
if not ok then
return false, "luasocket connect failed: "..err
end
local wrapped
-- load right ssl module
local ssl = require(conn.ssl_module or "ssl")
-- TLS/SSL initialization
wrapped, err = ssl.wrap(conn.sock, conn.secure_params)
if not wrapped then
conn.sock:shutdown()
return false, "ssl.wrap() failed: "..err
end
ok = wrapped:dohandshake()
if not ok then
conn.sock:shutdown()
return false, "ssl dohandshake failed"
end
-- replace sock in connection table with wrapped secure socket
conn.sock = wrapped
return true
end
-- Shutdown network connection
function luasocket_ssl.shutdown(conn)
conn.sock:close()
end
-- Copy original methods from mqtt.luasocket module
luasocket_ssl.send = luasocket.send
luasocket_ssl.receive = luasocket.receive
luasocket_ssl.settimeout = luasocket.settimeout
-- export module table
return luasocket_ssl
-- vim: ts=4 sts=4 sw=4 noet ft=lua
|
local _M = {}
local ngx_set_header = ngx.req.set_header
local req_get_headers = ngx.req.get_headers
local cjson = require("cjson")
function _M.execute(conf)
if req_get_headers()[conf.input_header_name] then
ngx.log(ngx.INFO, "found "..conf.input_header_name.." header and transforming...")
local decoded_text = ngx.decode_base64(req_get_headers()[conf.input_header_name])
local userObj = cjson.decode(decoded_text)
ngx_set_header(conf.output_header_name, userObj[conf.property_to_pick])
else
ngx.log(ngx.ERR, conf.input_header_name.." header unavaiable")
end
end
return _M |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Repr = require(ReplicatedStorage.Vendor.Repr)
local SortedArray = require(ReplicatedStorage.SortedArray)
local t = require(ReplicatedStorage.Vendor.t)
local Error__index = {
__index = function(_, i)
error(tostring(i) .. " is not a valid EnumerationItem")
end;
}
local Error__index2 = {
__index = function(_, i)
error(tostring(i) .. " is not a valid member")
end;
}
local EnumerationsArray = SortedArray.new(nil, function(Left, Right)
return tostring(Left) < tostring(Right)
end)
local Enumerations = setmetatable({}, Error__index)
function Enumerations.GetEnumerations()
return EnumerationsArray:Copy()
end
local function ReadOnlyNewIndex(_, Index)
error(string.format("Cannot write to index [%q]", Index))
end
local function CompareEnumTypes(EnumItem1, EnumItem2)
return EnumItem1.Value < EnumItem2.Value
end
local Casts = {}
local EnumContainerTemplate = {__index = setmetatable({}, Error__index)}
function EnumContainerTemplate.__index:GetEnumerationItems()
local Array = {}
local Count = 0
for _, Item in next, EnumContainerTemplate[self] do
Count += 1
Array[Count] = Item
end
table.sort(Array, CompareEnumTypes)
return Array
end
function EnumContainerTemplate.__index:Cast(Value)
local Castables = Casts[self]
local Cast = Castables[Value]
if Cast then
return Cast
else
return false, "[" .. Repr(Value) .. "] is not a valid " .. tostring(self)
end
end
local function ConstructUserdata(__index, __newindex, __tostring)
local Enumeration = newproxy(true)
local EnumerationMetatable = getmetatable(Enumeration)
EnumerationMetatable.__index = __index
EnumerationMetatable.__newindex = __newindex
EnumerationMetatable.__metatable = "[Enumeration] Requested metatable is locked"
function EnumerationMetatable.__tostring()
return __tostring
end
return Enumeration
end
local function ConstructEnumerationItem(Name, Value, EnumContainer, LockedEnumContainer, EnumerationStringStub, Castables)
local Item = ConstructUserdata(setmetatable({
Name = Name;
Value = Value;
EnumerationType = LockedEnumContainer;
}, Error__index2), ReadOnlyNewIndex, EnumerationStringStub .. Name, Castables)
Castables[Name] = Item
Castables[Value] = Item
Castables[Item] = Item
EnumContainer[Name] = Item
end
local MakeEnumerationTuple = t.tuple(t.string, t.union(t.array(t.string), t.map(t.string, t.number)))
local function MakeEnumeration(_, EnumType: string, EnumTypes)
assert(MakeEnumerationTuple(EnumType, EnumTypes))
if rawget(Enumerations, EnumType) then
error("Enumeration of EnumType " .. EnumType .. " already exists")
end
local Castables = {}
local EnumContainer = setmetatable({}, EnumContainerTemplate)
local LockedEnumContainer = ConstructUserdata(EnumContainer, ReadOnlyNewIndex, EnumType)
local EnumerationStringStub = "Enumeration." .. EnumType .. "."
local NumEnumTypes = #EnumTypes
if NumEnumTypes > 0 then
for Index = 1, NumEnumTypes do
ConstructEnumerationItem(EnumTypes[Index], Index - 1, EnumContainer, LockedEnumContainer, EnumerationStringStub, Castables)
end
else
for Name, Value in next, EnumTypes do
ConstructEnumerationItem(Name, Value, EnumContainer, LockedEnumContainer, EnumerationStringStub, Castables)
end
end
Casts[LockedEnumContainer] = Castables
EnumContainerTemplate[LockedEnumContainer] = EnumContainer
EnumerationsArray:Insert(LockedEnumContainer)
Enumerations[EnumType] = LockedEnumContainer
end
return ConstructUserdata(Enumerations, MakeEnumeration, "Enumerations") |
local unpack = unpack
local ipairs = ipairs
local pairs = pairs
local t_insert = table.insert
local _M = { }
local function kmap(func, tbl)
if not tbl then return end
local res = {}
for k, v in pairs(tbl) do
local rk, rv = func(k, v)
if rk then
res[rk] = rv
else
t_insert(res, rv)
end
end
return res
end
_M.kmap = kmap
local function map(func, tbl)
if not tbl then return end
local res = {}
for k, v in pairs(tbl) do
local rv = func(v, k)
if rv ~= nil then
t_insert(res, rv)
end
end
return res
end
_M.map = map
local function filter(func, tbl)
return kmap(function(k, v)
local rk, rv = func(k, v)
if rk then
return rk, rv
end
end, tbl)
end
_M.filter = filter
local function reduce(func, acc, tbl)
if not tbl then return end
for k, v in pairs(tbl) do
acc = func(k, v, acc)
end
return acc
end
_M.reduce = reduce
local function curry(func, ...)
if select('#', ...) == 0 then return func end
local args = { ... }
return function( ... )
local clone = { unpack(args) }
for _, v in ipairs{...} do t_insert(clone , v) end
return func(unpack(clone))
end
end
_M.curry = curry
local function chain(...)
local args = { ... }
return function(...)
local real_arg = {...}
for i=1, #args do
real_arg = { args[i](unpack(real_arg)) }
end
return unpack(real_arg)
end
end
_M.chain = chain
_M.table_keys = curry(kmap, function(k, v) return nil, k end)
_M.table_vals = curry(map, function(v) return v end)
_M.table_clone = curry(kmap, function(k,v) return k, v end)
return _M
|
lesser_interval_cooldown_random_spell = class({})
function lesser_interval_cooldown_random_spell:OnCreated( data )
-- ### VALUES START ### --
self.interval = 1
self.cooldown_reduction = 25
-- ### VALUES END ### --
if not IsServer() then return end
self.perkname = data.perkName
self.perkID = data.perkID
self.level = data.level
self.perkEffectiveness = data.perkEffectiveness
self:StartIntervalThink(1.0)
self:SetStackCount(self.interval)
end
function lesser_interval_cooldown_random_spell:DeclareFunctions()
local funcs = {
MODIFIER_PROPERTY_TOOLTIP
}
return funcs
end
function lesser_interval_cooldown_random_spell:OnIntervalThink()
if not IsServer() then return end
if self:GetStackCount() == 0 then
local caster = self:GetParent()
local abilities = {}
for i=0,9 do
local ability = caster:GetAbilityByIndex(i)
if ability ~= nil then
if ability:GetCooldownTimeRemaining() > 1 then
table.insert(abilities, ability)
end
end
end
if abilities ~= nil then
if table.getn(abilities) > 0 then
self:SetStackCount(self.interval)
local rng = RandomInt(1, table.getn(abilities))
local ability = abilities[rng]
local ability_cd = ability:GetCooldownTimeRemaining()
local ability_cd_new = ability_cd * ( ( 100 - self.cooldown_reduction ) / 100 )
ability:EndCooldown()
ability:StartCooldown(ability_cd_new)
end
end
PerkAppearance_Active(self:GetParent():GetPlayerOwnerID(), self.perkname, self.perkID, "#226ac1", "!")
else
self:DecrementStackCount()
PerkAppearance_Inactive(self:GetParent():GetPlayerOwnerID(), self.perkname, self.perkID, self:GetStackCount())
end
end
function lesser_interval_cooldown_random_spell:OnTooltip()
return self.cooldown_reduction
end
function lesser_interval_cooldown_random_spell:GetAttributes()
return MODIFIER_ATTRIBUTE_PERMANENT + MODIFIER_ATTRIBUTE_IGNORE_INVULNERABLE + MODIFIER_ATTRIBUTE_MULTIPLE
end
function lesser_interval_cooldown_random_spell:IsHidden()
--return true
end
function lesser_interval_cooldown_random_spell:IsPurgable()
return false
end
function lesser_interval_cooldown_random_spell:IsPurgeException()
return false
end
function lesser_interval_cooldown_random_spell:IsStunDebuff()
return false
end
function lesser_interval_cooldown_random_spell:IsDebuff()
return false
end
function lesser_interval_cooldown_random_spell:GetTexture()
return "lesser_interval_cooldown_random_spell"
end
|
local addonName, vars = ...
local L = vars.L
Paste = LibStub("AceAddon-3.0"):NewAddon(addonName)
local addon = Paste
local AceGUI = LibStub("AceGUI-3.0")
vars.svnrev = vars.svnrev or {}
local svnrev = vars.svnrev
svnrev["core.lua"] = tonumber(("$Revision: 54 $"):match("%d+"))
local defaults = {
profile = {
debug = false, -- for addon debugging
minimap = {
hide = false,
},
stripempty = true,
trimwhitespace = false,
windowscale = 1.0,
editscale = 1.0,
shiftenter = false,
}
}
local settings = defaults.profile
local optionsFrame
local charName
local hiddenFrame = CreateFrame("Button", addonName.."HiddenFrame", UIParent)
local revision = tonumber(("$Revision: 54 $"):match("%d+"))
local minimapIcon = LibStub("LibDBIcon-1.0")
local LDB, LDBo
local linelimit = 254
local function chatMsg(msg)
DEFAULT_CHAT_FRAME:AddMessage(addonName..": "..msg)
end
local function debug(msg)
if addon.db.profile.debug then
chatMsg(msg)
end
end
function addon:myOptions()
return {
type = "group",
set = function(info,val)
local s = settings ; for i = 2,#info-1 do s = s[info[i]] end
s[info[#info]] = val; debug(info[#info].." set to: "..tostring(val))
addon:Update()
end,
get = function(info)
local s = settings ; for i = 2,#info-1 do s = s[info[i]] end
return s[info[#info]] end,
args = {
general = {
type = "group",
inline = true,
name = L["General"],
args = {
debug = {
name = L["Debug"],
desc = L["Toggle debugging output"],
type = "toggle",
guiHidden = true,
},
config = {
name = L["Config"],
desc = L["Open the configuration GUI"],
type = "execute",
guiHidden = true,
func = function() addon:Config() end,
},
show = {
name = L["Show"],
desc = L["Show/Hide the Paste window"],
type = "execute",
guiHidden = true,
func = function() addon:ToggleWindow() end,
},
minimap = {
order = 15,
name = L["Minimap Icon"],
desc = L["Display minimap icon"],
type = "toggle",
set = function(info,val)
settings.minimap.hide = not val
addon:Update()
end,
get = function() return not settings.minimap.hide end,
},
stripempty = {
order = 17,
name = L["Strip Empty Lines"],
desc = L["Strip empty lines (those containing only whitespace) from the output. Note some channels automatically drop fully empty lines."],
type = "toggle",
},
trimwhitespace = {
order = 18,
name = L["Trim Whitespace"],
desc = L["Trim whitespace from the beginning and end of lines in the output."],
type = "toggle",
},
aheader = {
name = APPEARANCE_LABEL,
type = "header",
cmdHidden = true,
order = 300,
},
windowscale = {
order = 310,
type = 'range',
name = L["Window Scale"],
desc = L["Scale the Paste window and all its contents"],
min = 0.1,
max = 5,
step = 0.1,
bigStep = 0.1,
isPercent = true,
},
editscale = {
order = 320,
type = 'range',
name = L["Edit font scale"],
desc = L["Scale the text font used in the Paste edit box"],
min = 0.1,
max = 5,
step = 0.1,
bigStep = 0.1,
isPercent = true,
},
bheader = {
name = KEY_BINDINGS,
type = "header",
cmdHidden = true,
order = 900,
},
shiftenter = {
order = 905,
name = L["Shift-Enter to Paste"],
desc = L["Shift-Enter hotkey while typing in the edit box will Paste and Close"],
type = "toggle",
},
togglebind = {
desc = L["Bind a key to toggle the Paste window"],
type = "keybinding",
name = L["Show/Hide the Paste window"],
cmdHidden = true,
order = 910,
width = "double",
set = function(info,val)
local b1, b2 = GetBindingKey("PASTE")
if b1 then SetBinding(b1) end
if b2 then SetBinding(b2) end
SetBinding(val, "PASTE")
SaveBindings(GetCurrentBindingSet())
end,
get = function(info) return GetBindingKey("PASTE") end,
},
},
},
}
}
end
BINDING_NAME_PASTE = L["Show/Hide the Paste window"]
BINDING_HEADER_PASTE = addonName
local function table_clone(t)
if not t then return nil
elseif type(t) == "table" then
local res = {}
for k,v in pairs(t) do
res[table_clone(k)] = table_clone(v)
end
return res
else
return t
end
end
function addon:RefreshConfig()
-- things to do after load or settings are reset
debug("RefreshConfig")
settings = addon.db.profile
addon.settings = settings
charName = UnitName("player")
for k,v in pairs(defaults.profile) do
if settings[k] == nil then
settings[k] = table_clone(v)
end
end
settings.loaded = true
addon:Update()
end
function addon:Update()
-- things to do when settings change
if LDBo then
minimapIcon:Refresh(addonName)
end
addon:UpdateCount()
if addon.gui then -- scale the window
local frame = addon.gui.frame
local old = frame:GetScale()
local new = settings.windowscale
if old ~= new then
local top, left = frame:GetTop(), frame:GetLeft()
frame:ClearAllPoints()
frame:SetScale(new)
left = left * old / new
top = top * old / new
frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", left, top)
end
local file, oldpt, flags = addon.editfont:GetFont()
local newpt = addon.editfontnorm * settings.editscale
if math.abs(oldpt - newpt) > 0.25 then
addon.editfont:SetFont(file, newpt, flags)
end
end
end
function addon:SetupVersion()
local svnrev = 0
local files = vars.svnrev
files["X-Build"] = tonumber((GetAddOnMetadata(addonName, "X-Build") or ""):match("%d+"))
files["X-Revision"] = tonumber((GetAddOnMetadata(addonName, "X-Revision") or ""):match("%d+"))
for _,v in pairs(files) do -- determine highest file revision
if v and v > svnrev then
svnrev = v
end
end
addon.revision = svnrev
files["X-Curse-Packaged-Version"] = GetAddOnMetadata(addonName, "X-Curse-Packaged-Version")
files["Version"] = GetAddOnMetadata(addonName, "Version")
addon.version = files["X-Curse-Packaged-Version"] or files["Version"] or "@"
if string.find(addon.version, "@") then -- dev copy uses "@.project-version.@"
addon.version = "r"..svnrev
end
end
function addon:OnInitialize()
addon.db = LibStub("AceDB-3.0"):New("PasteDB", defaults)
addon:SetupVersion()
addon:RefreshConfig()
local options = addon:myOptions()
LibStub("AceConfigRegistry-3.0"):ValidateOptionsTable(options, addonName)
LibStub("AceConfig-3.0"):RegisterOptionsTable(addonName, options, {"paste"})
optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(addonName, addonName, nil, "general")
optionsFrame.default = function()
for k,v in pairs(defaults.profile) do settings[k] = table_clone(v) end
addon:RefreshConfig()
if InterfaceOptionsFrame:IsShown() then
addon:Config(); addon:Config()
end
end
options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(addon.db)
LibStub("AceConfigDialog-3.0"):AddToBlizOptions(addonName, L["Profiles"], addonName, "profiles")
debug("OnInitialize")
self.db.RegisterCallback(self, "OnProfileChanged", "RefreshConfig")
self.db.RegisterCallback(self, "OnProfileCopied", "RefreshConfig")
self.db.RegisterCallback(self, "OnProfileReset", "RefreshConfig")
self.db.RegisterCallback(self, "OnDatabaseReset", "RefreshConfig")
end
function addon:Config()
if optionsFrame then
if ( InterfaceOptionsFrame:IsShown() ) then
InterfaceOptionsFrame:Hide();
else
InterfaceOptionsFrame_OpenToCategory(optionsFrame)
end
end
end
function addon:OnEnable()
debug("OnEnable")
--self:RegisterEvent("READY_CHECK")
if LDB then
return
end
if AceLibrary and AceLibrary:HasInstance("LibDataBroker-1.1") then
LDB = AceLibrary("LibDataBroker-1.1")
elseif LibStub then
LDB = LibStub:GetLibrary("LibDataBroker-1.1",true)
end
if LDB then
LDBo = LDB:NewDataObject(addonName, {
type = "launcher",
label = addonName,
icon = "Interface\\Icons\\inv_scroll_08",
OnClick = function(self, button)
if button == "RightButton" then
addon:Config()
else
addon:ToggleWindow()
end
end,
OnTooltipShow = function(tooltip)
if tooltip and tooltip.AddLine then
tooltip:SetText(addonName)
tooltip:AddLine("|cffff8040"..L["Left Click"].."|r "..L["to toggle window"])
tooltip:AddLine("|cffff8040"..L["Right Click"].."|r "..L["for options"])
tooltip:Show()
end
end,
})
end
if LDBo then
minimapIcon:Register(addonName, LDBo, settings.minimap)
end
addon:Update()
end
function addon:ToggleWindow(keystate)
if keystate == "down" then return end -- ensure keybind doesnt end up in the text box
debug("ToggleWindow")
if not addon.gui then
addon:CreateWindow()
end
if addon.gui:IsShown() then
addon.gui:Hide()
else
addon.gui:Show()
addon.edit:SetFocus()
addon:Update()
end
end
function addon:CreateWindow()
if addon.gui then
return
end
local f = AceGUI:Create("Frame")
f.frame:SetFrameStrata("MEDIUM")
f.frame:Raise()
f.content:SetFrameStrata("MEDIUM")
f.content:Raise()
f:Hide()
addon.gui = f
f:SetTitle(addonName.." "..addon.version)
--addon:fixTitle()
f:SetCallback("OnClose", OnClose)
f:SetLayout("Fill")
f.frame:SetClampedToScreen(true)
settings.pos = settings.pos or {}
f:SetStatusTable(settings.pos)
addon.minwidth = 500
addon.minheight = 320
f:SetWidth(addon.minwidth)
f:SetHeight(addon.minheight)
f:SetAutoAdjustHeight(true)
addon:setEscapeHandler(f, function() addon:ToggleWindow() end)
local c = AceGUI:Create("SimpleGroup")
c:SetLayout("List")
c:SetFullWidth(true)
c:SetFullHeight(true)
f:AddChild(c)
local edit = AceGUI:Create("MultiLineEditBox")
c:AddChild(edit)
edit:SetMaxLetters(0)
local shortcut = L["Control-V"]
if IsMacClient() then
shortcut = L["Command-V"]
end
edit:SetLabel(string.format(L["Use %s to paste the clipboard into this box"], shortcut))
edit:SetNumLines(10)
edit:SetHeight(170)
edit:DisableButton(true)
edit:SetFullWidth(true)
edit:SetCallback("OnTextChanged", function(widget, t) addon:UpdateCount() end)
edit:SetText("")
addon.edit = edit
addon.editfont = CreateFont("PasteEditFont")
addon.editfont:CopyFontObject(ChatFontNormal)
edit.editBox:SetFontObject(addon.editfont)
addon.editfontnorm = select(2, addon.editfont:GetFont())
-- AceGUI fails at enforcing minimum Frame resize for a container, so fix it
hooksecurefunc(f,"OnHeightSet", function(widget, height)
if (widget ~= addon.gui) then return end
if (height < addon.minheight) then
f:SetHeight(addon.minheight)
else
edit:SetHeight(height - addon.minheight + 170)
end
end)
hooksecurefunc(f,"OnWidthSet", function(widget, width)
if (widget ~= addon.gui) then return end
if (width < addon.minwidth) then
f:SetWidth(addon.minwidth)
end
end)
local oldhandler = edit.editBox:GetScript("OnEnterPressed")
edit.editBox:SetScript("OnEnterPressed", function(self)
if settings.shiftenter and IsShiftKeyDown() then
f:Hide()
addon:PasteText(edit:GetText())
elseif oldhandler then
oldhandler(self)
else
edit.editBox:Insert("\n")
end
end)
local w = AceGUI:Create("SimpleGroup")
w:SetLayout("Flow")
w:SetFullWidth(true)
c:AddChild(w)
local target = AceGUI:Create("EditBox")
settings.whispertarget = settings.whispertarget or ""
target:SetText(settings.whispertarget)
target:SetMaxLetters(30)
target:SetWidth(200)
target:SetCallback("OnTextChanged",function(widget, text)
settings.whispertarget = target:GetText()
end)
target:SetCallback("OnEnterPressed",function(widget)
target:ClearFocus()
end)
local where = AceGUI:Create("Dropdown")
addon.wherewidget = where
where:SetMultiselect(false)
where:SetLabel(L["Paste to:"])
where:SetWidth(200)
where:SetCallback("OnEnter",addon.UpdateWhere)
where:SetCallback("OnValueChanged",function(widget, event, key)
settings.where = key
if key == CHAT_MSG_WHISPER_INFORM or key == BN_WHISPER then
target:SetDisabled(false)
target:SetFocus()
else
target:SetDisabled(true)
end
end)
settings.where = settings.where or CHAT_DEFAULT
addon.UpdateWhere()
where:SetValue(settings.where)
target:SetDisabled(settings.where ~= CHAT_MSG_WHISPER_INFORM and settings.where ~= BN_WHISPER)
w:AddChild(where)
w:AddChild(target)
local b = AceGUI:Create("SimpleGroup")
b:SetLayout("Flow")
b:SetFullWidth(true)
c:AddChild(b)
local bwidth = 150
local pcbutton = AceGUI:Create("Button")
pcbutton:SetText(L["Paste and Close"])
pcbutton:SetWidth(bwidth)
pcbutton:SetCallback("OnClick", function(widget, button)
f:Hide()
addon:PasteText(edit:GetText())
end)
b:AddChild(pcbutton)
local pbutton = AceGUI:Create("Button")
pbutton:SetText(L["Paste"])
pbutton:SetWidth(bwidth)
pbutton:SetCallback("OnClick", function(widget, button)
addon:PasteText(edit:GetText())
end)
b:AddChild(pbutton)
local clear = AceGUI:Create("Button")
clear:SetText(L["Clear"])
clear:SetWidth(bwidth)
clear:SetCallback("OnClick", function(widget, button)
edit:SetText("")
addon:UpdateCount()
edit:SetFocus()
end)
b:AddChild(clear)
end
addon.wherefn = {
[CHAT_MSG_SAY] = function(str) SendChatMessage(str, "SAY") end,
[CHAT_MSG_YELL] = function(str) SendChatMessage(str, "YELL") end,
[CHAT_MSG_PARTY] = function(str) SendChatMessage(str, "PARTY") end,
[CHAT_MSG_RAID] = function(str) SendChatMessage(str, "RAID") end,
[INSTANCE_CHAT] = function(str) SendChatMessage(str, "INSTANCE_CHAT") end,
[CHAT_MSG_GUILD] = function(str) SendChatMessage(str, "GUILD") end,
[CHAT_MSG_OFFICER] = function(str) SendChatMessage(str, "OFFICER") end,
[CHAT_MSG_WHISPER_INFORM] = function(str)
local t = settings.whispertarget
if not t then
chatMsg(L["You must select a whisper target!"])
return
end
SendChatMessage(str, "WHISPER", nil, t)
end,
[BN_WHISPER] = function(str)
local t = settings.whispertarget
if not t then
chatMsg(L["You must select a whisper target!"])
return
end
local pID = BNet_GetBNetIDAccount(t)
if pID then
BNSendWhisper(pID, str)
return
end
chatMsg(ERR_FRIEND_NOT_FOUND)
end,
[CHAT_DEFAULT] = function(str)
ChatFrame_OpenChat("")
local edit = ChatEdit_GetActiveWindow();
edit:SetText(str)
ChatEdit_SendText(edit,1)
ChatEdit_DeactivateChat(edit)
end,
}
function addon.UpdateWhere()
addon.wherelist = addon.wherelist or {}
wipe(addon.wherelist)
local w = addon.wherelist
w[CHAT_DEFAULT] = CHAT_DEFAULT
w[CHAT_MSG_SAY] = CHAT_MSG_SAY
w[CHAT_MSG_YELL] = CHAT_MSG_YELL
w[CHAT_MSG_WHISPER_INFORM] = CHAT_MSG_WHISPER_INFORM
if BNFeaturesEnabledAndConnected() then
w[BN_WHISPER] = BN_WHISPER
end
if GetNumGroupMembers() > 0 then
w[CHAT_MSG_PARTY] = CHAT_MSG_PARTY
end
if IsInRaid() then
w[CHAT_MSG_RAID] = CHAT_MSG_RAID
end
if IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
w[INSTANCE_CHAT] = INSTANCE_CHAT
end
if IsInGuild() then
w[CHAT_MSG_GUILD] = CHAT_MSG_GUILD
w[CHAT_MSG_OFFICER] = CHAT_MSG_OFFICER
end
local widget = addon.wherewidget
if widget and not widget.open then
widget:SetList(addon.wherelist)
if not addon.wherelist[settings.where] then
settings.where = CHAT_DEFAULT
widget:SetValue(settings.where)
end
end
end
function addon:UpdateCount()
if not addon.edit then return end
local text = addon.edit:GetText()
if not text then return end
text = addon:normalizeText(text)
local lines = 1
local chars = #text - lines + 1
for _ in text:gmatch("\n") do lines = lines + 1 end
addon.gui:SetStatusText(lines.." "..L["lines"]..", "..chars.." "..L["characters"])
end
function addon:normalizeText(text)
if not text then return nil end
text = text:gsub("\r\n","\n")
text = text:gsub("\r","\n")
if settings.stripempty then
text = text:gsub("\n%s*\n","\n")
text = text:gsub("^%s*\n","\n")
text = text:gsub("\n%s*$","\n")
end
if settings.trimwhitespace then
text = text:gsub("\n%s*","\n")
text = text:gsub("%s*\n","\n")
text = text:gsub("^%s*","")
text = text:gsub("%s*$","")
end
text = strtrim(text)
return text
end
function addon:PasteText(text)
addon.UpdateWhere()
local where = settings.where
local sendfn = addon.wherelist[where] and addon.wherefn[where]
if not sendfn then return end
text = addon:normalizeText(text)
if where ~= CHAT_DEFAULT and not addon.slashwarned and
(text:find("^/%w") or text:find("\n/%w")) then
StaticPopup_Show("PASTE_SLASHWARN")
addon.slashwarned = text
return
end
local lines = { strsplit("\n", text) }
for idx, line in ipairs(lines) do
while line and #line > 0 do
local curr = line
if #curr > linelimit then -- break long lines
local bpt = linelimit
for i = linelimit, linelimit-30, -1 do -- look for break characters near the end
if string.match(string.sub(curr,i), "^[%p%s]") then
bpt = i
break
end
end
line = curr:sub(bpt+1)
curr = curr:sub(1,bpt)
else
line = ""
end
sendfn(curr)
end
end
end
StaticPopupDialogs["PASTE_SLASHWARN"] = {
preferredIndex = 3, -- reduce the chance of UI taint
text = L["It looks like you're pasting some slash commands to a chat channel. Would you like to execute them instead?"],
button1 = YES,
button2 = NO,
button3 = CANCEL,
OnAccept = function()
settings.where = CHAT_DEFAULT
addon.wherewidget:SetValue(CHAT_DEFAULT)
addon:PasteText(addon.slashwarned)
end,
OnCancel = function() addon:PasteText(addon.slashwarned) end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
enterClicksFirstButton = false,
showAlert = true,
}
----------------------------------------------------------------------------------
-- AceGUI hacks --
-- hack to hook the escape key for closing the window
function addon:setEscapeHandler(widget, fn)
widget.origOnKeyDown = widget.frame:GetScript("OnKeyDown")
widget.frame:SetScript("OnKeyDown", function(self,key)
widget.frame:SetPropagateKeyboardInput(true)
if key == "ESCAPE" then
widget.frame:SetPropagateKeyboardInput(false)
fn()
elseif widget.origOnKeyDown then
widget.origOnKeyDown(self,key)
end
end)
widget.frame:EnableKeyboard(true)
widget.frame:SetPropagateKeyboardInput(true)
end
|
local chests = {}
local userChests = {}
local openStaticChests = {}
function vrpServer.loadChest(chestName)
local user_id = vRP.getUserId(source)
local source = vRP.getUserSource(user_id)
local data = {}
chests[tostring(chestName)] = true
userChests[user_id] = tostring(chestName)
chestName = "chest:"..tostring(chestName)
for k,v in pairs(openStaticChests) do
if v == chestName and k ~= user_id then
TriggerClientEvent("Notify",source,"negado","<b>O Baú está sendo usado por outra pessoa.</b>")
return false
end
end
openStaticChests[user_id] = chestName
local data1 = vRP.getSData(chestName)
local items = json.decode(data1) or {}
local actual = 0
for k,v in pairs(items) do
v.item = k
v.weight = itemlist[v.item].weight
v.icon = itemlist[v.item].icon
v.name = itemlist[v.item].name
v.desc = itemlist[v.item].desc
actual = actual + (v.weight * v.amount)
table.insert(data, v)
end
return json.encode(data),actual
end
AddEventHandler("vRP:playerLeave",function(user_id,source)
if openStaticChests[user_id] then
openStaticChests[user_id] = nil
end
end)
function vrpServer.closeStaticChests()
local source = source
local user_id = vRP.getUserId(source)
if openStaticChests[user_id] then
openStaticChests[user_id] = nil
end
end
function vrpServer.checkIntPermissionsChest(perm)
local source = source
local user_id = vRP.getUserId(source)
if user_id then
if not vRP.searchReturn(source,user_id) then
return vRP.hasPermission(user_id,perm)
end
end
end
function vrpServer.getChest()
local source = source
local user_id = vRP.getUserId(source)
return userChests[user_id]
end
RegisterNetEvent("b03566cd:pd-inventory:putItem")
AddEventHandler("b03566cd:pd-inventory:putItem", function(itemName, itemCount)
local user_id = vRP.getUserId(source)
local source = vRP.getUserSource(user_id)
local identity = vRP.getUserIdentity(user_id)
local chestname = "chest:"..userChests[user_id]
local name = userChests[user_id]
local max_weight = parseInt(cfg.staticChests[name].max)
local items = json.decode(vRP.getSData(chestname)) or {}
if not actual then actual = 0 end
local add = false
for k,v in pairs(items) do
if k == itemName then
add = true
end
end
if itemCount == 0 then itemCount = getItemAmount(user_id, itemName) end
if checkChestWeightAmount(user_id, itemName, itemCount, max_weight, chestname) then
if getItemAmount(user_id, itemName) >= itemCount and itemCount > 0 then
if add then
items[itemName].amount = items[itemName].amount + itemCount
else
items[itemName] = {amount = itemCount}
end
consumeItem(user_id, itemName, itemCount)
vRP.setSData(chestname, json.encode(items))
if name == "Policia" or name == "Sheriff" then
SendWebhookMessage(webhookchestpolice,"```prolog\n[ID]: "..user_id.." "..identity.name.." "..identity.firstname.." \n[GUARDOU]: "..vRP.format(parseInt(itemCount)).." "..getItemName(itemName).." \n[BAU]: "..name.." "..os.date("\n[Data]: %d/%m/%Y [Hora]: %H:%M:%S").." \r```")
else
SendWebhookMessage(webhookchestgang,"```prolog\n[ID]: "..user_id.." "..identity.name.." "..identity.firstname.." \n[GUARDOU]: "..vRP.format(parseInt(itemCount)).." "..getItemName(itemName).." \n[BAU]: "..name.." "..os.date("\n[Data]: %d/%m/%Y [Hora]: %H:%M:%S").." \r```")
end
end
end
end)
RegisterNetEvent("b03566cd:pd-inventory:getItem")
AddEventHandler("b03566cd:pd-inventory:getItem", function(itemName, itemCount)
local user_id = vRP.getUserId(source)
local source = vRP.getUserSource(user_id)
local identity = vRP.getUserIdentity(user_id)
local chestname = "chest:"..userChests[user_id]
local name = userChests[user_id]
local items = json.decode(vRP.getSData(chestname)) or {}
if itemCount == 0 then itemCount = items[itemName].amount end
if checkWeightAmount(user_id, itemName, itemCount) and itemCount > 0 then
-- local max = vRP.getInventoryMaxWeight(user_id)
-- local weight = vRP.getInventoryWeight(user_id)
-- if (vRP.getItemWeight(itemName) * itemCount) + weight > max then
-- TriggerClientEvent("Notify",source,"negado","Mochila cheia.")
-- return
-- end
if items[itemName].amount > itemCount then
items[itemName].amount = items[itemName].amount - itemCount
elseif items[itemName].amount == itemCount and itemCount > 0 then
items[itemName] = nil
else
TriggerClientEvent("Notify",source,"aviso","Ocorreu algum erro! Tente abrir o porta-malas novamente.")
return
end
vRP.setSData(chestname, json.encode(items))
giveItem(user_id, itemName, itemCount)
if name == "Policia" or name == "Sheriff" then
SendWebhookMessage(webhookchestpolice,"```prolog\n[ID]: "..user_id.." "..identity.name.." "..identity.firstname.." \n[RETIROU]: "..vRP.format(parseInt(itemCount)).." "..getItemName(itemName).." \n[BAU]: "..name.." "..os.date("\n[Data]: %d/%m/%Y [Hora]: %H:%M:%S").." \r```<@&584135183213527050>")
else
SendWebhookMessage(webhookchestgang,"```prolog\n[ID]: "..user_id.." "..identity.name.." "..identity.firstname.." \n[RETIROU]: "..vRP.format(parseInt(itemCount)).." "..getItemName(itemName).." \n[BAU]: "..name.." "..os.date("\n[Data]: %d/%m/%Y [Hora]: %H:%M:%S").." \r```")
end
end
end)
|
--====================================================================--
-- Imports and Setup
--====================================================================--
-- import DMC Objects file
local Objects = require( "dmc_objects" )
--====================================================================--
-- Setup, Constants
--====================================================================--
-- setup some aliases to make code cleaner
local inheritsFrom = Objects.inheritsFrom
local CoronaBase = Objects.CoronaBase
--====================================================================--
-- Shapes class
--====================================================================--
local Shape = inheritsFrom( CoronaBase )
Shape.NAME = "Shape Base"
--== Class Constants
Shape.IMAGE = ""
Shape.IMAGE_W = 0
Shape.IMAGE_H = 0
--== Start: Setup DMC Objects
function Shape:_init()
self:superCall( "_init" )
--==--
--== Create Properties ==--
self.rotation = 0
end
-- reverse init() setup
function Shape:_undoInit()
--==--
self:superCall( "_undoInit" )
end
function Shape:_createView()
local o -- object tmp
o = display.newImageRect( self.IMAGE, self.IMAGE_W, self.IMAGE_H )
self:insert( o )
end
--[[
if our setup was more complex than just Corona elements,
we could specifically tear down the object's view here.
dmc_objects will remove pure-Corona elements automatically
function Shape:_undoCreateView()
--==--
self:superCall( "_undoCreateView" )
end
--]]
--====================================================================--
-- Square class
--====================================================================--
local Square = inheritsFrom( Shape )
Square.NAME = "Square"
Square.IMAGE = "assets/shape_square.png"
Square.IMAGE_W = 86
Square.IMAGE_H = 86
--====================================================================--
-- Diamond class
--====================================================================--
local Diamond = inheritsFrom( Shape )
Diamond.NAME = "Diamond"
Diamond.IMAGE = "assets/shape_diamond.png"
Diamond.IMAGE_W = 77
Diamond.IMAGE_H = 117
--====================================================================--
-- Hexagon class
--====================================================================--
local Hexagon = inheritsFrom( Shape )
Hexagon.NAME = "Hexagon"
Hexagon.IMAGE = "assets/shape_hexagon.png"
Hexagon.IMAGE_W = 86
Hexagon.IMAGE_H = 86
--====================================================================--
-- Circle class
--====================================================================--
local Circle = inheritsFrom( Shape )
Circle.NAME = "Circle"
Circle.IMAGE = "assets/shape_circle.png"
Circle.IMAGE_W = 86
Circle.IMAGE_H = 86
--====================================================================--
-- Triangle class
--====================================================================--
local Triangle = inheritsFrom( Shape )
Triangle.NAME = "Triangle"
Triangle.IMAGE = "assets/shape_triangle.png"
Triangle.IMAGE_W = 96
Triangle.IMAGE_H = 87
--====================================================================--
-- Shape Factory
--====================================================================--
-- Support Items
local SHAPES_LIST = { "square", "diamond", "hexagon", "triangle", "circle" }
local function selectRandomShape()
local randRange = 100
local randNum = math.random( randRange )
local numShapes = table.getn( SHAPES_LIST )
local shapeDivisor = randRange / numShapes
local shapeIdx = math.floor( randNum / shapeDivisor )
if randNum ~= 100 then shapeIdx = shapeIdx + 1 end
return SHAPES_LIST[ shapeIdx ]
end
-- The Factory
local ShapeFactory = {}
function ShapeFactory.create( shape, options )
local shapeType = shape or selectRandomShape()
local options = options or {}
local s
if ( shapeType == "square" ) then
s = Square:new( options )
elseif ( shapeType == "diamond" ) then
s = Diamond:new( options )
elseif ( shapeType == "circle" ) then
s = Circle:new( options )
elseif ( shapeType == "hexagon" ) then
s = Hexagon:new( options )
elseif ( shapeType == "triangle" ) then
s = Triangle:new( options )
else
print ("Shape Factory, unknown shape!! " .. tostring( shapeType ) )
end
return s
end
return ShapeFactory
|
--[[
Project: DisLua.
Author: imring <fishlake-scripts.ru>.
License: MIT License.
Project "DisLua" is a parser of bytecode LuaJIT.
Details: https://github.com/FishLake-Scripts/DisLua
]]
local ARGS_AD = 1
local ARGS_ABC = 2
local opcodes = {
[0] = { 'ISLT', ARGS_AD },
{ 'ISGE', ARGS_AD },
{ 'ISLE', ARGS_AD },
{ 'ISGT', ARGS_AD },
{ 'ISEQV', ARGS_AD },
{ 'ISNEV', ARGS_AD },
{ 'ISEQS', ARGS_AD },
{ 'ISNES', ARGS_AD },
{ 'ISEQN', ARGS_AD },
{ 'ISNEN', ARGS_AD },
{ 'ISEQP', ARGS_AD },
{ 'ISNEP', ARGS_AD },
{ 'ISTC', ARGS_AD },
{ 'ISFC', ARGS_AD },
{ 'IST', ARGS_AD },
{ 'ISF', ARGS_AD },
{ 'ISTYPE', ARGS_AD },
{ 'ISNUM', ARGS_AD },
{ 'MOV', ARGS_AD },
{ 'NOT', ARGS_AD },
{ 'UNM', ARGS_AD },
{ 'LEN', ARGS_AD },
{ 'ADDVN', ARGS_ABC },
{ 'SUBVN', ARGS_ABC },
{ 'MULVN', ARGS_ABC },
{ 'DIVVN', ARGS_ABC },
{ 'MODVN', ARGS_ABC },
{ 'ADDNV', ARGS_ABC },
{ 'SUBNV', ARGS_ABC },
{ 'MULNV', ARGS_ABC },
{ 'DIVNV', ARGS_ABC },
{ 'MODNV', ARGS_ABC },
{ 'ADDVV', ARGS_ABC },
{ 'SUBVV', ARGS_ABC },
{ 'MULVV', ARGS_ABC },
{ 'DIVVV', ARGS_ABC },
{ 'MODVV', ARGS_ABC },
{ 'POW', ARGS_ABC },
{ 'CAT', ARGS_ABC },
{ 'KSTR', ARGS_AD },
{ 'KCDATA', ARGS_AD },
{ 'KSHORT', ARGS_AD },
{ 'KNUM', ARGS_AD },
{ 'KPRI', ARGS_AD },
{ 'KNIL', ARGS_AD },
{ 'UGET', ARGS_AD },
{ 'USETV', ARGS_AD },
{ 'USETS', ARGS_AD },
{ 'USETN', ARGS_AD },
{ 'USETP', ARGS_AD },
{ 'UCLO', ARGS_AD },
{ 'FNEW', ARGS_AD },
{ 'TNEW', ARGS_AD },
{ 'TDUP', ARGS_AD },
{ 'GGET', ARGS_AD },
{ 'GSET', ARGS_AD },
{ 'TGETV', ARGS_ABC },
{ 'TGETS', ARGS_ABC },
{ 'TGETB', ARGS_ABC },
{ 'TGETR', ARGS_ABC },
{ 'TSETV', ARGS_ABC },
{ 'TSETS', ARGS_ABC },
{ 'TSETB', ARGS_ABC },
{ 'TSETM', ARGS_AD },
{ 'TSETR', ARGS_ABC },
{ 'CALLM', ARGS_ABC },
{ 'CALL', ARGS_ABC },
{ 'CALLMT', ARGS_AD },
{ 'CALLT', ARGS_AD },
{ 'ITERC', ARGS_ABC },
{ 'ITERN', ARGS_ABC },
{ 'VARG', ARGS_ABC },
{ 'ISNEXT', ARGS_AD },
{ 'RETM', ARGS_AD },
{ 'RET', ARGS_AD },
{ 'RET0', ARGS_AD },
{ 'RET1', ARGS_AD },
{ 'FORI', ARGS_AD },
{ 'JFORI', ARGS_AD },
{ 'FORL', ARGS_AD },
{ 'IFORL', ARGS_AD },
{ 'JFORL', ARGS_AD },
{ 'ITERL', ARGS_AD },
{ 'IITERL', ARGS_AD },
{ 'JITERL', ARGS_AD },
{ 'LOOP', ARGS_AD },
{ 'ILOOP', ARGS_AD },
{ 'JLOOP', ARGS_AD },
{ 'JMP', ARGS_AD },
{ 'FUNCF', ARGS_AD },
{ 'IFUNCF', ARGS_AD },
{ 'JFUNCF', ARGS_AD },
{ 'FUNCV', ARGS_AD },
{ 'IFUNCV', ARGS_AD },
{ 'JFUNCV', ARGS_AD },
{ 'FUNCC', ARGS_AD },
{ 'FUNCCW', ARGS_AD }
}
return opcodes |
-------------------------------------------------------------------
--------------------------- window:devAdd -----------------------
-------------------------------------------------------------------
--[[
dev add window
win_devadd.show () -- Show
win_devadd.hide () -- Hide
win_devadd.pos (x,y) -- Position set
internals:
win_devadd.help () -- display help text
date: 17/10/2018
by: Raul Mungai
--]]
-- Load artworks
----------------
css.load_btn_img ("\\buttons\\adddev.png", "devadd") -- app icon
css.load_img ("\\icons\\adddev-i.png", "devadd-i", "icon") -- app icon (small)
css.load_btn_img ("\\buttons\\setCode.png", "setDevID")
css.load_btn_img ("\\buttons\\textfield.png","textEdit")
css.load_btn_img ("\\buttons\\join.png", "join")
css.font_mount (thema.workDisk .. "res\\font\\F16B_1_S.txt", "F16B")
css.font_mount (thema.workDisk .. "res\\font\\F16_1_S.txt", "F24B")
-- Global Object
win_devadd = {}
widget_devadd = {}
local winname = "win&devadd"
local winnameI = ""
editdevIDVar = ""
local function win_devadd_create ()
winnameI = css.window_new (winname, false, "win_devadd.help")
-- add title and related buttons
css.window_title_new (winnameI, sknColl.dictGetPhrase("WIN", 28), nil, true)
css.window_title_btnSlected (winnameI, 3, true)
-- ID
local labID_w = 120
local labID_h = 20
-- UID
sknLbl.create("l_devID", winnameI, 30, 60, labID_w, labID_h, "HorCenter_VertCenter", "Device ID")
sknLbl.font("l_devID", "F16B")
sknLbl.colors("l_devID", thema.win_color, "transparent")
sknLbl.show("l_devID")
sknLbl.create("l_devIDv", winnameI, 30, 80, labID_w, labID_h, "HorCenter_VertCenter", "")
sknLbl.font("l_devIDv", "F24B")
sknLbl.colors("l_devIDv", thema.win_color, "transparent")
sknLbl.show("l_devIDv")
css.button_new ("setdevIDb", winnameI, 200, 55, "setDevID", "win_devadd.setID", true, false, "Set devID", thema.win_color)
-- Description
sknLbl.create("l_devDes", winnameI, 30, 120, labID_w, labID_h, "HorCenter_VertCenter", "Descrizione")
sknLbl.font("l_devDes", "F16B")
sknLbl.colors("l_devDes", thema.win_color, "transparent")
sknLbl.show("l_devDes")
sknLbl.create("l_devDesv", winnameI, 30, 140, labID_w, labID_h, "HorCenter_VertCenter", "")
sknLbl.font("l_devDesv", "F24B")
sknLbl.colors("l_devDesv", thema.win_color, "transparent")
sknLbl.show("l_devDesv")
css.button_new ("l_devDesb", winnameI, 200, 115, "textEdit", "win_devadd.setDesc", true, false, "Set Desc", thema.win_color)
css.button_new ("joinexeca", winnameI, 115, 190, "join", "win_devadd.autoJoin", true, false, "Join Auto", thema.win_color)
css.button_new ("joinexecm", winnameI, 210, 190, "join", "win_devadd.mnualJoin", true, false, "Join Manuale", thema.win_color)
-- Widget registration
widget_devadd = wd_btn.new ("devadd", "Device Add", "dev Add") -- add to widget list
end
-- change ID confirmation
function win_devadd.changeIDOK ()
sknLbl.text("l_devIDv", editdevIDVar)
end
-- set device ID
function win_devadd.setID ()
editdevIDVar = sknLbl.text("l_devIDv")
win_kbrd.set ("numbers", "editdevIDVar", 10, winname, "win_devadd.changeIDOK", "Device UID")
end
-- change Desc confirmation
function win_devadd.changeDescOK ()
sknLbl.text("l_devDesv", editdevIDVar)
end
-- set device desc
function win_devadd.setDesc()
editdevIDVar = sknLbl.text("l_devDesv")
win_kbrd.set ("alpha_ita", "editdevIDVar", 10, winname, "win_devadd.changeDescOK", "Descrizione")
end
-- Join after
function win_devadd.joinAfter ()
-- store UID on authlist
end
-- join Abort
function win_devadd.joinAbort ()
win_devadd.hide ()
end
-- delete user window
function win_devadd.joinAfter ()
--[[
local wd = win_wintool.win_workingDesc (wWinName)
if wd ~= nil then
win_popupyn.text (win_wmodify.deleteYes, win_wmodify.deleteNo, "ELINAZIONE WINDOW", "Vuoi eliminare la finestra " .. wd .. " Definitivamente ?")
end
--]]
end
-- Join event
function win_devadd.joinEvent (UID)
local UIDj = tonumber(sknLbl.text("l_devIDv"))
if UIDj == UID then
print ("JOIN ESEGUITO !!!!")
else
print ("JOIN DA UN ALTRO UID !!!!")
end
hourglass.hide ()
end
-- Join Abort
function win_devadd.joinAbort (UID)
hourglass.hide ()
print ("JOIN ANDATO MALEEEEE !!!!")
win_popup.text ("JOIN ERROR", "Non è stato possibile aggiungere il nuovo dispositivo. Verifica che sia attivo e riprova.")
end
-- try Manual Join
function win_devadd.manualJoin()
local UID = tonumber(sknLbl.text("l_devIDv"))
if UID == 0 then return end
hourglass.show ()
local isPresent = CCC.setnum (0, "WIRELESSNET", "devIsPresent",UID)
if isPresent == 0 then
hourglass.hide ()
win_popupyn.text (win_devadd.joinAfter, win_devadd.joinAbort, "DEVICE NON TROVATO", "Vuoi ricordare l'ID " .. tostring(UID) .. " per consentire il Join automatico in seguito ? ")
else
-- store UID on authlist
-- Exec the Join request
newObj_event = win_devadd.joinEvent
joinAbort_event = win_devadd.joinAbort
if CCC.setnum (0, "JOIn", "joinToMe",UID) == 0 then
hourglass.hide ()
win_popup.text ("JOIN ERROR", "Non e' stato possibile aggiungere il nuovo dispositivo. Verifica che sia attivo e riprova.")
end
hourglass.hide ()
win_popup.text ("AGGIUNTO DISPOSITIVO", "E' stato aggiunto un nuovo dispositivo ...")
win_devadd.hide ()
end
end
-- register ID for AUtomatic Join
function win_devadd.autoJoin()
local UID = tonumber(sknLbl.text("l_devIDv"))
if UID == 0 then return end
local descr = sknLbl.text("l_devDesv")
if descr == "" then return end
if CCC.getObjID(UID) >= 0 then
win_popup.text ("GIA' ATTIVO", "Il dispositivo e' gia' attivo.")
return
end
--if CCC.setnum (0, "WIRELESSNET", "authAddChk",UID) == 1 then
-- win_popup.text ("GIA' CENSITO", "Il dispositivo e' gia' censito.")
-- return
--end
-- register UID into Filesystem
if CCC.setnum (0, "WIRELESSNET", "authListAdd",UID) == 1 then
win_popup.text ("AGGIUNTO NUOVO ID", "E' stato aggiunto l'ID " .. tostring(UID) .. " relativo a " .. descr .. " alla lista. Il nuovo dispositivo verra' aggiunto automaticamente appena si presentera' in rete.")
win_devadd.hide ()
else
win_popup.text ("ERRORE IMPREVISTO", "Non e' stato possibile aggiungere il nuovo dispositivo alla lista.")
end
cccwrp.joinRequest(UID, descr)
end
function win_devadd.show ()
sknWin.showRestorable (winname)
end
function win_devadd.hide ()
sknWin.hide (winname)
end
function win_devadd.pos (x,y)
sknWin.pos (winname, x,y)
end
-- display help text
function win_devadd.help (name)
win_helper.help (37, name)
end
win_devadd_create () -- Window creation
|
-- See LICENSE for terms
local mod_LaunchFuel
local mod_MaxExportStorage
local mod_PassengerOrbitLifetime
local mod_MaxColonistsPerRocket
local mod_TravelTimeEarthMars
local mod_TravelTimeMarsEarth
local mod_RocketPrice
local mod_CargoCapacity
local mod_FoodPerRocketPassenger
-- override for custom_travel_time_mars/custom_travel_time_earth
local orig_RocketBase_FlyToEarth = RocketBase.FlyToEarth
function RocketBase:FlyToEarth(flight_time, ...)
if mod_TravelTimeEarthMars then
flight_time = mod_TravelTimeEarthMars
end
return orig_RocketBase_FlyToEarth(self, flight_time, ...)
end
local orig_RocketBase_FlyToMars = RocketBase.FlyToMars
function RocketBase:FlyToMars(cargo, cost, flight_time, ...)
if mod_TravelTimeMarsEarth then
flight_time = mod_TravelTimeMarsEarth
end
return orig_RocketBase_FlyToMars(self, cargo, cost, flight_time, ...)
end
-- some stuff checks one some other...
--~ local SetConsts = ChoGGi.ComFuncs.SetConstsG
local function SetConsts(id, value)
Consts[id] = value
g_Consts[id] = value
end
local function UpdateRockets()
SetConsts("MaxColonistsPerRocket", mod_MaxColonistsPerRocket)
SetConsts("TravelTimeEarthMars", mod_TravelTimeEarthMars)
SetConsts("TravelTimeMarsEarth", mod_TravelTimeMarsEarth)
SetConsts("RocketPrice", mod_RocketPrice)
SetConsts("CargoCapacity", mod_CargoCapacity)
SetConsts("FoodPerRocketPassenger", mod_FoodPerRocketPassenger)
local objs = UICity.labels.SupplyRocket or ""
for i = 1, #objs do
local obj = objs[i]
obj.launch_fuel = mod_LaunchFuel
obj.launch_fuel_expedition = mod_LaunchFuel
obj.passenger_orbit_life = mod_PassengerOrbitLifetime
obj.max_export_storage = mod_MaxExportStorage
end
end
-- fired when settings are changed/init
local function ModOptions()
local options = CurrentModOptions
mod_LaunchFuel = options:GetProperty("LaunchFuel") * const.ResourceScale
mod_MaxExportStorage = options:GetProperty("MaxExportStorage") * const.ResourceScale
mod_PassengerOrbitLifetime = options:GetProperty("PassengerOrbitLifetime") * const.HourDuration
mod_CargoCapacity = options:GetProperty("CargoCapacity") * const.ResourceScale
mod_FoodPerRocketPassenger = options:GetProperty("FoodPerRocketPassenger") * const.ResourceScale
mod_MaxColonistsPerRocket = options:GetProperty("MaxColonistsPerRocket")
mod_TravelTimeEarthMars = options:GetProperty("TravelTimeEarthMars") * const.Scale.hours
mod_TravelTimeMarsEarth = options:GetProperty("TravelTimeMarsEarth") * const.Scale.hours
mod_RocketPrice = options:GetProperty("RocketPrice") * const.Scale.mil
-- make sure we're ingame
if not UICity then
return
end
UpdateRockets()
end
-- load default/saved settings
OnMsg.ModsReloaded = ModOptions
-- fired when Mod Options>Apply button is clicked
function OnMsg.ApplyModOptions(id)
if id == CurrentModId then
ModOptions()
end
end
OnMsg.CityStart = UpdateRockets
OnMsg.LoadGame = UpdateRockets
|
-- Printscreen/Screenshot bash script wrapped in lua
-- Depends : maim, xclip
local awful = require('awful')
local ss = {}
local capture_screen = function(mode)
screen_shot_script = [[
dir=$HOME/Pictures/Screenshots
if [ ! -d $dir ]; then
mkdir -p $dir
fi
case ']] .. mode .. [[' in
'full')
maim -u -m 1 $dir/$(date +%Y%m%d_%H%M%S).png
xclip -selection clipboard -t image/png -i $dir/`ls -1 -t $dir | head -1` &
notify-send 'Snap!' 'Screenshot saved and copied to clipboard!'
;;
'area')
maim -u -s -m 1 $dir/$(date +%Y%m%d_%H%M%S).png
xclip -selection clipboard -t image/png -i $dir/`ls -1 -t $dir | head -1` &
notify-send 'Snap!' 'Area screenshot saved and copied to clipboard!'
;;
'select')
maim -u -s -m 1 $dir/$(date +%Y%m%d_%H%M%S).png
xclip -selection clipboard -t image/png -i $dir/`ls -1 -t $dir | head -1` &
notify-send 'Snap!' 'Selected shot saved and copied to clipboard!'
;;
esac
]]
awful.spawn.easy_async_with_shell(screen_shot_script, function(stdout, err, out, reason) end, false)
end
fullmode = function()
capture_screen('full')
end
areamode = function()
capture_screen('area')
end
selectmode = function()
capture_screen('select')
end
ss.fullmode = fullmode
ss.areamode = areamode
ss.selectmode = selectmode
return ss
|
local CNode = CNode
local Paths = CAI.Paths
local Utils = CAI.Utilities
local Requests = Paths.Requests
local Format = "%s-%s"
function Paths.Request(Requester, Grid, Start, Goal, UseLocked, Type)
if not IsValid(Requester) then return end
if not isstring(Grid) then return end
if not isvector(Start) then return end
if not isvector(Goal) then return end
local Name = string.format(Format, Requester.UID, Type or "Unknown")
local UID = Utils.GetUID(Name)
if not CNode.QueuePath(Grid, UID, Start, Goal, UseLocked) then
return print("Couldn't request path.")
end
Requests[UID] = {
Requester = Requester,
Type = Type
}
return true
end
hook.Add("Tick", "CAI Pathfinding Result", function()
local Results = CNode.GetPaths()
if not Results then return end
for UID, Path in pairs(Results) do
local Data = Requests[UID]
if not Data then print("no data for path", UID) continue end
local Requester = Data.Requester
if IsValid(Requester) then
Requester:ReceivePath(Path, Data.Type)
end
Requests[UID] = nil
end
end)
|
local API_NPC = require(script:GetCustomProperty("API_NPC"))
local API_D = require(script:GetCustomProperty("APIDamage"))
local RANGE = 220.0
local COOLDOWN = 8.0
local DAMAGE_RATE = 42.0
local COMBO_RANGE = 350.0
local COMBO_HALF_ANGLE = 30.0
local currentTasks = {}
function GetPriority(npc, taskHistory)
return 0.3
end
function OnTaskStart(npc, threatTable)
API_NPC.LookAtTargetWithoutPitch(npc, API_NPC.GetTarget(npc):GetWorldPosition())
currentTasks[npc] = Task.Spawn(function()
for i = 1, 4 do
Task.Wait(1.0)
for _, player in pairs(Game.FindPlayersInSphere(npc:GetWorldPosition(), COMBO_RANGE, {ignoreDead = true})) do
local offset = player:GetWorldPosition() - npc:GetWorldPosition()
offset.z = 0.0
local dot = offset:GetNormalized() .. (npc:GetWorldRotation() * Vector3.FORWARD)
if dot >= math.cos(math.rad(COMBO_HALF_ANGLE / 2.0)) then
API_D.ApplyDamage(npc, player, DAMAGE_RATE, API_D.TAG_AOE | API_D.TAG_PERIODIC)
end
end
end
end)
return 4.0
end
function OnTaskEnd(npc, interrupted)
if interrupted and currentTasks[npc] then
currentTasks[npc]:Cancel()
end
currentTasks[npc] = nil
end
API_NPC.RegisterTaskServer("swampspearthrower_combo", RANGE, COOLDOWN, GetPriority, OnTaskStart, OnTaskEnd)
|
objGateb = createObject(1557, 228.25027770996, 159.77064819336, 1002.0234375, 0, 0, 90)
exports.pool:allocateElement(objGateb)
setElementInterior(objGateb, 3)
setElementDimension(objGateb, 1)
objGateb2 = createObject(1557, 228.25027770996, 162.77064819336, 1002.0234375, 0, 0, 270)
exports.pool:allocateElement(objGateb2)
setElementInterior(objGateb2, 3)
setElementDimension(objGateb2, 1)
open = false
-- Gate code
function usePDDoor2(thePlayer)
local team = getPlayerTeam(thePlayer)
if (team==getTeamFromName("Las Venturas Metropolitan Police Department")) then
local x, y, z = getElementPosition(thePlayer)
local distance = getDistanceBetweenPoints3D(228.25027770996, 159.77064819336, 1002.0234375, x, y, z)
if (distance<=10) and (open==false) then
open = true
outputChatBox("LVMPD Door is now Open!", thePlayer, 0, 255, 0)
moveObject(objGateb, 1000, 228.25027770996, 159.77064819336, 1002.0234375, 0, 0, 90)
moveObject(objGateb2, 1000, 228.25027770996, 162.77064819336, 1002.0234375, 0, 0, -90)
setTimer(closePDDoor2, 5000, 1, thePlayer)
end
end
end
addCommandHandler("gate", usePDDoor2)
function closePDDoor2(thePlayer)
if (getElementType(thePlayer)) then
outputChatBox("LVMPD Door is now Closed!", thePlayer, 255, 0, 0)
end
moveObject(objGateb, 1000, 228.25027770996, 159.77064819336, 1002.0234375, 0, 0, -90)
moveObject(objGateb2, 1000, 228.25027770996, 162.77064819336, 1002.0234375, 0, 0, 90)
setTimer(resetState, 1000, 1)
end
function resetState()
open = false
end |
data:extend({
-- E-Motor Small
{
type = "assembling-machine",
name = "y-emotor-s",
icon_size = 32, icon = "__yi_engines__/graphics/entity/e-motor-icon.png",
flags = {"placeable-neutral","placeable-player", "player-creation"},
minable = {mining_time = 0.5, result = "y-emotor-s"},
max_health = 150,
corpse = "medium-remnants",
--resistances = {{type = "physical",percent = 60},},
fluid_boxes =
{
{
production_type = "output",
base_area = 1,
base_level = 1,
pipe_connections = {
{type="output", position = {0.5, -1.3}},
}
},
},
collision_box = {{-0.5, -0.7}, {0.7, 0.7}},
selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
animation =
{
north = { filename = "__yi_engines__/graphics/entity/e-motor-n.png",
width = 96, height = 96, shift = {0.5, -0.03}, frame_count = 1, line_length = 1, },
south = { filename = "__yi_engines__/graphics/entity/e-motor-s.png",
width = 96, height = 96, shift = {-0.5, 0.13}, frame_count = 1, line_length = 1, },
east = { filename = "__yi_engines__/graphics/entity/e-motor-e.png",
width = 96, height = 96, shift = {-0.09, 0.53}, frame_count = 1, line_length = 1, },
west = { filename = "__yi_engines__/graphics/entity/e-motor-w.png",
width = 96, height = 96, shift = {0.13, -0.47}, frame_count = 1, line_length = 1, },
},
crafting_categories = {"yrcat-mf1c"},
crafting_speed = 1,
module_specification = { module_slots = 0 },
allowed_effects = {"speed", "pollution"},
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = 3.5,
},
energy_usage = "350kW",
ingredient_count = 1,
order="a",
subgroup = "yie-engines",
},
-- E-Motor Medium
{
type = "assembling-machine",
name = "ye_emotor_m",
icon_size = 32, icon = "__yi_engines__/graphics/entity/e-motor-m_icon.png",
flags = {"placeable-neutral","placeable-player", "player-creation"},
minable = {mining_time = 0.5, result = "ye_emotor_m"},
max_health = 150,
corpse = "medium-remnants",
--resistances = {{type = "physical",percent = 60},},
fluid_boxes =
{
{
production_type = "output",
base_area = 1,
base_level = 1,
pipe_connections = {
{type="output", position = {0, -2}},
{type="output", position = {0, 2}},
}
},
},
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
animation =
{
north = { filename = "__yi_engines__/graphics/entity/emotor-m_ns.png",
width = 256, height = 256, shift = {0.5, -0.375}, frame_count = 4, line_length = 2, scale = 0.5, animation_speed = 0.25,},
south = { filename = "__yi_engines__/graphics/entity/emotor-m_ns.png",
width = 256, height = 256, shift = {0.5, -0.375}, frame_count = 4, line_length = 2, scale = 0.5, animation_speed = 0.25,},
east = { filename = "__yi_engines__/graphics/entity/emotor-m_we.png",
width = 256, height = 256, shift = {0.5, 0}, frame_count = 4, line_length = 2, scale = 0.5, animation_speed = 0.25, },
west = { filename = "__yi_engines__/graphics/entity/emotor-m_we.png",
width = 256, height = 256, shift = {0.5, 0}, frame_count = 4, line_length = 2, scale = 0.5, animation_speed = 0.25,},
},
crafting_categories = {"yrcat_motor"},
crafting_speed = 1,
module_specification = { module_slots = 0 },
allowed_effects = {"speed", "pollution"},
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = 3.5,
},
energy_usage = "350kW",
ingredient_count = 1,
order="a",
subgroup = "yie-engines",
},
-- mechanical water pump - small
{
type = "assembling-machine",
name = "y-mwater-pump",
icon_size = 32, icon = "__yi_engines__/graphics/entity/pump-icon.png",
flags = {"placeable-neutral","placeable-player", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "y-mwater-pump"},
max_health = 250,
corpse = "medium-remnants",
--resistances = {{type = "physical",percent = 60},},
fluid_boxes =
{
{
production_type = "output",
base_area = 1,
base_level = 1,
pipe_connections = {
{type="output", position = {1.5, 0.5}},
}
},
{
production_type = "input",
base_area = 5,
base_level = -1,
pipe_connections = {
{type="input", position = {-0.5, -1.5}},
}
},
},
collision_box = {{-0.8, -0.8}, {0.8, 0.8}},
selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
fast_replaceable_group = "assembling-machine",
animation =
{
north = { filename = "__yi_engines__/graphics/entity/pump_nna_s.png",
width = 128, height = 128, shift = {0.34, 0.53}, frame_count = 16, line_length = 16, },
south = { filename = "__yi_engines__/graphics/entity/pump_sna_s.png",
width = 128, height = 128, shift = {0.47, 0.22}, frame_count = 16, line_length = 16, },
east = { filename = "__yi_engines__/graphics/entity/pump_ena_s.png",
width = 128, height = 128, shift = {0.28, 0.31}, frame_count = 16, line_length = 16, },
west = { filename = "__yi_engines__/graphics/entity/pump_wna_s.png",
width = 128, height = 128, shift = {0.47, 0.47}, frame_count = 16, line_length = 16, },
},
crafting_categories = {"yrcat-pump"},
crafting_speed = 1.0,
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = 0.01,
},
energy_usage = "100W",
ingredient_count = 1,
order="a",
subgroup = "yie-engines",
},
-- mechanical water pump - medium
{
type = "assembling-machine",
name = "ye_wpump_m",
icon_size = 32, icon = "__yi_engines__/graphics/entity/e-motor-m_icon.png",
flags = {"placeable-neutral","placeable-player", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "ye_wpump_m"},
max_health = 250,
corpse = "medium-remnants",
--resistances = {{type = "physical",percent = 60},},
fluid_boxes =
{
{
production_type = "output",
base_area = 2,
base_level = 1,
pipe_connections = {
{type="output", position = { 2, 0}},
{type="output", position = {-2, 0}},
{type="output", position = { 0, 2}},
}
},
{
production_type = "input",
base_area = 2,
base_level = -1,
pipe_connections = {
{type="input", position = {0, -2}},
}
},
},
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
animation =
{
north = { filename = "__yi_engines__/graphics/entity/pump3x3_s.png",
width = 256, height = 256, shift = {0.5, 0}, frame_count = 16, line_length = 4, scale = 0.5, animation_speed = 0.5, },
south = { filename = "__yi_engines__/graphics/entity/pump3x3_s.png",
width = 256, height = 256, shift = {0.5, 0}, frame_count = 16, line_length = 4, scale = 0.5, animation_speed = 0.5, },
east = { filename = "__yi_engines__/graphics/entity/pump3x3_w.png",
width = 256, height = 256, shift = {0.5, 0}, frame_count = 16, line_length = 4, scale = 0.5, animation_speed = 0.5, },
west = { filename = "__yi_engines__/graphics/entity/pump3x3_w.png",
width = 256, height = 256, shift = {0.5, 0}, frame_count = 16, line_length = 4, scale = 0.5, animation_speed = 0.5, },
},
crafting_categories = {"yrcat_pump_2"},
crafting_speed = 4,
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = 0.5,
},
energy_usage = "50kW",
ingredient_count = 1,
order="a",
subgroup = "yie-engines",
},
}) |
--[[
file:service.lua
desc:桌子服务
auth:Carol Luo
]]
local _G = _G
local format = string.format
local ipairs = ipairs
local skynet = require("skynet")
local table = require("extend_table")
local multicast = require("api_multicast")
local sharedata = require("skynet.sharedata")
local queue = require("skynet.queue")
local senum = require("game.enum")
local cs = queue()
---@class service_competition @桌子服务
local service = {}
local this = service
---服务启动
---@param handle service @分配服务
---@param gameID gameID @游戏ID
---@param custom gameCustom @定制
function service.start(handle,gameID,custom)
this.shareFech()
---分配服务
---@type service
this._assign = handle
---服务信息
---@type serviceInf
this._services = sharedata.query(senum.mapServices())
---游戏信息
---@type gameInfo
local gameInfos = require("games.gameInfos")
local gameInfo = gameInfos[gameID]
--共享内存
for _,name in ipairs(gameInfo.sharedList) do
local deploy = sharedata.query(name)
_G.package.loaded[name] = deploy
end
---创建桌子
local import = require(gameInfo.importCompetition)
---@type gameCompetition @游戏桌子
this._competition = import.new(this,gameInfo,custom)
this._competition:dataReboot()
---组播对象
this.multicast()
end
---退出
function service.exit()
skynet.exit()
end
---加载共享
function service.shareFech()
local shareFech = sharedata.query("share.fech")
--通用部分
for _,name in ipairs(shareFech.general_fech) do
local deploy = sharedata.query(name)
_G.package.loaded[name] = deploy
end
--独属部分
for _,name in ipairs(shareFech.service_competition) do
local deploy = sharedata.query(name)
_G.package.loaded[name] = deploy
end
end
---服务表
function service.mapServices(name)
local services = sharedata.query(name)
---@type serviceInf @服务地址信息
this._services = services
end
---组播
function service.multicast()
---服务
local services = this._services
---组播
---@type api_multicast
this._multicast = multicast.new()
this._multicast:createBinding(services.mainChannel,function(channel,source,cmd,...)
this._manger:multicastMsg(cmd,...)
end)
end
skynet.start(function()
skynet.info_func(function()
return this._competition:getGameInfo()
end)
skynet.dispatch("lua",function(_,_,cmd,...)
local f = this[cmd]
local pack
if f then
pack = cs(f,...)
else
local table = this._competition
local f = table[cmd]
pack = cs(f,table,...)
end
skynet.retpack(pack or false)
end)
end)
|
return {'focaccia','focus','focussen','focusseren','focusgroep','focuspunt','focusgebied','focke','fockens','focusgroepen','focusseer','focusseerde','focusseert','focust','focuste','focusten','focusgebieden','focuspunten'} |
local __RUNLATER = {} UMF_RUNLATER = function(code) __RUNLATER[#__RUNLATER + 1] = code end
(function() if hook then return end local hook_table = {} local hook_compiled = {} local function recompile( event ) local hooks = {} for k, v in pairs( hook_table[event] ) do hooks[#hooks + 1] = v end hook_compiled[event] = hooks end hook = { table = hook_table } function hook.add( event, identifier, func ) assert( type( event ) == "string", "Event must be a string" ) if func then assert( identifier ~= nil, "Identifier must not be nil" ) assert( type( func ) == "function", "Callback must be a function" ) else assert( type( identifier ) == "function", "Callback must be a function" ) end hook_table[event] = hook_table[event] or {} hook_table[event][identifier] = func or identifier recompile( event ) return identifier end function hook.remove( event, identifier ) assert( type( event ) == "string", "Event must be a string" ) assert( identifier ~= nil, "Identifier must not be nil" ) if hook_table[event] then hook_table[event][identifier] = nil if next( hook_table[event] ) == nil then hook_table[event] = nil hook_compiled[event] = nil else recompile( event ) end end end function hook.run( event, ... ) local hooks = hook_compiled[event] if not hooks then return end for i = 1, #hooks do local a, b, c, d, e = hooks[i]( ... ) if a ~= nil then return a, b, c, d, e end end end function hook.saferun( event, ... ) local hooks = hook_compiled[event] if not hooks then return end for i = 1, #hooks do local s, a, b, c, d, e = softassert( pcall( hooks[i], ... ) ) if s and a ~= nil then return a, b, c, d, e end end end function hook.used( event ) return hook_table[event] end end)();
(function() local original = {} local function call_original( name, ... ) local fn = original[name] if fn then return fn( ... ) end end local detoured = {} function DETOUR( name, generator ) original[name] = _G[name] detoured[name] = generator( function( ... ) return call_original( name, ... ) end ) rawset( _G, name, nil ) end setmetatable( _G, { __index = detoured, __newindex = function( self, k, v ) if detoured[k] then original[k] = v else rawset( self, k, v ) end end, } ) end)();
(function() UMF_RUNLATER "UpdateQuickloadPatch()" local hook = hook local function checkoriginal( b, ... ) if not b then printerror( ... ) return end return ... end local function simple_detour( name ) local event = "base." .. name DETOUR( name, function( original ) return function( ... ) hook.saferun( event, ... ) return checkoriginal( pcall( original, ... ) ) end end ) end local detours = { "init", "tick", "update", } for i = 1, #detours do simple_detour( detours[i] ) end function shoulddraw( kind ) return hook.saferun( "api.shoulddraw", kind ) ~= false end DETOUR( "draw", function( original ) return function( dt ) if shoulddraw( "all" ) then hook.saferun( "base.predraw", dt ) if shoulddraw( "original" ) then checkoriginal( pcall( original, dt ) ) end hook.saferun( "base.draw", dt ) end end end ) DETOUR( "Command", function( original ) return function( cmd, ... ) hook.saferun( "base.precmd", cmd, { ... } ) local a, b, c, d, e, f = original( cmd, ... ) hook.saferun( "base.postcmd", cmd, { ... }, { a, b, c, d, e, f } ) end end ) local saved = {} local function hasfunction( t, bck ) if bck[t] then return end bck[t] = true for k, v in pairs( t ) do if type( v ) == "function" then return true end if type( v ) == "table" and hasfunction( v, bck ) then return true end end end function UpdateQuickloadPatch() for k, v in pairs( _G ) do if k ~= "_G" and type( v ) == "table" and hasfunction( v, {} ) then saved[k] = v end end end local quickloadfix = function() for k, v in pairs( saved ) do _G[k] = v end end DETOUR( "handleCommand", function( original ) return function( command, ... ) if command == "quickload" then quickloadfix() end hook.saferun( "base.command." .. command, ... ) return original( command, ... ) end end ) hook.add( "base.tick", "api.firsttick", function() hook.remove( "base.tick", "api.firsttick" ) hook.saferun( "api.firsttick" ) if type( firsttick ) == "function" then firsttick() end end ) end)();
(function() function IsPlayerInVehicle() return GetBool( "game.player.usevehicle" ) end local tool = GetString( "game.player.tool" ) local invehicle = IsPlayerInVehicle() local keyboardkeys = { "esc", "up", "down", "left", "right", "space", "interact", "return" } for i = 97, 97 + 25 do keyboardkeys[#keyboardkeys + 1] = string.char( i ) end local function checkkeys( func, mousehook, keyhook ) if hook.used( keyhook ) and func( "any" ) then for i = 1, #keyboardkeys do if func( keyboardkeys[i] ) then hook.saferun( keyhook, keyboardkeys[i] ) end end end if hook.used( mousehook ) then if func( "lmb" ) then hook.saferun( mousehook, "lmb" ) end if func( "rmb" ) then hook.saferun( mousehook, "rmb" ) end end end local mousekeys = { "lmb", "rmb", "mmb" } local heldkeys = {} hook.add( "base.tick", "api.default_hooks", function() if InputLastPressedKey then for i = 1, #mousekeys do local k = mousekeys[i] if InputPressed( k ) then hook.saferun( "api.mouse.pressed", k ) elseif InputReleased( k ) then hook.saferun( "api.mouse.released", k ) end end local lastkey = InputLastPressedKey() if lastkey ~= "" then heldkeys[lastkey] = true hook.saferun( "api.key.pressed", lastkey ) end for key in pairs( heldkeys ) do if not InputDown( key ) then heldkeys[key] = nil hook.saferun( "api.key.released", key ) break end end local wheel = InputValue( "mousewheel" ) if wheel ~= 0 then hook.saferun( "api.mouse.wheel", wheel ) end local mousedx = InputValue( "mousedx" ) local mousedy = InputValue( "mousedy" ) if mousedx ~= 0 or mousedy ~= 0 then hook.saferun( "api.mouse.move", mousedx, mousedy ) end elseif InputPressed then checkkeys( InputPressed, "api.mouse.pressed", "api.key.pressed" ) checkkeys( InputReleased, "api.mouse.released", "api.key.released" ) local wheel = InputValue( "mousewheel" ) if wheel ~= 0 then hook.saferun( "api.mouse.wheel", wheel ) end local mousedx = InputValue( "mousedx" ) local mousedy = InputValue( "mousedy" ) if mousedx ~= 0 or mousedy ~= 0 then hook.saferun( "api.mouse.move", mousedx, mousedy ) end end local n_invehicle = IsPlayerInVehicle() if invehicle ~= n_invehicle then hook.saferun( n_invehicle and "api.player.enter_vehicle" or "api.player.exit_vehicle", n_invehicle and GetPlayerVehicle() ) invehicle = n_invehicle end local n_tool = GetString( "game.player.tool" ) if tool ~= n_tool then hook.saferun( "api.player.switch_tool", n_tool, tool ) tool = n_tool end end ) end)();
(function() util = util or {} do local serialize_any, serialize_table serialize_table = function( val, bck ) if bck[val] then return "nil" end bck[val] = true local entries = {} for k, v in pairs( val ) do entries[#entries + 1] = string.format( "[%s] = %s", serialize_any( k, bck ), serialize_any( v, bck ) ) end return string.format( "{%s}", table.concat( entries, "," ) ) end serialize_any = function( val, bck ) local vtype = type( val ) if vtype == "table" then return serialize_table( val, bck ) elseif vtype == "string" then return string.format( "%q", val ) elseif vtype == "function" or vtype == "userdata" then return string.format( "nil ", tostring( val ) ) else return tostring( val ) end end function util.serialize( ... ) local result = {} for i = 1, select( "#", ... ) do result[i] = serialize_any( select( i, ... ), {} ) end return table.concat( result, "," ) end end function util.unserialize( dt ) local fn = loadstring( "return " .. dt ) if fn then setfenv( fn, {} ) return fn() end end do local function serialize_any( val, bck ) local vtype = type( val ) if vtype == "table" then if bck[val] then return "{}" end bck[val] = true local len = 0 for k, v in pairs( val ) do len = len + 1 end local rt = {} if len == #val then for i = 1, #val do rt[i] = serialize_any( val[i], bck ) end return string.format( "[%s]", table.concat( rt, "," ) ) else for k, v in pairs( val ) do if type( k ) == "string" or type( k ) == "number" then rt[#rt + 1] = string.format( "%s: %s", serialize_any( k, bck ), serialize_any( v, bck ) ) end end return string.format( "{%s}", table.concat( rt, "," ) ) end elseif vtype == "string" then return string.format( "%q", val ) elseif vtype == "function" or vtype == "userdata" or vtype == "nil" then return "null" else return tostring( val ) end end function util.serializeJSON( val ) return serialize_any( val, {} ) end end function util.shared_buffer( name, max ) max = max or 64 return { _pos_name = name .. ".position", _list_name = name .. ".list.", push = function( self, text ) local cpos = GetInt( self._pos_name ) SetString( self._list_name .. (cpos % max), text ) SetInt( self._pos_name, cpos + 1 ) end, len = function( self ) return math.min( GetInt( self._pos_name ), max ) end, pos = function( self ) return GetInt( self._pos_name ) end, get = function( self, index ) local pos = GetInt( self._pos_name ) local len = math.min( pos, max ) if index >= len then return end return GetString( self._list_name .. (pos + index - len) % max ) end, get_g = function( self, index ) return GetString( self._list_name .. (index % max) ) end, clear = function( self ) SetInt( self._pos_name, 0 ) ClearKey( self._list_name:sub( 1, -2 ) ) end, } end function util.shared_channel( name, max, local_realm ) max = max or 64 local channel = { _buffer = util.shared_buffer( name, max ), _offset = 0, _hooks = {}, _ready_count = 0, _ready = {}, broadcast = function( self, ... ) return self:send( "", ... ) end, send = function( self, realm, ... ) self._buffer:push( string.format( ",%s,;%s", (type( realm ) == "table" and table.concat( realm, "," ) or tostring( realm )), util.serialize( ... ) ) ) end, listen = function( self, callback ) if self._ready[callback] ~= nil then return end self._hooks[#self._hooks + 1] = callback self:ready( callback ) return callback end, unlisten = function( self, callback ) self:unready( callback ) self._ready[callback] = nil for i = 1, #self._hooks do if self._hooks[i] == callback then table.remove( self._hooks, i ) return true end end end, ready = function( self, callback ) if not self._ready[callback] then self._ready_count = self._ready_count + 1 self._ready[callback] = true end end, unready = function( self, callback ) if self._ready[callback] then self._ready_count = self._ready_count - 1 self._ready[callback] = false end end, } local_realm = "," .. (local_realm or "unknown") .. "," local function receive( ... ) for i = 1, #channel._hooks do local f = channel._hooks[i] if channel._ready[f] then f( channel, ... ) end end end hook.add( "base.tick", name, function( dt ) if channel._ready_count > 0 then local last_pos = channel._buffer:pos() if last_pos > channel._offset then for i = math.max( channel._offset, last_pos - max ), last_pos - 1 do local message = channel._buffer:get_g( i ) local start = message:find( ";", 1, true ) local realms = message:sub( 1, start - 1 ) if realms == ",," or realms:find( local_realm, 1, true ) then receive( util.unserialize( message:sub( start + 1 ) ) ) if channel._ready_count <= 0 then channel._offset = i + 1 return end end end channel._offset = last_pos end end end ) return channel end function util.async_channel( channel ) local listener = { _channel = channel, _waiter = nil, read = function( self ) self._waiter = coroutine.running() if not self._waiter then error( "async_channel:read() can only be used in a coroutine" ) end self._channel:ready( self._handler ) return coroutine.yield() end, close = function( self ) if self._handler then self._channel:unlisten( self._handler ) end end, } listener._handler = listener._channel:listen( function( _, ... ) if listener._waiter then local co = listener._waiter listener._waiter = nil listener._channel:unready( listener._handler ) return coroutine.resume( co, ... ) end end ) listener._channel:unready( listener._handler ) return listener end do local gets, sets = {}, {} function util.register_unserializer( type, callback ) gets[type] = function( key ) return callback( GetString( key ) ) end end hook.add( "api.newmeta", "api.createunserializer", function( name, meta ) gets[name] = function( key ) return setmetatable( {}, meta ):__unserialize( GetString( key ) ) end sets[name] = function( key, value ) return SetString( key, meta.__serialize( value ) ) end end ) function util.shared_table( name, base ) return setmetatable( base or {}, { __index = function( self, k ) local key = tostring( k ) local vtype = GetString( string.format( "%s.%s.type", name, key ) ) if vtype == "" then return end return gets[vtype]( string.format( "%s.%s.val", name, key ) ) end, __newindex = function( self, k, v ) local vtype = type( v ) local handler = sets[vtype] if not handler then return end local key = tostring( k ) if vtype == "table" then local meta = getmetatable( v ) if meta and meta.__serialize and meta.__type then vtype = meta.__type v = meta.__serialize( v ) handler = sets.string end end SetString( string.format( "%s.%s.type", name, key ), vtype ) handler( string.format( "%s.%s.val", name, key ), v ) end, } ) end function util.structured_table( name, base ) local function generate( base ) local root = {} local keys = {} for k, v in pairs( base ) do local key = name .. "." .. tostring( k ) if type( v ) == "table" then root[k] = util.structured_table( key, v ) elseif type( v ) == "string" then keys[k] = { type = v, key = key } else root[k] = v end end return setmetatable( root, { __index = function( self, k ) local entry = keys[k] if entry and gets[entry.type] then return gets[entry.type]( entry.key ) end end, __newindex = function( self, k, v ) local entry = keys[k] if entry and sets[entry.type] then return sets[entry.type]( entry.key, v ) end end, } ) end if type( base ) == "table" then return generate( base ) end return generate end gets.number = GetFloat gets.integer = GetInt gets.boolean = GetBool gets.string = GetString gets.table = util.shared_table sets.number = SetFloat sets.integer = SetInt sets.boolean = SetBool sets.string = SetString sets.table = function( key, val ) local tab = util.shared_table( key ) for k, v in pairs( val ) do tab[k] = v end end end end)();
(function() util = util or {} function util.current_line( level ) level = (level or 0) + 3 local _, line = pcall( error, "-", level ) if line == "-" then _, line = pcall( error, "-", level + 1 ) if line == "-" then return end line = "[C]:?" else line = line:sub( 1, -4 ) end return line end function util.stacktrace( start ) start = (start or 0) + 3 local stack, last = {}, nil for i = start, 32 do local _, line = pcall( error, "-", i ) if line == "-" then if last == "-" then break end else if last == "-" then stack[#stack + 1] = "[C]:?" end stack[#stack + 1] = line:sub( 1, -4 ) end last = line end return stack end end)();
(function() local console_buffer = util.shared_buffer( "game.console", 128 ) local function maketext( ... ) local text = "" local len = select( "#", ... ) for i = 1, len do local s = tostring( select( i, ... ) ) if i < len then s = s .. string.rep( " ", 8 - #s % 8 ) end text = text .. s end return text end _OLDPRINT = _OLDPRINT or print function printcolor( r, g, b, ... ) local text = maketext( ... ) console_buffer:push( string.format( "%f;%f;%f;%s", r, g, b, text ) ) if PRINTTOSCREEN then DebugPrint( text ) end return _OLDPRINT( ... ) end function print( ... ) printcolor( 1, 1, 1, ... ) end function printinfo( ... ) printcolor( 0, .6, 1, ... ) end function warning( msg ) printcolor( 1, .7, 0, "[WARNING] " .. tostring( msg ) .. "\n " .. table.concat( util.stacktrace( 1 ), "\n " ) ) end printwarning = warning function printerror( ... ) printcolor( 1, .2, 0, ... ) end function clearconsole() console_buffer:clear() end function softassert( b, ... ) if not b then printerror( ... ) end return b, ... end function assert( b, msg, ... ) if not b then local m = msg or "Assertion failed" warning( m ) return error( m, ... ) end return b, msg, ... end end)();
(function() GLOBAL_CHANNEL = util.shared_channel( "game.umf_global_channel", 128 ) end)();
(function() local registered_meta = {} local reverse_meta = {} function global_metatable( name, parent ) local meta = registered_meta[name] if meta then if not parent then return meta end else meta = {} meta.__index = meta meta.__type = name registered_meta[name] = meta reverse_meta[meta] = name hook.saferun( "api.newmeta", name, meta ) end if parent then setmetatable( meta, global_metatable( parent ) ) end return meta end function find_global_metatable( name ) if not name then return end if type( name ) == "table" then return reverse_meta[name] end return registered_meta[name] end local function findmeta( src, found ) if found[src] then return end found[src] = true local res for k, v in pairs( src ) do if type( v ) == "table" then local dt local m = getmetatable( v ) if m then local name = reverse_meta[m] if name then dt = {} dt[1] = name end end local sub = findmeta( v, found ) if sub then dt = dt or {} dt[2] = sub end if dt then res = res or {} res[k] = dt end end end return res end local previous = -2 hook.add( "base.tick", "api.metatables.save", function( ... ) if GetTime() - previous > 2 then previous = GetTime() _G.GLOBAL_META_SAVE = findmeta( _G, {} ) end end ) local function restoremeta( dst, src ) for k, v in pairs( src ) do local dv = dst[k] if type( dv ) == "table" then if v[1] then setmetatable( dv, global_metatable( v[1] ) ) end if v[2] then restoremeta( dv, v[2] ) end end end end hook.add( "base.command.quickload", "api.metatables.restore", function( ... ) if GLOBAL_META_SAVE then restoremeta( _G, GLOBAL_META_SAVE ) end end ) end)();
(function() local vector_meta = global_metatable( "vector" ) local quat_meta = global_metatable( "quaternion" ) function IsQuaternion( q ) return type( q ) == "table" and type( q[1] ) == "number" and type( q[2] ) == "number" and type( q[3] ) == "number" and type( q[4] ) == "number" end function MakeQuaternion( q ) return setmetatable( q, quat_meta ) end function Quaternion( i, j, k, r ) if IsQuaternion( i ) then i, j, k, r = i[1], i[2], i[3], i[4] end return MakeQuaternion { i or 0, j or 0, k or 0, r or 1 } end function quat_meta:__unserialize( data ) local i, j, k, r = data:match( "([-0-9.]*);([-0-9.]*);([-0-9.]*);([-0-9.]*)" ) self[1] = tonumber( i ) self[2] = tonumber( j ) self[3] = tonumber( k ) self[4] = tonumber( r ) return self end function quat_meta:__serialize() return table.concat( self, ";" ) end QUAT_ZERO = Quaternion() function quat_meta:Clone() return MakeQuaternion { self[1], self[2], self[3], self[4] } end local QuatStr = QuatStr function quat_meta:__tostring() return QuatStr( self ) end function quat_meta:__unm() return MakeQuaternion { -self[1], -self[2], -self[3], -self[4] } end function quat_meta:Conjugate() return MakeQuaternion { -self[1], -self[2], -self[3], self[4] } end function quat_meta:Add( o ) if IsQuaternion( o ) then self[1] = self[1] + o[1] self[2] = self[2] + o[2] self[3] = self[3] + o[3] self[4] = self[4] + o[4] else self[1] = self[1] + o self[2] = self[2] + o self[3] = self[3] + o self[4] = self[4] + o end return self end function quat_meta.__add( a, b ) if not IsQuaternion( a ) then a, b = b, a end return quat_meta.Add( quat_meta.Clone( a ), b ) end function quat_meta:Sub( o ) if IsQuaternion( o ) then self[1] = self[1] - o[1] self[2] = self[2] - o[2] self[3] = self[3] - o[3] self[4] = self[4] - o[4] else self[1] = self[1] - o self[2] = self[2] - o self[3] = self[3] - o self[4] = self[4] - o end return self end function quat_meta.__sub( a, b ) if not IsQuaternion( a ) then a, b = b, a end return quat_meta.Sub( quat_meta.Clone( a ), b ) end function quat_meta:Mul( o ) local i1, j1, k1, r1 = self[1], self[2], self[3], self[4] local i2, j2, k2, r2 = o[1], o[2], o[3], o[4] self[1] = j1 * k2 - k1 * j2 + r1 * i2 + i1 * r2 self[2] = k1 * i2 - i1 * k2 + r1 * j2 + j1 * r2 self[3] = i1 * j2 - j1 * i2 + r1 * k2 + k1 * r2 self[4] = r1 * r2 - i1 * i2 - j1 * j2 - k1 * k2 return self end function quat_meta.__mul( a, b ) if not IsQuaternion( a ) then a, b = b, a end if type( b ) == "number" then return Quaternion( a[1] * b, a[2] * b, a[3] * b, a[4] * b ) end if IsVector( b ) then return vector_meta.__mul( b, a ) end if IsTransformation( b ) then return Transformation( vector_meta.Mul( vector_meta.Clone( b.pos ), a ), QuatRotateQuat( b.rot, a ) ) end return MakeQuaternion( QuatRotateQuat( a, b ) ) end function quat_meta:Div( o ) self[1] = self[1] / o self[2] = self[2] / o self[3] = self[3] / o self[4] = self[4] / o return self end function quat_meta.__div( a, b ) return quat_meta.Div( quat_meta.Clone( a ), b ) end function quat_meta.__eq( a, b ) return a[1] == b[1] and a[2] == b[2] and a[3] == b[3] and a[4] == b[4] end function quat_meta:LengthSquare() return self[1] ^ 2 + self[2] ^ 2 + self[3] ^ 2 + self[4] ^ 2 end function quat_meta:Length() return math.sqrt( quat_meta.LengthSquare( self ) ) end local QuatSlerp = QuatSlerp function quat_meta:Slerp( o, n ) return MakeQuaternion( QuatSlerp( self, o, n ) ) end function quat_meta:Left() local x, y, z, s = self[1], self[2], self[3], self[4] return Vector( 1 - (y ^ 2 + z ^ 2) * 2, (z * s + x * y) * 2, (x * z - y * s) * 2 ) end function quat_meta:Up() local x, y, z, s = self[1], self[2], self[3], self[4] return Vector( (y * x - z * s) * 2, 1 - (z ^ 2 + x ^ 2) * 2, (x * s + y * z) * 2 ) end function quat_meta:Forward() local x, y, z, s = self[1], self[2], self[3], self[4] return Vector( (y * s + z * x) * 2, (z * y - x * s) * 2, 1 - (x ^ 2 + y ^ 2) * 2 ) end function quat_meta:ToEuler() if GetQuatEuler then return GetQuatEuler( self ) end local x, y, z, w = self[1], self[2], self[3], self[4] local bank, heading, attitude local s = 2 * x * y + 2 * z * w if s >= 1 then heading = 2 * math.atan2( x, w ) bank = 0 attitude = math.pi / 2 elseif s <= -1 then heading = -2 * math.atan2( x, w ) bank = 0 attitude = math.pi / -2 else bank = math.atan2( 2 * x * w - 2 * y * z, 1 - 2 * x ^ 2 - 2 * z ^ 2 ) heading = math.atan2( 2 * y * w - 2 * x * z, 1 - 2 * y ^ 2 - 2 * z ^ 2 ) attitude = math.asin( s ) end return math.deg( bank ), math.deg( heading ), math.deg( attitude ) end function quat_meta:Approach( dest, rate ) local dot = self[1] * dest[1] + self[2] * dest[2] + self[3] * dest[3] + self[4] * dest[4] if dot >= 1 then return self end local corr_rate = rate / math.acos( 2 * dot ^ 2 - 1 ) if corr_rate >= 1 then return MakeQuaternion( dest ) end return MakeQuaternion( QuatSlerp( self, dest, corr_rate ) ) end end)();
(function() local vector_meta = global_metatable( "vector" ) local quat_meta = global_metatable( "quaternion" ) local transform_meta = global_metatable( "transformation" ) function IsTransformation( t ) return type( t ) == "table" and t.pos and t.rot end function MakeTransformation( t ) setmetatable( t.pos, vector_meta ) setmetatable( t.rot, quat_meta ) return setmetatable( t, transform_meta ) end function Transformation( pos, rot ) return MakeTransformation { pos = pos, rot = rot } end function transform_meta:__unserialize( data ) local x, y, z, i, j, k, r = data:match( "([-0-9.]*);([-0-9.]*);([-0-9.]*);([-0-9.]*);([-0-9.]*);([-0-9.]*);([-0-9.]*)" ) self.pos = Vector( tonumber( x ), tonumber( y ), tonumber( z ) ) self.rot = Quaternion( tonumber( i ), tonumber( j ), tonumber( k ), tonumber( r ) ) return self end function transform_meta:__serialize() return table.concat( self.pos, ";" ) .. ";" .. table.concat( self.rot, ";" ) end function transform_meta:Clone() return MakeTransformation { pos = vector_meta.Clone( self.pos ), rot = quat_meta.Clone( self.rot ) } end local TransformStr = TransformStr function transform_meta:__tostring() return TransformStr( self ) end local TransformToLocalPoint = TransformToLocalPoint local TransformToLocalTransform = TransformToLocalTransform local TransformToLocalVec = TransformToLocalVec local TransformToParentPoint = TransformToParentPoint local TransformToParentTransform = TransformToParentTransform local TransformToParentVec = TransformToParentVec function transform_meta.__add( a, b ) if not IsTransformation( b ) then if IsVector( b ) then b = Transformation( b, QUAT_ZERO ) elseif IsQuaternion( b ) then b = Transformation( VEC_ZERO, b ) end end return MakeTransformation( TransformToParentTransform( a, b ) ) end function transform_meta:ToLocal( o ) if IsTransformation( o ) then return MakeTransformation( TransformToLocalTransform( self, o ) ) elseif IsQuaternion( o ) then return MakeQuaternion( TransformToLocalTransform( self, Transform( {}, o ) ).rot ) else return MakeVector( TransformToLocalPoint( self, o ) ) end end function transform_meta:ToLocalDir( o ) return MakeVector( TransformToLocalVec( self, o ) ) end function transform_meta:ToGlobal( o ) if IsTransformation( o ) then return MakeTransformation( TransformToParentTransform( self, o ) ) elseif IsQuaternion( o ) then return MakeQuaternion( TransformToParentTransform( self, Transform( {}, o ) ).rot ) else return MakeVector( TransformToParentPoint( self, o ) ) end end function transform_meta:ToGlobalDir( o ) return MakeVector( TransformToParentVec( self, o ) ) end function transform_meta:Raycast( dist, mul, radius, rejectTransparent ) local dir = TransformToParentVec( self, VEC_FORWARD ) if mul then vector_meta.Mul( dir, mul ) end local hit, dist2, normal, shape = QueryRaycast( self.pos, dir, dist, radius, rejectTransparent ) return { hit = hit, dist = dist2, normal = hit and MakeVector( normal ), shape = hit and Shape and Shape( shape ) or shape, hitpos = vector_meta.__add( self.pos, vector_meta.Mul( dir, hit and dist2 or dist ) ), } end end)();
(function() local vector_meta = global_metatable( "vector" ) local quat_meta = global_metatable( "quaternion" ) function IsVector( v ) return type( v ) == "table" and type( v[1] ) == "number" and type( v[2] ) == "number" and type( v[3] ) == "number" and not v[4] end function MakeVector( v ) return setmetatable( v, vector_meta ) end function Vector( x, y, z ) if IsVector( x ) then x, y, z = x[1], x[2], x[3] end return MakeVector { x or 0, y or 0, z or 0 } end function vector_meta:__unserialize( data ) local x, y, z = data:match( "([-0-9.]*);([-0-9.]*);([-0-9.]*)" ) self[1] = tonumber( x ) self[2] = tonumber( y ) self[3] = tonumber( z ) return self end function vector_meta:__serialize() return table.concat( self, ";" ) end VEC_ZERO = Vector() VEC_FORWARD = Vector( 0, 0, 1 ) VEC_UP = Vector( 0, 1, 0 ) VEC_LEFT = Vector( 1, 0, 0 ) function vector_meta:Clone() return MakeVector { self[1], self[2], self[3] } end local VecStr = VecStr function vector_meta:__tostring() return VecStr( self ) end function vector_meta:__unm() return MakeVector { -self[1], -self[2], -self[3] } end function vector_meta:Add( o ) if IsVector( o ) then self[1] = self[1] + o[1] self[2] = self[2] + o[2] self[3] = self[3] + o[3] else self[1] = self[1] + o self[2] = self[2] + o self[3] = self[3] + o end return self end function vector_meta.__add( a, b ) if not IsVector( a ) then a, b = b, a end if IsTransformation( b ) then return Transformation( vector_meta.Add( vector_meta.Clone( a ), b.pos ), quat_meta.Clone( b.rot ) ) end return vector_meta.Add( vector_meta.Clone( a ), b ) end function vector_meta:Sub( o ) if IsVector( o ) then self[1] = self[1] - o[1] self[2] = self[2] - o[2] self[3] = self[3] - o[3] else self[1] = self[1] - o self[2] = self[2] - o self[3] = self[3] - o end return self end function vector_meta.__sub( a, b ) if not IsVector( a ) then a, b = b, a end return vector_meta.Sub( vector_meta.Clone( a ), b ) end function vector_meta:Mul( o ) if IsVector( o ) then self[1] = self[1] * o[1] self[2] = self[2] * o[2] self[3] = self[3] * o[3] elseif IsQuaternion( o ) then local x1, y1, z1 = self[1], self[2], self[3] local x2, y2, z2, s = o[1], o[2], o[3], o[4] local x3 = y2 * z1 - z2 * y1 local y3 = z2 * x1 - x2 * z1 local z3 = x2 * y1 - y2 * x1 self[1] = x1 + (x3 * s + y2 * z3 - z2 * y3) * 2 self[2] = y1 + (y3 * s + z2 * x3 - x2 * z3) * 2 self[3] = z1 + (z3 * s + x2 * y3 - y2 * x3) * 2 else self[1] = self[1] * o self[2] = self[2] * o self[3] = self[3] * o end return self end function vector_meta.__mul( a, b ) if not IsVector( a ) then a, b = b, a end return vector_meta.Mul( vector_meta.Clone( a ), b ) end function vector_meta:Div( o ) self[1] = self[1] / o self[2] = self[2] / o self[3] = self[3] / o return self end function vector_meta.__div( a, b ) return vector_meta.Div( vector_meta.Clone( a ), b ) end function vector_meta:Mod( o ) self[1] = self[1] % o self[2] = self[2] % o self[3] = self[3] % o return self end function vector_meta.__mod( a, b ) return vector_meta.Mod( vector_meta.Clone( a ), b ) end function vector_meta:Pow( o ) self[1] = self[1] ^ o self[2] = self[2] ^ o self[3] = self[3] ^ o return self end function vector_meta.__pow( a, b ) return vector_meta.Pow( vector_meta.Clone( a ), b ) end function vector_meta.__eq( a, b ) return a[1] == b[1] and a[2] == b[2] and a[3] == b[3] end function vector_meta.__lt( a, b ) return a[1] < b[1] or (a[1] == b[1] and (a[2] < b[2] or (a[2] == b[2] and (a[3] < b[3])))) end function vector_meta.__le( a, b ) return a[1] < b[1] or (a[1] == b[1] and (a[2] < b[2] or (a[2] == b[2] and (a[3] <= b[3])))) end local VecDot = VecDot function vector_meta:Dot( b ) return VecDot( self, b ) end local VecCross = VecCross function vector_meta:Cross( b ) return MakeVector( VecCross( self, b ) ) end local VecLength = VecLength function vector_meta:Length() return VecLength( self ) end function vector_meta:Volume() return math.abs( self[1] * self[2] * self[3] ) end local VecLerp = VecLerp function vector_meta:Lerp( o, n ) return MakeVector( VecLerp( self, o, n ) ) end local VecNormalize = VecNormalize function vector_meta:Normalized() return MakeVector( VecNormalize( self ) ) end function vector_meta:Normalize() return vector_meta.Div( self, vector_meta.Length( self ) ) end function vector_meta:DistSquare( o ) return (self[1] - o[1]) ^ 2 + (self[2] - o[2]) ^ 2 + (self[3] - o[3]) ^ 2 end function vector_meta:Distance( o ) return math.sqrt( vector_meta.DistSquare( self, o ) ) end function vector_meta:LookAt( o ) return MakeQuaternion( QuatLookAt( self, o ) ) end function vector_meta:Approach( dest, rate ) local dist = vector_meta.Distance( self, dest ) if dist < rate then return dest end return vector_meta.Lerp( self, dest, rate / dist ) end end)();
(function() local entity_meta = global_metatable( "entity" ) function GetEntityHandle( e ) if IsEntity( e ) then return e.handle end return e end function IsValid( e ) if type( e ) == "table" and e.IsValid then return e:IsValid() end return false end function IsEntity( e ) return type( e ) == "table" and type( e.handle ) == "number" end function Entity( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "unknown" }, entity_meta ) end end function entity_meta:__unserialize( data ) self.handle = tonumber( data ) return self end function entity_meta:__serialize() return tostring( self.handle ) end function entity_meta:__tostring() return string.format( "Entity[%d]", self.handle ) end function entity_meta:GetType() return self.type or "unknown" end local IsHandleValid = IsHandleValid function entity_meta:IsValid() return IsHandleValid( self.handle ) end local SetTag = SetTag function entity_meta:SetTag( tag, value ) assert( self:IsValid() ) return SetTag( self.handle, tag, value ) end local SetDescription = SetDescription function entity_meta:SetDescription( description ) assert( self:IsValid() ) return SetDescription( self.handle, description ) end local RemoveTag = RemoveTag function entity_meta:RemoveTag( tag ) assert( self:IsValid() ) return RemoveTag( self.handle, tag ) end local HasTag = HasTag function entity_meta:HasTag( tag ) assert( self:IsValid() ) return HasTag( self.handle, tag ) end local GetTagValue = GetTagValue function entity_meta:GetTagValue( tag ) assert( self:IsValid() ) return GetTagValue( self.handle, tag ) end local GetDescription = GetDescription function entity_meta:GetDescription() assert( self:IsValid() ) return GetDescription( self.handle ) end local Delete = Delete function entity_meta:Delete() return Delete( self.handle ) end end)();
(function() local body_meta = global_metatable( "body", "entity" ) function IsBody( e ) return IsEntity( e ) and e.type == "body" end function Body( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "body" }, body_meta ) end end function FindBodyByTag( tag, global ) return Body( FindBody( tag, global ) ) end function FindBodiesByTag( tag, global ) local t = FindBodies( tag, global ) for i = 1, #t do t[i] = Body( t[i] ) end return t end function body_meta:__tostring() return string.format( "Body[%d]", self.handle ) end function body_meta:ApplyImpulse( pos, vel ) assert( self:IsValid() ) return ApplyBodyImpulse( self.handle, pos, vel ) end function body_meta:ApplyLocalImpulse( pos, vel ) local transform = self:GetTransform() return self:ApplyImpulse( transform:ToGlobal( pos ), transform:ToGlobalDir( vel ) ) end function body_meta:DrawOutline( r, ... ) assert( self:IsValid() ) return DrawBodyOutline( self.handle, r, ... ) end function body_meta:DrawHighlight( amount ) assert( self:IsValid() ) return DrawBodyHighlight( self.handle, amount ) end function body_meta:SetTransform( tr ) assert( self:IsValid() ) return SetBodyTransform( self.handle, tr ) end function body_meta:SetDynamic( bool ) assert( self:IsValid() ) return SetBodyDynamic( self.handle, bool ) end function body_meta:SetVelocity( vel ) assert( self:IsValid() ) return SetBodyVelocity( self.handle, vel ) end function body_meta:SetAngularVelocity( avel ) assert( self:IsValid() ) return SetBodyAngularVelocity( self.handle, avel ) end function body_meta:GetTransform() assert( self:IsValid() ) return MakeTransformation( GetBodyTransform( self.handle ) ) end function body_meta:GetMass() assert( self:IsValid() ) return GetBodyMass( self.handle ) end function body_meta:GetVelocity() assert( self:IsValid() ) return MakeVector( GetBodyVelocity( self.handle ) ) end function body_meta:GetVelocityAtPos( pos ) assert( self:IsValid() ) return MakeVector( GetBodyVelocityAtPos( self.handle, pos ) ) end function body_meta:GetAngularVelocity() assert( self:IsValid() ) return MakeVector( GetBodyAngularVelocity( self.handle ) ) end function body_meta:GetShapes() assert( self:IsValid() ) local shapes = GetBodyShapes( self.handle ) for i = 1, #shapes do shapes[i] = Shape( shapes[i] ) end return shapes end function body_meta:GetVehicle() assert( self:IsValid() ) return Vehicle( GetBodyVehicle( self.handle ) ) end function body_meta:GetWorldBounds() assert( self:IsValid() ) local min, max = GetBodyBounds( self.handle ) return MakeVector( min ), MakeVector( max ) end function body_meta:GetLocalCenterOfMass() assert( self:IsValid() ) return MakeVector( GetBodyCenterOfMass( self.handle ) ) end function body_meta:GetWorldCenterOfMass() return self:GetTransform():ToGlobal( self:GetLocalCenterOfMass() ) end function body_meta:IsActive() assert( self:IsValid() ) return IsBodyActive( self.handle ) end function body_meta:IsDynamic() assert( self:IsValid() ) return IsBodyDynamic( self.handle ) end function body_meta:IsVisible( maxdist ) assert( self:IsValid() ) return IsBodyVisible( self.handle, maxdist ) end function body_meta:IsBroken() return not self:IsValid() or IsBodyBroken( self.handle ) end function body_meta:IsJointedToStatic() assert( self:IsValid() ) return IsBodyJointedToStatic( self.handle ) end end)();
(function() local joint_meta = global_metatable( "joint", "entity" ) function IsJoint( e ) return IsEntity( e ) and e.type == "joint" end function Joint( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "joint" }, joint_meta ) end end function FindJointByTag( tag, global ) return Joint( FindJoint( tag, global ) ) end function FindJointsByTag( tag, global ) local t = FindJoints( tag, global ) for i = 1, #t do t[i] = Joint( t[i] ) end return t end function joint_meta:__tostring() return string.format( "Joint[%d]", self.handle ) end function joint_meta:SetMotor( velocity, strength ) assert( self:IsValid() ) return SetJointMotor( self.handle, velocity, strength ) end function joint_meta:SetMotorTarget( target, maxVel, strength ) assert( self:IsValid() ) return SetJointMotorTarget( self.handle, target, maxVel, strength ) end function joint_meta:GetJointType() assert( self:IsValid() ) return GetJointType( self.handle ) end function joint_meta:GetOtherShape( shape ) assert( self:IsValid() ) return Shape( GetJointOtherShape( self.handle, GetEntityHandle( shape ) ) ) end function joint_meta:GetLimits() assert( self:IsValid() ) return GetJointLimits( self.handle ) end function joint_meta:GetMovement() assert( self:IsValid() ) return GetJointMovement( self.handle ) end function joint_meta:IsBroken() return not self:IsValid() or IsJointBroken( self.handle ) end end)();
(function() local light_meta = global_metatable( "light", "entity" ) function IsLight( e ) return IsEntity( e ) and e.type == "light" end function Light( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "light" }, light_meta ) end end function FindLightByTag( tag, global ) return Light( FindLight( tag, global ) ) end function FindLightsByTag( tag, global ) local t = FindLights( tag, global ) for i = 1, #t do t[i] = Light( t[i] ) end return t end function light_meta:__tostring() return string.format( "Light[%d]", self.handle ) end function light_meta:SetEnabled( enabled ) assert( self:IsValid() ) return SetLightEnabled( self.handle, enabled ) end function light_meta:SetColor( r, g, b ) assert( self:IsValid() ) return SetLightColor( self.handle, r, g, b ) end function light_meta:SetIntensity( intensity ) assert( self:IsValid() ) return SetLightIntensity( self.handle, intensity ) end function light_meta:GetTransform() assert( self:IsValid() ) return MakeTransformation( GetLightTransform( self.handle ) ) end function light_meta:GetShape() assert( self:IsValid() ) return Shape( GetLightShape( self.handle ) ) end function light_meta:IsActive() assert( self:IsValid() ) return IsLightActive( self.handle ) end function light_meta:IsPointAffectedByLight( point ) assert( self:IsValid() ) return IsPointAffectedByLight( self.handle, point ) end end)();
(function() local location_meta = global_metatable( "location", "entity" ) function IsLocation( e ) return IsEntity( e ) and e.type == "location" end function Location( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "location" }, location_meta ) end end function FindLocationByTag( tag, global ) return Location( FindLocation( tag, global ) ) end function FindLocationsByTag( tag, global ) local t = FindLocations( tag, global ) for i = 1, #t do t[i] = Location( t[i] ) end return t end function location_meta:__tostring() return string.format( "Location[%d]", self.handle ) end function location_meta:GetTransform() assert( self:IsValid() ) return MakeTransformation( GetLocationTransform( self.handle ) ) end end)();
(function() local player_meta = global_metatable( "player" ) PLAYER = setmetatable( {}, player_meta ) function player_meta:__unserialize( data ) return self end function player_meta:__serialize() return "" end function player_meta:__tostring() return string.format( "Player" ) end function player_meta:GetType() return "player" end function player_meta:Respawn() return RespawnPlayer() end function player_meta:SetTransform( transform ) return SetPlayerTransform( transform ) end function player_meta:SetCamera( transform ) return SetCameraTransform( transform ) end function player_meta:SetSpawnTransform( transform ) return SetPlayerSpawnTransform( transform ) end function player_meta:SetVehicle( handle ) return SetPlayerVehicle( GetEntityHandle( handle ) ) end function player_meta:SetVelocity( velocity ) return SetPlayerVelocity( velocity ) end function player_meta:SetScreen( handle ) return SetPlayerScreen( GetEntityHandle( handle ) ) end function player_meta:SetHealth( health ) return SetPlayerHealth( health ) end function player_meta:GetTransform() return MakeTransformation( GetPlayerTransform() ) end function player_meta:GetPlayerCamera() return MakeTransformation( GetPlayerCameraTransform() ) end function player_meta:GetCamera() return MakeTransformation( GetCameraTransform() ) end function player_meta:GetVelocity() return MakeVector( GetPlayerVelocity() ) end function player_meta:GetVehicle() return Vehicle( GetPlayerVehicle() ) end function player_meta:GetGrabShape() return Shape( GetPlayerGrabShape() ) end function player_meta:GetGrabBody() return Body( GetPlayerGrabBody() ) end function player_meta:GetPickShape() return Shape( GetPlayerPickShape() ) end function player_meta:GetPickBody() return Body( GetPlayerPickBody() ) end function player_meta:GetInteractShape() return Shape( GetPlayerInteractShape() ) end function player_meta:GetInteractBody() return Body( GetPlayerInteractBody() ) end function player_meta:GetScreen() return Screen( GetPlayerScreen() ) end function player_meta:GetHealth() return GetPlayerHealth() end end)();
(function() local screen_meta = global_metatable( "screen", "entity" ) function IsScreen( e ) return IsEntity( e ) and e.type == "screen" end function Screen( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "screen" }, screen_meta ) end end function FindScreenByTag( tag, global ) return Screen( FindScreen( tag, global ) ) end function FindScreensByTag( tag, global ) local t = FindScreens( tag, global ) for i = 1, #t do t[i] = Screen( t[i] ) end return t end function screen_meta:__tostring() return string.format( "Screen[%d]", self.handle ) end function screen_meta:SetEnabled( enabled ) assert( self:IsValid() ) return SetScreenEnabled( self.handle, enabled ) end function screen_meta:GetShape() assert( self:IsValid() ) return Shape( GetScreenShape( self.handle ) ) end function screen_meta:IsEnabled() assert( self:IsValid() ) return IsScreenEnabled( self.handle ) end end)();
(function() local shape_meta = global_metatable( "shape", "entity" ) function IsShape( e ) return IsEntity( e ) and e.type == "shape" end function Shape( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "shape" }, shape_meta ) end end function FindShapeByTag( tag, global ) return Shape( FindShape( tag, global ) ) end function FindShapesByTag( tag, global ) local t = FindShapes( tag, global ) for i = 1, #t do t[i] = Shape( t[i] ) end return t end function shape_meta:__tostring() return string.format( "Shape[%d]", self.handle ) end function shape_meta:DrawOutline( r, ... ) assert( self:IsValid() ) return DrawShapeOutline( self.handle, r, ... ) end function shape_meta:DrawHighlight( amount ) assert( self:IsValid() ) return DrawShapeHighlight( self.handle, amount ) end function shape_meta:SetLocalTransform( transform ) assert( self:IsValid() ) return SetShapeLocalTransform( self.handle, transform ) end function shape_meta:SetEmissiveScale( scale ) assert( self:IsValid() ) return SetShapeEmissiveScale( self.handle, scale ) end function shape_meta:GetLocalTransform() assert( self:IsValid() ) return MakeTransformation( GetShapeLocalTransform( self.handle ) ) end function shape_meta:GetWorldTransform() assert( self:IsValid() ) return MakeTransformation( GetShapeWorldTransform( self.handle ) ) end function shape_meta:GetBody() assert( self:IsValid() ) return Body( GetShapeBody( self.handle ) ) end function shape_meta:GetJoints() assert( self:IsValid() ) local joints = GetShapeJoints( self.handle ) for i = 1, #joints do joints[i] = Joint( joints[i] ) end return joints end function shape_meta:GetLights() assert( self:IsValid() ) local lights = GetShapeLights( self.handle ) for i = 1, #lights do lights[i] = Light( lights[i] ) end return lights end function shape_meta:GetWorldBounds() assert( self:IsValid() ) local min, max = GetShapeBounds( self.handle ) return MakeVector( min ), MakeVector( max ) end function shape_meta:GetMaterialAtPos( pos ) assert( self:IsValid() ) return GetShapeMaterialAtPosition( self.handle, pos ) end function shape_meta:GetSize() assert( self:IsValid() ) return GetShapeSize( self.handle ) end function shape_meta:GetVoxelCount() assert( self:IsValid() ) return GetShapeVoxelCount( self.handle ) end function shape_meta:IsVisible( maxDist, rejectTransparent ) assert( self:IsValid() ) return IsShapeVisible( self.handle, maxDist, rejectTransparent ) end function shape_meta:IsBroken() return not self:IsValid() or IsShapeBroken( self.handle ) end end)();
(function() local trigger_meta = global_metatable( "trigger", "entity" ) function IsTrigger( e ) return IsEntity( e ) and e.type == "trigger" end function Trigger( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "trigger" }, trigger_meta ) end end function FindTriggerByTag( tag, global ) return Trigger( FindTrigger( tag, global ) ) end function FindTriggersByTag( tag, global ) local t = FindTriggers( tag, global ) for i = 1, #t do t[i] = Trigger( t[i] ) end return t end function trigger_meta:__tostring() return string.format( "Trigger[%d]", self.handle ) end function trigger_meta:SetTransform( transform ) assert( self:IsValid() ) return SetTriggerTransform( self.handle, transform ) end function trigger_meta:GetTransform() assert( self:IsValid() ) return MakeTransformation( GetTriggerTransform( self.handle ) ) end function trigger_meta:GetWorldBounds() assert( self:IsValid() ) local min, max = GetTriggerBounds( self.handle ) return MakeVector( min ), MakeVector( max ) end function trigger_meta:IsBodyInTrigger( handle ) assert( self:IsValid() ) return IsBodyInTrigger( self.handle, GetEntityHandle( handle ) ) end function trigger_meta:IsVehicleInTrigger( handle ) assert( self:IsValid() ) return IsVehicleInTrigger( self.handle, GetEntityHandle( handle ) ) end function trigger_meta:IsShapeInTrigger( handle ) assert( self:IsValid() ) return IsShapeInTrigger( self.handle, GetEntityHandle( handle ) ) end function trigger_meta:IsPointInTrigger( point ) assert( self:IsValid() ) return IsPointInTrigger( self.handle, point ) end function trigger_meta:IsEmpty( demolision ) assert( self:IsValid() ) local empty, highpoint = IsTriggerEmpty( self.handle, demolision ) return empty, highpoint and MakeVector( highpoint ) end end)();
(function() local vehicle_meta = global_metatable( "vehicle", "entity" ) function IsVehicle( e ) return IsEntity( e ) and e.type == "vehicle" end function Vehicle( handle ) if handle > 0 then return setmetatable( { handle = handle, type = "vehicle" }, vehicle_meta ) end end function FindVehicleByTag( tag, global ) return Vehicle( FindVehicle( tag, global ) ) end function FindVehiclesByTag( tag, global ) local t = FindVehicles( tag, global ) for i = 1, #t do t[i] = Vehicle( t[i] ) end return t end function vehicle_meta:__tostring() return string.format( "Vehicle[%d]", self.handle ) end function vehicle_meta:Drive( drive, steering, handbrake ) assert( self:IsValid() ) return DriveVehicle( self.handle, drive, steering, handbrake ) end function vehicle_meta:GetTransform() assert( self:IsValid() ) return MakeTransformation( GetVehicleTransform( self.handle ) ) end function vehicle_meta:GetBody() assert( self:IsValid() ) return Body( GetVehicleBody( self.handle ) ) end function vehicle_meta:GetHealth() assert( self:IsValid() ) return GetVehicleHealth( self.handle ) end function vehicle_meta:GetDriverPos() assert( self:IsValid() ) return MakeVector( GetVehicleDriverPos( self.handle ) ) end function vehicle_meta:GetGlobalDriverPos() return self:GetTransform():ToGlobal( self:GetDriverPos() ) end end)();
for i = 1, #__RUNLATER do local f = loadstring(__RUNLATER[i]) if f then pcall(f) end end
|
pit_trap = {
click = function(block, npc)
local owner = Player(npc.owner)
--local damage = 58883 -- did 58883 at 0 AC. Caster's health was 58k, mana was 32,231. Target's health was around 130k base.
-- changing this so it scales with vita and mana rather than static to match the method for spy assassinate
local damage = (owner.maxHealth *.5) + (owner.maxMagic *.5)
damage = calculateDamage(block, damage)
if (block.blType == BL_PC) then
-- Carnage etc.
if block.state == 1 then
return
end
if not block:canPK(block) then
return
end
block:sendMinitext("CHOMP!")
end
if (block.health < damage and block.health > 1) then
damage = block.health - 1
elseif (block.health == 1) then
damage = 0
end
block.attacker = npc.owner
block:removeHealth(damage)
block:sendAnimation(44)
-- big teeth
--local playa = block:getBlock(npc.owner)
removeTrapItem(npc)
npc:delete()
end,
endAction = function(npc, owner)
removeTrap(npc)
end
}
|
AgateUtil = AgateUtil or {}
AgateUtil.__loaded = AgateUtil.__loaded or {}
AgateUtil.__addonQueue = AgateUtil.__addonQueue or {}
AgateUtil.colors = {
white = Color(255, 255, 255),
blue = Color(0, 255, 255),
yellow = Color(201, 176, 15),
red = Color(230, 58, 64),
green = Color(46, 204, 113),
purple = Color(174, 0, 255)
}
local white = Color(255, 255, 255)
local blue = Color(0, 255, 255)
local yellow = Color(201, 176, 15)
local red = Color(230, 58, 64)
local green = Color(46, 204, 113)
local purple = Color(174, 0, 255)
local function __LoadAddon(root_dir)
local files, directories = file.Find(root_dir .. "/*", "LUA")
local allFiles = {}
local allFileNames = {}
for _, v in pairs(files) do
allFiles[v] = "f"
table.insert(allFileNames, v)
end
for _, v in pairs(directories) do
allFiles[v] = "d"
table.insert(allFileNames, v)
end
for _, v in SortedPairs(allFileNames, false) do
local fileType = allFiles[v]
if (fileType == "f") then
if not string.EndsWith(v, ".lua") then return end
v = root_dir .. "/" .. v
if v:find("sv_") and SERVER then
include(v)
MsgC(red, "[Agate Addon Util] ", blue, "(SV) ", white, "Loaded ", green, v, "\n")
elseif v:find("sh_") then
if SERVER then
AddCSLuaFile(v)
end
include(v)
MsgC(red, "[Agate Addon Util] ", purple, "(SH) ", white, "Loaded ", green, v, "\n")
elseif v:find("cl_") then
if SERVER then
AddCSLuaFile(v)
else
include(v)
end
MsgC(red, "[Agate Addon Util] ", yellow, "(CL) ", white, "Loaded ", green, v, "\n")
end
elseif (fileType == "d") then
__LoadAddon(root_dir .. "/" .. v)
end
end
end
function AgateUtil:Log(addon_name, ...)
MsgC(unpack({red, "[" .. addon_name .. "] ", yellow, ...}))
end
function AgateUtil:LoadAddon(addon_name, prioritized)
if table.HasValue(AgateUtil.__loaded, addon_name) then return end
if not prioritized and ix == nil and not table.HasValue(AgateUtil.__addonQueue, addon_name) then
table.insert(AgateUtil.__addonQueue, addon_name)
else
__LoadAddon(addon_name)
table.insert(AgateUtil.__loaded, addon_name)
MsgC(red, "[Agate Addon Util] ", yellow, purple, addon_name, yellow, " has been successfully activated!\n\n")
end
end
function AgateUtil:TableMap(tbl, cb)
local el = {}
for key, value in pairs(tbl) do
el[key] = cb(value, key, tbl)
end
return el
end
hook.Add("InitializedSchema", "addon_loader", function()
for _, v in ipairs(AgateUtil.__addonQueue) do
__LoadAddon(v)
table.insert(AgateUtil.__loaded, v)
MsgC(red, "[Agate Addon Util] ", yellow, addon_name .. " has been successfully activated!\n\n")
end
end)
MsgC(red, "[Agate Addon Util] ", yellow, "Activated!\n\n")
timer.Simple(0, function()
hook.Run("AgateUtilReady")
end)
|
AutomaticRoleCheck.Panel.Settings = CreateFrame("Frame", nil, AutomaticRoleCheck.Panel);
AutomaticRoleCheck.Panel.Settings.name = "Settings";
AutomaticRoleCheck.Panel.Settings.parent = AutomaticRoleCheck.Panel.name;
AutomaticRoleCheck.Panel.Settings.Inner = AutomaticRoleCheck.Panel.Settings:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
AutomaticRoleCheck.Panel.Settings.Inner:SetPoint("TOPLEFT", 10, -15)
AutomaticRoleCheck.Panel.Settings.Inner:SetJustifyH("LEFT")
AutomaticRoleCheck.Panel.Settings.Inner:SetJustifyV("TOP")
AutomaticRoleCheck.Panel.Settings.Inner:SetText("AutomaticRoleCheck - Settings")
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton = CreateFrame("CheckButton", nil, AutomaticRoleCheck.Panel.Settings, "ChatConfigCheckButtonTemplate")
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton:SetPoint("TOPLEFT", 15, -45)
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton.Text:SetFontObject("GameFontHighlightSmall")
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton.Text:SetPoint("LEFT", AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton, "RIGHT", 0, 1)
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton.Text:SetText("Disable Once")
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton.tooltip = "If the addon is disabled once for the upcoming role check"
AutomaticRoleCheck.Panel.Inner.EnabledButton:HookScript("OnClick", function()
if AutomaticRoleCheck.Panel.Inner.EnabledButton:GetChecked() then
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton:Enable()
else
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton:Disable()
end
end)
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton:HookScript("OnClick", function()
AutomaticRoleCheck.Options.DisableOnce = AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton:GetChecked()
end)
AutomaticRoleCheck.Panel.Settings:HookScript("OnShow", function()
AutomaticRoleCheck.Panel.Settings.Inner.DisableOnceButton:SetChecked(AutomaticRoleCheck.Options.DisableOnce)
end)
AutomaticRoleCheck.Panel.Settings:HookScript("OnEvent", AutomaticRoleCheck.EventHandler)
InterfaceOptions_AddCategory(AutomaticRoleCheck.Panel.Settings);
|
local maps = {
"duel.map",
}
--Categories was taken from map editor
local tDuelCars = {
--"2-Door"
401, 410, 436, 474, 491, 496, 517, 526, 527, 533, 545, 549, 439, 475, 542,
--"4-Door"
405, 409, 420, 421, 426, 438, 445, 466, 467, 492, 507, 516, 529, 540, 546, 547, 550, 551, 566, 580, 585,
--"Lowriders"
412, 419, 518, 534, 535, 536, 567, 575, 576,
--"Sports Cars"
402, 411, 415, 429, 451, 477, 480, 506, 541, 555, 558, 559, 560, 562, 565, 587, 602, 603
}
local function getAlivePlayers()
local players = {}
for _, player in ipairs(getElementsByType('player')) do
if getElementData(player, 'player state') == 'alive' then
table.insert(players, player)
end
end
return players
end
local maproot, initiator, duelType
function startDuel(p, c, t)
if maproot then return end
local players = getAlivePlayers()
if exports.race:getRaceMode() ~= "Destruction derby" then return outputChatBox("Not a DD map", p) end
if #players ~= 2 then return outputChatBox(#players .. " != 2 players for duel", p) end
if getElementData(p, 'player state') ~= 'alive' then return outputChatBox("Only the last two players can start duels", p, 255,0,0) end
if not initiator then
if t == 2 then
outputChatBox(getPlayerStrippedName(p) .. " has requested to duel on #ffffffequal #00ff00cars! /duel to accept", root, 0, 255, 0, true)
else
outputChatBox(getPlayerStrippedName(p) .. " has requested to duel on #ffffffrandom #00ff00cars! /duel to accept", root, 0, 255, 0, true)
end
initiator = p
duelType = t
return
elseif p == initiator then
return
end
-- Load in random map
local node = getResourceConfig ( maps[math.random(#maps)] )
if not node then return outputChatBox("Couldn't load xml", p) end
maproot = loadMapData ( node, resourceRoot )
xmlUnloadFile ( node )
if not maproot then return outputChatBox("Couldn't load map", p) end
exports.race:disableNTSModeForDD()
exports.gcshop:disableReRoll()
-- Reset water level
resetWaterLevel ()
-- Find spawns
local spawns = getElementsByType('spawnpoint', maproot)
local vehicle = tDuelCars[math.random(#tDuelCars)]
local function returnVehicleModel()
if duelType == 2 then
return vehicle
else
return tDuelCars[math.random(#tDuelCars)]
end
end
for k, p in ipairs(players) do
local veh = getPedOccupiedVehicle(p)
setElementModel(veh, returnVehicleModel())
local s = spawns[k]
local x, y, z = getElementPosition(s)
setElementPosition(veh, x, y, z+1)
setElementRotation(veh, 0, 0, getElementData(s, 'rotZ'))
setElementFrozen(veh, true)
setTimer(setElementFrozen, 100, 1, veh, false)
end
triggerClientEvent('its_time_to_duel.mp3', resourceRoot)
outputChatBox("[DUEL] " .. getPlayerName(p) .. " #00FF00accepted a duel!", root, 0,255,0, true)
end
addCommandHandler('duel', startDuel)
function stopDuel()
if maproot then
destroyElement(maproot)
end
maproot = nil
initiator = nil
duelType = nil
end
addEvent('stopDuel')
addEventHandler('onPostFinish', root, stopDuel)
function removeHEXFromString(str)
return str:gsub("#%x%x%x%x%x%x", "")
end
function getPlayerStrippedName(player)
if not isElement(player) then error('getPlayerStrippedName error', 2) end
return removeHEXFromString(getPlayerName(player))
end
|
fx_version 'cerulean'
game 'gta5'
version '1.0.0'
description 'Evidence system for hsn-inventory'
shared_script 'config.lua'
server_scripts {
'@mysql-async/lib/MySQL.lua',
'@es_extended/locale.lua',
'server.lua'
}
client_scripts {
'@es_extended/locale.lua',
'client.lua'
} |
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "0.16.1",
orientation = "orthogonal",
renderorder = "right-down",
width = 32,
height = 6,
tilewidth = 32,
tileheight = 32,
nextobjectid = 4,
properties = {},
tilesets = {
{
name = "office",
firstgid = 1,
tilewidth = 32,
tileheight = 32,
spacing = 0,
margin = 0,
image = "../img/background/office1.png",
imagewidth = 1120,
imageheight = 32,
tileoffset = {
x = 0,
y = 0
},
properties = {},
terrains = {},
tilecount = 35,
tiles = {}
},
{
name = "end-wall",
firstgid = 36,
tilewidth = 32,
tileheight = 32,
spacing = 0,
margin = 0,
image = "../img/background/turret-wall1.png",
imagewidth = 96,
imageheight = 32,
tileoffset = {
x = 0,
y = 0
},
properties = {},
terrains = {},
tilecount = 3,
tiles = {}
}
},
layers = {
{
type = "tilelayer",
name = "Bottom Background",
x = 0,
y = 0,
width = 32,
height = 6,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
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, 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, 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, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
},
{
type = "tilelayer",
name = "Top Background",
x = 0,
y = 0,
width = 32,
height = 6,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
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, 0, 0, 0, 0, 0, 0,
0, 21, 21, 21, 21, 21, 0, 0, 21, 21, 21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 22, 23, 22, 24, 22, 0, 0, 22, 24, 22, 22, 23, 23, 24, 24, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0
}
},
{
type = "tilelayer",
name = "Base Tile Layer",
x = 0,
y = 0,
width = 32,
height = 6,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 30, 31, 31, 31, 32, 26, 26, 30, 31, 31, 31, 31, 31, 31, 32, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 27, 28, 28, 28, 29, 26, 26, 27, 28, 28, 28, 28, 28, 28, 29, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
}
},
{
type = "tilelayer",
name = "Top Tile Layer",
x = 0,
y = 0,
width = 32,
height = 6,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
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, 0, 0, 0, 0, 37, 37,
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, 0, 0, 0, 0, 37, 37,
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, 0, 0, 0, 0, 37, 37,
0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, 0, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 37,
0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 38,
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, 0, 0, 0, 0, 0, 36
}
},
{
type = "tilelayer",
name = "Top Top Tile Layer",
x = 0,
y = 0,
width = 32,
height = 6,
visible = true,
opacity = 1,
offsetx = 0,
offsety = 0,
properties = {},
encoding = "lua",
data = {
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, 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, 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, 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, 12, 13, 14, 0, 12, 13, 14, 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, 9, 10, 11, 0, 9, 10, 11, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
},
{
type = "objectgroup",
name = "Object Layer",
visible = true,
opacity = 0,
offsetx = 0,
offsety = 0,
properties = {},
objects = {
{
id = 1,
name = "Ground",
type = "ground",
shape = "rectangle",
x = 0,
y = 170.667,
width = 1028,
height = 21.3333,
rotation = 0,
visible = true,
properties = {
["collidable"] = true
}
}
}
}
}
}
|
local AddonName, AddonTable = ...
AddonTable.jewelcrafting = {
-- Gems
76131,
76132,
76133,
76134,
76135,
76136,
76137,
76138,
76139,
76140,
76141,
76142,
}
|
local args = { ... }
local ui = args[1]
assert(ui, 'Imevul UI library not found')
---@class TabButton : Button Builds on top of the Button class
local TabButton = ui.lib.class(ui.modules.Button, function(this, data)
ui.modules.Button.init(this, data)
data = data or {}
this.originalBackground = data.background or nil
this.index = data.index or 1
this.type = 'TabButton'
end)
return TabButton
|
--[[
LuCI - Lua Configuration Interface
Copyright 2013 Patrick Grimm <patrick@lunatiki.de>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]--
module("luci.controller.antennas", package.seeall)
function index()
local page = entry({"admin", "system", "antennas"}, cbi("antennas"), "Antennas settings", 10)
page.dependent = true
assign({"mini", "system", "antennas"}, {"admin", "system", "antennas"}, "Antennnas settings", 1)
end
|
require '.'
require 'NeuLexTrans'
require 'NeuLexTransSoft'
require 'LexTrans_Dataset'
local function getOpts()
local cmd = torch.CmdLine()
cmd:option('--srcVocab', '', 'vocab path')
cmd:option('--dstVocab', '', 'vocab path')
cmd:option('--dataset', '', 'dataset path')
cmd:option('--seed', 123, '')
cmd:option('--initRange', 0.1, '')
cmd:option('--nhid', 256, '')
cmd:option('--nin', 128, '')
cmd:option('--nlayers', 2, '')
cmd:option('--dropout', 0, 'dropout')
cmd:option('--useGPU', false, '')
cmd:option('--seqLen', 85, '')
cmd:option('--optimMethod', 'Adam', '')
cmd:option('--lr', 0.001, '')
cmd:option('--batchSize', 32, '')
cmd:option('--maxEpoch', 30, '')
cmd:option('--wordEmbedding', '', '')
cmd:option('--embedOption', 'init', 'init fineTune')
cmd:option('--fineTuneFactor', 0, '')
cmd:option('--decStart', 1, 'start pos in decoder')
cmd:option('--patience', 1, 'patience')
cmd:option('--lrDiv', 0, 'learning rate decay when there is no significant improvement. 0 means turn off')
cmd:option('--save', 'model.t7', '')
cmd:option('--gradClip', 5, 'grad clip: > 0 for rescale norm; < 0 for clip')
cmd:option('--alignOption', 'hard-one-best', 'options: hard-one-best, hard-stochastic, soft')
local opts = cmd:parse(arg)
torch.manualSeed(opts.seed)
if opts.useGPU then
require 'cutorch'
require 'cunn'
cutorch.manualSeed(opts.seed)
end
opts.curLR = opts.lr
opts.sgdParam = {learningRate = opts.lr}
if opts.optimMethod == 'AdaDelta' then
opts.rho = 0.95
opts.eps = 1e-6
opts.sgdParam.rho = opts.rho
opts.sgdParam.eps = opts.eps
elseif opts.optimMethod == 'SGD' then
if opts.lrDiv <= 1 then
opts.lrDiv = 2
end
end
local validAlignOptions = {'hard-one-best', 'hard-stochastic', 'soft'}
if not table.contains(validAlignOptions, opts.alignOption) then
error('invalid align option! ' .. opts.alignOption)
end
print(opts)
return opts
end
local Trainer = torch.class('NeuLexTransTrainer')
function Trainer:train()
local dataIter
if self.opts.alignOption == 'hard-one-best' then
dataIter = LexTrans_Dataset.createBatch(self.dataset.train, self.opts.batchSize, self.opts.UNK, self.opts.DEF_POS, true)
elseif self.opts.alignOption == 'hard-stochastic' then
dataIter = LexTrans_Dataset.createBatchStochastic(self.dataset.train, self.opts.batchSize, self.opts.UNK, self.opts.DEF_POS, true)
end
if self.opts.alignOption == 'soft' then
dataIter = LexTrans_Dataset.createBatchSoft(self.dataset.train, self.opts.batchSize, self.opts.UNK, self.opts.DEF_POS, true)
end
local dataSize, curDataSize = #self.dataset.train, 0
local percent, inc = 0.001, 0.001
local timer = torch.Timer()
local sgdParam = self.opts.sgdParam
local cnt = 0
local totalLoss = 0
local totalCnt = 0
for x, x_mask, a, y in dataIter do
local loss = self.net:trainBatch(x, x_mask, a, y, sgdParam)
local y_mask = y[{{1 + self.opts.decStart, -1}, {}}]:ne(0)
local nll = loss * x:size(2) / (y_mask:sum())
totalLoss = totalLoss + loss * x:size(2)
totalCnt = totalCnt + y_mask:sum()
curDataSize = curDataSize + x:size(2)
local ratio = curDataSize/dataSize
if ratio >= percent then
local wps = totalCnt / timer:time().real
xprint( '\r%s %.3f %.4f (%s) / %.2f wps ... ', EPOCH_INFO, ratio, totalLoss/totalCnt, readableTime(timer:time().real), wps )
percent = math.floor(ratio / inc) * inc
percent = percent + inc
end
cnt = cnt + 1
if cnt % 5 == 0 then
collectgarbage()
end
end
return totalLoss / totalCnt
end
function Trainer:valid(validSet)
local dataIter = LexTrans_Dataset.createBatch(validSet, self.opts.batchSize, self.opts.UNK, self.opts.DEF_POS)
if self.opts.alignOption == 'soft' then
-- dataIter = LexTrans_Dataset.createBatchSoft(self.dataset.train, self.opts.batchSize, self.opts.UNK, self.opts.DEF_POS)
dataIter = LexTrans_Dataset.createBatchSoft(validSet, self.opts.batchSize, self.opts.UNK, self.opts.DEF_POS)
end
local totalCnt = 0
local totalLoss = 0
local cnt = 0
for x, x_mask, a, y in dataIter do
local loss = self.net:validBatch(x, x_mask, a, y)
totalLoss = totalLoss + loss * x:size(2)
totalCnt = totalCnt + y[{ {1 + self.opts.decStart, -1}, {} }]:ne(0):sum()
cnt = cnt + 1
if cnt % 5 == 0 then
collectgarbage()
end
end
local entropy = totalLoss / totalCnt
local ppl = torch.exp(entropy)
return {entropy = entropy, ppl = ppl}
end
function Trainer:main()
local opts = getOpts()
opts.src_vocab = torch.load(opts.srcVocab)
opts.dst_vocab = torch.load(opts.dstVocab)
if opts.alignOption == 'soft' then
self.net = NeuLexTransSoft(opts)
else
self.net = NeuLexTrans(opts)
end
-- self.net = NeuLexTrans(opts)
self.opts = opts
local dataset_path = opts.dataset .. '.thin.detailed.t7'
if paths.filep(dataset_path) then
self.dataset = torch.load(dataset_path)
else
self.dataset = LexTrans_Dataset.createDataset(opts.src_vocab, opts.dst_vocab, opts.dataset)
torch.save(dataset_path, self.dataset)
end
xprintln('#train = %d, #valid = %d, #test = %d', #self.dataset.train, #self.dataset.valid, #self.dataset.test)
opts.DEF_POS = 1 -- default pos for alignment
opts.UNK = opts.src_vocab.UNK
local bestValid = {ppl = 1e309, entropy = 1e309}
local lastValid = {ppl = 1e309, entropy = 1e309}
local bestModel = torch.FloatTensor(self.net.params:size())
local patience = opts.patience
local divLR = false
local timer = torch.Timer()
local epochNo = 0
for epoch = 1, opts.maxEpoch do
epochNo = epoch
timer:reset()
EPOCH_INFO = string.format('epoch %d', epoch)
local trainCost = self:train()
-- print('training ignored!!!')
-- local trainCost = 123
xprint('\repoch %d TRAIN nll %f ', epoch, trainCost)
local validRval = self:valid(self.dataset.valid)
xprint('VALID %f ', validRval.ppl)
xprintln('lr = %.4g (%s) p = %d', opts.curLR, readableTime(timer:time().real), patience)
if validRval.ppl < bestValid.ppl then
bestValid.ppl = validRval.ppl
bestValid.entropy = validRval.entropy
bestValid.epoch = epoch
self.net:getModel(bestModel)
-- for non SGD algorithm, we will reset the patience
-- if opts.optimMethod ~= 'SGD' then
if opts.lrDiv <= 1 then
patience = opts.patience
end
end
--[[
local oldBestValid_PPL = bestValid.ppl
if validRval.ppl < bestValid.ppl then
bestValid.ppl = validRval.ppl
bestValid.entropy = validRval.entropy
bestValid.epoch = epoch
self.net:getModel(bestModel)
-- for non SGD algorithm, we will reset the patience
-- if opts.optimMethod ~= 'SGD' then
if opts.lrDiv <= 1 then
patience = opts.patience
end
end
-- if validRval.ppl + 1 > oldBestValid_PPL then
if validRval.ppl > oldBestValid_PPL then
printf('valid ppl %f\n', validRval.ppl)
printf('best ppl %f\n', oldBestValid_PPL)
-- non SGD algorithm decrease patience
if opts.lrDiv <= 1 then
-- if opts.optimMethod ~= 'SGD' then
patience = patience - 1
if patience == 0 then
xprintln('No improvement on PPL for %d epoch(s). Training finished!', opts.patience)
break
end
else
-- SGD with learning rate decay
self.net:setModel(bestModel)
end
end -- if validRval.ppl + 1 > bestValid.ppl
if opts.savePerEpoch then
local tmpPath = opts.save:sub(1, -4) .. '.tmp.t7'
self.net:save(tmpPath, true)
end
if opts.saveBeforeLrDiv then
if opts.optimMethod == 'SGD' and opts.curLR == opts.lr then
local tmpPath = opts.save:sub(1, -4) .. '.blrd.t7'
self.net:save(tmpPath, true)
end
end
-- control the learning rate decay
-- if opts.optimMethod == 'SGD' then
if opts.lrDiv > 1 then
if epoch >= 10 and patience > 1 then
patience = 1
end
if validRval.entropy * opts.minImprovement > lastValid.entropy then
if not divLR then -- patience == 1
patience = patience - 1
if patience < 1 then divLR = true end
else
xprintln('no significant improvement! cur ppl %f, best ppl %f', validRval.ppl, bestValid.ppl)
break
end
end
if divLR then
opts.curLR = opts.curLR / opts.lrDiv
opts.sgdParam.learningRate = opts.curLR
end
if opts.curLR < opts.minLR then
xprintln('min lr is met! cur lr %e min lr %e', opts.curLR, opts.minLR)
break
end
lastValid.ppl = validRval.ppl
lastValid.entropy = validRval.entropy
end
--]]
end
self.net:setModel(bestModel)
opts.sgdParam = nil
self.net:save(opts.save, true)
xprintln('model saved at %s', opts.save)
local validRval = self:valid(self.dataset.valid)
xprint('VALID %f \n', validRval.ppl)
local testRval = self:valid(self.dataset.test)
xprint('TEST %f \n', testRval.ppl)
end
local function main()
local trainer = NeuLexTransTrainer()
trainer:main()
end
if not package.loaded['train_lextrans'] then
main()
end
|
local ADDON_NAME, namespace = ...
local L = namespace.L
local addonName = "WorldQuestsList"
local WorldQuestsListMixin = {}
function WorldQuestsListMixin:GetName()
return addonName
end
function WorldQuestsListMixin:Init()
self.WorldQuestList = _G["WorldQuestList"]
-- hooksecurefunc(self.WorldQuestList, 'UpdateList', function(...) self:RefreshButtons(...) end)
hooksecurefunc (WorldMap_WorldQuestPinMixin, "RefreshVisuals", function (...)
if not IsModifiedClick("COMPAREITEMS") and not ShoppingTooltip1:IsShown() then
self:RefreshButtons(...);
end
end)
C_Timer.NewTicker(.5,function()
-- Horrible refresh hack for now
if WorldMapFrame:IsVisible() then
self:Refresh()
end
end)
-- return { "QUEST_LOG_UPDATE" }
end
-- This works, but it doesn't account for sort so doing a ticker for now until I figure out a way to hook sort
-- function WorldQuestsListMixin:QUEST_LOG_UPDATE()
-- C_Timer.After(0, function()
-- self:Refresh()
-- end)
-- end
function WorldQuestsListMixin:SetTooltipItem(tooltip, item, locationInfo)
tooltip:SetHyperlink(item:GetItemLink())
end
function WorldQuestsListMixin:Refresh()
self:RefreshButtons()
end
function WorldQuestsListMixin:GetDisplayInfo(button, item, feature, locationInfo, options, mogStatus, bindingStatus)
return {
questIcon = {
shouldShow = true
},
oldExpansionIcon = {
shouldShow = false
},
sellableIcon = {
shouldShow = false
}
}
end
function WorldQuestsListMixin:RefreshButtons()
local charKey = (UnitName'player' or "").."-"..(GetRealmName() or ""):gsub(" ","")
if not self.WorldQuestList:IsVisible() and not _G.VWQL[charKey].HideMap then return end
local result = self.WorldQuestList.currentResult
if not result then return end
for i=1,#result do
local data = result[i]
local line = self.WorldQuestList.l[i]
local options = {
statusProminentSize = 10,
statusOffsetX = 0,
statusOffsetY = 8,
-- relativeFrame = line.reward.f.icon,
bindingScale = 0.5,
overrideBindingPosition = "LEFT"
-- bindingOffsetY = -3
}
if line.rewardLink then
local item = CaerdonItem:CreateFromItemLink(line.rewardLink)
CaerdonWardrobe:UpdateButton(line.reward.f, item, self, {
locationKey = format("wqlPin%d", line.questID),
questID = line.questID
}, options)
else
CaerdonWardrobe:ClearButton(line.reward.f)
end
end
end
local Version = nil
if select(4, GetAddOnInfo(addonName)) then
if IsAddOnLoaded(addonName) then
Version = GetAddOnMetadata(addonName, "Version")
CaerdonWardrobe:RegisterFeature(WorldQuestsListMixin)
end
end
|
monsters =
{
[1] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "绿头怪",
["level"] = 1,
["life"] = 50,
["attack"] = 20,
["defense"] = 1,
["gold"] = 1,
["experience"] = 1
},
[2] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "红头怪",
["level"] = 1,
["life"] = 70,
["attack"] = 15,
["defense"] = 2,
["gold"] = 2,
["experience"] = 2
},
[3] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "小蝙蝠",
["level"] = 1,
["life"] = 100,
["attack"] = 20,
["defense"] = 5,
["gold"] = 3,
["experience"] = 3
},
[4] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "骷髅人",
["level"] = 1,
["life"] = 110,
["attack"] = 25,
["defense"] = 5,
["gold"] = 5,
["experience"] = 4
},
[5] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "青头怪",
["level"] = 1,
["life"] = 200,
["attack"] = 35,
["defense"] = 10,
["gold"] = 5,
["experience"] = 5
},
[6] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "骷髅士兵",
["level"] = 1,
["life"] = 150,
["attack"] = 40,
["defense"] = 20,
["gold"] = 8,
["experience"] = 6
},
[7] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "初级法师",
["level"] = 1,
["life"] = 125,
["attack"] = 50,
["defense"] = 25,
["gold"] = 10,
["experience"] = 7
},
[8] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "大蝙蝠",
["level"] = 1,
["life"] = 150,
["attack"] = 65,
["defense"] = 30,
["gold"] = 10,
["experience"] = 8
},
[9] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "兽面人",
["level"] = 1,
["life"] = 300,
["attack"] = 75,
["defense"] = 45,
["gold"] = 13,
["experience"] = 10
},
[10] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "骷髅队长",
["level"] = 1,
["life"] = 400,
["attack"] = 90,
["defense"] = 50,
["gold"] = 15,
["experience"] = 12
},
[11] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "石头怪人",
["level"] = 1,
["life"] = 500,
["attack"] = 115,
["defense"] = 65,
["gold"] = 15,
["experience"] = 15
},
[12] =
{
["attack_type"] = 4,
["type_value"] = 100,
["name"] = "麻衣法师",
["level"] = 1,
["life"] = 250,
["attack"] = 120,
["defense"] = 70,
["gold"] = 20,
["experience"] = 17
},
[13] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "初级卫兵",
["level"] = 1,
["life"] = 450,
["attack"] = 150,
["defense"] = 90,
["gold"] = 22,
["experience"] = 19
},
[14] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "红蝙蝠",
["level"] = 1,
["life"] = 550,
["attack"] = 160,
["defense"] = 90,
["gold"] = 25,
["experience"] = 20
},
[15] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "高级法师",
["level"] = 1,
["life"] = 100,
["attack"] = 200,
["defense"] = 110,
["gold"] = 30,
["experience"] = 25
},
[16] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "怪王",
["level"] = 1,
["life"] = 700,
["attack"] = 250,
["defense"] = 125,
["gold"] = 32,
["experience"] = 30
},
[17] =
{
["attack_type"] = 5,
["type_value"] = 4,
["name"] = "白衣武士",
["level"] = 1,
["life"] = 1300,
["attack"] = 300,
["defense"] = 150,
["gold"] = 40,
["experience"] = 35
},
[18] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "金骑士",
["level"] = 1,
["life"] = 850,
["attack"] = 350,
["defense"] = 200,
["gold"] = 45,
["experience"] = 40
},
[19] =
{
["attack_type"] = 4,
["type_value"] = 300,
["name"] = "红衣法师",
["level"] = 1,
["life"] = 500,
["attack"] = 400,
["defense"] = 260,
["gold"] = 47,
["experience"] = 45
},
[20] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "兽面武士",
["level"] = 1,
["life"] = 900,
["attack"] = 450,
["defense"] = 330,
["gold"] = 50,
["experience"] = 50
},
[21] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "中级卫兵",
["level"] = 1,
["life"] = 1250,
["attack"] = 500,
["defense"] = 400,
["gold"] = 55,
["experience"] = 55
},
[22] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "高级卫兵",
["level"] = 1,
["life"] = 150,
["attack"] = 560,
["defense"] = 460,
["gold"] = 60,
["experience"] = 60
},
[23] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "双手剑士",
["level"] = 1,
["life"] = 1200,
["attack"] = 620,
["defense"] = 520,
["gold"] = 65,
["experience"] = 75
},
[24] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "冥战士",
["level"] = 1,
["life"] = 2000,
["attack"] = 680,
["defense"] = 590,
["gold"] = 70,
["experience"] = 65
},
[25] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "金队长",
["level"] = 1,
["life"] = 900,
["attack"] = 750,
["defense"] = 650,
["gold"] = 77,
["experience"] = 70
},
[26] =
{
["attack_type"] = 5,
["type_value"] = 3,
["name"] = "灵法师",
["level"] = 1,
["life"] = 1500,
["attack"] = 830,
["defense"] = 730,
["gold"] = 80,
["experience"] = 70
},
[27] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "冥队长",
["level"] = 1,
["life"] = 2500,
["attack"] = 900,
["defense"] = 850,
["gold"] = 84,
["experience"] = 75
},
[28] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "灵武士",
["level"] = 1,
["life"] = 1200,
["attack"] = 980,
["defense"] = 900,
["gold"] = 88,
["experience"] = 75
},
[29] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "影子战士",
["level"] = 1,
["life"] = 3100,
["attack"] = 1150,
["defense"] = 1050,
["gold"] = 92,
["experience"] = 80
},
[30] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "红衣魔王",
["level"] = 1,
["life"] = 15000,
["attack"] = 1000,
["defense"] = 1000,
["gold"] = 100,
["experience"] = 100
},
[31] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "红衣魔王",
["level"] = 1,
["life"] = 20000,
["attack"] = 1333,
["defense"] = 1333,
["gold"] = 133,
["experience"] = 133
},
[32] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "冥灵魔王",
["level"] = 1,
["life"] = 45000,
["attack"] = 2550,
["defense"] = 2250,
["gold"] = 375,
["experience"] = 330
},
[33] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "冥队长",
["level"] = 1,
["life"] = 3333,
["attack"] = 1200,
["defense"] = 1133,
["gold"] = 112,
["experience"] = 100
},
[34] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "灵武士",
["level"] = 1,
["life"] = 1600,
["attack"] = 1306,
["defense"] = 1200,
["gold"] = 117,
["experience"] = 100
},
[35] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "灵武士",
["level"] = 1,
["life"] = 2400,
["attack"] = 2612,
["defense"] = 2400,
["gold"] = 146,
["experience"] = 125
},
[36] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "冥灵魔王",
["level"] = 1,
["life"] = 30000,
["attack"] = 1700,
["defense"] = 1500,
["gold"] = 150,
["experience"] = 120
},
[37] =
{
["attack_type"] = 5,
["type_value"] = 3,
["name"] = "灵法师",
["level"] = 1,
["life"] = 2000,
["attack"] = 1106,
["defense"] = 973,
["gold"] = 106,
["experience"] = 93
},
[38] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "红衣魔王",
["level"] = 1,
["life"] = 30000,
["attack"] = 2666,
["defense"] = 2666,
["gold"] = 166,
["experience"] = 166
},
[39] =
{
["attack_type"] = 5,
["type_value"] = 3,
["name"] = "灵法师",
["level"] = 1,
["life"] = 3000,
["attack"] = 2212,
["defense"] = 1946,
["gold"] = 132,
["experience"] = 116
},
[40] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "冥灵魔王",
["level"] = 1,
["life"] = 60000,
["attack"] = 3400,
["defense"] = 3000,
["gold"] = 390,
["experience"] = 343
},
[41] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "血影",
["level"] = 1,
["life"] = 99999,
["attack"] = 5000,
["defense"] = 4000,
["gold"] = 0,
["experience"] = 0
},
[42] =
{
["attack_type"] = 1,
["type_value"] = 0,
["name"] = "魔龙",
["level"] = 1,
["life"] = 99999,
["attack"] = 9999,
["defense"] = 5000,
["gold"] = 0,
["experience"] = 0
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.