mirror of
https://github.com/koloml/vs-manual-cartography.git
synced 2026-11-07 16:28:19 +00:00
Initial commit from Vintage Story mod template
This commit adds dummy compass item wich will just send the angle into the chat when you click RMB on it.
This commit is contained in:
commit
2479c92ffb
14 files changed
+936
No files matched your search
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using Vintagestory.API.Client;
|
||||
using Vintagestory.API.Common;
|
||||
|
||||
namespace ManualCartography.Items;
|
||||
|
||||
public class ItemCompass : Item
|
||||
{
|
||||
public override void OnHeldInteractStart(
|
||||
ItemSlot slot,
|
||||
EntityAgent byEntity,
|
||||
BlockSelection blockSel,
|
||||
EntitySelection entitySel,
|
||||
bool firstEvent,
|
||||
ref EnumHandHandling handling
|
||||
)
|
||||
{
|
||||
(api as ICoreClientAPI)?.TriggerChatMessage("Yaw: " + (byEntity.Pos.Yaw * 180 / Math.PI));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputPath>bin\$(Configuration)\Mods\mod</OutputPath>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="VintagestoryAPI">
|
||||
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="modinfo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="modicon.png" Condition="Exists('modicon.png')">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,13 @@
|
||||
using ManualCartography.Items;
|
||||
using Vintagestory.API.Common;
|
||||
using Vintagestory.API.Server;
|
||||
|
||||
namespace ManualCartography;
|
||||
|
||||
public class ManualCartographyModSystem : ModSystem
|
||||
{
|
||||
public override void Start(ICoreAPI api)
|
||||
{
|
||||
api.RegisterItemClass(Mod.Info.ModID + ".itemcompass", typeof(ItemCompass));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"profiles": {
|
||||
"Client": {
|
||||
"commandName": "Executable",
|
||||
"executablePath": "dotnet",
|
||||
"commandLineArgs": "\"$(VINTAGE_STORY)/Vintagestory.dll\" --tracelog --addModPath \"$(ProjectDir)/bin/$(Configuration)/Mods\" --addOrigin \"$(ProjectDir)/assets\"",
|
||||
"workingDirectory": "$(VINTAGE_STORY)"
|
||||
},
|
||||
"Server": {
|
||||
"commandName": "Executable",
|
||||
"executablePath": "dotnet",
|
||||
"commandLineArgs": "\"$(VINTAGE_STORY)/VintagestoryServer.dll\" --tracelog --addModPath \"$(ProjectDir)/bin/$(Configuration)/Mods\" --addOrigin \"$(ProjectDir)/assets\"",
|
||||
"workingDirectory": "$(VINTAGE_STORY)"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"code": "compass",
|
||||
"class": "manualcartography.itemcompass",
|
||||
"maxstacksize": 1,
|
||||
"shape": {
|
||||
"base": "game:shapes/item/utility/compass"
|
||||
},
|
||||
"creativeinventory": {
|
||||
"items": [ "*" ],
|
||||
"manualcartography": [ "*" ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"item-compass": "Compass",
|
||||
"tabname-manualcartography": "Manual Cartography"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://moddbcdn.vintagestory.at/schema/modinfo.latest.json",
|
||||
"type": "Code",
|
||||
"modid": "manualcartography",
|
||||
"name": "Manual Cartography",
|
||||
"authors": [
|
||||
"KoloMl"
|
||||
],
|
||||
"description": "Bundle of instruments to create maps of your world. Manually!",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"game": "1.22.2"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user