Skip to content

Commit

Permalink
Add project files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik authored and Erik committed Nov 22, 2024
1 parent de2e02f commit 68d796a
Show file tree
Hide file tree
Showing 18 changed files with 275 additions and 0 deletions.
132 changes: 132 additions & 0 deletions Atoms.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
using Quintessential;

namespace HalvingMetallurgy;

internal static class Atoms
{
public static AtomType Wolfram, Vulcan, Nickel, Zinc, Sednum, Osmium;

public static void AddAtomTypes()
{
Quintessential.Logger.Log("HalvingMetallurgy: Creating atoms!");
Osmium = new()
{
field_2283 = 130, //Id
field_2284 = class_134.method_254("Osmium"), //Non local name
field_2285 = class_134.method_253("Elemental Osmium", string.Empty), //Atomic name
field_2286 = class_134.method_253("Osmium", string.Empty), //Local name
field_2287 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/osmium_symbol"), //Symbol
field_2288 = class_235.method_615("textures/atoms/shadow"), //Shadow
field_2294 = true, //Metal, Enables field_2297
field_2291 = new()
{
field_13 = class_238.field_1989.field_81.field_577, //Diffuse
field_14 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/osmium_lightramp"), //Lightramp
field_15 = class_238.field_1989.field_81.field_613.field_633 //Shiny!
},
QuintAtomType = "HalvingMetallurgy:osmium"
};
QApi.AddAtomType(Osmium);
Sednum = new()
{
field_2283 = 129, //Id
field_2284 = class_134.method_254("Sednum"), //Non local name
field_2285 = class_134.method_253("Elemental Sednum", string.Empty), //Atomic name
field_2286 = class_134.method_253("Sednum", string.Empty), //Local name
field_2287 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/sednum_symbol"), //Symbol
field_2288 = class_235.method_615("textures/atoms/shadow"), //Shadow
field_2294 = true, //Metal, Enables field_2297
field_2291 = new()
{
field_13 = class_238.field_1989.field_81.field_577, //Diffuse
field_14 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/sednum_lightramp"), //Lightramp
field_15 = class_238.field_1989.field_81.field_613.field_633 //Shiny!
},
field_2297 = Maybe<AtomType>.method_1089(Atoms.Osmium), //Promotion Atom
QuintAtomType = "HalvingMetallurgy:sednum"
};
QApi.AddAtomType(Sednum);
Zinc = new()
{
field_2283 = 128, //Id
field_2284 = class_134.method_254("Zinc"), //Non local name
field_2285 = class_134.method_253("Elemental Zinc", string.Empty), //Atomic name
field_2286 = class_134.method_253("Zinc", string.Empty), //Local name
field_2287 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/zinc_symbol"), //Symbol
field_2288 = class_235.method_615("textures/atoms/shadow"), //Shadow
field_2294 = true, //Metal, Enables field_2297
field_2291 = new()
{
field_13 = class_238.field_1989.field_81.field_577, //Diffuse
field_14 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/zinc_lightramp"), //Lightramp
field_15 = class_238.field_1989.field_81.field_613.field_633 //Shiny!
},
field_2297 = Maybe<AtomType>.method_1089(Atoms.Sednum), //Promotion Atom
QuintAtomType = "HalvingMetallurgy:zinc"
};
QApi.AddAtomType(Zinc);
Nickel = new()
{
field_2283 = 127, //Id
field_2284 = class_134.method_254("Nickel"), //Non local name
field_2285 = class_134.method_253("Elemental Nickel", string.Empty), //Atomic name
field_2286 = class_134.method_253("Nickel", string.Empty), //Local name
field_2287 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/nickel_symbol"), //Symbol
field_2288 = class_235.method_615("textures/atoms/shadow"), //Shadow
field_2294 = true, //Metal, Enables field_2297
field_2291 = new()
{
field_13 = class_238.field_1989.field_81.field_577, //Diffuse
field_14 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/nickel_lightramp"), //Lightramp
field_15 = class_238.field_1989.field_81.field_613.field_633 //Shiny!
},
field_2297 = Maybe<AtomType>.method_1089(Atoms.Zinc), //Promotion Atom
QuintAtomType = "HalvingMetallurgy:nickel"
};
QApi.AddAtomType(Nickel);
Vulcan = new()
{
field_2283 = 126, //Id
field_2284 = class_134.method_254("Vulcan"), //Non local name
field_2285 = class_134.method_253("Elemental Vulcan", string.Empty), //Atomic name
field_2286 = class_134.method_253("Vulcan", string.Empty), //Local name
field_2287 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/vulcan_symbol"), //Symbol
field_2288 = class_235.method_615("textures/atoms/shadow"), //Shadow
field_2294 = true, //Metal, Enables field_2297
field_2291 = new()
{
field_13 = class_238.field_1989.field_81.field_577, //Diffuse
field_14 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/vulcan_lightramp"), //Lightramp
field_15 = class_238.field_1989.field_81.field_613.field_633 //Shiny!
},
field_2297 = Maybe<AtomType>.method_1089(Atoms.Nickel), //Promotion Atom
QuintAtomType = "HalvingMetallurgy:vulcan"
};
QApi.AddAtomType(Vulcan);
Wolfram = new()
{
field_2283 = 125, //Id
field_2284 = class_134.method_254("Wolfram"), //Non local name
field_2285 = class_134.method_253("Elemental Wolfram", string.Empty), //Atomic name
field_2286 = class_134.method_253("Wolfram", string.Empty), //Local name
field_2287 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/wolfram_symbol"), //Symbol
field_2288 = class_235.method_615("textures/atoms/shadow"), //Shadow
field_2294 = true, //Metal, Enables field_2297
field_2291 = new()
{
field_13 = class_238.field_1989.field_81.field_577, //Diffuse
field_14 = class_235.method_615("textures/atoms/erikhaag/HalvingMetallurgy/wolfram_lightramp"), //Lightramp
field_15 = class_238.field_1989.field_81.field_613.field_633 //Shiny! (textures/atoms/elements/specular_highlight.png)
},
field_2297 = Maybe<AtomType>.method_1089(Atoms.Vulcan), //Promotion Atom
QuintAtomType = "HalvingMetallurgy:wolfram"
};
QApi.AddAtomType(Wolfram);
Quintessential.Logger.Log("HalvingMetallurgy: Atoms added!");
}

public static void Unload()
{

}
}
Binary file added Content/hm_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions HalvingMetallurgy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using Quintessential;
using ReductiveMetallurgy;

