updating tools and their position

This commit is contained in:
Chr1Z93 2023-02-02 17:23:51 +01:00
parent 94b803deb3
commit caad1df8ea
17 changed files with 95 additions and 119 deletions

View File

@ -112,13 +112,11 @@
"Blesstokens.afa06b",
"Cursetokens.bd0253",
"TokenRemover.0a5a29",
"TokenSpawner.36b4ee",
"TokenSpawnTool.36b4ee",
"OfficialStandaloneChallengeScenarios.0ef5c8",
"TarotDeck.77f1e5",
"TarotDeckScripted.a230f9",
"Fan-MadeAccessories.aa8b38",
"UIBuilder.ddd2eb",
"CommandManager.a0b1de",
"CoreNightoftheZealot.64a613",
"TheDunwichLegacy.2898f6",
"ThePathtoCarcosa.aca04c",

View File

@ -1546,8 +1546,8 @@
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 77.886,
"posY": 1.043,
"posX": 78,
"posY": 0.96,
"posZ": 27.031,
"rotX": 0,
"rotY": 0,

View File

@ -33,8 +33,8 @@
],
"Tooltip": true,
"Transform": {
"posX": 77.159,
"posY": 1.297,
"posX": 78,
"posY": 1.208,
"posZ": 6.315,
"rotX": 0,
"rotY": 270,

View File

@ -33,8 +33,8 @@
],
"Tooltip": true,
"Transform": {
"posX": 77.464,
"posY": 1.485,
"posX": 78,
"posY": 1.395,
"posZ": 4.352,
"rotX": 0,
"rotY": 270,

View File

@ -42,8 +42,8 @@
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 77.159,
"posY": 1.284,
"posX": 78,
"posY": 1.195,
"posZ": 7.589,
"rotX": 0,
"rotY": 270,

View File

@ -21,7 +21,9 @@
"AttachmentFacedownHelper.3da8b6",
"GuardDog2.66c1cb",
"Flashlight3.ecd43e",
"DeckImporter-Commands.2e59f6"
"DeckImporter-Commands.2e59f6",
"UIBuilder.ddd2eb",
"CommandManager.a0b1de"
],
"ContainedObjects_path": "LegacyAssets.7165a9",
"CustomMesh": {

View File

@ -20,9 +20,9 @@
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": true,
"Locked": false,
"LuaScriptState": "",
"LuaScript_path": "CommandManager.a0b1de.ttslua",
"LuaScript_path": "LegacyAssets.7165a9/CommandManager.a0b1de.ttslua",
"MeasureMovement": false,
"Name": "Checker_black",
"Nickname": "Command Manager",
@ -30,9 +30,9 @@
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 77.06,
"posY": 1.296,
"posZ": 9.378,
"posX": -62.479,
"posY": 4.337,
"posZ": -90.341,
"rotX": 0,
"rotY": 270,
"rotZ": 180,

View File

@ -20,9 +20,9 @@
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": true,
"Locked": false,
"LuaScriptState": "",
"LuaScript_path": "UIBuilder.ddd2eb.ttslua",
"LuaScript_path": "LegacyAssets.7165a9/UIBuilder.ddd2eb.ttslua",
"MeasureMovement": false,
"Name": "Checker_black",
"Nickname": "UI Builder",
@ -30,9 +30,9 @@
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 77.06,
"posY": 1.296,
"posZ": 8.942,
"posX": -62.479,
"posY": 4.337,
"posZ": -90.777,
"rotX": 0,
"rotY": 270,
"rotZ": 180,

View File

@ -30,7 +30,7 @@
"Sticky": true,
"Tooltip": false,
"Transform": {
"posX": 77.836,
"posX": 78,
"posY": 1.244,
"posZ": 33.583,
"rotX": 0,

View File

@ -44,8 +44,8 @@
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 78.46,
"posY": 1.138,
"posX": 78,
"posY": 1.047,
"posZ": -1.001,
"rotX": 0,
"rotY": 0,

View File

@ -21,17 +21,17 @@
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": true,
"LuaScript": "require(\"util/TokenSpawner\")",
"LuaScript": "require(\"util/TokenSpawnTool\")",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Checker_white",
"Nickname": "Token Spawner",
"Nickname": "Token Spawn Tool",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 77.159,
"posY": 1.297,
"posX": 78,
"posY": 1.208,
"posZ": 6.952,
"rotX": 0,
"rotY": 270,

View File

@ -30,8 +30,8 @@
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 77.88,
"posY": 1.485,
"posX": 78,
"posY": 1.395,
"posZ": 1.875,
"rotX": 0,
"rotY": 0,

View File

@ -1,25 +1,12 @@
-- Drawing Tool
-- created by: Chr1Z
-- original by: Whimsical
-- description: draws lines between selected objects
information = {
version = "1.1",
last_updated = "10.10.2022"
}
local lines = {}
-- save "lines" to be able to remove them after loading
function onSave() return JSON.encode(lines) end
function onSave()
return JSON.encode(lines)
end
-- load data and add context menu
function onload(saved_data)
lines = JSON.decode(saved_data) or {}
self.addContextMenuItem("More Information", function()
printToAll("------------------------------", "White")
printToAll("Drawing Tool v" .. information["version"] .. " by Chr1Z", "Orange")
printToAll("last updated: " .. information["last_updated"], "White")
printToAll("original concept by Whimsical", "White")
end)
function onLoad(savedData)
lines = JSON.decode(savedData) or {}
end
-- create timer when numpad 0 is pressed

View File

@ -1,31 +1,23 @@
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by Whimsical.
--- DateTime: 2020-09-26 5:50 p.m.
---
---@param index number
---@param player_color string
-- cut 3 (6) cards from a deck if numpad 1 (2) is pressed
function onScriptingButtonDown(index, player_color)
if not (index>=1 and index<=3) then return end
if not (index >= 1 and index <= 2) then return end
local count = index * 3
---@type Player
local player = Player[player_color]
local object = player:getHoverObject()
local object = player.getHoverObject()
if (not object) then return end
if (object.tag~="Deck") then return end
if (count >= object:getQuantity()) then return end
if (object.tag ~= "Deck") then
broadcastToColor("Hover over a deck to cut 3 (6) cards when pressing 1 (2).", player_color, "Orange")
return
end
if (count >= object.getQuantity()) then return end
local pos = object.positionToWorld(Vector(0, 0, -3.5))
for _ = 1, count do
local target_position = object:positionToWorld(Vector(0, 0, -3.5))
object:takeObject {
object.takeObject {
index = 0,
position = target_position,
position = pos,
smooth = false
}
end

View File

@ -1,8 +1,5 @@
local tokenManager = require("core/token/TokenManager")
local TOKEN_INDEX = {}
TOKEN_INDEX[1] = false
TOKEN_INDEX[2] = false
TOKEN_INDEX[3] = "resourceCounter"
TOKEN_INDEX[4] = "damage"
TOKEN_INDEX[5] = "path"