24 lines
734 B
C#
24 lines
734 B
C#
using System;
|
|
using TextRPG.PlayerSystem;
|
|
|
|
namespace TextRPG.Commands
|
|
{
|
|
public class StatusCommand : Command
|
|
{
|
|
public override string Name => "status";
|
|
public override string Description => "Shows player status (health, attributes, inventory count).";
|
|
public override string Usage => "status";
|
|
|
|
public override void Execute(string[] args, Action<string> outputCallback)
|
|
{
|
|
// Use the singleton instance directly
|
|
var player = Player.Instance;
|
|
if (player == null)
|
|
{
|
|
outputCallback("Player system not initialized.");
|
|
return;
|
|
}
|
|
outputCallback(player.GetStatusString());
|
|
}
|
|
}
|
|
} |