namespace HalvingMetallurgy;

public class HalvingMetallurgy : QuintessentialMod
{
public override void Load()
{

}

public override void PostLoad()
{

}

public override void Unload()
{
Quintessential.Logger.Log("icwass made the dictionaries private and didn't add a remove method.\nSo my atoms are still in there, if this is a problem, reload the game.");
Atoms.Unload();
}

private static bool contentLoaded = false;
public override void LoadPuzzleContent()
{
if (contentLoaded)
{
return;
}
contentLoaded = true;
Quintessential.Logger.Log("HalvingMetallurgy: Loading!");
Atoms.AddAtomTypes();
//ReductiveMetallurgy API
//Add Rejection Rules for new atoms
API.addRejectionRule(Atoms.Osmium, Atoms.Sednum);
API.addRejectionRule(Atoms.Sednum, Atoms.Zinc);
API.addRejectionRule(Atoms.Zinc, Atoms.Nickel);
API.addRejectionRule(Atoms.Nickel, Atoms.Vulcan);
API.addRejectionRule(Atoms.Vulcan, Atoms.Wolfram);
Quintessential.Logger.Log("HalvingMetallurgy: Loading complete, have fun!");
}
}
66 changes: 66 additions & 0 deletions HalvingMetallurgy.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net46</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<LangVersion>10</LangVersion>
</PropertyGroup>

<ItemGroup>
<Reference Include="ReductiveMetallurgy">
<HintPath>..\ReductiveMetallurgy_1.0.1\ReductiveMetallurgy.dll</HintPath>
<CopyLocal>False</CopyLocal>
</Reference>
<Reference Include="Lightning">
<HintPath>..\..\ModdedLightning.exe</HintPath>
<CopyLocal>False</CopyLocal>
</Reference>
<Reference Include="MMHOOK_ModdedLightning">
<HintPath>..\..\MMHOOK_ModdedLightning.dll</HintPath>
<CopyLocal>False</CopyLocal>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>..\..\Mono.Cecil.dll</HintPath>
<CopyLocal>False</CopyLocal>
</Reference>
<Reference Include="MonoMod.RuntimeDetour">
<HintPath>..\..\MonoMod.RuntimeDetour.dll</HintPath>
<CopyLocal>False</CopyLocal>
</Reference>
<Reference Include="MonoMod.Utils">
<HintPath>..\..\MonoMod.Utils.dll</HintPath>
<CopyLocal>False</CopyLocal>
</Reference>
<Reference Include="YamlDotNet">
<HintPath>..\..\YamlDotNet.dll</HintPath>
<CopyLocal>False</CopyLocal>
</Reference>
</ItemGroup>

<ItemGroup>
<Reference Update="System">
<CopyLocal>False</CopyLocal>
</Reference>
</ItemGroup>

<ItemGroup>
<Reference Update="System.Core">
<CopyLocal>False</CopyLocal>
</Reference>
</ItemGroup>

<ItemGroup>
<Reference Update="System.Data">
<CopyLocal>False</CopyLocal>
</Reference>
</ItemGroup>

<ItemGroup>
<Reference Update="System.Drawing">
<CopyLocal>False</CopyLocal>
</Reference>
</ItemGroup>

</Project>
22 changes: 22 additions & 0 deletions HalvingMetallurgy.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35514.174
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HalvingMetallurgy", "HalvingMetallurgy.csproj", "{1C0EC571-186E-44D7-A6C4-7010EB0A912C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1C0EC571-186E-44D7-A6C4-7010EB0A912C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C0EC571-186E-44D7-A6C4-7010EB0A912C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C0EC571-186E-44D7-A6C4-7010EB0A912C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C0EC571-186E-44D7-A6C4-7010EB0A912C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
10 changes: 10 additions & 0 deletions quintessential.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Name: HalvingMetallurgy
Version: 1.0.0
Icon: hm_icon
Desc: Introduces the concept of half promotion, and the associated atoms and gylph.
DLL: "HalvingMetallurgy.dll"
Dependences:
- Name: Quintessential
Version: 0.5.1
- Name: ReductiveMetallurgy
Version: 1.0.1

0 comments on commit 68d796a

Please sign in to comment.