mirror of
https://codeberg.org/Ikatono/TierMaker.git
synced 2025-10-28 20:45:35 -05:00
tested version with most of the final functionality. Still a few known issues, like dragging to a row that extends to multiple lines
This commit is contained in:
@@ -34,6 +34,8 @@ public partial class CommandHandler : Node
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
//force initialization of Deferer in main thread
|
||||
_ = Deferer;
|
||||
Settings = GetNode<Settings>("/root/Settings");
|
||||
Game = GetNode<game>("/root/Game");
|
||||
GetNode<TwitchChatWatcher>("/root/TwitchChatWatcher").IncomingCommand
|
||||
@@ -51,6 +53,7 @@ public partial class CommandHandler : Node
|
||||
|
||||
private void IncomingCommand(Command command)
|
||||
{
|
||||
GD.Print(command.GetArgs().Remaining());
|
||||
if (!Settings.IsUserAuthorized(command.User, command.IsStreamer,
|
||||
command.IsModerator))
|
||||
return;
|
||||
@@ -167,7 +170,6 @@ public partial class CommandHandler : Node
|
||||
var rowId = args.Pop();
|
||||
var colorStr = args.Pop();
|
||||
var color = Color.FromString(colorStr, new Color(0, 0, 0, 0));
|
||||
GD.Print($"Recoloring row to {color}");
|
||||
if (color.IsEqualApprox(new Color(0, 0, 0, 0)))
|
||||
throw new Exception($"invalid color {colorStr}");
|
||||
Game.RecolorRow(rowId, color);
|
||||
@@ -195,7 +197,6 @@ public partial class CommandHandler : Node
|
||||
_ => throw new Exception($"Unrecognized {nameof(StretchMode)}"),
|
||||
};
|
||||
}
|
||||
GD.Print($"Stretch mode: {mode}");
|
||||
var uri = new Uri(url);
|
||||
GD.Print("Starting image download");
|
||||
var resp = await Client.GetAsync(uri);
|
||||
|
||||
Reference in New Issue
Block a user