Revert "Update license header comment to reflect new repository url"

This reverts commit fffbb76a5e.
This commit is contained in:
Alessandro Proto 2023-02-17 13:15:56 +01:00
parent fffbb76a5e
commit 03f82a6796
52 changed files with 77 additions and 77 deletions

View file

@ -1,6 +1,6 @@
[*.{cs,vb,lua}]
#### Top of file license comment
file_header_template = This file is part of Capy64 - https://github.com/Ale32bit/Capy64\nCopyright 2023 Alessandro "AlexDevs" Proto\n\nLicensed under the Apache License, Version 2.0 (the "License").\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.
file_header_template = This file is part of Capy64 - https://github.com/Capy64/Capy64\nCopyright 2023 Alessandro "AlexDevs" Proto\n\nLicensed under the Apache License, Version 2.0 (the "License").\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.
[*.cs]
#### Stili di denominazione ####

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -41,8 +41,8 @@ public class Capy64 : Game, IGame
"Capy64");
public static Capy64 Instance { get; private set; }
public Capy64 Game => this;
public IList<IPlugin> NativePlugins { get; private set; }
public IList<IPlugin> Plugins { get; private set; }
public IList<IComponent> NativePlugins { get; private set; }
public IList<IComponent> Plugins { get; private set; }
public int Width { get; set; } = 400;
public int Height { get; set; } = 300;
public float Scale { get; set; } = 2f;
@ -159,18 +159,18 @@ public class Capy64 : Game, IGame
base.Initialize();
}
private List<IPlugin> GetNativePlugins()
private List<IComponent> GetNativePlugins()
{
var iType = typeof(IPlugin);
var iType = typeof(IComponent);
var types = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(s => s.GetTypes())
.Where(p => iType.IsAssignableFrom(p) && !p.IsInterface);
var plugins = new List<IPlugin>();
var plugins = new List<IComponent>();
foreach (var type in types)
{
var instance = (IPlugin)ActivatorUtilities.CreateInstance(_serviceProvider, type)!;
var instance = (IComponent)ActivatorUtilities.CreateInstance(_serviceProvider, type)!;
plugins.Add(instance);
}
return plugins;

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -27,7 +27,7 @@ using System.Threading.Tasks;
namespace Capy64.Integrations;
public class DiscordIntegration : IPlugin
public class DiscordIntegration : IComponent
{
public DiscordRpcClient Client { get; private set; }
private readonly IConfiguration _configuration;

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -33,21 +33,21 @@ internal class PluginLoader
return loadContext.LoadFromAssemblyName(new AssemblyName(Path.GetFileNameWithoutExtension(path)));
}
public static List<IPlugin> LoadAllPlugins(string pluginsPath, IServiceProvider provider)
public static List<IComponent> LoadAllPlugins(string pluginsPath, IServiceProvider provider)
{
if (!Directory.Exists(pluginsPath))
Directory.CreateDirectory(pluginsPath);
var plugins = new List<IPlugin>();
var plugins = new List<IComponent>();
foreach (var fileName in Directory.GetFiles(pluginsPath).Where(q => q.EndsWith(".dll")))
{
var assembly = LoadPlugin(fileName);
foreach (Type type in assembly.GetTypes())
{
if (typeof(IPlugin).IsAssignableFrom(type))
if (typeof(IComponent).IsAssignableFrom(type))
{
IPlugin result = ActivatorUtilities.CreateInstance(provider, type) as IPlugin;
IComponent result = ActivatorUtilities.CreateInstance(provider, type) as IComponent;
plugins.Add(result);
}
}

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -23,7 +23,7 @@ using System.Threading.Tasks;
namespace Capy64.Runtime.Libraries;
public class Event : IPlugin
public class Event : IComponent
{
private static IGame _game;
public Event(IGame game)

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -25,7 +25,7 @@ using Capy64.Runtime.Objects;
namespace Capy64.Runtime.Libraries;
public class FileSystem : IPlugin
public class FileSystem : IComponent
{
public static string DataPath = Path.Combine(Capy64.AppDataPath, "data");

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -24,7 +24,7 @@ using System.IO;
namespace Capy64.Runtime.Libraries;
public class GPU : IPlugin
public class GPU : IComponent
{
private static IGame _game;

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -28,7 +28,7 @@ using System.Threading;
namespace Capy64.Runtime.Libraries;
#nullable enable
public class HTTP : IPlugin
public class HTTP : IComponent
{
private static IGame _game;
private static HttpClient _httpClient;

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -25,7 +25,7 @@ using System.Threading.Tasks;
namespace Capy64.Runtime.Libraries;
public class Machine : IPlugin
public class Machine : IComponent
{
private static IGame _game;
public Machine(IGame game)

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -19,7 +19,7 @@ using System;
namespace Capy64.Runtime.Libraries;
public class OS : IPlugin
public class OS : IComponent
{
private static IGame _game;
public OS(IGame game)

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -26,7 +26,7 @@ using static System.Formats.Asn1.AsnWriter;
namespace Capy64.Runtime.Libraries;
internal class Term : IPlugin
internal class Term : IComponent
{
private struct Char
{

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -21,7 +21,7 @@ using System.Collections.Generic;
namespace Capy64.Runtime.Libraries;
class Timer : IPlugin
class Timer : IComponent
{
private LuaRegister[] TimerLib = new LuaRegister[]
{

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -75,7 +75,7 @@ public class LuaState : IDisposable
private void InitPlugins()
{
var allPlugins = new List<IPlugin>(Capy64.Instance.NativePlugins);
var allPlugins = new List<IComponent>(Capy64.Instance.NativePlugins);
allPlugins.AddRange(Capy64.Instance.Plugins);
foreach (var plugin in allPlugins)
{

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -26,7 +26,7 @@ using System.Threading.Tasks;
namespace Capy64.Runtime;
public class ObjectManager : IPlugin
public class ObjectManager : IComponent
{
private static ConcurrentDictionary<nint, object> _objects = new();

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -24,7 +24,7 @@ using System.Threading.Tasks;
namespace Capy64.Runtime.Objects;
public class FileHandle : IPlugin
public class FileHandle : IComponent
{
public const string ObjectType = "file";

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -20,7 +20,7 @@ using System.IO;
namespace Capy64.Runtime.Objects;
public class GPUBuffer : IPlugin
public class GPUBuffer : IComponent
{
public const string ObjectType = "GPUBuffer";

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -23,7 +23,7 @@ using System.Threading;
namespace Capy64.Runtime.Objects;
public class WebSocketClient : IPlugin
public class WebSocketClient : IComponent
{
public const string ObjectType = "WebSocketClient";

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").
@ -30,7 +30,7 @@ using System.Threading.Tasks;
namespace Capy64.Runtime;
internal class RuntimeManager : IPlugin
internal class RuntimeManager : IComponent
{
private LuaState luaState;
private EventEmitter emitter;

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").

View file

@ -1,4 +1,4 @@
// This file is part of Capy64 - https://github.com/Ale32bit/Capy64
// This file is part of Capy64 - https://github.com/Capy64/Capy64
// Copyright 2023 Alessandro "AlexDevs" Proto
//
// Licensed under the Apache License, Version 2.0 (the "License").