This commit is contained in:
2026-08-18 02:03:34 +08:00
parent d2cd3b9fa8
commit 517c4cf46e
157 changed files with 16536 additions and 37 deletions
@@ -0,0 +1,52 @@
#nullable enable
using Demo2.Domain;
namespace NightShiftProtocol
{
public sealed class NightShiftContent : IDemo2Mod
{
public string Id => "example.night-shift-protocol";
public string Version => "1.0.0";
public void Register(Demo2ContentRegistry registry)
{
registry.AddRecipe(new Demo2RecipeDefinition
{
Id = 100,
Name = "循环冷却",
InputA = Demo2MaterialKind.IronOre,
InputB = Demo2MaterialKind.Energy,
Output = Demo2MaterialKind.Ingot,
InputCountA = 2,
InputCountB = 1,
OutputCount = 2,
ProcessTicks = 34
});
registry.AddMachine(new Demo2MachineDefinition
{
Kind = Demo2MachineKind.NightShiftSmelter,
Name = "夜班熔炉",
Cost = 95,
RecipeId = 100,
Capacity = 16
});
registry.AddRule(new Demo2RuleDefinition
{
Id = "night-shift.continuous-production",
Name = "连续夜班",
Description = "连续完成三次相同配方且无故障时,结算倍率提高 40%。",
Category = Demo2RuleCategory.MachineState,
Instructions =
{
new Demo2RuleInstructionData
{
Opcode = Demo2RuleOpcode.MultiplyMultiplier,
Condition = Demo2RuleCondition.ThreeSameRecipes | Demo2RuleCondition.NoFaults,
Operand = 1400
}
}
});
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e0d4428fa7f5541498beb4e6f3c37022
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,13 @@
{
"name": "NightShiftProtocol.Rules",
"rootNamespace": "NightShiftProtocol",
"references": ["Demo2.Domain"],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": true
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c6cc7202b24d10d48ba0ede46ea9de10
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: