Skip to content

Commit

Permalink
feat: refact renaming LuaMappings to Functions
Browse files Browse the repository at this point in the history
  • Loading branch information
MUN1Z committed Dec 27, 2024
1 parent 230de4b commit b09f2c3
Show file tree
Hide file tree
Showing 46 changed files with 227 additions and 227 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using LuaNET;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class ActionLuaMapping : LuaScriptInterface, IActionLuaMapping
public class ActionFunctions : LuaScriptInterface, IActionFunctions
{
private static IActions _actions;

public ActionLuaMapping(IActions actions) : base(nameof(ActionLuaMapping))
public ActionFunctions(IActions actions) : base(nameof(ActionFunctions))
{
_actions = actions;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using LuaNET;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;
using NeoServer.Server.Configurations;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class ConfigLuaMappingr : LuaScriptInterface, IConfigLuaMapping
public class ConfigFunctions : LuaScriptInterface, IConfigFunctions
{
private static IConfigManager _configManager;
private ServerConfiguration _serverConfiguration;

public ConfigLuaMappingr(
public ConfigFunctions(
IConfigManager configManager,
ServerConfiguration serverConfiguration) : base(nameof(ConfigLuaMappingr))
ServerConfiguration serverConfiguration) : base(nameof(ConfigFunctions))
{
_configManager = configManager;
_serverConfiguration = serverConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using LuaNET;
using NeoServer.Game.Common.Contracts.Creatures;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;
using NeoServer.Server.Common.Contracts;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class CreatureLuaMapping : LuaScriptInterface, ICreatureLuaMapping
public class CreatureFunctions : LuaScriptInterface, ICreatureFunctions
{
private static IGameCreatureManager _gameCreatureManager;

public CreatureLuaMapping(IGameCreatureManager gameCreatureManager) : base(nameof(CreatureLuaMapping))
public CreatureFunctions(IGameCreatureManager gameCreatureManager) : base(nameof(CreatureFunctions))
{
_gameCreatureManager = gameCreatureManager;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using LuaNET;
using NeoServer.Game.Common.Location;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;
using Serilog;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
public class EnumLuaMapping : LuaScriptInterface, IEnumLuaMapping
namespace NeoServer.Scripts.LuaJIT.Functions;
public class EnumFunctions : LuaScriptInterface, IEnumFunctions
{
public EnumLuaMapping(
public EnumFunctions(
ILuaEnvironment luaEnvironment,
ILogger logger) : base(nameof(ConfigLuaMappingr))
ILogger logger) : base(nameof(ConfigFunctions))
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
using NeoServer.Game.Common.Location.Structs;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.Extensions;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;
using NeoServer.Server.Configurations;
using NeoServer.Server.Helpers;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class GameLuaMapping : LuaScriptInterface, IGameLuaMapping
public class GameFunctions : LuaScriptInterface, IGameFunctions
{
private static IScripts _scripts;
private static IItemTypeStore _itemTypeStore;
private static IItemFactory _itemFactory;
private static ServerConfiguration _serverConfiguration;

public GameLuaMapping(
public GameFunctions(
IScripts scripts,
IItemTypeStore itemTypeStore,
IItemFactory itemFactory,
ServerConfiguration serverConfiguration) : base(nameof(GameLuaMapping))
ServerConfiguration serverConfiguration) : base(nameof(GameFunctions))
{
_scripts = scripts;
_itemTypeStore = itemTypeStore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using LuaNET;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class GlobalLuaMapping : LuaScriptInterface, IGlobalLuaMapping
public class GlobalFunctions : LuaScriptInterface, IGlobalFunctions
{
public GlobalLuaMapping() : base(nameof(GlobalLuaMapping))
public GlobalFunctions() : base(nameof(GlobalFunctions))
{
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IActionFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using LuaNET;

namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IBaseFunctions
{
void Init(LuaState L);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IConfigFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface ICreatureFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IEnumFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IGameFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IGlobalFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IItemFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IItemTypeFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface ILoggerFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IMonsterFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IPlayerFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface IPositionFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface ITalkActionFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace NeoServer.Scripts.LuaJIT.Functions.Interfaces;

public interface ITileFunctions : IBaseFunctions
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
using NeoServer.Game.Common.Contracts.World.Tiles;
using NeoServer.Game.Common.Item;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class ItemLuaMapping : LuaScriptInterface, IItemLuaMapping
public class ItemFunctions : LuaScriptInterface, IItemFunctions
{
private static IItemTransformService _itemTransformService;
private static IItemTypeStore _itemTypeStore;
private static IMap _map;
private static IItemMovementService _itemMovementService;

public ItemLuaMapping(
public ItemFunctions(
IItemTransformService itemTransformService,
IItemTypeStore itemTypeStore,
IMap map,
IItemMovementService itemMovementService) : base(nameof(ItemLuaMapping))
IItemMovementService itemMovementService) : base(nameof(ItemFunctions))

{

Check notice on line 28 in src/Extensions/NeoServer.Scripts.LuaJIT/Functions/ItemFunctions.cs

View check run for this annotation

codefactor.io / CodeFactor

src/Extensions/NeoServer.Scripts.LuaJIT/Functions/ItemFunctions.cs#L28

Opening braces should not be preceded by blank line. (SA1509)
_itemTransformService = itemTransformService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
using NeoServer.Game.Common.Contracts.DataStores;
using NeoServer.Game.Common.Contracts.Items;
using NeoServer.Game.Common.Item;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class ItemTypeLuaMapping : LuaScriptInterface, IItemTypeLuaMapping
public class ItemTypeFunctions : LuaScriptInterface, IItemTypeFunctions
{
private static IItemTypeStore _itemTypeStore;
public ItemTypeLuaMapping(IItemTypeStore itemTypeStore) : base(nameof(ItemTypeLuaMapping))
public ItemTypeFunctions(IItemTypeStore itemTypeStore) : base(nameof(ItemTypeFunctions))
{
_itemTypeStore = itemTypeStore;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using LuaNET;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;
using Serilog;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class LoggerLuaMapping : LuaScriptInterface, ILoggerLuaMapping
public class LoggerFunctions : LuaScriptInterface, ILoggerFunctions
{
private static ILogger _logger;

public LoggerLuaMapping(
ILuaEnvironment luaEnvironment, ILogger logger) : base(nameof(LoggerLuaMapping))
public LoggerFunctions(
ILuaEnvironment luaEnvironment, ILogger logger) : base(nameof(LoggerFunctions))
{
_logger = logger;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using LuaNET;
using NeoServer.Game.Common.Contracts.Creatures;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;
using NeoServer.Server.Common.Contracts;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class MonsterLuaMapping : LuaScriptInterface, IMonsterLuaMapping
public class MonsterFunctions : LuaScriptInterface, IMonsterFunctions
{
private static IGameCreatureManager _gameCreatureManager;

public MonsterLuaMapping(IGameCreatureManager gameCreatureManager) : base(nameof(MonsterLuaMapping))
public MonsterFunctions(IGameCreatureManager gameCreatureManager) : base(nameof(MonsterFunctions))
{
_gameCreatureManager = gameCreatureManager;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
using NeoServer.Game.Common.Contracts.Creatures;
using NeoServer.Networking.Packets.Outgoing;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;
using NeoServer.Server.Common.Contracts;
using NeoServer.Server.Services;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class PlayerLuaMapping : LuaScriptInterface, IPlayerLuaMapping
public class PlayerFunctions : LuaScriptInterface, IPlayerFunctions
{
private static IGameCreatureManager _gameCreatureManager;

public PlayerLuaMapping(IGameCreatureManager gameCreatureManager) : base(nameof(PlayerLuaMapping))
public PlayerFunctions(IGameCreatureManager gameCreatureManager) : base(nameof(PlayerFunctions))
{
_gameCreatureManager = gameCreatureManager;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
using NeoServer.Game.Common.Creatures;
using NeoServer.Game.Common.Location.Structs;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;
using NeoServer.Server.Services;
using Serilog;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class PositionLuaMapping : LuaScriptInterface, IPositionLuaMapping
public class PositionFunctions : LuaScriptInterface, IPositionFunctions
{
private static ILogger _logger;
private static IConfigManager _configManager;

public PositionLuaMapping(ILogger logger, IConfigManager configManager) : base(nameof(PositionLuaMapping))
public PositionFunctions(ILogger logger, IConfigManager configManager) : base(nameof(PositionFunctions))
{
_logger = logger;
_configManager = configManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using LuaNET;
using NeoServer.Scripts.LuaJIT.Enums;
using NeoServer.Scripts.LuaJIT.LuaMappings.Interfaces;
using NeoServer.Scripts.LuaJIT.Functions.Interfaces;

namespace NeoServer.Scripts.LuaJIT.LuaMappings;
namespace NeoServer.Scripts.LuaJIT.Functions;

public class TalkActionLuaMapping : LuaScriptInterface, ITalkActionLuaMapping
public class TalkActionFunctions : LuaScriptInterface, ITalkActionFunctions
{
public TalkActionLuaMapping() : base(nameof(TalkActionLuaMapping))
public TalkActionFunctions() : base(nameof(TalkActionFunctions))
{
}

Expand Down
Loading

0 comments on commit b09f2c3

Please sign in to comment.