Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions SuperCursor/Localizations/ruRU.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ID,Text,Comment
"LV.SC.Nothing,""Ничего"","
"LV.SC.Stockpile,""Склад"","
"LV.SC.Coord,""Высота: {0} — (X, Y): ({1}, {2})"","
"LV.SC.Water,""Вода"","
"LV.SC.WaterDepth,"" Глубина: {0} см"","
"LV.SC.WaterDepthFrom,"" Глубина: {0} см ({1} см отсюда)"","
"LV.SC.WaterCurrent,"" Течение: {0} см³/с"","
"LV.SC.WaterContamination,"" Загрязнение: {0}%"","
"LV.SC.Dwellers,""Взрослые: {0}, Дети: {1}"","
"LV.SC.WaterSpecifiedStrength,"" Сила: {0} (обычно {1})"","
"LV.SC.WaterStrength,"" Сила: {0}"","
"LV.SC.BeaverChildGrow,""Растёт: {0}/{1} ({2}%)"","
"LV.SC.BlockStat,""Влажность: {0} блоков, Загрязнение: {1}%"","
"LV.SC.KeyBinding,""Супер курсор"","
"LV.SC.BeaverWaterConsumption,"" Вода: {0:F1} л/день"","
"LV.SC.BeaverFoodConsumption,"" Еда: {0:F1} ед/день"","
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace SuperCursor.Services.ObjectDescribers
{
[ServicePriority(25)]
public class BeaverConsumptionDescriber(
ILoc loc
) : IObjectDescriber
{
public void Describe(StringBuilder builder, BaseComponent component)
{
if (component is not Beaver beaver)
return;


if (beaver.TryGetComponent(out Thirst thirst))
{
var waterPerDay = thirst.ConsumptionRate;
builder.AppendLine(loc.T("LV.SC.BeaverWaterConsumption", waterPerDay));
}

if (beaver.TryGetComponent(out Hunger hunger))
{
var foodPerDay = hunger.ConsumptionRate;
builder.AppendLine(loc.T("LV.SC.BeaverFoodConsumption", foodPerDay));
}
}
}
}