Skip to content

Commit

Permalink
Rename to not conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakansoul committed Feb 21, 2023
1 parent 161c8ff commit 11460e7
Show file tree
Hide file tree
Showing 28 changed files with 111 additions and 178 deletions.
25 changes: 25 additions & 0 deletions DisPlacePlugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[{
"Author": "Drakansoul",
"Name": "DisPlace Plugin",
"InternalName": "DisPlacePlugin",
"AssemblyVersion": "2.19-d",
"Punchline": "Automatically save & load furniture layouts in ANY house.",
"Description": "Automatically save & load the positions of house furniture. Copy other housing layouts. Import/export layouts from the MakePlace program.",
"ApplicableVersion": "any",
"RepoUrl": "https://github.com/Drakansoul/DisPlaced",
"Tags": [
"makeplace",
"housing",
"furniture",
"jawslouis"
],
"DalamudApiLevel": 8,
"LoadPriority": 0,
"IconUrl": "https://raw.githubusercontent.com/Drakansoul/DisPlaced/master/icon.png",
"DownloadCount": 0,
"DownloadLinkInstall": "https://github.com/Drakansoul/DisPlaced/releases/download/v2.19-d/DisPlacePlugin.zip",
"DownloadLinkTesting": "https://github.com/Drakansoul/DisPlaced/releases/download/v2.19-d/DisPlacePlugin.zip",
"DownloadLinkUpdate": "https://github.com/Drakansoul/DisPlaced/releases/download/v2.19-d/DisPlacePlugin.zip",
"_isDip17Plugin": false,
"_Dip17Channel": null
}]
2 changes: 1 addition & 1 deletion MakePlacePlugin.sln → DisPlacePlugin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30204.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MakePlacePlugin", "MakePlacePlugin\MakePlacePlugin.csproj", "{479ADEA9-780A-4A8E-98A1-82C0399176E4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DisPlacePlugin", "DisPlacePlugin\DisPlacePlugin.csproj", "{479ADEA9-780A-4A8E-98A1-82C0399176E4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Collections.Generic;
using Dalamud.Configuration;
using Dalamud.Plugin;
using MakePlacePlugin.Objects;
using DisPlacePlugin.Objects;

namespace MakePlacePlugin
namespace DisPlacePlugin
{
[Serializable]
public class Configuration : IPluginConfiguration
Expand All @@ -28,7 +28,7 @@ public class Configuration : IPluginConfiguration
public int LocationId = 0;
public int LoadInterval = 400;

public string SaveLocation = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile).Replace('\\', '/') + "/MakePlace/Save/save.json";
public string SaveLocation = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile).Replace('\\', '/') + "/DisPlace/Save/save.json";

#region Init and Save

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
using ImGuiScene;
using Lumina.Excel.GeneratedSheets;
using Lumina.Text;
using MakePlacePlugin.Gui;
using MakePlacePlugin.Objects;
using MakePlacePlugin.Util;
using DisPlacePlugin.Gui;
using DisPlacePlugin.Objects;
using DisPlacePlugin.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Threading;

namespace MakePlacePlugin
namespace DisPlacePlugin
{
public class MakePlacePlugin : IDalamudPlugin
public class DisPlacePlugin : IDalamudPlugin
{
public string Name => "MakePlace Plugin";
public string Name => "DisPlace Plugin";
public PluginUi Gui { get; private set; }
public Configuration Config { get; private set; }

Expand Down Expand Up @@ -94,12 +94,12 @@ public void Dispose()

Config.PlaceAnywhere = false;
ClientState.TerritoryChanged -= TerritoryChanged;
CommandManager.RemoveHandler("/makeplace");
CommandManager.RemoveHandler("/DisPlace");
Gui?.Dispose();

}

public MakePlacePlugin(
public DisPlacePlugin(
[RequiredVersion("1.0")] DalamudPluginInterface pluginInterface,
[RequiredVersion("1.0")] CommandManager commandManager
)
Expand All @@ -110,7 +110,7 @@ public MakePlacePlugin(

Initialize();

CommandManager.AddHandler("/makeplace", new CommandInfo(CommandHandler)
CommandManager.AddHandler("/DisPlace", new CommandInfo(CommandHandler)
{
HelpMessage = "load config window."
});
Expand All @@ -122,7 +122,7 @@ public MakePlacePlugin(
Memory.Init(Scanner);
LayoutManager = new SaveLayoutManager(this, ChatGui, Config);

PluginLog.Log("MakePlace Plugin v2.19 initialized");
PluginLog.Log("DisPlace Plugin v2.19-d initialized");
}
public void Initialize()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyTitle>MakePlacePlugin</AssemblyTitle>
<Product>MakePlacePlugin</Product>
<AssemblyTitle>DisPlacePlugin</AssemblyTitle>
<Product>DisPlacePlugin</Product>
<Version>$(PluginVersion)</Version>
<FileVersion>$(PluginVersion)</FileVersion>
<AssemblyVersion>$(PluginVersion)</AssemblyVersion>
Expand Down
17 changes: 17 additions & 0 deletions DisPlacePlugin/DisPlacePlugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"Author": "Drakansoul",
"Name": "DisPlace Plugin",
"InternalName": "DisPlacePlugin",
"Description": "Automatically save & load interior and exterior house layouts. Copy other housing layouts. Import/export layouts from the MakePlace program.",
"RepoUrl": "https://github.com/Drakansoul/DisPlaced",
"Tags": [
"makeplace",
"housing",
"furniture",
"jawslouis",
"drakansoul",
"displace"
],
"IconUrl": "https://raw.githubusercontent.com/Drakansoul/DisPlaced/master/icon.png",
"Punchline": "Automatically save & load furniture layouts in your house. Copy layouts from other houses."
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MakePlacePlugin.MakePlacePlugin.Initialize")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MakePlacePlugin.MakePlacePlugin.#ctor")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:MakePlacePlugin.MakePlacePlugin.RefreshFurnitureList(System.Collections.Generic.List{HousingPos.Objects.HousingItem}@)")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:DisPlacePlugin.DisPlacePlugin.Initialize")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:DisPlacePlugin.DisPlacePlugin.#ctor")]
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>", Scope = "member", Target = "~M:DisPlacePlugin.DisPlacePlugin.RefreshFurnitureList(System.Collections.Generic.List{HousingPos.Objects.HousingItem}@)")]
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using Dalamud.Utility;
using ImGuiNET;
using Lumina.Excel.GeneratedSheets;
using MakePlacePlugin.Objects;
using DisPlacePlugin.Objects;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Threading.Tasks;
using static MakePlacePlugin.MakePlacePlugin;
using static DisPlacePlugin.DisPlacePlugin;

namespace MakePlacePlugin.Gui
namespace DisPlacePlugin.Gui
{
public class ConfigurationWindow : Window<MakePlacePlugin>
public class ConfigurationWindow : Window<DisPlacePlugin>
{

public Configuration Config => Plugin.Config;
Expand All @@ -23,7 +23,7 @@ public class ConfigurationWindow : Window<MakePlacePlugin>
private readonly Vector4 PURPLE = new(0.26275f, 0.21569f, 0.56863f, 1f);
private readonly Vector4 PURPLE_ALPHA = new(0.26275f, 0.21569f, 0.56863f, 0.5f);

public ConfigurationWindow(MakePlacePlugin plugin) : base(plugin)
public ConfigurationWindow(DisPlacePlugin plugin) : base(plugin)
{

}
Expand Down Expand Up @@ -127,8 +127,8 @@ public void DrawIcon(ushort icon, Vector2 size)
{
try
{
var iconTex = MakePlacePlugin.Data.GetIcon(icon);
var tex = MakePlacePlugin.Interface.UiBuilder.LoadImageRaw(iconTex.GetRgbaImageData(), iconTex.Header.Width, iconTex.Header.Height, 4);
var iconTex = DisPlacePlugin.Data.GetIcon(icon);
var tex = DisPlacePlugin.Interface.UiBuilder.LoadImageRaw(iconTex.GetRgbaImageData(), iconTex.Header.Width, iconTex.Header.Height, 4);
if (tex != null && tex.ImGuiHandle != IntPtr.Zero)
Plugin.TextureDictionary[icon] = tex;
}
Expand Down Expand Up @@ -168,7 +168,7 @@ unsafe private void DrawGeneralSettings()
{
try
{
MakePlacePlugin.LayoutManager.ExportLayout();
DisPlacePlugin.LayoutManager.ExportLayout();
}
catch (Exception e)
{
Expand Down Expand Up @@ -309,7 +309,7 @@ private void DrawRow(int i, HousingItem housingItem, bool showSetPosition = true
{
ImGui.Text($"{housingItem.X:N3}, {housingItem.Y:N3}, {housingItem.Z:N3}"); ImGui.NextColumn();
ImGui.Text($"{housingItem.Rotate:N3}"); ImGui.NextColumn();
var stain = MakePlacePlugin.Data.GetExcelSheet<Stain>().GetRow(housingItem.Stain);
var stain = DisPlacePlugin.Data.GetExcelSheet<Stain>().GetRow(housingItem.Stain);
var colorName = stain?.Name;

if (housingItem.Stain != 0)
Expand Down Expand Up @@ -463,7 +463,7 @@ private void DrawItemList(List<HousingItem> itemList, bool isUnused = false)
var housingItem = itemList[i];
var displayName = housingItem.Name;

var item = MakePlacePlugin.Data.GetExcelSheet<Item>().GetRow(housingItem.ItemKey);
var item = DisPlacePlugin.Data.GetExcelSheet<Item>().GetRow(housingItem.ItemKey);
if (item != null)
{
DrawIcon(item.Icon, new Vector2(20, 20));
Expand Down Expand Up @@ -515,7 +515,7 @@ private unsafe void DrawItemOnScreen()

for (int i = 0; i < itemList.Count(); i++)
{
var playerPos = MakePlacePlugin.ClientState.LocalPlayer.Position;
var playerPos = DisPlacePlugin.ClientState.LocalPlayer.Position;
var housingItem = itemList[i];

if (housingItem.ItemStruct == IntPtr.Zero) continue;
Expand All @@ -527,7 +527,7 @@ private unsafe void DrawItemOnScreen()
if (Config.DrawDistance > 0 && (playerPos - itemPos).Length() > Config.DrawDistance)
continue;
var displayName = housingItem.Name;
if (MakePlacePlugin.GameGui.WorldToScreen(itemPos, out var screenCoords))
if (DisPlacePlugin.GameGui.WorldToScreen(itemPos, out var screenCoords))
{
ImGui.PushID("HousingItemWindow" + i);
ImGui.SetNextWindowPos(new Vector2(screenCoords.X, screenCoords.Y));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Dalamud.Plugin;

namespace MakePlacePlugin.Gui
namespace DisPlacePlugin.Gui
{
public abstract class Window<T> where T : IDalamudPlugin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Dalamud.Logging;
using Lumina.Excel.GeneratedSheets;

namespace MakePlacePlugin
namespace DisPlacePlugin
{
public class HousingData
{
Expand All @@ -16,7 +16,7 @@ public class HousingData
private readonly Dictionary<uint, uint> _unitedDict;
private readonly Dictionary<uint, HousingYardObject> _yardObjectDict;

private static MakePlacePlugin Plugin;
private static DisPlacePlugin Plugin;

private HousingData(DataManager dataMgr)
{
Expand Down Expand Up @@ -64,7 +64,7 @@ private HousingData(DataManager dataMgr)

public static HousingData Instance { get; private set; }

public static void Init(DataManager dataMgr, MakePlacePlugin plugin)
public static void Init(DataManager dataMgr, DisPlacePlugin plugin)
{
Plugin = plugin;
Instance = new HousingData(dataMgr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Lumina.Data;
using Lumina.Excel;

namespace MakePlacePlugin
namespace DisPlacePlugin
{
[Sheet("HousingLandSet")]
public class HousingLandSet : ExcelRow
Expand Down
4 changes: 2 additions & 2 deletions MakePlacePlugin/Memory.cs → DisPlacePlugin/Memory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using Dalamud.Logging;
using Dalamud.Plugin;
using FFXIVClientStructs.FFXIV.Client.Game;
using static MakePlacePlugin.MakePlacePlugin;
using static DisPlacePlugin.DisPlacePlugin;

namespace MakePlacePlugin
namespace DisPlacePlugin
{
public unsafe class Memory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Text;
using System.Threading.Tasks;

namespace MakePlacePlugin.Objects
namespace DisPlacePlugin.Objects
{
public class HousingItem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using FFXIVClientStructs.FFXIV.Client.Game;
using Lumina.Excel.GeneratedSheets;
using static FFXIVClientStructs.FFXIV.Client.Game.InventoryItem;
using static MakePlacePlugin.Utils;
using static DisPlacePlugin.Utils;

namespace MakePlacePlugin
namespace DisPlacePlugin
{
public enum SortType
{
Expand Down Expand Up @@ -254,7 +254,7 @@ public HousingController? HousingController
// return Marshal.PtrToStructure<HousingController>(_housingController);
// return *(HousingController*) _housingController;

return global::MakePlacePlugin.HousingController.Get(_housingController);
return global::DisPlacePlugin.HousingController.Get(_housingController);
}
}

Expand All @@ -263,7 +263,7 @@ public IndoorAreaData? IndoorAreaData
get
{
if (_indoorAreaData == IntPtr.Zero) return null;
return global::MakePlacePlugin.IndoorAreaData.Get(_indoorAreaData);
return global::DisPlacePlugin.IndoorAreaData.Get(_indoorAreaData);
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions MakePlacePlugin/PluginUi.cs → DisPlacePlugin/PluginUi.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using System;
using MakePlacePlugin.Gui;
using DisPlacePlugin.Gui;

namespace MakePlacePlugin
namespace DisPlacePlugin
{
public class PluginUi : IDisposable
{
private readonly MakePlacePlugin _plugin;
private readonly DisPlacePlugin _plugin;
public ConfigurationWindow ConfigWindow { get; }

public PluginUi(MakePlacePlugin plugin)
public PluginUi(DisPlacePlugin plugin)
{
ConfigWindow = new ConfigurationWindow(plugin);

_plugin = plugin;
MakePlacePlugin.Interface.UiBuilder.Draw += Draw;
MakePlacePlugin.Interface.UiBuilder.OpenConfigUi += OnOpenConfigUi;
DisPlacePlugin.Interface.UiBuilder.Draw += Draw;
DisPlacePlugin.Interface.UiBuilder.OpenConfigUi += OnOpenConfigUi;
}

private void Draw()
Expand All @@ -30,8 +30,8 @@ private void OnOpenConfigUi()

public void Dispose()
{
MakePlacePlugin.Interface.UiBuilder.Draw -= Draw;
MakePlacePlugin.Interface.UiBuilder.OpenConfigUi -= OnOpenConfigUi;
DisPlacePlugin.Interface.UiBuilder.Draw -= Draw;
DisPlacePlugin.Interface.UiBuilder.OpenConfigUi -= OnOpenConfigUi;
}
}
}
Loading

0 comments on commit 11460e7

Please sign in to comment.