TFWR.Api 1.0.1

dotnet add package TFWR.Api --version 1.0.1
                    
NuGet\Install-Package TFWR.Api -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TFWR.Api" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TFWR.Api" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="TFWR.Api" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TFWR.Api --version 1.0.1
                    
#r "nuget: TFWR.Api, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TFWR.Api@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TFWR.Api&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=TFWR.Api&version=1.0.1
                    
Install as a Cake Tool

TFWR.Api

The Farmer Was Replaced 게임 builtins을 미러링한 컴파일 타임 전용 스텁 라이브러리입니다.

C# 농장 스크립트를 작성할 때 IntelliSense와 dotnet build를 쓰기 위한 API 표면을 제공하며, 실제 실행은 TFWRCompiler.NETtfwrc가 인게임 DSL(.py)로 번역한 뒤 게임에서 이루어집니다.

역할

구성 설명
Game Harvest, Move, Plant 등 게임 내장 함수 스텁
enum Direction, Entities, Grounds, Hats, Items, Leaderboards, Unlocks
Drone 드론 핸들 타입 (불투명)
[TfwrEntry] 프로그램 진입점 표시 (또는 Main)

메서드 본문은 호출 시 NotSupportedException을 던집니다. 런타임 구현이 아니며, IDE·컴파일 검증용입니다.

사용법

프로젝트에서 TFWR.Api를 참조하고 using static TFWR.Api.Game;를 사용합니다.

using static TFWR.Api.Game;
using TFWR.Api;

public static class Program
{
    public static void Main()
    {
        while (true)
        {
            if (CanHarvest()) Harvest();
            Move(Direction.North);
        }
    }
}

진입점은 Main, 또는 [TfwrEntry]가 붙은 static 메서드입니다.

[TfwrEntry]
public static void Run()
{
    Till();
    Plant(Entities.Carrot);
}

작성한 .cstfwrc로 컴파일합니다.

dotnet run --project src/tfwrc -- --lang cs --out ./out ./MyFarm/Program.cs

패키지 정보

  • 대상 프레임워크: net10.0
  • XML 문서 파일 포함 (GenerateDocumentationFile)
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TFWR.Api:

Package Downloads
TFWR.Compiler

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 57 9/14/2026
1.0.0 65 9/13/2026