content
stringlengths
5
1.05M
local S, G, P = precore.helpers() function make_test(group, name, srcglob, configs) configs = configs or {} table.insert(configs, 1, "cacophony.strict") table.insert(configs, 2, "cacophony.dep") precore.make_project( group .. "_" .. name, "C++", "ConsoleApp", "./", "out/", nil, configs ) if not srcglob then srcglob = name .. ".cpp" end configuration {"linux"} targetsuffix(".elf") configuration {} targetname(name) files { srcglob } end function make_tests(group, tests) for name, test in pairs(tests) do make_test(group, name, test[0], test[1]) end end precore.make_solution( "test", {"debug", "release"}, {"x64", "x32"}, nil, { "precore.generic", } ) precore.import("general") precore.import("unit")
----------------------------------- -- Game Table -- Basic Chat Text ----------------------------------- function onTrigger(player,npc) player:startEvent(10073); end; function onTrade(player,npc,trade) end; function onEventUpdate(player,csid,option) end function onEventFinish(player,csid,option) end;
object_ship_nova_orion_boss_minion_01_tier9 = object_ship_shared_nova_orion_boss_minion_01_tier9:new { } ObjectTemplates:addTemplate(object_ship_nova_orion_boss_minion_01_tier9, "object/ship/nova_orion_boss_minion_01_tier9.iff")
class 'Admin' function Admin:__init() self.timer = nil self.message = "" Network:Subscribe( "Notice", self, self.ClientFunction ) end function Admin:PostRender() if self.timer then local size = Render.Size.x / 40 local testpos = Vector2( (Render.Size.x / 1.9) - (Render:GetTextSize( self.message, size ).x / 2), 80 ) if LocalPlayer:GetValue( "SystemFonts" ) then Render:SetFont( AssetLocation.SystemFont, "Impact" ) end Render:DrawText( testpos + Vector2.One, self.message, Color( 0, 0, 0 ), size ) Render:DrawText( testpos, self.message, Color( 255, 210, 0 ), size ) if self.timer:GetSeconds() > 10 then self.timer = nil self.message = "" if self.PostRenderEvent then Events:Unsubscribe( self.PostRenderEvent ) self.PostRenderEvent = nil end end end end function Admin:ClientFunction( args ) self.timer = Timer() self.message = args.text if not self.PostRenderEvent then self.PostRenderEvent = Events:Subscribe( "PostRender", self, self.PostRender ) end end admin = Admin()
local actor, super = Class(Actor, "shopkeepers/seam") function actor:init() super:init(self) self.name = "Seam" self.width = 135 self.height = 109 self.path = "shopkeepers/seam" self.default = "idle" self.animations = { ["idle"] = {"idle", function(sprite, wait) while true do sprite:setFrame(1) wait(2) for i = 2, 4 do sprite:setFrame(i) wait(5/30) end end end} } self.talk_sprites = { ["talk"] = 0.25, ["impatient"] = 0.25, ["laugh"] = 0.25 } end function actor:onTalkStart(text, sprite) if sprite.sprite == "idle" then sprite:setSprite("talk") end end function actor:onTalkEnd(text, sprite) if sprite.sprite == "talk" then sprite:setAnimation("idle") end end return actor
-- @module Menu require("public.string") local Table = require("public.table") local T = Table.T local Menu = {} Menu.parse = {} local psvPattern = "[^|]*" --- Finds the positions of any separators (empty items or folders) in a menu string -- @param str string A menu string, of the same form expected by `gfx.showmenu()` -- @return array A list of separator positions function Menu.parseString(str) local separators = T{} local i = 1 for item in str:gmatch(psvPattern) do if item == "" or item:sub(1, 1) == ">" then separators:insert(i) end i = i + 1 end return separators end --- Parses a table of menu items into a string for use with `gfx.showmenu()` -- ```lua -- local options = { -- {theCaption = "a", value = 11}, -- ... -- } -- -- local parsed, separators = Menu.parseTable(options, "theCaption") -- ``` -- @param menuArr array A list of menu items, with separators and folders specified -- in the same way as expected by `gfx.showmenu()` -- @option captionKey string For use with menu items that are objects themselves. -- If provided, the value of `item[captionKey]` will be used as a caption in the -- resultant menu string. -- @return string A menu string -- @return array A list of separator positions (i.e. empty items or folders) function Menu.parseTable(menuArr, captionKey) local separators = T{} local menus = T{} for i = 1, #menuArr do local val if captionKey then val = menuArr[i][captionKey] else val = menuArr[i] end menus:insert(tostring(val)) if (type(val) == "string" and (menus[#menus] == "" or menus[#menus]:sub(1, 1) == ">") ) then separators:insert(i) end end return menus:concat("|"), separators end --- Finds the item that was selected in a menu; `gfx.showmenu()` doesn't account -- for folders and separators in the value it returns. -- @param menuStr string A menu string, formatted for use with `gfx.showmenu()` -- @param val The value returned by `gfx.showmenu()` -- @param separators array An array of separator positions (empty items and folders), -- as returned by `Menu.parseString` or `Menu.parseTable` -- @return number The correct value -- @return item The correct item in `menuStr` function Menu.getTrueIndex(menuStr, val, separators) for i = 1, #separators do if val >= separators[i] then val = val + 1 else break end end local i = 1 local optionOut for option in menuStr:gmatch(psvPattern) do if i == val then optionOut = option break end i = i + 1 end return val, optionOut end --- A wrapper to improve the user-friendliness of `gfx.showmenu()`, allowing -- tables as an alternative to strings and accounting for any separators or folders -- in the returned value. (`gfx.showmenu()` doesn't do this on its own) -- -- Usage: -- ```lua -- local options = { -- {caption = "a", value = 11}, -- {caption = ">b"}, -- {caption = "c", value = 13}, -- {caption = "<d", value = 14}, -- {caption = ""}, -- {caption = "e", value = 15}, -- {caption = "f", value = 16}, -- } -- -- local index, value = Menu.showMenu(options, "caption", "value") -- ``` -- For strings: -- -- ```lua -- local str = "1|2||3|4|5||6.12435213613" -- local index, value = Menu.showMenu(str) -- -- -- User clicks 1 --> 1, 1 -- -- User clicks 3 --> 4, 3 -- -- User clicks 6.12... --> 8, 6.12435213613 -- ``` -- @param menu string|array A list of menu items, formatted either as a string -- for `gfx.showmenu()` or an array of items. -- @option captionKey string If an array passed for `menu` contains objects rather -- than simple strings, this parameter should be used to specify which key in the -- object to use as a caption for the menu item. -- @option valKey string If an array passed for `menu` contains objects rather -- than simple strings, this parameter should be used to specify which key in the -- object to use as the value returned by `Menu.showMenu`. -- @return number The value, or array index, of the selected item; as with -- `gfx.showmenu()`, will return `0` if no item is selected -- @return any The caption, or array item, that was selected. If no item was -- selected, will return `nil` function Menu.showMenu(menu, captionKey, valKey) if type(menu) == "string" then local separators = Menu.parseString(menu) local rawIdx = gfx.showmenu(menu) local trueIdx = Menu.getTrueIndex(menu, rawIdx, separators) local options = menu:split("|") return trueIdx, options[trueIdx] else local parsed, separators = Menu.parseTable(menu, captionKey) local rawIdx = gfx.showmenu(parsed) local trueIdx = Menu.getTrueIndex(parsed, rawIdx, separators) if valKey then return trueIdx, menu[trueIdx][valKey] else return trueIdx, menu[trueIdx] end end end return Menu
local utils = cm:load_global_script "lib.lbm_utils" local benchmarking = cm:load_global_script "lib.lbm_benchmarking" --[[ Given max_time of 120, max_iters of 1000000000, and 4 total suite runs, on my machine, I get the following benchmark results: BENCHMARKS ---------- NAME | # ITERS | TIME ELAPSED | TIME PER ITER | MINUS CONTROL ----------------------------------------------------------------------------------------------------------------- control (only benchmarking overhead) | 1000000000 | 24.367s | 24.367ns | 0.000ns #<string> | 1000000000 | 29.753s | 29.753ns | 5.386ns string.len | 1000000000 | 72.305s | 72.305ns | 47.938ns (string.)len | 1000000000 | 44.037s | 44.037ns | 19.670ns <string>:len | 1000000000 | 54.760s | 54.760ns | 30.393ns new table with 0 items | 573422976 | 120.000s | 209.270ns | 184.903ns new table with 2 items | 452756000 | 120.001s | 265.046ns | 240.679ns new table with 20 items | 200755008 | 120.001s | 597.749ns | 573.382ns new table with 20 key-values | 90250000 | 120.001s | 1329.651ns | 1305.284ns pass/access 20 param | 1000000000 | 84.458s | 84.458ns | 60.091ns pass/access list param with 20 items | 644105024 | 120.001s | 186.307ns | 161.940ns noop with 0 args | 1000000000 | 49.656s | 49.656ns | 25.289ns noop with 2 args | 1000000000 | 50.157s | 50.157ns | 25.790ns noop with 20 args | 1000000000 | 97.663s | 97.663ns | 73.296ns pcall(error) | 656148992 | 120.001s | 182.887ns | 158.520ns pcall(noop with 0 args) | 1000000000 | 100.531s | 100.531ns | 76.164ns pcall(noop with 2 args) | 1000000000 | 107.396s | 107.396ns | 83.029ns pcall(noop with 20 args) | 786937984 | 120.001s | 152.491ns | 128.124ns passthrough (near noop) with 0 args | 1000000000 | 53.553s | 53.553ns | 29.186ns passthrough (near noop) with 2 args | 1000000000 | 59.630s | 59.630ns | 35.263ns passthrough (near noop) with 20 args | 1000000000 | 118.682s | 118.682ns | 94.315ns new function | 631872000 | 120.001s | 189.913ns | 165.546ns coroutine empty | 704321024 | 120.001s | 170.378ns | 146.011ns async_trampoline-like coroutine passthrough | 314595008 | 120.001s | 381.446ns | 357.079ns async.id | 1000000000 | 116.669s | 116.669ns | 92.302ns async passthrough | 211567008 | 120.001s | 567.202ns | 542.835ns orig string.find | 352156000 | 120.001s | 340.761ns | 316.394ns new string.find | 269984000 | 120.001s | 444.474ns | 420.107ns new string.find with pack/unpack args/retvals | 101955000 | 120.001s | 1176.999ns | 1152.632ns async new string.find | 133585000 | 120.001s | 898.312ns | 873.945ns old string.sub | 327904000 | 120.001s | 365.964ns | 341.597ns new string.sub | 407025984 | 120.001s | 294.824ns | 270.457ns cm:get_faction | 17610000 | 120.001s | 6814.365ns | 6789.998ns cm:get_faction no checks | 23184000 | 120.010s | 5176.415ns | 5152.048ns async cm:get_faction no checks | 18061000 | 120.005s | 6644.434ns | 6620.067ns find_uicomponent 1 deep | 36708000 | 120.005s | 3269.175ns | 3244.808ns async find_uicomponent 1 deep | 31869000 | 120.004s | 3765.537ns | 3741.170ns find_uicomponent 8 deep | 4049000 | 120.001s | 29637.189ns | 29612.822ns async find_uicomponent 8 deep | 3562000 | 120.004s | 33690.102ns | 33665.734ns count_armies_and_units (1 army, 2 chars) | 4647000 | 120.209s | 25868.082ns | 25843.715ns async count_armies_and_units (1 army, 2 chars) | 3107000 | 120.004s | 38623.723ns | 38599.355ns count_armies_and_units (2 armies, 5 chars) | 9444000 | 480.550s | 50884.164ns | 50859.271ns OLD async count_armies_and_units (2 armies, 5 chars) | 6168000 | 480.132s | 77842.445ns | 77817.552ns OLD count_armies_and_units (10 armies, 12 chars) | 1841000 | 480.529s | 261015.141ns | 260990.248ns OLD async count_armies_and_units (10 armies, 12 chars)| 1223000 | 480.417s | 392818.469ns | 392793.576ns OLD ----------------------------------------------------------------------------------------------------------------- ]] local function setup_benchmarks() local suite = benchmarking.new_suite({ max_time = 120, -- in seconds max_iters = 1000000000, --max_time = 10, -- in seconds --max_iters = 1000000, check_time_every_n_iters = 1000, }) local noop = utils.noop local passthrough = utils.passthrough local async = cm:load_global_script "lib.lbm_async" local function async_and_resume(func) local id = async(func) async.resume(id) end suite:add("#<string>", function() return #"hello world" end) suite:add("string.len", function() return string.len("hello world") end) local stringlen = string.len suite:add("(string.)len", function() return stringlen("hello world") end) suite:add("<string>:len", function() return ("hello world"):len() end) suite:add("new table with 0 items", function() local _ = {} end) suite:add("new table with 2 items", function() local _ = {"hello world", "orl"} end) suite:add("new table with 20 items", function() local _ = {"Lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", "."} end) suite:add("new table with 20 key-values", function() local _ = {Lorem = 1, ipsum = 2, dolor = 3, sit = 4, amet = 5, consectetur = 6, adipiscing = 7, elit = 8, sed = 9, ["do"] = 10, eiusmod = 11, tempor = 12, incididunt = 13, ut = 14, labore = 15, et = 16, dolore = 17, magna = 18, aliqua = 19, ["."] = 20} end) suite:add("pass/access 20 param", function(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) return t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20 end, function(func) func("Lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", ".") end) suite:add("pass/access list param with 20 items", function(t) return t[1], t[2], t[3], t[4], t[5], t[6], t[7], t[8], t[9], t[10], t[11], t[12], t[13], t[14], t[15], t[16], t[17], t[18], t[19], t[20] end, function(func) func({"Lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", "."}) end) suite:add("noop with 0 args", function() noop() end) suite:add("noop with 2 args", function() noop("hello world", "orl") end) suite:add("noop with 20 args", function() noop("Lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", ".") end) suite:add("pcall(error)", function() pcall(error) end) suite:add("pcall(noop with 0 args)", function() pcall(noop) end) suite:add("pcall(noop with 2 args)", function() pcall(noop, "hello world", "orl") end) suite:add("pcall(noop with 20 args)", function() pcall(noop, "Lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", ".") end) suite:add("passthrough (near noop) with 0 args", function() passthrough() end) suite:add("passthrough (near noop) with 2 args", function() passthrough("hello world", "orl") end) suite:add("passthrough (near noop) with 20 args", function() passthrough("Lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", ".") end) suite:add("new function", function() local function _() end end) suite:add("coroutine empty", function(co) coroutine.resume(co) end, function(func) local co = coroutine.create(function() while true do coroutine.yield() end end) return func(co) end) suite:add("async_trampoline-like coroutine passthrough", function(co) local ret_status, ret_val, x = coroutine.resume(co, 1) if not ret_status then error(ret_val) elseif type(ret_val) == "function" then x = ret_val(x) elseif ret_val ~= nil then error(ret_val) end if coroutine.status(co) == "dead" then return end return x end, function(func) local co = coroutine.create(function() while true do local _ = coroutine.yield(passthrough, 2) end end) return func(co) end) suite:add("async.id", function() async.id() -- includes a couroutine.running() call end) suite:add("async passthrough", function() if async.id() then -- should always be true since in async block coroutine.yield(passthrough) else passthrough() end end, async_and_resume) suite:add("orig string.find", function() string._orig_find("hello world", "orl") --luacheck:no global end) suite:add("new string.find", function() string.find("hello world", "orl") -- new string.find has a bit more overhead to check whether it's running in an async block end) suite:add("new string.find with pack/unpack args/retvals", function() unpack({string.find(unpack({"hello world", "orl"}))}) -- table creation and unpack are expensive end) suite:add("async new string.find", function() string.find("hello world", "orl") -- new string.find is yielded to the async trampoline, so has overhead costs end, async_and_resume) suite:add("old string.sub", function() string._orig_sub("hello world", 3, 8) --luacheck:no global end) suite:add("new string.sub", function() string.sub("hello world", 3, 8) end) suite:add("cm:get_faction", function() cm:get_faction("wh2_main_hef_eataine") end) suite:add("cm:get_faction no checks", function() cm:model():world():faction_by_key("wh2_main_hef_eataine") end) suite:add("async cm:get_faction no checks", function() cm:model():world():faction_by_key("wh2_main_hef_eataine") -- game object functions are yielded to the async trampoline, so has overhead costs end, async_and_resume) suite:add("find_uicomponent 1 deep", function() find_uicomponent(core:get_ui_root(), "layout") end) suite:add("async find_uicomponent 1 deep", function() find_uicomponent(core:get_ui_root(), "layout") end, async_and_resume) suite:add("find_uicomponent 8 deep", function() find_uicomponent(core:get_ui_root(), "layout", "radar_things", "dropdown_parent", "units_dropdown", "panel", "panel_clip", "sortable_list_units", "list_box") end) suite:add("async find_uicomponent 8 deep", function() find_uicomponent(core:get_ui_root(), "layout", "radar_things", "dropdown_parent", "units_dropdown", "panel", "panel_clip", "sortable_list_units", "list_box") end, async_and_resume) local my_faction = utils.get_faction("wh2_main_hef_eataine") local function is_valid_army(mf) return not mf:is_armed_citizenry() and mf:has_general() and not mf:general_character():character_subtype("wh2_main_def_black_ark") -- neither garrison nor black ark end local function count_armies_and_units(faction) local army_count = 0 local unit_count = 0 -- Count all units in non-garrison/non-black-ark armies, including lords and heroes local mf_list = faction:military_force_list() local army_filter = is_valid_army for i = 0, mf_list:num_items() - 1 do local mf = mf_list:item_at(i) if army_filter(mf) then army_count = army_count + 1 unit_count = unit_count + mf:unit_list():num_items() end end -- Count all non-embedded heroes (agents) as units local char_list = faction:character_list() local num_char = char_list:num_items() for i = 0, num_char - 1 do local char = char_list:item_at(i) if not char:is_embedded_in_military_force() and cm:char_is_agent(char) then unit_count = unit_count + 1 end end local faction_name = faction:name() return faction_name, army_count, unit_count end suite:add("count_armies_and_units", function() count_armies_and_units(my_faction) end) suite:add("async count_armies_and_units", function() count_armies_and_units(my_faction) end, async_and_resume) return suite end local function run_benchmarks(num_suite_runs) local suite = setup_benchmarks() local suite_results = {} for _ = 1, num_suite_runs do utils.callback_without_performance_monitor(function() suite_results[#suite_results + 1] = suite:run_suite() if #suite_results == num_suite_runs then suite:aggregate_results(suite_results) end end, 0) end end return run_benchmarks
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> 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.admin.uci", package.seeall) function index() local i18n = luci.i18n.translate local redir = luci.http.formvalue("redir", true) or luci.dispatcher.build_url(unpack(luci.dispatcher.context.request)) entry({"admin", "uci"}, nil, i18n("config")) entry({"admin", "uci", "changes"}, call("action_changes"), i18n("changes"), 40).query = {redir=redir} entry({"admin", "uci", "revert"}, call("action_revert"), i18n("revert"), 30).query = {redir=redir} entry({"admin", "uci", "apply"}, call("action_apply"), i18n("apply"), 20).query = {redir=redir} entry({"admin", "uci", "saveapply"}, call("action_apply"), i18n("saveapply"), 10).query = {redir=redir} end function convert_changes(changes) local util = require "luci.util" local ret for r, tbl in pairs(changes) do for s, os in pairs(tbl) do for o, v in pairs(os) do ret = (ret and ret.."\n" or "") .. "%s%s.%s%s%s" % { v == "" and "-" or "", r, s, o ~= ".type" and "."..o or "", v ~= "" and "="..util.pcdata(v) or "" } end end end return ret end function action_changes() local changes = convert_changes(luci.model.uci.cursor():changes()) luci.template.render("admin_uci/changes", {changes=changes}) end function action_apply() local path = luci.dispatcher.context.path local uci = luci.model.uci.cursor() local changes = uci:changes() local reload = {} -- Collect files to be applied and commit changes for r, tbl in pairs(changes) do table.insert(reload, r) if path[#path] ~= "apply" then uci:load(r) uci:commit(r) uci:unload(r) end end local function _reload() local cmd = uci:apply(reload, true) return io.popen(cmd) end luci.template.render("admin_uci/apply", {changes=convert_changes(changes), reload=_reload}) end function action_revert() local uci = luci.model.uci.cursor() local changes = uci:changes() -- Collect files to be reverted for r, tbl in pairs(changes) do uci:load(r) uci:revert(r) uci:unload(r) end luci.template.render("admin_uci/revert", {changes=convert_changes(changes)}) end
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Prison Job Board" ENT.Author = "Owain" ENT.Category = "The XYZ Network Custom Stuff" ENT.RenderGroup = RENDERGROUP_BOTH ENT.Spawnable = true ENT.AdminSpawnable = true
local combat = Combat() combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_FIRE) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) local spell = Spell("instant") function spell.onCastSpell(creature, variant) return combat:execute(creature, variant) end spell:name("Cure Burning") spell:words("exana flam") spell:group("healing") spell:vocation("druid;true", "elder druid;true") spell:id(145) spell:cooldown(6000) spell:groupCooldown(1000) spell:level(30) spell:mana(30) spell:isSelfTarget(true) spell:isAggressive(false) spell:isPremium(true) spell:needLearn(false) spell:register()
--[[ Copyright 2013 Patrick Grimm <patrick@lunatiki.de> Copyright 2013-2014 André Gaul <gaul@web-yard.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 ]]-- local json = require 'luci.json' local nixio = require 'nixio' local string = require 'string' local uci = (require 'uci').cursor() local utl = require 'luci.util' local libremap = require 'luci.libremap' local util = require 'luci.libremap.util' -- get jsoninfo function fetch_jsoninfo(ip, port, cmd) local resp = utl.exec('echo /'..cmd..' | nc '..ip..' '..port) return json.decode(resp) end -- reverse lookup with stripping of mid. function lookup_olsr_ip(ip, version) if version==4 then local inet = 'inet' elseif version==6 then local inet = 'inet6' else error('ip version '..version..' unknown.') end -- get name local name = nixio.getnameinfo(ip, inet) if name ~= nil then -- remove 'midX.' from name return string.gsub(name, 'mid[0-9]*\.', '') else return nil end end -- get links for specified ip version (4 or 6) function fetch_links(version) -- set variables that depend on ip version local ip local type if version==4 then ip = '127.0.0.1' -- for jsoninfo type = 'olsr4' -- type of alias/link elseif version==6 then ip = '::1' type = 'olsr6' else error('ip version '..version..' unknown.') end -- retrieve links data from jsoninfo local jsoninfo = fetch_jsoninfo(ip, '9090', 'links') if not jsoninfo or not jsoninfo.links then return {}, {} end local olsr_links = jsoninfo.links -- init return values local aliases = {} local links = {} -- step through olsr_links for _, link in ipairs(olsr_links) do local ip_local = link['localIP'] local ip_remote = link['remoteIP'] -- unused at the moment: --local name_local = lookup_olsr_ip(ip_local, version) --local name_remote = lookup_olsr_ip(ip_remote, version) -- insert aliases aliases[ip_local] = 1 -- process link quality local quality = link['linkQuality'] -- TODO: process quality properly if quality<0 then quality = 0 elseif quality>1 then quality = 1 elseif not (quality>=0 and quality<=1) then quality = 0 end -- insert links links[#links+1] = { type = type, alias_local = ip_local, alias_remote = ip_remote, quality = quality, attributes = link } end -- retrieve interfaces data from jsoninfo for aliases local jsoninfo = fetch_jsoninfo(ip, '9090', 'interfaces') if jsoninfo and jsoninfo.interfaces then for _, interface in ipairs(jsoninfo.interfaces) do local address = interface['ipv'..version..'Address'] if address ~= nil then aliases[address] = 1 end end end -- fill in aliases local aliases_arr = {} for alias, _ in pairs(aliases) do aliases_arr[#aliases_arr+1] = { type = type, alias = alias } end return aliases_arr, links end -- appent array b to array a function append(a, b) local a = a or {} for _, v in ipairs(b) do a[#a+1] = v end return a end -- insert olsr info into doc function insert(doc) -- init fields in doc (if not yet present) doc.aliases = doc.aliases or {} doc.links = doc.links or {} -- get used ip version(s) from config local IpVersion = uci:get_first("olsrd", "olsrd","IpVersion") local versions = {} if IpVersion == '4' then versions = {4} elseif IpVersion == '6' then versions = {6} elseif IpVersion == '6and4' then versions = {6, 4} end -- fetch links for used ip versions for _, version in pairs(versions) do local aliases, links = fetch_links(version) append(doc.aliases, aliases) append(doc.links, links) end end return { insert = insert }
local balancer_resty = require("balancer.resty") local resty_chash = require("resty.chash") local util = require("util") local ngx_log = ngx.log local ngx_ERR = ngx.ERR local _M = balancer_resty:new({ factory = resty_chash, name = "chash" }) function _M.new(self, backend) local nodes = util.get_nodes(backend.endpoints) local complex_val, err = util.parse_complex_value(backend["upstreamHashByConfig"]["upstream-hash-by"]) if err ~= nil then ngx_log(ngx_ERR, "could not parse the value of the upstream-hash-by: ", err) end local o = { instance = self.factory:new(nodes), hash_by = complex_val, traffic_shaping_policy = backend.trafficShapingPolicy, alternative_backends = backend.alternativeBackends, } setmetatable(o, self) self.__index = self return o end function _M.balance(self) local key = util.generate_var_value(self.hash_by) return self.instance:find(key) end return _M
require "uri-test" local URI = require "uri" local URIFile = require "uri.file" module("test.file", lunit.testcase, package.seeall) function test_normalize () test_norm("file:///foo", "file://LocalHost/foo") test_norm("file:///", "file://localhost/") test_norm("file:///", "file://localhost") test_norm("file:///", "file://") test_norm("file:///", "file:/") test_norm("file:///foo", "file:/foo") test_norm("file://foo/", "file://foo") end function test_invalid () is_bad_uri("just scheme", "file:") is_bad_uri("scheme with relative path", "file:foo/bar") end function test_set_host () local uri = assert(URI:new("file:///foo")) is("", uri:host()) is("", uri:host("LocalHost")) is("file:///foo", tostring(uri)) is("", uri:host("host.name")) is("file://host.name/foo", tostring(uri)) is("host.name", uri:host("")) is("file:///foo", tostring(uri)) end function test_set_path () local uri = assert(URI:new("file:///foo")) is("/foo", uri:path()) is("/foo", uri:path(nil)) is("file:///", tostring(uri)) is("/", uri:path("")) is("file:///", tostring(uri)) is("/", uri:path("/bar/frob")) is("file:///bar/frob", tostring(uri)) is("/bar/frob", uri:path("/")) is("file:///", tostring(uri)) end function test_bad_usage () local uri = assert(URI:new("file:///foo")) assert_error("nil host", function () uri:host(nil) end) assert_error("set userinfo", function () uri:userinfo("foo") end) assert_error("set port", function () uri:userinfo(23) end) assert_error("set relative path", function () uri:userinfo("foo/") end) end local function uri_to_fs (os, uristr, expected) local uri = assert(URI:new(uristr)) is(expected, uri:filesystem_path(os)) end local function fs_to_uri (os, path, expected) is(expected, tostring(URIFile.make_file_uri(path, os))) end function test_uri_to_fs_unix () uri_to_fs("unix", "file:///", "/") uri_to_fs("unix", "file:///c:", "/c:") uri_to_fs("unix", "file:///C:/", "/C:/") uri_to_fs("unix", "file:///C:/Program%20Files", "/C:/Program Files") uri_to_fs("unix", "file:///C:/Program%20Files/", "/C:/Program Files/") uri_to_fs("unix", "file:///Program%20Files/", "/Program Files/") end function test_uri_to_fs_unix_bad () -- On Unix platforms, there's no equivalent of UNC paths. local uri = assert(URI:new("file://laptop/My%20Documents/FileSchemeURIs.doc")) assert_error("Unix path with host name", function () uri:filesystem_path("unix") end) -- Unix paths can't contain null bytes or encoded slashes. uri = assert(URI:new("file:///frob/foo%00bar/quux")) assert_error("Unix path with null byte", function () uri:filesystem_path("unix") end) uri = assert(URI:new("file:///frob/foo%2Fbar/quux")) assert_error("Unix path with encoded slash", function () uri:filesystem_path("unix") end) end function test_fs_to_uri_unix () fs_to_uri("unix", "/", "file:///") fs_to_uri("unix", "//", "file:///") fs_to_uri("unix", "///", "file:///") fs_to_uri("unix", "/foo/bar", "file:///foo/bar") fs_to_uri("unix", "/foo/bar/", "file:///foo/bar/") fs_to_uri("unix", "//foo///bar//", "file:///foo/bar/") fs_to_uri("unix", "/foo bar/%2F", "file:///foo%20bar/%252F") end function test_fs_to_uri_unix_bad () -- Relative paths can't be converted to URIs, because URIs are inherently -- absolute. assert_error("relative Unix path", function () URIFile.make_file_uri("foo/bar", "unix") end) assert_error("relative empty Unix path", function () URIFile.make_file_uri("", "unix") end) end function test_uri_to_fs_win32 () uri_to_fs("win32", "file:///", "\\") uri_to_fs("win32", "file:///c:", "c:\\") uri_to_fs("win32", "file:///C:/", "C:\\") uri_to_fs("win32", "file:///C:/Program%20Files", "C:\\Program Files") uri_to_fs("win32", "file:///C:/Program%20Files/", "C:\\Program Files\\") uri_to_fs("win32", "file:///Program%20Files/", "\\Program Files\\") -- http://blogs.msdn.com/ie/archive/2006/12/06/file-uris-in-windows.aspx uri_to_fs("win32", "file://laptop/My%20Documents/FileSchemeURIs.doc", "\\\\laptop\\My Documents\\FileSchemeURIs.doc") uri_to_fs("win32", "file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc", "C:\\Documents and Settings\\davris\\FileSchemeURIs.doc") -- For backwards compatibility with deprecated way of indicating drives. uri_to_fs("win32", "file:///c%7C", "c:\\") uri_to_fs("win32", "file:///c%7C/", "c:\\") uri_to_fs("win32", "file:///C%7C/foo/", "C:\\foo\\") end function test_fs_to_uri_win32 () fs_to_uri("win32", "", "file:///") fs_to_uri("win32", "\\", "file:///") fs_to_uri("win32", "c:", "file:///c:/") fs_to_uri("win32", "C:\\", "file:///C:/") fs_to_uri("win32", "C:/", "file:///C:/") fs_to_uri("win32", "C:\\Program Files", "file:///C:/Program%20Files") fs_to_uri("win32", "C:\\Program Files\\", "file:///C:/Program%20Files/") fs_to_uri("win32", "C:/Program Files/", "file:///C:/Program%20Files/") fs_to_uri("win32", "\\Program Files\\", "file:///Program%20Files/") fs_to_uri("win32", "\\\\laptop\\My Documents\\FileSchemeURIs.doc", "file://laptop/My%20Documents/FileSchemeURIs.doc") fs_to_uri("win32", "c:\\foo bar\\%2F", "file:///c:/foo%20bar/%252F") end function test_convert_on_unknown_os () local uri = assert(URI:new("file:///foo")) assert_error("filesystem_path, unknown os", function () uri:filesystem_path("NonExistent") end) assert_error("make_file_uri, unknown os", function () URIFile.make_file_uri("/foo", "NonExistent") end) end -- vi:ts=4 sw=4 expandtab
---------------------------------------------------------------- -- SkillInfoConfig.lua -- Author : Zonglin Liu -- Version : 1.0 -- Date : -- Description: 技能配置, ------------------------------------------------------------------ module("SkillInfoConfig", package.seeall) SKILLINFOS={} function getSkillInfo(id) if SKILLINFOS[id]~=nil then return SKILLINFOS[id] end return false end;
-- NewError returns an error object. -- An error has a code and a message function NewError(code, message) err = {code=code, message=message} return err end
--------------------------------------------------------------- -- UITracker.lua: Widget tracking --------------------------------------------------------------- -- Used to track and bind interface widgets to the controller. -- Necessary since widgets might be created at a later time. local widgetTrackers = {} local function CheckWidgetTrackers(self) if not InCombatLockdown() then for button, widget in pairs(widgetTrackers) do if _G[widget] then self:LoadInterfaceBinding(button, widget) widgetTrackers[button] = nil end end if not next(widgetTrackers) then self:RemoveUpdateSnippet(CheckWidgetTrackers) end end end function ConsolePort:AddWidgetTracker(button, action) widgetTrackers[button] = action self:AddUpdateSnippet(CheckWidgetTrackers) end --------------------------------------------------------------- -- UITracker.lua: Frame tracking --------------------------------------------------------------- -- Used to track and bind addon frames to the UI cursor. -- Necessary since all frames do not exist on ADDON_LOADED. -- Automatically adds all special frames, i.e. closed with ESC. local specialFrames, frameTrackers = {}, {} local function CheckSpecialFrames(self) local frames = UISpecialFrames for i, frame in pairs(frames) do if not specialFrames[frame] then if self:AddFrame(frame) then specialFrames[frame] = true end end end end function ConsolePort:UpdateFrameTracker() CheckSpecialFrames(self) for frame in pairs(frameTrackers) do if self:AddFrame(frame) then frameTrackers[frame] = nil end end end function ConsolePort:AddFrameTracker(frame) frameTrackers[frame] = true end
-- This file is generated by protoc-gen-ratelimit. DO NOT EDIT. local M = {} function M.get_ratelimit_bucket(method, path) if method == "DELETE" then if path:match('^/v1/tasks/.+$') then return "api.tasks.v1.TasksService" end return "other" end if method == "GET" then if path:match('^/v1/tasks/.+$') then return "api.tasks.v1.TasksService" end return "other" end if method == "POST" then if path == "/api.tasks.v1.TasksService/CreateTask" then return "/api.tasks.v1.TasksService/CreateTask" end if path == "/v1/tasks" then return "/api.tasks.v1.TasksService/CreateTask" end if path == "/api.tasks.v1.TasksService/GetTask" then return "api.tasks.v1.TasksService" end if path == "/api.tasks.v1.TasksService/UpdateTask" then return "api.tasks.v1.TasksService" end if path == "/api.tasks.v1.TasksService/DeleteTask" then return "api.tasks.v1.TasksService" end if path == "/api.tasks.v1.TasksService/AddComment" then return "custom_bucket:TaskComments" end if path == "/api.tasks.v1.TasksService/UpdateComment" then return "custom_bucket:TaskComments" end if path:match('^/v1/tasks/.+/comment$') then return "custom_bucket:TaskComments" end return "other" end if method == "PUT" then if path:match('^/v1/tasks/.+$') then return "api.tasks.v1.TasksService" end if path:match('^/v1/tasks/.+/comment/.+$') then return "custom_bucket:TaskComments" end return "other" end return "other" end return M
zhibHP = 0 zhibMaxHP = 0 neralaHP = 0 neralaMaxHP = 0 omozraHP = 0 omozraMaxHP = 0 pathRedHP = "Assets/UI/HUD/Slider Segments/slider_segments_hp1_v1.0.png" pathGreyHP = "Assets/UI/HUD/Slider Segments/slider_segments_hp3_v1.0.png" pathRed = "Assets/UI/HUD/Slider Segments/slider_segments_hp2_v1.0.png" pathGrey = "Assets/UI/HUD/Slider Segments/slider_segments_none_v1.0.png" pathBlank = "Assets/UI/HUD/blank_asset_v1.0.png" -- Called each loop iteration function Update(dt) if (GetVariable("GameState.lua", "characterSelected", INSPECTOR_VARIABLE_TYPE.INSPECTOR_INT) == 1) then if (zhibHP == 3) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathRed) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathRed) elseif (zhibHP == 2) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathRed) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) elseif (zhibHP == 1) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathGrey) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) elseif (zhibHP == 0) then gameObject:GetImage():SetTexture(pathGreyHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathGrey) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) end elseif (GetVariable("GameState.lua", "characterSelected", INSPECTOR_VARIABLE_TYPE.INSPECTOR_INT) == 2) then if (neralaHP == 3) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathRed) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathRed) elseif (neralaHP == 2) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathRed) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) elseif (neralaHP == 1) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathGrey) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) elseif (neralaHP == 0) then gameObject:GetImage():SetTexture(pathGreyHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathGrey) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) end elseif (GetVariable("GameState.lua", "characterSelected", INSPECTOR_VARIABLE_TYPE.INSPECTOR_INT) == 3) then if (omozraHP == 3) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathRed) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathRed) elseif (omozraHP == 2) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathRed) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) elseif (omozraHP == 1) then gameObject:GetImage():SetTexture(pathRedHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathGrey) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) elseif (omozraHP == 0) then gameObject:GetImage():SetTexture(pathGreyHP) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathGrey) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathGrey) end elseif (GetVariable("GameState.lua", "characterSelected", INSPECTOR_VARIABLE_TYPE.INSPECTOR_INT) == 0) then gameObject:GetImage():SetTexture(pathBlank) gameObject:GetChild("HealthBar_1"):GetImage():SetTexture(pathBlank) gameObject:GetChild("HealthBar_1"):GetChild("HealthBar_2"):GetImage():SetTexture(pathBlank) end end function EventHandler(key, fields) if key == "Player_Health" then -- fields[1] -> characterID; fields[2] -> currentHP; fields[3] -> maxHP if (fields[1] == 1) then -- Zhib zhibHP = fields[2] zhibMaxHP = fields[3] elseif (fields[1] == 2) then -- Nerala neralaHP = fields[2] neralaMaxHP = fields[3] elseif (fields[1] == 3) then -- Omozra omozraHP = fields[2] omozraMaxHP = fields[3] end end end print("UI_Lives.lua compiled succesfully")
return function() configuration {} filter {} includedirs { 'components/extra-natives-five/include/', } files { 'components/extra-natives-five/src/VisualSettingsNatives.cpp', } end
USABLE_FLUID = {} USABLE_FLUID["crude-oil"] = { fuel_value = "2500KJ", fuel_acceleration_multiplier = 1, fuel_top_speed_multiplier = 1 } USABLE_FLUID["heavy-oil"] = { fuel_value = "2500KJ", fuel_acceleration_multiplier = 1.8, fuel_top_speed_multiplier = 1.3 } USABLE_FLUID["light-oil"] = { fuel_value = "2500KJ", fuel_acceleration_multiplier = 3, fuel_top_speed_multiplier = 1.05 } -- for diesel-fuel from KS_power USABLE_FLUID["diesel-fuel"] = { fuel_value = "2500KJ", fuel_acceleration_multiplier = 3, fuel_top_speed_multiplier = 1.3 } TANK_CAPACITY = 8000 -- Affects maximum fluid capacity the locomotive can hold for each of 3 tanks IDLE_TICK_BUFFER = 70 SLOW_UPDATE_TICK = 30 TICK_UPDATE = true --[[ if this value is false, the train won't update fuel when idle, only when it is going to arrive or leave train stop. Affects performance, turn to false if your game start lagging ]]
--[[ Environment class: A controler for the different classes of the game. It will permit different classes to interact between each others. ]] require("sources/lib/customFunctions") Environment = {} Environment.__index = Environment function Environment:new(player, enemys, window, asteroids) local env = {} setmetatable(env, Environment) env.player = player env.enemys = enemys env.window = window env.asteroids = asteroids env.soundasteroid = love.audio.newSource("sources/sound/asteroidimpact.mp3", "static") env.soundasteroid:setVolume(0.1) return env end function Environment:update(dt) self.player:update(dt) self.enemys:update(dt) local nbCollission = self.enemys:notifyObserver(self.player:getPos(), self.player:getSize(), self.soundasteroid) if nbCollission > 0 then self.player:setHp(self.player:getHp() - nbCollission) Hp = Hp - nbCollission end if Tmp == 60 then Tmp = 0 local enemy = Chose(Enemy:new(50, 600, {x = self.player.x, y = self.player.y}, self.asteroids.asteroid_50_img), Enemy:new(100, 300, {x = self.player.x, y = self.player.y}, self.asteroids.asteroid_100_img)) self.enemys:addObserver(enemy) else Tmp = Tmp + 1 end end function Environment:draw() self.player:draw() self.enemys:draw() end --[[ function Enemys:addCustomEnemy(size, speed, player_pos, x, y) local enemy = Enemy:new(size, speed, player_pos, self.asteroids.asteroid_50_img, x ,y) table.insert(self.list_enemys, enemy) end --]]
-- ======================================================================================= -- Plugin: SQUASH.lua -- Programmer: Cooper Santillan -- Last Modified: September 30, 2021 11:15pm -- ======================================================================================= -- Description: Will prompt the user for a sequence label or number the user would like to -- delete from their Maker+ Library. Will additionally ask if the user would -- like to condense the sequence library, Maker library, and Adder Library. -- ======================================================================================= -- ======================================================================================= -- ==== MAIN: SQUASH ===================================================================== -- ======================================================================================= local caller = select(2,...):gsub("%d+$", "") -- label of the plugin function maker.task.squash(localUser) local user = localUser if not(maker.test.seq(user, caller)) then return false; end if not(maker.test.pool(user, caller)) then return false; end local macroAmount = maker.test.count(user, caller) if not(macroAmount) then maker.util.error("Setup -> Add-ons were not setup completely!", nil, caller) return false end local renameSong local boolContinue = true -- ask user for the song name -- loop until user inputs a string that contains no punctuation repeat -- inform user that they are not able to use punctuation for their song name if (boolContinue == false) then if (false == (gma.gui.confirm("ERROR" , "Invalid Song Name! \n Make sure there are no special characters"))) then maker.util.print(ESC_RED .."Plugin Terminated. Song not assigned to selected executor.", caller) return -13 end end -- ask user for a song name renameSong = gma.textinput("Which Song To Edit?" , "" ) boolContinue = true -- end program if they escape from writing a name if (renameSong == nil) then maker.util.print(ESC_RED .."Plugin Terminated. Song not assigned to selected executor.", caller) return -13 elseif (renameSong == "") then boolContinue = false end until boolContinue gma.echo(ESC_RED .."========================" ..ESC_WHT .."-INTENTIONAL-SYNTAX-ERROR-START-" ..ESC_RED .."========================") for i=1, macroAmount do user.last[i] = maker.find.avail(user, i) end gma.echo(ESC_RED .."========================" ..ESC_WHT .."-INTENTIONAL-SYNTAX-ERROR-END-" ..ESC_RED .."==========================") local locations = maker.find.strOrNum(user, renameSong, caller) if (locations == false) then return false end renameSong = G_OBJ.label(G_OBJ.handle(maker.manage("Pool", user, 1) .." " ..locations[1])) renameSong = renameSong:gsub("_V%d+" , "") renameSong = renameSong:gsub("_", " ") for i=1, macroAmount do if not(maker.manage("Delete", user, i, locations[i])) then maker.util.print(ESC_RED .."There was an error while trying to use " ..user.name[i], caller) -- return false end end for i=1, macroAmount do if (locations[i] ~= maker.manage("Inc", user, i, user.last[i], -1)) then if(gma.gui.confirm("Condense MAKER+ Libraries" , "Would you like to condense the MAKER+ libraries?")) then gma.echo(ESC_RED .."========================" ..ESC_WHT .."-INTENTIONAL-SYNTAX-ERROR-START-" ..ESC_RED .."========================") for i=1, macroAmount do user.last[i] = maker.find.gap(user, i, caller) maker.move.obj(user, i, caller) end gma.echo(ESC_RED .."========================" ..ESC_WHT .."-INTENTIONAL-SYNTAX-ERROR-END-" ..ESC_RED .."==========================") break; end end end -- print on command line feedback information about what and where the new song is gma.feedback(ESC_WHT ..caller .." : " ..ESC_YEL .."========================================") gma.feedback(ESC_WHT ..caller .." : " ..ESC_YEL .."Song Name: " ..ESC_RED ..renameSong) for i=1, macroAmount do currPool = maker.manage("Pool", user, i) gma.feedback(ESC_WHT ..caller .." : " ..ESC_YEL .."Song " ..currPool:upper() ..": " ..ESC_GRN ..currPool .." " ..ESC_WHT ..locations[i]) end gma.feedback(ESC_WHT ..caller .." : " ..ESC_YEL .."========================================") end -- ======================================================================================= -- ==== END OF SQUASH ==================================================================== -- ======================================================================================= return SQUASH;
local chacha20, base64 = ... local handles, cache, invoke = {}, {}, (component or require and require("component") or error("no component library")).invoke ------------------------------------------------------------------------------ Misc ------------------------------------------------------------------------------ local function encrypt(data, key, nonce) local encrypted = {} for i = 1, math.ceil(#data / 64) do table.insert(encrypted, chacha20.encrypt(key, i, nonce, data:sub(i * 64 - 63, i * 64))) end return table.concat(encrypted) end local function segments(path) local parts, current, up = {} for part in path:gmatch("[^\\/]+") do current, up = part:find("^%.?%.$") if current then if up == 2 then table.remove(parts) end else table.insert(parts, part) end end return parts end local function prettyPath(path) return "/" .. table.concat(segments(path), "/") end local function mergeString(str, from, value) return table.concat{str:sub(1, from), value, str:sub(from + #value, #str)} end ------------------------------------------------------------------------------ Filesystem ------------------------------------------------------------------------------ local function getEncryptedPath(key, nonce, workingDirectory, path) local parts = segments(path) for i = 1, #parts do parts[i] = base64.encode(encrypt(parts[i], key, nonce)) end return workingDirectory .. table.concat(parts, "/") end local function decryptFromByte(address, key, nonce, handle, byte, count) local startBlock = math.floor(byte / 64) + 1 local startByte = math.floor(byte / 64) * 64 local needToRead if count then needToRead = math.ceil((byte + count) / 64) * 64 - startByte else needToRead = math.huge end if byte > cache[handles[handle].path].size then return {}, 0, startByte, startBlock else local rawData, readed, chunk, tmpHandle, close = {}, 0 if handles[handle].mode == "r" or handles[handle].mode == "rb" then tmpHandle = handle else tmpHandle = invoke(address, "open", handles[handle].mappedPath, "r") close = true end invoke(address, "seek", tmpHandle, "set", startByte) while true do chunk = invoke(address, "read", tmpHandle, needToRead - #rawData) if chunk then table.insert(rawData, chunk) readed = readed + #chunk else break end if readed >= needToRead then break end end if close then invoke(address, "close", tmpHandle) end local data = {} if readed > 0 then local rawDataAsStr = table.concat(rawData) for i = 1, math.ceil(readed / 64) do local block = i + startBlock - 1 table.insert(data, chacha20.encrypt(key, block, nonce, rawDataAsStr:sub(i * 64 - 63, i * 64))) end end return data, readed, startByte, startBlock end end local function spaceUsed(address) return invoke(address, "spaceUsed") end local function open(address, key, nonce, workingDirectory, path, mode) checkArg(1, path, "string") checkArg(2, mode, "string", "nil") path = prettyPath(path) mode = mode or "r" local mappedPath = getEncryptedPath(key, nonce, workingDirectory, path) local handle = invoke(address, "open", mappedPath, mode) if handle then if not cache[path] then cache[path] = { size = invoke(address, "size", mappedPath), handlesOpened = 1 } end handles[handle] = { path = path, mode = mode, mappedPath = mappedPath, offset = 0 } return handle end return nil, path end local function seek(address, key, nonce, workingDirectory, handle, whence, offset) checkArg(1, handle, "number", "table") checkArg(2, whence, "string") checkArg(3, offset, "number") if handles[handle] then local newOffset if whence == "set" then newOffset = offset elseif whence == "cur" then newOffset = handles[handle].offset + offset elseif whence == "end" then newOffset = cache[handles[handle].path].size + offset else error("invalid mode") end if newOffset > -1 then handles[handle].offset = newOffset else return nil, "Negative seek offset" end return newOffset end return nil, "bad file descriptor" end local function makeDirectory(address, key, nonce, workingDirectory, path) checkArg(1, path, "string") return invoke(address, "makeDirectory", getEncryptedPath(key, nonce, workingDirectory, path)) end local function exists(address, key, nonce, workingDirectory, path) checkArg(1, path, "string") return invoke(address, "exists", getEncryptedPath(key, nonce, workingDirectory, path)) end local function isReadOnly(address) return invoke(address, "isReadOnly") end local function write(address, key, nonce, workingDirectory, handle, value) checkArg(1, handle, "number", "table") checkArg(2, value, "string") if handles[handle] then local data, dataLength, startByte, startBlock = decryptFromByte(address, key, nonce, handle, handles[handle].offset) data = mergeString(table.concat(data), handles[handle].offset - startByte, value) local encrypted = {} for i = 1, math.ceil(#data / 64) do local block = i + startBlock - 1 table.insert(encrypted, chacha20.encrypt(key, block, nonce, data:sub(i * 64 - 63, i * 64))) end encrypted = table.concat(encrypted) invoke(address, "seek", handle, "set", startByte) invoke(address, "write", handle, encrypted) handles[handle].offset = handles[handle].offset + #value cache[handles[handle].path].size = startByte + #encrypted return true end return nil, "bad file descriptor" end local function spaceTotal(address) return invoke(address, "spaceTotal") end local function isDirectory(address, key, nonce, workingDirectory, path) checkArg(1, path, "string") return invoke(address, "isDirectory", getEncryptedPath(key, nonce, workingDirectory, path)) end local function rename(address, key, nonce, workingDirectory, from, to) checkArg(1, from, "string") checkArg(2, to, "string") from, to = prettyPath(from), prettyPath(to) return invoke(address, "rename", getEncryptedPath(key, nonce, workingDirectory, from), getEncryptedPath(key, nonce, workingDirectory, to)) end local function list(address, key, nonce, workingDirectory, path) checkArg(1, path, "string") local mappedPath = getEncryptedPath(key, nonce, workingDirectory, path) local files = invoke(address, "list", mappedPath) if files then for i = 1, files.n do local file, count = files[i]:gsub("/", "") files[i] = encrypt(base64.decode(file), key, nonce) .. (count > 0 and "/" or "") end return files end end local function lastModified(address, key, nonce, workingDirectory, path) checkArg(1, path, "string") return invoke(address, "lastModified", getEncryptedPath(key, nonce, workingDirectory, path)) end local function getLabel(address) return invoke(address, "getLabel") end local function remove(address, key, nonce, workingDirectory, path) checkArg(1, path, "string") return invoke(address, "remove", getEncryptedPath(key, nonce, workingDirectory, path)) end local function close(address, key, nonce, workingDirectory, handle) checkArg(1, handle, "number", "table") if handles[handle] then invoke(address, "close", handle) cache[handles[handle].path].handlesOpened = cache[handles[handle].path].handlesOpened - 1 if cache[handles[handle].path].handlesOpened == 0 then cache[handles[handle].path] = nil end handles[handle] = nil return end return nil, "bad file descriptor" end local function size(address, key, nonce, workingDirectory, path) checkArg(1, path, "string") return invoke(address, "size", getEncryptedPath(key, nonce, workingDirectory, path)) end local function read(address, key, nonce, workingDirectory, handle, count) checkArg(1, handle, "number", "table") checkArg(2, count, "number") count = count > 2048 and 2048 or count if handles[handle] and handles[handle].mode == "r" or handles[handle].mode == "rb" then if handles[handle].offset >= cache[handles[handle].path].size then return nil end local data, dataLength, startByte = decryptFromByte(address, key, nonce, handle, handles[handle].offset, count) local from = handles[handle].offset - startByte data = table.concat(data):sub(handles[handle].offset - startByte + 1, from + count) handles[handle].offset = handles[handle].offset + count return data end return nil, "bad file descriptor" end local function setLabel(address, key, nonce, workingDirectory, label) checkArg(1, label, "string") return invoke(address, "setLabel", label) end local function getProxy(address, key, nonce, workingDirectory) return { address = address, spaceUsed = function(...) return spaceUsed(address, key, nonce, workingDirectory, ...) end, open = function(...) return open(address, key, nonce, workingDirectory, ...) end, seek = function(...) return seek(address, key, nonce, workingDirectory, ...) end, makeDirectory = function(...) return makeDirectory(address, key, nonce, workingDirectory, ...) end, exists = function(...) return exists(address, key, nonce, workingDirectory, ...) end, isReadOnly = function(...) return isReadOnly(address, key, nonce, workingDirectory, ...) end, write = function(...) return write(address, key, nonce, workingDirectory, ...) end, spaceTotal = function(...) return spaceTotal(address, key, nonce, workingDirectory, ...) end, isDirectory = function(...) return isDirectory(address, key, nonce, workingDirectory, ...) end, rename = function(...) return rename(address, key, nonce, workingDirectory, ...) end, list = function(...) return list(address, key, nonce, workingDirectory, ...) end, lastModified = function(...) return lastModified(address, key, nonce, workingDirectory, ...) end, getLabel = function(...) return getLabel(address, key, nonce, workingDirectory, ...) end, remove = function(...) return remove(address, key, nonce, workingDirectory, ...) end, close = function(...) return close(address, key, nonce, workingDirectory, ...) end, size = function(...) return size(address, key, nonce, workingDirectory, ...) end, read = function(...) return read(address, key, nonce, workingDirectory, ...) end, setLabel = function(...) return setLabel(address, key, nonce, workingDirectory, ...) end } end -- local drive = getProxy(require'component'.get('485'), 'local a,b,c,d,e=table.insert,tab', "local functi", "/encrypted/") -- local filesystem = require("filesystem") -- local mountPoint = "/mnt/catch-" .. drive.address:sub(1, 3) -- filesystem.umount(mountPoint) -- filesystem.mount(drive, mountPoint) -- print("Mount point " .. mountPoint) return { getProxy = getProxy }
require('constants') if player_has_item(ISEN_DUN_WHISKY_ID) and creature_has_humanoid_followers(PLAYER_ID) then clear_and_add_message("YEW_ADVISOR_WHISKY_SID") remove_object_from_player(ISEN_DUN_WHISKY_ID) set_creature_additional_property(PLAYER_ID, QUEST_ISEN_DUN_YEW_COMPLETE, "1") else clear_and_add_message("ADVISOR_SPEECH_TEXT_SID") end
local input_IsButtonDown = CLIENT and input.IsButtonDown local input_IsMouseDown = CLIENT and input.IsMouseDown local hook_Run = hook.Run local hook_Add = hook.Add local assert = assert local type = type -- Player Buttons by PrikolMen#3372 local PLAYER = FindMetaTable("Player") function PLAYER:GetButton(key) assert(type(key) == "number", "bad argument #1 (number expected)") if CLIENT then return (key > 106) and input_IsMouseDown(key) or input_IsButtonDown(key) end return self["PLib.Buttons"][key] or false end if SERVER then PLAYER["PLib.Buttons"] = {} function PLAYER:SetButton(key, bool) assert(type(key) == "number", "bad argument #1 (number expected)") assert(type(bool) == "boolean", "bad argument #2 (boolean expected)") self["PLib.Buttons"][key] = bool hook_Run("PlayerButtonToggle", self, key, bool) end hook_Add("PlayerButtonDown", "PLib.Buttons", function(ply, key) ply:SetButton(key, true) end) hook_Add("PlayerButtonUp", "PLib.Buttons", function(ply, key) ply:SetButton(key, false) end) end --[[------------------------------------------------------------------------- Example ----------------------------------------------------------------------------- if CLIENT then hook.Add("PlayerButtonToggle", "Example", function(ply, key, bool) print(ply, input.GetKeyName(key), bool) end) end ---------------------------------------------------------------------------]]
require 'class' Console = class(function(cons) end) function Console:__tostring() return 'Console' end function Console:log(level, message) print(level..','..message) end function Console:logInfo(message) self.log("INFO",message) end function Console:logWarn(message) self.log("WARN",message) end function Console:logErr(message) self.log("ERRO",message) end function Console:addState(name, initialVal) print("ADDP"..name..","..initialVal) end function Console:updateState(name, val) print("UPDP"..name..","..val) end function Console:removeState(name) print("REMP"..name) end ClientAPI = class(Console, function(c,rednetName) Console.init(c) -- must init base! rednet.open(rednetName) rednet.broadcast("WhoIsHost") local event, param1, param2, param3 = os.pullEvent() print("eventThrown:"..event) print(" with:"..tostring(param1)..","..tostring(param2)..","..tostring(param3)) if event == "rednet_message" then c.hostID = param1 end end) function ClientAPI:__tostring() return 'ClientAPI' end function ClientAPI:clientSend(command, message) rednet.send(self.hostID, command.." "..message) end function ClientAPI:log(level, message) self.clientSend("LOG "..level , message) end function ClientAPI:logInfo(message) self.log("INFO",message) end function ClientAPI:logWarn(message) self.log("WARN",message) end function ClientAPI:logErr(message) self.log("ERRO",message) end function ClientAPI:addState(name, initialVal) self.clientSend("ADDP ",name.."="..initialVal) end function ClientAPI:updateState(name, val) self.clientSend("UPDP ",name.."="..val) end function ClientAPI:removeState(name) self.clientSend("REMP ",name) end ServerAPI = class(Console, function(c,rednetName, monitor) Console.init(c) -- must init base! rednet.open(rednetName) c.monitor = monitor end) function ServerAPI:__tostring() return 'ServerAPI' end function ServerAPI:listen() while true do local event, param1, param2, param3 = os.pullEvent() print("eventThrown:"..event) print(" with:"..tostring(param1)..","..tostring(param2)..","..tostring(param3)) if event == "rednet_message" then local senderId = param1 local message = param2 local distance = param3 local m = split(message, "%S+") if message:find("WhoIsHost") then rednet.send(senderId, os.getComputerLabel()) print("send:"..senderId..":"..os.getComputerLabel()) table.insert(self.clients, senderId) elseif message:find("LOG") then self.log(m[1], m[2]) elseif message:find("ADDP") then self.addState(m[1], m[2]) elseif message:find("UPDP") then self.updateState(m[1], m[2]) elseif message:find("REMP") then self.removeState(m[1]) end end end end function split(message, delim) local table ={] for i in string.gmatch(message, delim) do table.insert(table, i) end return table end function ServerAPI:log(level, message) self.monitor.log(level , message) end function ServerAPI:addState(name, initialVal) self.monitor.addState(name, initialVal) end function ServerAPI:updateState(name, val) self.monitor.updateState(name, val) end function ServerAPI:removeState(name) self.monitor.removeState(name) end Monitor = class(Console)
-- -- Created by IntelliJ IDEA. -- User: Roze -- Date: 2020-08-22 -- Time: 09:49 -- To change this template use File | Settings | File Templates. -- local dev = scriptInfo.network local logg = createLinkedList() print(logg) local maxLines = scriptInfo.screenHeight - 1 function prepareLogFor(msg, type, source) if scriptInfo.screen ~= nil or scriptInfo.rscreen ~= nil then local t = explode("\n", msg) local i = 0 for _,l in pairs(t) do i = i + 1 computer.skip() end print("Ensuring capacity for " .. tostring(i) .. " lines") while logg.length + i >= maxLines - 1 do logg.first:delete() end local file = filesystem.open("log.txt", "a") file:write("[" .. type .. "] " .. source .. ": " .. msg .. "\n") file:close() for _,l in pairs(t) do local item = { text = l, type = type, source = source, time = computer.time(), subline = false } if _ > 1 then item.subline = true end logg:push(item) computer.skip() end return t end end function initNetwork() networkHandler(101, function(self, address, parameters, parameterOffset) -- Initiate handler for port 100 local msg = parameters[parameterOffset] -- extract message identifier if msg and self.subhandlers[msg] then -- if msg is not nil and we have a subhandler for it local handler = self.subhandlers[msg] -- put subhandler into local variable for convenience handler(address, parameters, parameterOffset + 1) -- call subhandler elseif not msg then -- no handler or nil message print ("No message identifier defined") else print ("No handler for " .. parameters[parameterOffset]) end end, { -- table of message handlers error = function(address, parameters, po) -- subhandler for message postOrder local message = parameters[po] -- po, short for parameterOffset, index local message params from this prepareLogFor(message, "error", parameters[po + 1]) print ("Network error: " .. message) end,msg = function(address, parameters, po) -- subhandler for message postOrder local message = parameters[po] -- po, short for parameterOffset, index local message params from this prepareLogFor(message, "msg", parameters[po + 1]) print ("Network Message: " .. message) end,warning = function(address, parameters, po) -- subhandler for message postOrder local message = parameters[po] -- po, short for parameterOffset, index local message params from this prepareLogFor(message,"warning", parameters[po + 1]) print ("Network Alert: " .. message) end,debug = function(address, parameters, po) -- subhandler for message postOrder local message = parameters[po] -- po, short for parameterOffset, index local message params from this prepareLogFor(message, "debug", parameters[po + 1]) print ("Network Alert: " .. message) end }) end function getTimeString(time) --print(time) if not time then time = computer.time() end local day = math.floor(time / 86400) time = time % 86400 local hour = math.floor(time / 3600) time = time % 3600 local minute = math.floor(time / 60) time = time % 60 local second = math.floor(time) return string.format("%2d;%02d:%02d:%02.s", day, hour, minute, second) end local defaultAlpha = 1 function printScreen() if scriptInfo.gpu ~= nil then local gpu = scriptInfo.gpu local item = logg.first local x = 0 local y = 0 rsClear(gpu) gpu:setForeground(0.7, 0.7, 0.7, defaultAlpha) gpu:setText(x, y, "Global Event logg: "); y = y + 1 local lastX = 0 while item do local itemValue = item.value if itemValue.subline == false then x = 2 gpu:setForeground(0.3, 0.3, 0.7, defaultAlpha) gpu:setText(x, y, getTimeString(itemValue.time)) x = x + 13 if itemValue.source then gpu:setForeground(0.3, 0.3, 0.3, defaultAlpha) gpu:setText(x, y, itemValue.source .. ": "); x = x + string.len(itemValue.source) + 2 end itemValue.x = x lastX = x elseif itemValue.x == nil then itemValue.x = lastX end if itemValue.type == "error" then gpu:setForeground(1, 0.5, 0.5, defaultAlpha) elseif itemValue.type == "warning" then gpu:setForeground(1, 1, 0.5, defaultAlpha) elseif itemValue.type == "debug" then gpu:setForeground(0.5, 1, 0.8, defaultAlpha) else gpu:setForeground(0.7, 0.7, 0.7, defaultAlpha) end gpu:setText(itemValue.x, y, itemValue.text); y = y + 1 item = item.next end gpu:flush() end end rerror = function (msg) error(msg) end function main() local seldomCounter = 0 initNetwork() schedulePeriodicTask(PeriodicTask.new( function() printScreen() end, nil, 1000)) commonMain(1, 0.1) --while true do -- local timeout = 1 -- local result = {event.pull(timeout) } -- if result[1] then -- timeout = 0.1 -- else -- timeout = 1 -- end -- processEvent(result) -- if timeout == 1 or seldomCounter == 0 then -- printScreen() -- seldomCounter = 1000 -- else -- seldomCounter = seldomCounter - 1 -- end --end end
-- -- Please see the readme.txt file included with this distribution for -- attribution and copyright information. -- function onInit() ChatManager.registerEntryControl(self); end function onDeliverMessage(messagedata, mode) local icon = nil; if User.isHost() then gmid, isgm = GmIdentityManager.getCurrent(); if messagedata.hasdice then icon = "portrait_gm_token"; messagedata.sender = gmid; messagedata.font = "systemfont"; elseif mode == "chat" then icon = "portrait_gm_token"; messagedata.sender = gmid; if isgm then messagedata.font = "chatgmfont"; else messagedata.font = "chatnpcfont"; end elseif mode == "story" then messagedata.sender = ""; messagedata.font = "narratorfont"; elseif mode == "emote" then messagedata.text = gmid .. " " .. messagedata.text; messagedata.sender = ""; messagedata.font = "emotefont"; end elseif mode == "chat" then if User.getCurrentIdentity() then icon = "portrait_" .. User.getCurrentIdentity() .. "_chat"; end end if OptionsManager.isOption("PCHT", "on") then messagedata.icon = icon; end return messagedata; end function onTab() ChatManager.doAutocomplete(); end
--[[ Adaptive Token Stream is made as a file-reader that converts input to tokens in a streamed fashion. This tokenization process can be customized using custom regex-like patterns and therefore is expandable to many different user-defined tokens ]] local util = require("util") local dbg = require("debugger") local module = {} -- ========================================== -- -- INTERNAL: creates a new node of type -- -- ========================================== local function _make_node(stream, type, content) local n = {} n.content = content n.type = type n.line_pos = stream.line_pos n.line_nr = stream.line_nr n.line_txt = stream.line_txt:gsub("\r\n",""):gsub("\n","") n.file = stream.file return n end -- ========================================== -- -- INTERNAL: Tries to match pattern and moves stream forward if successful -- -- ========================================== local function _stream_try_pattern(stream, pat, typ, move_stream) line, match, len, offset = match_pattern(stream.line_unparsed, pat) if match == nil then return nil end node = _make_node(stream, typ, match) node.line_pos = (node.line_pos + offset) or 0 if move_stream ~= nil and move_stream then stream.line_pos = stream.line_pos + len stream.file_pos = stream.file_pos + len stream.line_unparsed = line end return node end -- Functions in stream local next, peek, consume, push, pop, has_next, eat_newline, eat_whitespace, close, add_token_match, next_unparsed_line -- ========================================== -- -- Create a new tokenstream from file -- -- ========================================== module.new = function(filename) -- stream object returned to the user -- it contains state information of the stream -- as well as functions to advance the stream local stream = { line_txt = "", -- Current line as a whole line_pos = 1, -- Where in the line are we currently, offset from beginning line_unparsed = "", -- Current line but contains only unparsed data line_nr = 1, -- Line number in the file file = filename, -- Location of the file file_pos = 0, -- Offset into the file where we currently are at file_txt = "", -- file_unparsed = "", -- states = {}, -- Internal state objects used for push/pop token_matches = {} } stream.filehandle = io.open(filename, "r") if stream.filehandle == nil then error("Couldn't read file "..filename) end stream.file_txt = stream.filehandle:read("*a") stream.file_unparsed = stream.file_txt stream.filehandle:close() stream.filehandle = nil stream.next = next stream.peek = peek stream.consume = consume stream.push = push stream.pop = pop stream.has_next = has_next stream.eat_newline = eat_newline stream.eat_whitespace = eat_whitespace stream.close = close stream.next_unparsed_line = next_unparsed_line stream.add_token_match = add_token_match return readonly(stream) end -- ========================================== -- -- Adds a pattern for a token -- -- ========================================== add_token_match = function(stream, pattern, token_type, matched_func) table.insert(stream.token_matches, {pattern = pattern, type = token_type, matched_callback = matched_func}) end -- ========================================== -- -- Returns wether there are tokens left to be parsed -- -- ========================================== has_next = function(stream) return stream:peek().type ~= "EOF" end next_unparsed_line = function(stream) local s,m,e = stream.file_unparsed:match("()[^\r\n]*()[\r\n]?()") local line = stream.file_unparsed:sub(s,m) if stream.file_unparsed == "" then line = nil end return line, e end -- ========================================== -- -- INTERNAL: Moves stream forward by 'n' and sets line_unparsed -- -- ========================================== local function _move_stream(stream, n, unparsed) stream.line_pos = stream.line_pos + n stream.file_pos = stream.file_pos + n stream.line_unparsed = unparsed end -- ========================================== -- -- INTERNAL: Shared parse method that doesn't move stream forward -- -- ========================================== local function _internal_parse(stream) assert(stream) local node if trim(stream.line_unparsed) == "" then local line, end_cursor = stream:next_unparsed_line() if line == nil then -- eof node = _make_node(stream, "EOF", "") else -- newline if stream.file_pos > 0 then node = _make_node(stream, "newline", "\n") stream.line_nr = stream.line_nr + 1 end _move_stream(stream, 1, line) stream.line_txt = line or "nil" stream.line_pos = 0 stream.file_unparsed = stream.file_unparsed:sub(end_cursor) stream.file_pos = stream.file_pos + end_cursor end end if node == nil then for k,v in pairs(stream.token_matches) do local a = _stream_try_pattern(stream, v.pattern, v.type, true) if a ~= nil then if v.matched_callback ~= nil then a = v.matched_callback(a) end return a end end end if node == nil then print("ERROR; No matching pattern found for '"..stream.line_unparsed.."'") --dbg() end return node end -- ========================================== -- -- Parse next token and move stream forward -- -- ========================================== next = function(stream) local n = _internal_parse(stream) return n end -- ========================================== -- -- Parse next token but leave stream where it's at -- -- ========================================== peek = function(stream) stream:push() local n = _internal_parse(stream) stream:pop() return n end -- ========================================== -- -- Returns true when given token matches current and moves stream forward, false otherwise -- -- ========================================== consume = function(stream, token) if stream:peek().type == token then stream:next() return true end return false end -- ========================================== -- -- Eats tokens until non-newline token is found -- -- ========================================== eat_newline = function(stream, include_whitespace) while stream:peek().type == "newline" or (include_whitespace and stream:peek().type == "whitespace" or not include_whitespace or include_whitespace == nil) do stream:next() end end eat_whitespace = function(stream) local tok = stream:peek().type while tok == "whitespace" or tok == "newline" do stream:next() tok = stream:peek().type end end -- ========================================== -- -- Push the stream state, used to revert stream back using pop -- -- ========================================== push = function(stream) local copy = {} for k,v in pairs(stream) do if type(v) ~= "function" then copy[k] = v end end table.insert(stream.states, copy) end -- ========================================== -- -- Pop the state stack and revert stream to that state -- -- ========================================== pop = function(stream) assert(#stream.states > 0) local state = stream.states[#stream.states] for k,v in pairs(state) do stream[k] = v end table.remove(stream.states) end -- ========================================== -- -- Closes filehandle for this stream, stream cannot be used after this -- -- ========================================== close = function(stream) --if stream.filehandle ~= nil then stream.filehandle:close(); stream.filehandle = nil end end return module
local async = require('hover.async') local M = {} local providers = {} M.providers = providers local id_cnt = 0 function M.register(provider) if not provider.execute or type(provider.execute) ~= 'function' then print(string.format('error: hover provider %s does not provide an execute function', provider.name or 'NA')) return end provider.execute = async.wrap(provider.execute, 1) provider.id = id_cnt id_cnt = id_cnt + 1 if provider.priority then for i, p in ipairs(providers) do if not p.priority or p.priority < provider.priority then table.insert(providers, i, provider) return end end end providers[#providers+1] = provider end return M
--[[LUA rules]] luarules = {} luarules['if']={beginstyle = {[SCE_LUA_WORD]=true}, indent = 1, unindent = {['else'] = 1,['elseif'] = 1}} luarules['else']={beginstyle = {[SCE_LUA_WORD]=true}, indent = 1, unindent = {['if'] = 1}} luarules['elseif']={beginstyle = {[SCE_LUA_WORD]=true}, indent = 1, unindent = {['if'] = 1}} luarules['while']={beginstyle = {[SCE_LUA_WORD]=true}, indent = 1, unindent = {}} luarules['for']={beginstyle = {[SCE_LUA_WORD]=true}, indent = 1, unindent = {}} luarules['function']={beginstyle = {[SCE_LUA_WORD]=true}, indent = 1, unindent = {}} luarules['end']={beginstyle = {[SCE_LUA_WORD]=true}, indent = 0, unindent = {['if'] = 1, ['function'] = 1, ['else'] = 1, ['elseif'] = 1, ['while'] = 1, ['for'] = 1}} luarules['until']={beginstyle = {[SCE_LUA_WORD]=true}, indent = 0, unindent = {['repeat'] = 1}} luarules['%(']={beginstyle = {[SCE_LUA_OPERATOR]=true}, indent = 1, unindent = {}} luarules['%)']={beginstyle = {[SCE_LUA_OPERATOR]=true}, indent = 0, unindent = {['%('] = 1}} luarules['{']={beginstyle = {[SCE_LUA_OPERATOR]=true}, indent = 1, unindent = {}} luarules['}']={beginstyle = {[SCE_LUA_OPERATOR]=true}, indent = 0, unindent = {['{'] = 1}} -- LUA styles luadecide = {} luadecide[SCE_LUA_DEFAULT]='lua' luadecide[SCE_LUA_COMMENT]='lua' luadecide[SCE_LUA_COMMENTLINE]='lua' luadecide[SCE_LUA_COMMENTDOC]='lua' luadecide[SCE_LUA_NUMBER]='lua' luadecide[SCE_LUA_WORD]='lua' luadecide[SCE_LUA_WORD2]='lua' luadecide[SCE_LUA_WORD3]='lua' luadecide[SCE_LUA_WORD4]='lua' luadecide[SCE_LUA_WORD5]='lua' luadecide[SCE_LUA_WORD6]='lua' luadecide[SCE_LUA_WORD7]='lua' luadecide[SCE_LUA_WORD8]='lua' luadecide[SCE_LUA_STRING]='lua' luadecide[SCE_LUA_CHARACTER]='lua' luadecide[SCE_LUA_LITERALSTRING]='lua' luadecide[SCE_LUA_PREPROCESSOR]='lua' luadecide[SCE_LUA_OPERATOR]='lua' luadecide[SCE_LUA_IDENTIFIER]='lua' luadecide[SCE_LUA_STRINGEOL]='lua' t_langdecide[SCLEX_LUA] = luadecide t_langrules['lua'] = luarules indent_init('lua')
----------------------------------------- -- ID: 4257 -- Papillion -- Adds butterfly wings to the user ----------------------------------------- function onItemCheck(target) return 0 end function onItemUse(target) end
local dropPopulation = {} --[[ { entity position itemName itemAmount itemWeight } ]] local indexInPickupRange local prompt local prompt_group RegisterNetEvent("FRP:INVENTORY:DROP:Create") AddEventHandler( "FRP:INVENTORY:DROP:Create", function(index, x, y, z, itemId, itemAmount) local itemName = ItemList[itemId].name or "Unknown Item" local itemWeight = ItemList[itemId].weight * itemAmount if itemId == "money" or itemId == "gold" then itemName = "" itemAmount = itemAmount / 100 if itemId == "money" then local c = "$" if itemAmount < 1.0 then c = "¢" itemAmount = string.format("%.0f", (itemAmount * 100)) end itemAmount = c .. itemAmount elseif itemId == "gold" then itemAmount = "G" .. itemAmount end else itemAmount = "x" .. itemAmount end dropPopulation[index] = { position = vec3(x, y, z), itemName = itemName, itemAmount = itemAmount, itemWorldModel = ItemList[itemId].worldModel, itemWeight = string.format("%.2f", itemWeight) } local inRange, distance = isCoordsInRenderRange(dropPopulation[index].position) if inRange then tryToCreateDroppedEntityForIndex(index) if distance <= 1.5 then indexInPickupRange = index end end end ) RegisterNetEvent("FRP:INVENTORY:DROP:Delete") AddEventHandler( "FRP:INVENTORY:DROP:Delete", function(index) deleteDroppedEntityForIndex(index) dropPopulation[index] = nil end ) Citizen.CreateThread( function() prepareMyPrompt() while true do Citizen.Wait(1000) local pedPosition = GetEntityCoords(PlayerPedId()) indexInPickupRange = nil for index, d in pairs(dropPopulation) do local inRange, distance = isCoordsInRenderRange(d.position, pedPosition) if inRange then tryToCreateDroppedEntityForIndex(index) if distance <= 1.5 then indexInPickupRange = index end else if d.entity ~= nil then deleteDroppedEntityForIndex(index) end end end end end ) Citizen.CreateThread( function() while true do Citizen.Wait(0) if indexInPickupRange ~= nil then local d = dropPopulation[indexInPickupRange] if d ~= nil and d.entity ~= nil then local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(d.entity)) if dist <= 1.2 then local itemName = d.itemName local itemAmount = d.itemAmount local itemWeight = d.itemWeight PromptSetActiveGroupThisFrame(prompt_group, CreateVarString(10, "LITERAL_STRING", itemAmount .. " " .. itemName .. " | " .. itemWeight .. "kg")) if PromptHasHoldModeCompleted(prompt) then PromptSetEnabled(prompt, false) Citizen.CreateThread( function() Citizen.Wait(1000) PromptSetEnabled(prompt, true) end ) TriggerServerEvent("FRP:INVENTORY:PickedUpDroppedItem", indexInPickupRange) end else indexInPickupRange = nil end else indexInPickupRange = nil end end end end ) function tryToCreateDroppedEntityForIndex(index, optional_pedPosition) local d = dropPopulation[index] if d == nil then return end if d.entity ~= nil then if DoesEntityExist(d.entity) then return end end local droppedI_Position = d.position -- local pedPosition = optional_pedPosition or GetEntityCoords(PlayerPedId()) -- if isCoordsInRenderRange(droppedI_Position) then local droppedI_worldModel = d.itemWorldModel or "p_cs_lootsack02x" local droppedI_worldModelHash = GetHashKey(droppedI_worldModel) if not HasModelLoaded(droppedI_worldModelHash) then RequestModel(droppedI_worldModelHash) while not HasModelLoaded(droppedI_worldModelHash) do Citizen.Wait(0) end end local entity = CreateObject(droppedI_worldModelHash, droppedI_Position, false, true, true) PlaceObjectOnGroundProperly(entity) SetEntityInvincible(entity, true) if droppedI_worldModel ~= "p_cs_lootsack02x" then Citizen.InvokeNative(0x7DFB49BCDB73089A, entity, true) end dropPopulation[index].entity = entity -- while GetEntityVelocity(entity, false) ~= vec3(0, 0, 0) do -- Citizen.Wait(0) -- end FreezeEntityPosition(entity, true) end function deleteDroppedEntityForIndex(index) local d = dropPopulation[index] if d == nil then return end if d.entity ~= nil then if DoesEntityExist(d.entity) then DeleteEntity(d.entity) d.entity = nil end end end function isCoordsInRenderRange(position, optional_pedPosition) local pedPosition = optional_pedPosition or GetEntityCoords(PlayerPedId()) local dist = #(pedPosition - position) if #(pedPosition - position) <= 50.0 then return true, dist end return false, dist end function prepareMyPrompt() prompt = PromptRegisterBegin() prompt_group = GetRandomIntInRange(0, 0xffffff) PromptSetControlAction(prompt, 0xE8342FF2) PromptSetText(prompt, CreateVarString(10, "LITERAL_STRING", "Pick Up")) PromptSetEnabled(prompt, true) PromptSetVisible(prompt, true) PromptSetHoldMode(prompt, true) PromptSetGroup(prompt, prompt_group) PromptRegisterEnd(prompt) end AddEventHandler( "onResourceStop", function(resourceName) if resourceName == GetCurrentResourceName() then for index, _ in pairs(dropPopulation) do deleteDroppedEntityForIndex(index) end PromptDelete(prompt) end end ) AddEventHandler( "onResourceStart", function(resourceName) if resourceName == GetCurrentResourceName() then TriggerServerEvent("FRP:INVENTORY:DROP:Request") end end )
----------------------------------------------------- ITEM.name = "Beacon - Yellow" ITEM.model = "models/Items/grenadeAmmo.mdl" ITEM.desc = "Can be used as a signal, or to illuminate areas." ITEM.throwent = "nut_beacon_y" ITEM.throwforce = 500 ITEM.flag = "v" ITEM.functions = {} ITEM.functions.Throw = { text = "Throw", tip = "Throws the item.", icon = "icon16/box.png", onRun = function(itemTable, client, data, entity) if (SERVER) then local grd = ents.Create( itemTable.throwent ) grd:SetPos( client:EyePos() + client:GetAimVector() * 50 ) grd:Spawn() grd:SetDTInt(0,2) function grd:Payload() RequestAirSupport( self:GetPos() + Vector( 0, 0, 50 ) ) end local phys = grd:GetPhysicsObject() phys:SetVelocity( client:GetAimVector() * itemTable.throwforce * math.Rand( .8, 1 ) ) phys:AddAngleVelocity( client:GetAimVector() * itemTable.throwforce ) return true end end, }
bootloader={} Script.ReloadScript("Scripts/bootloader_utils.lua") function bootloader:load_file(filename) bootloader:logVerbose("Loading %s", tostring(filename)) local chunk, err = loadfile(filename) if not err then if pcall(function() chunk() end) then bootloader:logVerbose("Loaded %s successfully", tostring(filename)) else bootloader:logWarning("Some erros occured while loading %s", tostring(filename)) end else bootloader:logError("Failed to load %s", tostring(filename)) end end function bootloader:load_mods() bootloader:logDebug("Reading configuration file") local file = io.open('mods\\KCD_Bootloader\\config.txt', "r"); if file == nil then return false end; while true do local filename = file:read("*line") if filename then print(filename) bootloader:load_file(filename) else break end end file:close(); bootloader:logDebug("Configuration file loaded") return true; end function bootloader:get_command() local file = io.open('mods\\KCD_Bootloader\\invoke_command.txt', "rb"); if file == nil then return false end; local command = file:read("*all"); file:close(); return command; end function bootloader:execute_command(command) local func = assert(loadstring(command)); func(); end function bootloader:execute_commands() local success, command = pcall(function() return bootloader:get_command() end) if not success then bootloader:logError("Failed to load command!") else if command ~= "" then success, message = pcall(function(cmd) return bootloader:execute_command(command) end); bootloader:logDebug("Command executed") if not success then bootloader:logError("Command execution failed!") bootloader:command_log("[FAILED] " .. tostring(message)); else bootloader:logDebug("Command execution succeeeded.") bootloader:command_log("[SUCCESS] " .. tostring(command)); end end end end function bootloader:clear_commands() local file = io.open('mods\\KCD_Bootloader\\invoke_command.txt', "w"); if file == nil then return end; file:write(""); file:close(); end function bootloader:command_log(message) local logfile = io.open('mods\\KCD_Bootloader\\command_log.txt', "a"); if logfile == nil then return {} end; logfile:write(message .. "\n"); logfile:close(); end function bootloader:timerCallback(nTimerId) bootloader:execute_commands() bootloader:clear_commands() Script.SetTimer(500, function(nTimerId) bootloader:timerCallback(nTimerId) end) end function bootloader:uiActionListener(actionName, eventName, argTable) if actionName == "sys_loadingimagescreen" and eventName == "OnEnd" then bootloader:timerCallback(0) end end UIAction.RegisterActionListener(bootloader, "", "", "uiActionListener") -- function bootloader:uiEventSystemListener(actionName, eventName, argTable) -- bootloader:timerCallback(0) -- end -- UIAction.RegisterEventSystemListener(bootloader, "", "", "uiEventSystemListener") -- bootloader:load_mods() bootloader:logInfo("KCD Bootloader initialized")
local _, playerClass = UnitClass("player") if playerClass ~= "ROGUE" and playerClass ~= "WARRIOR" and playerClass ~= "HUNTER" and playerClass ~= "DRUID" and playerClass ~= "PALADIN" and playerClass ~= "SHAMAN" and playerClass ~= "DEATHKNIGHT" and playerClass ~= "MONK" then return end local playerHybrid = (playerClass == "DRUID") or (playerClass == "PALADIN") or (playerClass == "SHAMAN") or (playerClass == "DEATHKNIGHT") or (playerClass == "MONK") --Libraries DrDamage = DrDamage or LibStub("AceAddon-3.0"):NewAddon("DrDamage","AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0", "AceBucket-3.0", "AceTimer-3.0") local L = LibStub("AceLocale-3.0"):GetLocale("DrDamage", true) local GT = LibStub:GetLibrary("LibGratuity-3.0") local DrDamage = DrDamage --General local settings local type = type local next = next local pairs = pairs local tonumber = tonumber local math_abs = math.abs local math_floor = math.floor local math_ceil = math.ceil local math_min = math.min local math_max = math.max local math_modf = math.modf local string_match = string.match local string_sub = string.sub local string_gsub = string.gsub local select = select --Module local GetSpellInfo = GetSpellInfo local GetSpecialization = GetSpecialization local GetCritChance = GetCritChance local GetRangedCritChance = GetRangedCritChance local GetCombatRating = GetCombatRating local GetCombatRatingBonus = GetCombatRatingBonus local GetItemInfo = GetItemInfo local GetInventoryItemLink = GetInventoryItemLink local GetComboPoints = GetComboPoints local GetExpertise = GetExpertise local GetHitModifier = GetHitModifier local GetSpellBonusDamage = GetSpellBonusDamage local GetSpellCritChance = GetSpellCritChance local GetAttackPowerForStat = GetAttackPowerForStat local UnitRangedDamage = UnitRangedDamage local UnitRangedAttack = UnitRangedAttack local UnitRangedAttackPower = UnitRangedAttackPower local UnitDamage = UnitDamage local UnitAttackSpeed = UnitAttackSpeed local UnitAttackPower = UnitAttackPower local UnitIsPlayer = UnitIsPlayer local UnitIsFriend = UnitIsFriend local UnitBuff = UnitBuff local UnitDebuff = UnitDebuff local UnitName = UnitName local UnitLevel = UnitLevel local UnitGUID = UnitGUID local UnitStat = UnitStat local UnitCreatureType = UnitCreatureType local OffhandHasWeapon = OffhandHasWeapon --Module variables local DrD_ClearTable, DrD_Round, DrD_DmgCalc, DrD_BuffCalc local spellInfo, Calculation, PlayerAura, TargetAura, Consumables function DrDamage:Melee_OnEnable() local ABOptions = self.options.args.General.args.Actionbar.args if settings.DisplayType_M then if not ABOptions.DisplayType_M.values[settings.DisplayType_M] then settings.DisplayType_M = "AvgTotal" end end if settings.DisplayType_M2 then if not ABOptions.DisplayType_M2.values[settings.DisplayType_M2] then settings.DisplayType_M2 = false end end self:Melee_InventoryChanged(true, true, true) if not self:GetWeaponType() then self:ScheduleTimer(function() self:Melee_InventoryChanged(true, true, true); self:UpdateAB() end, 10) end self.spellInfo[GetSpellInfo(6603)] = { ["Name"] = "Attack", ["ID"] = 6603, [0] = { AutoAttack = true, Melee = true, WeaponDamage = 1, NoNormalization = true, MeleeHaste = true }, [1] = { 0 }, } self:Melee_CheckBaseStats() DrD_ClearTable = self.ClearTable DrD_Round = self.Round DrD_BuffCalc = self.BuffCalc spellInfo = self.spellInfo PlayerAura = self.PlayerAura TargetAura = self.TargetAura Consumables = self.Consumables Calculation = self.Calculation end function DrDamage:Melee_RefreshConfig() settings = self.db.profile end local oldValues = 0 function DrDamage:Melee_CheckBaseStats() local newValues = --Melee hit rating GetCombatRating(6) + self:GetAP() + self:GetRAP() + GetCritChance() + GetRangedCritChance() + GetHitModifier() + UnitAttackSpeed("player") + UnitDamage("player") + select(3,UnitDamage("player")) + UnitRangedDamage("player") + select(2,UnitRangedDamage("player")) + GetExpertise() if newValues ~= oldValues then oldValues = newValues return true end return false end local mhType, ohType--, rgType function DrDamage:GetWeaponType() return mhType, ohType--, rgType end --local mhMin, mhMax, ohMin, ohMax, rgMin, rgMax = 0, 0, 0, 0, 0, 0 --local rgSpeed = 2.8 local mhMin, mhMax, ohMin, ohMax= 0, 0, 0, 0 local mhSpeed, ohSpeed = 2.4, 2.4 function DrDamage:Melee_InventoryChanged(mhslot, ohslot)--, rangedslot) if mhslot then local mh = GetInventoryItemLink("player", 16) if mh and GT:SetInventoryItem("player", 16) then for i = 3, GT:NumLines() do local line = GT:GetLine(i,true) line = line and string_match(line,"%d.%d+") if line then mhSpeed = tonumber((string_gsub(line,",","%."))) mhMin, mhMax = string_match(GT:GetLine(i), "(%d+)[^%d]+(%d+)") mhMin = tonumber(mhMin) or 0 mhMax = tonumber(mhMax) or 0 break end end mhType = select(7,GetItemInfo(mh)) else mhType = nil mhMin, mhMax = 0, 0 mhSpeed = UnitAttackSpeed("player") end end if ohslot then local oh = GetInventoryItemLink("player", 17) if oh and GT:SetInventoryItem("player", 17) then for i = 3, GT:NumLines() do local line = GT:GetLine(i,true) line = line and string_match(line,"%d.%d+") if line then ohSpeed = tonumber((string_gsub(line,",","%."))) ohMin, ohMax = string_match(GT:GetLine(i), "(%d+)[^%d]+(%d+)") ohMin = tonumber(ohMin) or 0 ohMax = tonumber(ohMax) or 0 break end end ohType = select(7,GetItemInfo(oh)) else ohType = nil ohSpeed = 2.4 end end --[[ if rangedslot then local ranged = GetInventoryItemLink("player", 18) if ranged and GT:SetInventoryItem("player", 18) then for i = 3, GT:NumLines() do local line = GT:GetLine(i,true) line = line and string_match(line,"%d.%d+") if line then rgSpeed = tonumber((string_gsub(line,",","%."))) rgMin, rgMax = string_match(GT:GetLine(i), "(%d+)[^%d]+(%d+)") rgMin = tonumber(rgMin) or 0 rgMax = tonumber(rgMax) or 0 break end end rgType = select(7,GetItemInfo(ranged)) else rgType = nil rgMin, rgMax = 0, 0 rgSpeed = UnitRangedDamage("player") end end --]] end function DrDamage:GetMainhandBase() return mhMin, mhMax end function DrDamage:GetOffhandBase() return ohMin, ohMax end --[[ function DrDamage:GetRangedBase() return rgMin, rgMax end --]] function DrDamage:GetWeaponSpeed() return mhSpeed, ohSpeed--, rgSpeed end function DrDamage:GetRAP() local baseAP, posBuff, negBuff = UnitRangedAttackPower("player") return baseAP + posBuff + negBuff end local normalizationTable = { --[[ "Daggers" "One-Handed Axes" "One-Handed Maces" "One-Handed Swords" "Fist Weapons" "Two-Handed Axes" "Two-Handed Maces" "Two-Handed Swords" "Polearms" "Staves" "Fishing Poles" --]] [GetSpellInfo(1180)] = 1.7, [GetSpellInfo(196)] = 2.4, [GetSpellInfo(198)] = 2.4, [GetSpellInfo(201)] = 2.4, [GetSpellInfo(15590)] = 2.4, [GetSpellInfo(197)] = 3.3, [GetSpellInfo(199)] = 3.3, [GetSpellInfo(202)] = 3.3, [GetSpellInfo(200)] = 3.3, [GetSpellInfo(227)] = 3.3, [GetSpellInfo(7738)] = 3.3, } function DrDamage:GetNormM() return mhType and normalizationTable[mhType] or 2, ohType and normalizationTable[ohType] or 2 end function DrDamage:WeaponDamage(calculation, wspd) local min, max, omin, omax, mod local normM, normM_O, bonus, obonus, baseAP if calculation.ranged then _, min, max, _, _, mod = UnitRangedDamage("player") normM = wspd and spd or 2.8 baseAP = self:GetRAP() else min, max, omin, omax, _, _, mod = UnitDamage("player") baseAP = self:GetAP() if wspd or calculation.requiresForm then normM = mhSpeed normM_O = ohSpeed else normM, normM_O = self:GetNormM() end end --Main-hand calculation local mainhand = (normM / 14) * calculation.AP - (mhSpeed / 14) * baseAP bonus = normM / 14 mod = calculation.wDmgM * mod --This is used to divide out possible bonuses included in the range returned by the API. min = min/mod + mainhand max = max/mod + mainhand --Off-hand calculation if calculation.offHand then local offhand = ((normM_O /14) * calculation.AP - (ohSpeed / 14) * baseAP) * calculation.offHdmgM obonus = normM_O / 14 omin = omin/mod + offhand omax = omax/mod + offhand end return min, max, omin, omax, bonus, obonus end --Static values local baseSpiM = (select(2,UnitRace("player")) == "Human") and 1.03 or 1 local troll = (select(2,UnitRace("player")) == "Troll") --Static tables local powerTypes = { [0] = L["DPM"], [1] = L["DPR"], [2] = L["DPF"], [3] = L["DPE"], [6] = L["DPRP"] } local powerTypeNames = { [0] = L["Mana"], [1] = L["Rage"], [2] = L["Focus"], [3] = L["Energy"], [6] = L["Runic Power"] } local schoolTable = { ["Holy"] = 2, ["Fire"] = 3, ["Nature"] = 4, ["Frost"] = 5, ["Shadow"] = 6, ["Arcane"] = 7 } local mobArmor = { --Death Knight dummies --Initiate's Training Dummy (level 55) [32545] = 3230, --Disciple's Training Dummy (level 65) [32542] = 5210, --Veteran's Training Dummy (level 75) [32543] = 8250, --Ebon Knight's Training Dummy (level 80) [32546] = 9730, --Training Dummy (level 60) [39424] = 3750, --Training Dummy (level 70) [39680] = 6710, --Training Dummy (level 80) [43008] = 9690, --Training Dummy (level 85) --TODO: verify [14080] = 11100, } --Temporary tables local calculation = {} local ActiveAuras = {} local playerAuraTable = {} local targetAuraTable = {} local Talents = {} local CalculationResults = {} function DrDamage:MeleeCalc( name, rank, tooltip, modify, debug ) if not spellInfo or not name then return end local spellTable = spellInfo[name] if not spellTable then return end local baseSpell = spellTable[0] if type(baseSpell) == "function" then baseSpell, spellTable = baseSpell(rank) if not (baseSpell and spellTable) then return end end if not rank then rank = 1 else rank = tonumber(string_match(rank,"%d+")) or 1 end local spell = spellTable[rank] if not spell then return end local spellName = spellTable["Name"] local spellID = spellTable["ID"] local spellTalents = spellTable["Talents"] local spellPlayerAura = spellTable["PlayerAura"] local spellTargetAura = spellTable["TargetAura"] local spellConsumables = spellTable["Consumables"] local textLeft = spellTable["Text1"] local textRight = spellTable["Text2"] DrD_ClearTable( calculation ) calculation.melee = true calculation.name = name calculation.spellName = spellName calculation.tooltipName = textLeft calculation.tooltipName2 = textRight calculation.offHdmgM = 0.5 calculation.bDmgM = 1 calculation.bDmgM_O = 1 calculation.wDmgM = 1 calculation.dmgM_Add = 0 calculation.dmgM_dd_Add = 0 calculation.dmgM_dd = 1 calculation.dmgM_Extra = 1 calculation.dmgM_Extra_Add = 0 calculation.dmgM_Magic = 1 calculation.dmgM_Physical = 1 calculation.mitigation = 1 calculation.bleedBonus = 1 calculation.finalMod = 0 calculation.NoCrits = baseSpell.NoCrits calculation.eDuration = baseSpell.eDuration or 0 --calculation.castTime = baseSpell.castTime or 0 calculation.WeaponDamage = baseSpell.WeaponDamage calculation.DualAttack = baseSpell.DualAttack and 1 calculation.cooldown = baseSpell.Cooldown or 0 calculation.requiresForm = baseSpell.requiresForm calculation.hits = baseSpell.Hits calculation.aoe = baseSpell.AoE calculation.targets = settings.TargetAmount calculation.E_eDuration = baseSpell.E_eDuration calculation.E_canCrit = baseSpell.E_canCrit calculation.extra = spell.Extra or 0 calculation.extraDamage = baseSpell.APBonus_extra calculation.extraDamageSP = baseSpell.SPBonus_extra calculation.extraChance = 1 calculation.extraChance_O = 1 calculation.expertise, calculation.expertise_O = GetExpertise() calculation.spd, calculation.ospd = UnitAttackSpeed("player") calculation.rspd = UnitRangedDamage("player") calculation.str = 0 calculation.strM = 1 --calculation.strM_Add = 0 calculation.agi = 0 calculation.agiM = 1 --calculation.agiM_Add = 0 calculation.int = 0 calculation.intM = 1 --calculation.intM_Add = 0 calculation.spi = 0 calculation.spiM = baseSpiM --calculation.spiM_Add = 0 calculation.freeCrit = 0 calculation.hitPerc = 0 calculation.spellCrit = 0 calculation.spellHit = 0 calculation.meleeCrit = 0 calculation.meleeHit = 0 calculation.armorM = 0 calculation.APBonus = baseSpell.APBonus or 0 calculation.SPBonus = baseSpell.SPBonus or 0 calculation.APM = 1 calculation.SPM = 1 calculation.AP_mod = 0 calculation.SP_mod = 0 calculation.SP = GetSpellBonusDamage(baseSpell.SP or 2) calculation.actionCost = select(4,GetSpellInfo(baseSpell.SpellCost or spellID or name)) or 0 calculation.baseCost = calculation.actionCost calculation.powerType = select(6,GetSpellInfo(spellID or name)) or 4 calculation.spec = GetSpecialization() --@debug@ calculation.spec = debug or GetSpecialization() --@end-debug@ --Determine levels used to calculate local playerLevel, targetLevel, boss = self:GetLevels() if settings.TargetLevel > 0 then targetLevel = playerLevel + settings.TargetLevel end calculation.playerLevel = playerLevel calculation.targetLevel = targetLevel if settings.ComboPoints == 0 then calculation.Melee_ComboPoints = GetComboPoints("player") else calculation.Melee_ComboPoints = settings.ComboPoints end if type( baseSpell.School ) == "table" then calculation.school = baseSpell.School[1] calculation.group = baseSpell.School[2] calculation.subType = baseSpell.School[3] else calculation.school = baseSpell.School or "Physical" end if calculation.group == "Ranged" then calculation.ranged = true calculation.AP = self:GetRAP() calculation.critPerc = GetRangedCritChance() calculation.critM = 1 --(baseSpell.SpellCrit or baseSpell.SpellCritM) and 1 or 1 calculation.dmgM = baseSpell.NoGlobalMod and 1 or select(6,UnitRangedDamage("player")) calculation.haste = 1 + (GetCombatRatingBonus(19)/100) calculation.hasteRating = GetCombatRating(19) else calculation.ranged = false calculation.AP = self:GetAP() calculation.critPerc = baseSpell.SpellCrit and GetSpellCritChance(schoolTable[baseSpell.SpellCrit] or 1) or GetCritChance() calculation.critM = 1 --(baseSpell.SpellCrit or baseSpell.SpellCritM) and 1 or 1 calculation.dmgM = baseSpell.NoGlobalMod and 1 or select(7,UnitDamage("player")) calculation.haste = 1 + (GetCombatRatingBonus(18)/100) calculation.hasteRating = GetCombatRating(18) calculation.offHand = OffhandHasWeapon() and (baseSpell.AutoAttack or baseSpell.DualAttack or baseSpell.OffhandAttack) end if troll and not UnitIsFriend("player","target") and not baseSpell.NoGlobalMod then local creature = UnitCreatureType("target") if creature and creature == L["Beast"] then calculation.dmgM = calculation.dmgM * 1.05 end end --Checks calculation.physical = (calculation.school == "Physical") calculation.unarmed = (calculation.school == "Physical" and not calculation.ranged) and not mhType or baseSpell.requiresForm if baseSpell.Weapon and baseSpell.Weapon ~= mhType or baseSpell.Offhand and baseSpell.Offhand ~= ohType or baseSpell.OffhandAttack and not ohType or calculation.ranged and not mhType or calculation.unarmed and not baseSpell.AutoAttack and not baseSpell.NoWeapon and not baseSpell.requiresForm then calculation.zero = true end calculation.spd = calculation.spd * calculation.haste calculation.ospd = calculation.ospd and calculation.ospd * calculation.haste calculation.rspd = calculation.rspd and calculation.rspd * calculation.haste if baseSpell.SpellHit then calculation.hit = self:GetSpellHit(playerLevel, targetLevel) else calculation.hit, calculation.hitO = self:GetMeleeHit(playerLevel, targetLevel, calculation.ranged) end --CORE: CRIT DEPRESSION, GLANCING BLOWS, DODGE, PARRY if settings.TargetLevel > 0 or not UnitIsPlayer("target") then local deltaLevel = targetLevel - playerLevel calculation.critDepression = boss and 3 or (deltaLevel > 0) and deltaLevel if not baseSpell.Unavoidable and (not baseSpell.SpellHit or baseSpell.Avoidable) then if boss then calculation.dodge = 7.5 - (calculation.dodgeMod or 0) calculation.parry = 7.5 - (calculation.parryMod or 0) elseif deltaLevel >= 0 then --Dodge chance: 0 = 3%, +1 = 4.5%, +2 = 6%, +3 = 7.5% --Parry chance: 0 = 3%, +1 = 4.5%, +2 = 6%, +3 = 7.5% calculation.dodge = 3 + (deltaLevel * 1.5) - (calculation.dodgeMod or 0) calculation.parry = 3 + (deltaLevel * 1.5) - (calculation.parryMod or 0) end if baseSpell.AutoAttack or baseSpell.Glancing then if boss then calculation.glancing = 24 calculation.glancingM = 0.75 elseif deltaLevel >= 0 then calculation.glancing = (deltaLevel + 1) * 6 calculation.glancingM = 1 - (deltaLevel + 1) * 0.0625 end end if baseSpell.NoParry or calculation.ranged then calculation.parry = nil end if calculation.NoDodge then calculation.dodge = nil end end end --CORE: Manual variables from profile: if settings.Custom then if settings.CustomAdd then calculation.str = settings.Str calculation.agi = settings.Agi calculation.int = settings.Int calculation.spi = settings.Spi calculation.SP_mod = settings.SP calculation.AP_mod = settings.AP else --Do not allow stats below 0 calculation.str = math_max(0, settings.Str) calculation.agi = math_max(0, settings.Agi) calculation.int = math_max(0, settings.Int) calculation.spi = math_max(0, settings.Spi) calculation.customStats = true --Attack Power (Agility/Strength) --[[ if calculation.ranged then calculation.AP = calculation.AP - UnitStat("player",2) * self:GetAgiToRAP() calculation.AP_mod = math_max(0, settings.AP) else local strToAP = GetAttackPowerForStat(1,UnitStat("player",1)) local agiToAP = GetAttackPowerForStat(2,UnitStat("player",2)) calculation.AP = calculation.AP - strToAP - agiToAP calculation.AP_mod = math_max(0, settings.AP) end --]] calculation.AP = 0 calculation.AP_mod = math_max(0, settings.AP) --Crit chance (Agility/Intellect) if baseSpell.SpellCrit then calculation.critPerc = calculation.critPerc - self:GetCritChanceFromIntellect() else calculation.critPerc = calculation.critPerc - self:GetCritChanceFromAgility() end --Spell Power (Intellect) calculation.SP = 0 --calculation.SP - math_max(0,UnitStat("player",4)-10) calculation.SP_mod = math_max(0, settings.SP) --Ratings calculation.expertise = 0 calculation.expertise_O = 0 calculation.haste = 1 --calculation.haste - GetCombatRatingBonus(calculation.ranged and 19 or 18)/100 calculation.hasteRating = 0 --calculation.hasteRating - GetCombatRating(calculation.ranged and 19 or 18) calculation.critPerc = calculation.critPerc - GetCombatRatingBonus((baseSpell.SpellCrit and 11 or 9)) calculation.hitPerc = calculation.hitPerc - GetCombatRatingBonus((baseSpell.SpellHit and 8 or 6)) end calculation.expertise = math_max(0, calculation.expertise + self:GetRating("Expertise", settings.ExpertiseRating, true)) calculation.expertise_O = math_max(0, (calculation.expertise_O or 0) + self:GetRating("Expertise", settings.ExpertiseRating, true)) calculation.haste = math_max(1,(calculation.haste + 0.01 * self:GetRating("Haste", settings.HasteRating, true))) calculation.hasteRating = math_max(0, calculation.hasteRating + settings.HasteRating) calculation.spellHit = self:GetRating("Hit", settings.HitRating, true) calculation.meleeHit = calculation.spellHit calculation.spellCrit = self:GetRating("Crit", settings.CritRating, true) calculation.meleeCrit = calculation.meleeCrit end calculation.minDam = spell[1] calculation.maxDam = (spell[2] or spell[1]) --TALENTS for i=1,#spellTalents do local talentValue = spellTalents[i] local modType = spellTalents["ModType" .. i] if calculation[modType] then if spellTalents["Multiply" .. i] then calculation[modType] = calculation[modType] * (1 + talentValue) else calculation[modType] = calculation[modType] + talentValue end elseif self.Calculation[modType] then self.Calculation[modType](calculation, talentValue, Talents, baseSpell, spell) else Talents[modType] = talentValue end end --BUFF/DEBUFF CALCULATION for index=1,40 do local buffName, rank, texture, apps = UnitBuff("player",index) if buffName then if spellPlayerAura[buffName] then DrD_BuffCalc( PlayerAura[buffName], calculation, ActiveAuras, Talents, baseSpell, buffName, index, apps, texture, rank, "player" ) playerAuraTable[buffName] = true end else break end end for index=1,40 do local buffName, rank, texture, apps = UnitDebuff("player",index) if buffName then if spellPlayerAura[buffName] then DrD_BuffCalc( PlayerAura[buffName], calculation, ActiveAuras, Talents, baseSpell, buffName, index, apps, texture, rank, "player" ) playerAuraTable[buffName] = true end else break end end for index=1,40 do local buffName, rank, texture, apps = UnitDebuff("target",index) if buffName then if spellTargetAura[buffName] then DrD_BuffCalc( TargetAura[buffName], calculation, ActiveAuras, Talents, baseSpell, buffName, index, apps, texture, rank, "target" ) targetAuraTable[buffName] = true end else break end end if next(settings["PlayerAura"]) or debug then for buffName in pairs(debug and spellPlayerAura or settings["PlayerAura"]) do if spellPlayerAura[buffName] and not playerAuraTable[buffName] then DrD_BuffCalc( PlayerAura[buffName], calculation, ActiveAuras, Talents, baseSpell, buffName ) end end end if next(settings["TargetAura"]) or debug then for buffName in pairs(debug and spellTargetAura or settings["TargetAura"]) do if spellTargetAura[buffName] and not targetAuraTable[buffName] then DrD_BuffCalc( TargetAura[buffName], calculation, ActiveAuras, Talents, baseSpell, buffName ) end end end if next(settings["Consumables"]) or debug then for buffName in pairs(debug and spellConsumables or settings["Consumables"]) do if spellConsumables[buffName] then local aura = Consumables[buffName] if not UnitBuff("player", (aura.Alt or buffName)) then DrD_BuffCalc( aura, calculation, ActiveAuras, Talents, baseSpell, buffName ) end end end end --CORE: Sum up crit and hit if baseSpell.SpellCrit then calculation.critPerc = calculation.critPerc + calculation.spellCrit else calculation.critPerc = calculation.critPerc + calculation.meleeCrit end if baseSpell.SpellHit then calculation.hitPerc = calculation.hitPerc + calculation.spellHit else calculation.hitPerc = calculation.hitPerc + calculation.meleeHit end --Store global modifier calculation.dmgM_global = calculation.dmgM --Add magic damage buffs if schoolTable[calculation.school] then calculation.dmgM = calculation.dmgM * calculation.dmgM_Magic if not baseSpell.NoGlobalMod then calculation.dmgM = calculation.dmgM / calculation.dmgM_Physical end end --ADD CLASS SPECIFIC MODS if Calculation[playerClass] then Calculation[playerClass]( calculation, ActiveAuras, Talents, spell, baseSpell ) end if Calculation[spellName] then Calculation[spellName]( calculation, ActiveAuras, Talents, spell, baseSpell ) end --Calculate haste modifiers calculation.spd = calculation.spd / calculation.haste calculation.ospd = calculation.ospd and calculation.ospd / calculation.haste calculation.rspd = calculation.rspd and calculation.rspd / calculation.haste --CRIT MODIFIER CALCULATION (NEEDS TO BE DONE AFTER TALENTS) local baseCrit = 1 --(baseSpell.SpellCrit or baseSpell.SpellCritM) and 1 or 1 local metaGem = (1 + baseCrit) * self.Damage_critMBonus * (1 + (calculation.critM - baseCrit) / baseCrit) calculation.critM = calculation.critM + metaGem --CORE: ARMOR if settings.ArmorCalc ~= "None" and (calculation.physical and not baseSpell.eDuration and not baseSpell.Bleed or baseSpell.Armor) and not baseSpell.NoArmor then local armor = 0 if boss and (settings.ArmorCalc == "Auto") or (settings.ArmorCalc == "Boss") then armor = 24835 elseif settings.ArmorCalc == "Auto" then --/print tonumber(string.sub(UnitGUID("target"),9,12),16) local GUID = not UnitIsPlayer("target") and UnitGUID("target") local targetID = GUID and tonumber(string_sub(GUID,9,12),16) armor = targetID and mobArmor[targetID] or (settings.Armor > 0) and settings.Armor or (settings.ArmorMitigation > 0) and self:GetArmor(settings.ArmorMitigation) elseif settings.ArmorCalc == "Manual" then armor = (settings.Armor > 0) and settings.Armor or (settings.ArmorMitigation > 0) and self:GetArmor(settings.ArmorMitigation) end if armor then calculation.armorM = math_min(1, calculation.armorM) --Apply armor debuffs (eg. Sunder Armor) armor = armor * (1 - calculation.armorM) -- + calculation.armorMod calculation.armorIgnore = calculation.armorM calculation.armor = armor calculation.mitigation = 1 - DrDamage:GetMitigation(calculation.armor) end end --CORE: Save damage modifier for tooltip display before mitigation modifiers calculation.dmgM_Display = calculation.dmgM * calculation.dmgM_dd * (1 + calculation.dmgM_Add + calculation.dmgM_dd_Add) * (baseSpell.Bleed and calculation.bleedBonus or 1) --CORE: RESILIENCE if settings.Resilience > 0 then calculation.dmgM = calculation.dmgM * math_min(1, 0.99 ^ (settings.Resilience / self:GetRating("PVPResilience")) - 0.4) if calculation.E_dmgM then calculation.E_dmgM = calculation.E_dmgM * math_min(1, 0.99 ^ (settings.Resilience / self:GetRating("PVPResilience"))- 0.4) end if calculation.extraWeaponDamage_dmgM then calculation.extraWeaponDamage_dmgM = calculation.extraWeaponDamage_dmgM * math_min(1, 0.99 ^ (settings.Resilience / self:GetRating("PVPResilience"))- 0.4) end end --AND NOW CALCULATE local avgTotal = DrD_DmgCalc( baseSpell, spell, false, false, tooltip ) if tooltip and not calculation.zero and not baseSpell.NoNext then if settings.Next or settings.CompareStats or settings.CompareStr or settings.CompareAgi or settings.CompareInt or settings.CompareAP or settings.CompareCrit or settings.CompareHit or settings.CompareExp then local avgTotal = DrD_DmgCalc( baseSpell, spell, true ) CalculationResults.Stats = avgTotal if calculation.APBonus > 0 or calculation.WeaponDamage then calculation.AP_mod = calculation.AP_mod + 10 CalculationResults.NextAP = DrD_DmgCalc( baseSpell, spell, true ) - avgTotal calculation.AP_mod = calculation.AP_mod - 10 end if calculation.SPBonus > 0 then calculation.int = calculation.int + 10 CalculationResults.NextInt = DrD_DmgCalc( baseSpell, spell, true ) - avgTotal calculation.int = calculation.int - 10 end calculation.agi = calculation.agi + 10 CalculationResults.NextAgi = DrD_DmgCalc( baseSpell, spell, true ) - avgTotal calculation.agi = calculation.agi - 10 if not calculation.ranged and GetAttackPowerForStat(1,100) > 0 then calculation.str = calculation.str + 10 CalculationResults.NextStr = DrD_DmgCalc( baseSpell, spell, true ) - avgTotal calculation.str = calculation.str - 10 end if not baseSpell.Unresistable then if calculation.dodge or calculation.parry then calculation.expertise = calculation.expertise + 1 CalculationResults.NextExp = DrD_DmgCalc( baseSpell, spell, true ) - avgTotal calculation.expertise = calculation.expertise - 1 end local temp = settings.HitCalc and avgTotal or DrD_DmgCalc( baseSpell, spell, true, true ) calculation.hitPerc = calculation.hitPerc + 1 CalculationResults.NextHit = DrD_DmgCalc( baseSpell, spell, true, true ) - temp calculation.hitPerc = calculation.hitPerc - 1 end if not calculation.NoCrits then calculation.critPerc = calculation.critPerc + 1 if calculation.E_critPerc then calculation.E_critPerc = calculation.E_critPerc + 1 end if calculation.E_critPerc_O then calculation.E_critPerc_O = calculation.E_critPerc_O + 1 end if calculation.extra_critPerc then calculation.extra_critPerc = calculation.extra_critPerc + 1 end CalculationResults.NextCrit = DrD_DmgCalc( baseSpell, spell, true ) - avgTotal end end end DrD_ClearTable( Talents ) DrD_ClearTable( ActiveAuras ) DrD_ClearTable( playerAuraTable ) DrD_ClearTable( targetAuraTable ) return settings.DisplayType_M and CalculationResults[settings.DisplayType_M], settings.DisplayType_M2 and CalculationResults[settings.DisplayType_M2], CalculationResults, calculation, debug and ActiveAuras end DrD_DmgCalc = function( baseSpell, spell, nextCalc, hitCalc, tooltip ) --CORE: Adjust stats local statCalc if calculation.str ~= 0 or calculation.str_mod then calculation.str = (calculation.str_mod or 0) + calculation.str * calculation.strM --* (1 + calculation.strM_Add) calculation.str_mod = nil statCalc = true end if calculation.agi ~= 0 or calculation.agi_mod then calculation.agi = (calculation.agi_mod or 0) + calculation.agi * calculation.agiM --* (1 + calculation.agiM_Add) calculation.agi_mod = nil statCalc = true end if calculation.int ~= 0 or calculation.int_mod then calculation.int = (calculation.int_mod or 0) + calculation.int * calculation.intM --* (1 + calculation.intM_Add) calculation.int_mod = nil statCalc = true end if calculation.spi ~= 0 or calculation.spi_mod then calculation.spi = (calculation.spi_mod or 0) + calculation.spi * calculation.spiM --* (1 + calculation.spiM_Add) calculation.spi_mod = nil statCalc = true end --CORE: Module stat modifiers DrDamage.Calculation["Stats"]( calculation, ActiveAuras, Talents, spell, baseSpell ) --CORE: Stat delta calculation if statCalc then DrDamage:StatCalc(calculation, baseSpell) end calculation.customStats = false --CORE: Apply bonuses if calculation.AP_mod ~= 0 or calculation.AP_bonus then calculation.AP_mod = calculation.AP_mod * calculation.APM + (calculation.AP_bonus or 0) calculation.AP_bonus = nil end if calculation.SP_mod ~= 0 or calculation.SP_bonus then calculation.SP_mod = calculation.SP_mod * calculation.SPM + (calculation.SP_bonus or 0) calculation.SP_bonus = nil end --CORE: Module secondary stat modifiers if DrDamage.Calculation["Stats2"] then DrDamage.Calculation["Stats2"]( calculation, ActiveAuras, Talents, spell, baseSpell ) end --CORE: Initialize variables local dmgM_Extra = calculation.dmgM_Extra * calculation.dmgM * (1 + calculation.dmgM_Add + calculation.dmgM_Extra_Add) * (not calculation.extraCrit and (baseSpell.BleedExtra and calculation.bleedBonus or 1) or 1) local dmgM = calculation.dmgM * calculation.dmgM_dd * (1 + calculation.dmgM_Add + calculation.dmgM_dd_Add) * (baseSpell.Bleed and calculation.bleedBonus or 1) calculation.AP = calculation.AP + calculation.AP_mod calculation.SP = calculation.SP + calculation.SP_mod calculation.AP_mod = 0 calculation.SP_mod = 0 local AP = math_max(0, calculation.AP) local SP = math_max(0, calculation.SP) local APmod, APoh = 0 local minDam, maxDam = calculation.minDam * calculation.bDmgM, calculation.maxDam * calculation.bDmgM local minDam_O, maxDam_O local minCrit, maxCrit local minCrit_O, maxCrit_O local avgHit, avgHit_O local avgCrit,avgCrit_O local avgTotal local avgTotal_O = 0 local eDuration = calculation.eDuration local baseDuration = baseSpell.eDuration local hits = calculation.hits local perHit, ticks local hitPenaltyAvg, aoe, aoeO --CORE: Sum up hit chance local hit, hitO = calculation.hit + calculation.hitPerc, (calculation.hitO or calculation.hit) + calculation.hitPerc local hitPerc = hit local hitPerc_O = hitO local hitDW = baseSpell.AutoAttack and calculation.offHand and (hit - 19) local hitDWO = hitDW and (hitO - 19) --CORE: Minimum hit: 0%, Maximum hit: 100% if hitPerc > 100 then hitPerc = 100 elseif hitPerc < 0 then hitPerc = 0 end if hitPerc_O > 100 then hitPerc_O = 100 elseif hitPerc_O < 0 then hitPerc_O = 0 end if hitDW then if hitDW > 100 then hitDW = 100 elseif hitDW < 0 then hitDW = 0 end if hitDWO > 100 then hitDWO = 100 elseif hitDWO < 0 then hitDWO = 0 end end --CORE: Critical hit chance & Calculate crit cap (103% - miss - glancing - dodge rate - parry rate) local critCap = 100 + (settings.CritDepression and calculation.critDepression or 0) - (100 - (hitDW or hitPerc)) - (calculation.glancing or 0) local critPerc = calculation.critPerc local dodge, parry if calculation.dodge then dodge = calculation.dodge - calculation.expertise if dodge < 0 then dodge = 0 end critCap = critCap - dodge end if calculation.parry and settings.Parry then parry = calculation.parry - math_max(0,calculation.expertise - calculation.dodge) if parry < 0 then parry = 0 end critCap = critCap - parry end if critCap < 0 then critCap = 0 end if critPerc > critCap then critPerc = critCap if baseSpell.AutoAttack then calculation.critCapNote = true end end if settings.CritDepression and calculation.critDepression then critPerc = critPerc - calculation.critDepression end if critPerc > 100 then critPerc = 100 elseif critPerc < 0 then critPerc = 0 end --CORE: Weapon Damage multiplier if calculation.WeaponDamage then local min, max min, max, minDam_O, maxDam_O, APmod, APoh = DrDamage:WeaponDamage(calculation, baseSpell.NoNormalization) minDam = minDam + min * calculation.WeaponDamage maxDam = maxDam + max * calculation.WeaponDamage --CORE: Off-hand attacks if calculation.offHand then --if calculation.ExtraMain then -- local min, max = DrDamage:WeaponDamage(calculation, baseSpell.NoNormalization) -- minDam_O = calculation.offHdmgM * (min * calculation.WeaponDamage + calculation.minDam * calculation.bDmgM) -- maxDam_O = calculation.offHdmgM * (max * calculation.WeaponDamage + calculation.maxDam * calculation.bDmgM) --elseif baseSpell.AutoAttack or calculation.DualAttack then if baseSpell.AutoAttack or calculation.DualAttack then minDam_O = minDam_O * calculation.WeaponDamage + calculation.minDam * calculation.bDmgM * calculation.bDmgM_O * (calculation.DualAttack or 1) maxDam_O = maxDam_O * calculation.WeaponDamage + calculation.maxDam * calculation.bDmgM * calculation.bDmgM_O * (calculation.DualAttack or 1) APmod = APmod + (APoh or 0) elseif baseSpell.OffhandAttack then minDam = minDam_O * calculation.WeaponDamage + calculation.minDam * calculation.bDmgM maxDam = maxDam_O * calculation.WeaponDamage + calculation.maxDam * calculation.bDmgM minDam_O = nil maxDam_O = nil APmod = (APoh or 0) end end end --CORE: Combo point calculation if baseSpell.ComboPoints then local cp = calculation.Melee_ComboPoints if cp > 0 then if spell.PerCombo then minDam = minDam + spell.PerCombo * cp maxDam = maxDam + spell.PerCombo * cp if baseSpell.TicksPerCombo then local nticks = baseSpell.TicksPerCombo * (cp - 1) minDam = (baseSpell.DotHits + nticks) * minDam maxDam = (baseSpell.DotHits + nticks) * maxDam eDuration = eDuration + baseSpell.Ticks * nticks baseDuration = baseDuration + baseSpell.Ticks * nticks --APmod = APmod + (calculation.APBonus / baseSpell.DotHits) * nticks end end if calculation.APBonus > 0 then minDam = minDam + calculation.APBonus * cp * AP maxDam = maxDam + calculation.APBonus * cp * AP APmod = APmod + calculation.APBonus * cp end else calculation.zero = true end else --CORE: AP and SP modifier for non-combo point abilities if calculation.APBonus > 0 then minDam = minDam + calculation.APBonus * AP maxDam = maxDam + calculation.APBonus * AP APmod = APmod + calculation.APBonus end if calculation.SPBonus > 0 then minDam = minDam + calculation.SPBonus * SP maxDam = maxDam + calculation.SPBonus * SP end end --CORE: Calculate final min-max range local modDuration = baseDuration and eDuration > baseDuration and (1 + (eDuration - baseDuration) / baseDuration) or 1 minDam = dmgM * calculation.mitigation * minDam * modDuration + (baseDuration and 0 or calculation.finalMod * calculation.mitigation) maxDam = dmgM * calculation.mitigation * maxDam * modDuration + (baseDuration and 0 or calculation.finalMod * calculation.mitigation) if nextCalc then minDam = (baseSpell.eDot and hits or 1) * minDam maxDam = (baseSpell.eDot and hits or 1) * maxDam else minDam = (baseSpell.eDot and hits or 1) * math_floor(minDam) maxDam = (baseSpell.eDot and hits or 1) * math_ceil(maxDam) end --CORE: Show zero for not available abilities if calculation.zero then minDam = 0 maxDam = 0 end --CORE: Sum min and max to averages avgHit = (minDam + maxDam) / 2 --CORE: Crit calculation local critBonus = 0 local critBonus_O = 0 if not calculation.NoCrits then minCrit = minDam + minDam * calculation.critM maxCrit = maxDam + maxDam * calculation.critM avgCrit = (minCrit + maxCrit) / 2 critBonus = (critPerc / 100) * avgHit * calculation.critM avgTotal = avgHit + critBonus else avgCrit = avgHit avgTotal = avgHit end --CORE: Crit calculation for off-hand and dual attack if calculation.offHand and not baseSpell.OffhandAttack then minDam_O = dmgM * calculation.mitigation * minDam_O + calculation.finalMod * calculation.bDmgM_O maxDam_O = dmgM * calculation.mitigation * maxDam_O + calculation.finalMod * calculation.bDmgM_O avgHit_O = (minDam_O + maxDam_O)/2 if not calculation.NoCrits then minCrit_O = minDam_O + minDam_O * calculation.critM maxCrit_O = maxDam_O + maxDam_O * calculation.critM avgCrit_O = (minCrit_O + maxCrit_O) / 2 critBonus_O = (critPerc / 100) * avgHit_O * calculation.critM * (calculation.OffhandChance or 1) avgTotal_O = avgHit_O * (calculation.OffhandChance or 1) + critBonus_O else avgTotal_O = avgHit_O * (calculation.OffhandChance or 1) end end local extraDam, extraAvg, extraMin, extraMax, extraAvgM, extraAvgO local perTarget, targets if not calculation.zero then --CORE: Extra damage effect calculation if calculation.extraDamage then local extra = 0 local extra_O = 0 local extraDam_O = 0 local extraAvgTotal = 0 local extraAvgTotal_O = 0 local critBonus_Extra = 0 local critBonus_Extra_O = 0 extraMin = 0 extraMax = 0 --Extra effect chance is based on crit chance if calculation.extraChanceCrit then calculation.extraChance = critPerc / 100 end --if calculation.extraAvgChanceCrit then -- calculation.extraAvgChance = critPerc / 100 --end if calculation.extraWeaponDamageChanceCrit then calculation.extraWeaponDamageChance = critPerc / 100 end --Extra effect is derived from crit value (eg. Righteous Vengeance) if calculation.extraCrit then local value = calculation.extraCrit * (baseSpell.BleedExtra and calculation.bleedBonus or 1) extra = avgCrit * value extraMin = minCrit * value extraMax = maxCrit * value extraAvgTotal = extra * (calculation.extraCritChance or calculation.extraChance) end --Extra effect is derived from avg value --Main-hand (eg. Necrosis) if calculation.extraAvg then local value = calculation.extraAvg * dmgM_Extra / (dmgM * (calculation.extraAvgM and 1 or calculation.mitigation)) extra = extra + avgTotal * value extraMin = extraMin + minDam * value extraMax = extraMax + (maxCrit or maxDam) * value extraAvgTotal = extraAvgTotal + avgTotal * value * (calculation.extraAvgChance or calculation.extraChance) end --Off-hand (eg. Necrosis) if calculation.extraAvg_O then local value = calculation.extraAvg_O * dmgM_Extra / (dmgM * (calculation.extraAvgM and 1 or calculation.mitigation)) extra_O = avgTotal_O * value extraMin = extraMin + minDam_O * value extraMax = extraMax + (maxCrit_O or maxDam_O) * value extraAvgTotal_O = extra_O * (calculation.extraAvgChance or calculation.extraChance) end --Extra effect is a multiplier of weapon damage --Main-hand (eg. Blood-Caked Blade, Deep Wounds) if calculation.extraWeaponDamage then local min, max = DrDamage:WeaponDamage(calculation, not calculation.extraWeaponDamageNorm) local value = calculation.extraWeaponDamage * (calculation.extraWeaponDamage_dmgM or dmgM_Extra) * (calculation.extraWeaponDamageM and calculation.mitigation or 1) local bonus = 0.5 * (min + max) * value extra = extra + bonus extraMin = extraMin + min * value extraMax = extraMax + max * value extraAvgTotal = extraAvgTotal + bonus * (calculation.extraWeaponDamageChance or calculation.extraChance) end --Off-hand (eg. Blood-Caked Blade, Deep Wounds) if calculation.extraWeaponDamage_O then local _, _, min, max = DrDamage:WeaponDamage(calculation, not calculation.extraWeaponDamageNorm) local value = calculation.extraWeaponDamage_O * (calculation.extraWeaponDamage_dmgM or dmgM_Extra) * (calculation.extraWeaponDamageM and calculation.mitigation or 1) local bonus = 0.5 * (min + max) extra_O = extra_O + bonus extraMin = extraMin + min * value extraMax = extraMax + max * value extraAvgTotal_O = extraAvgTotal_O + bonus * (calculation.extraWeaponDamageChance or calculation.extraChance) end --Extra damage chance on ticks (Venomous Wounds) if calculation.extraTickDamage then local value = calculation.extraTickDamage + calculation.extraTickDamageBonus * AP local ticks = math_floor( eDuration / baseSpell.Ticks + 0.5) extra = extra + value extraMin = extraMin + value extraMax = extraMax + value extraAvgTotal = extraAvgTotal + value * ticks * calculation.extraTickDamageChance if calculation.extraTickDamageCost then calculation.actionCost = calculation.actionCost - ticks * calculation.extraTickDamageChance * calculation.extraTickDamageCost end end --Module effect can crit if calculation.extra_canCrit then if calculation.extra_critPerc then if calculation.extra_critPerc > 100 then calculation.extra_critPerc = 100 elseif calculation.extra_critPerc < 0 then calculation.extra_critPerc = 0 end end critBonus_Extra = extra * ((calculation.extra_critPerc or critPerc) / 100) * (calculation.extra_critM or calculation.critM) critBonus_Extra_O = extra_O * ((calculation.extra_critPerc or critPerc) /100) * (calculation.extra_critM or calculation.critM) extraMax = extraMax * (1 + (calculation.extra_critM or calculation.critM)) end --Main-hand extra damage effect from modules extraDam = (baseSpell.Hits_extra or 1) * math_ceil((calculation.extra + calculation.extraDamage * AP + (calculation.extraDamageSP or 0) * SP) * (calculation.E_dmgM or dmgM_Extra) * (calculation.extraM and calculation.mitigation or 1) + (calculation.extraDamBonus or 0)) --Off-hand extra damage effect from modules (Poisons, Flametongue, Frostbrand) extraDam_O = (baseSpell.Hits_extra or 1) * math_ceil(((calculation.extra_O or 0) + (calculation.extraDamage_O or 0) * AP + (calculation.extraDamageSP_O or 0) * SP) * (calculation.E_dmgM or dmgM_Extra) * (calculation.extraM and calculation.mitigation or 1) + (calculation.extraDamBonus_O or 0)) --Extended duration for extra damage effect if calculation.E_eDuration and baseSpell.E_eDuration and calculation.E_eDuration > baseSpell.E_eDuration then local modDuration = 1 + (calculation.E_eDuration - baseSpell.E_eDuration) / baseSpell.E_eDuration extraDam = extraDam * modDuration end --Extra effect can crit if calculation.E_canCrit then if calculation.E_critPerc then if calculation.E_critPerc > 100 then calculation.E_critPerc = 100 elseif calculation.E_critPerc < 0 then calculation.E_critPerc = 0 end end if calculation.E_critPerc_O then if calculation.E_critPerc_O > 100 then calculation.E_critPerc_O = 100 elseif calculation.E_critPerc_O < 0 then calculation.E_critPerc_O = 0 end end critBonus_Extra = critBonus_Extra + extraDam * ((calculation.E_critPerc or critPerc) / 100) * (calculation.E_critM or calculation.critM) * calculation.extraChance critBonus_Extra_O = critBonus_Extra_O + extraDam_O * ((calculation.E_critPerc_O or critPerc) / 100) * (calculation.E_critM or calculation.critM) * calculation.extraChance_O extraMax = extraMax + (extraDam + extraDam_O) * (1 + (calculation.E_critM or calculation.critM)) else extraMax = extraMax + extraDam + extraDam_O end --Adds extra effect to minimum damage extraMin = extraMin + extraDam + extraDam_O --Sums up main-hand average extra effect extraAvgM = extraDam * calculation.extraChance + extraAvgTotal + critBonus_Extra --Sums up main-hand average for DPS calculation avgTotal = avgTotal + extraAvgM --Sums up off-hand average extra effect extraAvgO = extraDam_O * calculation.extraChance_O + extraAvgTotal_O + critBonus_Extra_O --Sums up off-hand average for DPS calculation avgTotal_O = avgTotal_O + extraAvgO --Sums the average extra effect extraAvg = extraAvgM + extraAvgO --The amount of damage done on combined successful procs, non-crit extraDam = extraDam + extraDam_O + extra + extra_O --AP bonus from extra module APmod = APmod + calculation.extraDamage + (calculation.extraDamage_O or 0) end --CORE: Per hit/tick calculation if baseSpell.eDuration and baseSpell.Ticks then ticks = math_floor(eDuration / baseSpell.Ticks + 0.5) perHit = avgHit / ticks elseif hits then perHit = avgTotal + avgTotal_O elseif extraDam and baseSpell.E_eDuration and baseSpell.E_Ticks then ticks = math_floor(calculation.E_eDuration / baseSpell.E_Ticks + 0.5) perHit = extraDam / ticks elseif extraDam and calculation.extraTicks then ticks = calculation.extraTicks perHit = extraDam / ticks end --CORE: Hit calculation if not baseSpell.Unresistable then local hit, hitO = 100, 100 local avoidance, avoidanceO = 0, 0 local calc if settings.HitCalc or hitCalc then hit = hitDW or hitPerc hitO = hitDWO or hitPerc_O calc = true end if settings.Parry and parry then avoidance = parry avoidanceO = parry calc = true end if settings.Dodge and dodge then avoidance = avoidance + dodge avoidanceO = avoidanceO + dodge calc = true end if settings.Glancing and calculation.glancing then avoidance = avoidance + calculation.glancing * calculation.glancingM avoidanceO = avoidanceO + calculation.glancing * calculation.glancingM calc = true end if calc then local tworoll = settings.TwoRoll_M and not baseSpell.AutoAttack and not baseSpell.AutoShot or baseSpell.SpellHit and settings.TwoRoll avoidance = avoidance / 100 avoidanceO = avoidanceO / 100 avgTotal = math_max(0, avgTotal - (avgTotal - critBonus) * avoidance - (avgTotal - (tworoll and 0 or critBonus)) * (1 - 0.01 * hit)) hitPenaltyAvg = avgHit * avoidance + (avgHit + (tworoll and critBonus or 0)) * (1 - 0.01 * hit) if avgTotal_O > 0 then avgTotal_O = math_max(0, avgTotal_O - (avgTotal_O - critBonus_O) * avoidanceO - (avgTotal_O - (tworoll and 0 or critBonus_O)) * (1 - 0.01 * hitO)) end end end --CORE: Multiple hit calculation if hits and not ticks then avgTotal = avgTotal + (hits - 1) * avgTotal if calculation.DualAttack then avgTotal_O = avgTotal_O + (hits - 1) * avgTotal_O end --Not needed currently --if avgTotalMod then -- avgTotalMod = avgTotalMod + (hits - 1) * avgTotal --end end if (calculation.aoe or baseSpell.E_AoE) and calculation.targets > 1 then targets = (type(calculation.aoe) == "number") and math_min(calculation.targets, calculation.aoe) or calculation.targets if baseSpell.E_AoE and not calculation.aoe then perTarget = extraAvg aoe = (targets - 1) * perTarget elseif baseSpell.ChainFactor then local chain = baseSpell.ChainFactor aoe = avgTotal * (chain + (targets >= 3 and chain^2 or 0)) elseif baseSpell.MixedAoE then local aoeM = calculation.aoeM or 1 perTarget = (avgTotal - extraAvg) * aoeM + extraAvg aoe = (targets - 1) * perTarget if aoeM < 1 then targets = targets - 1 end elseif calculation.NoExtraAoE then local aoeM = calculation.aoeM or 1 perTarget = (avgTotal + avgTotal_O - extraAvg) * aoeM aoe = (targets - 1) * (avgTotal - extraAvgM) * aoeM aoeO = (targets - 1) * (avgTotal_O - extraAvgO) * aoeM if aoeM < 1 then targets = targets - 1 end else local aoeM = calculation.aoeM or 1 perTarget = (avgTotal + avgTotal_O) * aoeM aoe = (targets - 1) * avgTotal * aoeM aoeO = (targets - 1) * avgTotal_O * aoeM if aoeM < 1 then targets = targets - 1 end end avgTotal = avgTotal + aoe avgTotal_O = avgTotal_O + (aoeO or 0) --TODO: Do we want this? --if baseSpell.E_AoE and ticks then -- ticks = ticks * targets --end end --CORE: Windfury calculation if calculation.WindfuryBonus then local min, max = DrDamage:WeaponDamage(calculation, true) local bspd = DrDamage:GetWeaponSpeed() local value = dmgM * calculation.mitigation * (calculation.WindfuryDmgM or 1) * 3 local bonus = bspd * calculation.WindfuryBonus / 14 local avgWf = (0.5 * (min+max) + bonus) * value local avgTotalWf = avgWf * (1 + calculation.critM * critPerc / 100) * (hitPerc / 100) * calculation.WindfuryChance * ((hitDW or hitPerc) / 100) extraDam = (extraDam or 0) + avgWf extraAvg = (extraAvg or 0) + avgTotalWf extraMin = (extraMin or 0) + (min + bonus) * value extraMax = (extraMax or 0) + (max + bonus) * value * (1 + calculation.critM) avgTotal = avgTotal + avgTotalWf end if calculation.WindfuryBonus_O then local _, _, min, max = DrDamage:WeaponDamage(calculation, true) local _, bspd = DrDamage:GetWeaponSpeed() local value = dmgM * calculation.mitigation * (calculation.WindfuryDmgM or 1) * 3 local bonus = bspd * calculation.WindfuryBonus_O / 14 local avgWf_O = (0.5 * (min+max) + bonus) * value local avgTotalWf_O = avgWf_O * (1 + calculation.critM * critPerc / 100) * (hitPerc_O / 100) * calculation.WindfuryChance * ((hitDWO or hitPerc_O) / 100) extraDam = (extraDam or 0) + avgWf_O extraAvg = (extraAvg or 0) + avgTotalWf_O extraMin = (extraMin or 0) + (min + bonus) * value extraMax = (extraMax or 0) + (max + bonus) * (1 + calculation.critM) avgTotal_O = avgTotal_O + avgTotalWf_O end else avgTotal = 0 avgTotal_O = 0 end local avgCombined = avgTotal + avgTotal_O if nextCalc then return avgCombined else --CORE: DPS calculation local DPS, DPSCD if calculation.customDPS then DPS = calculation.customDPS elseif baseSpell.AutoAttack or baseSpell.WeaponDPS then if hits then DPS = (avgTotal / hits) / calculation.spd else DPS = avgTotal / calculation.spd end if calculation.ospd then DPS = DPS + avgTotal_O / calculation.ospd end elseif baseSpell.DPSrg then DPS = avgTotal / calculation.rspd else if baseSpell.Channeled then DPS = avgCombined / (baseSpell.Channeled / math_max(1,calculation.haste)) elseif eDuration > 0 then if calculation.customHaste then eDuration = eDuration / math_max(1,calculation.haste) end DPS = avgCombined / eDuration elseif extraDam and calculation.E_eDuration then if calculation.WeaponDPS then DPS = (avgCombined - extraAvg) / calculation.spd + extraAvg / calculation.E_eDuration else DPS = avgCombined / calculation.E_eDuration end end if calculation.cooldown > 0 then DPSCD = DrD_Round(avgCombined / calculation.cooldown,1) end --if calculation.castTime then -- DPS = avgCombined / calculation.castTime --end end local extraDPS if calculation.extra_DPS and DPS then extraDPS = (calculation.E_dmgM or dmgM) * (calculation.extraStacks_DPS or 1) * (calculation.extra_DPS + calculation.extraDamage_DPS * AP) / calculation.extraDuration_DPS if calculation.extra_DPS_canCrit then extraDPS = extraDPS * (1 + 0.01 * (calculation.E_critPerc or critPerc) * (calculation.E_critM or calculation.critM)) end DPS = DPS + extraDPS end --if calculation.procPerc then -- DPS = DPS * calculation.procPerc --end DrD_ClearTable( CalculationResults ) CalculationResults.Avg = math_floor(math_max(0, avgHit - (hitPenaltyAvg or 0) + critBonus + 0.5)) CalculationResults.AvgHit = math_floor(avgHit + 0.5) CalculationResults.AvgHitTotal = math_floor(avgHit + (extraDam or 0) + 0.5) CalculationResults.AvgTotal = math_floor(avgTotal + avgTotal_O + 0.5) CalculationResults.MinHit = math_floor(minDam) CalculationResults.MaxHit = math_ceil(maxDam) CalculationResults.MaxTotal = math_ceil((maxCrit or maxDam) + (maxCrit_O or maxDam_O or 0) + (extraMax or 0) + (aoe or 0) + (aoeO or 0)) if not calculation.NoCrits and not calculation.hits then CalculationResults.MinCrit = math_floor(minCrit) CalculationResults.MaxCrit = math_ceil(maxCrit) CalculationResults.AvgCrit = math_floor(avgCrit + 0.5) else CalculationResults.MinCrit = CalculationResults.MinHit CalculationResults.MaxCrit = CalculationResults.MaxHit CalculationResults.AvgCrit = CalculationResults.AvgHit end if DPS then CalculationResults.DPS = DrD_Round(DPS,1) if eDuration > 0 then CalculationResults.DPS_Duration = DrD_Round(eDuration, 2) elseif calculation.E_eDuration then CalculationResults.DPS_Duration = DrD_Round(calculation.E_eDuration, 2) end end if DPSCD then CalculationResults.DPSCD = DPSCD end if tooltip or settings.DisplayType_M == "DPM" or settings.DisplayType_M2 == "DPM" or settings.DisplayType_M2 == "PowerCost" then if powerTypes[calculation.powerType] and calculation.actionCost > 0 then CalculationResults.PowerType = powerTypes[calculation.powerType] if calculation.freeCrit > 0 then calculation.actionCost = calculation.actionCost - calculation.actionCost * calculation.freeCrit * (critPerc / 100) * (hitPerc / 100) end --TODO: Do we want this cost or what the tooltip displays? if calculation.baseCost ~= calculation.actionCost then CalculationResults.PowerCost = math_floor(calculation.actionCost + 0.5) end CalculationResults.DPM = DrD_Round(avgCombined / calculation.actionCost, 1) end if not CalculationResults.DPM then CalculationResults.DPM = "\226\136\158" end end if tooltip then CalculationResults.Hit = DrD_Round(hitDW or hitPerc, 2) CalculationResults.AP = math_floor(AP + 0.5) CalculationResults.Ranged = calculation.ranged CalculationResults.DmgM = DrD_Round(calculation.dmgM_Display, 3) CalculationResults.APBonus = DrD_Round(APmod, 3) if settings.Parry and parry then CalculationResults.Parry = DrD_Round(parry, 2) end if settings.Dodge and dodge then CalculationResults.Dodge = DrD_Round(dodge, 2) end if settings.Glancing and calculation.glancing then CalculationResults.Glancing = calculation.glancing end if calculation.mitigation < 1 then CalculationResults.Mitigation = DrD_Round((1 - calculation.mitigation) * 100, 2) CalculationResults.ArmorPen = DrD_Round(calculation.armorIgnore * 100, 2) end if not calculation.NoCrits or calculation.E_canCrit then CalculationResults.CritM = DrD_Round( 100 + calculation.critM * 100, 2) CalculationResults.Crit = DrD_Round(critPerc, 2) end if avgHit_O then CalculationResults.AvgTotalM = math_floor(avgTotal + 0.5) CalculationResults.AvgHitO = math_floor(avgHit_O + 0.5) CalculationResults.MinHitO = math_floor(minDam_O) CalculationResults.MaxHitO = math_ceil(maxDam_O) CalculationResults.HitO = DrD_Round(hitDWO or hitPerc_O, 2) CalculationResults.AvgTotalO = math_floor(avgTotal_O + 0.5) if not calculation.NoCrits then CalculationResults.MinCritO = math_floor(minCrit_O) CalculationResults.MaxCritO = math_ceil(maxCrit_O) CalculationResults.AvgCritO = math_floor(avgCrit_O + 0.5) end end if extraDam then CalculationResults.Extra = math_floor(extraAvg + 0.5) CalculationResults.ExtraMin = math_floor(extraMin) CalculationResults.ExtraMax = math_ceil(extraMax) CalculationResults.ExtraName = calculation.extraName end if extraDPS then CalculationResults.ExtraDPS = DrD_Round( extraDPS, 1) CalculationResults.ExtraNameDPS = calculation.extraName_DPS end if (calculation.SPBonus > 0 or calculation.extraDamageSP) then CalculationResults.SP = math_floor( SP + 0.5 ) CalculationResults.SPBonus = DrD_Round( calculation.SPBonus + (calculation.extraDamageSP or 0), 3 ) end if perHit then if ticks and (not calculation.NoCrits and not baseSpell.E_eDuration and not calculation.extraTicks or baseSpell.E_eDuration and calculation.E_canCrit) then CalculationResults.PerCrit = math_floor( perHit * (1 + (not baseSpell.eDuration and calculation.E_critM or calculation.critM)) + 0.5 ) CalculationResults.Crits = math_floor( ticks * (critPerc / 100) + 0.5 ) ticks = ticks - CalculationResults.Crits end CalculationResults.Hits = ticks or hits CalculationResults.PerHit = DrD_Round(perHit, 1) end if perTarget then CalculationResults.Targets = targets CalculationResults.PerTarget = math_floor(perTarget + 0.5) end --if calculation.procPerc then -- CalculationResults.ProcChance = DrD_Round(calculation.procPerc * 100,2) --end if calculation.tooltipName then CalculationResults.Name = calculation.tooltipName end if calculation.tooltipName2 then CalculationResults.Name2 = calculation.tooltipName2 end --if calculation.coeff then -- CalculationResults.Coeff = DrD_Round(calculation.coeff, 3) -- CalculationResults.CoeffV = math_floor(calculation.coeffv + 0.5) --end if baseSpell.AutoAttack then CalculationResults.CritCap = DrD_Round(critCap, 2) if calculation.critCapNote then CalculationResults.CritCapNote = true end end --if calculation.hybridnote then -- CalculationResults.HybridNote = true --end end return avgCombined end end function DrDamage:MeleeTooltip( frame, name, rank ) local value = select(3,self:MeleeCalc(name, rank, true)) if not value then return end local baseSpell = spellInfo[name][0] if type(baseSpell) == "function" then baseSpell = baseSpell(rank) end frame:AddLine(" ") local r, g, b = 1, 0.82745098, 0 local rt, gt, bt = 1, 1, 1 if CalculationResults.Name2 then frame:AddDoubleLine( CalculationResults.Name .. ":", CalculationResults.Name2, rt, gt, bt, r, g, b ) elseif CalculationResults.Name then frame:AddLine( CalculationResults.Name, r, g, b ) frame:AddLine(" ") end if not settings.DefaultColor then local c = settings.TooltipTextColor1 rt, gt, bt = c.r, c.g, c.b c = settings.TooltipTextColor2 r, g, b = c.r, c.g, c.b end if settings.Coeffs then --if CalculationResults.Coeff then -- frame:AddDoubleLine(L["Coeffs"] .. ":", CalculationResults.Coeff .. "*" .. CalculationResults.CoeffV, rt, gt, bt, r, g, b ) --else frame:AddDoubleLine(L["Coeffs"] .. ":", (CalculationResults.SP and (CalculationResults.SPBonus .. "*" .. CalculationResults.SP .. "/") or "") .. CalculationResults.APBonus .. "*" .. CalculationResults.AP, rt, gt, bt, r, g, b ) --end frame:AddDoubleLine(L["Multiplier:"], (CalculationResults.DmgM * 100) .. "%", rt, gt, bt, r, g, b ) if CalculationResults.CritM then frame:AddDoubleLine(L["Crit Multiplier:"], CalculationResults.CritM .. "%", rt, gt, bt, r, g, b ) end if CalculationResults.Mitigation then local arp = CalculationResults.ArmorPen and CalculationResults.ArmorPen > 0 frame:AddDoubleLine(arp and (L["Armor"] .. "/" .. L["ArP"] .. ":") or (L["Armor"] .. ":"), CalculationResults.Mitigation .. "%" .. (arp and ("/" .. CalculationResults.ArmorPen .. "%") or ""), rt, gt, bt, r, g, b ) end --if CalculationResults.ProcChance then -- frame:AddDoubleLine(L["Proc Chance:"], CalculationResults.ProcChance .. "%", rt, gt, bt, r, g, b ) --end if CalculationResults.Dodge or CalculationResults.Parry or CalculationResults.Glancing then frame:AddDoubleLine((CalculationResults.Dodge and L["Dodge"] or "") .. (CalculationResults.Parry and (CalculationResults.Dodge and ("/" .. L["Parry"]) or L["Parry"]) or "") .. (CalculationResults.Glancing and ((CalculationResults.Dodge or CalculationResults.Parry) and ("/" .. L["Glancing"]) or L["Glancing"]) or "") .. ":", (CalculationResults.Dodge and (CalculationResults.Dodge .. "%") or "") .. (CalculationResults.Parry and (CalculationResults.Dodge and ("/" .. CalculationResults.Parry .. "%") or (CalculationResults.Parry .. "%")) or "") .. (CalculationResults.Glancing and ((CalculationResults.Dodge or CalculationResults.Parry) and ("/" .. CalculationResults.Glancing .. "%") or (CalculationResults.Glancing .. "%")) or ""), rt, gt, bt, r, g, b ) end end if settings.DispCrit and CalculationResults.Crit then frame:AddDoubleLine(L["Crit:"], CalculationResults.Crit .. "%", rt, gt, bt, r, g, b ) if CalculationResults.CritCap then frame:AddDoubleLine(L["Crit Cap:"], CalculationResults.CritCap .. "%", rt, gt, bt, r, g, b ) end end if settings.DispHit and not baseSpell.Unresistable then frame:AddDoubleLine(L["Hit:"], CalculationResults.Hit .. "%", rt, gt, bt, r, g, b ) if CalculationResults.HitO then frame:AddDoubleLine(L["Off-Hand"] .. " " .. L["Hit:"], CalculationResults.HitO .. "%", rt, gt, bt, r, g, b ) end end if not settings.DefaultColor then local c = settings.TooltipTextColor3 r, g, b = c.r, c.g, c.b end if settings.AvgHit or settings.AvgCrit then if CalculationResults.AvgHitO then frame:AddLine(L["Main Hand:"]) end end if settings.AvgHit then frame:AddDoubleLine(L["Avg"] .. ":", CalculationResults.AvgHit .. " (".. CalculationResults.MinHit .."-".. CalculationResults.MaxHit ..")", rt, gt, bt, r, g, b ) end if settings.AvgCrit and CalculationResults.AvgCrit > CalculationResults.AvgHit then frame:AddDoubleLine(L["Avg Crit:"], CalculationResults.AvgCrit .. " (".. CalculationResults.MinCrit .."-".. CalculationResults.MaxCrit ..")", rt, gt, bt, r, g, b ) end if settings.Total and CalculationResults.AvgTotalM then frame:AddDoubleLine(L["Avg Total"] ..":", CalculationResults.AvgTotalM, rt, gt, bt, r, g, b) end if CalculationResults.AvgHitO and (settings.AvgHit or settings.AvgCrit) then frame:AddLine(L["Off-Hand"] .. ":") if settings.AvgHit then frame:AddDoubleLine(L["Avg"] .. ":", CalculationResults.AvgHitO .. " (".. CalculationResults.MinHitO .."-".. CalculationResults.MaxHitO ..")", rt, gt, bt, r, g, b ) end if settings.AvgCrit and CalculationResults.AvgCritO then frame:AddDoubleLine(L["Avg Crit:"], CalculationResults.AvgCritO .. " (".. CalculationResults.MinCritO .."-".. CalculationResults.MaxCritO ..")", rt, gt, bt, r, g, b ) end if settings.Total and CalculationResults.AvgTotalO then -- and CalculationResults.AvgTotalO > CalculationResults.AvgHitO then frame:AddDoubleLine(L["Avg Total"] .. ":", CalculationResults.AvgTotalO, rt, gt, bt, r, g, b ) end end if settings.Total and CalculationResults.AvgTotalO then frame:AddLine("---") end if settings.Extra and CalculationResults.Extra then frame:AddDoubleLine(L["Avg"] .. " " .. (CalculationResults.ExtraName or L["Additional"]) .. ":", CalculationResults.Extra .. " (" .. CalculationResults.ExtraMin .."-".. CalculationResults.ExtraMax .. ")", rt, gt, bt, r, g, b) --L["Max"] --This is to keep it in the localization app in case further need end if settings.Ticks then if CalculationResults.Hits and CalculationResults.PerHit and not baseSpell.NoHits then frame:AddDoubleLine(L["Dot"] .. " " .. L["Hits:"], CalculationResults.Hits .. "x ~" .. CalculationResults.PerHit, rt, gt, bt, r, g, b ) end if CalculationResults.PerCrit and CalculationResults.Crits > 0 then frame:AddDoubleLine(L["Dot"] .. " " .. L["Crits:"], CalculationResults.Crits .. "x ~" .. CalculationResults.PerCrit, rt, gt, bt, r, g, b ) end if CalculationResults.Targets then frame:AddDoubleLine(L["AoE"] .. ":", CalculationResults.Targets .. "x ~" .. CalculationResults.PerTarget, rt, gt, bt, r, g, b ) end end if settings.Total then if CalculationResults.AvgTotalO then frame:AddDoubleLine(L["Combined Total:"], CalculationResults.AvgTotal, rt, gt, bt, r, g, b ) else frame:AddDoubleLine(L["Avg Total"] .. ":", CalculationResults.AvgTotal, rt, gt, bt, r, g, b) end end if not settings.DefaultColor then local c = settings.TooltipTextColor4 r, g, b = c.r, c.g, c.b end local bType if CalculationResults.Ranged then bType = L["RAP"] else bType = L["AP"] end if CalculationResults.Stats then local strA = CalculationResults.NextStr and CalculationResults.NextStr > 0 and CalculationResults.Stats * 0.1 / CalculationResults.NextStr local agiA = CalculationResults.NextAgi and CalculationResults.NextAgi > 0 and CalculationResults.Stats * 0.1 / CalculationResults.NextAgi local intA = CalculationResults.NextInt and CalculationResults.NextInt > 0 and CalculationResults.Stats * 0.1 / CalculationResults.NextInt local apA = CalculationResults.NextAP and CalculationResults.NextAP > 0 and CalculationResults.Stats * 0.1 / CalculationResults.NextAP local critA = CalculationResults.NextCrit and CalculationResults.NextCrit > 0 and CalculationResults.Stats * 0.01 / CalculationResults.NextCrit * self:GetRating("Crit", nil, true) local expA = CalculationResults.NextExp and CalculationResults.NextExp > 0 and CalculationResults.Stats * 0.01 / CalculationResults.NextExp * self:GetRating("Expertise",nil,true) local hitA = CalculationResults.NextHit and CalculationResults.NextHit > 0 and CalculationResults.Stats * 0.01 / CalculationResults.NextHit * self:GetRating("Hit", nil, true) if settings.Next then if strA then frame:AddDoubleLine("+10 " .. L["Str"] .. ":", "+" .. DrD_Round(CalculationResults.NextStr, 2), rt, gt, bt, r, g, b) end if agiA then frame:AddDoubleLine("+10 " .. L["Agi"] .. ":", "+" .. DrD_Round(CalculationResults.NextAgi, 2), rt, gt, bt, r, g, b) end if intA then frame:AddDoubleLine("+10 " .. L["Int"] .. ":", "+" .. DrD_Round(CalculationResults.NextInt, 2), rt, gt, bt, r, g, b) end if apA then frame:AddDoubleLine("+10 " .. bType .. ":", "+" .. DrD_Round(CalculationResults.NextAP, 2), rt, gt, bt, r, g, b ) end if expA then frame:AddDoubleLine("+1 " .. L["Expertise"] .. " (" .. self:GetRating("Expertise") .. "):", "+" .. DrD_Round(CalculationResults.NextExp, 2), rt, gt, bt, r, g, b ) end if critA then frame:AddDoubleLine("+1% " .. L["Crit"] .. " (" .. self:GetRating("Crit") .. "):", "+" .. DrD_Round(CalculationResults.NextCrit, 2), rt, gt, bt, r, g, b ) end if hitA then frame:AddDoubleLine("+1% " .. L["Hit"] .. " (" .. self:GetRating("Hit") .. "):", "+" .. DrD_Round(CalculationResults.NextHit, 2), rt, gt, bt, r, g, b ) end end if settings.CompareStats then local text, value local text2, value2 if strA then text = L["Str"] value = DrD_Round(strA, 1) end if agiA then local agiA = DrD_Round(agiA,1) text = text and (text .. "|" .. L["Agi"]) or L["Agi"] value = value and (value .. "/" .. agiA) or agiA end if intA then local intA = DrD_Round(intA,1) text = text and (text .. "|" .. L["Int"]) or L["Int"] value = value and (value .. "/" .. intA) or intA end if apA then local apA = DrD_Round(apA,1) text = text and (text .. "|" .. bType) or bType value = value and (value .. "/" .. apA) or apA end if masA then local masA = DrD_Round(masA,1) text = text and (text .. "|" .. L["Ma"]) or L["Ma"] value = value and (value .. "/" .. masA) or masA end if critA then local critA = DrD_Round(critA,1) text2 = text2 and (text2 .. "|" .. L["Cr"]) or L["Cr"] value2 = value2 and (value2 .. "/" .. critA) or critA end if hitA then local hitA = DrD_Round(hitA,1) text2 = text2 and (text2 .. "|" .. L["Ht"]) or L["Ht"] value2 = value2 and (value2 .. "/" .. hitA) or hitA end if expA then local expA = DrD_Round(expA,1) text2 = text2 and (text2 .. "|" .. L["Exp"]) or L["Exp"] value2 = value2 and (value2 .. "/" .. expA) or expA end if text then frame:AddDoubleLine("+1% " .. L["Damage"] .. " (" .. text .. "):", value, rt, gt, bt, r, g, b ) end if text2 then frame:AddDoubleLine("+1% " .. L["Damage"] .. " (" .. text2 .. "):", value2, rt, gt, bt, r, g, b ) end end if settings.CompareStr and strA then local text, value = self:CompareTooltip(strA, agiA, intA, apA, masA, critA, hitA, expA, L["Str"], L["Agi"], L["Int"], bType, L["Ma"], L["Cr"], L["Ht"], L["Exp"]) if text then frame:AddDoubleLine(text, value, rt, gt, bt, r, g, b ) end end if settings.CompareAgi and agiA then local text, value = self:CompareTooltip(agiA, strA, intA, apA, masA, critA, hitA, expA, L["Agi"], L["Str"], L["Int"], bType, L["Ma"], L["Cr"], L["Ht"], L["Exp"]) if text then frame:AddDoubleLine(text, value, rt, gt, bt, r, g, b ) end end if settings.CompareInt and intA then local text, value = self:CompareTooltip(intA, strA, agiA, apA, masA, critA, hitA, expA, L["Int"], L["Str"], L["Agi"], bType, L["Ma"], L["Cr"], L["Ht"], L["Exp"]) if text then frame:AddDoubleLine(text, value, rt, gt, bt, r, g, b ) end end if settings.CompareAP and apA then local text, value = self:CompareTooltip(apA, strA, agiA, intA, masA, critA, hitA, expA, bType, L["Str"], L["Agi"], L["Int"], L["Ma"], L["Cr"], L["Ht"], L["Exp"]) if text then frame:AddDoubleLine(text, value, rt, gt, bt, r, g, b ) end end if settings.CompareCrit and critA then local text, value = self:CompareTooltip(critA, strA, agiA, intA, apA, masA, hitA, expA, L["Cr"], L["Str"], L["Agi"], L["Int"], bType, L["Ma"], L["Ht"], L["Exp"]) if text then frame:AddDoubleLine(text, value, rt, gt, bt, r, g, b ) end end if settings.CompareHit and hitA then local text, value = self:CompareTooltip(hitA, strA, agiA, intA, apA, masA, critA, expA, L["Ht"], L["Str"], L["Agi"], L["Int"], bType, L["Ma"], L["Cr"], L["Exp"]) if text then frame:AddDoubleLine(text, value, rt, gt, bt, r, g, b ) end end if settings.CompareExp and expA then local text, value = self:CompareTooltip(expA, strA, agiA, intA, apA, masA, critA, hitA, L["Exp"], L["Str"], L["Agi"], L["Int"], bType, L["Ma"], L["Cr"], L["Ht"]) if text then frame:AddDoubleLine(text, value, rt, gt, bt, r, g, b ) end end end if not settings.DefaultColor then local c = settings.TooltipTextColor5 r, g, b = c.r, c.g, c.b end if not baseSpell.NoDPS and settings.DPS then local extra if settings.Extra and CalculationResults.ExtraDPS then frame:AddDoubleLine(L["DPS"] .. " (" .. CalculationResults.ExtraNameDPS .. "):", CalculationResults.ExtraDPS, rt, gt, bt, r, g, b) extra = CalculationResults.ExtraDPS end if CalculationResults.DPS and (not extra or extra and CalculationResults.DPS > extra) then frame:AddDoubleLine(L["DPS"] .. ((CalculationResults.DPS_Duration and " (" .. CalculationResults.DPS_Duration .. "s):") or ":"), CalculationResults.DPS, rt, gt, bt, r, g, b ) end if CalculationResults.DPSCD then frame:AddDoubleLine(L["DPS (CD):"], CalculationResults.DPSCD, rt, gt, bt, r, g, b ) end end if settings.DPP and CalculationResults.DPM and CalculationResults.PowerType and not baseSpell.NoDPM then frame:AddDoubleLine( CalculationResults.PowerType .. ":", CalculationResults.DPM, rt, gt, bt, r, g, b ) end if settings.Hints then if not settings.DefaultColor then local c = settings.TooltipTextColor6 r, g, b = c.r, c.g, c.b end if CalculationResults.CritCapNote then frame:AddLine(L["Crit cap reached"], r, g, b) end --if CalculationResults.HybridNote then -- frame:AddLine("Hint: Add enemy armor from options", r, g, b) --end end frame:Show() end
fx_version 'adamant' game 'gta5' shared_scripts { 'sh_config.lua', 'sh_airstrike.lua', } client_scripts { 'cl_airstrike.lua', } server_scripts { 'sv_airstrike.lua', }
Config = {} Config.Animations = { { name = 'festives', label = 'Festliga', items = { {label = "Rök en cigarett", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, {label = "Spela musik", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, {label = "DJ", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, {label = "Drick en öl", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, {label = "Party", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, {label = "Luftgitarr", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, {label = "Dansa", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, -- {label = "Mekka en joint", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, {label = "Fylld på platsen", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, {label = "Spy", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, } }, { name = 'greetings', label = 'Hälsningar', items = { {label = "Hälsa", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, {label = "Skaka hand", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, {label = "Skaka hand 2", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, {label = "Gangsterhälsning", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, {label = "Militärhälsning", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, } }, { name = 'work', label = 'Jobb', items = { {label = "Misstänkt: gå till polisen", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, {label = "FIskare", type = "scenario", data = {anim = "world_human_stand_fishing"}}, {label = "Polis utreda", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, {label = "Polis: prata på radion", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, {label = "Polis: trafik", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, {label = "Polis: kikare", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, {label = "Jordbruk: skörd", type = "scenario", data = {anim = "world_human_gardener_plant"}}, {label = "Mekaniker: reparera motorn", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, {label = "Läkare: observera", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, {label = "Taxi: prata med kunden", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, {label = "Taxi: ge räkning", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, {label = "Livsmedel: ge handla", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, {label = "Bartender: tjäna en shot", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, {label = "Reporter: Ta en bild", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, {label = "Ta noteringar", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, {label = "Använd hammare", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, {label = "Gör rundan", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, {label = "Statyn", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, } }, { name = 'humors', label = 'Humor', items = { {label = "Gratulera", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, {label = "Stor", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, {label = "Peka", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, {label = "Kom hit", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, {label = "Kom an", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, {label = "Till mig", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, {label = "Jag visste det, skit", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, {label = "Utmattad", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, {label = "Jag är i skiten", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, {label = "Lugna ner ", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, {label = "Vad gjorde jag?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, {label = "Att vara rädd", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, {label = "Slåss?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, {label = "Det är inte möjligt!", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, {label = "Omfamna", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, {label = "Finger av ära", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, {label = "Vinka", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, {label = "Begå självmord", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, } }, { name = 'sports', label = 'Sporter', items = { {label = "Flexa muskler", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, {label = "Viktstång", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, {label = "Armhävningar", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, {label = "Gör situps", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, {label = "Yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, } }, { name = 'misc', label = 'Olika', items = { {label = "Drick en kaffe", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, {label = "Sitta", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, {label = "Luta dig", type = "scenario", data = {anim = "world_human_leaning"}}, {label = "Ligg på ryggen", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, {label = "Ligg på magen", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, {label = "Rengör något", type = "scenario", data = {anim = "world_human_maid_clean"}}, {label = "Förbered dig för att äta", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, {label = "Sex Position", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, {label = "Ta en selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, {label = "Lyssna på en dörr", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, } }, { name = 'attitudem', label = 'Attituder', items = { {label = "Självsäker M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, {label = "Självsäker K", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, {label = "Deprimerad M", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, {label = "Deprimerad K", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, {label = "Business", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, {label = "Modig", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, {label = "Nonchalant", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, {label = "Fet", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, {label = "Skadad", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, {label = "Bråttom", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, {label = "Hemlös", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, {label = "Ledsen", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, {label = "Muskler", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, {label = "Chockad", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, {label = "Shadyped", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, {label = "Surrande", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, {label = "Pressad", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, {label = "Pengar", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, {label = "Snabb", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, {label = "Man ätare", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, {label = "Oförskämd", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, {label = "Arrogant", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, } }, { name = 'porn', label = 'Sexställningar', items = { {label = "1", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, {label = "2", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, {label = "3", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, {label = "4", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, {label = "5", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, {label = "6", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, {label = "7", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, {label = "8", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, {label = "9", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, {label = "10", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, {label = "11", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, } } }
for i=1,10 do assert(a[i]==i) end for i=2,10 do assert(p[i-1].y==p[i].x) end for i=1,10 do assert(M.a[i]==i) end for i=2,10 do assert(M.p[i-1].y==M.p[i].x) end for i=1,10 do assert(pp[i].x==M.p[i].x and p[i].y == M.pp[i].y) end for i=1,10 do assert(array.a[i] == parray.a[i]) assert(array.p[i].x == parray.pp[i].x and array.p[i].y == parray.pp[i].y) end for i=1,10 do array.a[i] = a[10-i+1] M.a[i] = 10-i+1 assert(array.a[i]==M.a[i]) end for i=2,10 do array.p[i] = array.pp[1] assert(array.p[i].x==0 and array.p[i].y==1) end print("Array test OK") -- dump_lua(1, true, false, 2.0, 'hello', {10, 11, name='lj@sh', t=function() end, p = print}) -- dump_lua({n=1, info={a='lj', b={age=10, c={p=1}}}}) -- local t2 -- local t = {name = 'lj@sh'} -- t2 = {1, 2, t} -- t.r = t2 -- dump_lua(t2) -- dump_lua(_G)
function TestAbc(a,v) print("testabc",a,v) end function TestAbcRet(a,b) print(a,b) return a+b,b,a end
----------------- ---- Globals ---- ----------------- ShowBlast = ShowBlast or {} local ShowBlast = ShowBlast ShowBlast.name = "ShowBlast" ShowBlast.version = "1.2" local LAM2 = LibAddonMenu2 --------------------------- ---- Variables Default ---- --------------------------- ShowBlast.Default = { OffsetX = 800, OffsetY = 300, AlwaysShowAlert = false, } function ShowBlast.CreateSettingsWindow() local panelData = { type = "panel", name = "ShowBlastbones", displayName = "Show|c556b2fBlastbones|r", author = "Floliroy", version = ShowBlast.version, slashCommand = "/showblast", registerForRefresh = true, registerForDefaults = true, } local cntrlOptionsPanel = LAM2:RegisterAddonPanel("ShowBlast_Settings", panelData) local optionsData = { { type = "description", text = " ", }, { type = "checkbox", name = "Unlock", tooltip = "Use it to set the position of the Blastbones icon.", default = false, getFunc = function() return ShowBlast.savedVariables.AlwaysShowAlert end, setFunc = function(newValue) ShowBlast.savedVariables.AlwaysShowAlert = newValue ShowBlastUI:SetHidden(not newValue) end, }, } LAM2:RegisterOptionControls("ShowBlast_Settings", optionsData) end ------------------- ---- Functions ---- ------------------- local blastTimer = 0 function ShowBlast.UpdateTimer() if blastTimer >= 0 then ShowBlastUI_Timer:SetText(tostring(string.format("%.1f", blastTimer/1000))) blastTimer = blastTimer - 100 end end local blinkBoolean = true function ShowBlast.BlinkTimer() ShowBlastUI_Timer:SetHidden(blinkBoolean) blinkBoolean = not blinkBoolean end function ShowBlast.UnregisterCallLater() EVENT_MANAGER:UnregisterForUpdate(ShowBlast.name .. "TimerEnded") ShowBlastUI_Timer:SetHidden(true) end local isActive = true local activeAbilityID, inactiveAbilityID function ShowBlast.Run(_, _, _, _, unitTag, _, _, _, _, _, _, _, _, _, _, abilityId, _) --Set here the fact that player can take Grave Robber isActive = not isActive if isActive then ShowBlastUI_Border:SetColor(0, 1, 0) ShowBlastUI_Icon:SetTexture(GetAbilityIcon(activeAbilityID)) EVENT_MANAGER:UnregisterForUpdate(ShowBlast.name .. "TimerActive") ShowBlastUI_Timer:SetText("0.0") EVENT_MANAGER:RegisterForUpdate(ShowBlast.name .. "TimerEnded", 200, ShowBlast.BlinkTimer) EVENT_MANAGER:RegisterForUpdate(ShowBlast.name .. "CallLater", 2600, ShowBlast.UnregisterCallLater) else ShowBlastUI_Border:SetColor(1, 0, 0) ShowBlastUI_Icon:SetTexture(GetAbilityIcon(inactiveAbilityID)) EVENT_MANAGER:UnregisterForUpdate(ShowBlast.name .. "TimerEnded") EVENT_MANAGER:UnregisterForUpdate(ShowBlast.name .. "CallLater") ShowBlastUI_Timer:SetHidden(false) blastTimer = GetAbilityDuration(activeAbilityID) EVENT_MANAGER:RegisterForUpdate(ShowBlast.name .. "TimerActive", 100, ShowBlast.UpdateTimer) end end function ShowBlast:Initialize() ShowBlast.CreateSettingsWindow() --Saved Variables ShowBlast.savedVariables = ZO_SavedVars:New("ShowBlastVariables", 1, nil, ShowBlast.Default) --Detect if magicka or stamina _, maxMagicka, _ = GetUnitPower("player", POWERTYPE_MAGICKA) _, maxStamina, _ = GetUnitPower("player", POWERTYPE_STAMINA) if maxMagicka > maxStamina then activeAbilityID = 117750 inactiveAbilityID = 117773 else activeAbilityID = 117691 inactiveAbilityID = 117693 end --UI ShowBlastUI:ClearAnchors() ShowBlastUI:SetAnchor(TOPLEFT, GuiRoot, TOPLEFT, ShowBlast.savedVariables.OffsetX, ShowBlast.savedVariables.OffsetY) ShowBlastUI_Border:SetColor(0, 1, 0) ShowBlastUI_Icon:SetTexture(GetAbilityIcon(activeAbilityID)) ShowBlastUI_Timer:SetHidden(true) --Run if GetUnitClassId("player") == 5 then ShowBlastUI:SetHidden(false) EVENT_MANAGER:RegisterForEvent(ShowBlast.name .. "Active", EVENT_EFFECT_CHANGED, ShowBlast.Run) EVENT_MANAGER:AddFilterForEvent(ShowBlast.name .. "Active", EVENT_EFFECT_CHANGED, REGISTER_FILTER_ABILITY_ID, activeAbilityID, REGISTER_FILTER_UNIT_TAG, "player") EVENT_MANAGER:RegisterForEvent(ShowBlast.name .. "Reticle", EVENT_RETICLE_HIDDEN_UPDATE, ShowBlast.ReticleChange) else ShowBlastUI:SetHidden(true) end EVENT_MANAGER:UnregisterForEvent(ShowBlast.name, EVENT_ADD_ON_LOADED) end function ShowBlast.ReticleChange(_, hidden) local h = hidden or true if ShowBlast.savedVariables.AlwaysShowAlert then ShowBlastUI:SetHidden(false) else ShowBlastUI:SetHidden(hidden) end end function ShowBlast.SaveLoc() ShowBlast.savedVariables.OffsetX = ShowBlastUI:GetLeft() ShowBlast.savedVariables.OffsetY = ShowBlastUI:GetTop() end function ShowBlast.OnAddOnLoaded(event, addonName) if addonName ~= ShowBlast.name then return end ShowBlast:Initialize() end EVENT_MANAGER:RegisterForEvent(ShowBlast.name, EVENT_ADD_ON_LOADED, ShowBlast.OnAddOnLoaded)
workspace "Containers" startproject "Testbench" architecture "x64" warnings "extra" -- Set output dir outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}-%{cfg.platform}" -- Platform platforms { "x64", } -- Configurations configurations { "Debug", "Release", "Production", } filter "configurations:Debug" symbols "on" runtime "Debug" optimize "Off" defines { "_DEBUG", } filter "configurations:Release" symbols "on" runtime "Release" optimize "Full" defines { "NDEBUG", } filter "configurations:Production" symbols "off" runtime "Release" optimize "Full" defines { "NDEBUG", } filter {} -- Compiler option filter "action:vs*" defines { "COMPILER_VISUAL_STUDIO", "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING", "_CRT_SECURE_NO_WARNINGS", } filter {} -- Project project "Testbench" language "C++" cppdialect "C++17" systemversion "latest" location "Testbench" kind "ConsoleApp" characterset "Ascii" -- Targets targetdir ("Build/bin/" .. outputdir .. "/%{prj.name}") objdir ("Build/bin-int/" .. outputdir .. "/%{prj.name}") -- Files to include files { "%{prj.name}/**.h", "%{prj.name}/**.hpp", "%{prj.name}/**.inl", "%{prj.name}/**.c", "%{prj.name}/**.cpp", "Containers/*.h", "Containers/*.natvis", } project "*"
if settings.startup["nukes-require-cliff-explosives"].value then table.insert(data.raw.technology["atomic-bomb"].prerequisites,"cliff-explosives") end
RegisterTableGoal(GOAL_Rival_710000_Battle, "GOAL_Rival_710000_Battle") REGISTER_GOAL_NO_UPDATE(GOAL_Rival_710000_Battle, true) Goal.Initialize = function (arg0, arg1, arg2, arg3) end --Genichiro Ashina castletop(main) battle file Goal.Activate = function (arg0, arg1, arg2) Init_Pseudo_Global(arg1, arg2) local act = {} local f2_local1 = {} local f2_local2 = {} Common_Clear_Param(act, f2_local1, f2_local2) local actdist = arg1:GetDist(TARGET_ENE_0) local f2_local4 = arg1:GetExcelParam(AI_EXCEL_THINK_PARAM_TYPE__thinkAttr_doAdmirer) local f2_local5 = arg1:GetHpRate(TARGET_SELF) local f2_local6 = arg1:GetSp(TARGET_SELF) local f2_local7 = arg1:GetNinsatsuNum() arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5003) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5004) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5005) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5006) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5007) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5025) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 60000) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 60001) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 60006) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 60007) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 60008) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 60009) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 60010) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5021) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5026) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5029) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5030) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 5031) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 3710010) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 3710020) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 3710030) arg1:AddObserveSpecialEffectAttribute(TARGET_SELF, 3710031) arg1:AddObserveSpecialEffectAttribute(TARGET_ENE_0, 110010) arg1:AddObserveSpecialEffectAttribute(TARGET_ENE_0, 3710050) arg1:AddObserveSpecialEffectAttribute(TARGET_ENE_0, 110620) Set_ConsecutiveGuardCount_Interrupt(arg1) arg1:DeleteObserve(0) if arg0:Kengeki_Activate(arg1, arg2) then return end if not not arg1:HasSpecialEffectId(TARGET_ENE_0, 110060) or arg1:HasSpecialEffectId(TARGET_ENE_0, 110010) then if arg1:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) then if arg1:IsFinishTimer(2) == true then act[43] = 100 end end elseif Common_ActivateAct(arg1, arg2, 0, 1) then elseif arg1:GetNumber(7) == 0 and arg1:HasSpecialEffectId(TARGET_SELF, 200050) then act[15] = 600 elseif arg1:HasSpecialEffectId(TARGET_ENE_0, 110030) then act[28] = 100 elseif arg1:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_B, 180) then act[21] = 100 act[22] = 1 elseif not not arg1:HasSpecialEffectId(TARGET_ENE_0, 110060) or arg1:HasSpecialEffectId(TARGET_ENE_0, 110010) then act[27] = 100 elseif actdist >= 7 then act[10] = 300 act[15] = 600 elseif actdist >= 5 then act[10] = 300 act[34] = 100 act[23] = 100 if f2_local6 <= 360 then act[9] = 300 end elseif actdist > 3 then act[1] = 5 act[2] = 10 act[6] = 30 act[11] = 15 act[23] = 15 if f2_local6 <= 360 then act[9] = 300 end else act[3] = 15 act[11] = 15 act[23] = 10 act[31] = 30 if arg1:IsFinishTimer(7) == true then act[24] = 30 end end if (not not arg1:HasSpecialEffectId(TARGET_ENE_0, 109031) or arg1:HasSpecialEffectId(TARGET_ENE_0, 110125)) and actdist <= 5 then act[16] = 100 end if arg1:HasSpecialEffectId(TARGET_ENE_0, 109900) then act[1] = 5 act[2] = 5 act[3] = 5 act[9] = 0 act[11] = 5 act[10] = 30 act[15] = 0 act[31] = 0 act[48] = 30 end if arg1:GetNumber(2) == 1 then act[23] = 6000 arg1:SetNumber(2, 0) end if arg1:IsFinishTimer(0) == false then act[3] = 0 act[6] = 1 end if arg1:IsFinishTimer(1) == false then act[2] = 0 end if arg1:IsFinishTimer(3) == false then act[24] = 0 end if arg1:IsFinishTimer(6) == false then act[9] = 0 end if arg1:HasSpecialEffectId(TARGET_SELF, 200051) then act[15] = 0 act[18] = 0 act[19] = 0 act[34] = 0 act[48] = 0 end if SpaceCheck(arg1, arg2, 45, 2) == false and SpaceCheck(arg1, arg2, -45, 2) == false then act[22] = 0 end if SpaceCheck(arg1, arg2, 90, 1) == false and SpaceCheck(arg1, arg2, -90, 1) == false then act[23] = 0 end if SpaceCheck(arg1, arg2, 180, 2) == false then act[24] = 0 end if SpaceCheck(arg1, arg2, 180, 1) == false then act[25] = 0 end if arg1:HasSpecialEffectId(TARGET_ENE_0, 110621) then act[23] = 0 act[24] = 0 act[31] = 10 end act[1] = SetCoolTime(arg1, arg2, 3000, 15, act[1], 1) act[2] = SetCoolTime(arg1, arg2, 3004, 15, act[2], 1) act[3] = SetCoolTime(arg1, arg2, 3005, 15, act[3], 1) act[4] = SetCoolTime(arg1, arg2, 3006, 15, act[4], 1) act[5] = SetCoolTime(arg1, arg2, 3007, 15, act[5], 1) act[6] = SetCoolTime(arg1, arg2, 3016, 15, act[6], 1) act[7] = SetCoolTime(arg1, arg2, 3020, 15, act[7], 1) act[8] = SetCoolTime(arg1, arg2, 3021, 15, act[8], 1) act[9] = SetCoolTime(arg1, arg2, 3092, 15, act[9], 1) act[10] = SetCoolTime(arg1, arg2, 3006, 15, act[10], 1) act[11] = SetCoolTime(arg1, arg2, 3037, 15, act[11], 1) act[13] = SetCoolTime(arg1, arg2, 3011, 15, act[13], 1) act[14] = SetCoolTime(arg1, arg2, 3014, 15, act[14], 1) act[15] = SetCoolTime(arg1, arg2, 3014, 15, act[15], 1) act[18] = SetCoolTime(arg1, arg2, 3040, 15, act[18], 1) act[30] = SetCoolTime(arg1, arg2, 3006, 15, act[30], 1) act[31] = SetCoolTime(arg1, arg2, 3045, 15, act[31], 1) act[32] = SetCoolTime(arg1, arg2, 3006, 15, act[32], 1) act[34] = SetCoolTime(arg1, arg2, 3007, 15, act[34], 1) act[38] = SetCoolTime(arg1, arg2, 3006, 15, act[38], 1) --act[43] = SetCoolTime(arg1, arg2, 3046, 15, act[43], 1) act[48] = SetCoolTime(arg1, arg2, 3013, 5, act[48], 1) f2_local1[1] = REGIST_FUNC(arg1, arg2, arg0.Act01) f2_local1[2] = REGIST_FUNC(arg1, arg2, arg0.Act02) f2_local1[3] = REGIST_FUNC(arg1, arg2, arg0.Act03) f2_local1[5] = REGIST_FUNC(arg1, arg2, arg0.Act05) f2_local1[6] = REGIST_FUNC(arg1, arg2, arg0.Act06) f2_local1[7] = REGIST_FUNC(arg1, arg2, arg0.Act07) f2_local1[8] = REGIST_FUNC(arg1, arg2, arg0.Act08) f2_local1[9] = REGIST_FUNC(arg1, arg2, arg0.Act09) f2_local1[10] = REGIST_FUNC(arg1, arg2, arg0.Act10) f2_local1[11] = REGIST_FUNC(arg1, arg2, arg0.Act11) f2_local1[15] = REGIST_FUNC(arg1, arg2, arg0.Act15) f2_local1[16] = REGIST_FUNC(arg1, arg2, arg0.Act16) f2_local1[18] = REGIST_FUNC(arg1, arg2, arg0.Act18) f2_local1[19] = REGIST_FUNC(arg1, arg2, arg0.Act19) f2_local1[20] = REGIST_FUNC(arg1, arg2, arg0.Act20) f2_local1[21] = REGIST_FUNC(arg1, arg2, arg0.Act21) f2_local1[22] = REGIST_FUNC(arg1, arg2, arg0.Act22) f2_local1[23] = REGIST_FUNC(arg1, arg2, arg0.Act23) f2_local1[24] = REGIST_FUNC(arg1, arg2, arg0.Act24) f2_local1[25] = REGIST_FUNC(arg1, arg2, arg0.Act25) f2_local1[26] = REGIST_FUNC(arg1, arg2, arg0.Act26) f2_local1[27] = REGIST_FUNC(arg1, arg2, arg0.Act27) f2_local1[28] = REGIST_FUNC(arg1, arg2, arg0.Act28) f2_local1[30] = REGIST_FUNC(arg1, arg2, arg0.Act30) f2_local1[31] = REGIST_FUNC(arg1, arg2, arg0.Act31) f2_local1[34] = REGIST_FUNC(arg1, arg2, arg0.Act34) f2_local1[40] = REGIST_FUNC(arg1, arg2, arg0.Act40) f2_local1[41] = REGIST_FUNC(arg1, arg2, arg0.Act41) f2_local1[42] = REGIST_FUNC(arg1, arg2, arg0.Act42) f2_local1[43] = REGIST_FUNC(arg1, arg2, arg0.Act43) f2_local1[45] = REGIST_FUNC(arg1, arg2, arg0.Act45) f2_local1[46] = REGIST_FUNC(arg1, arg2, arg0.Act46) f2_local1[47] = REGIST_FUNC(arg1, arg2, arg0.Act47) f2_local1[48] = REGIST_FUNC(arg1, arg2, arg0.Act48) local f2_local8 = REGIST_FUNC(arg1, arg2, arg0.ActAfter_AdjustSpace) Common_Battle_Activate(arg1, arg2, act, f2_local1, f2_local8, f2_local2) end Goal.Act43 = function (arg0, arg1, arg2) arg0:SetTimer(2, 30) arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3046, TARGET_ENE_0, 9999, 0, 0, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act01 = function (arg0, arg1, arg2) local f3_local0 = 3.6 - arg0:GetMapHitRadius(TARGET_SELF) local f3_local1 = 3.6 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f3_local2 = 3.6 - arg0:GetMapHitRadius(TARGET_SELF) + 3 local f3_local3 = 100 local f3_local4 = 0 local f3_local5 = 2.5 local f3_local6 = 3 local act01rand = arg0:GetRandam_Int(1, 100) Approach_Act_Flex(arg0, arg1, f3_local0, f3_local1, f3_local2, f3_local3, f3_local4, f3_local5, f3_local6) local f3_local8 = 3.5 - arg0:GetMapHitRadius(TARGET_SELF) local f3_local9 = 3.4 - arg0:GetMapHitRadius(TARGET_SELF) local f3_local10 = 3.4 - arg0:GetMapHitRadius(TARGET_SELF) local f3_local11 = 0 local f3_local12 = 0 local act01dist = arg0:GetDist(TARGET_ENE_0) local act01rand = arg0:GetRandam_Int(1, 100) if act01rand <= 30 then arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, f3_local8, f3_local11, f3_local12, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, f3_local9, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, f3_local10, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, 9999, 0, 0) else arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, f3_local8, f3_local11, f3_local12, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, 3.5, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3010, TARGET_ENE_0, 5, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3025, TARGET_ENE_0, 9999, 0, 0) end GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act02 = function (arg0, arg1, arg2) local f4_local0 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) local f4_local1 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f4_local2 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) + 3 local f4_local3 = 100 local f4_local4 = 0 local f4_local5 = 2.5 local f4_local6 = 3 Approach_Act_Flex(arg0, arg1, f4_local0, f4_local1, f4_local2, f4_local3, f4_local4, f4_local5, f4_local6) local f4_local7 = 0 local f4_local8 = 0 arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3004, TARGET_ENE_0, 9999, f4_local7, f4_local8, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act03 = function (arg0, arg1, arg2) local f5_local0 = 2.2 - arg0:GetMapHitRadius(TARGET_SELF) local f5_local1 = 2.2 - arg0:GetMapHitRadius(TARGET_SELF) + 0.3 local f5_local2 = 2.2 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f5_local3 = 0 local f5_local4 = 0 local f5_local5 = 1.5 local f5_local6 = 3 Approach_Act_Flex(arg0, arg1, f5_local0, f5_local1, f5_local2, f5_local3, f5_local4, f5_local5, f5_local6) local f5_local7 = 0 local f5_local8 = 0 local f5_local9 = 180 local f5_local10 = 3 arg0:AddObserveArea(0, TARGET_SELF, TARGET_ENE_0, AI_DIR_TYPE_B, f5_local9, f5_local10) arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3005, TARGET_ENE_0, 9999, f5_local7, f5_local8, 0, 0) arg0:SetTimer(0, 7) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act05 = function (arg0, arg1, arg2) local f6_local0 = 5.9 - arg0:GetMapHitRadius(TARGET_SELF) local f6_local1 = 5.9 - arg0:GetMapHitRadius(TARGET_SELF) local f6_local2 = 5.9 - arg0:GetMapHitRadius(TARGET_SELF) local f6_local3 = 100 local f6_local4 = 0 local f6_local5 = 2.5 local f6_local6 = 3 Approach_Act_Flex(arg0, arg1, f6_local0, f6_local1, f6_local2, f6_local3, f6_local4, f6_local5, f6_local6) local f6_local7 = 0 local f6_local8 = 0 arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3007, TARGET_ENE_0, 9999, f6_local7, f6_local8, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act06 = function (arg0, arg1, arg2) local f7_local0 = 5.2 - arg0:GetMapHitRadius(TARGET_SELF) local f7_local1 = 5.2 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f7_local2 = 5.2 - arg0:GetMapHitRadius(TARGET_SELF) + 3 local f7_local3 = 100 local f7_local4 = 0 local f7_local5 = 1.5 local f7_local6 = 3 Approach_Act_Flex(arg0, arg1, f7_local0, f7_local1, f7_local2, f7_local3, f7_local4, f7_local5, f7_local6) local f7_local7 = 0 local f7_local8 = 0 arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3016, TARGET_ENE_0, 9999, f7_local7, f7_local8, 0, 0) arg0:SetTimer(0, 5) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act09 = function (arg0, arg1, arg2) local f8_local0 = 4.5 - arg0:GetMapHitRadius(TARGET_SELF) local f8_local1 = 4.5 - arg0:GetMapHitRadius(TARGET_SELF) local f8_local2 = 4.5 - arg0:GetMapHitRadius(TARGET_SELF) local f8_local3 = 100 local f8_local4 = 0 local f8_local5 = 1.5 local f8_local6 = 3 Approach_Act_Flex(arg0, arg1, f8_local0, f8_local1, f8_local2, f8_local3, f8_local4, f8_local5, f8_local6) local f8_local7 = 0 local f8_local8 = 0 arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3040, TARGET_ENE_0, 4, f8_local7, f8_local8, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3009, TARGET_ENE_0, 3.5, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3021, TARGET_ENE_0, 3.5, 0) arg0:SetTimer(6, 30) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act10 = function (arg0, arg1, arg2) local f9_local0 = 4.8 - arg0:GetMapHitRadius(TARGET_SELF) local f9_local1 = 4.8 - arg0:GetMapHitRadius(TARGET_SELF) local f9_local2 = 4.8 - arg0:GetMapHitRadius(TARGET_SELF) local f9_local3 = 100 local f9_local4 = 0 local f9_local5 = 10 local f9_local6 = 10 Approach_Act_Flex(arg0, arg1, f9_local0, f9_local1, f9_local2, f9_local3, f9_local4, f9_local5, f9_local6) local f9_local7 = 0 local f9_local8 = 0 arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3006, TARGET_ENE_0, 9999, f9_local7, f9_local8, 0, 0) arg0:SetTimer(3, 10) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act11 = function (arg0, arg1, arg2) local f10_local0 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) local f10_local1 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f10_local2 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) + 3 local f10_local3 = 100 local f10_local4 = 0 local f10_local5 = 3 local f10_local6 = 3 Approach_Act_Flex(arg0, arg1, f10_local0, f10_local1, f10_local2, f10_local3, f10_local4, f10_local5, f10_local6) arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3000, TARGET_ENE_0, 6, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3001, TARGET_ENE_0, 9999, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3002, TARGET_ENE_0, 9999, 0, 0) end Goal.Act15 = function (arg0, arg1, arg2) local f11_local0 = 8.9 - arg0:GetMapHitRadius(TARGET_SELF) local f11_local1 = 8.9 - arg0:GetMapHitRadius(TARGET_SELF) - 2 local f11_local2 = 8.9 - arg0:GetMapHitRadius(TARGET_SELF) local f11_local3 = 100 local f11_local4 = 0 local f11_local5 = 1.5 local f11_local6 = 3 Approach_Act_Flex(arg0, arg1, f11_local0, f11_local1, f11_local2, f11_local3, f11_local4, f11_local5, f11_local6) local f11_local7 = 0 local f11_local8 = 0 local f11_local9 = 7 - arg0:GetMapHitRadius(TARGET_SELF) arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3019, TARGET_ENE_0, f11_local9, f11_local7, f11_local8, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3021, TARGET_ENE_0, 9999, 0, 0) arg0:SetNumber(7, 1) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act16 = function (arg0, arg1, arg2) local f12_local0 = 2.5 - arg0:GetMapHitRadius(TARGET_SELF) local f12_local1 = 2.5 - arg0:GetMapHitRadius(TARGET_SELF) local f12_local2 = 2.5 - arg0:GetMapHitRadius(TARGET_SELF) local f12_local3 = 100 local f12_local4 = 0 local f12_local5 = 1.5 local f12_local6 = 3 local f12_local7 = arg0:GetRandam_Int(1, 100) Approach_Act_Flex(arg0, arg1, f12_local0, f12_local1, f12_local2, f12_local3, f12_local4, f12_local5, f12_local6) local f12_local8 = 0 local f12_local9 = 0 local f12_local10 = 7 - arg0:GetMapHitRadius(TARGET_SELF) arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3026, TARGET_ENE_0, 9999, f12_local8, f12_local9, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3022, TARGET_ENE_0, 9999, f12_local8, f12_local9, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act20 = function (arg0, arg1, arg2) local f13_local0 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) local f13_local1 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) + 1 local f13_local2 = 3.2 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f13_local3 = 100 local f13_local4 = 0 local f13_local5 = 2.5 local f13_local6 = 3 Approach_Act_Flex(arg0, arg1, f13_local0, f13_local1, f13_local2, f13_local3, f13_local4, f13_local5, f13_local6) local f13_local7 = 0 local f13_local8 = 0 arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3009, TARGET_ENE_0, 9999, f13_local7, f13_local8, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3062, TARGET_ENE_0, 9999, f13_local7, f13_local8, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act21 = function (arg0, arg1, arg2) local f14_local0 = 3 local f14_local1 = 45 arg1:AddSubGoal(GOAL_COMMON_Turn, f14_local0, TARGET_ENE_0, f14_local1, -1, GOAL_RESULT_Success, true) GetWellSpace_Odds = 0 return GetWellSpace_Odds end Goal.Act22 = function (arg0, arg1, arg2) local f15_local0 = 3 local f15_local1 = 0 if SpaceCheck(arg0, arg1, -45, 2) == true then if SpaceCheck(arg0, arg1, 45, 2) == true then if arg0:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then arg1:AddSubGoal(GOAL_COMMON_SpinStep, f15_local0, 5202, TARGET_ENE_0, f15_local1, AI_DIR_TYPE_L, 0) else arg1:AddSubGoal(GOAL_COMMON_SpinStep, f15_local0, 5203, TARGET_ENE_0, f15_local1, AI_DIR_TYPE_R, 0) end else arg1:AddSubGoal(GOAL_COMMON_SpinStep, f15_local0, 5202, TARGET_ENE_0, f15_local1, AI_DIR_TYPE_L, 0) end elseif SpaceCheck(arg0, arg1, 45, 2) == true then arg1:AddSubGoal(GOAL_COMMON_SpinStep, f15_local0, 5203, TARGET_ENE_0, f15_local1, AI_DIR_TYPE_R, 0) else end GetWellSpace_Odds = 0 return GetWellSpace_Odds end Goal.Act23 = function (arg0, arg1, arg2) local f16_local0 = arg0:GetDist(TARGET_ENE_0) local f16_local1 = arg0:GetSp(TARGET_SELF) local f16_local2 = 20 local f16_local3 = arg0:GetRandam_Int(1, 100) local f16_local4 = -1 local f16_local5 = 0 if SpaceCheck(arg0, arg1, -90, 1) == true then if SpaceCheck(arg0, arg1, 90, 1) == true then if arg0:IsInsideTargetEx(TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_R, 180, 5) then f16_local5 = 1 else f16_local5 = 0 end else f16_local5 = 0 end elseif SpaceCheck(arg0, arg1, 90, 1) == true then f16_local5 = 1 else end local f16_local6 = arg0:GetRandam_Int(1.5, 3) local f16_local7 = arg0:GetRandam_Int(30, 45) arg0:SetNumber(10, f16_local5) arg1:AddSubGoal(GOAL_COMMON_SidewayMove, f16_local6, TARGET_ENE_0, f16_local5, f16_local7, true, true, f16_local4) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act24 = function (arg0, arg1, arg2) local f17_local0 = arg0:GetDist(TARGET_ENE_0) local f17_local1 = 3 local f17_local2 = 0 local f17_local3 = 5201 local f17_local4 = arg0:GetSpRate(TARGET_SELF) if SpaceCheck(arg0, arg1, 180, 2) == true and SpaceCheck(arg0, arg1, 180, 4) == true then if f17_local0 > 4 then else f17_local3 = 5201 end end arg0:SetNumber(2, 1) local f17_local5 = arg1:AddSubGoal(GOAL_COMMON_SpinStep, f17_local1, f17_local3, TARGET_ENE_0, f17_local2, AI_DIR_TYPE_B, 0) f17_local5:TimingSetTimer(3, 30, AI_TIMING_SET__UPDATE_SUCCESS) if f17_local4 <= 0.7 and arg0:HasSpecialEffectId(TARGET_SELF, 200050) then arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3044, TARGET_ENE_0, DistToAtt1, f17_local2, FrontAngle, 0, 0) end GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act25 = function (arg0, arg1, arg2) local f18_local0 = arg0:GetRandam_Float(2, 4) local f18_local1 = arg0:GetRandam_Float(1, 3) local f18_local2 = arg0:GetDist(TARGET_ENE_0) local f18_local3 = -1 if SpaceCheck(arg0, arg1, 180, 1) == true then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, f18_local0, TARGET_ENE_0, f18_local1, TARGET_ENE_0, true, f18_local3) else end GetWellSpace_Odds = 0 return GetWellSpace_Odds end Goal.Act26 = function (arg0, arg1, arg2) arg1:AddSubGoal(GOAL_COMMON_Wait, 0.5, TARGET_SELF, 0, 0, 0) GetWellSpace_Odds = 0 return GetWellSpace_Odds end Goal.Act27 = function (arg0, arg1, arg2) local f20_local0 = arg0:GetDist(TARGET_ENE_0) local f20_local1 = arg0:GetRandam_Int(1, 100) local f20_local2 = 8 local f20_local3 = 5 local f20_local4 = arg0:GetRandam_Float(2, 4) local f20_local5 = arg0:GetRandam_Int(30, 45) if f20_local0 >= 8 then arg1:AddSubGoal(GOAL_COMMON_ApproachTarget, f20_local4, TARGET_ENE_0, f20_local2, TARGET_ENE_0, true, -1) elseif f20_local0 <= 5 then arg1:AddSubGoal(GOAL_COMMON_LeaveTarget, f20_local4, TARGET_ENE_0, f20_local3, TARGET_ENE_0, true, -1) end arg1:AddSubGoal(GOAL_COMMON_SidewayMove, f20_local4, TARGET_ENE_0, arg0:GetRandam_Int(0, 1), f20_local5, true, true, -1) GetWellSpace_Odds = 0 return GetWellSpace_Odds end Goal.Act28 = function (arg0, arg1, arg2) local f21_local0 = arg0:GetDist(TARGET_ENE_0) local f21_local1 = 1.5 local f21_local2 = 1.5 local f21_local3 = arg0:GetRandam_Int(30, 45) local f21_local4 = -1 local f21_local5 = arg0:GetRandam_Int(0, 1) if f21_local0 <= 3 then arg1:AddSubGoal(GOAL_COMMON_SidewayMove, f21_local1, TARGET_ENE_0, f21_local5, f21_local3, true, true, f21_local4) elseif f21_local0 <= 8 then arg1:AddSubGoal(GOAL_COMMON_ApproachTarget, f21_local2, TARGET_ENE_0, 3, TARGET_SELF, true, -1) else arg1:AddSubGoal(GOAL_COMMON_ApproachTarget, f21_local2, TARGET_ENE_0, 8, TARGET_SELF, false, -1) end GetWellSpace_Odds = 0 return GetWellSpace_Odds end Goal.Act30 = function (arg0, arg1, arg2) arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3009, TARGET_ENE_0, 9999, TurnTime, FrontAngle, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3044, TARGET_ENE_0, DistToAtt1, TurnTime, FrontAngle, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act31 = function (arg0, arg1, arg2) local f23_local0 = 3.6 - arg0:GetMapHitRadius(TARGET_SELF) local f23_local1 = 3.6 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f23_local2 = 3.6 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f23_local3 = 100 local f23_local4 = 0 local f23_local5 = 1.5 local f23_local6 = 3 Approach_Act_Flex(arg0, arg1, f23_local0, f23_local1, f23_local2, f23_local3, f23_local4, f23_local5, f23_local6) local f23_local7 = 0 local f23_local8 = 0 local f23_local9 = 999 - arg0:GetMapHitRadius(TARGET_SELF) arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3003, TARGET_ENE_0, f23_local9, f23_local7, f23_local8, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, 9999, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act34 = function (arg0, arg1, arg2) local f24_local0 = 5.9 - arg0:GetMapHitRadius(TARGET_SELF) local f24_local1 = 5.9 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f24_local2 = 5.9 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f24_local3 = 100 local f24_local4 = 0 local f24_local5 = 1.5 local f24_local6 = 3 Approach_Act_Flex(arg0, arg1, f24_local0, f24_local1, f24_local2, f24_local3, f24_local4, f24_local5, f24_local6) local f24_local7 = 0 local f24_local8 = 0 local f24_local9 = 999 - arg0:GetMapHitRadius(TARGET_SELF) arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3007, TARGET_ENE_0, f24_local9, f24_local7, f24_local8, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3011, TARGET_ENE_0, 9999, 0, 0) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Act48 = function (arg0, arg1, arg2) local f25_local0 = 8.9 - arg0:GetMapHitRadius(TARGET_SELF) local f25_local1 = 8.9 - arg0:GetMapHitRadius(TARGET_SELF) - 2 local f25_local2 = 8.9 - arg0:GetMapHitRadius(TARGET_SELF) local f25_local3 = 100 local f25_local4 = 0 local f25_local5 = 1.5 local f25_local6 = 3 Approach_Act_Flex(arg0, arg1, f25_local0, f25_local1, f25_local2, f25_local3, f25_local4, f25_local5, f25_local6) local f25_local7 = 0 local f25_local8 = 0 local f25_local9 = 7 - arg0:GetMapHitRadius(TARGET_SELF) arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3019, TARGET_ENE_0, f25_local9, f25_local7, f25_local8, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3003, TARGET_ENE_0, 9999, 0, 0) arg0:SetNumber(7, 1) GetWellSpace_Odds = 100 return GetWellSpace_Odds end Goal.Interrupt = function (arg0, arg1, arg2) local SP_REAC = arg1:GetSpecialEffectActivateInterruptType(0) local f26_local1 = arg1:GetSpecialEffectInactivateInterruptType(0) local f26_local2 = arg1:GetDist(TARGET_ENE_0) local f26_local3 = arg1:GetRandam_Int(1, 100) local f26_local4 = arg1:GetNinsatsuNum() if arg1:IsLadderAct(TARGET_SELF) then return false end if not arg1:HasSpecialEffectId(TARGET_SELF, 200004) then return false end if arg1:IsInterupt(INTERUPT_ParryTiming) then return arg0.Parry(arg1, arg2, 100, 0) end if arg1:IsInterupt(INTERUPT_ShootImpact) and arg0.ShootReaction(arg1, arg2) then return true end if arg1:IsInterupt(INTERUPT_ActivateSpecialEffect) then --The following LUA code should be called in the case of any interrupt --end of common functionality code if SP_REAC == 3710020 then arg1:SetNumber(0, 0) return true elseif SP_REAC == 110010 then --sekiro ded interrupt arg2:ClearSubGoal() arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3046, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif SP_REAC == 60010 then --sekiro ran away interrupt local distanceVAR=arg1:GetDist(TARGET_ENE_0) if distanceVAR>=4 then arg2:ClearSubGoal() local choose=arg1:GetRandam_Int(1, 100) if choose>=80 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3036, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif choose>=50 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3014, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3015, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif choose>=30 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3019, TARGET_ENE_0, 9999, 0, 0, 0, 0) end end elseif SP_REAC == 60009 then --fp main interrupt local inter=arg1:GetRandam_Int(1, 100) if arg1:GetDist(TARGET_ENE_0)>4 then inter=99 end if inter >=20 then arg2:ClearSubGoal() local dist=arg1:GetDist(TARGET_ENE_0) if dist >=3 then --do ranged interrupt here local gap_close=arg1:GetRandam_Int(1, 100) if gap_close>=70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) end else local melee =arg1:GetRandam_Int(1, 100) if melee>=70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3022, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif melee>=40 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3010, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif melee>=15 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3026, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3020, TARGET_ENE_0, 9999, 0, 0, 0, 0) end --do melee interrupt here end end elseif SP_REAC == 5007 then --four arrow interrupt if arg1:GetRandam_Int(1,100)>10 then arg2:ClearSubGoal() if f26_local3>75 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3049, TARGET_ENE_0, 9999, 0, 0, 0, 0)--floating passage--added hyper armour else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0)--chasing slice--added hyper armour end end elseif SP_REAC == 60007 then --3006 attack type follow up arg2:ClearSubGoal() local main_dec=arg1:GetRandam_Int(1,100) if main_dec > 85 then --do this local meleeAttck=arg1:GetRandam_Int(1, 100) if meleeAttck>70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3022, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif meleeAttck>50 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3062, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif meleeAttck>20 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3026, TARGET_ENE_0, 9999, 0, 0, 0, 0) --do this else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3020, TARGET_ENE_0, 9999, 0, 0, 0, 0) --do this end else --do this local subDec=arg1:GetRandam_Int(1,100) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) if subDec>30 then --do this arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3041, TARGET_ENE_0, 9999, 0, 0, 0, 0) else local dd=arg1:GetRandam_Int(1, 100) if dd > 40 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3062, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif dd>30 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3010, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3022, TARGET_ENE_0, 9999, 0, 0, 0, 0) end --do this end end elseif SP_REAC == 60006 then --thrust downward interrupt arg2:ClearSubGoal() local dist1=arg1:GetDist(TARGET_ENE_0) if dist1>=4 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) end arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) local decision2=arg1:GetRandam_Int(1,100) if decision2>65 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) if decision2>=75 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3041, TARGET_ENE_0, 9999, 0, 0, 0, 0) end arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3062, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif decision2>50 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3032, TARGET_ENE_0, 9999, 0, 0, 0, 0) local dec_mak1=arg1:GetRandam_Int(1, 100) local dec_mak2=arg1:GetRandam_Int(1, 100) local dec_mak3=arg1:GetRandam_Int(1, 100) if dec_mak1>85 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3034, TARGET_ENE_0, 9999, 0, 0, 0, 0) end arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3036, TARGET_ENE_0, 9999, 0, 0, 0, 0) if dec_mak3>60 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3044, TARGET_ENE_0, 9999, 0, 0, 0, 0) end arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif decision2>25 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3025, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif decision2>15 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3067, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3022, TARGET_ENE_0, 9999, 0, 0, 0, 0) end -- local rng=arg1:GetRandam_Int(1, 100) -- if rng>40 then -- local ddd=arg1:GetRandam_Int(1, 100) -- if ddd>40 then -- arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0)--follow up slash--added hyper armour -- elseif ddd>20 then -- arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0)--chasing slice--added hyper armour -- else -- arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3049, TARGET_ENE_0, 9999, 0, 0, 0, 0)--floating passage -- end --else --arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3044, TARGET_ENE_0, 9999, 0, 0, 0, 0) --end -- elseif decision>25 then -- arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3022, TARGET_ENE_0, 9999, 0, 0, 0, 0) -- elseif decision>15 then -- arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3067, TARGET_ENE_0, 9999, 0, 0, 0, 0) -- else -- arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3062, TARGET_ENE_0, 9999, 0, 0, 0, 0) --end elseif SP_REAC == 5006 then --elbow thrust arg2:ClearSubGoal() arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3003, TARGET_ENE_0, 9999, 0, 0, 0, 0) local cancelAttck1=arg1:GetRandam_Int(1, 100) if cancelAttck1>=62 then if arg1:GetRandam_Int(1, 100)>=18 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) end local chckA=arg1:GetRandam_Int(1, 100) if chckA>=50 then --combo1 arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3041, TARGET_ENE_0, 9999, 0, 0, 0, 0) else --combo2 arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3010, TARGET_ENE_0, 9999, 0, 0, 0, 0) end end arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3061, TARGET_ENE_0, 9999, 0, 0, 0, 0) if f26_local3>35 then local gap_close=arg1:GetRandam_Int(1, 100) if gap_close>=70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3049, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif gap_close>=40 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif gap_close>=15 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3019, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) end else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3044, TARGET_ENE_0, 9999, 0, 0, 0, 0) end elseif SP_REAC == 5004 then --mikiri interrupt arg2:ClearSubGoal() if f26_local3>70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3022, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif f26_local3>50 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3026, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3020, TARGET_ENE_0, 9999, 0, 0, 0, 0) end elseif SP_REAC == 5003 then --fp recoil arg2:ClearSubGoal() local distanceVAR=arg1:GetDist(TARGET_ENE_0) local prob1=arg1:GetRandam_Int(1, 100) if distanceVAR>4 then if prob1>40 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif prob1>30 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3019, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) end else local decision =arg1:GetRandam_Int(1, 100) if decision>=80 then local deca=arg1:GetRandam_Int(1, 100) if deca>40 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3022, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3018, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3015, TARGET_ENE_0, 9999, 0, 0, 0, 0) end elseif decision>=48 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3026, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif decision>=20 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3002, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3062, TARGET_ENE_0, 9999, 0, 0, 0, 0) end end elseif SP_REAC == 60008 then --knockback interrupt arg2:ClearSubGoal() arg2:AddSubGoal(GOAL_COMMON_AttackImmediateAction, 3, 3044, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif SP_REAC == 5021 then --knockback interrupt arg2:ClearSubGoal() local makeDec=arg1:GetDist(TARGET_ENE_0) if makeDec>=3 then local choose=arg1:GetRandam_Int(1, 100) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3036, TARGET_ENE_0, 9999, 0, 0, 0, 0) if choose>=70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif choose>=50 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3019, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif choose>=30 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3014, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3015, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) end else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3027, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3014, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3015, TARGET_ENE_0, 9999, 0, 0, 0, 0) end elseif SP_REAC == 60000 or SP_REAC == 5005 then --3019 or chasing slice follow up, respectively arg2:ClearSubGoal() local chance1=arg1:GetRandam_Int(1, 100) if SP_REAC == 5005 and chance1 >= 65 then local chance2=arg1:GetRandam_Int(1, 100); if chance2>=30 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3026, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3020, TARGET_ENE_0, 9999, 0, 0, 0, 0) end else local probs=arg1:GetRandam_Int(1, 100) local prob2=arg1:GetRandam_Int(1, 100) if prob2>=70 then local decisionMAKER=arg1:GetRandam_Int(1, 100) local he= arg1:GetRandam_Int(1, 100) if he>45 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3032, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3034, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3029, TARGET_ENE_0, 9999, 0, 0, 0, 0) if decisionMAKER>=50 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3034, TARGET_ENE_0, 9999, 0, 0, 0, 0) end end if decisionMAKER>=70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3036, TARGET_ENE_0, 9999, 0, 0, 0, 0) end if probs>80 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3044, TARGET_ENE_0, 9999, 0, 0, 0, 0) end local chooseC=arg1:GetRandam_Int(1, 100) if chooseC>=70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif chooseC>=35 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3049, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) end else local deffo=arg1:GetRandam_Int(1, 100) if deffo>=55 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3041, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif SP_REAC ==60000 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3036, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3031, TARGET_ENE_0, 9999, 0, 0, 0, 0) local pro=arg1:GetRandam_Int(1, 100) if pro>=65 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3036, TARGET_ENE_0, 9999, 0, 0, 0, 0) end local pro2=arg1:GetRandam_Int(1, 100) if pro2>=70 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3015, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) end end end end elseif SP_REAC == 60001 then arg2:ClearSubGoal() local makeDec=arg1:GetRandam_Int(1,100) if makeDec>70 then arg2:AddSubGoal(GOAL_COMMON_AttackImmediateAction, 3, 3036, TARGET_ENE_0, 9999, 0, 0, 0, 0) arg2:AddSubGoal(GOAL_COMMON_AttackImmediateAction, 3, 3049, TARGET_ENE_0, 9999, 0, 0, 0, 0) elseif makeDec>40 then arg2:AddSubGoal(GOAL_COMMON_AttackImmediateAction, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_AttackImmediateAction, 3, 3006, TARGET_ENE_0, 9999, 0, 0, 0, 0) end elseif SP_REAC == 3710030 and arg1:HasSpecialEffectId(TARGET_SELF, 3710032) then arg2:ClearSubGoal() arg2:AddSubGoal(GOAL_COMMON_EndureAttack, 5, 3092, TARGET_ENE_0, 9999, 0) arg1:SetTimer(6, 50) return true elseif SP_REAC == 5029 then return arg0.Damaged(arg1, arg2) elseif SP_REAC == 5031 then if f26_local4 <= 1 and f26_local2 >= 4.1 then arg2:ClearSubGoal() arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 5, 3017, TARGET_ENE_0, 9999, 0) end elseif SP_REAC == 3710050 then if f26_local3 <= 50 and arg1:HasSpecialEffectId(TARGET_SELF, 200050) then arg2:ClearSubGoal() arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 5, 3023, TARGET_ENE_0, 9999, 0) else arg2:ClearSubGoal() arg2:AddSubGoal(GOAL_COMMON_SidewayMove, 4, TARGET_ENE_0, arg1:GetRandam_Int(0, 1), arg1:GetRandam_Int(30, 45), true, true, -1) end elseif SP_REAC == 110620 then arg1:Replanning() return true end end if Interupt_Use_Item(arg1, 8, 5) then if arg1:HasSpecialEffectId(TARGET_SELF, 200051) and f26_local4 >= 2 then else arg2:ClearSubGoal()--put anti-heal condition here if f26_local2<=5 then arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3026, TARGET_ENE_0, 9999, 0, 0, 0, 0) else arg2:AddSubGoal(GOAL_COMMON_ComboRepeat, 3, 3038, TARGET_ENE_0, 9999, 0, 0, 0, 0) end return true end end return false end Goal.Parry = function (arg0, arg1, arg2, arg3) local f27_local0 = arg0:GetDist(TARGET_ENE_0) local f27_local1 = GetDist_Parry(arg0) local f27_local2 = arg0:GetRandam_Int(1, 100) local f27_local3 = arg0:GetRandam_Int(1, 100) local f27_local4 = arg0:GetRandam_Int(1, 100) local f27_local5 = arg0:HasSpecialEffectId(TARGET_ENE_0, 109970) local f27_local6 = arg0:HasSpecialEffectId(TARGET_ENE_0, COMMON_SP_EFFECT_PC_ATTACK_RUSH) local f27_local7 = 2 if arg0:HasSpecialEffectId(TARGET_SELF, 221000) then f27_local7 = 0 elseif arg0:HasSpecialEffectId(TARGET_SELF, 221001) then f27_local7 = 1 end if arg0:IsFinishTimer(AI_TIMER_PARRY_INTERVAL) == false then return false end if not not arg0:HasSpecialEffectId(TARGET_ENE_0, 110450) or not not arg0:HasSpecialEffectId(TARGET_ENE_0, 110501) or arg0:HasSpecialEffectId(TARGET_ENE_0, 110500) then return false end arg0:SetTimer(AI_TIMER_PARRY_INTERVAL, 0.1) if arg2 == nil then arg2 = 50 end if arg3 == nil then arg3 = 0 end if arg0:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_F, 90) and arg0:IsInsideTargetEx(TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_F, 180, f27_local1) then if arg0:HasSpecialEffectId(TARGET_SELF, 3710040) then arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_EndureAttack, 0.3, 3102, TARGET_ENE_0, 9999, 0) arg0:SetTimer(5, 60) return true elseif f27_local6 then arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_EndureAttack, 0.3, 3103, TARGET_ENE_0, 9999, 0) return true elseif f27_local5 then if arg0:IsTargetGuard(TARGET_SELF) and ReturnKengekiSpecialEffect(arg0) == false then return false elseif f27_local7 == 2 then return false elseif f27_local7 == 1 then if f27_local2 <= 50 then arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_SpinStep, 1, 5211, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) return true end elseif f27_local7 == 0 and f27_local2 <= 100 then arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_EndureAttack, 0.3, 3101, TARGET_ENE_0, 9999, 0) return true end elseif arg0:HasSpecialEffectId(TARGET_ENE_0, 109980) then arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_SpinStep, 1, 5201, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) return true elseif f27_local3 <= Get_ConsecutiveGuardCount(arg0) * arg2 then arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_EndureAttack, 0.3, 3101, TARGET_ENE_0, 9999, 0) return true else arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_EndureAttack, 0.3, 3100, TARGET_ENE_0, 9999, 0) return true end elseif arg0:IsInsideTargetEx(TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_F, 90, f27_local1 + 1) then if f27_local4 <= arg3 then arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_SpinStep, 1, 5211, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) return true else return false end else return false end end Goal.Damaged = function (arg0, arg1, arg2) local f28_local0 = arg0:GetHpRate(TARGET_SELF) local f28_local1 = arg0:GetDist(TARGET_ENE_0) local f28_local2 = arg0:GetSp(TARGET_SELF) local f28_local3 = arg0:GetRandam_Int(1, 100) local f28_local4 = 0 local f28_local5 = 3 if f28_local3 <= 15 then --arg1:ClearSubGoal() local f28_local6 = arg1:AddSubGoal(GOAL_COMMON_SpinStep, f28_local5, 5201, TARGET_ENE_0, TurnTime, AI_DIR_TYPE_B, 0) f28_local6:TimingSetTimer(3, 6, UPDATE_SUCCESS) arg0:SetNumber(2, 1) if arg0:GetNumber(0) <= 3 then arg0:SetNumber(0, 0) else arg0:SetNumber(0, arg0:GetNumber(0) - 3) end return true elseif f28_local3 <= 30 and arg0:HasSpecialEffectId(TARGET_SELF, 200050) then --arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3009, TARGET_ENE_0, 9999, 0) arg0:SetNumber(2, 1) if arg0:GetNumber(0) <= 3 then arg0:SetNumber(0, 0) else arg0:SetNumber(0, arg0:GetNumber(0) - 3) end return true end return false end Goal.ShootReaction = function (arg0, arg1) --arg1:ClearSubGoal() --arg1:AddSubGoal(GOAL_COMMON_EndureAttack, 0.1, 3100, TARGET_ENE_0, 9999, 0) arg1:AddSubGoal(GOAL_COMMON_EndureAttack, 3, 3038, TARGET_ENE_0, 9999, 0) return true end Goal.Kengeki_Activate = function (arg0, arg1, arg2, arg3) local f30_local0 = ReturnKengekiSpecialEffect(arg1) if f30_local0 == 0 then return false end local f30_local1 = {} local f30_local2 = {} local f30_local3 = {} Common_Clear_Param(f30_local1, f30_local2, f30_local3) local f30_local4 = arg1:GetDist(TARGET_ENE_0) local f30_local5 = arg1:GetHpRate(TARGET_SELF) local f30_local6 = arg1:GetSpRate(TARGET_SELF) if f30_local0 == 200200 then arg1:SetNumber(0, arg1:GetNumber(0) + 1) if f30_local4 >= 2.5 then f30_local1[50] = 100 elseif arg1:GetNumber(0) >= 2 then f30_local1[3] = 60 f30_local1[20] = 60 f30_local1[30] = 5 f30_local1[38] = 50 f30_local1[15] = 30 f30_local1[43] = 50 f30_local1[39] = 30 if arg1:GetNumber(6) == 0 then f30_local1[32] = 20 else f30_local1[33] = 20 end elseif arg1:GetNumber(3) == 0 then f30_local1[1] = 50 else f30_local1[4] = 100 end elseif f30_local0 == 200201 then if f30_local4 >= 2.5 then f30_local1[50] = 100 elseif arg1:GetNumber(0) >= 2 then f30_local1[3] = 60 f30_local1[20] = 60 f30_local1[38] = 50 f30_local1[15] = 30 f30_local1[43] = 50 f30_local1[39] = 30 if arg1:GetNumber(6) == 0 then f30_local1[32] = 50 else f30_local1[33] = 50 end elseif arg1:GetNumber(3) == 0 then f30_local1[1] = 50 else f30_local1[4] = 100 end elseif f30_local0 == 200210 then f30_local1[2] = 100 f30_local1[17] = 100 f30_local1[38] = 50 f30_local1[31] = 50 elseif f30_local0 == 200211 then f30_local1[2] = 100 f30_local1[10] = 50 f30_local1[31] = 50 f30_local1[38] = 50 elseif f30_local0 == 200216 then if f30_local4 >= 2 then f30_local1[50] = 10 else arg1:SetNumber(0, arg1:GetNumber(0) + 1) if arg1:GetNumber(0) >= 3 then f30_local1[3] = 60 f30_local1[20] = 20 f30_local1[38] = 100 f30_local1[43] = 50 if arg1:GetNumber(6) == 0 then f30_local1[32] = 50 else f30_local1[33] = 50 end else f30_local1[20] = 50 if arg1:GetNumber(3) == 0 then f30_local1[1] = 50 else f30_local1[14] = 50 end end end elseif f30_local0 == 200215 then if f30_local4 >= 2 then f30_local1[50] = 10 else arg1:SetNumber(0, arg1:GetNumber(0) + 1) if arg1:GetNumber(0) >= 3 then f30_local1[20] = 20 f30_local1[38] = 30 f30_local1[31] = 15 f30_local1[43] = 10 f30_local1[39] = 10 if arg1:GetNumber(6) == 0 then f30_local1[32] = 50 else f30_local1[33] = 50 end else f30_local1[20] = 50 if arg1:GetNumber(3) == 0 then f30_local1[1] = 50 else f30_local1[14] = 50 end end end end if arg1:HasSpecialEffectId(TARGET_SELF, 200051) then f30_local1[3] = 0 f30_local1[9] = 0 f30_local1[15] = 0 f30_local1[32] = 0 f30_local1[33] = 0 f30_local1[39] = 0 f30_local1[46] = 0 elseif arg1:HasSpecialEffectId(TARGET_SELF, 200050) then f30_local1[20] = 0 end if SpaceCheck(arg1, arg2, 45, 2) == false and SpaceCheck(arg1, arg2, -45, 2) == false then f30_local1[20] = 0 end if arg1:IsFinishTimer(6) == false then f30_local1[40] = 0 elseif arg1:IsFinishTimer(6) == true and f30_local5 <= 0.75 then f30_local1[40] = 50 end f30_local1[1] = SetCoolTime(arg1, arg2, 3050, 8, f30_local1[1], 1) f30_local1[2] = SetCoolTime(arg1, arg2, 5201, 10, f30_local1[2], 1) f30_local1[3] = SetCoolTime(arg1, arg2, 3009, 10, f30_local1[3], 1) f30_local1[4] = SetCoolTime(arg1, arg2, 3055, 8, f30_local1[4], 1) f30_local1[7] = SetCoolTime(arg1, arg2, 3060, 8, f30_local1[7], 1) f30_local1[9] = SetCoolTime(arg1, arg2, 3018, 8, f30_local1[9], 1) f30_local1[10] = SetCoolTime(arg1, arg2, 3065, 8, f30_local1[10], 1) f30_local1[13] = SetCoolTime(arg1, arg2, 3075, 8, f30_local1[13], 1) f30_local1[14] = SetCoolTime(arg1, arg2, 3076, 8, f30_local1[14], 1) f30_local1[15] = SetCoolTime(arg1, arg2, 3031, 15, f30_local1[15], 1) f30_local1[17] = SetCoolTime(arg1, arg2, 3071, 8, f30_local1[17], 1) f30_local1[18] = SetCoolTime(arg1, arg2, 3004, 8, f30_local1[18], 1) f30_local1[20] = SetCoolTime(arg1, arg2, 5202, 15, f30_local1[20], 1) f30_local1[30] = SetCoolTime(arg1, arg2, 3063, 15, f30_local1[30], 1) f30_local1[31] = SetCoolTime(arg1, arg2, 3068, 15, f30_local1[31], 1) f30_local1[32] = SetCoolTime(arg1, arg2, 3018, 15, f30_local1[32], 1) f30_local1[33] = SetCoolTime(arg1, arg2, 3007, 15, f30_local1[33], 1) f30_local1[34] = SetCoolTime(arg1, arg2, 3037, 15, f30_local1[34], 1) f30_local1[35] = SetCoolTime(arg1, arg2, 3016, 8, f30_local1[35], 1) f30_local1[38] = SetCoolTime(arg1, arg2, 3030, 8, f30_local1[38], 1) f30_local1[39] = SetCoolTime(arg1, arg2, 3034, 15, f30_local1[39], 1) f30_local1[40] = SetCoolTime(arg1, arg2, 3028, 15, f30_local1[40], 1) f30_local1[41] = SetCoolTime(arg1, arg2, 3020, 15, f30_local1[41], 1) f30_local1[43] = SetCoolTime(arg1, arg2, 3062, 15, f30_local1[43], 1) f30_local1[44] = SetCoolTime(arg1, arg2, 3067, 15, f30_local1[44], 1) f30_local1[45] = SetCoolTime(arg1, arg2, 3032, 15, f30_local1[45], 1) f30_local2[1] = REGIST_FUNC(arg1, arg2, arg0.Kengeki01) f30_local2[2] = REGIST_FUNC(arg1, arg2, arg0.Kengeki02) f30_local2[3] = REGIST_FUNC(arg1, arg2, arg0.Kengeki03) f30_local2[4] = REGIST_FUNC(arg1, arg2, arg0.Kengeki04) f30_local2[5] = REGIST_FUNC(arg1, arg2, arg0.Kengeki05) f30_local2[6] = REGIST_FUNC(arg1, arg2, arg0.Kengeki06) f30_local2[7] = REGIST_FUNC(arg1, arg2, arg0.Kengeki07) f30_local2[9] = REGIST_FUNC(arg1, arg2, arg0.Kengeki09) f30_local2[10] = REGIST_FUNC(arg1, arg2, arg0.Kengeki10) f30_local2[13] = REGIST_FUNC(arg1, arg2, arg0.Kengeki13) f30_local2[14] = REGIST_FUNC(arg1, arg2, arg0.Kengeki14) f30_local2[15] = REGIST_FUNC(arg1, arg2, arg0.Kengeki15) f30_local2[17] = REGIST_FUNC(arg1, arg2, arg0.Kengeki17) f30_local2[18] = REGIST_FUNC(arg1, arg2, arg0.Kengeki18) f30_local2[19] = REGIST_FUNC(arg1, arg2, arg0.Kengeki19) f30_local2[20] = REGIST_FUNC(arg1, arg2, arg0.Kengeki20) f30_local2[21] = REGIST_FUNC(arg1, arg2, arg0.Kengeki21) f30_local2[30] = REGIST_FUNC(arg1, arg2, arg0.Kengeki30) f30_local2[31] = REGIST_FUNC(arg1, arg2, arg0.Kengeki31) f30_local2[32] = REGIST_FUNC(arg1, arg2, arg0.Kengeki32) f30_local2[33] = REGIST_FUNC(arg1, arg2, arg0.Kengeki33) f30_local2[34] = REGIST_FUNC(arg1, arg2, arg0.Kengeki34) f30_local2[35] = REGIST_FUNC(arg1, arg2, arg0.Kengeki35) f30_local2[36] = REGIST_FUNC(arg1, arg2, arg0.Kengeki36) f30_local2[37] = REGIST_FUNC(arg1, arg2, arg0.Kengeki37) f30_local2[38] = REGIST_FUNC(arg1, arg2, arg0.Kengeki38) f30_local2[39] = REGIST_FUNC(arg1, arg2, arg0.Kengeki39) f30_local2[40] = REGIST_FUNC(arg1, arg2, arg0.Kengeki40) f30_local2[41] = REGIST_FUNC(arg1, arg2, arg0.Kengeki41) f30_local2[43] = REGIST_FUNC(arg1, arg2, arg0.Kengeki43) f30_local2[44] = REGIST_FUNC(arg1, arg2, arg0.Kengeki44) f30_local2[45] = REGIST_FUNC(arg1, arg2, arg0.Kengeki45) f30_local2[46] = REGIST_FUNC(arg1, arg2, arg0.Kengeki46) f30_local2[50] = REGIST_FUNC(arg1, arg2, arg0.NoAction) local f30_local7 = REGIST_FUNC(arg1, arg2, arg0.ActAfter_AdjustSpace) return Common_Kengeki_Activate(arg1, arg2, f30_local1, f30_local2, f30_local7, f30_local3) end Goal.Kengeki01 = function (arg0, arg1, arg2) arg0:SetNumber(3, 1) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3050, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki02 = function (arg0, arg1, arg2) local f32_local0 = arg0:GetSpRate(TARGET_SELF) arg1:ClearSubGoal() local f32_local1 = arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 5201, TARGET_ENE_0, 9999, 0, 0) f32_local1:TimingSetTimer(3, 30, AI_TIMING_SET__UPDATE_SUCCESS) arg0:SetNumber(2, 1) if f32_local0 <= 0.7 and arg0:HasSpecialEffectId(TARGET_SELF, 200050) then arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3044, TARGET_ENE_0, DistToAtt1, TurnTime, FrontAngle, 0, 0) end end Goal.Kengeki03 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3009, TARGET_ENE_0, 999, 0, 0, 0, 0) local f33_local0 = 0 if SpaceCheck(arg0, arg1, -90, 1) == true then if SpaceCheck(arg0, arg1, 90, 1) == true then if arg0:IsInsideTargetEx(TARGET_ENE_0, TARGET_SELF, AI_DIR_TYPE_R, 180, 5) then f33_local0 = 1 else f33_local0 = 0 end else f33_local0 = 0 end elseif SpaceCheck(arg0, arg1, 90, 1) == true then f33_local0 = 1 else f33_local0 = 1 end local f33_local1 = 4 local f33_local2 = arg0:GetRandam_Int(30, 45) arg1:AddSubGoal(GOAL_COMMON_SidewayMove, f33_local1, TARGET_ENE_0, f33_local0, f33_local2, true, true, -1) end Goal.Kengeki04 = function (arg0, arg1, arg2) arg0:SetNumber(3, 0) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3055, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki07 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3060, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki09 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3018, TARGET_ENE_0, 999, 0, 0, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki10 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3065, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki13 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3075, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki14 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3076, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki15 = function (arg0, arg1, arg2) local f40_local0 = 0 local f40_local1 = 0 local f40_local2 = 7.8 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f40_local3 = 0 f40_local3 = 2.5 - arg0:GetMapHitRadius(TARGET_SELF) local f40_local4 = arg0:GetRandam_Int(1, 100) local f40_local5 = arg0:GetRandam_Int(1, 100) local f40_local6 = arg0:GetSp(TARGET_SELF) local f40_local7 = arg0:GetRandam_Int(30, 45) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3031, TARGET_ENE_0, f40_local2, f40_local0, f40_local1, 0, 0) if f40_local4 <= 50 then arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3019, TARGET_ENE_0, f40_local3, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3029, TARGET_ENE_0, 9999, 0, 0) else arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3036, TARGET_ENE_0, 9999, 0, 0) end if f40_local5 <= 50 then arg0:SetNumber(2, 1) end end Goal.Kengeki17 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3071, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki18 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3004, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki19 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3044, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki20 = function (arg0, arg1, arg2) local f44_local0 = arg0:GetDist(TARGET_ENE_0) local f44_local1 = 3 local f44_local2 = 0 if SpaceCheck(arg0, arg1, -135, 1) == true then if SpaceCheck(arg0, arg1, 135, 1) == true then if arg0:IsInsideTarget(TARGET_ENE_0, AI_DIR_TYPE_R, 180) then f44_local2 = 1 else f44_local2 = 0 end else f44_local2 = 0 end elseif SpaceCheck(arg0, arg1, 90, 1) == true then f44_local2 = 1 else end arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_SpinStep, f44_local1, 5202, TARGET_ENE_0, 0, AI_DIR_TYPE_B, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3007, TARGET_ENE_0, 9999, 0, 0) return GETWELLSPACE_ODDS end Goal.Kengeki21 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3010, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki30 = function (arg0, arg1, arg2) arg1:ClearSubGoal() local f46_local0 = arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3063, TARGET_ENE_0, 9999, 0, 0) f46_local0:TimingSetTimer(1, 10, AI_TIMING_SET__UPDATE_SUCCESS) arg0:SetNumber(5, 0) end Goal.Kengeki31 = function (arg0, arg1, arg2) arg1:ClearSubGoal() local f47_local0 = arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3068, TARGET_ENE_0, 9999, 0, 0) f47_local0:TimingSetTimer(1, 10, AI_TIMING_SET__UPDATE_SUCCESS) arg0:SetNumber(5, 0) end Goal.Kengeki32 = function (arg0, arg1, arg2) local f48_local0 = 0 local f48_local1 = 0 local f48_local2 = 999 - arg0:GetMapHitRadius(TARGET_SELF) local f48_local3 = 7 - arg0:GetMapHitRadius(TARGET_SELF) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3018, TARGET_ENE_0, f48_local2, f48_local0, f48_local1, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, 9999, 0, 0) arg0:SetNumber(6, 1) end Goal.Kengeki33 = function (arg0, arg1, arg2) local f49_local0 = 0 local f49_local1 = 0 local f49_local2 = 999 - arg0:GetMapHitRadius(TARGET_SELF) local f49_local3 = 7.8 - arg0:GetMapHitRadius(TARGET_SELF) local f49_local4 = 2.5 - arg0:GetMapHitRadius(TARGET_SELF) local f49_local5 = arg0:GetRandam_Int(1, 100) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3018, TARGET_ENE_0, f49_local2, f49_local0, f49_local1, 0, 0) if f49_local5 <= 50 then arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3019, TARGET_ENE_0, f49_local3, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3029, TARGET_ENE_0, 9999, 0, 0) else arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3019, TARGET_ENE_0, 9999, 0, 0) end arg0:SetNumber(6, 0) end Goal.Kengeki34 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3037, TARGET_ENE_0, 6, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3020, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki35 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3016, TARGET_ENE_0, 9999, 0, 0) arg0:SetNumber(5, 0) end Goal.Kengeki38 = function (arg0, arg1, arg2) local f52_local0 = 0 local f52_local1 = 0 local f52_local2 = arg0:GetNinsatsuNum() local f52_local3 = arg0:GetRandam_Int(1, 100) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3030, TARGET_ENE_0, 999, f52_local0, f52_local1, 0, 0) if f52_local2 <= 1 then if f52_local3 <= 75 then arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3067, TARGET_ENE_0, 9999, 0, 0) else arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3025, TARGET_ENE_0, 9999, 0, 0) end else arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3025, TARGET_ENE_0, 9999, 0, 0) end end Goal.Kengeki39 = function (arg0, arg1, arg2) local f53_local0 = 0 local f53_local1 = 0 local f53_local2 = 999 - arg0:GetMapHitRadius(TARGET_SELF) local f53_local3 = arg0:GetDist(TARGET_ENE_0) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboAttackTunableSpin, 10, 3034, TARGET_ENE_0, f53_local2, f53_local0, f53_local1, 0, 0) arg1:AddSubGoal(GOAL_COMMON_ComboRepeat, 10, 3036, TARGET_ENE_0, 999, 0) arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3015, TARGET_ENE_0, 9999, 0, 0) end Goal.Kengeki40 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3028, TARGET_ENE_0, 9999, 0, 0) arg0:SetTimer(6, 50) end Goal.Kengeki43 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3062, TARGET_ENE_0, 9999, 0, 0) arg0:SetNumber(2, 1) end Goal.Kengeki44 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3067, TARGET_ENE_0, 9999, 0, 0) arg0:SetNumber(2, 1) end Goal.Kengeki45 = function (arg0, arg1, arg2) arg1:ClearSubGoal() arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3045, TARGET_ENE_0, 9999, 0, 0) arg0:SetNumber(0, 0) end Goal.Kengeki46 = function (arg0, arg1, arg2) local f58_local0 = 0 local f58_local1 = 0 local f58_local2 = 7.8 - arg0:GetMapHitRadius(TARGET_SELF) + 2 local f58_local3 = 0 f58_local3 = arg0:GetRandam_Int(1, 100) local f58_local4 = arg0:GetSp(TARGET_SELF) local f58_local5 = arg0:GetRandam_Int(30, 45) arg1:ClearSubGoal() local f58_local6 = arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3039, TARGET_ENE_0, 9999, 0, 0) f58_local6:TimingSetTimer(4, 10, AI_TIMING_SET__UPDATE_SUCCESS) arg1:AddSubGoal(GOAL_COMMON_SidewayMove, 2.5, TARGET_ENE_0, 0, f58_local5, true, true, -1) end Goal.Kengeki47 = function (arg0, arg1, arg2) arg1:ClearSubGoal() local f59_local0 = arg1:AddSubGoal(GOAL_COMMON_ComboFinal, 10, 3038, TARGET_ENE_0, 9999, 0, 0) f59_local0:TimingSetTimer(4, 10, AI_TIMING_SET__UPDATE_SUCCESS) end Goal.NoAction = function (arg0, arg1, arg2) return -1 end Goal.ActAfter_AdjustSpace = function (arg0, arg1, arg2) end Goal.Update = function (arg0, arg1, arg2) return Update_Default_NoSubGoal(arg0, arg1, arg2) end Goal.Terminate = function (arg0, arg1, arg2) end
slot0 = class("LoadingPanel", import("..base.BaseUI")) slot0.Ctor = function (slot0, slot1) slot0.super.Ctor(slot0) seriesAsync({ function (slot0) slot0:preload(slot0) end }, function () PoolMgr.GetInstance():GetUI("Loading", true, function (slot0) slot0.transform:SetParent(GameObject.Find("Overlay/UIOverlay").transform, false) slot0:SetActive(false) slot0:onUILoaded(slot0) GameObject.Find("Overlay/UIOverlay")() end) end) end slot0.preload = function (slot0, slot1) slot0.isCri, slot0.bgPath = getLoginConfig() if slot0.isCri then LoadAndInstantiateAsync("effect", slot0.bgPath, function (slot0) slot0.criBgGo = slot0 if slot0 then slot1() end end) else LoadSpriteAsync("loadingbg/" .. slot0.bgPath, function (slot0) slot0.staticBgSprite = slot0 if slot0 then slot1() end end) end end slot0.init = function (slot0) slot0.infos = slot0:findTF("infos") slot0.infoTpl = slot0:getTpl("infos/info_tpl") slot0.indicator = slot0:findTF("load") slot0.bg = slot0:findTF("BG") slot0.logo = slot0:findTF("logo") slot0:displayBG(true) end slot0.appendInfo = function (slot0, slot1) setText(slot2, slot1) slot4 = LeanTween.alphaCanvas(slot3, 0, 0.3) slot4:setDelay(1.5) slot4:setOnComplete(System.Action(function () destroy(destroy) end)) end slot0.onLoading = function (slot0) return slot0._go.activeInHierarchy end slot1 = 0 slot0.on = function (slot0, slot1) setImageAlpha(slot0._tf, (defaultValue(slot1, true) and 0.01) or 0) if slot1 then pg.TimeMgr.GetInstance():RemoveTimer(slot0.delayTimer) slot0.delayTimer = pg.TimeMgr.GetInstance():AddTimer("loading", 1, 0, function () setImageAlpha(slot0._tf, 0.2) setActive(slot0.indicator, true) setActive.delayTimer = nil end) else setActive(slot0.indicator, false) end if slot0 + 1 > 0 then setActive(slot0._go, true) slot0._go.transform.SetAsLastSibling(slot2) end end slot0.off = function (slot0) if slot0 > 0 and slot0 - 1 == 0 then setActive(slot0._go, false) setActive(slot0.indicator, false) pg.TimeMgr.GetInstance():RemoveTimer(slot0.delayTimer) slot0.delayTimer = nil end end slot0.displayBG = function (slot0, slot1) setActive(slot0.bg, slot1) setActive(slot0.logo, slot1) slot2 = GetComponent(slot0.bg, "Image") if slot1 then if not slot0.isCri then if IsNil(slot2.sprite) then slot2.sprite = slot0.staticBgSprite end elseif slot0.bg.childCount == 0 then slot2.enabled = false slot0.criBgGo.transform.SetParent(slot3, slot0.bg.transform, false) slot0.criBgGo.transform:SetAsFirstSibling() end else if not slot0.isCri then slot2.sprite = nil else removeAllChildren(slot0.bg) end slot0.criBgGo = nil slot0.staticBgSprite = nil end end slot0.getRetainCount = function (slot0) return slot0 end return slot0
local require = require local type = type local tbl_insert = table.insert local _M = {} function _M:load() -- init module if type(self.init) == "function" then self:init() end self._m__isLoaded = true end function _M:unload() if self._mt_canUnload and self._m__isLoaded then -- terminate module if type(self.terminate) == "function" then self:terminate() end package.loaded[self._mt_modulePath] = nil self._m__isLoaded = false end end function _M.newmeta(moddef, modulePath) return { _mt_name = moddef.name, _mt_modulePath = modulePath, _mt_author = moddef.author, _mt_website = moddef.website, _mt_version = moddef.version, _mt_description = moddef.description, _mt_canReload = moddef.reloadable or false, _mt_canUnload = moddef.reloadable or false, _mt_sandboxed = moddef.sandboxed or false, _mt_dependencies = moddef.dependencies, _mt_loadLater = moddef.loadLater, _mt_classPath = moddef.classPath, _mt_load = _M.load, _mt_unload = _M.unload } end return _M
BeardLib.Items.Slider = BeardLib.Items.Slider or class(BeardLib.Items.Item) local Slider = BeardLib.Items.Slider Slider.type_name = "Slider" function Slider:Init() self.value = self.value or 1 self.size_by_text = false Slider.super.Init(self) self.step = self.step or 1 self.value = tonumber(self.value) or 0 self.min = self.min or self.value self.max = self.max or self.value if self.max or self.min then self.value = math.clamp(self.value, self.min, self.max) end self:WorkParam("floats", 3) self.filter = "number" self.min = self.min or 0 self.max = self.max or self.min local item_width = self.panel:w() * self.control_slice local slider_width = item_width * 0.66 local text_width = item_width - slider_width local fgcolor = self:GetForeground() self._textbox = BeardLib.Items.TextBoxBase:new(self, { lines = 1, btn = "1", panel = self.panel, align = "center", layer = 10, line = false, w = text_width, value = self.value, }) self._slider = self.panel:panel({ w = slider_width, name = "slider", layer = 4, }) local ch = self.size - 4 self.circle = self._slider:bitmap({ name = "circle", w = ch, h = ch, texture = "guis/textures/menu_ui_icons", texture_rect = {92, 1, 34, 34}, layer = 3, color = fgcolor, }) self.circle:set_center_y(self._slider:h() / 2) self.sfg = self._slider:rect({ name = "fg", x = ch / 2, w = self._slider:w() * (self.value / self.max), h = 2, layer = 2, color = fgcolor }) self.sfg:set_center_y(self._slider:h() / 2) self.sbg = self._slider:rect({ name = "bg", x = ch / 2, w = self._slider:w() - ch, h = 2, layer = 1, color = fgcolor:with_alpha(0.25), }) self.sbg:set_center_y(self._slider:h() / 2) self._slider:set_right(self._textbox.panel:x()) self._mouse_pos_x, self._mouse_pos_y = 0,0 self._textbox:PostInit() end function Slider:SetStep(step) self.step = step end function Slider:TextBoxSetValue(value, run_callback, reset_selection, no_format) value = tonumber(value) or 0 if self.max or self.min then value = math.clamp(value, self.min, self.max) end value = tonumber(not no_format and format or value) local final_number = self.floats and string.format("%." .. self.floats .. "f", value) or tostring(value) local text = self._textbox.panel:child("text") self.sfg:set_w(self.sbg:w() * ((value - self.min) / (self.max - self.min))) self._slider:child("circle"):set_center(self.sfg:right(), self.sfg:center_y()) if not no_format then text:set_text(final_number) end if reset_selection then text:set_selection(text:text():len()) end self._before_text = self.value Slider.super.SetValue(self, value, run_callback) end function Slider:SetValue(value, ...) if not self:alive() then return false end if self.value ~= value then self._textbox:add_history_point(value) end self:TextBoxSetValue(value, ...) return true end function Slider:SetValueByPercentage(percent, run_callback) self:SetValue(self.min + (self.max - self.min) * percent, run_callback, true) end function Slider:MouseReleased(b, x, y) self._textbox:MouseReleased(b, x, y) return Slider.super.MouseReleased(self, b,x,y) end function Slider:DoHighlight(highlight) Slider.super.DoHighlight(self, highlight) self._textbox:DoHighlight(highlight) local fgcolor = self:GetForeground(highlight) if self.sfg then if self.animate_colors then play_color(self.sfg, fgcolor) play_color(self.sbg, fgcolor:with_alpha(0.25)) play_color(self.circle, fgcolor) else self.sfg:set_color(fgcolor) self.sbg:set_color(fgcolor:with_alpha(0.25)) self.circle:set_color(fgcolor) end end end local wheel_up = Idstring("mouse wheel up") local wheel_down = Idstring("mouse wheel down") function Slider:MousePressed(button, x, y) local result, state = Slider.super.MousePressed(self, button, x, y) if state == self.UNCLICKABLE or state == self.INTERRUPTED then return result, state end self._textbox:MousePressed(button, x, y) local inside = self._slider:inside(x,y) if inside then local wheelup = (button == wheel_up and 0) or (button == wheel_down and 1) or -1 if self.wheel_control and wheelup ~= -1 then self:SetValue(self.value + ((wheelup == 1) and -self.step or self.step), true, true) return true end if button == self.click_btn then self.menu._slider_hold = self if self.max or self.min then local slider_bg = self._slider:child("bg") local where = (x - slider_bg:world_left()) / (slider_bg:world_right() - slider_bg:world_left()) managers.menu_component:post_event("menu_enter") self:SetValueByPercentage(where, true) end return true end end return result, state end local abs = math.abs function Slider:SetValueByMouseXPos(x) if not alive(self.panel) then return end local slider_bg = self._slider:child("bg") self:SetValueByPercentage((x - slider_bg:world_left()) / (slider_bg:world_right() - slider_bg:world_left()), true) end
local schema = require "lapis.db.schema" local types = schema.types return { function() schema.create_table ("keys", { {"id", types.text}; {"path", types.text}; {"starts", types.time}; {"ends", types.time}; {"max_clicks", types.integer}; {"clicks", types.integer}; "PRIMARY KEY (id)"; }) end; }
print("lib.lua runing") function add(x,y) return x + y end function fnex2(str_a, num_b, num_c) print(str_a) return num_b*100 + num_c*10, "Thank you" end
require 'paths' paths.dofile('util.lua') paths.dofile('img.lua') -------------------------------------------------------------------------------- -- Initialization -------------------------------------------------------------------------------- dataset = arg[1] set = arg[2] a = loadAnnotations(dataset,set) model = arg[3] if model == 'pretrained' then m = torch.load('pose-hg-pascal3d.t7') -- Load pre-trained model else m = torch.load(model) -- Load the specified model m:evaluate() end m:cuda() idxs = torch.range(1,a.nsamples) nsamples = idxs:nElement() -- Displays a convenient progress bar xlua.progress(0,nsamples) predHMs = torch.Tensor(1,102,64,64) expDir = paths.concat('exp',dataset) os.execute('mkdir -p ' .. expDir) -------------------------------------------------------------------------------- -- Main loop -------------------------------------------------------------------------------- for i = 1,nsamples do -- Set up input image local im = image.load('data/' .. dataset .. '/images/' .. a['images'][idxs[i]]) local center = a['center'][idxs[i]] local scale = a['scale'][idxs[i]] local inp = crop(im, center, scale, 0, 256) -- Get network output local out = m:forward(inp:view(1,3,256,256):cuda()) out = applyFn(function (x) return x:clone() end, out) local flippedOut = m:forward(flip(inp:view(1,3,256,256):cuda())) flippedOut = applyFn(function (x) return flip(shuffleLR(x)) end, flippedOut) out = applyFn(function (x,y) return x:add(y):div(2) end, out, flippedOut) cutorch.synchronize() predHMs:copy(out[#out]) local predFile = hdf5.open(paths.concat(expDir, set .. '_' .. idxs[i] .. '.h5'), 'w') predFile:write('heatmaps', predHMs) predFile:close() xlua.progress(i,nsamples) collectgarbage() end
local isDriving = false; local isUnderwater = false; Citizen.CreateThread(function() while true do if Config.UnitOfSpeed == "kmh" then SpeedMultiplier = 3.6 elseif Config.UnitOfSpeed == "mph" then SpeedMultiplier = 2.236936 end Wait(100) end end) --[[ /////////////////////////// SPEEDOMETER /////////////////////////// --]] Citizen.CreateThread(function() while true do Wait(100) local playerPed = PlayerPedId() if isDriving and IsPedInAnyVehicle(playerPed, true) then local veh = GetVehiclePedIsUsing(playerPed, false) local speed = math.floor(GetEntitySpeed(veh) * SpeedMultiplier) local vehhash = GetEntityModel(veh) local maxspeed = GetVehicleModelMaxSpeed(vehhash) * 3.6 SendNUIMessage({ speed = speed, maxspeed = maxspeed }) end end end) Citizen.CreateThread(function() while true do Wait(1000) local playerPed = PlayerPedId() if Config.ShowSpeedo then if IsPedInAnyVehicle(playerPed, false) and not IsPedInFlyingVehicle(playerPed) and not IsPedInAnySub(playerPed) then isDriving = true SendNUIMessage({showSpeedo = true}) elseif not IsPedInAnyVehicle(playerPed, false) then isDriving = false SendNUIMessage({showSpeedo = false}) end end end end) --[[ /////////////////////////// HEALTH, ARMOR, OXYGEN ////////////////////// --]] Citizen.CreateThread(function() while true do Wait(500) local playerPed = PlayerPedId() if IsPedSwimmingUnderWater(playerPed) then isUnderwater = true SendNUIMessage({showOxygen = true}) elseif not IsPedSwimmingUnderWater(PlayerPedId()) then isUnderwater = false SendNUIMessage({showOxygen = false}) end SendNUIMessage({ action = "update_hud", hp = GetEntityHealth(playerPed) - 100, armor = GetPedArmour(playerPed), oxygen = GetPlayerUnderwaterTimeRemaining(PlayerId()) * 10, stamina = GetPlayerSprintTimeRemaining(PlayerId()) * 10, }) if IsPauseMenuActive() then SendNUIMessage({showUi = false}) elseif not IsPauseMenuActive() then SendNUIMessage({showUi = true}) end end end) --[[ /////////////////////////// MINIMAP /////////////////////////// --]] -- Map stuff below local x = -0.025 local y = -0.015 local w = 0.16 local h = 0.25 Citizen.CreateThread(function() local minimap = RequestScaleformMovie("minimap") RequestStreamedTextureDict("circlemap", false) while not HasStreamedTextureDictLoaded("circlemap") do Wait(100) end AddReplaceTexture("platform:/textures/graphics", "radarmasksm", "circlemap", "radarmasksm") SetMinimapClipType(1) SetMinimapComponentPosition('minimap', 'L', 'B', x, y, w, h) SetMinimapComponentPosition('minimap_mask', 'L', 'B', x + 0.17, y + 0.09, 0.072, 0.162) SetMinimapComponentPosition('minimap_blur', 'L', 'B', -0.035, -0.03, 0.18, 0.22) Wait(5000) SetRadarBigmapEnabled(true, false) Wait(0) SetRadarBigmapEnabled(false, false) while true do Wait(0) BeginScaleformMovieMethod(minimap, "SETUP_HEALTH_ARMOUR") ScaleformMovieMethodAddParamInt(3) EndScaleformMovieMethod() BeginScaleformMovieMethod(minimap, 'HIDE_SATNAV') EndScaleformMovieMethod() end end) CreateThread(function() while true do Wait(2000) SetRadarZoom(1150) local playerPed = PlayerPedId() if Config.AlwaysShowRadar == false then if IsPedInAnyVehicle(playerPed, false) then DisplayRadar(true) else DisplayRadar(false) end elseif Config.AlwaysShowRadar == true then DisplayRadar(true) end if Config.ShowFuel == true then if isDriving and IsPedInAnyVehicle(playerPed, true) then local veh = GetVehiclePedIsUsing(playerPed, false) local fuellevel = GetVehicleFuelLevel(veh) SendNUIMessage({ action = "update_fuel", fuel = fuellevel, showFuel = true }) end elseif Config.ShowFuel == false then SendNUIMessage({showFuel = false}) end end end) RegisterCommand("togglehud", function() SendNUIMessage({action = "toggle_hud"}) end, false)
local K, C, L = unpack(select(2, ...)) -- Lua API local _G = _G local table_wipe = table.wipe -- GLOBALS: Bartender4DB function K.LoadBartenderProfile() if Bartender4DB then table_wipe(Bartender4DB) end Bartender4DB = { ["namespaces"] = { ["ActionBars"] = { ["profiles"] = { ["KkhnxUI"] = { ["actionbars"] = { { ["showgrid"] = true, ["rows"] = 2, ["version"] = 3, ["position"] = { ["y"] = -253, ["x"] = -127.050016784668, ["point"] = "CENTER", ["scale"] = 1.1, }, ["padding"] = 1, }, -- [1] { ["enabled"] = false, ["version"] = 3, ["position"] = { ["y"] = -227.499923706055, ["x"] = -231.500183105469, ["point"] = "CENTER", }, }, -- [2] { ["rows"] = 12, ["enabled"] = false, ["version"] = 3, ["position"] = { ["y"] = 248.000061035156, ["x"] = -260.332885742188, ["point"] = "RIGHT", }, ["padding"] = 5, }, -- [3] { ["showgrid"] = true, ["rows"] = 12, ["fadeout"] = true, ["version"] = 3, ["position"] = { ["y"] = 249.150022184849, ["x"] = -45.6497762690851, ["point"] = "RIGHT", ["scale"] = 1.10000002384186, }, ["padding"] = 1, }, -- [4] { ["showgrid"] = true, ["fadeout"] = true, ["version"] = 3, ["position"] = { ["y"] = 41.5, ["x"] = -226.500015258789, ["point"] = "BOTTOM", }, ["padding"] = 1, }, -- [5] { ["showgrid"] = true, ["rows"] = 2, ["version"] = 3, ["position"] = { ["y"] = 206, ["x"] = -127.050016784668, ["point"] = "BOTTOM", ["scale"] = 1.1, }, ["padding"] = 1, }, -- [6] { }, -- [7] { }, -- [8] nil, -- [9] { }, -- [10] }, }, }, }, ["LibDualSpec-1.0"] = { }, ["ExtraActionBar"] = { ["profiles"] = { ["KkhnxUI"] = { ["position"] = { ["y"] = 176, ["x"] = 180, ["point"] = "BOTTOM", }, ["version"] = 3, }, }, }, ["ZoneAbilityBar"] = { ["profiles"] = { ["KkhnxUI"] = { ["position"] = { ["y"] = 176, ["x"] = 180, ["point"] = "BOTTOM", }, ["version"] = 3, }, }, }, ["MicroMenu"] = { ["profiles"] = { ["KkhnxUI"] = { ["enabled"] = false, ["position"] = { ["y"] = 220.144470214844, ["x"] = 355.600036621094, ["point"] = "BOTTOMLEFT", ["scale"] = 1, }, ["version"] = 3, ["padding"] = -2, }, }, }, ["XPBar"] = { }, ["APBar"] = { }, ["BlizzardArt"] = { ["profiles"] = { ["KkhnxUI"] = { ["position"] = { ["y"] = 47, ["x"] = -512, ["point"] = "BOTTOM", }, ["version"] = 3, }, }, }, ["Vehicle"] = { ["profiles"] = { ["KkhnxUI"] = { ["version"] = 3, ["position"] = { ["y"] = 42, ["x"] = 226, ["point"] = "BOTTOM", }, }, }, }, ["BagBar"] = { ["profiles"] = { ["KkhnxUI"] = { ["enabled"] = false, ["version"] = 3, ["position"] = { ["y"] = 99.6888732910156, ["x"] = 220.922241210938, ["point"] = "BOTTOM", }, }, }, }, ["StanceBar"] = { ["profiles"] = { ["KkhnxUI"] = { ["position"] = { ["y"] = 224.500094370051, ["x"] = -372.698542336566, ["point"] = "BOTTOM", ["scale"] = 1.20000004768372, }, ["padding"] = 1, ["version"] = 3, }, }, }, ["PetBar"] = { ["profiles"] = { ["KkhnxUI"] = { ["version"] = 3, ["position"] = { ["y"] = 72, ["x"] = -159.5, ["point"] = "BOTTOM", }, ["padding"] = 1, }, }, }, ["RepBar"] = { }, }, ["profileKeys"] = { ["KkhnxUI"] = "KkhnxUI", }, ["profiles"] = { ["KkhnxUI"] = { ["focuscastmodifier"] = false, ["blizzardVehicle"] = true, ["outofrange"] = "hotkey", }, }, } end
--======================================================================-- --== Utils --======================================================================-- --- Client Utilities -- @module Utils local Utils = {} --======================================================================-- --== Code --======================================================================-- --- Pretty print table data. -- @tparam table t The table data to print. -- @param[opt=""] indent Indentation char. function Utils:printTable( t, indent ) --== Print contents of a table, with keys sorted. local names = {} if not indent then indent = "" end for n,g in pairs(t) do table.insert(names,n) end table.sort(names) for i,n in pairs(names) do local v = t[n] if type(v) == "table" then if(v==t) then -- prevent endless loop if table contains reference to itself print(indent..tostring(n)..": <-") else print(indent..tostring(n)..":") self:printTable(v,indent.." ") end else if type(v) == "function" then print(indent..tostring(n).."()") else print(indent..tostring(n)..": "..tostring(v)) end end end end --- An alias to the printTable method. -- @tparam table tbl The table data to print. -- @usage utils.p( table_to_print ) Utils.p = function( tbl ) if tbl then if type( tbl ) == "table" then Utils:printTable( tbl ) else print( tostring( tbl ) ) end end end --======================================================================-- --== Return --======================================================================-- return Utils
-- Base output class. local Output = require('luatest.class').new({ VERBOSITY = { DEFAULT = 10, QUIET = 0, LOW = 1, VERBOSE = 20, REPEAT = 21, }, }) function Output.mt:initialize(runner) self.runner = runner self.result = runner.result self.verbosity = runner.verbosity end -- luacheck: push no unused -- abstract ("empty") methods function Output.mt:start_suite() -- Called once, when the suite is started end function Output.mt:start_group(group) -- Called each time a new test group is started end function Output.mt:start_test(test) -- called each time a new test is started, right before the setUp() end function Output.mt:update_status(node) -- called with status failed or error as soon as the error/failure is encountered -- this method is NOT called for a successful test because a test is marked as successful by default -- and does not need to be updated end function Output.mt:end_test(node) -- called when the test is finished, after the tearDown() method end function Output.mt:end_group(group) -- called when executing the group is finished, before moving on to the next group -- of at the end of the test execution end function Output.mt:end_suite() -- called at the end of the test suite execution end -- luacheck: pop local function conditional_plural(number, singular) -- returns a grammatically well-formed string "%d <singular/plural>" local suffix = '' if number ~= 1 then -- use plural suffix = (singular:sub(-2) == 'ss') and 'es' or 's' end return string.format('%d %s%s', number, singular, suffix) end function Output.mt:status_line(colors) colors = colors or {success = '', failure = '', reset = '', xfail = ''} -- return status line string according to results local tests = self.result.tests local s = { string.format('Ran %d tests in %0.3f seconds', #tests.all - #tests.skip, self.result.duration), colors.success .. conditional_plural(#tests.success, 'success') .. colors.reset, } if #tests.xfail > 0 then table.insert(s, colors.xfail .. conditional_plural(#tests.xfail, 'xfail') .. colors.reset) end if #tests.xsuccess > 0 then table.insert(s, colors.failure .. conditional_plural(#tests.xsuccess, 'xsuccess') .. colors.reset) end if #tests.fail > 0 then table.insert(s, colors.failure .. conditional_plural(#tests.fail, 'fail') .. colors.reset) end if #tests.error > 0 then table.insert(s, colors.failure .. conditional_plural(#tests.error, 'error') .. colors.reset) end if #tests.fail == 0 and #tests.error == 0 and #tests.xsuccess == 0 then table.insert(s, '0 failures') end if #tests.skip > 0 then table.insert(s, string.format("%d skipped", #tests.skip)) end if self.result.not_selected_count > 0 then table.insert(s, string.format("%d not-selected", self.result.not_selected_count)) end return table.concat(s, ', ') end return Output
os.loadAPI("BGUIFC/Lib/advancedTime") function newButtonRaw(border, x, y, txt, onColor, offColor, toggle, textColorOn, textColorOff, onClick, timeToStayOn) txt = ((txt ~= "") and txt) or " " border = border or 1 local topLeftX, topLeftY, bottomRightX, bottomRightY = x - border, y - border, x + (#txt - 1) + border, y + border local returnObj = { data = { border = border, disabled = false, x = x, y = y, state = false, toggle = toggle, txt = txt, txtColorOn = textColorOn, txtColorOff = textColorOff, topLeftX = topLeftX, topLeftY = topLeftY, bottomRightX = bottomRightX, bottomRightY = bottomRightY, onClick = onClick, onColor = onColor, offColor = offColor, timeToStayOn = timeToStayOn, onClick = onClick } } returnObj.update = function(self) if (not self.data.toggle) and self.data.timeLastOn and ((self.data.timeLastOn + self.data.timeToStayOn) < advancedTime.getEpochTime()) then self.data.state = false self.data.timeLastOn = nil end end returnObj.click = function(self, x, y) if (x >= topLeftX) and (x <= bottomRightX) and (y >= topLeftY) and (y <= bottomRightY) then if (not self.data.disabled) then if self.data.toggle then self.data.state = not self.data.state elseif not self.data.state then self.data.state = true self.data.timeLastOn = advancedTime.getEpochTime() self.data.onClick(self) end end end end returnObj.getPixelAt = function(self, xPos, yPos) if (xPos >= self.data.topLeftX) and (xPos <= self.data.bottomRightX) and (yPos >= self.data.topLeftY) and (yPos <= self.data.bottomRightY) then local bkColor = (self.data.state and self.data.onColor) or self.data.offColor local txtColor = self.data.txtColor --TODO: add support for txt color based on state local char = " " if (self.data.y == yPos) and (xPos >= self.data.x) and (xPos <= (self.data.x + (#(self.data.txt) - 1))) then char = (self.data.txt):sub(xPos - self.data.x + 1, xPos - self.data.x + 1) end return char, txtColor, bkColor end end return returnObj end function getMenue(x, y, title, titleColor, titleBkColor, onClickMenue, ...) local returnObj = { data = { title = { txt = title, txtColor = titleColor, bkColor = titleBkColor }, state = false, items = {}, x = x, y = y, onClickMenu = onClickMenue } } local maxSize = #title for k, v in ipairs(args) do local index = (k - (k % 3)) / 3 if k - (index * 3) == 0 then if #v > maxSize then maxSize = #v end returnObj.data.items[index + 1].txt = v elseif k - (index * 3) == 1 then returnObj.data.items[index + 1].txtColor = v else returnObj.data.items[index + 1].bkColor = v end end returnObj.data.size = maxSize returnObj.click = function(self, xPos, yPos) local layers = 1 + ((self.data.state and #(self.data.items)) or 0) if (xPos >= self.data.x) and (xPos <= (self.data.x + self.data.size)) and (yPos >= self.data.y) and (yPos <= (self.data.y + layers - 1)) then local layer = yPos - self.data.y + 1 if layer == 1 then self.data.state = not self.data.state else self.data.onClickMenu(self.data.items[layer - 1]) end end end returnObj.getPixelAt(self, xPos, yPos) local length = (self.data.state and (1 + #(self.data.items))) or 1 if (xPos >= self.data.x) and (xPos <= (self.data.x - 1 + self.data.size)) and (yPos >= self.data.y) and (yPos <= (self.data.y - 1 + length)) then local layer = yPos - self.data.y + 1 local index = xPos - self.data.x + 1 if layer == 1 then return (self.data.title.txt):sub(index, index), self.data.title.txtColor, self.data.title.bkColor else local pixel = self.data.items[layer - 1] return (pixel.txt):sub(index, index), pixel.txtColor, pixel.bkColor end end end end
describe("EventDispatcher", function() local itemId = 'itemIdLoreIpsum' before_each(function() _G.ZO_LinkHandler_ParseLink = function() return _, _, _, itemId end _G.GetItemLink = function() return nil end end) it("should dispatch event for new item", function() stub(_G, 'ItemCreatedEvent') EventDispatcher(_, 'bagIdValue', 'slotIdValue', true) assert.stub(_G.ItemCreatedEvent) .was_called_with('bagIdValue', 'slotIdValue', itemId) end) it("should dispatch event for updated item", function() stub(_G, 'ItemUpdatedEvent') EventDispatcher(_, 'bagIdValue', 'slotIdValue', false) assert.stub(_G.ItemUpdatedEvent) .was_called_with('bagIdValue', 'slotIdValue', itemId) end) end)
require("ipa_chart") function comma_separated_string_to_sorted_list(list) arr = utilities.parsers.settings_to_array(list) sorted = {} i=1 for key, entry in pairs(arr) do sorted[i]= entry i = i+1 end table.sort(sorted) return sorted end function parse_and_insert_description(raw_description, representation, starting_node) sorted = comma_separated_string_to_sorted_list(raw_description) location_in_tree = starting_node for i=1,#(sorted) do if location_in_tree[sorted[i]] == nil then location_in_tree[sorted[i]] = {label=sorted[i]} end location_in_tree = location_in_tree[sorted[i]] end location_in_tree.representation = representation --print("Representation is: ", representation) end function parse_and_look_up_description(raw_description, starting_node) sorted = comma_separated_string_to_sorted_list(raw_description) location_in_tree = starting_node for i=1, #(sorted) do if location_in_tree[sorted[i]] ~= nil then location_in_tree = location_in_tree[sorted[i]] else return '' end end --print(location_in_tree.representation) return location_in_tree.representation end function template_ipa_module_lookup(category, description) if category == "vowel" then representation = parse_and_look_up_description(description, ipa.vowels) if representation ~= nil and representation ~= '' then tex.sprint(representation) else print("Failed lookup: ", description) end elseif category == "consonant" then representation = parse_and_look_up_description(description, ipa.consonants) if representation ~= nil and representation ~= '' then tex.sprint(representation) else print("Failed lookup: ", description) end elseif category == "combining" then representation = parse_and_look_up_description(description, ipa.combining) if representation ~= nil and representation ~= '' then tex.sprint(representation) else print("Failed lookup: ", description) end end end function template_ipa_module_initialize() for index, pair in pairs(vowel_pairs) do --print(pair[1] , " " , pair[2]) desc = pair[1] rep = pair[2] parse_and_insert_description(desc, rep, ipa.vowels) end for index, pair in pairs(consonant_pairs) do desc = pair[1] rep = pair[2] parse_and_insert_description(desc, rep, ipa.consonants) end for index, pair in pairs(combining) do desc = pair[1] rep = pair[2] parse_and_insert_description(desc, rep, ipa.combining) end end
-- Common settings for LaTeX3 development repo, used by l3build script checkdeps = checkdeps or {maindir .. "/l3backend", maindir .. "/l3kernel"} typesetdeps = typesetdeps or checkdeps checkengines = checkengines or {"pdftex", "xetex", "luatex", "ptex", "uptex"} checksuppfiles = checksuppfiles or { "regression-test.cfg", "regression-test.tex" } tagfiles = tagfiles or {"*.dtx", "README.md", "CHANGELOG.md", "*.ins"} unpacksuppfiles = unpacksuppfiles or { "*.ini", "docstrip.tex", "hyphen.cfg", "lualatexquotejobname.lua", "luatexconfig.tex", "pdftexconfig.tex", "texsys.cfg", "UShyphen.tex" } packtdszip = true typesetcmds = typesetcmds or "\\AtBeginDocument{\\csname DisableImplementation\\endcsname}" typesetexe = "pdftex" typesetopts = "--fmt=pdflatex -interaction=nonstopmode" if checksearch == nil then checksearch = false end if unpacksearch == nil then unpacksearch = false end -- Detail how to set the version automatically function update_tag(file,content,tagname,tagdate) local iso = "%d%d%d%d%-%d%d%-%d%d" local url = "https://github.com/latex3/latex3/compare/" if string.match(content,"%(C%)%s*[%d%-,]+ The LaTeX Project") then local year = os.date("%Y") content = string.gsub(content, "%(C%)%s*([%d%-,]+) The LaTeX Project", "(C) %1," .. year .. " The LaTeX Project") content = string.gsub(content,year .. "," .. year,year) content = string.gsub(content, "%-" .. math.tointeger(year - 1) .. "," .. year, "-" .. year) content = string.gsub(content, math.tointeger(year - 2) .. "," .. math.tointeger(year - 1) .. "," .. year, math.tointeger(year - 2) .. "-" .. year) end if string.match(file,"%.dtx$") then content = string.gsub(content, "\n\\ProvidesExpl" .. "(%w+ *{[^}]+} *){" .. iso .. "}", "\n\\ProvidesExpl%1{" .. tagname .. "}") return string.gsub(content, "\n%% \\date{Released " .. iso .. "}\n", "\n%% \\date{Released " .. tagname .. "}\n") elseif string.match(file, "%.md$") then if string.match(file,"CHANGELOG.md") then local previous = string.match(content,"compare/(" .. iso .. ")%.%.%.HEAD") if tagname == previous then return content end content = string.gsub(content, "## %[Unreleased%]", "## [Unreleased]\n\n## [" .. tagname .."]") return string.gsub(content, iso .. "%.%.%.HEAD", tagname .. "...HEAD\n[" .. tagname .. "]: " .. url .. previous .. "..." .. tagname) end return string.gsub(content, "\nRelease " .. iso .. "\n", "\nRelease " .. tagname .. "\n") end return content end -- Need to build format files local function fmt(engines,dest) local function mkfmt(engine) -- Standard (u)pTeX engines don't have e-TeX local cmd = engine if string.match(engine,"uptex") then cmd = "euptex" elseif string.match(engine,"ptex") then cmd = "eptex" elseif string.match(engine,"luatex") then cmd = "luahbtex" end -- Use .ini files if available local src = "latex.ltx" local ini = string.gsub(engine,"tex","") .. "latex.ini" if fileexists(supportdir .. "/" .. ini) then src = ini end print("Building format for " .. engine) local errorlevel = os.execute( os_setenv .. " TEXINPUTS=" .. unpackdir .. os_pathsep .. localdir .. os_pathsep .. texmfdir .. "//" .. os_concat .. os_setenv .. " LUAINPUTS=" .. unpackdir .. os_pathsep .. localdir .. os_pathsep .. texmfdir .. "//" .. os_concat .. cmd .. " -etex -ini -output-directory=" .. unpackdir .. " " .. src .. " > " .. os_null) if errorlevel ~= 0 then -- Remove file extension: https://stackoverflow.com/a/34326069/6015190 local basename = src:match("(.+)%..+$") local f = io.open(unpackdir .. "/" .. basename .. '.log',"r") local content = f:read("*all") io.close(f) print("-------------------------------------------------------------------------------") print(content) print("-------------------------------------------------------------------------------") print("Failed building LaTeX format for " .. engine) print(" Look for errors in the transcript above") print("-------------------------------------------------------------------------------") return errorlevel end local engname = string.match(src,"^[^.]*") .. ".fmt" local fmtname = string.gsub(engine,"tex$","") .. "latex.fmt" if engname ~= fmtname then ren(unpackdir,engname,fmtname) end cp(fmtname,unpackdir,dest) return 0 end local errorlevel for _,engine in pairs(engines) do errorlevel = mkfmt(engine) if errorlevel ~= 0 then return errorlevel end end return 0 end function checkinit_hook() return fmt(options["engine"] or checkengines,testdir) end function docinit_hook() return fmt({typesetexe},typesetdir) end
package.path = package.path..";../?.lua" local ffi = require "ffi" local S = require "syscall" local UI = require "input" local Keyboard = require "Keyboard" --[[ Callback functions --]] --[[ Event type: EV_KEY EV_MSC value: 0 == keyup 1 == keydown --]] function OnKey(loop, observer) local event = input_event(); --local bytesread = S.read(w.fd, event, ffi.sizeof(event)); local bytesread = observer.Descriptor:read(event, ffi.sizeof(event)); if event.type == EV_MSC then if event.code == MSC_SCAN then --print("MSC_SCAN: ", string.format("0x%x",event.value)); else --print("MSC: ", event.code, event.value); end elseif event.type == EV_KEY then if event.value == 1 then print("KEYDOWN: ", event.code); elseif event.value == 0 then print("KEYUP: ", event.code); if event.code == KEY_ESC then loop:halt(); return false; end elseif event.value == 2 then print("KEYREP: ", event.code); end else --print("EVENT TYPE: ", UI.EventTypes[event.type][2], "CODE:",event.code, "VALUE: ", string.format("0x%x",event.value)); end end --[[ Create Keyboard Device --]] local kbd = Keyboard.new(); -- Run a loop local timeout = 500 while true do local ret, err = kbd:Step(); end
--[[ Shine ReadyRoomRave Plugin ]] local Plugin = Plugin --local Shine = Shine Shared.PrecacheSurfaceShader("shaders/spray.surface_shader") function Plugin:Initialise() self.cinematic = nil self.Enabled = true return true end function Plugin:UpdateClient() local player = Client.GetLocalPlayer() local gameTime = PlayerUI_GetGameStartTime() if gameTime ~= 0 then gameTime = math.floor(Shared.GetTime()) - PlayerUI_GetGameStartTime() end if player ~= nil and gameTime > 0 and self.cinematic ~= nil then Client.DestroyCinematic(self.cinematic) self.cinematic = nil end end function Plugin:ReceiveCreateSpray(message) local origin = Vector(message.originX, message.originY, message.originZ) local coords = Angles(message.pitch, message.yaw, message.roll):GetCoords(origin) Client.CreateTimeLimitedDecal(message.path, coords, 1.0, 15) end function Plugin:ReceiveRaveCinematic(message) local coords = Coords() coords.origin = message.origin if self.cinematic ~= nil or message.stop == true then self:StopRaveCinematic() else self.cinematic = Client.CreateCinematic(RenderScene.Zone_Default) self.cinematic:SetCinematic("cinematics/RAVE.cinematic") self.cinematic:SetCoords(coords) self.cinematic:SetIsVisible(true) self.cinematic:SetRepeatStyle(Cinematic.Repeat_Loop) end end function Plugin:StopRaveCinematic() if self.cinematic ~= nil then Client.DestroyCinematic(self.cinematic) self.cinematic = nil end end function Plugin:Cleanup() self.cinematic = nil self.BaseClass.Cleanup( self ) self.Enabled = false end
--[[ ****************************************************************** Double Helix by KOP ******************************************************************* ]] return function(pg, of, sw, sh) local pc, cx, cy, ops = math.abs(of/pg.width), pg.width/2, pg.height/2, of/pg.width -- target distance local midx =pg.width/2 local midy =pg.height/2+7 local tg = pg.width local fx = pc*5 if fx>1 then fx=1 end if fx<-1 then fx=-1 end local side = -1 local to=pc -- if(of>0) then side=1 end for i, ic in subviews(pg) do -- get icon center local icx, icy = (ic.x+ic.width/2), (ic.y+ic.height/2) -- get icon offset from page center local ox, oy = cx-icx, cy-icy -- get angle of icon position local ang = math.atan(oy,ox) -- get hypotenuse local h = math.sqrt( ox^2+oy^2) local iconX = ic.x+ic.width/2 local fall = (1-pc)*h local iconY = ic.y+ic.height/2 -- get hypotenuse extension local oh = fx*h+fx*tg -- directions local dx, dy = 1,1 if icx<cx then dx=-dx end if icy<cy then dy=-dy end if icy==cy then dy=0 end local nx = 0 local ny = 0 local cy = 3-3*pc if cy>1 then cy=1 end if pc==0 then pc=0.0001 end -- calc new x & y -- local nx = math.sqrt(h^2-oy^2) -- local ny = math.sqrt(h^2-ox^2) nx =midx-ops/pc*(pg.width/(7.5-pg.max_columns))*math.sin(ops*4*math.pi+8*(oy-(1/pg.max_columns*ox))/1.33/pg.height) ny =midy-oy+(1/pg.max_columns)*ox -- midy-(ops*pg.height)-oy local size=0 -- move!! ic:translate(fx*(nx-iconX),fx*(ny-iconY),0) -- print(nx) ic:rotate(fx*(ops*4*math.pi+0.5*ops/pc*math.pi+8*(oy-(1/pg.max_columns*ox))/1.33/pg.height), 0, 1, 0) -- ic:scale(size*size) -- ic:translate(-0.5*nx,-0.5*ny,0) end end
-- Node Investment: Automatically invest your energy in a node -- Contact: aleegs (forum), aleegs#2539 (discord) -- https://github.com/aleegs/ec-scripts local versionString = "1.0" local ec = _G["__EC__"] local eccore = ec.requireScript("ec.core") local settings = nil math.randomseed(os.clock()*100000000000) local settings_template = { settings_version = 1, enable_auto_energy = false, sleep_minutes = 60, next_investment_time = 0, nodeKey = 1321 } local isValidNode = function() local nodeLevel = ToClient_GetNodeLevel(settings.nodeKey) if nil==nodeLevel then return false end return nodeLevel<10 and isWithdrawablePlant(settings.nodeKey) == true end local investEnergy = function() local player = getSelfPlayer() if nil == player then return end local id = Int64toInt32(nodeKey) local wp = player:getWp() local maxWp = player:getMaxWp() local investableWp = 0 if wp % 10 == 0 then investableWp = wp else investableWp = wp - wp % 10 end if isValidNode(settings.nodeKey) == true and investableWp >= 10 then ec.log("[Node Investment] Available Energy to Invest: "..investableWp) ec.log("[Node Investment] Investing "..investableWp.." energy in node "..settings.nodeKey) ToClient_RequestIncreaseExperienceNode(settings.nodeKey, investableWp) end end local strKey = "1321" local OnRenderMenu = function(ui) ui.text("----- Auto Node Investment "..versionString.." -----") ui.text("Contact: aleegs (forum), aleegs#2539 (discord)") ui.text("") ui.text("The following settings are saved") ui.text("per CHARACTER (INDIVIDUAL SETTINGS):") ui.text("") ui.separator() if ui.checkbox("Automatically invest Energy in Node", settings.enable_auto_energy) then settings.enable_auto_energy = not settings.enable_auto_energy end ui.text("") ui.pushItemWidth(120) _, strKey = ui.inputText("Number (Node ID)##strKey", strKey) ui.popItemWidth() settings.nodeKey = tonumber(strKey) ui.text("* Use BDOCodex/BDDatabase to find the node key") ui.separator() ui.text("Time between cycles") _, settings.sleep_minutes = ui.inputInt("Minutes", settings.sleep_minutes) ui.separator() local nodeName = ToClient_GetNodeNameByWaypointKey(settings.nodeKey) local nodeLevel = ToClient_GetNodeLevel(settings.nodeKey) if nodeName and nodeLevel and ec.actors.isInWorld() then ui.text("- Node Information -") ui.text("Name: "..nodeName) ui.text("Level: "..nodeLevel.."/10") end if ec.actors.isInWorld() then if isValidNode(settings.nodeKey)==true then ui.text("Status: OK") else ui.text("Status: Error. The node is not valid/upgradable") end end ui.separator() if ui.button(" Invest Energy Now (Test) ") then investEnergy() end ui.separator() local current_time = os.clock() if current_time < settings.next_investment_time then ui.text("Next energy investment in "..math.floor(settings.next_investment_time-current_time).."s ("..math.floor(((settings.next_investment_time-current_time)/60)).." min)") else ui.text("Next energy investment should be now") end ui.separator() if ui.button(" Reset Timer ") then settings.next_investment_time = os.clock()+(settings.sleep_minutes*60) end end local OnPulse = function() local currentTime = os.clock() if currentTime < settings.next_investment_time then return end local selfPlayerActorWrapper = getSelfPlayer() if selfPlayerActorWrapper == nil then return end local selfPlayerActor = selfPlayerActorWrapper:get() if selfPlayerActor == nil then return end if not(ec.actors.isInWorld()) then return end if selfPlayerActor:getHp() == 0 then return end investEnergy() settings.next_investment_time = os.clock() + (settings.sleep_minutes*60) ec.log("[Node Investment] Sleeping for "..settings.sleep_minutes.." minutes") end local OnLoad = function() settings = ec.settings_mgr.LoadCharacterSettings("nodeinvestment", settings_template) if settings.settings_version ~= settings_template.settings_version then ec.log("Node Investment settings deprecated, reset them.") settings.clear() end if(settings.enable_node_investment==false) then Wait(1) end registerEvent("EventOpenPassword", "OnGameStart") end local OnUnload = function() settings.flush() end local function OnGameStart() ec.log("[Node Investment] OnGameStart: Timer Reset") settings.next_investment_time = os.clock()+1 end ec.registerEvent("EC.OnLoad", OnLoad) ec.registerEvent("EC.OnUnload", OnUnload) ec.registerEvent("EC.OnPulse", OnPulse) if ec.main_menu then ec.main_menu.AddEntry("Node Investment", OnRenderMenu) end
-- _.size.lua -- -- Gets the size of collection by returning its length for array-like -- values or the number of own enumerable properties for objects. -- @usage _.print(_.size({'abc', 'def'})) -- --> 2 -- _.print(_.size('abcdefg')) -- --> 7 -- _.print(_.size({a=1, b=2,c=3})) -- --> 3 -- -- @param collection The collection to inspect. -- @return Returns the size of collection. _.size = function (collection) local c = 0 for k, v in _.iter(collection) do c = c + 1 end return c end
Ingredient = Class {} whiteShader = love.graphics.newShader [[ extern float WhiteFactor; vec4 effect(vec4 vcolor, Image tex, vec2 texcoord, vec2 pixcoord) { vec4 outputcolor = Texel(tex, texcoord) * vcolor; outputcolor.rgb += vec3(WhiteFactor); return outputcolor; } ]] function Ingredient:init(type) self.type = type self.sprite = gTextures[type] self.width = self.sprite:getWidth() self.height = self.sprite:getHeight() self.x = math.random(0, gStateMachine.width - self.width * 3) self.y = -self.height self.dx = 0 self.dy = 65 self.marked = false self.selected = false end function Ingredient:update(dt) self.x = self.x + self.dx * dt self.y = self.y + self.dy * dt end function Ingredient:draw() if self.selected then love.graphics.setShader(whiteShader) whiteShader:send("WhiteFactor", 0.5) love.graphics.draw(self.sprite, self.x - self.width / 3.5, self.y - self.height / 3.5, 0, 3.5, 3.5) love.graphics.setShader() elseif self.marked then love.graphics.setShader(whiteShader) whiteShader:send("WhiteFactor", 1) love.graphics.draw(self.sprite, self.x - self.width / 3.5, self.y - self.height / 3.5, 0, 3.5, 3.5) love.graphics.setShader() end love.graphics.draw(self.sprite, self.x, self.y, 0, 3, 3) end function Ingredient:drawCustom(x, y, sx, sy) love.graphics.draw(self.sprite, x, y, 0, sx, sy) end function Ingredient:checkMouse(mouseX, mouseY) if mouseX > self.x and mouseX < self.x + self.width * 3 and mouseY > self.y and mouseY < self.y + self.height * 3 then return true end return false end
----------------------------------- -- Area: Hall of Transference -- NPC: Large Apparatus (Right) - Holla -- !pos -242.301 -1.849 269.867 14 ----------------------------------- local ID = require("scripts/zones/Hall_of_Transference/IDs"); ----------------------------------- function onTrade(player,npc,trade) if (player:getCharVar("HollaChipRegistration") == 0 and player:getCharVar("skyShortcut") == 1 and trade:hasItemQty(478,1) and trade:getItemCount() == 1) then player:tradeComplete(); player:startEvent(166); end end; function onTrigger(player,npc) if (player:getCharVar("HollaChipRegistration") == 1) then player:messageSpecial(ID.text.NO_RESPONSE_OFFSET+6); -- Device seems to be functioning correctly. else player:startEvent(165); -- Hexagonal Cones end end; function onEventUpdate(player,csid,option) end; function onEventFinish(player,csid,option) if (csid == 166) then player:messageSpecial(ID.text.NO_RESPONSE_OFFSET+4,478); -- You fit.. player:messageSpecial(ID.text.NO_RESPONSE_OFFSET+5); -- Device has been repaired player:setCharVar("HollaChipRegistration",1); end end;
--This is a rank table --There could be multiple tables to generate spawns from local Circle_Ranks_01 = { ["Underlings"] = { --NA }, ["Minions"] = { "CoT_01","CoT_02","CoT_03", "CoT_11","CoT_21","CoT_22", "CoT_23","CoT_24", "CoT_31","CoT_32", "CoT_33","CoT_34", "CoT_41","CoT_42", "CoT_43","CoT_44", }, ["Lieutenants"] = { "Daemon", "Knight", "Spectre", }, ["Sniper"] = { --NA }, ["Boss"] = { }, ["Elite Boss"] = { "CoTUniqueThreatLevel1", "CoTUniqueThreatLevel2" }, ["Victims"] = { "FemaleNPC_51", "FemaleNPC_56", "FemaleNPC_52", "FemaleNPC_53", "FemaleNPC_54", "FemaleNPC_55", "MaleNPC_50", "MaleNPC_51", "MaleNPC_52", "MaleNPC_53", "MaleNPC_54", "MaleNPC_55", "MaleNPC_56", "MaleNPC_57", "MaleNPC_58", "MaleNPC_59", }, ["Specials"] = { }, } --== CEREMONY ==-- CircleOfThorns_Ceremony_D3_V0 = { ["Markers"] = { ["Encounter_V_42"] = Circle_Ranks_01.Victims, ["Encounter_S_32"] = Circle_Ranks_01.Minions, ["Encounter_E_03"] = Circle_Ranks_01.Minions, ["Encounter_E_07"] = Circle_Ranks_01.Minions, }, } CircleOfThorns_Ceremony_D3_V1 = CircleOfThorns_Ceremony_D3_V0 CircleOfThorns_Ceremony_D3_V2 = CircleOfThorns_Ceremony_D3_V0 CircleOfThorns_Ceremony_D8_V0 = { ["Markers"] = { ["Encounter_V_42"] = Circle_Ranks_01.Victims, ["Encounter_S_32"] = Circle_Ranks_01.Minions, ["Encounter_S_30"] = Circle_Ranks_01.Minions, ["Encounter_E_03"] = Circle_Ranks_01.Minions, ["Encounter_E_07"] = Circle_Ranks_01.Minions, ["Encounter_E_05"] = Circle_Ranks_01.Minions, }, } CircleOfThorns_Ceremony_D8_V1 = CircleOfThorns_Ceremony_D8_V0 CircleOfThorns_Ceremony_D8_V2 = CircleOfThorns_Ceremony_D8_V0
-- TrafficConeGod return function(Sunshine, entity) local prefab = entity.prefab if prefab then prefab.prefab = require(prefab.prefab) for componentName, dataComponent in pairs(prefab.prefab) do if not entity[componentName] then local component = { objectType = "Component" } for name, value in pairs(dataComponent) do component[name] = value end entity[componentName] = component else for propertyName, propertyValue in pairs(dataComponent) do if not entity[componentName][propertyName] then entity[componentName][propertyName] = propertyValue end end end end if prefab.prefab.core then entity.core.id = prefab.prefab.core.id end entity.core.active = true end end
local function bintohex(bytes, len) local str = ffi.string(bytes, len) return (str:gsub('(.)', function(c) return string.format('%02x', string.byte(c)) end)) end
return { version = "1.1", luaversion = "5.1", tiledversion = "0.16.0", orientation = "orthogonal", renderorder = "right-down", width = 24, height = 72, tilewidth = 16, tileheight = 16, nextobjectid = 61, properties = {}, tilesets = { { name = "tileset", firstgid = 1, filename = "../../tileset.tsx", tilewidth = 16, tileheight = 16, spacing = 0, margin = 0, image = "../art/tileset.png", imagewidth = 320, imageheight = 320, tileoffset = { x = 0, y = 0 }, properties = {}, terrains = { { name = "Wall", tile = 0, properties = {} }, { name = "Markings", tile = 40, properties = {} }, { name = "Plain Wall", tile = 80, properties = {} } }, tilecount = 400, tiles = { { id = 0, terrain = { -1, -1, -1, 0 } }, { id = 1, terrain = { -1, -1, 0, -1 } }, { id = 2, terrain = { -1, 0, 0, 0 } }, { id = 3, terrain = { 0, -1, 0, 0 } }, { id = 4, terrain = { -1, -1, 0, 0 } }, { id = 5, terrain = { 0, -1, 0, -1 } }, { id = 7, terrain = { 0, 0, 0, 0 } }, { id = 20, terrain = { -1, 0, -1, -1 } }, { id = 21, terrain = { 0, -1, -1, -1 } }, { id = 22, terrain = { 0, 0, -1, 0 } }, { id = 23, terrain = { 0, 0, 0, -1 } }, { id = 24, terrain = { -1, 0, -1, 0 } }, { id = 25, terrain = { 0, 0, -1, -1 } }, { id = 40, terrain = { 2, 2, 2, 1 } }, { id = 41, terrain = { 2, 2, 1, 2 } }, { id = 42, terrain = { 2, 2, 1, 1 } }, { id = 43, terrain = { 1, 2, 1, 2 } }, { id = 44, terrain = { 2, 1, 1, 1 } }, { id = 45, terrain = { 1, 2, 1, 1 } }, { id = 60, terrain = { 2, 1, 2, 2 } }, { id = 61, terrain = { 1, 2, 2, 2 } }, { id = 62, terrain = { 2, 1, 2, 1 } }, { id = 63, terrain = { 1, 1, 2, 2 } }, { id = 64, terrain = { 1, 1, 2, 1 } }, { id = 65, terrain = { 1, 1, 1, 2 } }, { id = 80, terrain = { 2, 2, 2, 2 } }, { id = 81, terrain = { 1, 1, 1, 1 } }, { id = 100, terrain = { 2, 2, 2, 2 } }, { id = 101, terrain = { 2, 2, 2, 2 } }, { id = 120, terrain = { 2, 2, 2, 2 } }, { id = 121, terrain = { 2, 2, 2, 2 } } } } }, layers = { { type = "tilelayer", name = "background", x = 0, y = 0, width = 24, height = 72, visible = true, opacity = 1, offsetx = 0, offsety = 0, properties = {}, encoding = "lua", data = { 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 227, 227, 227, 227, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 226, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 227, 227, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 226, 226, 226, 226, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 246, 226, 226, 226, 226, 226, 226, 246, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 246, 226, 226, 226, 226, 226, 226, 246, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 246, 226, 226, 226, 226, 226, 226, 246, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81 } }, { type = "tilelayer", name = "decor", x = 0, y = 0, width = 24, height = 72, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 0, 50, 51, 0, 0, 0, 0, 0, 69, 50, 51, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 71, 0, 0, 70, 71, 0, 0, 0, 0, 0, 69, 70, 71, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 91, 0, 0, 90, 91, 0, 0, 0, 0, 0, 69, 90, 91, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 50, 51, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 71, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 90, 91, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 50, 51, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 71, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 90, 91, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 89, 10, 10, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 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, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 0, 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 71, 0, 0, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 89, 10, 10, 10, 0, 0, 0, 0, 90, 91, 0, 0, 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 49, 0, 0, 0, 49, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 49, 0, 0, 0, 49, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 89, 0, 0, 0, 89, 0, 0, 0, 0, 0, 89, 0, 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 = "platforms", x = 0, y = 0, width = 24, height = 72, 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, 47, 47, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 47, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 47, 47, 47, 47, 47, 47, 47, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 10, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 47, 47, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 47, 47, 47, 47, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 = "walls", x = 0, y = 0, width = 24, height = 72, visible = true, opacity = 1, offsetx = 0, offsety = 0, properties = {}, encoding = "lua", data = { 8, 8, 165, 148, 148, 148, 148, 164, 166, 166, 166, 166, 166, 166, 166, 166, 163, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 146, 0, 0, 0, 0, 0, 0, 0, 0, 165, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 146, 0, 0, 0, 0, 0, 0, 0, 0, 165, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 146, 0, 0, 0, 0, 0, 0, 0, 0, 165, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 146, 0, 0, 0, 0, 0, 0, 0, 0, 165, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 146, 0, 0, 0, 0, 0, 0, 0, 0, 165, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 146, 0, 0, 0, 0, 0, 0, 0, 0, 165, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 144, 145, 142, 0, 0, 0, 0, 141, 145, 143, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 165, 148, 148, 148, 148, 148, 148, 146, 0, 0, 0, 0, 165, 148, 148, 148, 148, 148, 148, 146, 8, 8, 8, 8, 161, 166, 166, 166, 166, 166, 221, 162, 0, 0, 0, 0, 161, 221, 166, 166, 166, 166, 166, 162, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 167, 145, 145, 145, 301, 145, 145, 145, 145, 145, 145, 301, 145, 145, 145, 147, 0, 0, 0, 8, 8, 0, 0, 0, 161, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 0, 0, 0, 27, 8, 8, 7, 0, 0, 0, 27, 8, 8, 9, 24, 26, 26, 26, 23, 24, 26, 26, 23, 8, 7, 0, 0, 25, 8, 8, 6, 0, 0, 27, 8, 8, 8, 8, 6, 0, 0, 0, 8, 8, 0, 0, 25, 9, 6, 0, 0, 0, 0, 0, 0, 0, 0, 25, 9, 8, 8, 8, 6, 0, 0, 0, 0, 0, 0, 0, 21, 26, 22, 0, 0, 0, 0, 0, 0, 0, 0, 25, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 5, 5, 5, 2, 0, 0, 5, 5, 5, 5, 0, 0, 1, 5, 5, 5, 5, 8, 26, 26, 26, 26, 26, 26, 26, 26, 23, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 25, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 28, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 28, 28, 28, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 28, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 28, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 8, 28, 28, 28, 28, 28, 8, 8, 8, 8, 8, 8, 8, 0, 0, 8, 8, 8, 8, 28, 8, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 } }, { type = "tilelayer", name = "overlay", x = 0, y = 0, width = 24, height = 72, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 = "objects", visible = true, opacity = 1, offsetx = 0, offsety = 0, properties = {}, objects = { { id = 11, name = "from_entrance", type = "exit", shape = "rectangle", x = -16, y = 704, width = 32, height = 48, rotation = 0, visible = true, properties = { ["target"] = "entrance.into_pyramid" } }, { id = 13, name = "spawn5", type = "spawn", shape = "rectangle", x = 144, y = 464, width = 96, height = 48, rotation = 0, visible = true, properties = {} }, { id = 16, name = "lore", type = "trigger", shape = "rectangle", x = 128, y = 16, width = 128, height = 96, rotation = 0, visible = true, properties = { ["data"] = "confession", ["on_contains"] = true } }, { id = 25, name = "left", type = "blast_door", shape = "rectangle", x = 128, y = 464, width = 16, height = 48, rotation = 0, visible = true, properties = {} }, { id = 26, name = "right", type = "blast_door", shape = "rectangle", x = 240, y = 464, width = 16, height = 48, rotation = 0, visible = true, properties = {} }, { id = 28, name = "", type = "killbox", shape = "rectangle", x = 160, y = 128, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 29, name = "", type = "killbox", shape = "rectangle", x = 208, y = 208, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 30, name = "", type = "killbox", shape = "rectangle", x = 160, y = 288, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 31, name = "", type = "crate", shape = "rectangle", x = 80, y = 576, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 33, name = "", type = "crate", shape = "rectangle", x = 64, y = 576, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 34, name = "", type = "crate", shape = "rectangle", x = 75, y = 560, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 35, name = "", type = "killbox", shape = "rectangle", x = 144, y = 928, width = 128, height = 16, rotation = 0, visible = true, properties = {} }, { id = 36, name = "", type = "killbox", shape = "rectangle", x = 272, y = 944, width = 16, height = 32, rotation = 0, visible = true, properties = {} }, { id = 37, name = "", type = "killbox", shape = "rectangle", x = 272, y = 1040, width = 96, height = 16, rotation = 0, visible = true, properties = {} }, { id = 38, name = "", type = "crate", shape = "rectangle", x = 320, y = 1120, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 39, name = "", type = "crate", shape = "rectangle", x = 304, y = 1120, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 40, name = "", type = "crate", shape = "rectangle", x = 312, y = 1104, width = 16, height = 16, rotation = 0, visible = true, properties = {} }, { id = 46, name = "to_staff", type = "exit", shape = "rectangle", x = 368, y = 704, width = 32, height = 48, rotation = 0, visible = true, properties = { ["target"] = "staff_chamber.exit" } }, { id = 47, name = "high jump check", type = "", shape = "rectangle", x = 7.33333, y = 985.333, width = 161.333, height = 163.333, rotation = 0, visible = true, properties = {} }, { id = 49, name = "blaster check", type = "", shape = "rectangle", x = 265.333, y = 1066, width = 108.667, height = 80, rotation = 0, visible = true, properties = {} }, { id = 52, name = "super blaster check", type = "", shape = "rectangle", x = 70.6667, y = 438.667, width = 239.333, height = 97.3333, rotation = 0, visible = true, properties = {} }, { id = 53, name = "double jump check", type = "", shape = "rectangle", x = 120, y = 104, width = 145.333, height = 339.333, rotation = 0, visible = true, properties = {} }, { id = 54, name = "to_high_jump", type = "exit", shape = "rectangle", x = 368, y = 1088, width = 32, height = 48, rotation = 0, visible = true, properties = { ["target"] = "high_jump_chamber.exit" } }, { id = 55, name = "to_super_staff", type = "exit", shape = "rectangle", x = -16, y = 1008, width = 32, height = 48, rotation = 0, visible = true, properties = { ["target"] = "super_staff_chamber.exit" } }, { id = 57, name = "spawn2", type = "spawn", shape = "rectangle", x = 128, y = 1088, width = 32, height = 48, rotation = 0, visible = true, properties = {} }, { id = 58, name = "spawn3", type = "spawn", shape = "rectangle", x = 272, y = 1088, width = 32, height = 48, rotation = 0, visible = true, properties = {} }, { id = 59, name = "spawn4", type = "spawn", shape = "rectangle", x = 256, y = 976, width = 32, height = 48, rotation = 0, visible = true, properties = {} }, { id = 60, name = "spawn", type = "spawn", shape = "rectangle", x = 64, y = 688, width = 32, height = 48, rotation = 0, visible = true, properties = {} } } } } }
local util = require("tests.helpers.util") local verify = require("tests.helpers.verify") local utils = require("neo-tree.utils") describe("Filesystem netrw hijack", function() after_each(function() util.clear_test_state() end) require("neo-tree").setup({ filesystem = { hijack_netrw_behavior = "disabled", window = { position = "left", }, }, }) it("does not interfere with netrw when disabled", function() vim.cmd("edit .") assert(#vim.api.nvim_list_wins() == 1, "there should only be one window") verify.after(100, function() local name = vim.api.nvim_buf_get_name(0) print("name: " .. name) return name ~= "neo-tree filesystem [1]" end, "the buffer should not be neo-tree") end) local file = "Makefile" vim.cmd("edit " .. file) require("neo-tree").setup({ filesystem = { hijack_netrw_behavior = "open_default", window = { position = "left", }, }, }) it("opens in sidebar when behavior is open_default", function() vim.cmd("edit .") verify.after(100, function() assert(#vim.api.nvim_list_wins() == 2, "There should be 2 windows open") local expected_buf_name = "Makefile" local buf_at_2 = vim.api.nvim_win_get_buf(vim.fn.win_getid(2)) local name_at_2 = vim.api.nvim_buf_get_name(buf_at_2) if name_at_2:sub(-#expected_buf_name) == expected_buf_name then return true else return false end verify.buf_name_endswith("neo-tree filesystem [1]") end, file .. " is not at window 2") end) vim.cmd("edit " .. file) require("neo-tree").setup({ filesystem = { hijack_netrw_behavior = "open_split", }, }) it("opens in in splits when behavior is open_split", function() vim.cmd("edit .") verify.eventually(100, function() if #vim.api.nvim_list_wins() ~= 1 then return false end return vim.api.nvim_buf_get_option(0, "filetype") == "neo-tree" end, "neotree is not the only window") vim.cmd("split .") verify.eventually(150, function() if #vim.api.nvim_list_wins() ~= 2 then return false end return vim.api.nvim_buf_get_option(0, "filetype") == "neo-tree" end, "neotree is not in the second window") end) end)
local input = require('bizhawk/input')() -- Vs Pinky local cf = 40637 -- Sequence 1 -- Combo n° 3 cf = input:circle(cf) cf = input:cross(cf + 120) cf = input:right(cf + 40) cf = input:cross(cf + 80) cf = input:down(cf + 40) cf = input:cross(cf + 80) cf = input:up(cf + 40) cf = input:cross(cf + 80) cf = input:right(cf + 40) cf = input:right(cf + 2) cf = input:circle(cf + 78) cf = input:left(cf + 40) cf = input:left(cf + 2) cf = input:circle(cf + 78) cf = input:right(cf + 40) cf = input:right(cf + 2) cf = input:right(cf + 2) cf = input:circle(cf + 76) -- Sequence 2 -- Combo n° 29 cf = cf + 120 cf = input:circle(cf + 120) cf = input:cross(cf + 120) cf = input:left(cf + 40) cf = input:circle(cf + 80) cf = input:up(cf + 40) cf = input:up(cf + 2) cf = input:cross(cf + 78) cf = input:left(cf + 40) cf = input:right(cf + 2) cf = input:circle(cf + 78) cf = input:square(cf + 120) cf = input:square(cf + 120) cf = input:down(cf + 40) cf = input:down(cf + 2) cf = input:down(cf + 2) cf = input:circle(cf + 76) cf = input:down(cf + 40) cf = input:up(cf + 2) cf = input:down(cf + 2) cf = input:circle(cf + 76) cf = input:left(cf + 40) cf = input:right(cf + 2) cf = input:left(cf + 2) cf = input:circle(cf + 76) -- Sequence 3 -- Combo n° 59 cf = cf + 120 cf = input:up(cf + 40) cf = input:right(cf + 2) cf = input:circle(cf + 78) cf = input:left(cf + 40) cf = input:right(cf + 2) cf = input:circle(cf + 78) cf = input:left(cf + 40) cf = input:left(cf + 2) cf = input:left(cf + 2) cf = input:circle(cf + 76) cf = input:right(cf + 40) cf = input:up(cf + 2) cf = input:right(cf + 2) cf = input:circle(cf + 76) -- All eyes on me 1 cf = input:up(cf + 40) cf = input:down(cf + 2) cf = input:up(cf + 2) cf = input:circle(cf + 76) cf = input:down(cf + 40) cf = input:up(cf + 2) cf = input:down(cf + 2) cf = input:cross(cf + 76) cf = input:right(cf + 40) cf = input:left(cf + 2) cf = input:right(cf + 2) cf = input:circle(cf + 76) cf = input:down(cf + 40) cf = input:up(cf + 2) cf = input:down(cf + 2) cf = input:circle(cf + 76) -- All eyes on me 2 cf = cf + (120 * 4) cf = input:up(cf + 40) cf = input:up(cf + 2) cf = input:circle(cf + 78) cf = input:down(cf + 40) cf = input:down(cf + 2) cf = input:circle(cf + 78) -- All eyes on me 3 cf = cf + (120 * 2) cf = input:up(cf + 40) cf = input:down(cf + 2) cf = input:up(cf + 2) cf = input:circle(cf + 76) cf = input:down(cf + 40) cf = input:up(cf + 2) cf = input:down(cf + 2) cf = input:cross(cf + 76) -- Sequence 4 cf = cf + (120 * 2) cf = input:right(cf + 40) cf = input:circle(cf + 80) cf = input:left(cf + 40) cf = input:circle(cf + 80) cf = input:up(cf + 40) cf = input:up(cf + 2) cf = input:cross(cf + 78) cf = input:left(cf + 40) cf = input:right(cf + 2) cf = input:cross(cf + 78) cf = input:down(cf + 40) cf = input:down(cf + 2) cf = input:down(cf + 2) cf = input:circle(cf + 76) cf = input:down(cf + 40) cf = input:up(cf + 2) cf = input:down(cf + 2) cf = input:circle(cf + 76) cf = input:left(cf + 40) cf = input:right(cf + 2) cf = input:left(cf + 2) cf = input:circle(cf + 76) -- All eyes on me 4 cf = cf + (120 * 5) - 8 cf = input:up(cf + 40) cf = input:up(cf + 2) cf = input:circle(cf + 78) cf = input:down(cf + 40) cf = input:down(cf + 2) cf = input:circle(cf + 78) cf = input:right(cf + 40) cf = input:right(cf + 2) cf = input:right(cf + 2) cf = input:circle(cf + 76) cf = input:left(cf + 40) cf = input:left(cf + 2) cf = input:left(cf + 2) cf = input:circle(cf + 76) -- Sequence 5 -- Combo n° 55 cf = input:circle(cf + 120) cf = input:triangle(cf + 120) cf = input:right(cf + 40) cf = input:circle(cf + 80) cf = input:up(cf + 40) cf = input:up(cf + 2) cf = input:circle(cf + 78) cf = input:up(cf + 40) cf = input:up(cf + 2) cf = input:cross(cf + 78) cf = input:left(cf + 40) cf = input:right(cf + 2) cf = input:circle(cf + 78) cf = input:left(cf + 40) cf = input:left(cf + 2) cf = input:left(cf + 2) cf = input:circle(cf + 76) cf = input:right(cf + 40) cf = input:up(cf + 2) cf = input:right(cf + 2) cf = input:circle(cf + 76) -- Skip Fever Time cf = input:cross(cf + 473, 2) return input:all()
----------------------------------- -- Area: Castle Oztroja -- NPC: _47o -- !pos -155.228 21.500 -140.000 151 ----------------------------------- function onTrigger(player, npc) npc:openDoor(6) end function onEventUpdate(player, csid, option) end function onEventFinish(player, csid, option) end
--[[ © 2020 TERRANOVA do not share, re-distribute or modify without permission of its author. --]] ITEM.name = "Antlion Meat" ITEM.model = Model("models/gibs/antlion_gib_small_2.mdl") ITEM.width = 1 ITEM.height = 1 ITEM.description = "An uncooked small piece of a large burrowing alien insect. Definitely has a lot of protein." ITEM.category = "Non-Approved Food"; ITEM.price = 5; ITEM.restoreHealth = 5 ITEM.flag = "E"
--[[------------------------------------------------------ lens.Finalizer test ----------------- ... --]]------------------------------------------------------ local lens = require 'lens' local lut = require 'lut' local should = lut.Test 'lens.Finalizer' local Finalizer = lens.Finalizer function should.autoload() assertType('table', Finalizer) end function should.setType() local f = Finalizer(function() end) assertEqual('lens.Finalizer', f.type) end function should.tostring() local f = Finalizer(function() end) assertMatch('lens.Finalizer: 0x.*', tostring(f)) end function should.setFinalize() local t local f = Finalizer(function() t = true end) f:finalize() assertTrue(t) end function should.triggerOnGc() local continue = false local fin = Finalizer(function() continue = true end) -- We make sure that we can set different finalizers at the same time. local fin2 = Finalizer(function() continue2 = true end) assertFalse(continue) assertFalse(continue2) collectgarbage('collect') assertFalse(continue) assertFalse(continue2) fin = nil collectgarbage('collect') assertTrue(continue) assertFalse(continue2) fin2 = nil collectgarbage('collect') assertTrue(continue) assertTrue(continue2) end should.ignore.deleted = true should.ignore.finalize = true should:test()
object_draft_schematic_furniture_wod_pro_sm_tree_08 = object_draft_schematic_furniture_shared_wod_pro_sm_tree_08:new { } ObjectTemplates:addTemplate(object_draft_schematic_furniture_wod_pro_sm_tree_08, "object/draft_schematic/furniture/wod_pro_sm_tree_08.iff")
-- Window management -- Uncomment if you want to disable Animation -- hs.window.animationDuration = 0 -- Hotkeys local opt = { 'alt' } local optcmd = { 'alt', 'cmd' } local shftopt = { 'shift', 'alt' } local shftcmd = { 'shift', 'cmd' } hs.grid.MARGINX = 10 hs.grid.MARGINY = 10 hs.grid.GRIDWIDTH = 12 hs.grid.GRIDHEIGHT = 12 -- Grid Helper Function local gridset = function(cell) return function() cur_window = hs.window.focusedWindow() hs.grid.set(cur_window, cell, cur_window:screen()) end end -- Window Movement Helper Function function winmovescreen(how) local win = hs.window.focusedWindow() if how == 'left' then win:moveOneScreenWest() elseif how == 'right' then win:moveOneScreenEast() end end -- Full Bindings hs.hotkey.bind({ 'ctrl', 'alt', 'cmd' }, 'F', gridset('0,0 12x12')) -- Half Bindings -- Vertical halves hs.hotkey.bind({ 'ctrl', 'cmd' }, 'h', gridset('0,0 6x12')) hs.hotkey.bind({ 'ctrl', 'cmd' }, 'l', gridset('6,0 6x12')) -- Horizontal halves hs.hotkey.bind({ 'ctrl', 'cmd' }, 'k', gridset('0,0 12x6')) hs.hotkey.bind({ 'ctrl', 'cmd' }, 'j', gridset('0,6 12x6')) -- Third Bindings -- Vertical thirds hs.hotkey.bind({ 'ctrl', 'alt' }, 'h', gridset('0,0 4x12')) hs.hotkey.bind({ 'ctrl', 'alt' }, 'k', gridset('4,0 4x12')) hs.hotkey.bind({ 'ctrl', 'alt' }, 'l', gridset('8,0 4x12')) -- Horizontal thirds hs.hotkey.bind({ 'ctrl', 'alt' }, 'j', gridset('0,0 8x12')) hs.hotkey.bind({ 'ctrl', 'alt' }, ';', gridset('4,0 8x12')) -- Quarter Bindings hs.hotkey.bind(optcmd, '-', gridset('0,0 6x6')) hs.hotkey.bind(optcmd, '=', gridset('6,0 6x6')) hs.hotkey.bind(optcmd, '[', gridset('0,6 6x6')) hs.hotkey.bind(optcmd, ']', gridset('6,6 6x6')) -- Centered Big hs.hotkey.bind({ 'ctrl', 'cmd' }, 'c', gridset('2,0 8x12')) -- Centered Small hs.hotkey.bind({ 'ctrl', 'alt', 'cmd' }, 'c', gridset('3,0 6x12')) -- -- Move between screens hs.hotkey.bind( { 'ctrl', 'alt', 'cmd' }, 'Left', hs.fnutils.partial(winmovescreen, 'left') ) hs.hotkey.bind( { 'ctrl', 'alt', 'cmd' }, 'Right', hs.fnutils.partial(winmovescreen, 'right') ) -- grid gui hs.hotkey.bind({ 'shift', 'cmd' }, 'g', hs.grid.show)
local lore = require "lore" return function (triggers) function triggers.lore (env, object, data) local item = lore[data] if item then if not item.condition or item:condition(env) then env.textbox:show{ text = item.text, duration = 0.2, style = { color = { 0xDD, 0xDD, 0x22 } } } end end return true end end
project "assimp" kind "StaticLib" language "C++" targetdir ("bin/" .. outputdir .. "/%{prj.name}") objdir ("bin-int/" .. outputdir .. "/%{prj.name}") files { -- Dependencies "contrib/unzip/**", "contrib/irrXML/**", "contrib/zlib/*", -- Common "code/Common/**", "code/PostProcessing/**", "code/Material/**", "code/CApi/**", -- Importers "code/Collada/**", "code/Obj/**", -- "code/Blender/**", "contrib/poly2tri/poly2tri/**", "code/FBX/**", -- "code/glTF2/**", -- "code/glTF/**", "code/Assbin/**" -- For caching } includedirs { "contrib/irrXML/", "contrib/unzip/", "contrib/rapidjson/include/", "code", "include" } filter "system:windows" systemversion "latest" staticruntime "On" defines { "ASSIMP_BUILD_NO_3D_IMPORTER", "ASSIMP_BUILD_NO_3DS_IMPORTER", "ASSIMP_BUILD_NO_3MF_IMPORTER", "ASSIMP_BUILD_NO_AC_IMPORTER", "ASSIMP_BUILD_NO_AMF_IMPORTER", "ASSIMP_BUILD_NO_ASE_IMPORTER", -- "ASSIMP_BUILD_NO_ASSBIN_IMPORTER" "ASSIMP_BUILD_NO_B3D_IMPORTER", "ASSIMP_BUILD_NO_BLEND_IMPORTER", "ASSIMP_BUILD_NO_BVH_IMPORTER", "ASSIMP_BUILD_NO_C4D_IMPORTER", "ASSIMP_BUILD_NO_COB_IMPORTER", -- "ASSIMP_BUILD_NO_COLLADA_IMPORTER", "ASSIMP_BUILD_NO_CSM_IMPORTER", "ASSIMP_BUILD_NO_DXF_IMPORTER", -- "ASSIMP_BUILD_NO_FBX_IMPORTER", "ASSIMP_BUILD_NO_GLTF_IMPORTER", "ASSIMP_BUILD_NO_HMP_IMPORTER", "ASSIMP_BUILD_NO_IFC_IMPORTER", "ASSIMP_BUILD_NO_IRR_IMPORTER", "ASSIMP_BUILD_NO_IRRMESH_IMPORTER", "ASSIMP_BUILD_NO_LWO_IMPORTER", "ASSIMP_BUILD_NO_LWS_IMPORTER", "ASSIMP_BUILD_NO_M3D_IMPORTER", "ASSIMP_BUILD_NO_MD2_IMPORTER", "ASSIMP_BUILD_NO_MD3_IMPORTER", "ASSIMP_BUILD_NO_MD5_IMPORTER", "ASSIMP_BUILD_NO_MDC_IMPORTER", "ASSIMP_BUILD_NO_MDL_IMPORTER", "ASSIMP_BUILD_NO_MMD_IMPORTER", "ASSIMP_BUILD_NO_MS3D_IMPORTER", "ASSIMP_BUILD_NO_NDO_IMPORTER", "ASSIMP_BUILD_NO_NFF_IMPORTER", -- "ASSIMP_BUILD_NO_OBJ_IMPORTER", "ASSIMP_BUILD_NO_OFF_IMPORTER", "ASSIMP_BUILD_NO_OGRE_IMPORTER", "ASSIMP_BUILD_NO_OPENGEX_IMPORTER", "ASSIMP_BUILD_NO_PLY_IMPORTER", "ASSIMP_BUILD_NO_Q3BSP_IMPORTER", "ASSIMP_BUILD_NO_Q3D_IMPORTER", "ASSIMP_BUILD_NO_RAW_IMPORTER", "ASSIMP_BUILD_NO_SIB_IMPORTER", "ASSIMP_BUILD_NO_SMD_IMPORTER", "ASSIMP_BUILD_NO_STEP_IMPORTER", "ASSIMP_BUILD_NO_STL_IMPORTER", "ASSIMP_BUILD_NO_TERRAGEN_IMPORTER", "ASSIMP_BUILD_NO_X_IMPORTER", "ASSIMP_BUILD_NO_X3D_IMPORTER", "ASSIMP_BUILD_NO_XGL_IMPORTER" } -- Exporters defines { "ASSIMP_BUILD_NO_COLLADA_EXPORTER", "ASSIMP_BUILD_NO_X_EXPORTER", "ASSIMP_BUILD_NO_STEP_EXPORTER", "ASSIMP_BUILD_NO_OBJ_EXPORTER", "ASSIMP_BUILD_NO_STL_EXPORTER", "ASSIMP_BUILD_NO_PLY_EXPORTER", "ASSIMP_BUILD_NO_3DS_EXPORTER", "ASSIMP_BUILD_NO_GLTF_EXPORTER", -- "ASSIMP_BUILD_NO_ASSBIN_EXPORTER", "ASSIMP_BUILD_NO_ASSXML_EXPORTER", "ASSIMP_BUILD_NO_X3D_EXPORTER", "ASSIMP_BUILD_NO_FBX_EXPORTER", "ASSIMP_BUILD_NO_M3D_EXPORTER", "ASSIMP_BUILD_NO_3MF_EXPORTER", "ASSIMP_BUILD_NO_ASSJSON_EXPORTER" } filter "system:linux" pic "On" systemversion "latest" cppdialect "C++17" staticruntime "On" filter "configurations:Debug" runtime "Debug" symbols "on" filter "configurations:Release" runtime "Release" optimize "on"
function menu_load() if not xscroll then screendarkness = 1 end love.graphics.setBackgroundColor(0.18, 0.75, 1) xscroll = 0 menuitems = {"start game", "all runes game", "challenges", "quit"} twilightframe = 1 twilighttimer = 0 noise = 0 if gamefinished then for i = 1, #spellnames do spelldiscovered[i] = true end end music:stop() musicrev:play() end function menu_update(dt) if screendarkness > 0 then screendarkness = math.max(0, screendarkness - dt/2) end xscroll = xscroll + 10*dt twilighttimer = twilighttimer + dt while twilighttimer > 0.2 do twilighttimer = twilighttimer - 0.2 twilightframe = twilightframe + 1 if twilightframe > 4 then twilightframe = 1 end end if twilighty > menuselection then twilighty = twilighty - (twilighty-menuselection)/2*dt*30 - dt if twilighty < menuselection then twilighty = menuselection end elseif twilighty < menuselection then twilighty = twilighty - (twilighty-menuselection)/2*dt*30 + dt if twilighty > menuselection then twilighty = menuselection end end if offset > targetoffset then offset = offset - (offset-targetoffset)/2*dt*20 - dt if offset < targetoffset then offset = targetoffset end elseif offset < targetoffset then offset = offset - (offset-targetoffset)/2*dt*20 + dt if offset > targetoffset then offset = targetoffset end end end function menu_draw() love.graphics.draw(_G["background4noiseimg"], 0, 0, 0, scale, scale) for i = backgrounds-1, 1, -1 do local xscroll = xscroll / i * 4 for x = 1, 2 do love.graphics.draw(_G["background" .. i .. "noiseimg"], math.floor(((x-1)*240)*scale) - math.floor(math.fmod(xscroll, 240)*scale), (backgrounds-i)*10*scale, 0, scale, scale) end end love.graphics.translate(-offset*scale, 0) --MAIN MENU love.graphics.draw(titleimg, 0, 0, 0, scale, scale) for i = 1, #menuitems do love.graphics.setColor(1, 1, 1) if (i == 2 or i == 3) and not gamefinished then love.graphics.setColor(0.8, 0.8, 0.8) end properprint(menuitems[i], 70, 40+15*i, i == menuselection and (i ~= 2 and i ~= 3 or gamefinished)) end love.graphics.draw(playeranimation.walk[twilightframe], (70 - 25)*scale, (30+15*twilighty)*scale, 0, scale, scale) --CHALLENGES properprint("use as few spells as possible", 244, 2) for y = 1, 3 do for x = 1, 4 do local i = x+(y-1)*4 if i == currentchallenge then love.graphics.setColor(1, 1, 1) else love.graphics.setColor(0.5, 0.5, 0.5) end local cox, coy = (253+(x-1)*55)*scale, (12+(y-1)*33)*scale love.graphics.rectangle("fill", cox-1*scale, coy-1*scale, (240*(scale/5))+2*scale, (120*(scale/5))+8*scale) love.graphics.draw(thumb[i], cox, coy, 0, scale/5, scale/5) love.graphics.setColor(0.08, 0.08, 0.08) properprintsmall("goal", cox/scale+1, coy/scale+25) local num = tostring(goalspells[i]) properprintsmall(num, cox/scale+48-6*#tostring(num), coy/scale+25) if i == currentchallenge then love.graphics.setColor(1, 1, 1) else love.graphics.setColor(0.5, 0.5, 0.5) end properprintsmall("best", cox/scale+1, coy/scale+18) local num = "" if bestspells[i] then num = tostring(bestspells[i]) end properprintsmall(num, cox/scale+48-6*#tostring(num), coy/scale+18) end end if currentchallenge > 12 then love.graphics.setColor(1, 1, 1) else love.graphics.setColor(0.5, 0.5, 0.5) end love.graphics.rectangle("fill", 343*scale, 110*scale, 33*scale, 9*scale) love.graphics.setColor(0, 0, 0) properprint("back", 344, 111) love.graphics.setColor(1, 1, 1) love.graphics.translate(offset*scale, 0) love.graphics.setColor(0, 0, 0, screendarkness) love.graphics.rectangle("fill", 0, 0, 480*scale, 120*scale) love.graphics.setColor(1, 1, 1) end function menu_keypressed(key) if challengemenu then if key == "up" then currentchallenge = currentchallenge - 4 playsound(menumovesound) elseif key == "down" then currentchallenge = currentchallenge + 4 playsound(menumovesound) elseif key == "right" then currentchallenge = currentchallenge + 1 playsound(menumovesound) elseif key == "left" then currentchallenge = currentchallenge - 1 playsound(menumovesound) end if currentchallenge <= 0 then currentchallenge = currentchallenge + 16 elseif currentchallenge > 16 then currentchallenge = currentchallenge - 16 end if key == "return" then if currentchallenge > 12 then challengemenu = false targetoffset = 0 playsound(menubacksound) else changegamestate("game") playsound(menuselectsound) end end if key == "escape" then challengemenu = false targetoffset = 0 playsound(menubacksound) end return else if (key == "up" or key == "w") and menuselection > 1 then menuselection = menuselection - 1 playsound(menumovesound) elseif (key == "down" or key == "s") and menuselection < #menuitems then menuselection = menuselection + 1 playsound(menumovesound) end end if key == "return" then if menuselection == 1 then changegamestate("story") allrunes = false playsound(menuselectsound) elseif menuselection == 2 and gamefinished then changegamestate("story") allrunes = true playsound(menuselectsound) elseif menuselection == 3 and gamefinished then allrunes = false challengemenu = true targetoffset = 240 playsound(menuselectsound) elseif menuselection == 4 then love.event.quit() playsound(menubacksound) end end end
#!/usr/bin/env texlua ---@diagnostic disable: lowercase-global -- Configuration file of "citeproc" for use with "l3build" module = "csl" docfiledir = "./doc" sourcefiledir = "./citeproc" testfiledir = "./test" installfiles = {"*.sty", "*.lua", "*.json"} scriptfiles = {"citeproc*.lua"} -- scriptmanfiles = {"citeproc.1"} sourcefiles = {"*.sty", "*.lua", "*.json"} -- tagfiles = {} -- typesetdemofiles = {} tdslocations = { "scripts/csl/citeproc/citeproc*.lua", "scripts/csl/*.lua", "tex/latex/csl/citeproc/*.json", }
local fs = require "nixio.fs" local m,s,olt,opt m = Map("netset", translate("RemoteCtrl"), translate("Communicate with Server by TCP")) s = m:section(TypedSection, "netset", translate("Remote Configuration")) s.addremove = false s.anonymous = true s:tab("netset1", translate("remoteipport")) this_tab = "netset1" opt = s:taboption(this_tab, Value, "deviceid", translate("Dev ID")) opt:value("LteRouter") opt = s:taboption(this_tab, Value, "remote_ip", translate("Remote Ip")) opt.datatype = "ip4addr" opt.placeholder = "122.227.179.90" opt = s:taboption(this_tab, Value, "remote_port", translate("Remote Port")) opt.placeholder = "8000" opt.datatype = "port" opt = s:taboption(this_tab, DummyValue, "gps_info", translate("GPS Info")) opt.default="init..." function opt.cfgvalue(...) return fs.readfile("/tmp/gps_info") or "init..." end opt = s:taboption(this_tab, DummyValue, "agps_info", translate("AGPS Info")) opt.default="init..." function opt.cfgvalue(...) return fs.readfile("/tmp/agps_info") or "init..." end opt = s:taboption(this_tab, DummyValue, "on_off", translate("Online Info")) opt.default = "Offline" function opt.cfgvalue(...) return fs.readfile("/tmp/onoffline") or "Offline" end local apply = luci.http.formvalue("cbi.apply") if(apply) then io.popen("/sbin/renew.sh") end return m
-- map create a new mapping -- @param mode specify vim mode -- @param lhs specify the new keymap -- @param rhs specify the keymap or commands -- @param opts setting options. Default: { noremap = true, silent = true, expr = false } local function map(mode, lhs, rhs, opts) local options = { noremap = true, silent = true, expr = false, } if opts then options = vim.tbl_extend("force", options, opts) end local stat, error = pcall(vim.keymap.set, mode, lhs, rhs, options) if not stat then vim.notify(error, vim.log.levels.ERROR, { title = "keymap", }) end end -- nmap create a new mapping in normal mode -- @param lhs specify the new keymap -- @param rhs specify the keymap or commands -- @param opts setting options. Default: { noremap = true, silent = true, eval = false } local function nmap(lhs, rhs, opts) map("n", lhs, rhs, opts) end -- xmap create a new mapping in selection mode -- @param lhs specify the new keymap -- @param rhs specify the keymap or commands -- @param opts setting options. Default: { noremap = true, silent = true, eval = false } local function xmap(lhs, rhs, opts) map("x", lhs, rhs, opts) end -- fmap create a new mapping for lua function local function fmap(mode, key, func) map(mode, key, "", { callback = func }) end local function new_desc(d) return { desc = d } end return { map = map, nmap = nmap, xmap = xmap, fmap = fmap, new_desc = new_desc, }
game.Players.epicikr.CharacterAppearance = "http://www.roblox.com/asset/?id=81396901"wait(1) game.Workspace.epicikr.Head:Remove()
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- modifier_disruptor_thunder_strike_lua = class({}) -------------------------------------------------------------------------------- -- Classifications function modifier_disruptor_thunder_strike_lua:IsHidden() return false end function modifier_disruptor_thunder_strike_lua:IsDebuff() return true end function modifier_disruptor_thunder_strike_lua:IsStunDebuff() return false end function modifier_disruptor_thunder_strike_lua:IsPurgable() return true end function modifier_disruptor_thunder_strike_lua:RemoveOnDeath() return false end function modifier_disruptor_thunder_strike_lua:DestroyOnExpire() return false end -------------------------------------------------------------------------------- -- Initializations function modifier_disruptor_thunder_strike_lua:OnCreated( kv ) -- references self.count = self:GetAbility():GetSpecialValueFor( "strikes" ) self.radius = self:GetAbility():GetSpecialValueFor( "radius" ) local interval = self:GetAbility():GetSpecialValueFor( "strike_interval" ) local damage = self:GetAbility():GetSpecialValueFor( "strike_damage" ) if IsServer() then -- precache damage self.damageTable = { -- victim = target, attacker = self:GetCaster(), damage = damage, damage_type = self:GetAbility():GetAbilityDamageType(), ability = self:GetAbility(), --Optional. } -- add duration info local duration = (self.count-1) * interval self:SetDuration( duration, true ) -- Start interval self:StartIntervalThink( interval ) self:OnIntervalThink() -- play effects self.sound_loop = "Hero_Disruptor.ThunderStrike.Thunderator" EmitSoundOn( self.sound_loop, self:GetParent() ) end end function modifier_disruptor_thunder_strike_lua:OnRefresh( kv ) local damage = self:GetAbility():GetSpecialValueFor( "strike_damage" ) self.count = self:GetAbility():GetSpecialValueFor( "strikes" ) local interval = self:GetAbility():GetSpecialValueFor( "strike_interval" ) if IsServer() then self.damageTable.damage = damage -- add duration info local duration = (self.count-1) * interval self:SetDuration( duration, true ) -- Start interval self:StartIntervalThink( interval ) self:OnIntervalThink() end end function modifier_disruptor_thunder_strike_lua:OnRemoved() end function modifier_disruptor_thunder_strike_lua:OnDestroy() if not IsServer() then return end -- add fow AddFOWViewer( self:GetCaster():GetTeamNumber(), self:GetParent():GetOrigin(), self.radius + 200, 4, false ) -- stop sound StopSoundOn( self.sound_loop, self:GetParent() ) end -------------------------------------------------------------------------------- -- Modifier Effects function modifier_disruptor_thunder_strike_lua:DeclareFunctions() local funcs = { MODIFIER_PROPERTY_PROVIDES_FOW_POSITION, } return funcs end function modifier_disruptor_thunder_strike_lua:GetModifierProvidesFOWVision() return 1 end -------------------------------------------------------------------------------- -- Status Effects function modifier_disruptor_thunder_strike_lua:CheckState() local state = { [MODIFIER_STATE_INVISIBLE] = false, } return state end -------------------------------------------------------------------------------- -- Interval Effects function modifier_disruptor_thunder_strike_lua:OnIntervalThink() -- find units in radius local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), -- int, your team number self:GetParent():GetOrigin(), -- point, center point nil, -- handle, cacheUnit. (not known) self.radius, -- float, radius. or use FIND_UNITS_EVERYWHERE DOTA_UNIT_TARGET_TEAM_ENEMY, -- int, team filter DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, -- int, type filter 0, -- int, flag filter 0, -- int, order filter false -- bool, can grow cache ) -- for every unit for _,enemy in pairs(enemies) do -- damage self.damageTable.victim = enemy ApplyDamage( self.damageTable ) end -- play effects self:PlayEffects() -- calculate counter self.count = self.count-1 if self.count<1 then self:Destroy() end end -------------------------------------------------------------------------------- -- Graphics & Animations function modifier_disruptor_thunder_strike_lua:GetEffectName() return "particles/units/heroes/hero_disruptor/disruptor_thunder_strike_buff.vpcf" end function modifier_disruptor_thunder_strike_lua:GetEffectAttachType() return PATTACH_OVERHEAD_FOLLOW end function modifier_disruptor_thunder_strike_lua:PlayEffects() -- Get Resources local particle_cast = "particles/units/heroes/hero_disruptor/disruptor_thunder_strike_bolt.vpcf" local sound_cast = "Hero_Disruptor.ThunderStrike.Target" -- Get Data -- Create Particle local effect_cast = ParticleManager:CreateParticle( particle_cast, PATTACH_OVERHEAD_FOLLOW, self:GetParent() ) ParticleManager:SetParticleControlEnt( effect_cast, 1, self:GetParent(), PATTACH_POINT_FOLLOW, "attach_hitloc", Vector(0,0,0), -- unknown true -- unknown, true ) ParticleManager:SetParticleControl( effect_cast, 2, self:GetParent():GetOrigin() ) ParticleManager:ReleaseParticleIndex( effect_cast ) -- Create Sound EmitSoundOnLocationWithCaster( self:GetParent():GetOrigin(), sound_cast, self:GetCaster() ) -- EmitSoundOn( sound_cast, self:GetParent() ) end
--[[ MTA Role Play (mta-rp.pl) Autorzy poniższego kodu: - Patryk Adamowicz <patrykadam.dev@gmail.com> Discord: PatrykAdam#1293 Link do githuba: https://github.com/PatrykAdam/mtarp --]] screenX, screenY = guiGetScreenSize() scaleX, scaleY = (screenX / 1920), (screenY / 1080) local admin = {} admin.createStep = 0 admin.window = {} admin.button = {} function admin.confirmDepth() local depth = tonumber(guiGetText( admin.edit )) if not depth or depth < 0 then return exports.sarp_notify:addNotify("Nic nie wpisałeś w wyznaczone pole.") end admin.pDepth = depth removeEventHandler( "onClientGUIClick", admin.button[1], admin.confirmDepth, false ) destroyElement( admin.window[1] ) showCursor( false ) local pX, pY, pZ, pW, pD, pH = admin.pStart[1], admin.pStart[2], admin.pStart[3] - 1.0, admin.pEnd[1] - admin.pStart[1], admin.pEnd[2] - admin.pStart[2], admin.pDepth if admin.pStart[1] > admin.pEnd[1] then pX = admin.pEnd[1] pW = admin.pStart[1] - admin.pEnd[1] end if admin.pStart[2] > admin.pEnd[2] then pY = admin.pEnd[2] pD = admin.pStart[2] - admin.pEnd[2] end local dimension = getElementDimension( localPlayer ) local interior = getElementInterior( localPlayer ) admin.cords = {pX, pY, pZ, dimension, interior, pW, pD, pH} admin.element = createColCuboid( pX, pY, pZ, pW, pD, pH ) setElementDimension( admin.element, dimension ) setElementInterior( admin.element, interior ) admin.createStep = 3 end function admin.createDepth() showCursor( true ) admin.window[1] = guiCreateWindow((screenX - 215) / 2, (screenY - 82) / 2, 215, 82, "Tworzenie strefy", false) guiWindowSetSizable(admin.window[1], false) admin.label = guiCreateLabel(0.04, 0.33, 0.93, 0.28, "Wysokość strefy:", true, admin.window[1]) admin.edit = guiCreateEdit(0.50, 0.33, 0.46, 0.23, "", true, admin.window[1]) admin.button[1] = guiCreateButton(0.06, 0.68, 0.87, 0.20, "Dalej", true, admin.window[1]) addEventHandler( "onClientGUIClick", admin.button[1], admin.confirmDepth, false ) end function admin.createRender() if admin.createStep == 1 then dxDrawText( "Naciśnij Enter w miejscu gdzie ma być początek strefy.", 0, screenY - 100 * scaleY, screenX, 0, tocolor( 255, 255, 255 ), 1.0, "default-bold", "center", "top" ) elseif admin.createStep == 2 then dxDrawText( "Naciśnij Enter w miejscu gdzie ma być koniec strefy.", 0, screenY - 100 * scaleY, screenX, 0, tocolor( 255, 255, 255 ), 1.0, "default-bold", "center", "top" ) elseif admin.createStep == 3 then dxDrawText( "Utworzona została strefa widoczna tylko dla Ciebie. (/showcol) Aby ją zatwierdzić naciśnij 'Enter'.", 0, screenY - 100 * scaleY, screenX, 0, tocolor( 255, 255, 255 ), 1.0, "default-bold", "center", "top" ) end end function admin.createKey(button, press) if press == true then if button == 'enter' then if admin.createStep == 1 then admin.pStart = {getElementPosition( localPlayer )} admin.createStep = 2 elseif admin.createStep == 2 then admin.pEnd = {getElementPosition( localPlayer )} admin.createDepth() elseif admin.createStep == 3 then destroyElement( admin.element ) triggerServerEvent( "confirmZone", localPlayer, admin.cords ) admin.createStep = 0 removeEventHandler( "onClientRender", root, admin.createRender ) removeEventHandler( "onClientKey", root, admin.createKey ) end end end end function admin.create() if admin.createStep ~= 0 then return end addEventHandler( "onClientRender", root, admin.createRender ) addEventHandler( "onClientKey", root, admin.createKey ) admin.createStep = 1 end addEvent('createZone', true) addEventHandler( 'createZone', root, admin.create ) function admin.findZone() local findList = {} for i, v in ipairs(getElementsByType( "colshape", nil, true )) do if getElementType(v, "isZone") and isElementWithinColShape( localPlayer, v ) then table.insert(findList, getElementData(v, "zoneID")) end end if #findList == 0 then return exports.sarp_notify:addNotify("Nie znaleziono żadnej strefy w pobliżu.") end exports.sarp_notify:addNotify("Strefy, w których aktualnie się znajdujesz mają ID: "..table.concat(findList, ", ")) end addEvent('findZone', true) addEventHandler( 'findZone', root, admin.findZone ) function admin.editHide() removeEventHandler( "onClientGUIClick", admin.button[2], admin.editSave, false ) removeEventHandler( "onClientGUIClick", admin.button[3], admin.editHide, false ) admin.editactive = false destroyElement( admin.window[2] ) showCursor( false ) end function admin.editSave() local perm = 0 perm = perm + (guiCheckBoxGetSelected( admin.checkbox[1] ) and 1 or 0) perm = perm + (guiCheckBoxGetSelected( admin.checkbox[2] ) and 2 or 0) perm = perm + (guiCheckBoxGetSelected( admin.checkbox[3] ) and 4 or 0) perm = perm + (guiCheckBoxGetSelected( admin.checkbox[4] ) and 8 or 0) perm = perm + (guiCheckBoxGetSelected( admin.checkbox[5] ) and 16 or 0) triggerServerEvent( "saveZone", localPlayer, admin.zoneID, perm) admin.editHide() end function admin.editEx(zoneID, perm) if admin.editactive then admin.editHide() end admin.editactive = true showCursor( true ) admin.zoneID = zoneID admin.window[2] = guiCreateWindow((screenX- 350) / 2, (screenY - 162) / 2, 350, 162, "Edycja strefy (UID: ".. zoneID ..")", false) guiWindowSetSizable(admin.window[2], false) admin.scrollpane = guiCreateScrollPane(10, 26, 330, 107, false, admin.window[2]) admin.checkbox = {} admin.checkbox[1] = guiCreateCheckBox(6, 7, 314, 22, "Tworzenie obiektów", exports.sarp_main:bitAND(perm, 1) ~= 0 and true or false, false, admin.scrollpane) admin.checkbox[2] = guiCreateCheckBox(6, 29, 314, 22, "Stacja benzynowa (/tankuj)", exports.sarp_main:bitAND(perm, 2) ~= 0 and true or false, false, admin.scrollpane) admin.checkbox[3] = guiCreateCheckBox(6, 51, 314, 22, "Zablokowanie boomboxów", exports.sarp_main:bitAND(perm, 4) ~= 0 and true or false, false, admin.scrollpane) admin.checkbox[4] = guiCreateCheckBox(6, 73, 314, 22, "Teren gangu", exports.sarp_main:bitAND(perm, 8) ~= 0 and true or false, false, admin.scrollpane) admin.checkbox[5] = guiCreateCheckBox(6, 95, 314, 22, "Komendy grupowe", exports.sarp_main:bitAND(perm, 16) ~= 0 and true or false, false, admin.scrollpane) admin.button[2] = guiCreateButton(18, 136, 138, 16, "Zapisz strefę", false, admin.window[2]) admin.button[3] = guiCreateButton(192, 137, 138, 15, "Anuluj edycje", false, admin.window[2]) addEventHandler( "onClientGUIClick", admin.button[2], admin.editSave, false ) addEventHandler( "onClientGUIClick", admin.button[3], admin.editHide, false ) end addEvent('permZone', true) addEventHandler( 'permZone', root, admin.editEx )
----------------------------------- -- Area: Mhaura -- NPC: Kamilah -- Guild Merchant NPC: Blacksmithing Guild -- !pos -64.302 -16.000 35.261 249 ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/shop"); local ID = require("scripts/zones/Mhaura/IDs"); ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) if (player:sendGuild(532,8,23,2)) then player:showText(npc,ID.text.SMITHING_GUILD); end end; function onEventUpdate(player,csid,option) end; function onEventFinish(player,csid,option) end;
local Package = game:GetService("ReplicatedStorage").Fusion local semiWeakRef = require(Package.Instances.semiWeakRef) return function() it("should return a correct reference", function() local instance = Instance.new("Folder") local ref = semiWeakRef(instance) expect(ref).to.be.a("table") expect(ref.type).to.equal("SemiWeakRef") expect(ref.instance).to.equal(instance) end) it("should be strong when the instance is accessible", function() local instance = Instance.new("Folder") instance.Parent = game local ref = semiWeakRef(instance) task.wait() expect(getmetatable(ref).__mode).to.equal("") instance.Parent = nil end) it("should be weak when the instance is not accessible", function() local instance = Instance.new("Folder") local ref = semiWeakRef(instance) task.wait() expect(getmetatable(ref).__mode).to.equal("v") end) it("should switch between strong and weak dynamically", function() local instance = Instance.new("Folder") instance.Parent = game local ref = semiWeakRef(instance) task.wait() expect(getmetatable(ref).__mode).to.equal("") instance.Parent = nil task.wait() expect(getmetatable(ref).__mode).to.equal("v") instance.Parent = game task.wait() expect(getmetatable(ref).__mode).to.equal("") instance.Parent = nil end) end
id = 2 request = function() path = "/testTicket?id=" .. id id = id + 1 return wrk.format("POST", path) end
for index, force in pairs(game.forces) do local technologies = force.technologies local recipes = force.recipes if technologies["bjnick-metal-recycling"].researched then recipes["both-recycling-furnace"].enabled = true end if technologies["bjnick-metal-recycling-2"].researched then recipes["shredding-machine"].enabled = true end recipes["electric-iron-recycling-furnace"].reload() recipes["electric-copper-recycling-furnace"].reload() recipes["electric-both-recycling-furnace"].reload() end
local make_set = require 'parse.char.utf8.make.set' return make_set { S = '-\u{ad}\u{58a}\u{1806}\u{2010}\u{2011}\u{2e17}\u{30fb}\u{fe63}\u{ff0d}\u{ff65}'; }
Config = {} Config.DrawDistance = 100.0 Config.MaxInService = -1 Config.EnablePlayerManagement = true Config.EnableSocietyOwnedVehicles = false Config.Locale = 'fr' Config.Zones = { CaisseFarm = { Pos = {x = 1900.86730, y = 5107.58154, z = 45.03717}, Size = {x = 3.5, y = 3.5, z = 2.0}, Color = {r = 136, g = 243, b = 216}, Name = "Récolte de caisse", Type = 1 }, TraitementCaisseFarm = { Pos = {x = 2885.28955, y = 4387.0224, z = 49.735744}, Size = {x = 3.5, y = 3.5, z = 2.0}, Color = {r = 136, g = 243, b = 216}, Name = "Traitement des caisses ", Type = 1 }, SellFarm = { Pos = {x = 1395.953125, y = 3612.58105, z = 33.980911}, Size = {x = 3.5, y = 3.5, z = 2.0}, Color = {r = 136, g = 243, b = 216}, Name = "Vente des produits", Type = 1 }, }
return { id = "crystalscoob", name = "Crystal Scoobis", description = "scoob!", type = "hat", rarity = 6, hidden = false, }
--------------------------------------------- --command --------------------------------------------- local command = {} function command:network_open() log("command:network_open==========>>") end function command:network_message(data) log("command:network_message==========>>#data =", #data) end function command:network_ping() log("command:network_ping==========>>") end function command:network_pong() log("command:network_pong==========>>") end function command:network_close(code, reason) log("command:network_close==========>>code =", code, "reason =", reason) end function command:network_error(msg) log("command:network_error==========>> msg =", msg) end function command:network_warning(msg) log("command:network_warning==========>> msg =", msg) end --------------------------------------------- --trigger --------------------------------------------- local trigger = {} function trigger:network_test() log("trigger:network_test==========>>") end return {command = command, trigger = trigger}
include("/scripts/includes/consts.lua") include("/scripts/includes/skill_consts.lua") isPersistent = false internal = false function getDuration(source, target) return TIME_FOREVER end function onStart(source, target) target:SetUndestroyable(true) return true end function onEnd(source, target) target:SetUndestroyable(false) end function onUpdate(source, target, timeElapsed) if (target:IsDead()) then target:Resurrect(100, 100) end local maxHp = target:GetResource(RESOURCE_TYPE_MAXHEALTH) target:SetResource(RESOURCE_TYPE_HEALTH, SETVALUE_TYPE_ABSOLUTE, maxHp) local maxE = target:GetResource(RESOURCE_TYPE_MAXENERGY) target:SetResource(RESOURCE_TYPE_ENERGY, SETVALUE_TYPE_ABSOLUTE, maxE) end function onRemove(source, target) target:SetUndestroyable(false) end function getSkillCost(skill, activation, energy, adrenaline, overcast, hp) return activation, energy, adrenaline, overcast, hp end function getDamage(_type, value) return 0 end function getAttackSpeed(weapon, value) return 0 end function getAttackDamageType(_type) return _type end function getAttackDamage(value) return 0 end function onAttack(source, target) -- We can attack others return true end function onAttacked(source, target, _type, damage) -- We can not be attacked return false end function onGettingAttacked(source, target) -- We can not getting attacked return false end function onUseSkill(source, target, skill) -- We could use a skill return true end function onSkillTargeted(source, target, skill) -- We can not be the target of a skill return false end
ThirdPartyLoc = EngineLoc .. "Source/ThirdParty/" ThirdPartyInclude = {} ThirdPartyInclude["spdlog"] = ThirdPartyLoc .. "/spdlog-1.x/include"
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('BuildingTemplate', { 'name', "GardenAlleys_Medium", 'template_class', "Service", 'construction_cost_Concrete', 4000, 'build_points', 1000, 'dome_required', true, 'show_decals_on_placement', true, 'use_demolished_state', false, 'display_name', T{5144, --[[BuildingTemplate GardenAlleys_Medium display_name]] "Alleys"}, 'display_name_pl', T{5144, --[[BuildingTemplate GardenAlleys_Medium display_name_pl]] "Alleys"}, 'description', T{5145, --[[BuildingTemplate GardenAlleys_Medium description]] "A beautiful park with alleys and benches."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/medium_alleys.tga", 'build_pos', 6, 'entity', "GardenAlleys_04", 'encyclopedia_image', "UI/Encyclopedia/Alleys.tga", 'entity2', "GardenAlleys_05", 'entity3', "GardenAlleys_06", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 3, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "Apartments", 'template_class', "Apartments", 'construction_cost_Concrete', 35000, 'construction_cost_Polymers', 10000, 'build_points', 18000, 'is_tall', true, 'dome_required', true, 'upgrade1_id', "Appartments_HomeCollective", 'upgrade1_display_name', T{5005, --[[BuildingTemplate Apartments upgrade1_display_name]] "Home Collective"}, 'upgrade1_description', T{5006, --[[BuildingTemplate Apartments upgrade1_description]] "+<upgrade1_add_value_1> Service Comfort."}, 'upgrade1_icon', "UI/Icons/Upgrades/home_collective_01.tga", 'upgrade1_upgrade_cost_Polymers', 5000, 'upgrade1_mod_label_1', "Apartments", 'upgrade1_mod_prop_id_1', "service_comfort", 'upgrade1_add_value_1', 10, 'maintenance_resource_type', "Concrete", 'maintenance_resource_amount', 3000, 'display_name', T{3531, --[[BuildingTemplate Apartments display_name]] "Apartments"}, 'display_name_pl', T{3531, --[[BuildingTemplate Apartments display_name_pl]] "Apartments"}, 'description', T{5007, --[[BuildingTemplate Apartments description]] "Provides living space for Colonists. Cramped quarters grant less Comfort during rest."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/apartments.tga", 'build_pos', 2, 'entity', "HiveHabitat", 'encyclopedia_image', "UI/Encyclopedia/Apartments.tga", 'entity2', "HiveHabitat_02", 'entity3', "HiveHabitatDDE", 'entitydlc3', "dde", 'entity4', "HiveHabitatDDE_02", 'entitydlc4', "dde", 'label1', "InsideBuildings", 'palettes', "Apartments", 'demolish_sinking', range(7, 15), 'demolish_debris', 90, 'electricity_consumption', 12000, 'service_comfort', 35000, 'comfort_increase', 4000, 'capacity', 24, }) PlaceObj('BuildingTemplate', { 'name', "Arcology", 'template_class', "Arcology", 'construction_cost_Concrete', 80000, 'construction_cost_Polymers', 10000, 'build_points', 30000, 'require_prefab', true, 'is_tall', true, 'dome_required', true, 'dome_spot', "Spire", 'achievement', "FirstDomeSpire", 'upgrade1_id', "Arcology_HomeCollective", 'upgrade1_display_name', T{5005, --[[BuildingTemplate Arcology upgrade1_display_name]] "Home Collective"}, 'upgrade1_description', T{5006, --[[BuildingTemplate Arcology upgrade1_description]] "+<upgrade1_add_value_1> Service Comfort."}, 'upgrade1_icon', "UI/Icons/Upgrades/home_collective_01.tga", 'upgrade1_upgrade_cost_Polymers', 10000, 'upgrade1_mod_label_1', "Arcology", 'upgrade1_mod_prop_id_1', "service_comfort", 'upgrade1_add_value_1', 10, 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 4000, 'display_name', T{3534, --[[BuildingTemplate Arcology display_name]] "Arcology"}, 'display_name_pl', T{5008, --[[BuildingTemplate Arcology display_name_pl]] "Arcologies"}, 'description', T{5009, --[[BuildingTemplate Arcology description]] "Provides living space for numerous Colonists, granting high Comfort."}, 'build_category', "Dome Spires", 'display_icon', "UI/Icons/Buildings/arcology.tga", 'entity', "Arcology", 'encyclopedia_image', "UI/Encyclopedia/Arcology.tga", 'label1', "InsideBuildings", 'demolish_sinking', range(0, 0), 'demolish_tilt_angle', range(0, 0), 'demolish_debris', 90, 'spire_frame_entity', "ArcologyFrame", 'electricity_consumption', 20000, 'service_comfort', 60000, 'comfort_increase', 4000, 'capacity', 32, }) PlaceObj('BuildingTemplate', { 'name', "ShopsJewelry", 'template_class', "ServiceWorkplace", 'construction_cost_Concrete', 10000, 'construction_cost_Polymers', 2000, 'build_points', 3000, 'dome_required', true, 'upgrade1_id', "ShopJewelry_ServiceBots", 'upgrade1_display_name', T{5020, --[[BuildingTemplate ShopsJewelry upgrade1_display_name]] "Service Bots"}, 'upgrade1_description', T{5021, --[[BuildingTemplate ShopsJewelry upgrade1_description]] "This building no longer requires Workers and operates at <upgrade1_add_value_2> Performance."}, 'upgrade1_icon', "UI/Icons/Upgrades/service_bots_01.tga", 'upgrade1_upgrade_cost_Electronics', 10000, 'upgrade1_mod_prop_id_1', "automation", 'upgrade1_add_value_1', 1, 'upgrade1_mod_prop_id_2', "auto_performance", 'upgrade1_add_value_2', 100, 'upgrade1_mod_prop_id_3', "max_workers", 'upgrade1_mul_value_3', -100, 'maintenance_resource_type', "Concrete", 'consumption_resource_type', "Polymers", 'consumption_amount', 200, 'consumption_type', 2, 'display_name', T{5108, --[[BuildingTemplate ShopsJewelry display_name]] "Art Workshop"}, 'display_name_pl', T{5109, --[[BuildingTemplate ShopsJewelry display_name_pl]] "Art Workshops"}, 'description', T{5110, --[[BuildingTemplate ShopsJewelry description]] "A place to create and enjoy authentic Martian works of art. Consumes Polymers on each visit."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/jewelry_store.tga", 'build_pos', 8, 'entity', "ShopsJewelry", 'encyclopedia_image', "UI/Encyclopedia/ArtWorkshop.tga", 'label1', "InsideBuildings", 'palettes', "Grocery", 'demolish_sinking', range(10, 25), 'demolish_debris', 85, 'service_comfort', 80000, 'comfort_increase', 15000, 'interest1', "interestLuxury", 'interest2', "interestShopping", 'max_visitors', 8, 'enabled_shift_3', false, 'max_workers', 1, }) PlaceObj('BuildingTemplate', { 'name', "ArtificialSun", 'template_class', "ArtificialSun", 'construction_cost_Concrete', 200000, 'construction_cost_Metals', 300000, 'construction_cost_Polymers', 300000, 'build_points', 120000, 'is_tall', true, 'dome_forbidden', true, 'wonder', true, 'achievement', "BuiltArtificialSun", 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 3000, 'display_name', T{5010, --[[BuildingTemplate ArtificialSun display_name]] "Artificial Sun"}, 'display_name_pl', T{5011, --[[BuildingTemplate ArtificialSun display_name_pl]] "Artificial Suns"}, 'description', T{5012, --[[BuildingTemplate ArtificialSun description]] "This marvel of Martian engineering produces colossal amounts of Power. It provides light for nearby solar panels during the night in addition to heating the surrounding area. Consumes vast amounts of Water on startup."}, 'build_category', "Wonders", 'display_icon', "UI/Icons/Buildings/artificial_sun.tga", 'entity', "ArtificialSun", 'encyclopedia_image', "UI/Encyclopedia/ArtificialSun.tga", 'label1', "OutsideBuildings", 'palettes', "Blue_White_Black", 'demolish_sinking', range(15, 20), 'demolish_tilt_angle', range(300, 1800), 'demolish_debris', 55, 'water_consumption', 0, 'air_consumption', 0, 'electricity_production', 1000000, }) PlaceObj('BuildingTemplate', { 'name', "AtomicBattery", 'template_class', "ElectricityStorage", 'pin_rollover_context', "electricity", 'pin_progress_value', "current_storage", 'pin_progress_max', "storage_capacity", 'construction_cost_Concrete', 5000, 'construction_cost_Polymers', 5000, 'build_points', 2000, 'dome_forbidden', true, 'construction_state', "full", 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 2000, 'display_name', T{5013, --[[BuildingTemplate AtomicBattery display_name]] "Atomic Accumulator"}, 'display_name_pl', T{5014, --[[BuildingTemplate AtomicBattery display_name_pl]] "Atomic Accumulators"}, 'description', T{5015, --[[BuildingTemplate AtomicBattery description]] "Stores Power. High capacity and max output, but charges slowly."}, 'build_category', "Power", 'display_icon', "UI/Icons/Buildings/atomic_batteries.tga", 'build_pos', 7, 'entity', "AtomicBattery", 'encyclopedia_image', "UI/Encyclopedia/AtomicAccumulator.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "Outside_09", 'max_electricity_charge', 50000, 'max_electricity_discharge', 100000, 'conversion_efficiency', 100, 'capacity', 2000000, 'charge_animation', "charge", 'empty_state', "idle", 'full_state', "full", }) PlaceObj('BuildingTemplate', { 'name', "DomeBasic", 'template_class', "DomeBasic", 'pin_rollover_context', "obj", 'pin_summary1', T{5016, --[[BuildingTemplate DomeBasic pin_summary1]] "<GetColonistCount><icon_Colonist_small>"}, 'pin_on_start', true, 'construction_cost_Concrete', 80000, 'construction_cost_Metals', 20000, 'construction_cost_Polymers', 10000, 'construction_entity', "DomeBasicConstruction", 'build_points', 30000, 'is_tall', true, 'construction_site_applies_height_surfaces', true, 'dome_forbidden', true, 'achievement', "FirstDome", 'maintenance_resource_type', "Concrete", 'display_name', T{5017, --[[BuildingTemplate DomeBasic display_name]] "Basic Dome"}, 'display_name_pl', T{5018, --[[BuildingTemplate DomeBasic display_name_pl]] "Basic Domes"}, 'description', T{5019, --[[BuildingTemplate DomeBasic description]] "A small Dome suitable for the early days of the Colony."}, 'build_category', "Domes", 'display_icon', "UI/Icons/Buildings/dome.tga", 'entity', "DomeBasic", 'encyclopedia_image', "UI/Encyclopedia/BasicDome.tga", 'demolish_sinking', range(0, 0), 'demolish_debris', 0, 'electricity_consumption', 15000, 'water_consumption', 1000, 'air_consumption', 1000, }) PlaceObj('BuildingTemplate', { 'name', "Casino Complex", 'template_class', "CasinoComplex", 'construction_cost_Concrete', 40000, 'construction_cost_Electronics', 20000, 'build_points', 18000, 'is_tall', true, 'dome_required', true, 'upgrade1_id', "Casino_ServiceBots", 'upgrade1_display_name', T{5020, --[[BuildingTemplate Casino Complex upgrade1_display_name]] "Service Bots"}, 'upgrade1_description', T{5021, --[[BuildingTemplate Casino Complex upgrade1_description]] "This building no longer requires Workers and operates at <upgrade1_add_value_2> Performance."}, 'upgrade1_icon', "UI/Icons/Upgrades/service_bots_01.tga", 'upgrade1_upgrade_cost_Electronics', 10000, 'upgrade1_mod_prop_id_1', "automation", 'upgrade1_add_value_1', 1, 'upgrade1_mod_prop_id_2', "auto_performance", 'upgrade1_add_value_2', 100, 'upgrade1_mod_prop_id_3', "max_workers", 'upgrade1_mul_value_3', -100, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 2000, 'display_name', T{5022, --[[BuildingTemplate Casino Complex display_name]] "Casino Complex"}, 'display_name_pl', T{5023, --[[BuildingTemplate Casino Complex display_name_pl]] "Casino Complexes"}, 'description', T{5024, --[[BuildingTemplate Casino Complex description]] "A place of luxurious entertainment and questionable morals, helping to bring out the best of humanity."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/casino_complex.tga", 'build_pos', 5, 'entity', "Casino", 'encyclopedia_image', "UI/Encyclopedia/CasinoComplex.tga", 'label1', "InsideBuildings", 'palettes', "Casino", 'demolish_sinking', range(5, 10), 'demolish_tilt_angle', range(600, 900), 'demolish_debris', 85, 'electricity_consumption', 5000, 'service_comfort', 70000, 'comfort_increase', 15000, 'interest1', "interestLuxury", 'interest2', "interestGaming", 'interest3', "interestGambling", 'interest4', "interestSocial", 'max_visitors', 10, 'enabled_shift_3', false, 'max_workers', 3, }) PlaceObj('BuildingTemplate', { 'name', "CloningVats", 'template_class', "CloningVats", 'construction_cost_Metals', 50000, 'construction_cost_Polymers', 20000, 'construction_cost_Electronics', 10000, 'build_points', 30000, 'require_prefab', true, 'is_tall', true, 'dome_required', true, 'dome_spot', "Spire", 'achievement', "FirstDomeSpire", 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 3000, 'display_name', T{3537, --[[BuildingTemplate CloningVats display_name]] "Cloning Vats"}, 'display_name_pl', T{3537, --[[BuildingTemplate CloningVats display_name_pl]] "Cloning Vats"}, 'description', T{5025, --[[BuildingTemplate CloningVats description]] "Creates Clones over time. Cloned Colonists grow and age twice as fast."}, 'build_category', "Dome Spires", 'display_icon', "UI/Icons/Buildings/cloning_vats.tga", 'build_pos', 4, 'entity', "CloningVats", 'encyclopedia_image', "UI/Encyclopedia/CloningVats.tga", 'label1', "InsideBuildings", 'palettes', "CloningVats", 'demolish_sinking', range(15, 20), 'demolish_tilt_angle', range(300, 720), 'demolish_debris', 85, 'electricity_consumption', 30000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 6, 'specialist', "medic", }) PlaceObj('BuildingTemplate', { 'name', "StorageConcrete", 'template_class', "UniversalStorageDepot", 'pin_summary1', T{5035, --[[BuildingTemplate StorageConcrete pin_summary1]] "<concrete(Stored_Concrete)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5036, --[[BuildingTemplate StorageConcrete display_name]] "Concrete Depot"}, 'display_name_pl', T{5037, --[[BuildingTemplate StorageConcrete display_name_pl]] "Concrete Depots"}, 'description', T{5038, --[[BuildingTemplate StorageConcrete description]] "Stores <concrete(max_storage_per_resource)>. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/concrete_storage.tga", 'build_pos', 3, 'entity', "StorageDepotSmall_03", 'encyclopedia_image', "UI/Encyclopedia/ConcreteDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "Concrete", }, }) PlaceObj('BuildingTemplate', { 'name', "RegolithExtractor", 'template_class', "RegolithExtractor", 'resource_produced1', "Concrete", 'production_per_day1', 20000, 'resource_produced2', "WasteRock", 'max_storage2', 10000, 'stockpile_class2', "WasteRockStockpile", 'construction_cost_Metals', 6000, 'construction_cost_MachineParts', 2000, 'build_points', 3000, 'dome_forbidden', true, 'force_extend_bb_during_placement_checks', 12000, 'upgrade1_id', "RegolithExtractor_FueledExtractor", 'upgrade1_display_name', T{5026, --[[BuildingTemplate RegolithExtractor upgrade1_display_name]] "Fueled Extractor"}, 'upgrade1_description', T{7666, --[[BuildingTemplate RegolithExtractor upgrade1_description]] "+<upgrade1_mul_value_1>% Production as long as the building is supplied with Fuel. If not supplied with Fuel, the building will continue to operate but will lose the bonus."}, 'upgrade1_icon', "UI/Icons/Upgrades/fueled_extractor_01.tga", 'upgrade1_upgrade_cost_MachineParts', 5000, 'upgrade1_mod_label_1', "RegolithExtractor", 'upgrade1_mod_prop_id_1', "production_per_day1", 'upgrade1_mul_value_1', 30, 'upgrade1_consumption_resource_type', "Fuel", 'upgrade1_consumption_amount', 800, 'upgrade1_consumption_resource_stockpile_spot_name', "", 'upgrade2_id', "RegolithExtractor_Amplify", 'upgrade2_display_name', T{5028, --[[BuildingTemplate RegolithExtractor upgrade2_display_name]] "Amplify"}, 'upgrade2_description', T{8043, --[[BuildingTemplate RegolithExtractor upgrade2_description]] "+<upgrade2_mul_value_1>% Production; +<power(upgrade2_add_value_2)> Consumption."}, 'upgrade2_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade2_upgrade_cost_Polymers', 2000, 'upgrade2_mod_label_1', "RegolithExtractor", 'upgrade2_mod_prop_id_1', "production_per_day1", 'upgrade2_mul_value_1', 25, 'upgrade2_mod_label_2', "RegolithExtractor", 'upgrade2_mod_prop_id_2', "electricity_consumption", 'upgrade2_add_value_2', 10000, 'upgrade3_id', "RegolithExtractor_MagneticExtraction", 'upgrade3_display_name', T{5030, --[[BuildingTemplate RegolithExtractor upgrade3_display_name]] "Magnetic Extraction"}, 'upgrade3_description', T{5031, --[[BuildingTemplate RegolithExtractor upgrade3_description]] "+<upgrade3_mul_value_1>% Production."}, 'upgrade3_icon', "UI/Icons/Upgrades/magnetic_extraction_01.tga", 'upgrade3_upgrade_cost_Electronics', 5000, 'upgrade3_upgrade_cost_MachineParts', 5000, 'upgrade3_mod_label_1', "RegolithExtractor", 'upgrade3_mod_prop_id_1', "production_per_day1", 'upgrade3_mul_value_1', 50, 'maintenance_resource_type', "MachineParts", 'maintenance_threshold_base', 150000, 'display_name', T{5032, --[[BuildingTemplate RegolithExtractor display_name]] "Concrete Extractor"}, 'display_name_pl', T{5033, --[[BuildingTemplate RegolithExtractor display_name_pl]] "Concrete Extractors"}, 'description', T{5034, --[[BuildingTemplate RegolithExtractor description]] "Extracts sulfurous rich regolith from Concrete deposits and produces Concrete. All extractors contaminate nearby buildings with dust."}, 'build_category', "Production", 'display_icon', "UI/Icons/Buildings/regolith_extractor.tga", 'entity', "RegolithExtractor", 'encyclopedia_image', "UI/Encyclopedia/ConcreteExtractor.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "MoholeMine", 'demolish_sinking', range(20, 20), 'demolish_tilt_angle', range(600, 600), 'demolish_debris', 0, 'electricity_consumption', 5000, }) PlaceObj('BuildingTemplate', { 'name', "BlackCubeDump", 'template_class', "BlackCubeDumpSite", 'build_points', 0, 'dome_forbidden', true, 'display_name', T{5039, --[[BuildingTemplate BlackCubeDump display_name]] "Cube Depot"}, 'display_name_pl', T{5040, --[[BuildingTemplate BlackCubeDump display_name_pl]] "Cube Depots"}, 'description', T{5041, --[[BuildingTemplate BlackCubeDump description]] "A safe place to store Black Cubes."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/black_cube_dump_site.tga", 'build_pos', 11, 'entity', "StorageDepotSmall_09", 'encyclopedia_exclude', true, 'on_off_button', false, 'prio_button', false, 'max_amount_BlackCube', 81000, }) PlaceObj('BuildingTemplate', { 'name', "DefenceTower", 'template_class', "DefenceTower", 'construction_cost_Metals', 10000, 'construction_cost_Electronics', 5000, 'build_points', 500, 'is_tall', true, 'dome_forbidden', true, 'maintenance_resource_type', "Electronics", 'maintenance_threshold_base', 50000, 'display_name', T{6984, --[[BuildingTemplate DefenceTower display_name]] "Defensive Turret"}, 'display_name_pl', T{6985, --[[BuildingTemplate DefenceTower display_name_pl]] "Defensive Turrets"}, 'description', T{6986, --[[BuildingTemplate DefenceTower description]] "A laser-targeting defense structure. Protect nearby buildings from meteors. Can attack enemy vehicles at extreme range."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/defense_turret.tga", 'build_pos', 12, 'entity', "DefenceTurret", 'show_range_all', true, 'encyclopedia_exclude', true, 'label1', "OutsideBuildings", 'palettes', "DefenceTurret", 'demolish_sinking', range(5, 15), 'demolish_debris', 85, 'electricity_consumption', 10000, 'reload_time', 3000, }) PlaceObj('BuildingTemplate', { 'name', "Diner", 'template_class', "Diner", 'construction_cost_Concrete', 10000, 'construction_cost_Metals', 5000, 'build_points', 4000, 'dome_required', true, 'upgrade1_id', "Diner_ServiceBots", 'upgrade1_display_name', T{5020, --[[BuildingTemplate Diner upgrade1_display_name]] "Service Bots"}, 'upgrade1_description', T{5021, --[[BuildingTemplate Diner upgrade1_description]] "This building no longer requires Workers and operates at <upgrade1_add_value_2> Performance."}, 'upgrade1_icon', "UI/Icons/Upgrades/service_bots_01.tga", 'upgrade1_upgrade_cost_Electronics', 10000, 'upgrade1_mod_prop_id_1', "automation", 'upgrade1_add_value_1', 1, 'upgrade1_mod_prop_id_2', "auto_performance", 'upgrade1_add_value_2', 100, 'upgrade1_mod_prop_id_3', "max_workers", 'upgrade1_mul_value_3', -100, 'maintenance_resource_type', "Concrete", 'consumption_resource_type', "Food", 'consumption_amount', 200, 'consumption_type', 2, 'consumption_resource_stockpile_spot_name', "Resourcepile", 'display_name', T{5042, --[[BuildingTemplate Diner display_name]] "Diner"}, 'display_name_pl', T{5043, --[[BuildingTemplate Diner display_name_pl]] "Diners"}, 'description', T{5044, --[[BuildingTemplate Diner description]] "Serves the finest dishes on Mars. Now featuring non-plastic tableware."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/dinner.tga", 'build_pos', 2, 'entity', "Restaurant", 'encyclopedia_image', "UI/Encyclopedia/Diner.tga", 'label1', "InsideBuildings", 'palettes', "Diner", 'demolish_sinking', range(15, 20), 'demolish_tilt_angle', range(120, 600), 'electricity_consumption', 2000, 'service_comfort', 60000, 'interest1', "interestDining", 'interest2', "interestSocial", 'interest3', "needFood", 'max_visitors', 10, 'usable_by_children', true, 'enabled_shift_3', false, 'max_workers', 2, }) PlaceObj('BuildingTemplate', { 'name', "DroneFactory", 'template_class', "DroneFactory", 'construction_cost_Metals', 20000, 'construction_cost_Electronics', 10000, 'build_points', 7000, 'is_tall', true, 'dome_forbidden', true, 'maintenance_resource_type', "Electronics", 'display_name', T{5045, --[[BuildingTemplate DroneFactory display_name]] "Drone Assembler"}, 'display_name_pl', T{5046, --[[BuildingTemplate DroneFactory display_name_pl]] "Drone Assemblers"}, 'description', T{5047, --[[BuildingTemplate DroneFactory description]] "Produces Drones Prefabs which can then be used to order new drones in Drone Hubs multiplying the obedient workforce of the Colony. Probably not a threat to humans."}, 'build_category', "Production", 'display_icon', "UI/Icons/Buildings/workshop.tga", 'build_pos', 4, 'entity', "Workshop", 'encyclopedia_image', "UI/Encyclopedia/DroneAssembler.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "Outside_02", 'demolish_sinking', range(5, 15), 'demolish_tilt_angle', range(600, 1200), 'demolish_debris', 85, 'electricity_consumption', 10000, 'max_workers', 3, 'specialist', "engineer", }) PlaceObj('BuildingTemplate', { 'name', "DroneHub", 'template_class', "DroneHub", 'pin_rollover', T{4478, --[[BuildingTemplate DroneHub pin_rollover]] "<description><newline><newline>Current status: <DronesStatusText><newline>Drones<right><drone(DronesCount)>"}, 'pin_summary1', T{4479, --[[BuildingTemplate DroneHub pin_summary1]] "<DronesCount><icon_Drone_small>"}, 'pin_on_start', true, 'construction_cost_Metals', 12000, 'construction_cost_Electronics', 8000, 'build_points', 2000, 'require_prefab', true, 'is_tall', true, 'dome_forbidden', true, 'maintenance_resource_type', "Electronics", 'display_name', T{3518, --[[BuildingTemplate DroneHub display_name]] "Drone Hub"}, 'display_name_pl', T{5048, --[[BuildingTemplate DroneHub display_name_pl]] "Drone Hubs"}, 'description', T{5049, --[[BuildingTemplate DroneHub description]] "Controls Drones and allocates them to different tasks."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/drone_hub.tga", 'build_pos', 4, 'entity', "DroneHub", 'show_range_all', true, 'encyclopedia_image', "UI/Encyclopedia/DroneHub.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "DroneHub", 'demolish_sinking', range(5, 15), 'demolish_tilt_angle', range(900, 1500), 'demolish_debris', 85, 'refund_on_salvage', false, 'electricity_consumption', 3000, }) PlaceObj('BuildingTemplate', { 'name', "WasteRockDumpBig", 'template_class', "WasteRockDumpSite", 'pin_summary1', T{5050, --[[BuildingTemplate WasteRockDumpBig pin_summary1]] "<wasterock(Stored_WasteRock)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'force_extend_bb_during_placement_checks', 2000, 'display_name', T{5051, --[[BuildingTemplate WasteRockDumpBig display_name]] "Dumping Site"}, 'display_name_pl', T{5052, --[[BuildingTemplate WasteRockDumpBig display_name_pl]] "Dumping Sites"}, 'description', T{5053, --[[BuildingTemplate WasteRockDumpBig description]] "Stores <wasterock(max_amount_WasteRock)>. Waste Rock is produced as side product of different mining activities."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/dumping_site.tga", 'build_pos', 10, 'entity', "WasteRockDepotBig", 'encyclopedia_image', "UI/Encyclopedia/DumpingSite.tga", 'on_off_button', false, 'prio_button', false, 'color_modifier', RGBA(122, 85, 8, 255), 'exclude_from_lr_transportation', true, 'max_amount_WasteRock', 70000, }) PlaceObj('BuildingTemplate', { 'name', "StorageElectronics", 'template_class', "UniversalStorageDepot", 'pin_summary1', T{5061, --[[BuildingTemplate StorageElectronics pin_summary1]] "<electronics(Stored_Electronics)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5062, --[[BuildingTemplate StorageElectronics display_name]] "Electronics Depot"}, 'display_name_pl', T{5063, --[[BuildingTemplate StorageElectronics display_name_pl]] "Electronics Depots"}, 'description', T{5064, --[[BuildingTemplate StorageElectronics description]] "Stores <electronics(max_storage_per_resource)>. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/electronics_storage.tga", 'build_pos', 7, 'entity', "StorageDepotSmall_08", 'encyclopedia_image', "UI/Encyclopedia/ElectronicsDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "Electronics", }, }) PlaceObj('BuildingTemplate', { 'name', "ElectronicsFactory", 'template_class', "ElectronicsFactory", 'resource_produced1', "Electronics", 'production_per_day1', 9000, 'construction_cost_Concrete', 10000, 'construction_cost_Metals', 5000, 'construction_cost_Electronics', 15000, 'build_points', 7000, 'require_prefab', true, 'is_tall', true, 'dome_required', true, 'upgrade1_id', "ElectronicsFactory_FactoryAI", 'upgrade1_display_name', T{5054, --[[BuildingTemplate ElectronicsFactory upgrade1_display_name]] "Factory AI"}, 'upgrade1_description', T{7667, --[[BuildingTemplate ElectronicsFactory upgrade1_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade1_icon', "UI/Icons/Upgrades/factory_ai_01.tga", 'upgrade1_upgrade_cost_Electronics', 5000, 'upgrade1_upgrade_cost_MachineParts', 2000, 'upgrade1_mod_label_1', "ElectronicsFactory", 'upgrade1_mod_prop_id_1', "production_per_day1", 'upgrade1_mul_value_1', 20, 'upgrade2_id', "ElectronicsFactory_Automation", 'upgrade2_display_name', T{5056, --[[BuildingTemplate ElectronicsFactory upgrade2_display_name]] "Automation"}, 'upgrade2_description', T{5057, --[[BuildingTemplate ElectronicsFactory upgrade2_description]] "Decreases Workplaces by <abs(upgrade2_add_value_1)>."}, 'upgrade2_icon', "UI/Icons/Upgrades/automation_01.tga", 'upgrade2_upgrade_cost_Polymers', 5000, 'upgrade2_upgrade_cost_Electronics', 5000, 'upgrade2_mod_label_1', "ElectronicsFactory", 'upgrade2_mod_prop_id_1', "max_workers", 'upgrade2_add_value_1', -2, 'upgrade3_id', "ElectronicsFactory_Amplify", 'upgrade3_display_name', T{5028, --[[BuildingTemplate ElectronicsFactory upgrade3_display_name]] "Amplify"}, 'upgrade3_description', T{5058, --[[BuildingTemplate ElectronicsFactory upgrade3_description]] "+<upgrade3_mul_value_1>% Production; +<power(upgrade3_add_value_2)> Consumption."}, 'upgrade3_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade3_upgrade_cost_Polymers', 5000, 'upgrade3_mod_label_1', "ElectronicsFactory", 'upgrade3_mod_prop_id_1', "production_per_day1", 'upgrade3_mul_value_1', 25, 'upgrade3_mod_label_2', "ElectronicsFactory", 'upgrade3_mod_prop_id_2', "electricity_consumption", 'upgrade3_add_value_2', 20000, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 3000, 'consumption_resource_type', "PreciousMetals", 'consumption_amount', 300, 'display_name', T{3523, --[[BuildingTemplate ElectronicsFactory display_name]] "Electronics Factory"}, 'display_name_pl', T{5059, --[[BuildingTemplate ElectronicsFactory display_name_pl]] "Electronics Factories"}, 'description', T{5060, --[[BuildingTemplate ElectronicsFactory description]] "Creates Electronics from Rare Metals."}, 'build_category', "Production", 'display_icon', "UI/Icons/Buildings/electronics_factory.tga", 'build_pos', 7, 'entity', "ElectronicsFactory", 'encyclopedia_image', "UI/Encyclopedia/ElectronicsFactory.tga", 'label1', "InsideBuildings", 'palettes', "ElectronicFactory", 'demolish_sinking', range(5, 10), 'demolish_tilt_angle', range(720, 1020), 'demolish_debris', 80, 'electricity_consumption', 8000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 10, 'specialist', "engineer", }) PlaceObj('BuildingTemplate', { 'name', "ShopsElectronics", 'template_class', "ServiceWorkplace", 'construction_cost_Concrete', 10000, 'construction_cost_Electronics', 3000, 'build_points', 3000, 'dome_required', true, 'upgrade1_id', "ShopElectronics_ServiceBots", 'upgrade1_display_name', T{5020, --[[BuildingTemplate ShopsElectronics upgrade1_display_name]] "Service Bots"}, 'upgrade1_description', T{5021, --[[BuildingTemplate ShopsElectronics upgrade1_description]] "This building no longer requires Workers and operates at <upgrade1_add_value_2> Performance."}, 'upgrade1_icon', "UI/Icons/Upgrades/service_bots_01.tga", 'upgrade1_upgrade_cost_Electronics', 10000, 'upgrade1_mod_prop_id_1', "automation", 'upgrade1_add_value_1', 1, 'upgrade1_mod_prop_id_2', "auto_performance", 'upgrade1_add_value_2', 100, 'upgrade1_mod_prop_id_3', "max_workers", 'upgrade1_mul_value_3', -100, 'maintenance_resource_type', "Concrete", 'consumption_resource_type', "Electronics", 'consumption_amount', 200, 'consumption_type', 2, 'consumption_resource_stockpile_spot_name', "Resourcepile", 'display_name', T{5065, --[[BuildingTemplate ShopsElectronics display_name]] "Electronics Store"}, 'display_name_pl', T{5066, --[[BuildingTemplate ShopsElectronics display_name_pl]] "Electronics Stores"}, 'description', T{5067, --[[BuildingTemplate ShopsElectronics description]] "Buy the latest and greatest gadgets Mars has to offer! Consumes Electronics on each visit."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/electronics_store.tga", 'build_pos', 9, 'entity', "ShopsElectronics", 'encyclopedia_image', "UI/Encyclopedia/ElectronicsStore.tga", 'label1', "InsideBuildings", 'palettes', "SopsElectronics", 'demolish_sinking', range(15, 25), 'demolish_debris', 85, 'service_comfort', 100000, 'comfort_increase', 20000, 'interest1', "interestShopping", 'interest2', "interestGaming", 'max_visitors', 8, 'enabled_shift_3', false, 'max_workers', 1, }) PlaceObj('BuildingTemplate', { 'name', "Farm", 'template_class', "FarmConventional", 'resource_produced1', "Food", 'max_storage1', 300000, 'construction_cost_Concrete', 8000, 'build_points', 2000, 'is_tall', true, 'dome_required', true, 'upgrade1_id', "Farm_Automation", 'upgrade1_display_name', T{5056, --[[BuildingTemplate Farm upgrade1_display_name]] "Automation"}, 'upgrade1_description', T{8044, --[[BuildingTemplate Farm upgrade1_description]] "Decreases Workplaces by <abs(upgrade1_add_value_1)>."}, 'upgrade1_icon', "UI/Icons/Upgrades/automation_01.tga", 'upgrade1_upgrade_cost_Electronics', 5000, 'upgrade1_mod_label_1', "Farm", 'upgrade1_mod_prop_id_1', "max_workers", 'upgrade1_add_value_1', -2, 'display_name', T{4812, --[[BuildingTemplate Farm display_name]] "Farm"}, 'display_name_pl', T{5068, --[[BuildingTemplate Farm display_name_pl]] "Farms"}, 'description', T{5069, --[[BuildingTemplate Farm description]] "Produces Food. Consumes Water depending on crop type."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/farm.tga", 'build_pos', 9, 'entity', "Farm", 'encyclopedia_image', "UI/Encyclopedia/Farm.tga", 'label1', "InsideBuildings", 'color_modifier', RGBA(0, 248, 50, 255), 'palettes', "Outside_06", 'demolish_sinking', range(0, 0), 'demolish_tilt_angle', range(300, 300), 'electricity_consumption', 0, 'active_shift', 1, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 6, 'specialist', "botanist", }) PlaceObj('BuildingTemplate', { 'name', "StorageFood", 'template_class', "UniversalStorageDepot", 'pin_summary1', T{5070, --[[BuildingTemplate StorageFood pin_summary1]] "<food(Stored_Food)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5071, --[[BuildingTemplate StorageFood display_name]] "Food Depot"}, 'display_name_pl', T{5072, --[[BuildingTemplate StorageFood display_name_pl]] "Food Depots"}, 'description', T{5073, --[[BuildingTemplate StorageFood description]] "Stores <food(max_storage_per_resource)>. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/food_storage.tga", 'build_pos', 4, 'entity', "StorageDepotSmall_04", 'encyclopedia_image', "UI/Encyclopedia/FoodDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "Food", }, }) PlaceObj('BuildingTemplate', { 'name', "FountainLarge", 'template_class', "Service", 'construction_cost_Concrete', 4000, 'build_points', 1000, 'dome_required', true, 'use_demolished_state', false, 'display_name', T{5114, --[[BuildingTemplate FountainLarge display_name]] "Fountain"}, 'display_name_pl', T{5115, --[[BuildingTemplate FountainLarge display_name_pl]] "Fountains"}, 'description', T{5116, --[[BuildingTemplate FountainLarge description]] "A place for relaxation and recreation."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/large_fountain.tga", 'build_pos', 10, 'entity', "GardenFountains_03", 'encyclopedia_image', "UI/Encyclopedia/Fountain.tga", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 3, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "StorageFuel", 'template_class', "UniversalStorageDepot", 'pin_summary1', T{5077, --[[BuildingTemplate StorageFuel pin_summary1]] "<fuel(Stored_Fuel)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5078, --[[BuildingTemplate StorageFuel display_name]] "Fuel Depot"}, 'display_name_pl', T{5079, --[[BuildingTemplate StorageFuel display_name_pl]] "Fuel Depots"}, 'description', T{5080, --[[BuildingTemplate StorageFuel description]] "Stores <fuel(max_storage_per_resource)>. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/fuel_storage.tga", 'build_pos', 9, 'entity', "StorageDepotSmall_06", 'encyclopedia_image', "UI/Encyclopedia/FuelDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "Fuel", }, }) PlaceObj('BuildingTemplate', { 'name', "FuelFactory", 'template_class', "FuelFactory", 'resource_produced1', "Fuel", 'max_storage1', 100000, 'production_per_day1', 12000, 'construction_cost_Concrete', 5000, 'construction_cost_Metals', 5000, 'construction_cost_MachineParts', 5000, 'build_points', 3000, 'require_prefab', true, 'is_tall', true, 'dome_forbidden', true, 'upgrade1_id', "FuelFactory_Amplify", 'upgrade1_display_name', T{5028, --[[BuildingTemplate FuelFactory upgrade1_display_name]] "Amplify"}, 'upgrade1_description', T{5029, --[[BuildingTemplate FuelFactory upgrade1_description]] "+<upgrade1_mul_value_1>% Production; +<power(upgrade1_add_value_2)> Consumption."}, 'upgrade1_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade1_upgrade_cost_Polymers', 2000, 'upgrade1_mod_label_1', "FuelFactory", 'upgrade1_mod_prop_id_1', "production_per_day1", 'upgrade1_mul_value_1', 25, 'upgrade1_mod_label_2', "FuelFactory", 'upgrade1_mod_prop_id_2', "electricity_consumption", 'upgrade1_add_value_2', 10000, 'upgrade2_id', "FuelFactory_FactoryAI", 'upgrade2_display_name', T{5054, --[[BuildingTemplate FuelFactory upgrade2_display_name]] "Factory AI"}, 'upgrade2_description', T{5055, --[[BuildingTemplate FuelFactory upgrade2_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade2_icon', "UI/Icons/Upgrades/factory_ai_01.tga", 'upgrade2_upgrade_cost_Electronics', 5000, 'upgrade2_upgrade_cost_MachineParts', 2000, 'upgrade2_mod_label_1', "FuelFactory", 'upgrade2_mod_prop_id_1', "production_per_day1", 'upgrade2_mul_value_1', 20, 'maintenance_resource_type', "MachineParts", 'display_name', T{5074, --[[BuildingTemplate FuelFactory display_name]] "Fuel Refinery"}, 'display_name_pl', T{5075, --[[BuildingTemplate FuelFactory display_name_pl]] "Fuel Refineries"}, 'description', T{5076, --[[BuildingTemplate FuelFactory description]] "Produces Fuel from Water."}, 'build_category', "Production", 'display_icon', "UI/Icons/Buildings/fuel_rafinery.tga", 'build_pos', 9, 'entity', "FuelRefinery", 'encyclopedia_image', "UI/Encyclopedia/FuelRefinery.tga", 'entity2', "FuelRefineryChrome", 'entitydlc2', "dde", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "FuelFactory", 'demolish_sinking', range(1, 5), 'demolish_debris', 80, 'electricity_consumption', 5000, 'water_consumption', 1000, 'air_consumption', 0, }) PlaceObj('BuildingTemplate', { 'name', "FungalFarm", 'template_class', "FungalFarm", 'resource_produced1', "Food", 'max_storage1', 30000, 'production_per_day1', 6000, 'construction_cost_Concrete', 10000, 'construction_cost_Metals', 15000, 'construction_cost_Electronics', 5000, 'build_points', 6000, 'is_tall', true, 'dome_forbidden', true, 'upgrade1_id', "SuperfungusUpgrade", 'upgrade1_display_name', T{5081, --[[BuildingTemplate FungalFarm upgrade1_display_name]] "Superfungus"}, 'upgrade1_description', T{5082, --[[BuildingTemplate FungalFarm upgrade1_description]] "+<upgrade1_mul_value_1>% Production; +<upgrade1_mul_value_2>% Oxygen Consumption."}, 'upgrade1_icon', "UI/Icons/Upgrades/superfungus_01.tga", 'upgrade1_upgrade_cost_Polymers', 10000, 'upgrade1_mod_label_1', "FungalFarm", 'upgrade1_mod_prop_id_1', "production_per_day1", 'upgrade1_mul_value_1', 50, 'upgrade1_mod_label_2', "FungalFarm", 'upgrade1_mod_prop_id_2', "air_consumption", 'upgrade1_mul_value_2', 100, 'upgrade2_id', "FungalFarm_Automation", 'upgrade2_display_name', T{5056, --[[BuildingTemplate FungalFarm upgrade2_display_name]] "Automation"}, 'upgrade2_description', T{5057, --[[BuildingTemplate FungalFarm upgrade2_description]] "Decreases Workplaces by <abs(upgrade2_add_value_1)>."}, 'upgrade2_icon', "UI/Icons/Upgrades/automation_01.tga", 'upgrade2_upgrade_cost_Electronics', 10000, 'upgrade2_mod_label_1', "FungalFarm", 'upgrade2_mod_prop_id_1', "max_workers", 'upgrade2_add_value_1', -2, 'maintenance_resource_type', "Metals", 'display_name', T{5083, --[[BuildingTemplate FungalFarm display_name]] "Fungal Farm"}, 'display_name_pl', T{5084, --[[BuildingTemplate FungalFarm display_name_pl]] "Fungal Farms"}, 'description', T{5085, --[[BuildingTemplate FungalFarm description]] "Produces Food."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/fungal_farm.tga", 'build_pos', 10, 'entity', "FungalFarm", 'encyclopedia_image', "UI/Encyclopedia/FungalFarm.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "FungalFarm", 'demolish_sinking', range(10, 20), 'electricity_consumption', 10000, 'water_consumption', 500, 'air_consumption', 2000, 'active_shift', 1, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 6, 'specialist', "botanist", }) PlaceObj('BuildingTemplate', { 'name', "FusionReactor", 'template_class', "FusionReactor", 'pin_rollover_context', "electricity", 'construction_cost_Concrete', 40000, 'construction_cost_Polymers', 20000, 'construction_cost_Electronics', 20000, 'build_points', 15000, 'dome_forbidden', true, 'upgrade1_id', "FusionReactor_Autoregulator", 'upgrade1_display_name', T{5086, --[[BuildingTemplate FusionReactor upgrade1_display_name]] "Autoregulator"}, 'upgrade1_description', T{5087, --[[BuildingTemplate FusionReactor upgrade1_description]] "Reduces Workplaces by <abs(upgrade1_add_value_1)>."}, 'upgrade1_icon', "UI/Icons/Upgrades/autoregulator_01.tga", 'upgrade1_upgrade_cost_Polymers', 10000, 'upgrade1_mod_label_1', "FusionReactor", 'upgrade1_mod_prop_id_1', "max_workers", 'upgrade1_add_value_1', -2, 'upgrade2_id', "FusionReactor_EternalFusion", 'upgrade2_display_name', T{5088, --[[BuildingTemplate FusionReactor upgrade2_display_name]] "Eternal Fusion"}, 'upgrade2_description', T{5089, --[[BuildingTemplate FusionReactor upgrade2_description]] "This building no longer requires Workers and operates at <upgrade2_add_value_2> Performance."}, 'upgrade2_icon', "UI/Icons/Upgrades/eternal_fusion_01.tga", 'upgrade2_upgrade_cost_Polymers', 10000, 'upgrade2_mod_prop_id_1', "automation", 'upgrade2_add_value_1', 1, 'upgrade2_mod_prop_id_2', "auto_performance", 'upgrade2_add_value_2', 150, 'upgrade2_mod_prop_id_3', "max_workers", 'upgrade2_mul_value_3', -100, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 3000, 'display_name', T{5090, --[[BuildingTemplate FusionReactor display_name]] "Fusion Reactor"}, 'display_name_pl', T{5091, --[[BuildingTemplate FusionReactor display_name_pl]] "Fusion Reactors"}, 'description', T{5092, --[[BuildingTemplate FusionReactor description]] "Generates significant amounts of Power but requires Workers from a nearby Dome."}, 'build_category', "Power", 'display_icon', "UI/Icons/Buildings/fusion_reactor.tga", 'build_pos', 5, 'entity', "FusionReactor", 'encyclopedia_image', "UI/Encyclopedia/FusionReactor.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "UniversalExtractor", 'demolish_sinking', range(10, 20), 'electricity_production', 200000, 'max_workers', 8, 'specialist', "engineer", }) PlaceObj('BuildingTemplate', { 'name', "GardenNatural_Medium", 'template_class', "Service", 'construction_cost_Concrete', 4000, 'build_points', 1000, 'dome_required', true, 'use_demolished_state', false, 'display_name', T{5149, --[[BuildingTemplate GardenNatural_Medium display_name]] "Garden"}, 'display_name_pl', T{5150, --[[BuildingTemplate GardenNatural_Medium display_name_pl]] "Gardens"}, 'description', T{5151, --[[BuildingTemplate GardenNatural_Medium description]] "A recreational area with cultivated vegetation."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/medium_garden.tga", 'build_pos', 4, 'entity', "GardenNatural_04", 'encyclopedia_image', "UI/Encyclopedia/Garden.tga", 'entity2', "GardenNatural_05", 'entity3', "GardenNatural_06", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 3, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "GeoscapeDome", 'template_class', "GeoscapeDome", 'pin_summary1', T{5016, --[[BuildingTemplate GeoscapeDome pin_summary1]] "<GetColonistCount><icon_Colonist_small>"}, 'pin_on_start', true, 'construction_cost_Concrete', 400000, 'construction_cost_Metals', 200000, 'construction_cost_Polymers', 300000, 'construction_entity', "DomeGeoscapeConstruction", 'build_points', 120000, 'is_tall', true, 'construction_site_applies_height_surfaces', true, 'dome_forbidden', true, 'wonder', true, 'achievement', "FirstDome", 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 3000, 'display_name', T{5093, --[[BuildingTemplate GeoscapeDome display_name]] "Geoscape Dome"}, 'display_name_pl', T{5094, --[[BuildingTemplate GeoscapeDome display_name_pl]] "Geoscape Domes"}, 'description', T{5095, --[[BuildingTemplate GeoscapeDome description]] "A slice of Earth on Mars, this Dome increases the Comfort of all Residences within. It also increases the Sanity of its inhabitants every Sol."}, 'build_category', "Wonders", 'display_icon', "UI/Icons/Buildings/geoscape_dome.tga", 'build_pos', 3, 'entity', "DomeGeoscape", 'dome_comfort', 25000, 'encyclopedia_image', "UI/Encyclopedia/GeoscapeDome.tga", 'demolish_sinking', range(0, 0), 'demolish_debris', 0, 'electricity_consumption', 40000, 'air_consumption', 0, 'DailySanityRecoverDome', 5000, }) PlaceObj('BuildingTemplate', { 'name', "ShopsFood", 'template_class', "Grocery", 'construction_cost_Concrete', 10000, 'build_points', 3000, 'dome_required', true, 'upgrade1_id', "ShopFood_ServiceBots", 'upgrade1_display_name', T{5020, --[[BuildingTemplate ShopsFood upgrade1_display_name]] "Service Bots"}, 'upgrade1_description', T{5021, --[[BuildingTemplate ShopsFood upgrade1_description]] "This building no longer requires Workers and operates at <upgrade1_add_value_2> Performance."}, 'upgrade1_icon', "UI/Icons/Upgrades/service_bots_01.tga", 'upgrade1_upgrade_cost_Electronics', 10000, 'upgrade1_mod_prop_id_1', "automation", 'upgrade1_add_value_1', 1, 'upgrade1_mod_prop_id_2', "auto_performance", 'upgrade1_add_value_2', 100, 'upgrade1_mod_prop_id_3', "max_workers", 'upgrade1_mul_value_3', -100, 'maintenance_resource_type', "Concrete", 'consumption_resource_type', "Food", 'consumption_amount', 200, 'consumption_type', 2, 'consumption_resource_stockpile_spot_name', "Resourcepile", 'display_name', T{5096, --[[BuildingTemplate ShopsFood display_name]] "Grocer"}, 'display_name_pl', T{5097, --[[BuildingTemplate ShopsFood display_name_pl]] "Grocers"}, 'description', T{5098, --[[BuildingTemplate ShopsFood description]] "Distributes hot meals and fresh produce."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/grocery.tga", 'build_pos', 7, 'entity', "ShopsFood", 'encyclopedia_image', "UI/Encyclopedia/Grocer.tga", 'label1', "InsideBuildings", 'palettes', "Grocery", 'demolish_sinking', range(5, 10), 'demolish_debris', 85, 'service_comfort', 50000, 'interest1', "needFood", 'interest2', "interestShopping", 'max_visitors', 8, 'usable_by_children', true, 'enabled_shift_3', false, 'max_workers', 1, }) PlaceObj('BuildingTemplate', { 'name', "HangingGardens", 'template_class', "HangingGardens", 'construction_cost_Concrete', 40000, 'construction_cost_Polymers', 10000, 'build_points', 30000, 'require_prefab', true, 'is_tall', true, 'dome_required', true, 'dome_spot', "Spire", 'achievement', "FirstDomeSpire", 'maintenance_resource_type', "Concrete", 'maintenance_resource_amount', 4000, 'display_name', T{3535, --[[BuildingTemplate HangingGardens display_name]] "Hanging Gardens"}, 'display_name_pl', T{3535, --[[BuildingTemplate HangingGardens display_name_pl]] "Hanging Gardens"}, 'description', T{5099, --[[BuildingTemplate HangingGardens description]] "A beautiful park complex. Increases the Comfort of all Residences in the Dome."}, 'build_category', "Dome Spires", 'display_icon', "UI/Icons/Buildings/hanging_gardens.tga", 'build_pos', 2, 'entity', "HangingGardens", 'dome_comfort', 30000, 'encyclopedia_image', "UI/Encyclopedia/HangingGardens.tga", 'label1', "InsideBuildings", 'palettes', "Outside_10", 'demolish_sinking', range(0, 0), 'demolish_tilt_angle', range(0, 0), 'water_consumption', 2000, 'air_consumption', 0, 'service_comfort', 100000, 'comfort_increase', 15000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 20, }) PlaceObj('BuildingTemplate', { 'name', "HydroponicFarm", 'template_class', "FarmHydroponic", 'resource_produced1', "Food", 'max_storage1', 100000, 'construction_cost_Metals', 4000, 'construction_cost_Polymers', 2000, 'build_points', 2000, 'is_tall', true, 'dome_required', true, 'upgrade1_id', "HydroponicFarm_Automation", 'upgrade1_display_name', T{5056, --[[BuildingTemplate HydroponicFarm upgrade1_display_name]] "Automation"}, 'upgrade1_description', T{5100, --[[BuildingTemplate HydroponicFarm upgrade1_description]] "Decreases Workplaces by <abs(upgrade1_add_value_1)>."}, 'upgrade1_icon', "UI/Icons/Upgrades/automation_01.tga", 'upgrade1_upgrade_cost_Electronics', 2000, 'upgrade1_mod_label_1', "HydroponicFarm", 'upgrade1_mod_prop_id_1', "max_workers", 'upgrade1_add_value_1', -1, 'maintenance_resource_type', "Metals", 'display_name', T{5101, --[[BuildingTemplate HydroponicFarm display_name]] "Hydroponic Farm"}, 'display_name_pl', T{5102, --[[BuildingTemplate HydroponicFarm display_name_pl]] "Hydroponic Farms"}, 'description', T{5069, --[[BuildingTemplate HydroponicFarm description]] "Produces Food. Consumes Water depending on crop type."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/hydroponics_farm.tga", 'build_pos', 8, 'entity', "HydroponicFarm", 'encyclopedia_image', "UI/Encyclopedia/HydroponicFarm.tga", 'label1', "InsideBuildings", 'palettes', "Outside_06", 'demolish_sinking', range(10, 25), 'electricity_consumption', 5000, 'active_shift', 1, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 3, 'specialist', "botanist", 'hydroponic', true, }) PlaceObj('BuildingTemplate', { 'name', "Infirmary", 'template_class', "Infirmary", 'construction_cost_Concrete', 15000, 'build_points', 3000, 'dome_required', true, 'upgrade1_id', "Infirmary_RejuvenationTreatment", 'upgrade1_display_name', T{5103, --[[BuildingTemplate Infirmary upgrade1_display_name]] "Rejuvenation Treatment"}, 'upgrade1_description', T{8045, --[[BuildingTemplate Infirmary upgrade1_description]] "Improves Service Comfort. Colonists can visit for Relaxation."}, 'upgrade1_icon', "UI/Icons/Upgrades/rejuvenation_treatment_01.tga", 'upgrade1_upgrade_cost_Polymers', 5000, 'upgrade1_mod_prop_id_1', "service_comfort", 'upgrade1_add_value_1', 30, 'maintenance_resource_type', "Concrete", 'display_name', T{5105, --[[BuildingTemplate Infirmary display_name]] "Infirmary"}, 'display_name_pl', T{5106, --[[BuildingTemplate Infirmary display_name_pl]] "Infirmaries"}, 'description', T{5107, --[[BuildingTemplate Infirmary description]] "Visitors will recover Health and Sanity as long as they are not starving, dehydrated, freezing or suffocating. A Dome with a Medical Building has lower minimum Comfort requirement for births."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/infirmary.tga", 'build_pos', 3, 'entity', "Infirmary", 'encyclopedia_image', "UI/Encyclopedia/Infirmary.tga", 'label1', "InsideBuildings", 'label2', "MedicalBuilding", 'palettes', "Infirmary", 'demolish_sinking', range(8, 18), 'demolish_tilt_angle', range(600, 900), 'demolish_debris', 80, 'electricity_consumption', 2000, 'health_change', 20000, 'sanity_change', 10000, 'interest1', "needMedical", 'usable_by_children', true, 'enabled_shift_3', false, 'max_workers', 2, 'specialist', "medic", }) PlaceObj('BuildingTemplate', { 'name', "Lake", 'template_class', "Service", 'construction_cost_Concrete', 3000, 'build_points', 1000, 'dome_required', true, 'upgrade1_upgrade_cost_Concrete', 4000, 'use_demolished_state', false, 'display_name', T{5111, --[[BuildingTemplate Lake display_name]] "Lake"}, 'display_name_pl', T{5112, --[[BuildingTemplate Lake display_name_pl]] "Lakes"}, 'description', T{5113, --[[BuildingTemplate Lake description]] "A large lake with refreshingly cool water."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/lake.tga", 'build_pos', 8, 'entity', "GardenLake", 'encyclopedia_image', "UI/Encyclopedia/Lake.tga", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 3, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "BlackCubeLargeMonument", 'template_class', "", 'construction_cost_BlackCube', 126000, 'build_points', 1000, 'use_demolished_state', false, 'display_name', T{5117, --[[BuildingTemplate BlackCubeLargeMonument display_name]] "Large Monument"}, 'display_name_pl', T{5118, --[[BuildingTemplate BlackCubeLargeMonument display_name_pl]] "Large Monuments"}, 'description', T{5119, --[[BuildingTemplate BlackCubeLargeMonument description]] "A decorative monument created from the mysterious Black Cubes. Definitely not a place of worship."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/black_cube_monument_large.tga", 'build_pos', 14, 'entity', "BlackCubeMonumentLarge", 'encyclopedia_exclude', true, 'on_off_button', false, 'prio_button', false, }) PlaceObj('BuildingTemplate', { 'name', "SolarPanelBig", 'template_class', "SolarPanel", 'pin_rollover_context', "electricity", 'construction_cost_Metals', 4000, 'build_points', 1500, 'show_range_class', "ArtificialSun", 'maintenance_resource_type', "Metals", 'display_name', T{5120, --[[BuildingTemplate SolarPanelBig display_name]] "Large Solar Panel"}, 'display_name_pl', T{5120, --[[BuildingTemplate SolarPanelBig display_name_pl]] "Large Solar Panel"}, 'description', T{5121, --[[BuildingTemplate SolarPanelBig description]] "Generates Power during daytime. Its effectiveness is decreased by dust accumulation and during Dust Storms. Protected from dust while turned off."}, 'build_category', "Power", 'display_icon', "UI/Icons/Buildings/solar_aray.tga", 'build_pos', 2, 'entity', "SolarPanelBig", 'encyclopedia_image', "UI/Encyclopedia/LargeSolarPanel.tga", 'build_shortcut1', "J", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "SolarPanelBig", 'demolish_sinking', range(5, 15), 'demolish_debris', 80, 'electricity_production', 5000, }) PlaceObj('BuildingTemplate', { 'name', "LivingQuarters", 'template_class', "LivingQuarters", 'construction_cost_Concrete', 10000, 'build_points', 6000, 'dome_required', true, 'show_decals_on_placement', true, 'upgrade1_id', "LivingQuarters_HomeCollective", 'upgrade1_display_name', T{5005, --[[BuildingTemplate LivingQuarters upgrade1_display_name]] "Home Collective"}, 'upgrade1_description', T{5006, --[[BuildingTemplate LivingQuarters upgrade1_description]] "+<upgrade1_add_value_1> Service Comfort."}, 'upgrade1_icon', "UI/Icons/Upgrades/home_collective_01.tga", 'upgrade1_upgrade_cost_Polymers', 5000, 'upgrade1_mod_label_1', "LivingQuarters", 'upgrade1_mod_prop_id_1', "service_comfort", 'upgrade1_add_value_1', 10, 'maintenance_resource_type', "Concrete", 'display_name', T{3532, --[[BuildingTemplate LivingQuarters display_name]] "Living Quarters"}, 'display_name_pl', T{3532, --[[BuildingTemplate LivingQuarters display_name_pl]] "Living Quarters"}, 'description', T{5122, --[[BuildingTemplate LivingQuarters description]] "Provides living space. Resting residents recover Comfort faster compared to other Residences."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/living_quarters.tga", 'entity', "LivingQuarters_01", 'encyclopedia_image', "UI/Encyclopedia/LivingQuarters.tga", 'entity2', "LivingQuarters_02", 'entity3', "LivingQuarters_03", 'entity4', "LivingQuartersDDE_01", 'entitydlc4', "dde", 'entity5', "LivingQuartersDDE_02", 'entitydlc5', "dde", 'entity6', "LivingQuartersDDE_03", 'entitydlc6', "dde", 'label1', "InsideBuildings", 'palettes', "Living", 'demolish_sinking', range(5, 10), 'demolish_debris', 85, 'service_comfort', 50000, 'comfort_increase', 6000, 'capacity', 14, }) PlaceObj('BuildingTemplate', { 'name', "MDSLaser", 'template_class', "MDSLaser", 'construction_cost_Metals', 15000, 'construction_cost_Electronics', 5000, 'build_points', 1000, 'dome_forbidden', true, 'maintenance_resource_type', "Electronics", 'display_name', T{4813, --[[BuildingTemplate MDSLaser display_name]] "MDS Laser"}, 'display_name_pl', T{5123, --[[BuildingTemplate MDSLaser display_name_pl]] "MDS Lasers"}, 'description', T{5124, --[[BuildingTemplate MDSLaser description]] "Destroys any falling meteors in its range. Has a short cooldown between shots."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/mds_aser.tga", 'build_pos', 10, 'entity', "DefenceLaser", 'show_range_all', true, 'encyclopedia_image', "UI/Encyclopedia/MDSLaser.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "Outside_01", 'demolish_sinking', range(10, 20), 'demolish_debris', 80, 'electricity_consumption', 10000, 'cooldown', 15000, }) PlaceObj('BuildingTemplate', { 'name', "MOXIE", 'template_class', "MOXIE", 'pin_rollover_context', "air", 'construction_cost_Metals', 5000, 'build_points', 1500, 'is_tall', true, 'dome_forbidden', true, 'upgrade1_id', "MOXIE_MagneticFiltering", 'upgrade1_display_name', T{5125, --[[BuildingTemplate MOXIE upgrade1_display_name]] "Magnetic Filtering"}, 'upgrade1_description', T{5126, --[[BuildingTemplate MOXIE upgrade1_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade1_icon', "UI/Icons/Upgrades/magnetic_filtering_01.tga", 'upgrade1_upgrade_cost_Polymers', 5000, 'upgrade1_mod_label_1', "MOXIE", 'upgrade1_mod_prop_id_1', "air_production", 'upgrade1_mul_value_1', 50, 'maintenance_resource_type', "Metals", 'maintenance_resource_amount', 2000, 'display_name', T{5127, --[[BuildingTemplate MOXIE display_name]] "MOXIE"}, 'display_name_pl', T{5128, --[[BuildingTemplate MOXIE display_name_pl]] "MOXIEs"}, 'description', T{5129, --[[BuildingTemplate MOXIE description]] "Produces Oxygen. No production during Dust Storms."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/moxie.tga", 'entity', "Moxie", 'suspend_on_dust_storm', true, 'encyclopedia_text', T{5130, --[[BuildingTemplate MOXIE encyclopedia_text]] "MOXIE instruments, which employ MOXIE (short for Mars Oxygen In situ resource utilization Experiment) technology, produce Oxygen from the rich amounts of carbon dioxide in the Martian atmosphere.\n\n<center><image UI/Common/rollover_line.tga 2000> <left>\n\nDeveloped in the 20th century but first tested on a rover mission to Mars in the early 20s of the 21st century, that once experimental technology now forms the backbone of life support in our first Colony on an alien world.\n\nThese instruments require nothing but power and regular maintenance and, of course, a connection to the lifeline of our Colony."}, 'encyclopedia_image', "UI/Encyclopedia/MOXIE.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "Moxie", 'demolish_sinking', range(1, 5), 'demolish_debris', 85, 'electricity_consumption', 2000, 'air_production', 2000, }) PlaceObj('BuildingTemplate', { 'name', "StorageMachineParts", 'template_class', "UniversalStorageDepot", 'pin_summary1', T{5133, --[[BuildingTemplate StorageMachineParts pin_summary1]] "<machineparts(Stored_MachineParts)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5134, --[[BuildingTemplate StorageMachineParts display_name]] "Machine Parts Depot"}, 'display_name_pl', T{5135, --[[BuildingTemplate StorageMachineParts display_name_pl]] "Machine Parts Depots"}, 'description', T{5136, --[[BuildingTemplate StorageMachineParts description]] "Stores <machineparts(max_storage_per_resource)>. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/machine_parts_storage.tga", 'build_pos', 8, 'entity', "StorageDepotSmall_05", 'encyclopedia_image', "UI/Encyclopedia/MachinePartsDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "MachineParts", }, }) PlaceObj('BuildingTemplate', { 'name', "MachinePartsFactory", 'template_class', "MachinePartsFactory", 'resource_produced1', "MachineParts", 'production_per_day1', 12000, 'construction_cost_Concrete', 10000, 'construction_cost_Metals', 10000, 'construction_cost_Electronics', 2000, 'build_points', 7000, 'require_prefab', true, 'dome_required', true, 'upgrade1_id', "MachinePartsFactory_FactoryAI", 'upgrade1_display_name', T{5054, --[[BuildingTemplate MachinePartsFactory upgrade1_display_name]] "Factory AI"}, 'upgrade1_description', T{7668, --[[BuildingTemplate MachinePartsFactory upgrade1_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade1_icon', "UI/Icons/Upgrades/factory_ai_01.tga", 'upgrade1_upgrade_cost_Electronics', 5000, 'upgrade1_upgrade_cost_MachineParts', 2000, 'upgrade1_mod_label_1', "MachinePartsFactory", 'upgrade1_mod_prop_id_1', "production_per_day1", 'upgrade1_mul_value_1', 20, 'upgrade2_id', "MachinePartsFactory_Automation", 'upgrade2_display_name', T{5056, --[[BuildingTemplate MachinePartsFactory upgrade2_display_name]] "Automation"}, 'upgrade2_description', T{5057, --[[BuildingTemplate MachinePartsFactory upgrade2_description]] "Decreases Workplaces by <abs(upgrade2_add_value_1)>."}, 'upgrade2_icon', "UI/Icons/Upgrades/automation_01.tga", 'upgrade2_upgrade_cost_Polymers', 5000, 'upgrade2_upgrade_cost_Electronics', 5000, 'upgrade2_mod_label_1', "MachinePartsFactory", 'upgrade2_mod_prop_id_1', "max_workers", 'upgrade2_add_value_1', -2, 'upgrade3_id', "MachinePartsFactory_Amplify", 'upgrade3_display_name', T{5028, --[[BuildingTemplate MachinePartsFactory upgrade3_display_name]] "Amplify"}, 'upgrade3_description', T{5058, --[[BuildingTemplate MachinePartsFactory upgrade3_description]] "+<upgrade3_mul_value_1>% Production; +<power(upgrade3_add_value_2)> Consumption."}, 'upgrade3_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade3_upgrade_cost_Polymers', 5000, 'upgrade3_mod_label_1', "MachinePartsFactory", 'upgrade3_mod_prop_id_1', "production_per_day1", 'upgrade3_mul_value_1', 25, 'upgrade3_mod_label_2', "MachinePartsFactory", 'upgrade3_mod_prop_id_2', "electricity_consumption", 'upgrade3_add_value_2', 20000, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 2000, 'consumption_resource_type', "Metals", 'display_name', T{3522, --[[BuildingTemplate MachinePartsFactory display_name]] "Machine Parts Factory"}, 'display_name_pl', T{5131, --[[BuildingTemplate MachinePartsFactory display_name_pl]] "Machine Parts Factories"}, 'description', T{5132, --[[BuildingTemplate MachinePartsFactory description]] "Produces Machine Parts from Metals."}, 'build_category', "Production", 'display_icon', "UI/Icons/Buildings/machine_parts_factory.tga", 'build_pos', 8, 'entity', "MachinePartsFactory", 'encyclopedia_image', "UI/Encyclopedia/MachinePartsFactory.tga", 'label1', "InsideBuildings", 'palettes', "MachineParts", 'demolish_sinking', range(15, 25), 'demolish_debris', 85, 'electricity_consumption', 30000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'specialist', "engineer", }) PlaceObj('BuildingTemplate', { 'name', "MartianUniversity", 'template_class', "MartianUniversity", 'construction_cost_Concrete', 30000, 'construction_cost_Metals', 10000, 'construction_cost_Electronics', 20000, 'build_points', 12000, 'dome_required', true, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 3000, 'display_name', T{5137, --[[BuildingTemplate MartianUniversity display_name]] "Martian University"}, 'display_name_pl', T{5138, --[[BuildingTemplate MartianUniversity display_name_pl]] "Martian Universities"}, 'description', T{5139, --[[BuildingTemplate MartianUniversity description]] "Trains Specialists using modern remote learning techniques."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/martian_university.tga", 'build_pos', 10, 'entity', "University", 'encyclopedia_image', "UI/Encyclopedia/MartianUniversity.tga", 'label1', "InsideBuildings", 'palettes', "University", 'demolish_sinking', range(10, 20), 'demolish_debris', 85, 'electricity_consumption', 15000, 'enabled_shift_1', false, 'enabled_shift_3', false, 'evaluation_points', 300, }) PlaceObj('BuildingTemplate', { 'name', "MedicalCenter", 'template_class', "MedicalCenter", 'construction_cost_Concrete', 30000, 'construction_cost_Metals', 30000, 'construction_cost_Polymers', 10000, 'build_points', 30000, 'require_prefab', true, 'is_tall', true, 'dome_required', true, 'dome_spot', "Spire", 'achievement', "FirstDomeSpire", 'upgrade1_id', "MedicalCenter_HolographicScanner", 'upgrade1_display_name', T{5140, --[[BuildingTemplate MedicalCenter upgrade1_display_name]] "Holographic Scanner"}, 'upgrade1_description', T{5141, --[[BuildingTemplate MedicalCenter upgrade1_description]] "Increases Birth Rate in the Dome."}, 'upgrade1_icon', "UI/Icons/Upgrades/holographic_scanner_01.tga", 'upgrade1_upgrade_cost_Polymers', 10000, 'upgrade1_upgrade_cost_Electronics', 5000, 'upgrade1_mod_target_1', "parent_dome", 'upgrade1_mod_label_1', "Colonist", 'upgrade1_mod_prop_id_1', "birth_comfort_modifier", 'upgrade1_add_value_1', 30, 'upgrade2_id', "MedicalCenter_RejuvenationTreatment", 'upgrade2_display_name', T{5103, --[[BuildingTemplate MedicalCenter upgrade2_display_name]] "Rejuvenation Treatment"}, 'upgrade2_description', T{5104, --[[BuildingTemplate MedicalCenter upgrade2_description]] "Improves Service Comfort. Colonists can visit for Relaxation"}, 'upgrade2_icon', "UI/Icons/Upgrades/rejuvenation_treatment_01.tga", 'upgrade2_upgrade_cost_Polymers', 10000, 'upgrade2_mod_label_1', "MedicalCenter", 'upgrade2_mod_prop_id_1', "salvage_modifier", 'upgrade2_mod_label_2', "MedicalCenter", 'upgrade2_mod_prop_id_2', "service_comfort", 'upgrade2_add_value_2', 15, 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 3000, 'display_name', T{3539, --[[BuildingTemplate MedicalCenter display_name]] "Medical Center"}, 'display_name_pl', T{5142, --[[BuildingTemplate MedicalCenter display_name_pl]] "Medical Centers"}, 'description', T{5143, --[[BuildingTemplate MedicalCenter description]] "Visitors will recover Health and Sanity as long as they are not starving, dehydrated, freezing or suffocating. Larger capacity and more effective than the Infirmary. A Dome with a Medical Building has lower minimum Comfort requirement for births."}, 'build_category', "Dome Spires", 'display_icon', "UI/Icons/Buildings/medical_center.tga", 'build_pos', 7, 'entity', "MedicalCenter", 'encyclopedia_image', "UI/Encyclopedia/MedicalCenter.tga", 'label1', "InsideBuildings", 'label2', "MedicalBuilding", 'palettes', "Outside_02", 'demolish_sinking', range(10, 12), 'demolish_debris', 80, 'electricity_consumption', 20000, 'health_change', 50000, 'sanity_change', 15000, 'service_comfort', 70000, 'comfort_increase', 15000, 'interest1', "needMedical", 'max_visitors', 10, 'usable_by_children', true, 'enabled_shift_3', false, 'max_workers', 3, 'specialist', "medic", }) PlaceObj('BuildingTemplate', { 'name', "DomeMedium", 'template_class', "DomeMedium", 'pin_summary1', T{5016, --[[BuildingTemplate DomeMedium pin_summary1]] "<GetColonistCount><icon_Colonist_small>"}, 'pin_on_start', true, 'construction_cost_Concrete', 150000, 'construction_cost_Metals', 80000, 'construction_cost_Polymers', 25000, 'construction_entity', "DomeMediumConstruction", 'build_points', 60000, 'is_tall', true, 'construction_site_applies_height_surfaces', true, 'dome_forbidden', true, 'achievement', "FirstDome", 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 2000, 'display_name', T{5146, --[[BuildingTemplate DomeMedium display_name]] "Medium Dome"}, 'display_name_pl', T{5147, --[[BuildingTemplate DomeMedium display_name_pl]] "Medium Domes"}, 'description', T{5148, --[[BuildingTemplate DomeMedium description]] "A medium-sized Dome design."}, 'build_category', "Domes", 'display_icon', "UI/Icons/Buildings/oval_dome.tga", 'build_pos', 2, 'entity', "DomeMedium", 'encyclopedia_image', "UI/Encyclopedia/MediumDome.tga", 'demolish_sinking', range(0, 0), 'demolish_debris', 0, 'electricity_consumption', 30000, 'water_consumption', 2000, 'air_consumption', 2000, }) PlaceObj('BuildingTemplate', { 'name', "DomeMega", 'template_class', "DomeMega", 'pin_summary1', T{5016, --[[BuildingTemplate DomeMega pin_summary1]] "<GetColonistCount><icon_Colonist_small>"}, 'pin_on_start', true, 'construction_cost_Concrete', 300000, 'construction_cost_Metals', 200000, 'construction_cost_Polymers', 100000, 'construction_entity', "DomeMegaConstruction", 'build_points', 120000, 'is_tall', true, 'construction_site_applies_height_surfaces', true, 'dome_forbidden', true, 'achievement', "FirstDome", 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 5000, 'display_name', T{5152, --[[BuildingTemplate DomeMega display_name]] "Mega Dome"}, 'display_name_pl', T{5153, --[[BuildingTemplate DomeMega display_name_pl]] "Mega Domes"}, 'description', T{5154, --[[BuildingTemplate DomeMega description]] "The most advanced and spacious Dome design."}, 'build_category', "Domes", 'display_icon', "UI/Icons/Buildings/mega_dome.tga", 'build_pos', 3, 'entity', "DomeMega", 'encyclopedia_image', "UI/Encyclopedia/MegaDome.tga", 'demolish_sinking', range(0, 0), 'demolish_debris', 0, 'electricity_consumption', 50000, 'water_consumption', 4000, 'air_consumption', 4000, }) PlaceObj('BuildingTemplate', { 'name', "BlackCubeMonolith", 'template_class', "NotRenamableBuilding", 'construction_cost_BlackCube', 284000, 'build_points', 5000, 'dome_forbidden', true, 'can_cancel', false, 'can_user_change_prio', false, 'hide_from_build_menu', true, 'can_demolish', false, 'display_name', T{5155, --[[BuildingTemplate BlackCubeMonolith display_name]] "Mega Monument"}, 'display_name_pl', T{5156, --[[BuildingTemplate BlackCubeMonolith display_name_pl]] "Mega Monuments"}, 'description', T{5157, --[[BuildingTemplate BlackCubeMonolith description]] "A gigantic structure made of Black Cubes."}, 'build_category', "Domes", 'display_icon', "UI/Icons/Buildings/black_cube_monolith.tga", 'build_pos', 0, 'entity', "BlackCubeMonolith", 'encyclopedia_exclude', true, 'on_off_button', false, 'prio_button', false, 'indestructible', true, }) PlaceObj('BuildingTemplate', { 'name', "StorageMetals", 'template_class', "UniversalStorageDepot", 'pin_summary1', T{5161, --[[BuildingTemplate StorageMetals pin_summary1]] "<metals(Stored_Metals)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5162, --[[BuildingTemplate StorageMetals display_name]] "Metals Depot"}, 'display_name_pl', T{5163, --[[BuildingTemplate StorageMetals display_name_pl]] "Metals Depots"}, 'description', T{5164, --[[BuildingTemplate StorageMetals description]] "Stores <metals(max_storage_per_resource)>. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/metal_storage.tga", 'build_pos', 2, 'entity', "StorageDepotSmall_02", 'encyclopedia_image', "UI/Encyclopedia/MetalsDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "Metals", }, }) PlaceObj('BuildingTemplate', { 'name', "MetalsExtractor", 'template_class', "MetalsExtractor", 'resource_produced1', "Metals", 'production_per_day1', 20000, 'resource_produced2', "WasteRock", 'stockpile_class2', "WasteRockStockpile", 'construction_cost_Concrete', 20000, 'construction_cost_MachineParts', 5000, 'build_points', 5000, 'dome_forbidden', true, 'upgrade1_id', "MetalsExtractor_FueledExtractor", 'upgrade1_display_name', T{5026, --[[BuildingTemplate MetalsExtractor upgrade1_display_name]] "Fueled Extractor"}, 'upgrade1_description', T{7669, --[[BuildingTemplate MetalsExtractor upgrade1_description]] "+<upgrade1_mul_value_1>% Production as long as the building is supplied with Fuel. If not supplied with Fuel, the building will continue to operate but will lose the bonus."}, 'upgrade1_icon', "UI/Icons/Upgrades/fueled_extractor_01.tga", 'upgrade1_upgrade_cost_MachineParts', 5000, 'upgrade1_mod_label_1', "MetalsExtractor", 'upgrade1_mod_prop_id_1', "production_per_day1", 'upgrade1_mul_value_1', 30, 'upgrade1_consumption_resource_type', "Fuel", 'upgrade1_consumption_amount', 800, 'upgrade1_consumption_resource_stockpile_spot_name', "", 'upgrade2_id', "MetalsExtractor_Amplify", 'upgrade2_display_name', T{5028, --[[BuildingTemplate MetalsExtractor upgrade2_display_name]] "Amplify"}, 'upgrade2_description', T{8043, --[[BuildingTemplate MetalsExtractor upgrade2_description]] "+<upgrade2_mul_value_1>% Production; +<power(upgrade2_add_value_2)> Consumption."}, 'upgrade2_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade2_upgrade_cost_Polymers', 2000, 'upgrade2_mod_label_1', "MetalsExtractor", 'upgrade2_mod_prop_id_1', "production_per_day1", 'upgrade2_mul_value_1', 25, 'upgrade2_mod_label_2', "MetalsExtractor", 'upgrade2_mod_prop_id_2', "electricity_consumption", 'upgrade2_add_value_2', 10000, 'upgrade3_id', "MetalsExtractor_MagneticExtraction", 'upgrade3_display_name', T{5030, --[[BuildingTemplate MetalsExtractor upgrade3_display_name]] "Magnetic Extraction"}, 'upgrade3_description', T{5158, --[[BuildingTemplate MetalsExtractor upgrade3_description]] "+<upgrade3_mul_value_1>% Production."}, 'upgrade3_icon', "UI/Icons/Upgrades/magnetic_extraction_01.tga", 'upgrade3_upgrade_cost_Electronics', 5000, 'upgrade3_upgrade_cost_MachineParts', 5000, 'upgrade3_mod_label_1', "MetalsExtractor", 'upgrade3_mod_prop_id_1', "production_per_day1", 'upgrade3_mul_value_1', 50, 'maintenance_resource_type', "MachineParts", 'maintenance_resource_amount', 2000, 'maintenance_threshold_base', 150000, 'display_name', T{3527, --[[BuildingTemplate MetalsExtractor display_name]] "Metals Extractor"}, 'display_name_pl', T{5159, --[[BuildingTemplate MetalsExtractor display_name_pl]] "Metals Extractors"}, 'description', T{5160, --[[BuildingTemplate MetalsExtractor description]] "Extracts Metals from underground deposits. All extractors contaminate nearby buildings with dust."}, 'build_category', "Production", 'display_icon', "UI/Icons/Buildings/metals_extractor.tga", 'build_pos', 3, 'entity', "MetalsExtractor", 'encyclopedia_image', "UI/Encyclopedia/MetalsExtractor.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "MoholeMine", 'demolish_sinking', range(0, 0), 'demolish_debris', 85, 'exploitation_resource', "Metals", 'electricity_consumption', 5000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 4, 'specialist', "geologist", }) PlaceObj('BuildingTemplate', { 'name', "MirrorSphere", 'template_class', "MirrorSphereBuilding", 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'can_cancel', false, 'can_user_change_prio', false, 'can_demolish', false, 'display_name', T{1182, --[[BuildingTemplate MirrorSphere display_name]] "Mirror Sphere"}, 'display_name_pl', T{5165, --[[BuildingTemplate MirrorSphere display_name_pl]] "Mirror Spheres"}, 'description', T{5166, --[[BuildingTemplate MirrorSphere description]] "A reflective sphere of unknown composition."}, 'build_category', "Hidden", 'display_icon', "UI/Icons/Buildings/mirror_sphere.tga", 'build_pos', 7, 'entity', "MirrorSphereExcavation", 'ip_template', "ipMirrorSphereBuilding", 'encyclopedia_exclude', true, 'on_off_button', false, 'prio_button', false, 'indestructible', true, }) PlaceObj('BuildingTemplate', { 'name', "MoholeMine", 'template_class', "MoholeMine", 'resource_produced1', "Metals", 'max_storage1', 50000, 'production_per_day1', 50000, 'resource_produced2', "PreciousMetals", 'max_storage2', 50000, 'production_per_day2', 20000, 'resource_produced3', "WasteRock", 'max_storage3', 50000, 'stockpile_class3', "WasteRockStockpile", 'construction_cost_Concrete', 400000, 'construction_cost_Metals', 100000, 'construction_cost_MachineParts', 300000, 'build_points', 120000, 'dome_forbidden', true, 'wonder', true, 'achievement', "BuiltMoholeMine", 'maintenance_resource_type', "MachineParts", 'maintenance_resource_amount', 3000, 'display_name', T{5167, --[[BuildingTemplate MoholeMine display_name]] "Mohole Mine"}, 'display_name_pl', T{5168, --[[BuildingTemplate MoholeMine display_name_pl]] "Mohole Mines"}, 'description', T{1075, --[[BuildingTemplate MoholeMine description]] "Mining deep into the crust of Mars, the Mohole Mine produces Metals, Rare Metals and Waste Rock, while heating the surrounding area."}, 'build_category', "Wonders", 'display_icon', "UI/Icons/Buildings/mohole_mine.tga", 'entity', "MoholeMine", 'encyclopedia_image', "UI/Encyclopedia/MoholeMine.tga", 'label1', "OutsideBuildings", 'palettes', "MoholeMine", 'demolish_sinking', range(0, 0), 'demolish_tilt_angle', range(0, 0), 'penalty_heat', 182, 'penalty_pct', 51, 'electricity_consumption', 40000, }) PlaceObj('BuildingTemplate', { 'name', "MoistureVaporator", 'template_class', "MoistureVaporator", 'pin_rollover_context', "water", 'construction_cost_Metals', 2000, 'construction_cost_Polymers', 5000, 'build_points', 3000, 'require_prefab', true, 'is_tall', true, 'dome_forbidden', true, 'upgrade1_id', "MoistureVaporator_HygroscopicCoating", 'upgrade1_display_name', T{5170, --[[BuildingTemplate MoistureVaporator upgrade1_display_name]] "Hygroscopic Coating"}, 'upgrade1_description', T{5126, --[[BuildingTemplate MoistureVaporator upgrade1_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade1_icon', "UI/Icons/Upgrades/hygroscopic_coating_01.tga", 'upgrade1_upgrade_cost_Polymers', 2000, 'upgrade1_mod_label_1', "MoistureVaporator", 'upgrade1_mod_prop_id_1', "water_production", 'upgrade1_mul_value_1', 50, 'upgrade2_id', "VectorPump", 'upgrade2_display_name', T{5171, --[[BuildingTemplate MoistureVaporator upgrade2_display_name]] "Vector Pump"}, 'upgrade2_description', T{5172, --[[BuildingTemplate MoistureVaporator upgrade2_description]] "+<upgrade2_mul_value_1>% Production."}, 'upgrade2_icon', "UI/Icons/Upgrades/vector_pump_01.tga", 'upgrade2_upgrade_cost_Polymers', 5000, 'upgrade2_mod_label_1', "MoistureVaporator", 'upgrade2_mod_prop_id_1', "water_production", 'upgrade2_mul_value_1', 100, 'maintenance_resource_type', "Metals", 'maintenance_resource_amount', 2000, 'display_name', T{3519, --[[BuildingTemplate MoistureVaporator display_name]] "Moisture Vaporator"}, 'display_name_pl', T{5173, --[[BuildingTemplate MoistureVaporator display_name_pl]] "Moisture Vaporators"}, 'description', T{5174, --[[BuildingTemplate MoistureVaporator description]] "Produces Water from the atmosphere. Production lowered when placed near other Vaporators. No production during Dust Storms."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/moisture_vaporator.tga", 'build_pos', 4, 'entity', "MoistureVaporator", 'show_range_all', true, 'suspend_on_dust_storm', true, 'encyclopedia_text', T{5175, --[[BuildingTemplate MoistureVaporator encyclopedia_text]] "Moisture Vaporators provide a limitless, albeit slower and energy consuming, supply of water once water deposits are no longer a viable option. \n\n<center><image UI/Common/rollover_line.tga 2000> <left>\n\nMoisture Vaporators are based on WAVAR tech (Water-Vapor Adsorption Reactor), a process that extracts water directly from the Martian atmosphere by alternately blowing air over a zeolite adsorption bed and heating the bed to extract the absorbed water. While the water output is less than that of the Water Extractor, there is no end to the amount of water it can generate, and its mechanical simplicity means Water Vaporators can be deployed anywhere on the Martian surface."}, 'encyclopedia_image', "UI/Encyclopedia/MoistureVaporator.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "MoistureVaporator", 'demolish_sinking', range(5, 15), 'demolish_debris', 85, 'water_production', 1000, 'electricity_consumption', 5000, }) PlaceObj('BuildingTemplate', { 'name', "StorageMysteryResource", 'template_class', "MysteryDepot", 'pin_summary1', T{8111, --[[BuildingTemplate StorageMysteryResource pin_summary1]] "<mysteryresource(Stored_MysteryResource, MysteryResource)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{8112, --[[BuildingTemplate StorageMysteryResource display_name]] "Mystery Depot"}, 'display_name_pl', T{8112, --[[BuildingTemplate StorageMysteryResource display_name_pl]] "Mystery Depot"}, 'description', T{8113, --[[BuildingTemplate StorageMysteryResource description]] "It's very mysterious."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/mystery_resource_storage.tga", 'build_pos', 12, 'entity', "StorageDepotSmall_10", 'encyclopedia_exclude', true, 'encyclopedia_image', "UI/Encyclopedia/MetalsDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "MysteryResource", }, }) PlaceObj('BuildingTemplate', { 'name', "NetworkNode", 'template_class', "NetworkNode", 'construction_cost_Concrete', 50000, 'construction_cost_Metals', 50000, 'construction_cost_Electronics', 20000, 'build_points', 30000, 'require_prefab', true, 'is_tall', true, 'dome_required', true, 'dome_spot', "Spire", 'achievement', "FirstDomeSpire", 'upgrade1_id', "NetworkNode_Amplify", 'upgrade1_display_name', T{5028, --[[BuildingTemplate NetworkNode upgrade1_display_name]] "Amplify"}, 'upgrade1_description', T{5176, --[[BuildingTemplate NetworkNode upgrade1_description]] "+<upgrade1_mul_value_2>% Performance, +<power(upgrade1_add_value_1)> Consumption."}, 'upgrade1_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade1_upgrade_cost_Polymers', 10000, 'upgrade1_mod_label_1', "NetworkNode", 'upgrade1_mod_prop_id_1', "electricity_consumption", 'upgrade1_add_value_1', 20000, 'upgrade1_mod_label_2', "NetworkNode", 'upgrade1_mod_prop_id_2', "performance", 'upgrade1_mul_value_2', 25, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 3000, 'display_name', T{3538, --[[BuildingTemplate NetworkNode display_name]] "Network Node"}, 'display_name_pl', T{5177, --[[BuildingTemplate NetworkNode display_name_pl]] "Network Nodes"}, 'description', T{5178, --[[BuildingTemplate NetworkNode description]] "Increases the overall Research output of the Dome."}, 'build_category', "Dome Spires", 'display_icon', "UI/Icons/Buildings/network_node.tga", 'build_pos', 5, 'entity', "NetworkNode", 'encyclopedia_image', "UI/Encyclopedia/NetworkNode.tga", 'label1', "InsideBuildings", 'palettes', "NetworkNode", 'demolish_sinking', range(5, 10), 'demolish_tilt_angle', range(60, 300), 'electricity_consumption', 20000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 6, 'specialist', "scientist", }) PlaceObj('BuildingTemplate', { 'name', "Nursery", 'template_class', "Nursery", 'construction_cost_Concrete', 10000, 'build_points', 4000, 'dome_required', true, 'maintenance_resource_type', "Concrete", 'display_name', T{5179, --[[BuildingTemplate Nursery display_name]] "Nursery"}, 'display_name_pl', T{5180, --[[BuildingTemplate Nursery display_name_pl]] "Nurseries"}, 'description', T{5181, --[[BuildingTemplate Nursery description]] "Provides living space for children."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/nursery.tga", 'build_pos', 5, 'entity', "Nursery", 'encyclopedia_image', "UI/Encyclopedia/Nursery.tga", 'label1', "InsideBuildings", 'palettes', "KinderGarden", 'demolish_sinking', range(10, 15), 'electricity_consumption', 2000, 'service_comfort', 60000, 'comfort_increase', 5000, 'capacity', 8, 'children_only', true, }) PlaceObj('BuildingTemplate', { 'name', "OmegaTelescope", 'template_class', "OmegaTelescope", 'construction_cost_Concrete', 400000, 'construction_cost_Metals', 300000, 'construction_cost_Electronics', 300000, 'build_points', 120000, 'dome_forbidden', true, 'wonder', true, 'achievement', "BuiltOmegaTelescope", 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 3000, 'display_name', T{5182, --[[BuildingTemplate OmegaTelescope display_name]] "Omega Telescope"}, 'display_name_pl', T{5183, --[[BuildingTemplate OmegaTelescope display_name_pl]] "Omega Telescopes"}, 'description', T{5184, --[[BuildingTemplate OmegaTelescope description]] "Peering beyond the veil of the unknown, this radio telescope gives access to new Breakthrough Technologies and boosts overall Research."}, 'build_category', "Wonders", 'display_icon', "UI/Icons/Buildings/omega_telescope.tga", 'entity', "RadioDish", 'encyclopedia_image', "UI/Encyclopedia/OmegaTelescope.tga", 'label1', "OutsideBuildings", 'palettes', "RadioDish", 'demolish_sinking', range(5, 10), 'demolish_tilt_angle', range(300, 720), 'electricity_consumption', 80000, }) PlaceObj('BuildingTemplate', { 'name', "OpenAirGym", 'template_class', "OpenAirGym", 'construction_cost_Metals', 10000, 'construction_cost_Polymers', 8000, 'build_points', 3000, 'dome_required', true, 'display_name', T{5185, --[[BuildingTemplate OpenAirGym display_name]] "Open Air Gym"}, 'display_name_pl', T{5186, --[[BuildingTemplate OpenAirGym display_name_pl]] "Open Air Gyms"}, 'description', T{5187, --[[BuildingTemplate OpenAirGym description]] "Visitors recover a small amount of Health and may become Fit."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/open_air_gym.tga", 'build_pos', 4, 'entity', "OpenAirGym", 'encyclopedia_image', "UI/Encyclopedia/OpenAirGym.tga", 'label1', "InsideBuildings", 'palettes', "Gym", 'demolish_sinking', range(0, 0), 'health_change', 10000, 'service_comfort', 50000, 'interest1', "interestExercise", 'interest2', "interestSocial", 'max_visitors', 10, 'visit_duration', 3, }) PlaceObj('BuildingTemplate', { 'name', "DomeOval", 'template_class', "DomeOval", 'pin_summary1', T{5016, --[[BuildingTemplate DomeOval pin_summary1]] "<GetColonistCount><icon_Colonist_small>"}, 'pin_on_start', true, 'construction_cost_Concrete', 150000, 'construction_cost_Metals', 150000, 'construction_cost_Polymers', 100000, 'construction_entity', "DomeOvalConstruction", 'build_points', 80000, 'is_tall', true, 'construction_site_applies_height_surfaces', true, 'dome_forbidden', true, 'achievement', "FirstDome", 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 4000, 'display_name', T{5188, --[[BuildingTemplate DomeOval display_name]] "Oval Dome"}, 'display_name_pl', T{5189, --[[BuildingTemplate DomeOval display_name_pl]] "Oval Domes"}, 'description', T{5190, --[[BuildingTemplate DomeOval description]] "An elongated Dome design which has space for two Spires."}, 'build_category', "Domes", 'display_icon', "UI/Icons/Buildings/polymer_dome.tga", 'build_pos', 4, 'entity', "DomeOval", 'encyclopedia_image', "UI/Encyclopedia/OvalDome.tga", 'demolish_sinking', range(0, 0), 'demolish_debris', 0, 'electricity_consumption', 40000, 'water_consumption', 2000, 'air_consumption', 2000, }) PlaceObj('BuildingTemplate', { 'name', "OxygenTank", 'template_class', "OxygenTank", 'pin_rollover_context', "air", 'pin_progress_value', "current_storage", 'pin_progress_max', "storage_capacity", 'construction_cost_Metals', 3000, 'build_points', 2000, 'is_tall', true, 'dome_forbidden', true, 'maintenance_resource_type', "Metals", 'display_name', T{5191, --[[BuildingTemplate OxygenTank display_name]] "Oxygen Tank"}, 'display_name_pl', T{5192, --[[BuildingTemplate OxygenTank display_name_pl]] "Oxygen Tanks"}, 'description', T{5193, --[[BuildingTemplate OxygenTank description]] "Stores Oxygen."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/oxygen_tank.tga", 'build_pos', 2, 'entity', "AirTank", 'encyclopedia_image', "UI/Encyclopedia/OxygenTank.tga", 'entity2', "AirTankChrome", 'entitydlc2', "dde", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'color_modifier', RGBA(18, 248, 27, 255), 'palettes', "OxugenTank", 'demolish_sinking', range(1, 5), 'demolish_debris', 80, 'max_air_charge', 10000, 'max_air_discharge', 10000, 'air_capacity', 100000, }) PlaceObj('BuildingTemplate', { 'name', "LifesupportSwitch", 'template_class', "SupplyGridSwitchBuilding", 'construction_cost_Metals', 1000, 'build_points', 1000, 'can_rotate_during_placement', false, 'hide_from_build_menu', true, 'display_name', T{886, --[[BuildingTemplate LifesupportSwitch display_name]] "Pipe Valve"}, 'display_name_pl', T{5194, --[[BuildingTemplate LifesupportSwitch display_name_pl]] "Pipe Valves"}, 'description', T{5195, --[[BuildingTemplate LifesupportSwitch description]] "Can be manually activated to cut off Water and Oxygen supply."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/pipe_valve.tga", 'build_pos', 7, 'entity', "TubeSwitch", 'encyclopedia_exclude', true, 'palettes', "Pipes", }) PlaceObj('BuildingTemplate', { 'name', "Playground", 'template_class', "Playground", 'construction_cost_Polymers', 8000, 'build_points', 3000, 'dome_required', true, 'display_name', T{5196, --[[BuildingTemplate Playground display_name]] "Playground"}, 'display_name_pl', T{5197, --[[BuildingTemplate Playground display_name_pl]] "Playgrounds"}, 'description', T{5198, --[[BuildingTemplate Playground description]] "Cultivates Perks in Children through special nurturing programs."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/playground.tga", 'build_pos', 6, 'entity', "Playground", 'encyclopedia_image', "UI/Encyclopedia/Playground.tga", 'label1', "InsideBuildings", 'on_off_button', false, 'prio_button', false, 'palettes', "KinderGarden", 'demolish_sinking', range(0, 0), 'demolish_debris', 80, 'sanity_change', 10000, 'service_comfort', 80000, 'comfort_increase', 15000, 'interest1', "interestPlaying", 'usable_by_children', true, 'children_only', true, }) PlaceObj('BuildingTemplate', { 'name', "PolymerPlant", 'template_class', "PolymerPlant", 'resource_produced1', "Polymers", 'production_per_day1', 9000, 'construction_cost_Concrete', 10000, 'construction_cost_Metals', 5000, 'construction_cost_MachineParts', 5000, 'build_points', 7000, 'require_prefab', true, 'is_tall', true, 'dome_forbidden', true, 'upgrade1_id', "PolymerPlant_FactoryAI", 'upgrade1_display_name', T{5054, --[[BuildingTemplate PolymerPlant upgrade1_display_name]] "Factory AI"}, 'upgrade1_description', T{5055, --[[BuildingTemplate PolymerPlant upgrade1_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade1_icon', "UI/Icons/Upgrades/factory_ai_01.tga", 'upgrade1_upgrade_cost_Electronics', 5000, 'upgrade1_upgrade_cost_MachineParts', 2000, 'upgrade1_mod_label_1', "PolymerPlant", 'upgrade1_mod_prop_id_1', "production_per_day1", 'upgrade1_mul_value_1', 20, 'upgrade2_id', "PolymerPlant_Automation", 'upgrade2_display_name', T{5056, --[[BuildingTemplate PolymerPlant upgrade2_display_name]] "Automation"}, 'upgrade2_description', T{5057, --[[BuildingTemplate PolymerPlant upgrade2_description]] "Decreases Workplaces by <abs(upgrade2_add_value_1)>."}, 'upgrade2_icon', "UI/Icons/Upgrades/automation_01.tga", 'upgrade2_upgrade_cost_Polymers', 5000, 'upgrade2_upgrade_cost_Electronics', 5000, 'upgrade2_mod_label_1', "PolymerPlant", 'upgrade2_mod_prop_id_1', "max_workers", 'upgrade2_add_value_1', -2, 'upgrade3_id', "PolymerPlant_Amplify", 'upgrade3_display_name', T{5028, --[[BuildingTemplate PolymerPlant upgrade3_display_name]] "Amplify"}, 'upgrade3_description', T{8046, --[[BuildingTemplate PolymerPlant upgrade3_description]] "+<upgrade3_mul_value_1>% Production; +<power(upgrade3_add_value_2)> Consumption."}, 'upgrade3_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade3_upgrade_cost_Polymers', 5000, 'upgrade3_mod_label_1', "PolymerPlant", 'upgrade3_mod_prop_id_1', "production_per_day1", 'upgrade3_mul_value_1', 25, 'upgrade3_mod_label_2', "PolymerPlant", 'upgrade3_mod_prop_id_2', "electricity_consumption", 'upgrade3_add_value_2', 20000, 'maintenance_resource_type', "MachineParts", 'maintenance_resource_amount', 2000, 'consumption_resource_type', "Fuel", 'consumption_resource_stockpile_spot_name', "", 'display_name', T{3524, --[[BuildingTemplate PolymerPlant display_name]] "Polymer Factory"}, 'display_name_pl', T{5199, --[[BuildingTemplate PolymerPlant display_name_pl]] "Polymer Factories"}, 'description', T{5200, --[[BuildingTemplate PolymerPlant description]] "Produces Polymers from Water and Fuel."}, 'build_category', "Production", 'display_icon', "UI/Icons/Buildings/polymer_plant.tga", 'build_pos', 6, 'entity', "PolymerPlant", 'encyclopedia_image', "UI/Encyclopedia/PolymerFactory.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "PolumerPlant", 'demolish_sinking', range(1, 5), 'electricity_consumption', 2000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 6, 'specialist', "engineer", 'water_consumption', 1000, }) PlaceObj('BuildingTemplate', { 'name', "StoragePolymers", 'template_class', "UniversalStorageDepot", 'pin_summary1', T{5201, --[[BuildingTemplate StoragePolymers pin_summary1]] "<polymers(Stored_Polymers)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5202, --[[BuildingTemplate StoragePolymers display_name]] "Polymers Depot"}, 'display_name_pl', T{5203, --[[BuildingTemplate StoragePolymers display_name_pl]] "Polymers Depots"}, 'description', T{5204, --[[BuildingTemplate StoragePolymers description]] "Stores <polymers(max_storage_per_resource)>. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/polymers_storage.tga", 'build_pos', 6, 'entity', "StorageDepotSmall_01", 'encyclopedia_image', "UI/Encyclopedia/PolymersDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "Polymers", }, }) PlaceObj('BuildingTemplate', { 'name', "Battery_WaterFuelCell", 'template_class', "ElectricityStorage", 'pin_rollover_context', "electricity", 'pin_progress_value', "current_storage", 'pin_progress_max', "storage_capacity", 'construction_cost_Concrete', 3000, 'construction_cost_Polymers', 2000, 'build_points', 1500, 'dome_forbidden', true, 'construction_state', "full", 'maintenance_resource_type', "Polymers", 'display_name', T{5205, --[[BuildingTemplate Battery_WaterFuelCell display_name]] "Power Accumulator"}, 'display_name_pl', T{5206, --[[BuildingTemplate Battery_WaterFuelCell display_name_pl]] "Power Accumulators"}, 'description', T{5207, --[[BuildingTemplate Battery_WaterFuelCell description]] "Stores Power. Amount of Power supplied is limited by the battery’s max output."}, 'build_category', "Power", 'display_icon', "UI/Icons/Buildings/fuel_cell.tga", 'build_pos', 6, 'entity', "FuelCell", 'encyclopedia_image', "UI/Encyclopedia/PowerAccumulator.tga", 'build_shortcut1', "K", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "Battery_WaterFuelCell", 'demolish_sinking', range(5, 5), 'demolish_tilt_angle', range(900, 1200), 'demolish_debris', 85, 'max_electricity_charge', 20000, 'max_electricity_discharge', 20000, 'conversion_efficiency', 100, 'capacity', 200000, 'charge_animation', "charge", 'empty_state', "idle", 'full_state', "full", }) PlaceObj('BuildingTemplate', { 'name', "PowerDecoy", 'template_class', "PowerDecoy", 'construction_cost_Concrete', 10000, 'construction_cost_Polymers', 5000, 'construction_cost_Electronics', 5000, 'build_points', 5000, 'dome_forbidden', true, 'display_name', T{5208, --[[BuildingTemplate PowerDecoy display_name]] "Power Decoy"}, 'display_name_pl', T{5209, --[[BuildingTemplate PowerDecoy display_name_pl]] "Power Decoys"}, 'description', T{5210, --[[BuildingTemplate PowerDecoy description]] "Traps a single Mirror Sphere."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/power_decoy.tga", 'build_pos', 13, 'entity', "PowerDecoy", 'encyclopedia_exclude', true, 'label1', "OutsideBuildings", 'palettes', "PowerDecoy", 'electricity_consumption', 10000, }) PlaceObj('BuildingTemplate', { 'name', "ElectricitySwitch", 'template_class', "SupplyGridSwitchBuilding", 'construction_cost_Metals', 1000, 'build_points', 1000, 'can_rotate_during_placement', false, 'hide_from_build_menu', true, 'display_name', T{885, --[[BuildingTemplate ElectricitySwitch display_name]] "Power Switch"}, 'display_name_pl', T{5211, --[[BuildingTemplate ElectricitySwitch display_name_pl]] "Power Switches"}, 'description', T{5212, --[[BuildingTemplate ElectricitySwitch description]] "Can be manually activated to cut off the Power supply."}, 'build_category', "Power", 'display_icon', "UI/Icons/Buildings/power_switch.tga", 'build_pos', 10, 'entity', "CableSwitch", 'encyclopedia_exclude', true, }) PlaceObj('BuildingTemplate', { 'name', "ProjectMorpheus", 'template_class', "ProjectMorpheus", 'construction_cost_Concrete', 200000, 'construction_cost_Metals', 400000, 'construction_cost_Electronics', 300000, 'build_points', 120000, 'is_tall', true, 'dome_forbidden', true, 'wonder', true, 'achievement', "BuiltProjectMorpheus", 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 3000, 'display_name', T{5213, --[[BuildingTemplate ProjectMorpheus display_name]] "Project Morpheus"}, 'display_name_pl', T{5214, --[[BuildingTemplate ProjectMorpheus display_name_pl]] "Projects Morpheus"}, 'description', T{5215, --[[BuildingTemplate ProjectMorpheus description]] "With our improved understanding of the human brain we created Project Morpheus. The device uses a combination of psychosomatic triggers and suggestopedic methodology to stimulate the development of new Perks in adult Colonists."}, 'build_category', "Wonders", 'display_icon', "UI/Icons/Buildings/project_morpheus.tga", 'build_pos', 2, 'entity', "ProjectMorpheus", 'encyclopedia_image', "UI/Encyclopedia/ProjectMorpheus.tga", 'label1', "OutsideBuildings", 'palettes', "Morpheus", 'demolish_sinking', range(5, 10), 'demolish_debris', 75, 'electricity_consumption', 110000, }) PlaceObj('BuildingTemplate', { 'name', "LampProjector", 'template_class', "ElectricityConsumer", 'construction_cost_Concrete', 1000, 'build_points', 500, 'is_tall', true, 'dome_forbidden', true, 'lights_on_during_placement', true, 'use_demolished_state', false, 'display_name', T{5216, --[[BuildingTemplate LampProjector display_name]] "Projector Lamp"}, 'display_name_pl', T{5217, --[[BuildingTemplate LampProjector display_name_pl]] "Projector Lamps"}, 'description', T{5218, --[[BuildingTemplate LampProjector description]] "Make the Martian night a little brighter."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/projector_lamp.tga", 'build_pos', 2, 'entity', "TestProjector", 'encyclopedia_image', "UI/Encyclopedia/ProjectorLamp.tga", 'label1', "Decorations", 'electricity_consumption', 200, }) PlaceObj('BuildingTemplate', { 'name', "RCExplorerBuilding", 'template_class', "RCExplorerBuilding", 'construction_cost_Metals', 20000, 'construction_cost_Electronics', 10000, 'dome_forbidden', true, 'display_name', T{1684, --[[BuildingTemplate RCExplorerBuilding display_name]] "RC Explorer"}, 'display_name_pl', T{5219, --[[BuildingTemplate RCExplorerBuilding display_name_pl]] "RC Explorers"}, 'description', T{5220, --[[BuildingTemplate RCExplorerBuilding description]] "Remote-controlled exploration vehicle that can analyze Anomalies."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/rover_human.tga", 'build_pos', 3, 'entity', "RoverExplorerBuilding", 'encyclopedia_exclude', true, 'on_off_button', false, 'prio_button', false, 'palettes', "RCExplorer", }) PlaceObj('BuildingTemplate', { 'name', "RCRoverBuilding", 'template_class', "RCRoverBuilding", 'construction_cost_Metals', 20000, 'construction_cost_Electronics', 10000, 'dome_forbidden', true, 'display_name', T{7682, --[[BuildingTemplate RCRoverBuilding display_name]] "RC Rover"}, 'display_name_pl', T{5221, --[[BuildingTemplate RCRoverBuilding display_name_pl]] "RC Rovers"}, 'description', T{4477, --[[BuildingTemplate RCRoverBuilding description]] "Remote-controlled vehicle that transports, commands and repairs Drones."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/rcrover.tga", 'entity', "RCRoverBuilding", 'encyclopedia_exclude', true, 'on_off_button', false, 'prio_button', false, 'palettes', "RCRover", }) PlaceObj('BuildingTemplate', { 'name', "RCTransportBuilding", 'template_class', "RCTransportBuilding", 'construction_cost_Metals', 20000, 'construction_cost_Electronics', 10000, 'dome_forbidden', true, 'display_name', T{1683, --[[BuildingTemplate RCTransportBuilding display_name]] "RC Transport"}, 'display_name_pl', T{1683, --[[BuildingTemplate RCTransportBuilding display_name_pl]] "RC Transport"}, 'description', T{4461, --[[BuildingTemplate RCTransportBuilding description]] "Remote-controlled vehicle that transports resources. Use it to establish permanent supply routes or to gather resources from surface deposits."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/rover_transport.tga", 'build_pos', 2, 'entity', "RoverTransportBuilding", 'encyclopedia_exclude', true, 'on_off_button', false, 'prio_button', false, 'palettes', "RCTransport", }) PlaceObj('BuildingTemplate', { 'name', "StorageRareMetals", 'template_class', "UniversalStorageDepot", 'pin_summary1', T{5225, --[[BuildingTemplate StorageRareMetals pin_summary1]] "<preciousmetals(Stored_PreciousMetals)>"}, 'build_points', 0, 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5226, --[[BuildingTemplate StorageRareMetals display_name]] "Rare Metals Depot"}, 'display_name_pl', T{5227, --[[BuildingTemplate StorageRareMetals display_name_pl]] "Rare Metals Depots"}, 'description', T{5228, --[[BuildingTemplate StorageRareMetals description]] "Stores <preciousmetals(max_storage_per_resource)>. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/rare_metals_storage.tga", 'build_pos', 5, 'entity', "StorageDepotSmall_07", 'encyclopedia_image', "UI/Encyclopedia/RareMetalsDepot.tga", 'on_off_button', false, 'prio_button', false, 'max_storage_per_resource', 180000, 'max_x', 12, 'storable_resources', { "PreciousMetals", }, }) PlaceObj('BuildingTemplate', { 'name', "PreciousMetalsExtractor", 'template_class', "PreciousMetalsExtractor", 'resource_produced1', "PreciousMetals", 'production_per_day1', 7000, 'resource_produced2', "WasteRock", 'stockpile_class2', "WasteRockStockpile", 'construction_cost_Metals', 20000, 'construction_cost_MachineParts', 5000, 'build_points', 5000, 'is_tall', true, 'dome_forbidden', true, 'upgrade1_id', "PreciousMetalsExtractor_FueledExtractor", 'upgrade1_display_name', T{5026, --[[BuildingTemplate PreciousMetalsExtractor upgrade1_display_name]] "Fueled Extractor"}, 'upgrade1_description', T{7670, --[[BuildingTemplate PreciousMetalsExtractor upgrade1_description]] "+<upgrade1_mul_value_1>% Production as long as the building is supplied with Fuel. If not supplied with Fuel, the building will continue to operate but will lose the bonus."}, 'upgrade1_icon', "UI/Icons/Upgrades/fueled_extractor_01.tga", 'upgrade1_upgrade_cost_MachineParts', 5000, 'upgrade1_mod_label_1', "PreciousMetalsExtractor", 'upgrade1_mod_prop_id_1', "production_per_day1", 'upgrade1_mul_value_1', 30, 'upgrade1_consumption_resource_type', "Fuel", 'upgrade1_consumption_amount', 800, 'upgrade1_consumption_resource_stockpile_spot_name', "", 'upgrade2_id', "PreciousMetalsExtractor_Amplify", 'upgrade2_display_name', T{5028, --[[BuildingTemplate PreciousMetalsExtractor upgrade2_display_name]] "Amplify"}, 'upgrade2_description', T{5234, --[[BuildingTemplate PreciousMetalsExtractor upgrade2_description]] "+<upgrade2_mul_value_2>% Production; +<power(upgrade2_add_value_1)> Consumption."}, 'upgrade2_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade2_upgrade_cost_Polymers', 2000, 'upgrade2_mod_label_1', "PreciousMetalsExtractor", 'upgrade2_mod_prop_id_1', "electricity_consumption", 'upgrade2_add_value_1', 10000, 'upgrade2_mod_label_2', "PreciousMetalsExtractor", 'upgrade2_mod_prop_id_2', "production_per_day1", 'upgrade2_mul_value_2', 25, 'upgrade3_id', "PreciousMetalsExtractor_MagneticExtraction", 'upgrade3_display_name', T{5030, --[[BuildingTemplate PreciousMetalsExtractor upgrade3_display_name]] "Magnetic Extraction"}, 'upgrade3_description', T{5222, --[[BuildingTemplate PreciousMetalsExtractor upgrade3_description]] "+<upgrade3_mul_value_1>% Production."}, 'upgrade3_icon', "UI/Icons/Upgrades/magnetic_extraction_01.tga", 'upgrade3_upgrade_cost_Electronics', 5000, 'upgrade3_upgrade_cost_MachineParts', 5000, 'upgrade3_mod_label_1', "PreciousMetalsExtractor", 'upgrade3_mod_prop_id_1', "production_per_day1", 'upgrade3_mul_value_1', 50, 'maintenance_resource_type', "MachineParts", 'maintenance_resource_amount', 2000, 'maintenance_threshold_base', 150000, 'display_name', T{3530, --[[BuildingTemplate PreciousMetalsExtractor display_name]] "Rare Metals Extractor"}, 'display_name_pl', T{5223, --[[BuildingTemplate PreciousMetalsExtractor display_name_pl]] "Rare Metals Extractors"}, 'description', T{5224, --[[BuildingTemplate PreciousMetalsExtractor description]] "Extracts Rare Metals from underground deposits. All extractors contaminate nearby buildings with dust."}, 'build_category', "Production", 'display_icon', "UI/Icons/Buildings/universal_extractor.tga", 'build_pos', 5, 'entity', "UniversalExtractor", 'encyclopedia_image', "UI/Encyclopedia/RareMetalsExtractor.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'color_modifier', RGBA(169, 97, 97, 255), 'palettes', "UniversalExtractor", 'demolish_sinking', range(5, 10), 'demolish_debris', 68, 'exploitation_resource', "PreciousMetals", 'electricity_consumption', 5000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 4, 'specialist', "geologist", }) PlaceObj('BuildingTemplate', { 'name', "RechargeStation", 'template_class', "RechargeStation", 'construction_cost_Metals', 1000, 'build_points', 500, 'maintenance_threshold_base', 50000, 'display_name', T{5229, --[[BuildingTemplate RechargeStation display_name]] "Recharge Station"}, 'display_name_pl', T{5230, --[[BuildingTemplate RechargeStation display_name_pl]] "Recharge Stations"}, 'description', T{5231, --[[BuildingTemplate RechargeStation description]] "Recharges Drone batteries."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/recharge_station.tga", 'build_pos', 5, 'entity', "RechargeStation", 'encyclopedia_image', "UI/Encyclopedia/RechargeStation.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "RechargeStation", 'demolish_sinking', range(1, 4), 'demolish_debris', 85, 'electricity_consumption', 200, }) PlaceObj('BuildingTemplate', { 'name', "ResearchLab", 'template_class', "BaseResearchLab", 'construction_cost_Concrete', 15000, 'construction_cost_Electronics', 8000, 'build_points', 6000, 'is_tall', true, 'dome_required', true, 'upgrade1_id', "ResearchLab_ZeroSpace", 'upgrade1_display_name', T{5232, --[[BuildingTemplate ResearchLab upgrade1_display_name]] "Zero-Space Computing"}, 'upgrade1_description', T{5233, --[[BuildingTemplate ResearchLab upgrade1_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade1_icon', "UI/Icons/Upgrades/zero_space_01.tga", 'upgrade1_upgrade_cost_Electronics', 5000, 'upgrade1_mod_prop_id_1', "ResearchPointsPerDay", 'upgrade1_mul_value_1', 25, 'upgrade2_id', "ResearchLab_Amplify", 'upgrade2_display_name', T{5028, --[[BuildingTemplate ResearchLab upgrade2_display_name]] "Amplify"}, 'upgrade2_description', T{5234, --[[BuildingTemplate ResearchLab upgrade2_description]] "+<upgrade2_mul_value_2>% Production; +<power(upgrade2_add_value_1)> Consumption."}, 'upgrade2_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade2_upgrade_cost_Polymers', 2000, 'upgrade2_mod_prop_id_1', "electricity_consumption", 'upgrade2_add_value_1', 10000, 'upgrade2_mod_prop_id_2', "ResearchPointsPerDay", 'upgrade2_mul_value_2', 25, 'maintenance_resource_type', "Electronics", 'display_name', T{5235, --[[BuildingTemplate ResearchLab display_name]] "Research Lab"}, 'display_name_pl', T{5236, --[[BuildingTemplate ResearchLab display_name_pl]] "Research Labs"}, 'description', T{5237, --[[BuildingTemplate ResearchLab description]] "Generates Research."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/academy_of_science.tga", 'build_pos', 8, 'entity', "Academy", 'encyclopedia_image', "UI/Encyclopedia/ResearchLab.tga", 'label1', "InsideBuildings", 'label2', "ResearchBuildings", 'palettes', "ResearchLab", 'demolish_sinking', range(5, 10), 'demolish_debris', 80, 'electricity_consumption', 5000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 3, 'specialist', "scientist", 'ResearchPointsPerDay', 500, }) PlaceObj('BuildingTemplate', { 'name', "SupplyRocket", 'template_class', "SupplyRocket", 'pin_rollover_hint', T{705, --[[BuildingTemplate SupplyRocket pin_rollover_hint]] "<left_click> Land Rocket"}, 'pin_rollover_hint_xbox', T{706, --[[BuildingTemplate SupplyRocket pin_rollover_hint_xbox]] "<ButtonA> Land Rocket"}, 'pin_obvious_blink', true, 'construction_cost_Metals', 60000, 'construction_cost_Electronics', 20000, 'construction_entity', "RocketLandingSite", 'build_points', 0, 'instant_build', true, 'can_rotate_during_placement', false, 'dome_forbidden', true, 'display_name', T{1685, --[[BuildingTemplate SupplyRocket display_name]] "Rocket"}, 'display_name_pl', T{5238, --[[BuildingTemplate SupplyRocket display_name_pl]] "Rockets"}, 'description', T{5239, --[[BuildingTemplate SupplyRocket description]] "Delivers cargo or Colonists to Mars. Commands nearby Drones. Contaminates nearby buildings with dust when landing and taking off. Requires <em>Fuel</em> for the return trip to Earth."}, 'build_category', "Hidden", 'display_icon', "UI/Icons/Buildings/rocket.tga", 'build_pos', 7, 'entity', "Rocket", 'label1', "Spaceship", 'on_off_button', false, 'indestructible', true, 'exclude_from_lr_transportation', true, 'max_storage_per_resource', 60000, 'storable_resources', { "Concrete", "Metals", "Polymers", "Food", "Electronics", "MachineParts", }, 'starting_drones', 0, 'launch_fuel', 60000, 'max_export_storage', 30000, }) PlaceObj('BuildingTemplate', { 'name', "TradeRocket", 'template_class', "TradeRocket", 'pin_rollover_hint', T{705, --[[BuildingTemplate TradeRocket pin_rollover_hint]] "<left_click> Land Rocket"}, 'pin_rollover_hint_xbox', T{706, --[[BuildingTemplate TradeRocket pin_rollover_hint_xbox]] "<ButtonA> Land Rocket"}, 'pin_obvious_blink', true, 'construction_cost_Metals', 60000, 'construction_cost_Electronics', 20000, 'construction_entity', "RocketLandingSite", 'build_points', 0, 'instant_build', true, 'can_rotate_during_placement', false, 'dome_forbidden', true, 'display_name', T{1685, --[[BuildingTemplate TradeRocket display_name]] "Rocket"}, 'display_name_pl', T{5238, --[[BuildingTemplate TradeRocket display_name_pl]] "Rockets"}, 'description', T{5239, --[[BuildingTemplate TradeRocket description]] "Delivers cargo or Colonists to Mars. Commands nearby Drones. Contaminates nearby buildings with dust when landing and taking off. Requires <em>Fuel</em> for the return trip to Earth."}, 'build_category', "Hidden", 'display_icon', "UI/Icons/Buildings/rocket_trade.tga", 'build_pos', 7, 'entity', "Rocket", 'encyclopedia_exclude', true, 'label1', "Spaceship", 'on_off_button', false, 'indestructible', true, 'exclude_from_lr_transportation', true, 'max_storage_per_resource', 60000, 'storable_resources', { "Concrete", "Metals", "Polymers", "Food", "Electronics", "MachineParts", }, 'starting_drones', 0, 'launch_fuel', 60000, }) PlaceObj('BuildingTemplate', { 'name', "RefugeeRocket", 'template_class', "RefugeeRocket", 'pin_rollover_hint', T{705, --[[BuildingTemplate RefugeeRocket pin_rollover_hint]] "<left_click> Land Rocket"}, 'pin_rollover_hint_xbox', T{706, --[[BuildingTemplate RefugeeRocket pin_rollover_hint_xbox]] "<ButtonA> Land Rocket"}, 'pin_obvious_blink', true, 'construction_cost_Metals', 60000, 'construction_cost_Electronics', 20000, 'construction_entity', "RocketLandingSite", 'build_points', 0, 'instant_build', true, 'can_rotate_during_placement', false, 'dome_forbidden', true, 'display_name', T{1685, --[[BuildingTemplate RefugeeRocket display_name]] "Rocket"}, 'display_name_pl', T{5238, --[[BuildingTemplate RefugeeRocket display_name_pl]] "Rockets"}, 'description', T{5239, --[[BuildingTemplate RefugeeRocket description]] "Delivers cargo or Colonists to Mars. Commands nearby Drones. Contaminates nearby buildings with dust when landing and taking off. Requires <em>Fuel</em> for the return trip to Earth."}, 'build_category', "Hidden", 'display_icon', "UI/Icons/Buildings/rocket_trade.tga", 'build_pos', 7, 'entity', "Rocket", 'encyclopedia_exclude', true, 'label1', "Spaceship", 'on_off_button', false, 'indestructible', true, 'exclude_from_lr_transportation', true, 'max_storage_per_resource', 60000, 'storable_resources', { "Concrete", "Metals", "Polymers", "Food", "Electronics", "MachineParts", }, 'starting_drones', 0, 'launch_fuel', 0, }) PlaceObj('BuildingTemplate', { 'name', "RocketLandingSite", 'template_class', "RocketLandingSite", 'construction_entity', "RocketLandingSite", 'build_points', 0, 'instant_build', true, 'is_tall', true, 'dome_forbidden', true, 'force_extend_bb_during_placement_checks', 1000, 'can_user_change_prio', false, 'display_name', T{5240, --[[BuildingTemplate RocketLandingSite display_name]] "Rocket Landing Site"}, 'display_name_pl', T{5241, --[[BuildingTemplate RocketLandingSite display_name_pl]] "Rocket Landing Sites"}, 'description', T{5242, --[[BuildingTemplate RocketLandingSite description]] "The landing site of a Rocket."}, 'build_category', "Hidden", 'display_icon', "UI/Icons/Buildings/placeholder.tga", 'build_pos', 7, 'entity', "RocketLandingSite", 'encyclopedia_exclude', true, 'indestructible', true, }) PlaceObj('BuildingTemplate', { 'name', "Sanatorium", 'template_class', "Sanatorium", 'construction_cost_Concrete', 50000, 'construction_cost_Metals', 20000, 'construction_cost_Polymers', 10000, 'build_points', 30000, 'require_prefab', true, 'is_tall', true, 'dome_required', true, 'dome_spot', "Spire", 'achievement', "FirstDomeSpire", 'upgrade1_id', "Sanatorium_BehavioralMelding", 'upgrade1_display_name', T{5243, --[[BuildingTemplate Sanatorium upgrade1_display_name]] "Behavioral Melding"}, 'upgrade1_description', T{5244, --[[BuildingTemplate Sanatorium upgrade1_description]] "Replaces flaws with Perks for visitors."}, 'upgrade1_icon', "UI/Icons/Upgrades/behavioral_melding_01.tga", 'upgrade1_upgrade_cost_Polymers', 10000, 'upgrade1_upgrade_cost_Electronics', 10000, 'maintenance_resource_type', "Polymers", 'maintenance_resource_amount', 2000, 'display_name', T{3540, --[[BuildingTemplate Sanatorium display_name]] "Sanatorium"}, 'display_name_pl', T{5245, --[[BuildingTemplate Sanatorium display_name_pl]] "Sanatoriums"}, 'description', T{5246, --[[BuildingTemplate Sanatorium description]] "Treats Colonists for flaws through advanced and (mostly humane) medical practices."}, 'build_category', "Dome Spires", 'display_icon', "UI/Icons/Buildings/sanatorium.tga", 'build_pos', 7, 'entity', "Sanatorium", 'encyclopedia_image', "UI/Encyclopedia/Sanatorium.tga", 'label1', "InsideBuildings", 'palettes', "Sanatorium", 'demolish_sinking', range(5, 15), 'electricity_consumption', 20000, 'enabled_shift_1', false, 'enabled_shift_3', false, 'max_visitors', 4, 'evaluation_points', 200, 'trait1', "Gambler", 'trait2', "Alcoholic", 'trait3', "Glutton", }) PlaceObj('BuildingTemplate', { 'name', "School", 'template_class', "School", 'construction_cost_Concrete', 25000, 'construction_cost_Electronics', 10000, 'build_points', 9000, 'dome_required', true, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 2000, 'display_name', T{5247, --[[BuildingTemplate School display_name]] "School"}, 'display_name_pl', T{5248, --[[BuildingTemplate School display_name_pl]] "Schools"}, 'description', T{5249, --[[BuildingTemplate School description]] "Cultivates desired Perks in children using modern remote learning techniques."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/school.tga", 'build_pos', 7, 'entity', "School", 'encyclopedia_image', "UI/Encyclopedia/School.tga", 'label1', "InsideBuildings", 'palettes', "School", 'demolish_sinking', range(5, 10), 'demolish_debris', 85, 'enabled_shift_3', false, 'usable_by_children', true, 'children_only', true, 'gain_point', 10, 'trait1', "Survivor", 'trait2', "Composed", 'trait3', "Nerd", }) PlaceObj('BuildingTemplate', { 'name', "ScienceInstitute", 'template_class', "BaseResearchLab", 'construction_cost_Concrete', 30000, 'construction_cost_Polymers', 10000, 'construction_cost_Electronics', 20000, 'build_points', 12000, 'is_tall', true, 'dome_required', true, 'upgrade1_id', "ScienceInsitiute_ZeroSpace", 'upgrade1_display_name', T{5232, --[[BuildingTemplate ScienceInstitute upgrade1_display_name]] "Zero-Space Computing"}, 'upgrade1_description', T{5233, --[[BuildingTemplate ScienceInstitute upgrade1_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade1_icon', "UI/Icons/Upgrades/zero_space_01.tga", 'upgrade1_upgrade_cost_Electronics', 10000, 'upgrade1_mod_label_1', "ScienceInstitute", 'upgrade1_mod_prop_id_1', "ResearchPointsPerDay", 'upgrade1_mul_value_1', 25, 'upgrade2_id', "ScienceInstitute_Amplify", 'upgrade2_display_name', T{5028, --[[BuildingTemplate ScienceInstitute upgrade2_display_name]] "Amplify"}, 'upgrade2_description', T{5250, --[[BuildingTemplate ScienceInstitute upgrade2_description]] "+<upgrade2_mul_value_2>% Production; +<power(upgrade2_add_value_1)> Consumption."}, 'upgrade2_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade2_upgrade_cost_Polymers', 5000, 'upgrade2_mod_label_1', "ScienceInstitute", 'upgrade2_mod_prop_id_1', "electricity_consumption", 'upgrade2_add_value_1', 20000, 'upgrade2_mod_label_2', "ScienceInstitute", 'upgrade2_mod_prop_id_2', "ResearchPointsPerDay", 'upgrade2_mul_value_2', 50, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 4000, 'display_name', T{5251, --[[BuildingTemplate ScienceInstitute display_name]] "Hawking Institute"}, 'display_name_pl', T{5252, --[[BuildingTemplate ScienceInstitute display_name_pl]] "Hawking Institutes"}, 'description', T{5253, --[[BuildingTemplate ScienceInstitute description]] "Generates Research faster than a Research Lab."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/research_lab.tga", 'build_pos', 9, 'entity', "ScienceInstitute", 'encyclopedia_image', "UI/Encyclopedia/ScienceInstitute.tga", 'label1', "InsideBuildings", 'label2', "ResearchBuildings", 'palettes', "Outside_07", 'demolish_sinking', range(5, 15), 'electricity_consumption', 15000, 'enabled_shift_2', false, 'enabled_shift_3', false, 'max_workers', 8, 'specialist', "scientist", }) PlaceObj('BuildingTemplate', { 'name', "SecurityStation", 'template_class', "SecurityStation", 'construction_cost_Concrete', 15000, 'construction_cost_Metals', 5000, 'build_points', 3000, 'is_tall', true, 'dome_required', true, 'maintenance_resource_type', "Concrete", 'display_name', T{5254, --[[BuildingTemplate SecurityStation display_name]] "Security Station"}, 'display_name_pl', T{5255, --[[BuildingTemplate SecurityStation display_name_pl]] "Security Stations"}, 'description', T{5256, --[[BuildingTemplate SecurityStation description]] "Counters crime created by Renegades and reduces Sanity loss from disasters for all residents in the Dome."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/security_station.tga", 'build_pos', 6, 'entity', "SecurityCenter", 'encyclopedia_image', "UI/Encyclopedia/SecurityStation.tga", 'label1', "InsideBuildings", 'palettes', "SecurityStation", 'demolish_sinking', range(5, 10), 'demolish_debris', 80, 'electricity_consumption', 2000, 'max_workers', 3, 'specialist', "security", }) PlaceObj('BuildingTemplate', { 'name', "SensorTower", 'template_class', "SensorTower", 'construction_cost_Metals', 1000, 'construction_cost_Electronics', 1000, 'build_points', 500, 'is_tall', true, 'dome_forbidden', true, 'maintenance_resource_type', "Metals", 'maintenance_threshold_base', 50000, 'display_name', T{5257, --[[BuildingTemplate SensorTower display_name]] "Sensor Tower"}, 'display_name_pl', T{5258, --[[BuildingTemplate SensorTower display_name_pl]] "Sensor Towers"}, 'description', T{5259, --[[BuildingTemplate SensorTower description]] "Boosts scanning speed, especially for nearby sectors. Extends the advance warning for disasters."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/sensor_tower.tga", 'build_pos', 6, 'entity', "SensorTower", 'encyclopedia_image', "UI/Encyclopedia/SensorTower.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "SensorTower", 'demolish_sinking', range(10, 20), 'demolish_debris', 85, 'electricity_consumption', 2000, }) PlaceObj('BuildingTemplate', { 'name', "ShuttleHub", 'template_class', "ShuttleHub", 'construction_cost_Concrete', 10000, 'construction_cost_Polymers', 15000, 'construction_cost_Electronics', 10000, 'build_points', 5000, 'is_tall', true, 'dome_forbidden', true, 'achievement', "FirstShuttleHub", 'maintenance_resource_type', "Electronics", 'consumption_resource_type', "Fuel", 'consumption_amount', 1500, 'consumption_type', 3, 'display_name', T{3526, --[[BuildingTemplate ShuttleHub display_name]] "Shuttle Hub"}, 'display_name_pl', T{5260, --[[BuildingTemplate ShuttleHub display_name_pl]] "Shuttle Hubs"}, 'description', T{5261, --[[BuildingTemplate ShuttleHub description]] "Houses and refuels Shuttles that facilitate long-range resource transportation between Depots and resettling of Colonists between Domes."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/shuttle_hub.tga", 'build_pos', 7, 'entity', "ShuttleHub", 'suspend_on_dust_storm', true, 'encyclopedia_image', "UI/Encyclopedia/ShuttleHub.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "ShuttleHUb", 'demolish_sinking', range(0, 0), 'demolish_debris', 85, 'electricity_consumption', 10000, 'water_consumption', 0, 'max_shuttles', 6, }) PlaceObj('BuildingTemplate', { 'name', "GardenAlleys_Small", 'template_class', "Service", 'construction_cost_Concrete', 2000, 'build_points', 500, 'dome_required', true, 'show_decals_on_placement', true, 'use_demolished_state', false, 'display_name', T{5262, --[[BuildingTemplate GardenAlleys_Small display_name]] "Small Alleys"}, 'display_name_pl', T{5262, --[[BuildingTemplate GardenAlleys_Small display_name_pl]] "Small Alleys"}, 'description', T{5145, --[[BuildingTemplate GardenAlleys_Small description]] "A beautiful park with alleys and benches."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/small_alleys.tga", 'build_pos', 5, 'entity', "GardenAlleys_01", 'encyclopedia_image', "UI/Encyclopedia/SmallAlleys.tga", 'entity2', "GardenAlleys_02", 'entity3', "GardenAlleys_03", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 1, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "FountainSmall", 'template_class', "Service", 'construction_cost_Concrete', 2000, 'build_points', 500, 'dome_required', true, 'use_demolished_state', false, 'display_name', T{5263, --[[BuildingTemplate FountainSmall display_name]] "Small Fountain"}, 'display_name_pl', T{5264, --[[BuildingTemplate FountainSmall display_name_pl]] "Small Fountains"}, 'description', T{5116, --[[BuildingTemplate FountainSmall description]] "A place for relaxation and recreation."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/small_fountain.tga", 'build_pos', 9, 'entity', "GardenFountains_01", 'encyclopedia_image', "UI/Encyclopedia/SmallFountain.tga", 'entity2', "GardenFountains_02", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 1, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "GardenNatural_Small", 'template_class', "Service", 'construction_cost_Concrete', 2000, 'build_points', 500, 'dome_required', true, 'use_demolished_state', false, 'display_name', T{5265, --[[BuildingTemplate GardenNatural_Small display_name]] "Small Garden"}, 'display_name_pl', T{5266, --[[BuildingTemplate GardenNatural_Small display_name_pl]] "Small Gardens"}, 'description', T{5151, --[[BuildingTemplate GardenNatural_Small description]] "A recreational area with cultivated vegetation."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/small_garden.tga", 'build_pos', 3, 'entity', "GardenNatural_01", 'encyclopedia_image', "UI/Encyclopedia/SmallGarden.tga", 'entity2', "GardenNatural_02", 'entity3', "GardenNatural_03", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 1, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "BlackCubeSmallMonument", 'template_class', "", 'construction_cost_BlackCube', 42000, 'build_points', 1000, 'use_demolished_state', false, 'display_name', T{5267, --[[BuildingTemplate BlackCubeSmallMonument display_name]] "Small Monument"}, 'display_name_pl', T{5268, --[[BuildingTemplate BlackCubeSmallMonument display_name_pl]] "Small Monuments"}, 'description', T{5269, --[[BuildingTemplate BlackCubeSmallMonument description]] "A decorative monument created from the mysterious Black Cubes. Probably harmless."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/black_cube_monument_small.tga", 'build_pos', 13, 'entity', "BlackCubeMonumentSmall", 'encyclopedia_exclude', true, 'on_off_button', false, 'prio_button', false, }) PlaceObj('BuildingTemplate', { 'name', "SmartHome", 'template_class', "SmartHome", 'construction_cost_Concrete', 15000, 'construction_cost_Electronics', 10000, 'dome_required', true, 'show_decals_on_placement', true, 'upgrade1_id', "SmartHome_HomeCollective", 'upgrade1_display_name', T{5005, --[[BuildingTemplate SmartHome upgrade1_display_name]] "Home Collective"}, 'upgrade1_description', T{5272, --[[BuildingTemplate SmartHome upgrade1_description]] "+<upgrade1_add_value_1> Service Comfort."}, 'upgrade1_icon', "UI/Icons/Upgrades/home_collective_01.tga", 'upgrade1_upgrade_cost_Polymers', 5000, 'upgrade1_mod_label_1', "SmartHome", 'upgrade1_mod_prop_id_1', "service_comfort", 'upgrade1_add_value_1', 10, 'maintenance_resource_type', "Electronics", 'display_name', T{7800, --[[BuildingTemplate SmartHome display_name]] "Smart Complex"}, 'display_name_pl', T{7801, --[[BuildingTemplate SmartHome display_name_pl]] "Smart Complexes"}, 'description', T{5273, --[[BuildingTemplate SmartHome description]] "Provide a very comfortable living space for Colonists. Residents will recover additional Sanity when resting."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/smart homes.tga", 'build_pos', 4, 'entity', "SmartHomeBig_01", 'encyclopedia_image', "UI/Encyclopedia/SmartComplex.tga", 'entity2', "SmartHomeBig_02", 'entity3', "SmartHomeBig_03", 'entity4', "SmartHomeBigDDE_01", 'entitydlc4', "dde", 'entity5', "SmartHomeBigDDE_02", 'entitydlc5', "dde", 'entity6', "SmartHomeBigDDE_03", 'entitydlc6', "dde", 'label1', "InsideBuildings", 'palettes', "Grocery", 'demolish_sinking', range(15, 20), 'demolish_debris', 90, 'freeze_heat', 91, 'electricity_consumption', 4000, 'sanity_change', 5000, 'service_comfort', 70000, 'comfort_increase', 5000, 'capacity', 12, 'sanity_increase', 5000, }) PlaceObj('BuildingTemplate', { 'name', "SmartHome_Small", 'template_class', "SmartHome", 'construction_cost_Concrete', 5000, 'construction_cost_Electronics', 3000, 'build_points', 3000, 'dome_required', true, 'show_decals_on_placement', true, 'upgrade1_id', "SmartHome_HomeCollective", 'upgrade1_display_name', T{5005, --[[BuildingTemplate SmartHome_Small upgrade1_display_name]] "Home Collective"}, 'upgrade1_description', T{5006, --[[BuildingTemplate SmartHome_Small upgrade1_description]] "+<upgrade1_add_value_1> Service Comfort."}, 'upgrade1_icon', "UI/Icons/Upgrades/home_collective_01.tga", 'upgrade1_upgrade_cost_Polymers', 2000, 'upgrade1_mod_label_1', "SmartHome_Small", 'upgrade1_mod_prop_id_1', "service_comfort", 'upgrade1_add_value_1', 10, 'maintenance_resource_type', "Electronics", 'maintenance_resource_amount', 500, 'display_name', T{3533, --[[BuildingTemplate SmartHome_Small display_name]] "Smart Home"}, 'display_name_pl', T{5270, --[[BuildingTemplate SmartHome_Small display_name_pl]] "Smart Homes"}, 'description', T{5271, --[[BuildingTemplate SmartHome_Small description]] "Provides a very comfortable living space for Colonists. Residents will recover additional Sanity when resting."}, 'build_category', "Habitats", 'display_icon', "UI/Icons/Buildings/smart_home.tga", 'build_pos', 3, 'entity', "SmartHomeSmall_02", 'encyclopedia_image', "UI/Encyclopedia/SmartHome.tga", 'entity2', "SmartHomeSmall", 'entity3', "SmartHomeSmallDDE_02", 'entitydlc3', "dde", 'entity4', "SmartHomeSmallDDE", 'entitydlc4', "dde", 'label1', "InsideBuildings", 'demolish_sinking', range(10, 20), 'demolish_debris', 80, 'freeze_heat', 91, 'electricity_consumption', 2000, 'sanity_change', 5000, 'service_comfort', 70000, 'comfort_increase', 5000, 'capacity', 4, 'sanity_increase', 5000, }) PlaceObj('BuildingTemplate', { 'name', "SolarPanel", 'template_class', "SolarPanel", 'pin_rollover_context', "electricity", 'construction_cost_Metals', 1000, 'build_points', 500, 'show_range_class', "ArtificialSun", 'maintenance_resource_type', "Metals", 'maintenance_resource_amount', 500, 'display_name', T{5274, --[[BuildingTemplate SolarPanel display_name]] "Solar Panel"}, 'display_name_pl', T{5275, --[[BuildingTemplate SolarPanel display_name_pl]] "Solar Panels"}, 'description', T{5276, --[[BuildingTemplate SolarPanel description]] "Generates Power during daytime. Its effectiveness is decreased by dust accumulation and during Dust storms. Protected from dust while turned off."}, 'build_category', "Power", 'display_icon', "UI/Icons/Buildings/solar_panel.tga", 'entity', "SolarPanel", 'encyclopedia_image', "UI/Encyclopedia/SolarPanel.tga", 'build_shortcut1', "N", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "Outside_01", 'demolish_sinking', range(5, 15), 'electricity_production', 2000, }) PlaceObj('BuildingTemplate', { 'name', "SpaceElevator", 'template_class', "SpaceElevator", 'pin_on_start', true, 'construction_cost_Concrete', 400000, 'construction_cost_Metals', 200000, 'construction_cost_Polymers', 150000, 'construction_cost_MachineParts', 150000, 'build_points', 120000, 'dome_forbidden', true, 'wonder', true, 'achievement', "BuiltSpaceElevator", 'use_demolished_state', true, 'maintenance_resource_type', "MachineParts", 'maintenance_resource_amount', 3000, 'display_name', T{1120, --[[BuildingTemplate SpaceElevator display_name]] "Space Elevator"}, 'display_name_pl', T{5277, --[[BuildingTemplate SpaceElevator display_name_pl]] "Space Elevators"}, 'description', T{5278, --[[BuildingTemplate SpaceElevator description]] "A faster way to reach space, the Elevator speeds up cargo shipments to orbit. Exports Rare Metals to Earth and offers resupply materials and prefabs at a discount."}, 'build_category', "Wonders", 'display_icon', "UI/Icons/Buildings/space_elevator.tga", 'entity', "SpaceElevator", 'encyclopedia_image', "UI/Encyclopedia/SpaceElevator.tga", 'label1', "OutsideBuildings", 'palettes', "SpaceElevator", 'max_storage_per_resource', 100000000, 'storable_resources', { "Concrete", "Metals", "Polymers", "Food", "Electronics", "MachineParts", }, 'electricity_consumption', 40000, 'cargo_capacity', 80000, }) PlaceObj('BuildingTemplate', { 'name', "Spacebar", 'template_class', "Spacebar", 'construction_cost_Concrete', 15000, 'construction_cost_Metals', 5000, 'build_points', 5000, 'dome_required', true, 'upgrade1_id', "Spacebar_ServiceBots", 'upgrade1_display_name', T{5020, --[[BuildingTemplate Spacebar upgrade1_display_name]] "Service Bots"}, 'upgrade1_description', T{5279, --[[BuildingTemplate Spacebar upgrade1_description]] "This building no longer requires Workers and operates at <upgrade1_add_value_2> Performance."}, 'upgrade1_icon', "UI/Icons/Upgrades/service_bots_01.tga", 'upgrade1_upgrade_cost_Electronics', 10000, 'upgrade1_mod_prop_id_1', "automation", 'upgrade1_add_value_1', 1, 'upgrade1_mod_prop_id_2', "auto_performance", 'upgrade1_add_value_2', 100, 'upgrade1_mod_prop_id_3', "max_workers", 'upgrade1_mul_value_3', -100, 'maintenance_resource_type', "Concrete", 'display_name', T{5280, --[[BuildingTemplate Spacebar display_name]] "Spacebar"}, 'display_name_pl', T{5281, --[[BuildingTemplate Spacebar display_name_pl]] "Spacebars"}, 'description', T{5282, --[[BuildingTemplate Spacebar description]] "Provides space for R&R and fancy cocktails."}, 'build_category', "Dome Services", 'display_icon', "UI/Icons/Buildings/spacebar.tga", 'entity', "Spacebar", 'encyclopedia_image', "UI/Encyclopedia/Spacebar.tga", 'label1', "InsideBuildings", 'palettes', "SpaceBar", 'demolish_sinking', range(0, 0), 'demolish_debris', 80, 'electricity_consumption', 2000, 'service_comfort', 60000, 'comfort_increase', 15000, 'interest1', "interestRelaxation", 'interest2', "interestDrinking", 'interest3', "interestSocial", 'max_visitors', 10, 'enabled_shift_3', false, 'max_workers', 2, }) PlaceObj('BuildingTemplate', { 'name', "Statue", 'template_class', "Service", 'construction_cost_Concrete', 1000, 'build_points', 500, 'dome_required', true, 'use_demolished_state', false, 'display_name', T{5283, --[[BuildingTemplate Statue display_name]] "Statue"}, 'display_name_pl', T{5284, --[[BuildingTemplate Statue display_name_pl]] "Statues"}, 'description', T{5285, --[[BuildingTemplate Statue description]] "\"In honor of the Founders of Mars.\""}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/statue.tga", 'build_pos', 11, 'entity', "GardenStatue_01", 'encyclopedia_image', "UI/Encyclopedia/Statue.tga", 'entity2', "GardenStatue_02", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 1, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "StirlingGenerator", 'template_class', "StirlingGenerator", 'pin_rollover_context', "electricity", 'construction_cost_Polymers', 12000, 'construction_cost_Electronics', 6000, 'build_points', 1000, 'require_prefab', true, 'upgrade1_id', "StirlingGenerator_PlutoniumCore", 'upgrade1_display_name', T{5286, --[[BuildingTemplate StirlingGenerator upgrade1_display_name]] "Plutonium Core"}, 'upgrade1_description', T{5287, --[[BuildingTemplate StirlingGenerator upgrade1_description]] "+<upgrade1_mul_value_1>% additional power production when open."}, 'upgrade1_icon', "UI/Icons/Upgrades/plutonium_core_01.tga", 'upgrade1_upgrade_cost_Polymers', 4000, 'upgrade1_mod_label_1', "StirlingGenerator", 'upgrade1_mod_prop_id_1', "production_factor_interacted", 'upgrade1_mul_value_1', 50, 'maintenance_resource_type', "Polymers", 'display_name', T{3521, --[[BuildingTemplate StirlingGenerator display_name]] "Stirling Generator"}, 'display_name_pl', T{5288, --[[BuildingTemplate StirlingGenerator display_name_pl]] "Stirling Generators"}, 'description', T{5289, --[[BuildingTemplate StirlingGenerator description]] "Generates Power. While closed the generator is protected from dust, but produces less power."}, 'build_category', "Power", 'display_icon', "UI/Icons/Buildings/stirling_generator.tga", 'build_pos', 4, 'entity', "StirlingGenerator", 'encyclopedia_image', "UI/Encyclopedia/StirlingGenerator.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "StirlingGenerator", 'demolish_sinking', range(5, 10), 'demolish_debris', 80, 'electricity_production', 10000, 'production_factor_interacted', 200, }) PlaceObj('BuildingTemplate', { 'name', "GardenStone", 'template_class', "Service", 'construction_cost_Concrete', 4000, 'build_points', 1000, 'dome_required', true, 'use_demolished_state', false, 'display_name', T{5290, --[[BuildingTemplate GardenStone display_name]] "Stone Garden"}, 'display_name_pl', T{5291, --[[BuildingTemplate GardenStone display_name_pl]] "Stone Gardens"}, 'description', T{5292, --[[BuildingTemplate GardenStone description]] "A tastefully arranged stone garden, following strict Zen rules."}, 'build_category', "Decorations", 'display_icon', "UI/Icons/Buildings/stone_garden.tga", 'build_pos', 7, 'entity', "GardenStone", 'encyclopedia_image', "UI/Encyclopedia/StoneGarden.tga", 'label1', "Decorations", 'on_off_button', false, 'prio_button', false, 'comfort_increase', 5000, 'interest1', "interestRelaxation", 'interest2', "interestExercise", 'interest3', "interestPlaying", 'max_visitors', 3, 'usable_by_children', true, }) PlaceObj('BuildingTemplate', { 'name', "SubsurfaceHeater", 'template_class', "SubsurfaceHeater", 'construction_cost_Metals', 15000, 'construction_cost_MachineParts', 5000, 'build_points', 2000, 'is_tall', true, 'dome_forbidden', true, 'maintenance_resource_type', "Metals", 'maintenance_resource_amount', 2000, 'display_name', T{5293, --[[BuildingTemplate SubsurfaceHeater display_name]] "Subsurface Heater"}, 'display_name_pl', T{5294, --[[BuildingTemplate SubsurfaceHeater display_name_pl]] "Subsurface Heaters"}, 'description', T{5295, --[[BuildingTemplate SubsurfaceHeater description]] "Increases the local temperature in cold areas and protects nearby buildings from Cold Waves."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/subsurface_heater.tga", 'build_pos', 9, 'entity', "SubsurfaceHeater", 'show_range_all', true, 'encyclopedia_image', "UI/Encyclopedia/SubsurfaceHeater.tga", 'label1', "OutsideBuildings", 'palettes', "SubSurfaceHeater", 'demolish_sinking', range(10, 15), 'electricity_consumption', 1600, 'water_consumption', 1000, 'air_consumption', 0, }) PlaceObj('BuildingTemplate', { 'name', "TheExcavator", 'template_class', "TheExcavator", 'construction_cost_Concrete', 100000, 'construction_cost_Metals', 300000, 'construction_cost_MachineParts', 200000, 'build_points', 120000, 'dome_forbidden', true, 'wonder', true, 'force_extend_bb_during_placement_checks', 12000, 'achievement', "BuiltExcavator", 'maintenance_resource_type', "MachineParts", 'maintenance_resource_amount', 3000, 'display_name', T{5296, --[[BuildingTemplate TheExcavator display_name]] "The Excavator"}, 'display_name_pl', T{5297, --[[BuildingTemplate TheExcavator display_name_pl]] "The Excavators"}, 'description', T{5298, --[[BuildingTemplate TheExcavator description]] "Using advanced extraction technology, allows for production of Concrete directly from the Martian soil without the requirement for a deposit."}, 'build_category', "Wonders", 'display_icon', "UI/Icons/Buildings/the_excavator.tga", 'build_pos', 2, 'entity', "Excavator", 'encyclopedia_image', "UI/Encyclopedia/TheExcavator.tga", 'label1', "OutsideBuildings", 'palettes', "MoholeMine", 'demolish_sinking', range(1, 5), 'demolish_debris', 30, 'electricity_consumption', 30000, 'resource_produced1', "Concrete", 'max_storage1', 50000, 'production_per_day1', 50000, 'resource_produced2', "WasteRock", 'max_storage2', 50000, 'stockpile_class2', "WasteRockStockpile", }) PlaceObj('BuildingTemplate', { 'name', "TriboelectricScrubber", 'template_class', "TriboelectricScrubber", 'construction_cost_Metals', 15000, 'construction_cost_Electronics', 5000, 'build_points', 2000, 'is_tall', true, 'dome_forbidden', true, 'maintenance_resource_type', "Electronics", 'maintenance_threshold_base', 50000, 'display_name', T{4818, --[[BuildingTemplate TriboelectricScrubber display_name]] "Triboelectric Scrubber"}, 'display_name_pl', T{5299, --[[BuildingTemplate TriboelectricScrubber display_name_pl]] "Triboelectric Scrubbers"}, 'description', T{5300, --[[BuildingTemplate TriboelectricScrubber description]] "Emits pulses which reduce the Dust accumulated on buildings in its range."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/triboelectric_schrubbe.tga", 'build_pos', 8, 'entity', "TriboelectricScrubber", 'show_range_all', true, 'encyclopedia_image', "UI/Encyclopedia/TriboelectricScrubber.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "Outside_01", 'demolish_sinking', range(5, 10), 'electricity_consumption', 1800, 'dust_clean', 8000, }) PlaceObj('BuildingTemplate', { 'name', "Tunnel", 'template_class', "Tunnel", 'construction_cost_Concrete', 80000, 'construction_cost_Metals', 20000, 'construction_cost_MachineParts', 30000, 'build_points', 50000, 'is_tall', true, 'dome_forbidden', true, 'display_name', T{889, --[[BuildingTemplate Tunnel display_name]] "Tunnel"}, 'display_name_pl', T{5301, --[[BuildingTemplate Tunnel display_name_pl]] "Tunnels"}, 'description', T{5302, --[[BuildingTemplate Tunnel description]] "The tunnel entrance and exit can connect power and life support grids at different locations and different elevations. Rovers can travel along the tunnels to reach places they otherwise couldn't."}, 'build_category', "Infrastructure", 'display_icon', "UI/Icons/Buildings/tunnel.tga", 'build_pos', 11, 'entity', "TunnelEntrance", 'encyclopedia_image', "UI/Encyclopedia/Tunnel.tga", 'on_off_button', false, 'prio_button', false, 'palettes', "Tunnel", 'demolish_sinking', range(5, 10), 'construction_mode', "tunnel_construction", }) PlaceObj('BuildingTemplate', { 'name', "UniversalStorageDepot", 'template_class', "UniversalStorageDepot", 'instant_build', true, 'dome_forbidden', true, 'display_name', T{5303, --[[BuildingTemplate UniversalStorageDepot display_name]] "Universal Depot"}, 'display_name_pl', T{5304, --[[BuildingTemplate UniversalStorageDepot display_name_pl]] "Universal Storages"}, 'description', T{5305, --[[BuildingTemplate UniversalStorageDepot description]] "Stores <resource(max_storage_per_resource)> units of each transportable resource. Excess resources will be delivered automatically to other depots within Drone range."}, 'build_category', "Storages", 'display_icon', "UI/Icons/Buildings/universal_storage.tga", 'entity', "StorageDepot", 'encyclopedia_image', "UI/Encyclopedia/UniversalDepot.tga", 'build_shortcut1', "U", 'on_off_button', false, 'prio_button', false, 'switch_fill_order', false, 'fill_group_idx', 9, }) PlaceObj('BuildingTemplate', { 'name', "WaterExtractor", 'template_class', "WaterExtractor", 'resource_produced1', "WasteRock", 'stockpile_class1', "WasteRockStockpile", 'pin_rollover_context', "water", 'construction_cost_Concrete', 6000, 'construction_cost_MachineParts', 2000, 'build_points', 3000, 'is_tall', true, 'dome_forbidden', true, 'upgrade1_id', "WaterExtractor_FueledExtractor", 'upgrade1_display_name', T{5026, --[[BuildingTemplate WaterExtractor upgrade1_display_name]] "Fueled Extractor"}, 'upgrade1_description', T{5027, --[[BuildingTemplate WaterExtractor upgrade1_description]] "+<upgrade1_mul_value_1>% Production as long as the building is supplied with Fuel. If not supplied with Fuel, the building will continue to operate but will lose the bonus."}, 'upgrade1_icon', "UI/Icons/Upgrades/fueled_extractor_01.tga", 'upgrade1_upgrade_cost_MachineParts', 5000, 'upgrade1_mod_label_1', "WaterExtractor", 'upgrade1_mod_prop_id_1', "water_production", 'upgrade1_mul_value_1', 30, 'upgrade1_consumption_resource_type', "Fuel", 'upgrade1_consumption_amount', 200, 'upgrade1_consumption_resource_stockpile_spot_name', "", 'upgrade2_id', "WaterExtractor_Amplify", 'upgrade2_display_name', T{5028, --[[BuildingTemplate WaterExtractor upgrade2_display_name]] "Amplify"}, 'upgrade2_description', T{8043, --[[BuildingTemplate WaterExtractor upgrade2_description]] "+<upgrade2_mul_value_1>% Production; +<power(upgrade2_add_value_2)> Consumption."}, 'upgrade2_icon', "UI/Icons/Upgrades/amplify_01.tga", 'upgrade2_upgrade_cost_Polymers', 2000, 'upgrade2_mod_label_1', "WaterExtractor", 'upgrade2_mod_prop_id_1', "water_production", 'upgrade2_mul_value_1', 25, 'upgrade2_mod_label_2', "WaterExtractor", 'upgrade2_mod_prop_id_2', "electricity_consumption", 'upgrade2_add_value_2', 10000, 'upgrade3_id', "WaterExtractor_MagneticExtraction", 'upgrade3_display_name', T{5030, --[[BuildingTemplate WaterExtractor upgrade3_display_name]] "Magnetic Extraction"}, 'upgrade3_description', T{5222, --[[BuildingTemplate WaterExtractor upgrade3_description]] "+<upgrade3_mul_value_1>% Production."}, 'upgrade3_icon', "UI/Icons/Upgrades/magnetic_extraction_01.tga", 'upgrade3_upgrade_cost_Electronics', 5000, 'upgrade3_upgrade_cost_MachineParts', 5000, 'upgrade3_mod_label_1', "WaterExtractor", 'upgrade3_mod_prop_id_1', "water_production", 'upgrade3_mul_value_1', 50, 'maintenance_resource_type', "MachineParts", 'maintenance_threshold_base', 150000, 'display_name', T{3529, --[[BuildingTemplate WaterExtractor display_name]] "Water Extractor"}, 'display_name_pl', T{5306, --[[BuildingTemplate WaterExtractor display_name_pl]] "Water Extractors"}, 'description', T{5307, --[[BuildingTemplate WaterExtractor description]] "Extracts Water from underground deposits. All extractors contaminate nearby buildings with dust."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/water_extractor.tga", 'build_pos', 3, 'entity', "WaterExtractor", 'encyclopedia_image', "UI/Encyclopedia/WaterExtractor.tga", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "WaterExtractor", 'demolish_sinking', range(0, 0), 'demolish_tilt_angle', range(0, 0), 'electricity_consumption', 5000, 'water_production', 5000, 'exploitation_resource', "Water", }) PlaceObj('BuildingTemplate', { 'name', "WaterReclamationSystem", 'template_class', "WaterReclamationSpire", 'construction_cost_Concrete', 50000, 'construction_cost_Polymers', 10000, 'construction_cost_MachineParts', 5000, 'build_points', 30000, 'require_prefab', true, 'is_tall', true, 'dome_required', true, 'dome_spot', "Spire", 'achievement', "FirstDomeSpire", 'maintenance_resource_type', "MachineParts", 'maintenance_resource_amount', 3000, 'display_name', T{3536, --[[BuildingTemplate WaterReclamationSystem display_name]] "Water Reclamation System"}, 'display_name_pl', T{5308, --[[BuildingTemplate WaterReclamationSystem display_name_pl]] "Water Reclamation Systems"}, 'description', T{5309, --[[BuildingTemplate WaterReclamationSystem description]] "Recycles up to 70% of the Water used in the Dome."}, 'build_category', "Dome Spires", 'display_icon', "UI/Icons/Buildings/water_reclamation.tga", 'build_pos', 3, 'entity', "WaterReclamation", 'encyclopedia_image', "UI/Encyclopedia/WaterReclamationSystem.tga", 'label1', "InsideBuildings", 'palettes', "WaterReclamation", 'demolish_sinking', range(0, 0), 'demolish_tilt_angle', range(0, 0), 'max_workers', 2, }) PlaceObj('BuildingTemplate', { 'name', "WaterTank", 'template_class', "WaterTank", 'pin_rollover_context', "water", 'pin_progress_value', "current_storage", 'pin_progress_max', "storage_capacity", 'construction_cost_Metals', 3000, 'build_points', 2000, 'is_tall', true, 'dome_forbidden', true, 'maintenance_resource_type', "Metals", 'display_name', T{5310, --[[BuildingTemplate WaterTank display_name]] "Water Tower"}, 'display_name_pl', T{5311, --[[BuildingTemplate WaterTank display_name_pl]] "Water Towers"}, 'description', T{5312, --[[BuildingTemplate WaterTank description]] "Stores Water. Doesn't work during Cold Waves."}, 'build_category', "Life-Support", 'display_icon', "UI/Icons/Buildings/water_tank.tga", 'build_pos', 5, 'entity', "WaterTank", 'encyclopedia_image', "UI/Encyclopedia/WaterTank.tga", 'entity2', "WaterTankChrome", 'entitydlc2', "dde", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "WaterTank", 'demolish_sinking', range(1, 5), 'demolish_tilt_angle', range(60, 300), 'demolish_debris', 76, 'max_water_charge', 10000, 'max_water_discharge', 10000, 'water_capacity', 100000, 'freeze_time', 999, 'defrost_time', 999, }) PlaceObj('BuildingTemplate', { 'name', "WindTurbine", 'template_class', "WindTurbine", 'pin_rollover_context', "electricity", 'construction_cost_Concrete', 4000, 'construction_cost_MachineParts', 1000, 'build_points', 1500, 'is_tall', true, 'dome_forbidden', true, 'upgrade1_id', "WindTurbine_PolymerBlades", 'upgrade1_display_name', T{5313, --[[BuildingTemplate WindTurbine upgrade1_display_name]] "Polymer Blades"}, 'upgrade1_description', T{5314, --[[BuildingTemplate WindTurbine upgrade1_description]] "+<upgrade1_mul_value_1>% Production."}, 'upgrade1_icon', "UI/Icons/Upgrades/polymer_blades_01.tga", 'upgrade1_upgrade_cost_Polymers', 2000, 'upgrade1_mod_label_1', "WindTurbine", 'upgrade1_mod_prop_id_1', "electricity_production", 'upgrade1_mul_value_1', 33, 'maintenance_resource_type', "MachineParts", 'maintenance_resource_amount', 500, 'display_name', T{5315, --[[BuildingTemplate WindTurbine display_name]] "Wind Turbine"}, 'display_name_pl', T{5316, --[[BuildingTemplate WindTurbine display_name_pl]] "Wind Turbines"}, 'description', T{5317, --[[BuildingTemplate WindTurbine description]] "Generates Power. Increased production during Dust Storms and at high elevations."}, 'build_category', "Power", 'display_icon', "UI/Icons/Buildings/wind_turbine.tga", 'build_pos', 3, 'entity', "WindTurbine", 'encyclopedia_text', T{5318, --[[BuildingTemplate WindTurbine encyclopedia_text]] "Wind turbines generate electrical power from the Martian winds. The amount generated depends on how powerful the winds they are exposed to are, so proper positioning is essential as higher ground tends to be windier.\n\n<center><image UI/Common/rollover_line.tga 2000> <left>\n\nWhile wind speeds on Mars are generally mild, they can reach incredible speeds during dust storms. Still, the thin Martian atmosphere dictates that the average wind turbine would need winds around six times more powerful than those on Earth to create the same amount of thrust.\n \nThis technological challenge to take advantage of what little wind there is on Mars was solved by opting for vertical axis wind turbines, which are capable of catching the wind from all directions, instead of simply horizontal. The materials used are light enough to self-start on much weaker forces than those most commonly used on Earth."}, 'encyclopedia_image', "UI/Encyclopedia/WindTurbine.tga", 'entity2', "WindTurbineChrome", 'entitydlc2', "dde", 'label1', "OutsideBuildings", 'label2', "OutsideBuildingsTargets", 'palettes', "WindTurbine", 'demolish_sinking', range(0, 0), 'demolish_debris', 85, 'electricity_production', 5000, 'bonus_per_kilometer_elevation', 300, 'min_production_to_work', 0, })
local choices, choice_actors, choice_positions, choice_widths = {}, {}, {}, {} local TopScreen = nil -- give this a value now, before the TopScreen has been prepared and we can fetch its name -- we'll reassign it appropriately below, once the TopScreen is available local ScreenName = "ScreenSelectPlayMode" local cursor = { h = 30, index = 0, } -- the width of the choice_actors multiplied by 0.386 gives us aproximately the width of the text icons -- we add 30 to have a pretty margin around it local iconWidthScale = 0.386 local cursorMargin = 30 local Update = function(af, delta) local index = TopScreen:GetSelectionIndex( GAMESTATE:GetMasterPlayerNumber() ) if index ~= cursor.index then cursor.index = index -- queue the appropriate command to the faux playfield, if needed if ScreenName=="ScreenSelectPlayMode2" then if choices[cursor.index+1] == "Marathon" then af:queuecommand("FirstLoopMarathon") else af:queuecommand("FirstLoopRegular") end end -- queue an "Update" to the AF containing the cursor, description text, score, and lifemeter actors -- since they are children of that AF, they will also listen for that command af:queuecommand("Update") end end local t = Def.ActorFrame{ InitCommand=function(self) self:SetUpdateFunction( Update ) -- changing the position of this actorframe moves everything on this screen except for the -- option icons. The position for those is in metrics.ini :xy(_screen.cx, _screen.cy - 14) end, OnCommand=function(self) -- Get the Topscreen and its name, now that that TopScreen itself actually exists TopScreen = SCREENMAN:GetTopScreen() ScreenName = TopScreen:GetName() -- now that we have the TopScreen's name, get the single string containing this -- screen's choices from Metrics.ini, and split it on commas; store those choices -- in the choices table, and do similarly with actors associated with those choices for choice in THEME:GetMetric(ScreenName, "ChoiceNames"):gmatch('([^,]+)') do choices[#choices+1] = choice choice_actors[#choice_actors+1] = TopScreen:GetChild("IconChoice"..choice) choice_positions[#choice_positions+1] = THEME:GetMetric(ScreenName, "IconChoice"..choice.."X") - _screen.w/2 choice_widths[#choice_widths+1] = choice_actors[#choice_actors]:GetWidth() end self:queuecommand("Update") end, OffCommand=function(self) if ScreenName=="ScreenSelectPlayMode" or ScreenName=="ScreenSelectPlayModeThonk" then -- set the GameMode now; we'll use it throughout the theme -- to set certain Gameplay settings and determine which screen comes next SL.Global.GameMode = choices[cursor.index+1] -- now that a GameMode has been selected, set related preferences SetGameModePreferences() -- and reload the theme's Metrics THEME:ReloadMetrics() end end, PlayerJoinedMessageCommand=function(self, params) UnjoinLateJoinedPlayer(params.Player) end, -- lower mask Def.Quad{ InitCommand=function(self) self:zoomto(338, 338):diffuse(1,1,1,1):xy(74,229):MaskSource() end }, -- gray backgrounds Def.ActorFrame{ InitCommand=function(self) self:y(75) end, -- ScreenSelectPlayMode Def.Quad{ OnCommand=function(self) self:x(choice_positions[1]):zoomtowidth(choice_widths[1] * iconWidthScale + cursorMargin) if ScreenName ~= "ScreenSelectPlayMode" then self:visible(false) end end, InitCommand=function(self) self:diffuse(0.2,0.2,0.2,1):zoomtoheight(cursor.h) end, OffCommand=function(self) self:sleep(0.4):linear(0.1):diffusealpha(0) end }, Def.Quad{ OnCommand=function(self) self:x(choice_positions[2]):zoomtowidth(choice_widths[2] * iconWidthScale + cursorMargin) if ScreenName ~= "ScreenSelectPlayMode" then self:visible(false) end end, InitCommand=function(self) self:diffuse(0.2,0.2,0.2,1):zoomtoheight(cursor.h) end, OffCommand=function(self) self:sleep(0.3):linear(0.1):diffusealpha(0) end }, Def.Quad{ OnCommand=function(self) if #choice_positions > 2 then self:x(choice_positions[3]):zoomtowidth(choice_widths[3] * iconWidthScale + cursorMargin) end if ScreenName ~= "ScreenSelectPlayMode" then self:visible(false) end end, InitCommand=function(self) self:diffuse(0.2,0.2,0.2,1):zoomtoheight(cursor.h) end, OffCommand=function(self) self:sleep(0.3):linear(0.1):diffusealpha(0) end }, -- ScreenSelectPlayMode2 Def.Quad{ OnCommand=function(self) self:x(choice_positions[1]):zoomtowidth(choice_widths[1] * iconWidthScale + cursorMargin) if ScreenName ~= "ScreenSelectPlayMode2" then self:visible(false) end end, InitCommand=function(self) self:diffuse(0.2,0.2,0.2,1):zoomtoheight(cursor.h) end, OffCommand=function(self) self:sleep(0.3):linear(0.1):diffusealpha(0) end }, Def.Quad{ OnCommand=function(self) self:x(choice_positions[2]):zoomtowidth(choice_widths[2] * iconWidthScale + cursorMargin) if ScreenName ~= "ScreenSelectPlayMode2" then self:visible(false) end end, InitCommand=function(self) self:diffuse(0.2,0.2,0.2,1):zoomtoheight(cursor.h) end, OffCommand=function(self) self:sleep(0.4):linear(0.1):diffusealpha(0) end }, }, -- border Def.Quad{ InitCommand=function(self) self:zoomto(227, 122):diffuse(1,1,1,1) end, OffCommand=function(self) self:sleep(0.6):linear(0.2):cropleft(1) end }, -- background Def.Quad{ InitCommand=function(self) self:zoomto(225, 120):diffuse(0,0,0,1) end, OffCommand=function(self) self:sleep(0.6):linear(0.2):cropleft(1) end }, -- description Def.BitmapText{ Font="Common Normal", InitCommand=function(self) self:zoom(0.5):halign(0):valign(0):xy(-95,-40) end, UpdateCommand=function(self) self:settext( THEME:GetString("ScreenSelectPlayMode", choices[cursor.index+1] .. "Description") ) end, OffCommand=function(self) self:sleep(0.4):linear(0.2):diffusealpha(0) end }, -- cursor to highlight the current choice Def.ActorFrame{ Name="Cursor", OnCommand=function(self) -- it is possible for players to have different default choices -- for ScreenSelectPlayMode (see: Simply Love Options in the Operator Menu) -- account for that here, in the OnCommand of the cursor ActorFrame, by updating cursor.index -- to match the value of ThemePrefs.Get("DefaultGameMode") in the choices table if ScreenName == "ScreenSelectPlayMode" then cursor.index = (FindInTable(ThemePrefs.Get("DefaultGameMode"), choices) or 1) - 1 end self:x( choice_positions[cursor.index+1] ):y(75) end, UpdateCommand=function(self) cursor.w = choice_widths[cursor.index+1] * iconWidthScale + cursorMargin self:stoptweening():linear(0.1) :x( choice_positions[cursor.index+1] ) end, Def.Quad{ InitCommand=function(self) self:zoomtoheight(cursor.h):diffuse(1,1,1,1):y(1) end, UpdateCommand=function(self) self:zoomtowidth( cursor.w +2 ) end, -- The quad above is disappearing at 227 / 0.2 = 1135 px per second. -- Make the cursors disappear with the same velocity, so that the movement is synchronized. OffCommand=function(self) -- If at the 2nd choice, wait for the vanishing line to travel the length -- of the first choice before starting the animation. local sleepOffset = cursor.index == 0 and 0 or (choice_widths[1] * iconWidthScale + cursorMargin) / 1135 self:sleep(0.6 + sleepOffset) self:linear((cursor.w + 2) / 1135) self:cropleft(1) end }, Def.Quad{ InitCommand=function(self) self:zoomtoheight(cursor.h):diffuse(0,0,0,1) end, UpdateCommand=function(self) self:zoomtowidth( cursor.w ) end, OffCommand=function(self) local sleepOffset = cursor.index == 0 and 0 or (choice_widths[1] * iconWidthScale + cursorMargin) / 1135 self:sleep(0.6 + sleepOffset) self:linear(cursor.w / 1135) self:cropleft(1) end } }, -- Score Def.BitmapText{ Font="Wendy/_wendy monospace numbers", InitCommand=function(self) self:zoom(0.17):xy(93,-51):diffusealpha(0) end, OffCommand=function(self) self:sleep(0.4):linear(0.2):diffusealpha(0) end, UpdateCommand=function(self) if ScreenName == "ScreenSelectPlayMode" then if choices[cursor.index+1] == "FA+" then self:settext("99.50") elseif choices[cursor.index+1] == "ECFA" then self:settext("69.69") else self:settext("77.41") end self:stoptweening():linear(0.25):diffusealpha(1) else self:diffusealpha(1) if SL.Global.GameMode == "FA+" then self:settext("99.50") elseif SL.Global.GameMode == "ECFA" then self:settext("69.69") else self:settext("77.41") end end end, }, -- LifeMeter Def.ActorFrame{ Name="LifeMeter", InitCommand=function(self) self:diffusealpha(0):xy(51,-48):zoom(0.75) end, OffCommand=function(self) self:sleep(0.4):linear(0.2):diffusealpha(0) end, UpdateCommand=function(self) if ScreenName == "ScreenSelectPlayMode" then if choices[cursor.index+1] == "ITG" or choices[cursor.index+1] == "ECFA" or choices[cursor.index+1] == "FA+" then self:stoptweening():linear(0.25):diffusealpha(1) else self:stoptweening():linear(0.25):diffusealpha(0) end else self:diffusealpha(1) end end, -- lifemeter white border Def.Quad{ InitCommand=function(self) self:zoomto(60,16) end }, -- lifemeter black bg Def.Quad{ InitCommand=function(self) self:zoomto(58,14):diffuse(0,0,0,1) end }, -- lifemeter colored quad Def.Quad{ InitCommand=function(self) self:zoomto(40,14):x(-9):diffuse( GetCurrentColor(true) ) end }, -- life meter animated swoosh LoadActor(THEME:GetPathB("ScreenGameplay", "underlay/PerPlayer/LifeMeter/swoosh.png"))..{ InitCommand=function(self) self:zoomto(40,14):diffusealpha(0.45):x(-9) end, OnCommand=function(self) self:customtexturerect(0,0,1,1):texcoordvelocity(-2,0) end, }, }, } t[#t+1] = Def.ActorFrame{ InitCommand=function(self) self:zoom(0.75) end, LoadActor("./GameplayDemo.lua"), } return t
item_flask_arena = {} if IsServer() then function item_flask_arena:OnSpellStart() local target = self:GetCursorTarget() local duration = self:GetSpecialValueFor("buff_duration") target:EmitSound("DOTA_Item.HealingSalve.Activate") target:AddNewModifier(self:GetCaster(), self, "modifier_item_flask_arena_healing", { duration = duration }) self:SpendCharge() end end LinkLuaModifier("modifier_item_flask_arena_healing", "items/item_flask_arena.lua", LUA_MODIFIER_MOTION_NONE) modifier_item_flask_arena_healing = { GetTexture = function() return "item_flask" end, GetEffectName = function() return "particles/items_fx/healing_flask.vpcf" end, } function modifier_item_flask_arena_healing:OnCreated() self.health_regen = self:GetAbility():GetSpecialValueFor("health_regen") end function modifier_item_flask_arena_healing:DeclareFunctions() return { MODIFIER_PROPERTY_HEALTH_REGEN_CONSTANT, MODIFIER_EVENT_ON_TAKEDAMAGE, } end function modifier_item_flask_arena_healing:GetModifierConstantHealthRegen() return self.health_regen end if IsServer() then function modifier_item_flask_arena_healing:OnTakeDamage(keys) local unit = self:GetParent() if unit ~= keys.unit then return end if unit:GetTeamNumber() == keys.attacker:GetTeamNumber() then return end if unit:IsHero() or unit:IsTower() or unit.SpawnerType == "jungle" then self:Destroy() end end end
-- Global to all starfalls local checkluatype = SF.CheckLuaType -- Register privileges SF.Permissions.registerPrivilege("trace", "Trace", "Allows the user to start traces") SF.Permissions.registerPrivilege("trace.decal", "Decal Trace", "Allows the user to apply decals with traces") local plyDecalBurst = SF.BurstObject("decals", "decals", 50, 50, "Rate decals can be created per second.", "Number of decals that can be created in a short time.") local function checkvector(pos) if pos[1] ~= pos[1] or pos[1] == math.huge or pos[1] == -math.huge then SF.Throw("Inf or nan vector in trace position", 3) end if pos[2] ~= pos[2] or pos[2] == math.huge or pos[2] == -math.huge then SF.Throw("Inf or nan vector in trace position", 3) end if pos[3] ~= pos[3] or pos[3] == math.huge or pos[3] == -math.huge then SF.Throw("Inf or nan vector in trace position", 3) end end --- Provides functions for doing line/AABB traces -- @name trace -- @class library -- @libtbl trace_library SF.RegisterLibrary("trace") return function(instance) local checkpermission = instance.player ~= SF.Superuser and SF.Permissions.check or function() end local trace_library = instance.Libraries.trace local owrap, ounwrap = instance.WrapObject, instance.UnwrapObject local ent_meta, ewrap, eunwrap = instance.Types.Entity, instance.Types.Entity.Wrap, instance.Types.Entity.Unwrap local ang_meta, awrap, aunwrap = instance.Types.Angle, instance.Types.Angle.Wrap, instance.Types.Angle.Unwrap local vec_meta, vwrap, vunwrap = instance.Types.Vector, instance.Types.Vector.Wrap, instance.Types.Vector.Unwrap local function convertFilter(filter) if filter == nil then return nil elseif istable(filter) then if ent_meta.sf2sensitive[filter]==nil then local l = {} for i, v in ipairs(filter) do l[i] = eunwrap(v) end return l else return eunwrap(filter) end elseif isfunction(filter) then return function(ent) local ret = instance:runFunction(filter, owrap(ent)) if ret[1] then return ret[2] end end else SF.ThrowTypeError("table or function", SF.GetType(filter), 3) end end --- Does a line trace -- @param start Start position -- @param endpos End position -- @param filter Entity/array of entities to filter, or a function callback with an entity arguement that returns whether the trace should hit -- @param mask Trace mask -- @param colgroup The collision group of the trace -- @param ignworld Whether the trace should ignore world -- @return Result of the trace https://wiki.facepunch.com/gmod/Structures/TraceResult function trace_library.trace(start, endpos, filter, mask, colgroup, ignworld) checkpermission(instance, nil, "trace") checkvector(start) checkvector(endpos) local start, endpos = vunwrap(start), vunwrap(endpos) filter = convertFilter(filter) if mask ~= nil then checkluatype (mask, TYPE_NUMBER) end if colgroup ~= nil then checkluatype (colgroup, TYPE_NUMBER) end if ignworld ~= nil then checkluatype (ignworld, TYPE_BOOL) end local trace = { start = start, endpos = endpos, filter = filter, mask = mask, collisiongroup = colgroup, ignoreworld = ignworld, } return SF.StructWrapper(instance, util.TraceLine(trace), "TraceResult") end --- Does a swept-AABB trace -- @param start Start position -- @param endpos End position -- @param minbox Lower box corner -- @param maxbox Upper box corner -- @param filter Entity/array of entities to filter, or a function callback with an entity arguement that returns whether the trace should hit -- @param mask Trace mask -- @param colgroup The collision group of the trace -- @param ignworld Whether the trace should ignore world -- @return Result of the trace https://wiki.facepunch.com/gmod/Structures/TraceResult function trace_library.traceHull(start, endpos, minbox, maxbox, filter, mask, colgroup, ignworld) checkpermission(instance, nil, "trace") checkvector(start) checkvector(endpos) checkvector(minbox) checkvector(maxbox) local start, endpos, minbox, maxbox = vunwrap(start), vunwrap(endpos), vunwrap(minbox), vunwrap(maxbox) filter = convertFilter(filter) if mask ~= nil then checkluatype (mask, TYPE_NUMBER) end if colgroup ~= nil then checkluatype (colgroup, TYPE_NUMBER) end if ignworld ~= nil then checkluatype (ignworld, TYPE_BOOL) end local trace = { start = start, endpos = endpos, filter = filter, mask = mask, collisiongroup = colgroup, ignoreworld = ignworld, mins = minbox, maxs = maxbox } return SF.StructWrapper(instance, util.TraceHull(trace), "TraceResult") end --- Does a ray box intersection returning the position hit, normal, and trace fraction, or nil if not hit. --@param rayStart The origin of the ray --@param rayDelta The direction and length of the ray --@param boxOrigin The origin of the box --@param boxAngles The box's angles --@param boxMins The box min bounding vector --@param boxMaxs The box max bounding vector --@return Hit position or nil if not hit --@return Hit normal or nil if not hit --@return Hit fraction or nil if not hit function trace_library.intersectRayWithOBB(rayStart, rayDelta, boxOrigin, boxAngles, boxMins, boxMaxs) local pos, normal, fraction = util.IntersectRayWithOBB(vunwrap(rayStart), vunwrap(rayDelta), vunwrap(boxOrigin), aunwrap(boxAngles), vunwrap(boxMins), vunwrap(boxMaxs)) if pos then return vwrap(pos), vwrap(normal), fraction end end --- Does a ray plane intersection returning the position hit or nil if not hit --@param rayStart The origin of the ray --@param rayDelta The direction and length of the ray --@param planeOrigin The origin of the plane --@param planeNormal The normal of the plane --@return Hit position or nil if not hit function trace_library.intersectRayWithPlane(rayStart, rayDelta, planeOrigin, planeNormal) local pos = util.IntersectRayWithPlane(vunwrap(rayStart), vunwrap(rayDelta), vunwrap(planeOrigin), vunwrap(planeNormal)) if pos then return vwrap(pos) end end --- Does a line trace and applies a decal to wherever is hit -- @param name The decal name, see https://wiki.facepunch.com/gmod/util.Decal -- @param start Start position -- @param endpos End position -- @param filter (Optional) Entity/array of entities to filter function trace_library.decal(name, start, endpos, filter) checkpermission(instance, nil, "trace.decal") checkluatype(name, TYPE_STRING) checkvector(start) checkvector(endpos) local start, endpos = vunwrap(start), vunwrap(endpos) if filter ~= nil then checkluatype(filter, TYPE_TABLE) filter = convertFilter(filter) end plyDecalBurst:use(instance.player, 1) util.Decal( name, start, endpos, filter ) end --- Returns the contents of the position specified. -- @param position The position to get the CONTENTS of -- @return Contents bitflag, see the CONTENTS enums function trace_library.pointContents(position) return util.PointContents(vunwrap(position)) end end
--===========================================================================-- -- -- -- System.Data.Core -- -- -- --===========================================================================-- --===========================================================================-- -- Author : kurapica125@outlook.com -- -- URL : http://github.com/kurapica/PLoop -- -- Create Date : 2018/09/07 -- -- Update Date : 2018/09/07 -- -- Version : 1.0.0 -- --===========================================================================-- PLoop(function(_ENV) __Sealed__() __Final__() interface "System.Data" (function(_ENV) export { safeset = Toolset.safeset } ----------------------------------------------------------- -- types -- ----------------------------------------------------------- __Sealed__() enum "ConnectionState" { Closed = 0, Open = 1, Connecting = 2, Executing = 3, Fetching = 4, } __Sealed__() struct "DBNull" { function(val) return val ~= DBNull end } ----------------------------------------------------------- -- methods -- ----------------------------------------------------------- local NULL_VALUE = { [DBNull] = true } --- Add Empty value for ParseString __Static__() function AddNullValue(value) if value == nil then return end NULL_VALUE = safeset(NULL_VALUE, value, true) end --- Parse the value so special null value can be changed to nil __Static__() function ParseValue(value) if value == nil or NULL_VALUE[value] then return nil end return value end end) end)