🔍 s&box Package Code Search
Search C# source code, UI razor templates, shaders, and configs across s&box packages.
🔗 Raw Facepunch API Link: https://public.facepunch.com/sbox/code/search/1/?ident=dogecoin.niulai&take=20
Showing code results for query:
*
(50 total matches found)
Game
game
namespace NiuLai;
/// <summary>Non-blocking movie mutter. Walk while the grassland talks.</summary>
public static class Chatter
{
public static string Who { get; private set; } = "";
public static string Cn { get; private set; } = "";
public static string En { get; private set; } = "";
public static float Left { get; private set; }
public static int Version { get; private set; }
public static bool Visible => Left > 0f && !string.IsNullOrEmpty( Cn );
public static void Say( string who, Line line, float sec = 2.7f )
{
if ( GameState.Talking || FilmCut.Playing )
return;
if ( string.IsNullOrEmpty( line.Cn ) )
return;
Who = who ?? "";
Cn = line.Cn;
En = line.En ?? "";
Left = sec;
Version++;
}
public static void Tick( float dt )
{
if ( Left <= 0f )
return;
Left -= dt;
if ( Left <= 0f )
{
Left = 0f;
Version++;
}
}
public static Line Pick( Line[] pool )
{
if ( pool is not { Length: > 0 } )
return default;
return pool[Random.Shared.Int( 0, pool.Length - 1 )];
}
}
Game
game
namespace NiuLai;
/// <summary>Scene root. Builds the grassland on play.</summary>
public sealed class GameBootstrap : Component
{
float _stingIn = 0.4f;
protected override void OnStart()
{
Log.Info( $"[Niu Lai] {GameInfo.Package} {GameInfo.VersionLabel} boot" );
GameFlow.ApplyMouse();
Trophies.Unlock( "five_year" );
}
protected override void OnUpdate()
{
if ( _stingIn > 0f )
{
_stingIn -= Time.Delta;
if ( _stingIn <= 0f && GameFlow.Screen == GameScreen.Title )
GameAudio.PlayTitleSting();
}
Trophies.Tick( Time.Delta );
FilmCut.Tick( Time.Delta );
Chatter.Tick( Time.Delta );
if ( GameFlow.Screen == GameScreen.Playing )
{
GameState.Tick( Time.Delta );
CalfPlayer.Instance?.RefreshPrompt();
Trophies.Evaluate();
}
if ( GameFlow.Screen == GameScreen.Title && Input.Pressed( "Submit" ) )
GameFlow.StartNewGame();
}
}
Game
game
namespace NiuLai;
public readonly record struct Line( string Cn, string En );
public static class Lines
{
public static readonly Line[] Opening =
{
new( "刚出生。趴着。站不起来。", "Just born. Lie down. Cannot stand." ),
new( "妈妈说:那就叫你牛来。牛,来。站起来。", "Mama say: then call you Niu Lai. Cow, come. Stand up." ),
new( "牛群已经走了。我们走得比较慢。", "Herd already walk. We walk more slow." ),
new( "饿了就吃草。草是免费的。别睡觉。", "Hungry then eat grass. Grass is free. Don't sleep." ),
};
public static readonly Line[] MomIntro =
{
new( "孩子,慢慢走。妈妈在。", "Child, walk slow. Mama is here." ),
new( "睁开眼睛。别睡觉。", "Open eye. Don't sleep." ),
new( "你慢点。", "You slow a bit." ),
};
public static readonly Line[] MomMilk =
{
new( "豹拉要喝奶?", "Bao La want drink milk?" ),
new( "好。这是妈妈的。杯子有点歪。", "Okay. This is Mama's. Cup a bit crooked." ),
new( "拿去。小心洒了。五年手搓的。", "Take. Careful spill. Five-year handmade." ),
};
public static readonly Line[] MomSlow =
{
new( "你慢点。跑那么快干什么。", "You slow a bit. Run so fast do what." ),
};
public static readonly Line[] MomSleep =
{
new( "睁开眼睛!别睡觉!", "Open eye! Don't sleep!" ),
new( "迁徙不是午睡。", "Migration is not nap." ),
};
public static readonly Line[] Grass =
{
new( "草有点硬。像建模。", "Grass a bit hard. Like the model." ),
new( "吃完感觉自己大了一点。", "After eat I feel I bigger a little." ),
new( "妈妈说草是免费的。", "Mama say grass is free." ),
new( "这一丛和那一丛对不上。", "This tuft and that tuft not meet." ),
new( "再来一丛。勇气在草里。", "One more tuft. Courage inside grass." ),
new( "吃饱了再去不好吗。再吃一口。", "Eat full then go, not better? One more bite." ),
new( "免费的。五年手搓的免费。", "Free. Five-year handmade free." ),
};
public static readonly Line[] GrassBack =
{
new( "草又长回来了。还是免费。", "Grass grow back. Still free." ),
new( "建模刷新了。味道一样。", "Model refresh. Taste same." ),
};
public static readonly Line[] MooLines =
{
new( "哞————", "MOO————" ),
new( "时间会证明牛来的。", "Time will prove Niu Lai." ),
new( "这一声有点歪。", "This moo a bit crooked." ),
new( "院线录音收录了。", "Theater tape record it." ),
};
public static readonly Line[] Gossip =
{
new( "他走得太慢。身份也不对。", "He walk too slow. Identity also not right." ),
new( "豹子为什么跟着。草会被吃完吗。", "Why leopard follow. Grass will eat finish?" ),
new( "听说台车会越来越大。", "Hear cart will more and more big." ),
new( "云雀躺在地上也算飞。", "Lark lie on ground also count as fly." ),
new( "妈妈说别睡觉。他还是睡。", "Mama say don't sleep. He still sleep." ),
};
public static readonly Line[] Orb =
{
new( "树上的球也能吃?有点甜。", "Ball on tree also can eat? A bit sweet." ),
new( "这不是草。但经费说算草。", "This not grass. But budget say count grass." ),
};
public static readonly Line[] MaskCow =
{
new( "我没病。这是建模。", "I not sick. This is the model." ),
new( "口罩是贴上去的。摘不下来。", "Mask is stuck on. Cannot take off." ),
};
public static readonly Line[] ExtraMilk =
{
new( "再来一点。还是少了妈妈的味道。", "A little more. Still missing Mama flavor." ),
new( "爸爸的专属可以续杯吗。", "Papa exclusive can refill?" ),
};
public static readonly Line[] Tail =
{
new( "啊——小绳头!", "Ah — Little Rope-Head!" ),
new( "……是尾巴。豹子的。摸错了。", "……Is tail. Leopard's. Touch wrong." ),
};
public static readonly Line[] CreekFear =
{
new( "水到膝盖。看起来像海。", "Water to knee. Look like ocean." ),
new( "不敢过。小绳头在后面也不敢。", "Dare not cross. Rope-Head behind still dare not." ),
};
public static readonly Line[] Tease =
{
new( "那边有一根绳子在走路。", "Over there one rope is walking." ),
new( "前面有东西倒着。肚子空。", "Front have something fall down. Stomach empty." ),
new( "天上那条线歪了。跟着歪的走。", "Line in sky is crooked. Follow crooked." ),
new( "台车又大了一点。你没看。", "Cart bigger a little. You not look." ),
};
public static readonly Line[] VoidBits =
{
new( "纯黑。很好。不用画树。", "Pure black. Very good. No need draw tree." ),
new( "嗯。", "Ng." ),
new( "经费说这里是内心世界。", "Budget say here is inside heart world." ),
};
public static readonly Line[] LikeHere =
{
new( "反正这儿挺好。我喜欢这儿。", "Anyway here pretty good. I like here." ),
new( "树是球,挂在棍子上。很好看。", "Tree is ball, hang on stick. Very beautiful." ),
new( "你走不动了也可以。先看看。", "You cannot walk also okay. First look." ),
};
public static readonly Line[] Dream =
{
new( "我是云玎。一只云雀。从荒漠飞来。", "I am Yun Ding. I am one lark. Fly from desert." ),
new( "你走不动了。那就做梦。", "You cannot walk. Then you dream." ),
new( "纯黑的背景。经费到这里。", "Pure black background. Budget arrive here." ),
new( "我们做同伴。", "We become companion." ),
new( "愿意到我背上来吗。", "Willing come up on my back?" ),
new( "嗯。", "Ng." ),
};
public static readonly Line[] SnakeBite =
{
new( "嘶——我不是绳子。", "Sss — I am not rope." ),
new( "我也不是鞋带。也不是电线。", "I also not shoelace. Also not wire." ),
new( "我咬了他的手。", "I bite his hand." ),
new( "牛来叫我小绳头。从此他怕蛇。", "Niu Lai call me Little Rope-Head. From now he fear snake." ),
};
public static readonly Line[] Creek =
{
new( "小溪看起来很深。其实到膝盖。", "Creek look very deep. Actually to knee." ),
new( "牛来不敢过。他不会涉水。", "Niu Lai dare not cross. He not know wade." ),
new( "回头。后面是小绳头。", "Look back. Behind is Little Rope-Head." ),
new( "只能跳。跳过去了。他更敢了。", "Only can jump. Jumped. He more brave now." ),
};
public static readonly Line[] TailScare =
{
new( "啊——小绳头!", "Ah — Little Rope-Head!" ),
new( "……是尾巴。豹子的。", "……Is tail. Leopard's." ),
new( "盲人摸象。今天摸到尾巴。", "Blind man touch elephant. Today touch tail." ),
};
public static readonly Line[] Leopard =
{
new( "我是豹拉。好几天没吃。", "I am Bao La. Several day not eat." ),
new( "肚子空。倒在这里。", "Stomach empty. Fall down here." ),
new( "你给我粮食。我不会饿死。", "You give me food. I will not starve." ),
new( "我也想喝奶。有杯子更好。", "I also want drink milk. Have cup more good." ),
new( "我也想保护牛群。", "I also want protect cow group." ),
};
public static readonly Line[] MilkScene =
{
new( "(喝)……少了点妈妈的味道。", "(Drink) ……Missing a little Mama flavor." ),
new( "牛来:这是爸爸的专属。", "Niu Lai: This is Papa's exclusive." ),
new( "豹拉:……哦。", "Bao La: ……Oh." ),
new( "杯子还在。味觉已经毕业。", "Cup still here. Taste already graduate." ),
};
public static readonly Line[] Suspect =
{
new( "我是牛二。跟你一样大。模型不一样。", "I am Niu Er. Same big as you. Model not same." ),
new( "豹子为什么跟着我们。", "Why leopard follow us." ),
new( "他的身份不对。不要信他。", "His identity not right. Don't believe him." ),
new( "肉食的。怎么能保护草。", "Meat eat. How can protect grass." ),
};
public static readonly Line[] RockStare =
{
new( "三只狼。坐着。看一块石头。", "Three wolf. Sit. Look one rock." ),
new( "石头也在看他们。对不上视线。", "Rock also look them. Eye-line not meet." ),
new( "很久。很久。经费在想下一句。", "Long time. Long time. Budget thinking next line." ),
};
public static readonly Line[] WolvesSave =
{
new( "狼来了。真的来了。", "Wolf come. Really come." ),
new( "豹拉一个起跳。抓住树枝。", "Bao La one jump. Grab branch." ),
new( "连续两次向后大回环。体操。", "Two time back giant circle. Gymnastics." ),
new( "用标准动作跳到三只狼面前。", "Use standard move jump to three wolf front." ),
new( "牛群却说:他是跟狼一伙的。", "Herd say: he is with the wolf." ),
};
public static readonly Line[] Ban =
{
new( "不许再跟着。", "Not allow follow anymore." ),
new( "豹拉还是来。狼来的时候他还挡。", "Bao La still come. When wolf come he still block." ),
new( "牛来看见了。牛群没看见。", "Niu Lai see it. Herd not see." ),
new( "身份不对。所以看不见。", "Identity not right. So cannot see." ),
};
public static readonly Line[] MomFarewell =
{
new( "峡谷里本该休息。狼又来了。", "In canyon should rest. Wolf come again." ),
new( "豹拉不在。他被赶走了。", "Bao La not here. They drive him away." ),
new( "孩子,往前跑。不要回头。", "Child, run forward. Don't look back." ),
new( "妈妈去挡住。过后会合。", "Mama go block. Later we meet." ),
new( "你要长大。牛,来。", "You must grow up. Cow, come." ),
};
public static readonly Line[] Cart =
{
new( "台车越来越大。像一列火车。", "The cart become more and more big. Like one train." ),
new( "云玎说:别对抗。", "Yun Ding say: don't fight." ),
new( "牛来不听。时间会证明牛来的。", "Niu Lai no listen. Time will prove Niu Lai." ),
new( "哞————", "MOO————" ),
new( "再哞。再再哞。它还在长。", "Moo again. Moo again again. It still grow." ),
};
public static readonly Line[] Farewell =
{
new( "又是纯黑的背景。", "Again pure black background." ),
new( "云玎,谢谢你。一路看着。", "Yun Ding, thank you. Whole road watching." ),
new( "嗯。", "Ng." ),
new( "梦该醒了。", "Dream should wake." ),
};
public static readonly Line[] Wake =
{
new( "梦醒了。牛来站稳了。", "Dream wake. Niu Lai stand stable." ),
new( "原来从直立走开始就是梦。", "Turns out from walk upright already is dream." ),
new( "抬头。云雀在天上画一条线。", "Look up. Lark in sky draw one line." ),
new( "跟着她的飞行轨迹走。", "Follow her fly line walk." ),
};
public static readonly Line[] Dad =
{
new( "我是牛爸爸。族群首领。", "I am Cow Father. Herd boss." ),
new( "你回来了。站起来了。", "You come back. You stand up." ),
new( "走吧。我们一起走。", "Walk. We walk together." ),
new( "雨后轻风有香。", "After rain, light wind have fragrance." ),
};
public static readonly Line[] Ending =
{
new( "梦醒了。牛来站稳了。", "Dream wake. Niu Lai stand stable." ),
new( "云雀在天上画一条线。", "Lark in sky draw one line." ),
new( "妈妈的风还在。豹拉也还在风里。", "Mama's wind still here. Bao La also in the wind." ),
new( "台车停了。石头还在看狼。", "Cart stop. Rock still look at wolf." ),
new( "雨后轻风有香。", "After rain, light wind have fragrance." ),
};
public static readonly Line[] TimeProve =
{
new( "时间会证明牛来的。", "Time will prove Niu Lai." ),
};
public static readonly Line[] EatFirst =
{
new( "吃饱了再去不好吗。", "Eat full then go, not better?" ),
new( "草还在。路也还在。", "Grass still here. Road also still here." ),
};
public static readonly Line[] TooClose =
{
new( "第一,他不能离牛群太近。", "First, he cannot leave cow group too near." ),
new( "第二,身份不对。", "Second, identity not right." ),
new( "第三,我们还没想好第三。", "Third, we not yet think of third." ),
};
public static readonly Line[] Protect =
{
new( "急什么。我来保护你们。", "Rush what. I come protect you." ),
new( "(脸贴过来。院线在笑。)", "(Face come close. Theater is laughing.)" ),
};
public static readonly Line[] Headbutt =
{
new( "我喜欢顶脑门儿。你是怎么知道的。", "I like bump forehead. How you know." ),
new( "(两个模型对不齐。还是顶了。)", "(Two model not align. Still bump.)" ),
};
public static readonly Line[] NoRoad =
{
new( "没路了。", "No road anymore." ),
new( "台车把路吃了。它还在长。", "Cart eat the road. It still grow." ),
new( "云玎说别对抗。牛来说哞。", "Yun Ding say don't fight. Niu Lai say moo." ),
};
public static readonly Line[] CardOpen =
{
new( "第一场 · 睁开眼睛", "Scene 1 · Open eye" ),
};
public static Line Quest( Beat beat ) => beat switch
{
Beat.Migrate => new( "再吃一丛。草会回来。然后找云玎。她喜欢这儿。", "Eat one more tuft. Grass come back. Then find Yun Ding. She like here." ),
Beat.Dream => new( "纯黑里,听完云玎。愿意到她背上来吗。", "In the black, finish listen Yun Ding. Willing come up on back?" ),
Beat.Snake => new( "草原深处有一条小绳头。走近。它不是绳子。", "Deep grass have one Little Rope-Head. Walk near. It is not rope." ),
Beat.Creek => new( "溪水很深(到膝盖)。回头。然后跳。", "Creek very deep (to knee). Look back. Then jump." ),
Beat.Night => new( "豹拉饿了。先找妈妈要奶,再分草给他。", "Bao La hungry. First get milk from Mama, then share grass." ),
Beat.Suspect => new( "去听牛二说豹拉身份不对。", "Go hear Niu Er say Bao La identity not right." ),
Beat.Wolves => new( "三只狼在看石头。走过去。豹拉会体操。", "Three wolf look at rock. Walk over. Bao La do gymnastics." ),
Beat.Ban => new( "牛群要赶走豹拉。去看一眼。", "Herd want drive Bao La away. Go look." ),
Beat.Canyon => new( "到峡谷。听妈妈把话说完。不要回头。", "Go canyon. Let Mama finish. Don't look back." ),
Beat.Cart => new( "台车越来越大。对着它哞。再哞。再哞。", "Cart more and more big. Moo at it. Moo again. Moo again." ),
Beat.Farewell => new( "纯黑里,和云玎道别。", "In the black, say goodbye to Yun Ding." ),
Beat.Wake => new( "跟着天上那条歪线,往北走。", "Follow that crooked line in sky, walk north." ),
Beat.Reunion => new( "去找牛爸爸。一起走。", "Go find Cow Father. Walk together." ),
_ => new( "雨后轻风有香。", "After rain, light wind have fragrance." )
};
}
Game
game
ColorPickerControl
{
flex-direction: column;
flex-shrink: 0;
gap: 0.5rem;
margin: 1rem;
}
Game
game
.package-list
{
flex-shrink: 1;
flex-wrap: wrap;
flex-grow: 1;
h1
{
width: 100%;
margin-top: 50px;
font-size: 40px;
}
PackageCard
{
&:hover
{
sound-in: "ui.button.over";
}
}
VirtualGrid
{
width: 100%;
height: 100%;
.cell
{
}
}
}
Game
game
@import "/styles/_theme.scss";
.packagefilter
{
width: 100%;
flex-shrink: 0;
.left
{
flex-grow: 1;
flex-shrink: 0;
gap: 16px;
}
.right
{
flex-grow: 1;
flex-shrink: 0;
gap: 16px;
}
}
.packagefilter textentry
{
flex-grow: 1;
padding: 8px 12px;
pointer-events: all;
Label
{
margin-left: 26px;
}
iconpanel
{
position: absolute;
left: 12px;
opacity: 0.3;
font-size: $text-large;
}
}
.packagefilterfacet, .packagefilter textentry
{
background-color: rgba($default-950, 0.3);
color: $default-text;
outline: 1px solid $default-border;
transition: all 150ms $easing;
border-radius: $rounding-default;
padding: 4px 12px;
gap: 16px;
flex-shrink: 0;
font-size: 14px;
cursor: pointer;
align-items: center;
.clear-button
{
height: 100%;
margin-right: -8px;
align-items: center;
padding: 0px 4px;
&:hover
{
color: red;
border-radius: 100%;
}
}
&.is-active
{
background-color: $default-700;
}
&:not(.is-active)
{
&:hover
{
outline: 1px solid $default-50;
}
}
}
Game
game
namespace NiuLai;
/// <summary>
/// Janky in-engine cutscenes. Theater mud + crowd laugh. No film stills.
/// E skips a shot. Camera slams. Models slide.
/// </summary>
public enum CutId
{
None,
OpenEyes,
LarkBack,
EatFirst,
LeopardFace,
MilkDad,
TooClose,
Headbutt,
NoRoad,
Ng
}
public static class FilmCut
{
public static bool Playing { get; private set; }
public static CutId Id { get; private set; }
public static int Shot { get; private set; }
public static int Version { get; private set; }
public static string CardCn { get; private set; } = "";
public static string CardEn { get; private set; } = "";
static float _t;
static float _hold;
static int _shots;
static Action _done;
static Vector3 _camPos;
static Rotation _camRot;
static GameObject _focus;
static bool _tipped;
public static void Play( CutId id, Action done = null )
{
if ( id == CutId.None )
return;
Id = id;
Playing = true;
Shot = 0;
_t = 0;
_done = done;
_tipped = false;
CardCn = "";
CardEn = "";
_shots = id switch
{
CutId.OpenEyes => 3,
CutId.LarkBack => 2,
CutId.EatFirst => 1,
CutId.LeopardFace => 2,
CutId.MilkDad => 2,
CutId.TooClose => 2,
CutId.Headbutt => 2,
CutId.NoRoad => 2,
CutId.Ng => 2,
_ => 1
};
BeginShot();
Version++;
}
public static void Skip()
{
if ( !Playing )
return;
AdvanceShot();
}
public static void Tick( float dt )
{
if ( !Playing )
return;
_t += dt;
Animate();
AimCamera();
if ( _t >= _hold )
AdvanceShot();
}
static void AdvanceShot()
{
Shot++;
if ( Shot >= _shots )
{
End();
return;
}
_t = 0;
BeginShot();
Version++;
}
static void BeginShot()
{
_hold = 3.4f;
_focus = null;
CardCn = "";
CardEn = "";
switch ( Id )
{
case CutId.OpenEyes:
if ( Shot == 0 )
{
CardCn = "第一场 · 睁开眼睛";
CardEn = "Scene 1 · Open your eyes";
_hold = 2.2f;
GameAudio.PlayClip( GameAudio.NameNiu, 0.85f );
}
else if ( Shot == 1 )
{
TipPlayer( true );
_focus = CalfPlayer.Instance?.GameObject;
_hold = 4.2f;
GameState.Talk( "牛妈妈 / Mama", Lines.MomSleep );
GameAudio.PlayClip( GameAudio.MamaWake );
GameAudio.PlayCrowd( GameAudio.CrowdWake );
}
else
{
TipPlayer( false );
_focus = CalfPlayer.Instance?.GameObject;
_hold = 1.6f;
GameAudio.PlayClip( GameAudio.Stand, 0.9f );
}
break;
case CutId.LarkBack:
if ( Shot == 0 )
{
CardCn = "愿意到我背上来吗";
CardEn = "Willing come up on my back?";
_hold = 2.0f;
}
LieNamed( "lark", true );
_focus = Named( "lark" );
if ( Shot == 1 )
{
_hold = 4.6f;
GameState.Talk( "云玎 / Yun Ding", Lines.Dream );
GameAudio.PlayClip( GameAudio.LarkRide );
GameAudio.PlayCrowd( GameAudio.CrowdRide );
}
break;
case CutId.EatFirst:
CardCn = "吃饱了再去不好吗";
CardEn = "Eat full then go, not better?";
_focus = Named( "mom" ) ?? CalfPlayer.Instance?.GameObject;
_hold = 3.8f;
GameState.Talk( "牛妈妈 / Mama", Lines.EatFirst );
GameAudio.PlayClip( GameAudio.SlowDown );
break;
case CutId.LeopardFace:
if ( Shot == 0 )
{
CardCn = "豹拉特写 · 院线在笑";
CardEn = "Bao La close-up · theater laughing";
_hold = 1.8f;
}
_focus = Named( "leopard" );
if ( Shot == 1 )
{
_hold = 5.0f;
GameState.Talk( "豹拉 / Bao La", Lines.Protect );
GameAudio.PlayClip( GameAudio.Leopard );
GameAudio.PlayCrowd( GameAudio.CrowdBig );
}
break;
case CutId.MilkDad:
if ( Shot == 0 )
{
CardCn = "少了点妈妈的味道";
CardEn = "Missing a little Mama flavor";
_hold = 1.8f;
GameAudio.PlayClip( GameAudio.Milk );
}
_focus = Named( "leopard" );
if ( Shot == 1 )
{
_hold = 5.2f;
GameState.Talk( "豹拉 / Bao La", Lines.MilkScene );
GameAudio.PlayCrowd( GameAudio.CrowdMilk );
}
break;
case CutId.TooClose:
if ( Shot == 0 )
{
CardCn = "第一,他不能离牛群太近";
CardEn = "First, he cannot leave herd too near";
_hold = 2.0f;
}
_focus = Named( "niuer" ) ?? Named( "dad" );
if ( Shot == 1 )
{
_hold = 4.4f;
GameState.Talk( "牛二 / Niu Er", Lines.TooClose );
GameAudio.PlayClip( GameAudio.SlowDown );
GameAudio.PlayCrowd( GameAudio.CrowdMilk );
}
break;
case CutId.Headbutt:
CardCn = "我喜欢顶脑门儿";
CardEn = "I like bump forehead";
_focus = Named( "leopard" );
_hold = Shot == 0 ? 1.6f : 4.0f;
if ( Shot == 1 )
{
GameState.Talk( "豹拉 / Bao La", Lines.Headbutt );
GameAudio.PlayClip( GameAudio.LikeHere );
GameAudio.PlayCrowd( GameAudio.CrowdBig );
}
break;
case CutId.NoRoad:
if ( Shot == 0 )
{
CardCn = "没路了";
CardEn = "No road anymore";
_hold = 2.2f;
GameAudio.PlayClip( GameAudio.CartGrow );
}
_focus = Named( "cart" );
if ( Shot == 1 )
{
_hold = 4.6f;
GameState.Talk( "旁白 / Narrator", Lines.NoRoad );
GameAudio.PlayCrowd( GameAudio.CrowdCart );
}
break;
case CutId.Ng:
if ( Shot == 0 )
{
CardCn = "嗯";
CardEn = "Ng.";
_hold = 1.6f;
}
LieNamed( "lark", false );
_focus = Named( "lark" );
if ( Shot == 1 )
{
_hold = 4.2f;
GameState.Talk( "云玎 / Yun Ding", Lines.Farewell );
GameAudio.PlayClip( GameAudio.LarkNg );
GameAudio.PlayCrowd( GameAudio.CrowdNg );
}
break;
}
}
static void Animate()
{
if ( Id == CutId.Headbutt && _focus.IsValid() && CalfPlayer.Instance.IsValid() )
{
var a = CalfPlayer.Instance.WorldPosition;
var b = _focus.WorldPosition;
var mid = (a + b) * 0.5f;
var bump = MathF.Sin( _t * 10f ) * 8f;
CalfPlayer.Instance.WorldPosition = mid + Vector3.Left * (18f + bump);
_focus.WorldPosition = mid + Vector3.Right * (18f - bump);
}
if ( Id == CutId.Ng && _focus.IsValid() )
{
_focus.WorldPosition = GameState.DreamPos + new Vector3( 0, 0, 40f + MathF.Sin( _t * 2f ) * 8f );
_focus.WorldRotation = Rotation.FromYaw( _t * 40f ) * Rotation.FromRoll( 18f );
}
}
static void AimCamera()
{
var cam = CalfPlayer.Instance?.Scene?.Camera;
if ( cam is null || !cam.IsValid() )
return;
var target = _focus.IsValid() ? _focus.WorldPosition : (CalfPlayer.Instance?.WorldPosition ?? Vector3.Zero);
target += Vector3.Up * (Id == CutId.LeopardFace ? 22f : 28f);
var dist = Id switch
{
CutId.LeopardFace => 38f,
CutId.OpenEyes => 42f,
CutId.LarkBack => 55f,
CutId.Ng => 90f,
CutId.NoRoad => 220f,
_ => 70f
};
var side = Id == CutId.LarkBack ? 10f : 16f;
var height = Id == CutId.LarkBack ? 12f : 22f;
if ( Id == CutId.Ng )
height = 8f;
_camPos = target - Vector3.Forward * dist + Vector3.Right * side + Vector3.Up * height;
if ( Id == CutId.NoRoad )
_camPos = target + new Vector3( -180, -140, 90 );
if ( Id == CutId.Ng )
_camPos = target + new Vector3( 0, -70, 10 );
var look = (target - _camPos);
if ( look.Length > 1f )
_camRot = Rotation.LookAt( look, Vector3.Up );
cam.WorldPosition = _camPos;
cam.WorldRotation = _camRot;
if ( GameState.InVoid || Id == CutId.Ng )
cam.BackgroundColor = Color.Black;
}
static void End()
{
Playing = false;
var done = _done;
var id = Id;
Id = CutId.None;
_done = null;
CardCn = "";
CardEn = "";
LieNamed( "lark", false );
TipPlayer( false );
Version++;
done?.Invoke();
if ( id == CutId.LarkBack )
GameState.EnterDreamFromCut();
else if ( id == CutId.Ng )
GameState.FinishFarewellCut();
}
static void TipPlayer( bool down )
{
var p = CalfPlayer.Instance;
if ( !p.IsValid() )
return;
_tipped = down;
p.WorldRotation = down
? Rotation.FromPitch( 80f )
: Rotation.FromYaw( p.WorldRotation.Yaw() );
}
static void LieNamed( string name, bool lie )
{
var go = Named( name );
if ( !go.IsValid() )
return;
go.WorldRotation = lie
? Rotation.FromRoll( 90f ) * Rotation.FromPitch( 20f )
: Rotation.Identity;
}
static GameObject Named( string name )
{
if ( WorldBuilder.Stage.TryGetValue( name, out var go ) && go.IsValid() )
return go;
return null;
}
}
Game
game
namespace NiuLai;
public static class Primitives
{
public const string Box = "models/dev/box.vmdl";
public const string Plane = "models/dev/plane.vmdl";
public const string Citizen = "models/citizen/citizen.vmdl";
public const string DefaultMat = "materials/default.vmat";
static Model _box;
static Model _plane;
static Model _citizen;
static Material _mat;
public static Model BoxModel => _box ??= Model.Load( Box );
public static Model PlaneModel => _plane ??= Model.Load( Plane );
public static Model CitizenModel => _citizen ??= Model.Load( Citizen );
public static Material TintMat => _mat ??= Material.Load( DefaultMat );
public static GameObject BoxAt( string name, Vector3 pos, Vector3 scale, Color tint, GameObject parent = null, bool collider = true )
{
var go = new GameObject( true, name );
if ( parent is not null )
go.SetParent( parent, false );
go.LocalPosition = parent is null ? default : pos;
if ( parent is null )
go.WorldPosition = pos;
go.LocalScale = scale;
var mr = go.Components.Create<ModelRenderer>();
mr.Model = BoxModel;
mr.MaterialOverride = TintMat;
mr.Tint = tint;
if ( collider )
{
var col = go.Components.Create<BoxCollider>();
col.Scale = new Vector3( 50, 50, 50 );
col.Static = parent is null;
}
return go;
}
public static GameObject PlaneAt( string name, Vector3 pos, Vector3 scale, Color tint, bool collider = true )
{
var go = new GameObject( true, name );
go.WorldPosition = pos;
go.LocalScale = scale;
var mr = go.Components.Create<ModelRenderer>();
mr.Model = PlaneModel;
mr.MaterialOverride = TintMat;
mr.Tint = tint;
if ( collider )
{
var col = go.Components.Create<BoxCollider>();
col.Center = new Vector3( 0, 0, -4 );
col.Scale = new Vector3( 100, 100, 8 );
col.Static = true;
}
return go;
}
public static GameObject Person( string name, Vector3 pos, Color tint, float scale = 1f )
{
var go = new GameObject( true, name );
go.WorldPosition = pos;
go.LocalScale = scale;
try
{
var skin = go.Components.Create<SkinnedModelRenderer>();
skin.Model = CitizenModel;
skin.Tint = tint;
skin.UseAnimGraph = true;
}
catch
{
BoxAt( "body", Vector3.Up * 36 * scale, new Vector3( 0.4f, 0.25f, 0.9f ) * scale, tint, go, false );
}
var col = go.Components.Create<BoxCollider>();
col.Center = Vector3.Up * 36 * scale;
col.Scale = new Vector3( 20, 20, 72 ) * scale;
col.Static = true;
return go;
}
}
Game
game
menupanel
{
position: absolute;
z-index: 1000;
pointer-events: all;
font-size: 12px;
flex-shrink: 0;
.background
{
position: absolute;
left: -5000px;
right: -5000px;
top: -5000px;
bottom: -5000px;
}
> .inner
{
min-width: 200px;
min-height: 20px;
flex-direction: column;
font-family: Poppins;
font-weight: bold;
border-radius: 10px;
box-shadow: 5px 5px 30px #000e;
background-color: #2a2a2a;
flex-shrink: 0;
.spacer
{
height: 1px;
background-color: #0005;
}
.option
{
color: #fffa;
padding: 0px 8px;
cursor: pointer;
flex-shrink: 0;
height: 32px;
&:first-child
{
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
&:last-child
{
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
.icon
{
padding: 8px;
font-family: Material Icons;
justify-content: center;
align-items: center;
flex-shrink: 0;
}
.text
{
padding: 8px;
flex-shrink: 0;
}
&:hover
{
background-color: #3472e6;
color: #f5f8fe;
}
}
}
}
Game
game
.dropdown
{
gap: 2px;
flex-grow: 1;
cursor: pointer;
justify-content: flex-end;
align-items: center;
padding: 0px 12px;
.button-right-column
{
flex-grow: 1;
}
}
Game
game
.switchcontrol
{
flex-direction: row;
width: 100px;
min-height: 24px;
align-items: center;
cursor: pointer;
.switch-frame
{
flex-grow: 0;
flex-shrink: 1;
width: 48px;
height: 16px;
background-color: #fff1;
margin: 0px 5px;
align-items: center;
border-radius: 100px;
transition: all 0.4s linear;
.switch-inner
{
position: relative;
flex-grow: 0;
flex-shrink: 1;
background-color: #999;
width: 25px;
height: 25px;
border-radius: 100px;
left: 20%;
transform: translateX( -50% );
transition: all 0.3s ease-out;
}
}
&.active
{
.switch-frame
{
background-color: #fffa;
}
.switch-inner
{
left: 80%;
background-color: #fff;
}
}
}
Game
game
.colorproperty
{
align-items: center;
position: relative;
.colorsquare
{
width: 20px;
height: 20px;
border-radius: 4px;
margin-right: 8px;
position: absolute;
left: 7px;
z-index: 1;
cursor: pointer;
}
> .textentry:not( .a.b.c )
{
padding-left: 36px;
}
}
Game
game
VectorControl
{
gap: 2px;
flex-grow: 1;
}
VectorControl NumberEntry
{
flex-basis: 50%;
}
Game
game
ColorAlphaControl
{
gap: 0.5rem;
flex-grow: 1;
pointer-events: all;
background: linear-gradient( to right, black, white );
border-radius: 4px;
padding: 2px;
height: 12px;
position: relative;
cursor: pointer;
border: 1px solid #333;
&:hover
{
border: 1px solid #08f;
}
&:active
{
border: 1px solid #fff;
}
.handle
{
top: -5px;
bottom: -5px;
aspect-ratio: 1;
border-radius: 100px;
border: 2px solid #444;
position: absolute;
background-color: white;
box-shadow: 2px 2px 16px #000a;
transform: translateX( -50% );
pointer-events: none;
}
}
Game
game
ControlSheetGroupHeader
{
font-size: 1.33rem;
color: red;
gap: 2px;
align-items: center;
&.hidden
{
display: none;
}
> .title
{
font-weight: 600;
}
&.has-toggle
{
cursor: pointer;
opacity: 0.8;
&:before
{
content: ' ';
width: 22px;
height: 22px;
background-color: #000a;
align-items: center;
justify-content: center;
text-align: center;
border-radius: 5px;
border: 1px solid #555;
}
&:hover
{
opacity: 1;
&:before
{
border-color: #888;
}
}
&.checked
{
> .title
{
color: white;
}
&:before
{
content: '✓';
font-weight: bold;
color: #08f;
border-color: #08f;
}
}
}
}
Game
game
global using Sandbox; global using Sandbox.UI; global using System; global using System.Collections.Generic; global using System.Linq;
Game
game
namespace NiuLai;
public sealed class CalfPlayer : Component
{
public static CalfPlayer Instance { get; set; }
[Property] public float WalkSpeed { get; set; } = 220f;
[Property] public float RunSpeed { get; set; } = 340f;
[Property] public float JumpSpeed { get; set; } = 340f;
float _yaw = 180f;
float _pitch = 18f;
Vector3 _vel;
bool _grounded;
float _bob;
float _jumpDelay = -1f;
float _jankTimer;
float _idle;
float _nagCool;
GameObject _mesh;
protected override void OnAwake()
{
Instance = this;
}
protected override void OnDestroy()
{
if ( Instance == this )
Instance = null;
}
protected override void OnStart()
{
_mesh = CowMesh.Build( GameObject, CowMesh.Calf, 1f );
}
protected override void OnUpdate()
{
if ( Input.EscapePressed )
{
Input.EscapePressed = false;
if ( GameState.Talking )
GameState.ClearTalk();
else
GameFlow.TogglePause();
}
if ( GameFlow.BlocksWorld )
return;
var look = Input.AnalogLook;
_yaw += look.yaw;
_pitch = MathX.Clamp( _pitch + look.pitch, -8f, 42f );
if ( FilmCut.Playing )
{
if ( PressedUse() )
{
if ( GameState.Talking )
GameState.AdvanceTalk();
FilmCut.Skip();
}
return;
}
if ( GameState.Talking )
{
if ( PressedUse() )
GameState.AdvanceTalk();
return;
}
if ( PressedUse() )
TryUse();
if ( Input.Pressed( "Moo" ) || Input.Pressed( "moo" ) )
Moo();
}
protected override void OnFixedUpdate()
{
if ( GameFlow.BlocksWorld || GameState.Talking )
{
_vel = _vel.WithX( 0 ).WithY( 0 );
ApplyGravity( Time.Delta );
Slide();
return;
}
var dt = Time.Delta;
var analog = Input.AnalogMove.WithZ( 0 );
var cam = Rotation.FromYaw( _yaw );
var wish = cam * analog;
if ( wish.Length > 1f )
wish = wish.Normal;
var speed = Input.Down( "Run" ) ? RunSpeed : WalkSpeed;
speed *= GameState.WalkMul;
if ( GameState.InVoid )
speed *= 0.55f;
_vel.x = wish.x * speed;
_vel.y = wish.y * speed;
if ( wish.Length > 0.1f )
{
var face = Rotation.LookAt( wish.WithZ( 0 ), Vector3.Up );
WorldRotation = Rotation.Slerp( WorldRotation, face, 1f - MathF.Pow( 0.001f, dt ) );
_bob += dt * 9f;
_idle = 0;
if ( Input.Down( "Run" ) && _nagCool <= 0f && GameState.Beat == Beat.Migrate )
{
_nagCool = 10f;
Chatter.Say( "牛妈妈 / Mama", Chatter.Pick( Lines.MomSlow ) );
GameAudio.PlayClip( GameAudio.SlowDown, 0.7f );
}
}
else
{
_bob = 0;
_idle += dt;
if ( _idle > 7.5f && _nagCool <= 0f )
{
_idle = 0;
_nagCool = 12f;
Chatter.Say( "牛妈妈 / Mama", Chatter.Pick( Lines.MomSleep ) );
GameAudio.PlayClip( GameAudio.MamaWake, 0.75f );
}
}
_nagCool -= dt;
if ( _jumpDelay >= 0f )
{
_jumpDelay -= dt;
if ( _jumpDelay <= 0f && _grounded )
{
_vel.z = JumpSpeed;
_grounded = false;
_jumpDelay = -1f;
}
}
else if ( _grounded && Input.Pressed( "Jump" ) )
{
// Movie jank: the calf thinks about jumping, then hops too hard.
_jumpDelay = 0.16f;
Trophies.Unlock( "think_jump" );
}
ApplyGravity( dt );
Slide();
UpdateMesh();
UpdateCamera( dt );
WatchBeats();
}
void WatchBeats()
{
if ( GameState.Beat == Beat.Migrate && GameState.GrassEaten < 1 && WorldPosition.x > 240f )
{
WorldPosition = WorldPosition.WithX( 230f );
if ( !GameState.DidEatNag )
{
GameState.MarkEatNag();
FilmCut.Play( CutId.EatFirst );
}
else
{
Chatter.Say( "牛妈妈 / Mama", Chatter.Pick( Lines.EatFirst ) );
}
}
if ( GameState.Beat == Beat.Creek && !GameState.CreekJumped && WorldPosition.x > 500f )
GameState.JumpCreek();
if ( GameState.Beat == Beat.Wake && WorldPosition.y > 280f )
Trophies.Unlock( "fly_line" );
if ( !GameState.SawTail && GameState.Beat >= Beat.Night && GameState.Beat < Beat.Farewell )
{
if ( WorldBuilder.Stage.TryGetValue( "leopard", out var leo ) && leo.IsValid() )
{
if ( (WorldPosition - leo.WorldPosition).Length < 85f )
{
GameState.MarkTail();
Chatter.Say( "牛来 / Niu Lai", Chatter.Pick( Lines.Tail ), 3.3f );
GameAudio.PlayClip( GameAudio.Snake, 0.85f );
}
}
}
if ( _nagCool <= 0f && !GameState.Talking )
{
if ( GameState.Beat == Beat.Snake && WorldPosition.x > 220f && WorldPosition.x < 300f )
{
_nagCool = 16f;
Chatter.Say( "旁白 / Narrator", Lines.Tease[0] );
}
else if ( GameState.Beat == Beat.Night && WorldPosition.x > 640f )
{
_nagCool = 16f;
Chatter.Say( "旁白 / Narrator", Lines.Tease[1] );
}
else if ( GameState.Beat == Beat.Wake && WorldPosition.y > 120f )
{
_nagCool = 16f;
Chatter.Say( "云玎 / Yun Ding", Lines.Tease[2] );
}
else if ( GameState.Beat == Beat.Cart && WorldPosition.x > 700f )
{
_nagCool = 16f;
Chatter.Say( "旁白 / Narrator", Lines.Tease[3] );
}
}
}
void ApplyGravity( float dt )
{
if ( !_grounded )
_vel.z -= 900f * dt;
}
void Slide()
{
var dt = Time.Delta;
if ( GameState.WantHop )
{
GameState.WantHop = false;
_vel.z = 420f;
_grounded = false;
}
var next = WorldPosition + _vel * dt;
if ( !GameState.CreekJumped && next.x > 400f && next.x < 480f && GameState.Beat is Beat.Creek or Beat.Snake )
{
next.x = 400f;
_vel.x = 0;
if ( _nagCool <= 0f )
{
_nagCool = 5f;
Chatter.Say( "牛来 / Niu Lai", Chatter.Pick( Lines.CreekFear ) );
}
}
var wall = Scene.Trace.Ray( WorldPosition + Vector3.Up * 20f, next + Vector3.Up * 20f )
.IgnoreGameObjectHierarchy( GameObject )
.Radius( 14f )
.Run();
if ( wall.Hit )
next = WorldPosition + (next - WorldPosition) * MathF.Max( wall.Fraction - 0.05f, 0f );
var downFrom = next + Vector3.Up * 48f;
var ground = Scene.Trace.Ray( downFrom, next + Vector3.Down * 80f )
.IgnoreGameObjectHierarchy( GameObject )
.Run();
if ( ground.Hit )
{
next = ground.EndPosition;
_grounded = _vel.z <= 20f;
if ( _vel.z < 0f )
_vel.z = 0f;
}
else
{
_grounded = false;
}
WorldPosition = next;
}
void UpdateMesh()
{
if ( !_mesh.IsValid() )
return;
var g = GameState.Growth;
_mesh.LocalScale = g;
var stiff = MathF.Sin( _bob ) * 8f;
_mesh.LocalRotation = new Angles( stiff, 0, MathF.Sin( _bob * 0.5f ) * 3f );
_mesh.LocalPosition = Vector3.Up * MathF.Abs( MathF.Sin( _bob ) ) * 3f;
}
void UpdateCamera( float dt )
{
if ( !Scene.Camera.IsValid() )
return;
_jankTimer -= dt;
var hitch = _jankTimer > 0f ? 8f : 0f;
if ( Random.Shared.Float() < 0.004f )
_jankTimer = 0.08f;
var rot = Rotation.From( _pitch, _yaw, hitch );
var head = WorldPosition + Vector3.Up * (48f * GameState.Growth + 16f);
var desired = head - rot.Forward * (170f + GameState.Growth * 20f) + rot.Right * 12f;
var camHit = Scene.Trace.Ray( head, desired )
.IgnoreGameObjectHierarchy( GameObject )
.Run();
if ( camHit.Hit )
desired = camHit.EndPosition + camHit.Normal * 6f;
Scene.Camera.WorldPosition = desired;
Scene.Camera.WorldRotation = rot;
}
void TryUse()
{
Hotspot best = null;
var bestD = float.MaxValue;
foreach ( var hs in Scene.GetAllComponents<Hotspot>() )
{
if ( !hs.IsValid() || !hs.InRange( WorldPosition ) )
continue;
var d = (hs.WorldPosition - WorldPosition).Length;
if ( d < bestD )
{
bestD = d;
best = hs;
}
}
best?.Use();
}
void Moo()
{
Trophies.Unlock( "moo" );
Hotspot near = null;
var best = float.MaxValue;
foreach ( var hs in Scene.GetAllComponents<Hotspot>() )
{
if ( !hs.IsValid() )
continue;
var d = (hs.WorldPosition - WorldPosition).Length;
if ( d < best && d < 110f )
{
best = d;
near = hs;
}
}
GameState.MooWorld( near?.Id );
}
public void RefreshPrompt()
{
if ( GameFlow.BlocksWorld || GameState.Talking )
return;
Hotspot best = null;
var bestD = float.MaxValue;
foreach ( var hs in Scene.GetAllComponents<Hotspot>() )
{
if ( !hs.IsValid() || !hs.InRange( WorldPosition ) )
continue;
var d = (hs.WorldPosition - WorldPosition).Length;
if ( d < bestD )
{
bestD = d;
best = hs;
}
}
if ( best is null )
{
GameState.SetPrompt( "", "" );
return;
}
GameState.SetPrompt( $"按 E {best.LabelCn}", $"E {best.LabelEn}" );
}
static bool PressedUse() =>
Input.Pressed( "Use" ) || Input.Pressed( "use" ) || Input.Pressed( "Submit" ) || Input.Pressed( "submit" );
}
Game
game
$primary: red !default;
$primary-alt: white !default;
$switch-padding: 6px !default;
.coloreditor
{
flex-direction: column;
min-width: 250px;
max-width: 250px;
> .canvas
{
border-top: 1px solid rgba( white, 0.5 );
flex-grow: 1;
flex-direction: column;
padding: 10px 15px;
> textentry.textentry
{
flex-grow: 0;
flex-shrink: 0;
width: auto;
}
}
.slider
{
padding: 6.5px;
}
.slider .track
{
height: 14px;
border-radius: 14px;
left: 0px;
right: 0px;
transition: all 0.1s ease-out;
.inner
{
display: none;
}
}
.slider:hover, .slider:active
{
padding: 7px;
.track
{
height: 20px;
border-radius: 6px;
}
.thumb
{
width: 10px;
height: 16px;
margin-left: 2px;
}
}
.slider .thumb
{
width: 10px;
height: 10px;
box-shadow: 0px 0px 0px transparent;
background-color: white;
backdrop-filter: invert( 1 );
margin-left: 1px;
pointer-events: none;
}
.alpha_slider .track
{
background-image: linear-gradient( to right, rgba( #ccc, 0.05 ), rgba( #ccc, 0.9 ) );
}
.hue .track
{
background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
.inner
{
display: none;
}
}
.satval
{
background: linear-gradient(to right, white, transparent);
height: 200px;
position: relative;
&:active
{
z-index: 10;
cursor: none;
}
.value_gradient
{
background: linear-gradient(to bottom, black, white);
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none;
mix-blend-mode: multiply;
}
.thumb
{
z-index: 10;
}
}
.presets
{
flex-wrap: wrap;
align-content: center;
justify-content: center;
padding: 15px;
border-top: 1px solid rgba( white, 0.5 );
.preset
{
background-color: white;
width: 16px;
height: 16px;
margin: 2px;
border-radius: 20px;
cursor: pointer;
&:hover
{
box-shadow: 0px 0px 1px 2px white;
}
}
}
}
.coloreditorrgba
{
flex-direction: column;
.slider
{
padding-right: 16px;
}
.slider .track
{
background-color: transparent;
height: 14px;
border-radius: 14px;
left: 0px;
right: 0px;
.inner
{
display: none;
}
}
.slider .thumb
{
width: 12px;
height: 12px;
box-shadow: 0px 0px 0px transparent;
background-color: white;
margin-left: 2px;
backdrop-filter: invert( 1 );
}
.red_slider .track
{
background-image: linear-gradient( to right, rgba( #e63439, 0.1 ), rgba( #e63439, 0.9 ) );
}
.green_slider .track
{
background-image: linear-gradient( to right, rgba( #54be35, 0.1 ), rgba( #54be35, 0.9 ) );
}
.blue_slider .track
{
background-image: linear-gradient( to right, rgba( #3472e6, 0.1 ), rgba( #3472e6, 0.9 ) );
}
.alpha_slider .track
{
background-image: linear-gradient( to right, rgba( #ccc, 0.05 ), rgba( #ccc, 0.9 ) );
}
}
.coloreditorhsva
{
flex-direction: column;
.slider
{
padding-right: 16px;
}
.slider .track
{
background-color: transparent;
height: 14px;
border-radius: 14px;
left: 0px;
right: 0px;
.inner
{
display: none;
}
}
.slider .thumb
{
width: 12px;
height: 12px;
box-shadow: 0px 0px 0px transparent;
background-color: white;
margin-left: 2px;
backdrop-filter: invert( 1 );
}
.hue_slider .track
{
background-image: linear-gradient( to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00 );
}
.alpha_slider .track
{
background-image: linear-gradient( to right, rgba( #ccc, 0.05 ), rgba( #ccc, 0.9 ) );
}
}
Game
game
EnumControl
{
gap: 2px;
flex-grow: 1;
}
EnumControl DropDown,
EnumControl ButtonGroup
{
border-radius: 8px;
background-color: #000a;
flex-grow: 1;
}
EnumControl DropDown
{
flex-grow: 1;
min-height: 32px;
}
EnumControl ButtonGroup
{
border-radius: 12px;
overflow: hidden;
min-height: 32px;
Button
{
flex-grow: 1;
justify-content: center;
align-items: center;
gap: 4px;
color: #aaa;
font-size: 1rem;
cursor: pointer;
.icon
{
color: #08f;
}
&:hover
{
color: #ddd;
.icon
{
color: #3af;
}
}
&:active
{
background-color: #04a;
color: white;
transform: translateX( 1px ) translateY( 1px );
.icon
{
color: #fff;
}
}
&.active
{
background-color: #08f;
color: white;
pointer-events: none;
.icon
{
color: #fff;
}
}
}
}
Game
game
using Sandbox.Services;
namespace NiuLai;
/// <summary>One package trophy. Ident must match the dashboard Manual achievement.</summary>
public sealed class TrophyDef
{
public string Id { get; init; }
public string Title { get; init; }
public string Description { get; init; }
public int Score { get; init; }
public bool Hidden { get; init; }
}
/// <summary>
/// 30 film trophies. Local toast + Achievements.Unlock(ident).
/// Paste Catalog Id / Title / Description onto the package dashboard as Manual.
/// </summary>
public static class Trophies
{
public static readonly TrophyDef[] Catalog =
{
new() { Id = "walk_slow", Title = "You Slow A Bit", Description = "Start the walk. The herd is already ahead of you.", Score = 5 },
new() { Id = "five_year", Title = "Five-Year Handmade", Description = "Open the title. Loading takes five years. Joke is on us.", Score = 5 },
new() { Id = "open_eye", Title = "Don't Sleep", Description = "Talk to 牛妈妈. She says open your eyes.", Score = 10 },
new() { Id = "grass_free", Title = "Grass Is Free", Description = "Eat one tuft. Mama said it does not cost money.", Score = 5 },
new() { Id = "bigger_little", Title = "I Bigger A Little", Description = "Eat 6 tufts and feel the model scale up.", Score = 10 },
new() { Id = "share_ready", Title = "Hold Some Grass", Description = "Carry 3 tufts. Somebody hungry is coming.", Score = 5 },
new() { Id = "yun_ding", Title = "Come Up On My Back", Description = "Meet 云玎. Then the world goes black.", Score = 10 },
new() { Id = "pure_black", Title = "Pure Black Background", Description = "Finish the first dream with the lark.", Score = 10 },
new() { Id = "not_rope", Title = "I Am Not Rope", Description = "Let 小绳头 bite you. He was never a rope.", Score = 10 },
new() { Id = "only_jump", Title = "Only Can Jump", Description = "Jump the creek because the snake is behind you.", Score = 10 },
new() { Id = "empty_bag", Title = "First Go Eat Grass", Description = "Offer 豹拉 an empty bag. He is not impressed.", Score = 5, Hidden = true },
new() { Id = "bao_la", Title = "Stomach Empty", Description = "Find 豹拉 at night. His belly is a cave.", Score = 10 },
new() { Id = "share_grass", Title = "You Give Me Food", Description = "Share one tuft with the leopard.", Score = 10 },
new() { Id = "niu_er", Title = "Identity Not Right", Description = "Hear 牛二 decide 豹拉 is the problem.", Score = 10 },
new() { Id = "wolf_come", Title = "Wolf Come. Really Come.", Description = "Survive the first wolf rush.", Score = 10 },
new() { Id = "not_allow", Title = "Not Allow Follow", Description = "Watch the herd ban 豹拉.", Score = 10 },
new() { Id = "still_here", Title = "I Still Here", Description = "Talk to 豹拉 after nobody believes him.", Score = 10 },
new() { Id = "dont_look_back", Title = "Don't Look Back", Description = "Hear 妈妈 stay behind in the canyon.", Score = 15 },
new() { Id = "cart_big", Title = "The Cart Become More Big", Description = "Reach the 台车 while it is still growing.", Score = 10 },
new() { Id = "think_jump", Title = "Think Then Hop", Description = "Press jump. Wait. Then hop too hard.", Score = 5, Hidden = true },
new() { Id = "moo", Title = "哞————", Description = "Press F. Moo at nothing in particular.", Score = 5 },
new() { Id = "moo_cart", Title = "Niu Lai No Listen", Description = "云玎 said don't fight. You mooed at the cart.", Score = 15 },
new() { Id = "thank_you", Title = "Yun Ding, Thank You", Description = "Say goodbye in the second black dream.", Score = 10 },
new() { Id = "stand_stable", Title = "Niu Lai Stand Stable", Description = "Wake up. Stand still for once.", Score = 10 },
new() { Id = "fly_line", Title = "Follow Her Fly Line", Description = "Follow 云玎 north after the dream.", Score = 10 },
new() { Id = "too_early", Title = "First Finish Your Road", Description = "Talk to 牛爸爸 before you finished the road.", Score = 5, Hidden = true },
new() { Id = "herd_boss", Title = "I Am Cow Father", Description = "Find 牛爸爸 at the end of the line.", Score = 15 },
new() { Id = "we_walk", Title = "We Walk Together", Description = "Start the reunion walk with the herd.", Score = 15 },
new() { Id = "after_rain", Title = "雨后轻风有香", Description = "Finish the movie. The song plays.", Score = 25 },
new() { Id = "watch_again", Title = "再看一遍", Description = "Start the film a second time.", Score = 10 },
};
const float ToastSeconds = 4.4f;
static readonly HashSet<string> Got = new( StringComparer.OrdinalIgnoreCase );
static readonly Queue<string> ToastQ = new();
static string _toastId = "";
static float _toastLeft;
public static bool EverWon { get; private set; }
public static int Version { get; private set; }
public static bool ToastVisible => _toastLeft > 0f && !string.IsNullOrEmpty( _toastId );
public static TrophyDef Toast => Find( _toastId );
public static TrophyDef Find( string id )
{
if ( string.IsNullOrEmpty( id ) )
return null;
foreach ( var d in Catalog )
{
if ( string.Equals( d.Id, id, StringComparison.OrdinalIgnoreCase ) )
return d;
}
return null;
}
public static void Unlock( string id )
{
if ( string.IsNullOrEmpty( id ) )
return;
if ( Find( id ) is null )
return;
if ( !Got.Add( id ) )
return;
try
{
Achievements.Unlock( id );
}
catch
{
// Dashboard ident missing or services offline — local toast still pops.
}
ToastQ.Enqueue( id );
if ( !ToastVisible )
ShowNext();
Version++;
}
public static void MarkWon() => EverWon = true;
public static void Tick( float dt )
{
if ( _toastLeft <= 0f )
return;
_toastLeft -= dt;
if ( _toastLeft > 0f )
return;
_toastLeft = 0f;
_toastId = "";
Version++;
ShowNext();
}
public static void Evaluate()
{
if ( GameState.GrassEaten >= 1 )
Unlock( "grass_free" );
if ( GameState.GrassEaten >= 6 )
Unlock( "bigger_little" );
if ( GameState.GrassBag >= 3 )
Unlock( "share_ready" );
if ( GameState.Beat >= Beat.Snake )
Unlock( "pure_black" );
if ( GameState.Bitten )
Unlock( "not_rope" );
if ( GameState.CreekJumped )
Unlock( "only_jump" );
if ( GameState.FedLeopard )
Unlock( "share_grass" );
if ( GameState.HerdSuspects )
Unlock( "niu_er" );
if ( GameState.Beat >= Beat.Ban )
Unlock( "wolf_come" );
if ( GameState.BaoLaBanned )
Unlock( "not_allow" );
if ( GameState.MomGone )
Unlock( "dont_look_back" );
if ( GameState.Beat >= Beat.Cart )
Unlock( "cart_big" );
if ( GameState.MooedCart )
Unlock( "moo_cart" );
if ( GameState.Beat >= Beat.Farewell )
Unlock( "thank_you" );
if ( GameState.Beat >= Beat.Wake )
Unlock( "stand_stable" );
if ( GameState.FoundDad )
Unlock( "herd_boss" );
if ( GameState.SongWalk )
Unlock( "we_walk" );
if ( GameState.Won )
Unlock( "after_rain" );
}
public static void OnUsed( string id )
{
switch ( id )
{
case "mom":
Unlock( "open_eye" );
break;
case "lark":
if ( GameState.Beat == Beat.Migrate )
Unlock( "yun_ding" );
break;
case "leopard":
Unlock( "bao_la" );
if ( GameState.FedLeopard )
Unlock( "still_here" );
break;
case "dad":
if ( GameState.Beat is not Beat.Wake and not Beat.Reunion )
Unlock( "too_early" );
break;
}
}
static void ShowNext()
{
if ( ToastVisible || ToastQ.Count == 0 )
return;
_toastId = ToastQ.Dequeue();
_toastLeft = ToastSeconds;
Version++;
}
}
Debug: View Raw JSON Response
{
"TotalCount": 50,
"Files": [
{
"Ident": "dogecoin.niulai",
"Path": "Chatter.cs",
"FileName": "Chatter.cs",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "namespace NiuLai;\n\n/// <summary>Non-blocking movie mutter. Walk while the grassland talks.</summary>\npublic static class Chatter\n{\n\tpublic static string Who { get; private set; } = \"\";\n\tpublic static string Cn { get; private set; } = \"\";\n\tpublic static string En { get; private set; } = \"\";\n\tpublic static float Left { get; private set; }\n\tpublic static int Version { get; private set; }\n\tpublic static bool Visible => Left > 0f && !string.IsNullOrEmpty( Cn );\n\n\tpublic static void Say( string who, Line line, float sec = 2.7f )\n\t{\n\t\tif ( GameState.Talking || FilmCut.Playing )\n\t\t\treturn;\n\t\tif ( string.IsNullOrEmpty( line.Cn ) )\n\t\t\treturn;\n\n\t\tWho = who ?? \"\";\n\t\tCn = line.Cn;\n\t\tEn = line.En ?? \"\";\n\t\tLeft = sec;\n\t\tVersion++;\n\t}\n\n\tpublic static void Tick( float dt )\n\t{\n\t\tif ( Left <= 0f )\n\t\t\treturn;\n\t\tLeft -= dt;\n\t\tif ( Left <= 0f )\n\t\t{\n\t\t\tLeft = 0f;\n\t\t\tVersion++;\n\t\t}\n\t}\n\n\tpublic static Line Pick( Line[] pool )\n\t{\n\t\tif ( pool is not { Length: > 0 } )\n\t\t\treturn default;\n\t\treturn pool[Random.Shared.Int( 0, pool.Length - 1 )];\n\t}\n}\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "GameBootstrap.cs",
"FileName": "GameBootstrap.cs",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "namespace NiuLai;\n\n/// <summary>Scene root. Builds the grassland on play.</summary>\npublic sealed class GameBootstrap : Component\n{\n\tfloat _stingIn = 0.4f;\n\n\tprotected override void OnStart()\n\t{\n\t\tLog.Info( $\"[Niu Lai] {GameInfo.Package} {GameInfo.VersionLabel} boot\" );\n\t\tGameFlow.ApplyMouse();\n\t\tTrophies.Unlock( \"five_year\" );\n\t}\n\n\tprotected override void OnUpdate()\n\t{\n\t\tif ( _stingIn > 0f )\n\t\t{\n\t\t\t_stingIn -= Time.Delta;\n\t\t\tif ( _stingIn <= 0f && GameFlow.Screen == GameScreen.Title )\n\t\t\t\tGameAudio.PlayTitleSting();\n\t\t}\n\n\t\tTrophies.Tick( Time.Delta );\n\t\tFilmCut.Tick( Time.Delta );\n\t\tChatter.Tick( Time.Delta );\n\n\t\tif ( GameFlow.Screen == GameScreen.Playing )\n\t\t{\n\t\t\tGameState.Tick( Time.Delta );\n\t\t\tCalfPlayer.Instance?.RefreshPrompt();\n\t\t\tTrophies.Evaluate();\n\t\t}\n\n\t\tif ( GameFlow.Screen == GameScreen.Title && Input.Pressed( \"Submit\" ) )\n\t\t\tGameFlow.StartNewGame();\n\t}\n}\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "Lines.cs",
"FileName": "Lines.cs",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "namespace NiuLai;\n\npublic readonly record struct Line( string Cn, string En );\n\npublic static class Lines\n{\n\tpublic static readonly Line[] Opening =\n\t{\n\t\tnew( \"\u521a\u51fa\u751f\u3002\u8db4\u7740\u3002\u7ad9\u4e0d\u8d77\u6765\u3002\", \"Just born. Lie down. Cannot stand.\" ),\n\t\tnew( \"\u5988\u5988\u8bf4\uff1a\u90a3\u5c31\u53eb\u4f60\u725b\u6765\u3002\u725b\uff0c\u6765\u3002\u7ad9\u8d77\u6765\u3002\", \"Mama say: then call you Niu Lai. Cow, come. Stand up.\" ),\n\t\tnew( \"\u725b\u7fa4\u5df2\u7ecf\u8d70\u4e86\u3002\u6211\u4eec\u8d70\u5f97\u6bd4\u8f83\u6162\u3002\", \"Herd already walk. We walk more slow.\" ),\n\t\tnew( \"\u997f\u4e86\u5c31\u5403\u8349\u3002\u8349\u662f\u514d\u8d39\u7684\u3002\u522b\u7761\u89c9\u3002\", \"Hungry then eat grass. Grass is free. Don't sleep.\" ),\n\t};\n\n\tpublic static readonly Line[] MomIntro =\n\t{\n\t\tnew( \"\u5b69\u5b50\uff0c\u6162\u6162\u8d70\u3002\u5988\u5988\u5728\u3002\", \"Child, walk slow. Mama is here.\" ),\n\t\tnew( \"\u7741\u5f00\u773c\u775b\u3002\u522b\u7761\u89c9\u3002\", \"Open eye. Don't sleep.\" ),\n\t\tnew( \"\u4f60\u6162\u70b9\u3002\", \"You slow a bit.\" ),\n\t};\n\n\tpublic static readonly Line[] MomMilk =\n\t{\n\t\tnew( \"\u8c79\u62c9\u8981\u559d\u5976\uff1f\", \"Bao La want drink milk?\" ),\n\t\tnew( \"\u597d\u3002\u8fd9\u662f\u5988\u5988\u7684\u3002\u676f\u5b50\u6709\u70b9\u6b6a\u3002\", \"Okay. This is Mama's. Cup a bit crooked.\" ),\n\t\tnew( \"\u62ff\u53bb\u3002\u5c0f\u5fc3\u6d12\u4e86\u3002\u4e94\u5e74\u624b\u6413\u7684\u3002\", \"Take. Careful spill. Five-year handmade.\" ),\n\t};\n\n\tpublic static readonly Line[] MomSlow =\n\t{\n\t\tnew( \"\u4f60\u6162\u70b9\u3002\u8dd1\u90a3\u4e48\u5feb\u5e72\u4ec0\u4e48\u3002\", \"You slow a bit. Run so fast do what.\" ),\n\t};\n\n\tpublic static readonly Line[] MomSleep =\n\t{\n\t\tnew( \"\u7741\u5f00\u773c\u775b\uff01\u522b\u7761\u89c9\uff01\", \"Open eye! Don't sleep!\" ),\n\t\tnew( \"\u8fc1\u5f99\u4e0d\u662f\u5348\u7761\u3002\", \"Migration is not nap.\" ),\n\t};\n\n\tpublic static readonly Line[] Grass =\n\t{\n\t\tnew( \"\u8349\u6709\u70b9\u786c\u3002\u50cf\u5efa\u6a21\u3002\", \"Grass a bit hard. Like the model.\" ),\n\t\tnew( \"\u5403\u5b8c\u611f\u89c9\u81ea\u5df1\u5927\u4e86\u4e00\u70b9\u3002\", \"After eat I feel I bigger a little.\" ),\n\t\tnew( \"\u5988\u5988\u8bf4\u8349\u662f\u514d\u8d39\u7684\u3002\", \"Mama say grass is free.\" ),\n\t\tnew( \"\u8fd9\u4e00\u4e1b\u548c\u90a3\u4e00\u4e1b\u5bf9\u4e0d\u4e0a\u3002\", \"This tuft and that tuft not meet.\" ),\n\t\tnew( \"\u518d\u6765\u4e00\u4e1b\u3002\u52c7\u6c14\u5728\u8349\u91cc\u3002\", \"One more tuft. Courage inside grass.\" ),\n\t\tnew( \"\u5403\u9971\u4e86\u518d\u53bb\u4e0d\u597d\u5417\u3002\u518d\u5403\u4e00\u53e3\u3002\", \"Eat full then go, not better? One more bite.\" ),\n\t\tnew( \"\u514d\u8d39\u7684\u3002\u4e94\u5e74\u624b\u6413\u7684\u514d\u8d39\u3002\", \"Free. Five-year handmade free.\" ),\n\t};\n\n\tpublic static readonly Line[] GrassBack =\n\t{\n\t\tnew( \"\u8349\u53c8\u957f\u56de\u6765\u4e86\u3002\u8fd8\u662f\u514d\u8d39\u3002\", \"Grass grow back. Still free.\" ),\n\t\tnew( \"\u5efa\u6a21\u5237\u65b0\u4e86\u3002\u5473\u9053\u4e00\u6837\u3002\", \"Model refresh. Taste same.\" ),\n\t};\n\n\tpublic static readonly Line[] MooLines =\n\t{\n\t\tnew( \"\u54de\u2014\u2014\u2014\u2014\", \"MOO\u2014\u2014\u2014\u2014\" ),\n\t\tnew( \"\u65f6\u95f4\u4f1a\u8bc1\u660e\u725b\u6765\u7684\u3002\", \"Time will prove Niu Lai.\" ),\n\t\tnew( \"\u8fd9\u4e00\u58f0\u6709\u70b9\u6b6a\u3002\", \"This moo a bit crooked.\" ),\n\t\tnew( \"\u9662\u7ebf\u5f55\u97f3\u6536\u5f55\u4e86\u3002\", \"Theater tape record it.\" ),\n\t};\n\n\tpublic static readonly Line[] Gossip =\n\t{\n\t\tnew( \"\u4ed6\u8d70\u5f97\u592a\u6162\u3002\u8eab\u4efd\u4e5f\u4e0d\u5bf9\u3002\", \"He walk too slow. Identity also not right.\" ),\n\t\tnew( \"\u8c79\u5b50\u4e3a\u4ec0\u4e48\u8ddf\u7740\u3002\u8349\u4f1a\u88ab\u5403\u5b8c\u5417\u3002\", \"Why leopard follow. Grass will eat finish?\" ),\n\t\tnew( \"\u542c\u8bf4\u53f0\u8f66\u4f1a\u8d8a\u6765\u8d8a\u5927\u3002\", \"Hear cart will more and more big.\" ),\n\t\tnew( \"\u4e91\u96c0\u8eba\u5728\u5730\u4e0a\u4e5f\u7b97\u98de\u3002\", \"Lark lie on ground also count as fly.\" ),\n\t\tnew( \"\u5988\u5988\u8bf4\u522b\u7761\u89c9\u3002\u4ed6\u8fd8\u662f\u7761\u3002\", \"Mama say don't sleep. He still sleep.\" ),\n\t};\n\n\tpublic static readonly Line[] Orb =\n\t{\n\t\tnew( \"\u6811\u4e0a\u7684\u7403\u4e5f\u80fd\u5403\uff1f\u6709\u70b9\u751c\u3002\", \"Ball on tree also can eat? A bit sweet.\" ),\n\t\tnew( \"\u8fd9\u4e0d\u662f\u8349\u3002\u4f46\u7ecf\u8d39\u8bf4\u7b97\u8349\u3002\", \"This not grass. But budget say count grass.\" ),\n\t};\n\n\tpublic static readonly Line[] MaskCow =\n\t{\n\t\tnew( \"\u6211\u6ca1\u75c5\u3002\u8fd9\u662f\u5efa\u6a21\u3002\", \"I not sick. This is the model.\" ),\n\t\tnew( \"\u53e3\u7f69\u662f\u8d34\u4e0a\u53bb\u7684\u3002\u6458\u4e0d\u4e0b\u6765\u3002\", \"Mask is stuck on. Cannot take off.\" ),\n\t};\n\n\tpublic static readonly Line[] ExtraMilk =\n\t{\n\t\tnew( \"\u518d\u6765\u4e00\u70b9\u3002\u8fd8\u662f\u5c11\u4e86\u5988\u5988\u7684\u5473\u9053\u3002\", \"A little more. Still missing Mama flavor.\" ),\n\t\tnew( \"\u7238\u7238\u7684\u4e13\u5c5e\u53ef\u4ee5\u7eed\u676f\u5417\u3002\", \"Papa exclusive can refill?\" ),\n\t};\n\n\tpublic static readonly Line[] Tail =\n\t{\n\t\tnew( \"\u554a\u2014\u2014\u5c0f\u7ef3\u5934\uff01\", \"Ah \u2014 Little Rope-Head!\" ),\n\t\tnew( \"\u2026\u2026\u662f\u5c3e\u5df4\u3002\u8c79\u5b50\u7684\u3002\u6478\u9519\u4e86\u3002\", \"\u2026\u2026Is tail. Leopard's. Touch wrong.\" ),\n\t};\n\n\tpublic static readonly Line[] CreekFear =\n\t{\n\t\tnew( \"\u6c34\u5230\u819d\u76d6\u3002\u770b\u8d77\u6765\u50cf\u6d77\u3002\", \"Water to knee. Look like ocean.\" ),\n\t\tnew( \"\u4e0d\u6562\u8fc7\u3002\u5c0f\u7ef3\u5934\u5728\u540e\u9762\u4e5f\u4e0d\u6562\u3002\", \"Dare not cross. Rope-Head behind still dare not.\" ),\n\t};\n\n\tpublic static readonly Line[] Tease =\n\t{\n\t\tnew( \"\u90a3\u8fb9\u6709\u4e00\u6839\u7ef3\u5b50\u5728\u8d70\u8def\u3002\", \"Over there one rope is walking.\" ),\n\t\tnew( \"\u524d\u9762\u6709\u4e1c\u897f\u5012\u7740\u3002\u809a\u5b50\u7a7a\u3002\", \"Front have something fall down. Stomach empty.\" ),\n\t\tnew( \"\u5929\u4e0a\u90a3\u6761\u7ebf\u6b6a\u4e86\u3002\u8ddf\u7740\u6b6a\u7684\u8d70\u3002\", \"Line in sky is crooked. Follow crooked.\" ),\n\t\tnew( \"\u53f0\u8f66\u53c8\u5927\u4e86\u4e00\u70b9\u3002\u4f60\u6ca1\u770b\u3002\", \"Cart bigger a little. You not look.\" ),\n\t};\n\n\tpublic static readonly Line[] VoidBits =\n\t{\n\t\tnew( \"\u7eaf\u9ed1\u3002\u5f88\u597d\u3002\u4e0d\u7528\u753b\u6811\u3002\", \"Pure black. Very good. No need draw tree.\" ),\n\t\tnew( \"\u55ef\u3002\", \"Ng.\" ),\n\t\tnew( \"\u7ecf\u8d39\u8bf4\u8fd9\u91cc\u662f\u5185\u5fc3\u4e16\u754c\u3002\", \"Budget say here is inside heart world.\" ),\n\t};\n\n\tpublic static readonly Line[] LikeHere =\n\t{\n\t\tnew( \"\u53cd\u6b63\u8fd9\u513f\u633a\u597d\u3002\u6211\u559c\u6b22\u8fd9\u513f\u3002\", \"Anyway here pretty good. I like here.\" ),\n\t\tnew( \"\u6811\u662f\u7403\uff0c\u6302\u5728\u68cd\u5b50\u4e0a\u3002\u5f88\u597d\u770b\u3002\", \"Tree is ball, hang on stick. Very beautiful.\" ),\n\t\tnew( \"\u4f60\u8d70\u4e0d\u52a8\u4e86\u4e5f\u53ef\u4ee5\u3002\u5148\u770b\u770b\u3002\", \"You cannot walk also okay. First look.\" ),\n\t};\n\n\tpublic static readonly Line[] Dream =\n\t{\n\t\tnew( \"\u6211\u662f\u4e91\u738e\u3002\u4e00\u53ea\u4e91\u96c0\u3002\u4ece\u8352\u6f20\u98de\u6765\u3002\", \"I am Yun Ding. I am one lark. Fly from desert.\" ),\n\t\tnew( \"\u4f60\u8d70\u4e0d\u52a8\u4e86\u3002\u90a3\u5c31\u505a\u68a6\u3002\", \"You cannot walk. Then you dream.\" ),\n\t\tnew( \"\u7eaf\u9ed1\u7684\u80cc\u666f\u3002\u7ecf\u8d39\u5230\u8fd9\u91cc\u3002\", \"Pure black background. Budget arrive here.\" ),\n\t\tnew( \"\u6211\u4eec\u505a\u540c\u4f34\u3002\", \"We become companion.\" ),\n\t\tnew( \"\u613f\u610f\u5230\u6211\u80cc\u4e0a\u6765\u5417\u3002\", \"Willing come up on my back?\" ),\n\t\tnew( \"\u55ef\u3002\", \"Ng.\" ),\n\t};\n\n\tpublic static readonly Line[] SnakeBite =\n\t{\n\t\tnew( \"\u5636\u2014\u2014\u6211\u4e0d\u662f\u7ef3\u5b50\u3002\", \"Sss \u2014 I am not rope.\" ),\n\t\tnew( \"\u6211\u4e5f\u4e0d\u662f\u978b\u5e26\u3002\u4e5f\u4e0d\u662f\u7535\u7ebf\u3002\", \"I also not shoelace. Also not wire.\" ),\n\t\tnew( \"\u6211\u54ac\u4e86\u4ed6\u7684\u624b\u3002\", \"I bite his hand.\" ),\n\t\tnew( \"\u725b\u6765\u53eb\u6211\u5c0f\u7ef3\u5934\u3002\u4ece\u6b64\u4ed6\u6015\u86c7\u3002\", \"Niu Lai call me Little Rope-Head. From now he fear snake.\" ),\n\t};\n\n\tpublic static readonly Line[] Creek =\n\t{\n\t\tnew( \"\u5c0f\u6eaa\u770b\u8d77\u6765\u5f88\u6df1\u3002\u5176\u5b9e\u5230\u819d\u76d6\u3002\", \"Creek look very deep. Actually to knee.\" ),\n\t\tnew( \"\u725b\u6765\u4e0d\u6562\u8fc7\u3002\u4ed6\u4e0d\u4f1a\u6d89\u6c34\u3002\", \"Niu Lai dare not cross. He not know wade.\" ),\n\t\tnew( \"\u56de\u5934\u3002\u540e\u9762\u662f\u5c0f\u7ef3\u5934\u3002\", \"Look back. Behind is Little Rope-Head.\" ),\n\t\tnew( \"\u53ea\u80fd\u8df3\u3002\u8df3\u8fc7\u53bb\u4e86\u3002\u4ed6\u66f4\u6562\u4e86\u3002\", \"Only can jump. Jumped. He more brave now.\" ),\n\t};\n\n\tpublic static readonly Line[] TailScare =\n\t{\n\t\tnew( \"\u554a\u2014\u2014\u5c0f\u7ef3\u5934\uff01\", \"Ah \u2014 Little Rope-Head!\" ),\n\t\tnew( \"\u2026\u2026\u662f\u5c3e\u5df4\u3002\u8c79\u5b50\u7684\u3002\", \"\u2026\u2026Is tail. Leopard's.\" ),\n\t\tnew( \"\u76f2\u4eba\u6478\u8c61\u3002\u4eca\u5929\u6478\u5230\u5c3e\u5df4\u3002\", \"Blind man touch elephant. Today touch tail.\" ),\n\t};\n\n\tpublic static readonly Line[] Leopard =\n\t{\n\t\tnew( \"\u6211\u662f\u8c79\u62c9\u3002\u597d\u51e0\u5929\u6ca1\u5403\u3002\", \"I am Bao La. Several day not eat.\" ),\n\t\tnew( \"\u809a\u5b50\u7a7a\u3002\u5012\u5728\u8fd9\u91cc\u3002\", \"Stomach empty. Fall down here.\" ),\n\t\tnew( \"\u4f60\u7ed9\u6211\u7cae\u98df\u3002\u6211\u4e0d\u4f1a\u997f\u6b7b\u3002\", \"You give me food. I will not starve.\" ),\n\t\tnew( \"\u6211\u4e5f\u60f3\u559d\u5976\u3002\u6709\u676f\u5b50\u66f4\u597d\u3002\", \"I also want drink milk. Have cup more good.\" ),\n\t\tnew( \"\u6211\u4e5f\u60f3\u4fdd\u62a4\u725b\u7fa4\u3002\", \"I also want protect cow group.\" ),\n\t};\n\n\tpublic static readonly Line[] MilkScene =\n\t{\n\t\tnew( \"\uff08\u559d\uff09\u2026\u2026\u5c11\u4e86\u70b9\u5988\u5988\u7684\u5473\u9053\u3002\", \"(Drink) \u2026\u2026Missing a little Mama flavor.\" ),\n\t\tnew( \"\u725b\u6765\uff1a\u8fd9\u662f\u7238\u7238\u7684\u4e13\u5c5e\u3002\", \"Niu Lai: This is Papa's exclusive.\" ),\n\t\tnew( \"\u8c79\u62c9\uff1a\u2026\u2026\u54e6\u3002\", \"Bao La: \u2026\u2026Oh.\" ),\n\t\tnew( \"\u676f\u5b50\u8fd8\u5728\u3002\u5473\u89c9\u5df2\u7ecf\u6bd5\u4e1a\u3002\", \"Cup still here. Taste already graduate.\" ),\n\t};\n\n\tpublic static readonly Line[] Suspect =\n\t{\n\t\tnew( \"\u6211\u662f\u725b\u4e8c\u3002\u8ddf\u4f60\u4e00\u6837\u5927\u3002\u6a21\u578b\u4e0d\u4e00\u6837\u3002\", \"I am Niu Er. Same big as you. Model not same.\" ),\n\t\tnew( \"\u8c79\u5b50\u4e3a\u4ec0\u4e48\u8ddf\u7740\u6211\u4eec\u3002\", \"Why leopard follow us.\" ),\n\t\tnew( \"\u4ed6\u7684\u8eab\u4efd\u4e0d\u5bf9\u3002\u4e0d\u8981\u4fe1\u4ed6\u3002\", \"His identity not right. Don't believe him.\" ),\n\t\tnew( \"\u8089\u98df\u7684\u3002\u600e\u4e48\u80fd\u4fdd\u62a4\u8349\u3002\", \"Meat eat. How can protect grass.\" ),\n\t};\n\n\tpublic static readonly Line[] RockStare =\n\t{\n\t\tnew( \"\u4e09\u53ea\u72fc\u3002\u5750\u7740\u3002\u770b\u4e00\u5757\u77f3\u5934\u3002\", \"Three wolf. Sit. Look one rock.\" ),\n\t\tnew( \"\u77f3\u5934\u4e5f\u5728\u770b\u4ed6\u4eec\u3002\u5bf9\u4e0d\u4e0a\u89c6\u7ebf\u3002\", \"Rock also look them. Eye-line not meet.\" ),\n\t\tnew( \"\u5f88\u4e45\u3002\u5f88\u4e45\u3002\u7ecf\u8d39\u5728\u60f3\u4e0b\u4e00\u53e5\u3002\", \"Long time. Long time. Budget thinking next line.\" ),\n\t};\n\n\tpublic static readonly Line[] WolvesSave =\n\t{\n\t\tnew( \"\u72fc\u6765\u4e86\u3002\u771f\u7684\u6765\u4e86\u3002\", \"Wolf come. Really come.\" ),\n\t\tnew( \"\u8c79\u62c9\u4e00\u4e2a\u8d77\u8df3\u3002\u6293\u4f4f\u6811\u679d\u3002\", \"Bao La one jump. Grab branch.\" ),\n\t\tnew( \"\u8fde\u7eed\u4e24\u6b21\u5411\u540e\u5927\u56de\u73af\u3002\u4f53\u64cd\u3002\", \"Two time back giant circle. Gymnastics.\" ),\n\t\tnew( \"\u7528\u6807\u51c6\u52a8\u4f5c\u8df3\u5230\u4e09\u53ea\u72fc\u9762\u524d\u3002\", \"Use standard move jump to three wolf front.\" ),\n\t\tnew( \"\u725b\u7fa4\u5374\u8bf4\uff1a\u4ed6\u662f\u8ddf\u72fc\u4e00\u4f19\u7684\u3002\", \"Herd say: he is with the wolf.\" ),\n\t};\n\n\tpublic static readonly Line[] Ban =\n\t{\n\t\tnew( \"\u4e0d\u8bb8\u518d\u8ddf\u7740\u3002\", \"Not allow follow anymore.\" ),\n\t\tnew( \"\u8c79\u62c9\u8fd8\u662f\u6765\u3002\u72fc\u6765\u7684\u65f6\u5019\u4ed6\u8fd8\u6321\u3002\", \"Bao La still come. When wolf come he still block.\" ),\n\t\tnew( \"\u725b\u6765\u770b\u89c1\u4e86\u3002\u725b\u7fa4\u6ca1\u770b\u89c1\u3002\", \"Niu Lai see it. Herd not see.\" ),\n\t\tnew( \"\u8eab\u4efd\u4e0d\u5bf9\u3002\u6240\u4ee5\u770b\u4e0d\u89c1\u3002\", \"Identity not right. So cannot see.\" ),\n\t};\n\n\tpublic static readonly Line[] MomFarewell =\n\t{\n\t\tnew( \"\u5ce1\u8c37\u91cc\u672c\u8be5\u4f11\u606f\u3002\u72fc\u53c8\u6765\u4e86\u3002\", \"In canyon should rest. Wolf come again.\" ),\n\t\tnew( \"\u8c79\u62c9\u4e0d\u5728\u3002\u4ed6\u88ab\u8d76\u8d70\u4e86\u3002\", \"Bao La not here. They drive him away.\" ),\n\t\tnew( \"\u5b69\u5b50\uff0c\u5f80\u524d\u8dd1\u3002\u4e0d\u8981\u56de\u5934\u3002\", \"Child, run forward. Don't look back.\" ),\n\t\tnew( \"\u5988\u5988\u53bb\u6321\u4f4f\u3002\u8fc7\u540e\u4f1a\u5408\u3002\", \"Mama go block. Later we meet.\" ),\n\t\tnew( \"\u4f60\u8981\u957f\u5927\u3002\u725b\uff0c\u6765\u3002\", \"You must grow up. Cow, come.\" ),\n\t};\n\n\tpublic static readonly Line[] Cart =\n\t{\n\t\tnew( \"\u53f0\u8f66\u8d8a\u6765\u8d8a\u5927\u3002\u50cf\u4e00\u5217\u706b\u8f66\u3002\", \"The cart become more and more big. Like one train.\" ),\n\t\tnew( \"\u4e91\u738e\u8bf4\uff1a\u522b\u5bf9\u6297\u3002\", \"Yun Ding say: don't fight.\" ),\n\t\tnew( \"\u725b\u6765\u4e0d\u542c\u3002\u65f6\u95f4\u4f1a\u8bc1\u660e\u725b\u6765\u7684\u3002\", \"Niu Lai no listen. Time will prove Niu Lai.\" ),\n\t\tnew( \"\u54de\u2014\u2014\u2014\u2014\", \"MOO\u2014\u2014\u2014\u2014\" ),\n\t\tnew( \"\u518d\u54de\u3002\u518d\u518d\u54de\u3002\u5b83\u8fd8\u5728\u957f\u3002\", \"Moo again. Moo again again. It still grow.\" ),\n\t};\n\n\tpublic static readonly Line[] Farewell =\n\t{\n\t\tnew( \"\u53c8\u662f\u7eaf\u9ed1\u7684\u80cc\u666f\u3002\", \"Again pure black background.\" ),\n\t\tnew( \"\u4e91\u738e\uff0c\u8c22\u8c22\u4f60\u3002\u4e00\u8def\u770b\u7740\u3002\", \"Yun Ding, thank you. Whole road watching.\" ),\n\t\tnew( \"\u55ef\u3002\", \"Ng.\" ),\n\t\tnew( \"\u68a6\u8be5\u9192\u4e86\u3002\", \"Dream should wake.\" ),\n\t};\n\n\tpublic static readonly Line[] Wake =\n\t{\n\t\tnew( \"\u68a6\u9192\u4e86\u3002\u725b\u6765\u7ad9\u7a33\u4e86\u3002\", \"Dream wake. Niu Lai stand stable.\" ),\n\t\tnew( \"\u539f\u6765\u4ece\u76f4\u7acb\u8d70\u5f00\u59cb\u5c31\u662f\u68a6\u3002\", \"Turns out from walk upright already is dream.\" ),\n\t\tnew( \"\u62ac\u5934\u3002\u4e91\u96c0\u5728\u5929\u4e0a\u753b\u4e00\u6761\u7ebf\u3002\", \"Look up. Lark in sky draw one line.\" ),\n\t\tnew( \"\u8ddf\u7740\u5979\u7684\u98de\u884c\u8f68\u8ff9\u8d70\u3002\", \"Follow her fly line walk.\" ),\n\t};\n\n\tpublic static readonly Line[] Dad =\n\t{\n\t\tnew( \"\u6211\u662f\u725b\u7238\u7238\u3002\u65cf\u7fa4\u9996\u9886\u3002\", \"I am Cow Father. Herd boss.\" ),\n\t\tnew( \"\u4f60\u56de\u6765\u4e86\u3002\u7ad9\u8d77\u6765\u4e86\u3002\", \"You come back. You stand up.\" ),\n\t\tnew( \"\u8d70\u5427\u3002\u6211\u4eec\u4e00\u8d77\u8d70\u3002\", \"Walk. We walk together.\" ),\n\t\tnew( \"\u96e8\u540e\u8f7b\u98ce\u6709\u9999\u3002\", \"After rain, light wind have fragrance.\" ),\n\t};\n\n\tpublic static readonly Line[] Ending =\n\t{\n\t\tnew( \"\u68a6\u9192\u4e86\u3002\u725b\u6765\u7ad9\u7a33\u4e86\u3002\", \"Dream wake. Niu Lai stand stable.\" ),\n\t\tnew( \"\u4e91\u96c0\u5728\u5929\u4e0a\u753b\u4e00\u6761\u7ebf\u3002\", \"Lark in sky draw one line.\" ),\n\t\tnew( \"\u5988\u5988\u7684\u98ce\u8fd8\u5728\u3002\u8c79\u62c9\u4e5f\u8fd8\u5728\u98ce\u91cc\u3002\", \"Mama's wind still here. Bao La also in the wind.\" ),\n\t\tnew( \"\u53f0\u8f66\u505c\u4e86\u3002\u77f3\u5934\u8fd8\u5728\u770b\u72fc\u3002\", \"Cart stop. Rock still look at wolf.\" ),\n\t\tnew( \"\u96e8\u540e\u8f7b\u98ce\u6709\u9999\u3002\", \"After rain, light wind have fragrance.\" ),\n\t};\n\n\tpublic static readonly Line[] TimeProve =\n\t{\n\t\tnew( \"\u65f6\u95f4\u4f1a\u8bc1\u660e\u725b\u6765\u7684\u3002\", \"Time will prove Niu Lai.\" ),\n\t};\n\n\tpublic static readonly Line[] EatFirst =\n\t{\n\t\tnew( \"\u5403\u9971\u4e86\u518d\u53bb\u4e0d\u597d\u5417\u3002\", \"Eat full then go, not better?\" ),\n\t\tnew( \"\u8349\u8fd8\u5728\u3002\u8def\u4e5f\u8fd8\u5728\u3002\", \"Grass still here. Road also still here.\" ),\n\t};\n\n\tpublic static readonly Line[] TooClose =\n\t{\n\t\tnew( \"\u7b2c\u4e00\uff0c\u4ed6\u4e0d\u80fd\u79bb\u725b\u7fa4\u592a\u8fd1\u3002\", \"First, he cannot leave cow group too near.\" ),\n\t\tnew( \"\u7b2c\u4e8c\uff0c\u8eab\u4efd\u4e0d\u5bf9\u3002\", \"Second, identity not right.\" ),\n\t\tnew( \"\u7b2c\u4e09\uff0c\u6211\u4eec\u8fd8\u6ca1\u60f3\u597d\u7b2c\u4e09\u3002\", \"Third, we not yet think of third.\" ),\n\t};\n\n\tpublic static readonly Line[] Protect =\n\t{\n\t\tnew( \"\u6025\u4ec0\u4e48\u3002\u6211\u6765\u4fdd\u62a4\u4f60\u4eec\u3002\", \"Rush what. I come protect you.\" ),\n\t\tnew( \"\uff08\u8138\u8d34\u8fc7\u6765\u3002\u9662\u7ebf\u5728\u7b11\u3002\uff09\", \"(Face come close. Theater is laughing.)\" ),\n\t};\n\n\tpublic static readonly Line[] Headbutt =\n\t{\n\t\tnew( \"\u6211\u559c\u6b22\u9876\u8111\u95e8\u513f\u3002\u4f60\u662f\u600e\u4e48\u77e5\u9053\u7684\u3002\", \"I like bump forehead. How you know.\" ),\n\t\tnew( \"\uff08\u4e24\u4e2a\u6a21\u578b\u5bf9\u4e0d\u9f50\u3002\u8fd8\u662f\u9876\u4e86\u3002\uff09\", \"(Two model not align. Still bump.)\" ),\n\t};\n\n\tpublic static readonly Line[] NoRoad =\n\t{\n\t\tnew( \"\u6ca1\u8def\u4e86\u3002\", \"No road anymore.\" ),\n\t\tnew( \"\u53f0\u8f66\u628a\u8def\u5403\u4e86\u3002\u5b83\u8fd8\u5728\u957f\u3002\", \"Cart eat the road. It still grow.\" ),\n\t\tnew( \"\u4e91\u738e\u8bf4\u522b\u5bf9\u6297\u3002\u725b\u6765\u8bf4\u54de\u3002\", \"Yun Ding say don't fight. Niu Lai say moo.\" ),\n\t};\n\n\tpublic static readonly Line[] CardOpen =\n\t{\n\t\tnew( \"\u7b2c\u4e00\u573a \u00b7 \u7741\u5f00\u773c\u775b\", \"Scene 1 \u00b7 Open eye\" ),\n\t};\n\n\tpublic static Line Quest( Beat beat ) => beat switch\n\t{\n\t\tBeat.Migrate => new( \"\u518d\u5403\u4e00\u4e1b\u3002\u8349\u4f1a\u56de\u6765\u3002\u7136\u540e\u627e\u4e91\u738e\u3002\u5979\u559c\u6b22\u8fd9\u513f\u3002\", \"Eat one more tuft. Grass come back. Then find Yun Ding. She like here.\" ),\n\t\tBeat.Dream => new( \"\u7eaf\u9ed1\u91cc\uff0c\u542c\u5b8c\u4e91\u738e\u3002\u613f\u610f\u5230\u5979\u80cc\u4e0a\u6765\u5417\u3002\", \"In the black, finish listen Yun Ding. Willing come up on back?\" ),\n\t\tBeat.Snake => new( \"\u8349\u539f\u6df1\u5904\u6709\u4e00\u6761\u5c0f\u7ef3\u5934\u3002\u8d70\u8fd1\u3002\u5b83\u4e0d\u662f\u7ef3\u5b50\u3002\", \"Deep grass have one Little Rope-Head. Walk near. It is not rope.\" ),\n\t\tBeat.Creek => new( \"\u6eaa\u6c34\u5f88\u6df1\uff08\u5230\u819d\u76d6\uff09\u3002\u56de\u5934\u3002\u7136\u540e\u8df3\u3002\", \"Creek very deep (to knee). Look back. Then jump.\" ),\n\t\tBeat.Night => new( \"\u8c79\u62c9\u997f\u4e86\u3002\u5148\u627e\u5988\u5988\u8981\u5976\uff0c\u518d\u5206\u8349\u7ed9\u4ed6\u3002\", \"Bao La hungry. First get milk from Mama, then share grass.\" ),\n\t\tBeat.Suspect => new( \"\u53bb\u542c\u725b\u4e8c\u8bf4\u8c79\u62c9\u8eab\u4efd\u4e0d\u5bf9\u3002\", \"Go hear Niu Er say Bao La identity not right.\" ),\n\t\tBeat.Wolves => new( \"\u4e09\u53ea\u72fc\u5728\u770b\u77f3\u5934\u3002\u8d70\u8fc7\u53bb\u3002\u8c79\u62c9\u4f1a\u4f53\u64cd\u3002\", \"Three wolf look at rock. Walk over. Bao La do gymnastics.\" ),\n\t\tBeat.Ban => new( \"\u725b\u7fa4\u8981\u8d76\u8d70\u8c79\u62c9\u3002\u53bb\u770b\u4e00\u773c\u3002\", \"Herd want drive Bao La away. Go look.\" ),\n\t\tBeat.Canyon => new( \"\u5230\u5ce1\u8c37\u3002\u542c\u5988\u5988\u628a\u8bdd\u8bf4\u5b8c\u3002\u4e0d\u8981\u56de\u5934\u3002\", \"Go canyon. Let Mama finish. Don't look back.\" ),\n\t\tBeat.Cart => new( \"\u53f0\u8f66\u8d8a\u6765\u8d8a\u5927\u3002\u5bf9\u7740\u5b83\u54de\u3002\u518d\u54de\u3002\u518d\u54de\u3002\", \"Cart more and more big. Moo at it. Moo again. Moo again.\" ),\n\t\tBeat.Farewell => new( \"\u7eaf\u9ed1\u91cc\uff0c\u548c\u4e91\u738e\u9053\u522b\u3002\", \"In the black, say goodbye to Yun Ding.\" ),\n\t\tBeat.Wake => new( \"\u8ddf\u7740\u5929\u4e0a\u90a3\u6761\u6b6a\u7ebf\uff0c\u5f80\u5317\u8d70\u3002\", \"Follow that crooked line in sky, walk north.\" ),\n\t\tBeat.Reunion => new( \"\u53bb\u627e\u725b\u7238\u7238\u3002\u4e00\u8d77\u8d70\u3002\", \"Go find Cow Father. Walk together.\" ),\n\t\t_ => new( \"\u96e8\u540e\u8f7b\u98ce\u6709\u9999\u3002\", \"After rain, light wind have fragrance.\" )\n\t};\n}\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/controls/color/colorpickercontrol.cs.scss",
"FileName": "colorpickercontrol.cs.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "ColorPickerControl\r\n{\r\n\tflex-direction: column;\r\n\tflex-shrink: 0;\r\n\tgap: 0.5rem;\r\n\tmargin: 1rem;\r\n}"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/components/packagelist.razor.scss",
"FileName": "packagelist.razor.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": ".package-list\r\n{\r\n flex-shrink: 1;\r\n flex-wrap: wrap;\r\n flex-grow: 1;\r\n\r\n h1\r\n {\r\n width: 100%;\r\n margin-top: 50px;\r\n font-size: 40px;\r\n }\r\n\r\n PackageCard\r\n {\r\n &:hover\r\n {\r\n sound-in: \"ui.button.over\";\r\n }\r\n }\r\n\r\n VirtualGrid\r\n {\r\n width: 100%;\r\n height: 100%;\r\n\r\n .cell\r\n {\r\n \r\n }\r\n }\r\n}"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/components/packagefilters.razor.scss",
"FileName": "packagefilters.razor.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "\r\n@import \"/styles/_theme.scss\";\r\n\r\n.packagefilter\r\n{\r\n\twidth: 100%;\r\n\tflex-shrink: 0;\r\n\r\n\t.left\r\n\t{\r\n\t\tflex-grow: 1;\r\n\t\tflex-shrink: 0;\r\n\t\tgap: 16px;\r\n\t}\r\n\r\n\t.right\r\n\t{\r\n\t\tflex-grow: 1;\r\n\t\tflex-shrink: 0;\r\n\t\tgap: 16px;\r\n\t}\r\n}\r\n\r\n.packagefilter textentry\r\n{\r\n\tflex-grow: 1;\r\n\tpadding: 8px 12px;\r\n\tpointer-events: all;\r\n\r\n\tLabel\r\n\t{\r\n\t\tmargin-left: 26px;\r\n\t}\r\n\r\n\ticonpanel\r\n\t{\r\n\t\tposition: absolute;\r\n\t\tleft: 12px;\r\n\t\topacity: 0.3;\r\n\t\tfont-size: $text-large;\r\n\t}\r\n}\r\n\r\n\t.packagefilterfacet, .packagefilter textentry\r\n\t{\r\n\t\tbackground-color: rgba($default-950, 0.3);\r\n\t\tcolor: $default-text;\r\n\t\toutline: 1px solid $default-border;\r\n\t\ttransition: all 150ms $easing;\r\n\t\tborder-radius: $rounding-default;\r\n\t\tpadding: 4px 12px;\r\n\t\tgap: 16px;\r\n\t\tflex-shrink: 0;\r\n\t\tfont-size: 14px;\r\n\t\tcursor: pointer;\r\n\t\talign-items: center;\r\n\r\n\t\t.clear-button\r\n\t\t{\r\n\t\t\theight: 100%;\r\n\t\t\tmargin-right: -8px;\r\n\t\t\talign-items: center;\r\n\t\t\tpadding: 0px 4px;\r\n\r\n\t\t\t&:hover\r\n\t\t\t{\r\n\t\t\t\tcolor: red;\r\n\t\t\t\tborder-radius: 100%;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.is-active\r\n\t\t{\r\n\t\t\tbackground-color: $default-700;\r\n\t\t}\r\n\r\n\t\t&:not(.is-active)\r\n\t\t{\r\n\t\t\t&:hover\r\n\t\t\t{\r\n\t\t\t\toutline: 1px solid $default-50;\r\n\t\t\t}\r\n\t\t}\r\n\t}"
},
{
"Ident": "dogecoin.niulai",
"Path": "FilmCut.cs",
"FileName": "FilmCut.cs",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "namespace NiuLai;\n\n/// <summary>\n/// Janky in-engine cutscenes. Theater mud + crowd laugh. No film stills.\n/// E skips a shot. Camera slams. Models slide.\n/// </summary>\npublic enum CutId\n{\n\tNone,\n\tOpenEyes,\n\tLarkBack,\n\tEatFirst,\n\tLeopardFace,\n\tMilkDad,\n\tTooClose,\n\tHeadbutt,\n\tNoRoad,\n\tNg\n}\n\npublic static class FilmCut\n{\n\tpublic static bool Playing { get; private set; }\n\tpublic static CutId Id { get; private set; }\n\tpublic static int Shot { get; private set; }\n\tpublic static int Version { get; private set; }\n\tpublic static string CardCn { get; private set; } = \"\";\n\tpublic static string CardEn { get; private set; } = \"\";\n\n\tstatic float _t;\n\tstatic float _hold;\n\tstatic int _shots;\n\tstatic Action _done;\n\tstatic Vector3 _camPos;\n\tstatic Rotation _camRot;\n\tstatic GameObject _focus;\n\tstatic bool _tipped;\n\n\tpublic static void Play( CutId id, Action done = null )\n\t{\n\t\tif ( id == CutId.None )\n\t\t\treturn;\n\n\t\tId = id;\n\t\tPlaying = true;\n\t\tShot = 0;\n\t\t_t = 0;\n\t\t_done = done;\n\t\t_tipped = false;\n\t\tCardCn = \"\";\n\t\tCardEn = \"\";\n\t\t_shots = id switch\n\t\t{\n\t\t\tCutId.OpenEyes => 3,\n\t\t\tCutId.LarkBack => 2,\n\t\t\tCutId.EatFirst => 1,\n\t\t\tCutId.LeopardFace => 2,\n\t\t\tCutId.MilkDad => 2,\n\t\t\tCutId.TooClose => 2,\n\t\t\tCutId.Headbutt => 2,\n\t\t\tCutId.NoRoad => 2,\n\t\t\tCutId.Ng => 2,\n\t\t\t_ => 1\n\t\t};\n\t\tBeginShot();\n\t\tVersion++;\n\t}\n\n\tpublic static void Skip()\n\t{\n\t\tif ( !Playing )\n\t\t\treturn;\n\t\tAdvanceShot();\n\t}\n\n\tpublic static void Tick( float dt )\n\t{\n\t\tif ( !Playing )\n\t\t\treturn;\n\n\t\t_t += dt;\n\t\tAnimate();\n\t\tAimCamera();\n\n\t\tif ( _t >= _hold )\n\t\t\tAdvanceShot();\n\t}\n\n\tstatic void AdvanceShot()\n\t{\n\t\tShot++;\n\t\tif ( Shot >= _shots )\n\t\t{\n\t\t\tEnd();\n\t\t\treturn;\n\t\t}\n\n\t\t_t = 0;\n\t\tBeginShot();\n\t\tVersion++;\n\t}\n\n\tstatic void BeginShot()\n\t{\n\t\t_hold = 3.4f;\n\t\t_focus = null;\n\t\tCardCn = \"\";\n\t\tCardEn = \"\";\n\n\t\tswitch ( Id )\n\t\t{\n\t\t\tcase CutId.OpenEyes:\n\t\t\t\tif ( Shot == 0 )\n\t\t\t\t{\n\t\t\t\t\tCardCn = \"\u7b2c\u4e00\u573a \u00b7 \u7741\u5f00\u773c\u775b\";\n\t\t\t\t\tCardEn = \"Scene 1 \u00b7 Open your eyes\";\n\t\t\t\t\t_hold = 2.2f;\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.NameNiu, 0.85f );\n\t\t\t\t}\n\t\t\t\telse if ( Shot == 1 )\n\t\t\t\t{\n\t\t\t\t\tTipPlayer( true );\n\t\t\t\t\t_focus = CalfPlayer.Instance?.GameObject;\n\t\t\t\t\t_hold = 4.2f;\n\t\t\t\t\tGameState.Talk( \"\u725b\u5988\u5988 / Mama\", Lines.MomSleep );\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.MamaWake );\n\t\t\t\t\tGameAudio.PlayCrowd( GameAudio.CrowdWake );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tTipPlayer( false );\n\t\t\t\t\t_focus = CalfPlayer.Instance?.GameObject;\n\t\t\t\t\t_hold = 1.6f;\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.Stand, 0.9f );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase CutId.LarkBack:\n\t\t\t\tif ( Shot == 0 )\n\t\t\t\t{\n\t\t\t\t\tCardCn = \"\u613f\u610f\u5230\u6211\u80cc\u4e0a\u6765\u5417\";\n\t\t\t\t\tCardEn = \"Willing come up on my back?\";\n\t\t\t\t\t_hold = 2.0f;\n\t\t\t\t}\n\t\t\t\tLieNamed( \"lark\", true );\n\t\t\t\t_focus = Named( \"lark\" );\n\t\t\t\tif ( Shot == 1 )\n\t\t\t\t{\n\t\t\t\t\t_hold = 4.6f;\n\t\t\t\t\tGameState.Talk( \"\u4e91\u738e / Yun Ding\", Lines.Dream );\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.LarkRide );\n\t\t\t\t\tGameAudio.PlayCrowd( GameAudio.CrowdRide );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase CutId.EatFirst:\n\t\t\t\tCardCn = \"\u5403\u9971\u4e86\u518d\u53bb\u4e0d\u597d\u5417\";\n\t\t\t\tCardEn = \"Eat full then go, not better?\";\n\t\t\t\t_focus = Named( \"mom\" ) ?? CalfPlayer.Instance?.GameObject;\n\t\t\t\t_hold = 3.8f;\n\t\t\t\tGameState.Talk( \"\u725b\u5988\u5988 / Mama\", Lines.EatFirst );\n\t\t\t\tGameAudio.PlayClip( GameAudio.SlowDown );\n\t\t\t\tbreak;\n\n\t\t\tcase CutId.LeopardFace:\n\t\t\t\tif ( Shot == 0 )\n\t\t\t\t{\n\t\t\t\t\tCardCn = \"\u8c79\u62c9\u7279\u5199 \u00b7 \u9662\u7ebf\u5728\u7b11\";\n\t\t\t\t\tCardEn = \"Bao La close-up \u00b7 theater laughing\";\n\t\t\t\t\t_hold = 1.8f;\n\t\t\t\t}\n\t\t\t\t_focus = Named( \"leopard\" );\n\t\t\t\tif ( Shot == 1 )\n\t\t\t\t{\n\t\t\t\t\t_hold = 5.0f;\n\t\t\t\t\tGameState.Talk( \"\u8c79\u62c9 / Bao La\", Lines.Protect );\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.Leopard );\n\t\t\t\t\tGameAudio.PlayCrowd( GameAudio.CrowdBig );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase CutId.MilkDad:\n\t\t\t\tif ( Shot == 0 )\n\t\t\t\t{\n\t\t\t\t\tCardCn = \"\u5c11\u4e86\u70b9\u5988\u5988\u7684\u5473\u9053\";\n\t\t\t\t\tCardEn = \"Missing a little Mama flavor\";\n\t\t\t\t\t_hold = 1.8f;\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.Milk );\n\t\t\t\t}\n\t\t\t\t_focus = Named( \"leopard\" );\n\t\t\t\tif ( Shot == 1 )\n\t\t\t\t{\n\t\t\t\t\t_hold = 5.2f;\n\t\t\t\t\tGameState.Talk( \"\u8c79\u62c9 / Bao La\", Lines.MilkScene );\n\t\t\t\t\tGameAudio.PlayCrowd( GameAudio.CrowdMilk );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase CutId.TooClose:\n\t\t\t\tif ( Shot == 0 )\n\t\t\t\t{\n\t\t\t\t\tCardCn = \"\u7b2c\u4e00\uff0c\u4ed6\u4e0d\u80fd\u79bb\u725b\u7fa4\u592a\u8fd1\";\n\t\t\t\t\tCardEn = \"First, he cannot leave herd too near\";\n\t\t\t\t\t_hold = 2.0f;\n\t\t\t\t}\n\t\t\t\t_focus = Named( \"niuer\" ) ?? Named( \"dad\" );\n\t\t\t\tif ( Shot == 1 )\n\t\t\t\t{\n\t\t\t\t\t_hold = 4.4f;\n\t\t\t\t\tGameState.Talk( \"\u725b\u4e8c / Niu Er\", Lines.TooClose );\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.SlowDown );\n\t\t\t\t\tGameAudio.PlayCrowd( GameAudio.CrowdMilk );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase CutId.Headbutt:\n\t\t\t\tCardCn = \"\u6211\u559c\u6b22\u9876\u8111\u95e8\u513f\";\n\t\t\t\tCardEn = \"I like bump forehead\";\n\t\t\t\t_focus = Named( \"leopard\" );\n\t\t\t\t_hold = Shot == 0 ? 1.6f : 4.0f;\n\t\t\t\tif ( Shot == 1 )\n\t\t\t\t{\n\t\t\t\t\tGameState.Talk( \"\u8c79\u62c9 / Bao La\", Lines.Headbutt );\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.LikeHere );\n\t\t\t\t\tGameAudio.PlayCrowd( GameAudio.CrowdBig );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase CutId.NoRoad:\n\t\t\t\tif ( Shot == 0 )\n\t\t\t\t{\n\t\t\t\t\tCardCn = \"\u6ca1\u8def\u4e86\";\n\t\t\t\t\tCardEn = \"No road anymore\";\n\t\t\t\t\t_hold = 2.2f;\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.CartGrow );\n\t\t\t\t}\n\t\t\t\t_focus = Named( \"cart\" );\n\t\t\t\tif ( Shot == 1 )\n\t\t\t\t{\n\t\t\t\t\t_hold = 4.6f;\n\t\t\t\t\tGameState.Talk( \"\u65c1\u767d / Narrator\", Lines.NoRoad );\n\t\t\t\t\tGameAudio.PlayCrowd( GameAudio.CrowdCart );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase CutId.Ng:\n\t\t\t\tif ( Shot == 0 )\n\t\t\t\t{\n\t\t\t\t\tCardCn = \"\u55ef\";\n\t\t\t\t\tCardEn = \"Ng.\";\n\t\t\t\t\t_hold = 1.6f;\n\t\t\t\t}\n\t\t\t\tLieNamed( \"lark\", false );\n\t\t\t\t_focus = Named( \"lark\" );\n\t\t\t\tif ( Shot == 1 )\n\t\t\t\t{\n\t\t\t\t\t_hold = 4.2f;\n\t\t\t\t\tGameState.Talk( \"\u4e91\u738e / Yun Ding\", Lines.Farewell );\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.LarkNg );\n\t\t\t\t\tGameAudio.PlayCrowd( GameAudio.CrowdNg );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tstatic void Animate()\n\t{\n\t\tif ( Id == CutId.Headbutt && _focus.IsValid() && CalfPlayer.Instance.IsValid() )\n\t\t{\n\t\t\tvar a = CalfPlayer.Instance.WorldPosition;\n\t\t\tvar b = _focus.WorldPosition;\n\t\t\tvar mid = (a + b) * 0.5f;\n\t\t\tvar bump = MathF.Sin( _t * 10f ) * 8f;\n\t\t\tCalfPlayer.Instance.WorldPosition = mid + Vector3.Left * (18f + bump);\n\t\t\t_focus.WorldPosition = mid + Vector3.Right * (18f - bump);\n\t\t}\n\n\t\tif ( Id == CutId.Ng && _focus.IsValid() )\n\t\t{\n\t\t\t_focus.WorldPosition = GameState.DreamPos + new Vector3( 0, 0, 40f + MathF.Sin( _t * 2f ) * 8f );\n\t\t\t_focus.WorldRotation = Rotation.FromYaw( _t * 40f ) * Rotation.FromRoll( 18f );\n\t\t}\n\t}\n\n\tstatic void AimCamera()\n\t{\n\t\tvar cam = CalfPlayer.Instance?.Scene?.Camera;\n\t\tif ( cam is null || !cam.IsValid() )\n\t\t\treturn;\n\n\t\tvar target = _focus.IsValid() ? _focus.WorldPosition : (CalfPlayer.Instance?.WorldPosition ?? Vector3.Zero);\n\t\ttarget += Vector3.Up * (Id == CutId.LeopardFace ? 22f : 28f);\n\n\t\tvar dist = Id switch\n\t\t{\n\t\t\tCutId.LeopardFace => 38f,\n\t\t\tCutId.OpenEyes => 42f,\n\t\t\tCutId.LarkBack => 55f,\n\t\t\tCutId.Ng => 90f,\n\t\t\tCutId.NoRoad => 220f,\n\t\t\t_ => 70f\n\t\t};\n\n\t\tvar side = Id == CutId.LarkBack ? 10f : 16f;\n\t\tvar height = Id == CutId.LarkBack ? 12f : 22f;\n\t\tif ( Id == CutId.Ng )\n\t\t\theight = 8f;\n\n\t\t_camPos = target - Vector3.Forward * dist + Vector3.Right * side + Vector3.Up * height;\n\t\tif ( Id == CutId.NoRoad )\n\t\t\t_camPos = target + new Vector3( -180, -140, 90 );\n\t\tif ( Id == CutId.Ng )\n\t\t\t_camPos = target + new Vector3( 0, -70, 10 );\n\n\t\tvar look = (target - _camPos);\n\t\tif ( look.Length > 1f )\n\t\t\t_camRot = Rotation.LookAt( look, Vector3.Up );\n\n\t\tcam.WorldPosition = _camPos;\n\t\tcam.WorldRotation = _camRot;\n\t\tif ( GameState.InVoid || Id == CutId.Ng )\n\t\t\tcam.BackgroundColor = Color.Black;\n\t}\n\n\tstatic void End()\n\t{\n\t\tPlaying = false;\n\t\tvar done = _done;\n\t\tvar id = Id;\n\t\tId = CutId.None;\n\t\t_done = null;\n\t\tCardCn = \"\";\n\t\tCardEn = \"\";\n\t\tLieNamed( \"lark\", false );\n\t\tTipPlayer( false );\n\t\tVersion++;\n\t\tdone?.Invoke();\n\n\t\tif ( id == CutId.LarkBack )\n\t\t\tGameState.EnterDreamFromCut();\n\t\telse if ( id == CutId.Ng )\n\t\t\tGameState.FinishFarewellCut();\n\t}\n\n\tstatic void TipPlayer( bool down )\n\t{\n\t\tvar p = CalfPlayer.Instance;\n\t\tif ( !p.IsValid() )\n\t\t\treturn;\n\t\t_tipped = down;\n\t\tp.WorldRotation = down\n\t\t\t? Rotation.FromPitch( 80f )\n\t\t\t: Rotation.FromYaw( p.WorldRotation.Yaw() );\n\t}\n\n\tstatic void LieNamed( string name, bool lie )\n\t{\n\t\tvar go = Named( name );\n\t\tif ( !go.IsValid() )\n\t\t\treturn;\n\t\tgo.WorldRotation = lie\n\t\t\t? Rotation.FromRoll( 90f ) * Rotation.FromPitch( 20f )\n\t\t\t: Rotation.Identity;\n\t}\n\n\tstatic GameObject Named( string name )\n\t{\n\t\tif ( WorldBuilder.Stage.TryGetValue( name, out var go ) && go.IsValid() )\n\t\t\treturn go;\n\t\treturn null;\n\t}\n}\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "Primitives.cs",
"FileName": "Primitives.cs",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "namespace NiuLai;\n\npublic static class Primitives\n{\n\tpublic const string Box = \"models/dev/box.vmdl\";\n\tpublic const string Plane = \"models/dev/plane.vmdl\";\n\tpublic const string Citizen = \"models/citizen/citizen.vmdl\";\n\tpublic const string DefaultMat = \"materials/default.vmat\";\n\n\tstatic Model _box;\n\tstatic Model _plane;\n\tstatic Model _citizen;\n\tstatic Material _mat;\n\n\tpublic static Model BoxModel => _box ??= Model.Load( Box );\n\tpublic static Model PlaneModel => _plane ??= Model.Load( Plane );\n\tpublic static Model CitizenModel => _citizen ??= Model.Load( Citizen );\n\tpublic static Material TintMat => _mat ??= Material.Load( DefaultMat );\n\n\tpublic static GameObject BoxAt( string name, Vector3 pos, Vector3 scale, Color tint, GameObject parent = null, bool collider = true )\n\t{\n\t\tvar go = new GameObject( true, name );\n\t\tif ( parent is not null )\n\t\t\tgo.SetParent( parent, false );\n\t\tgo.LocalPosition = parent is null ? default : pos;\n\t\tif ( parent is null )\n\t\t\tgo.WorldPosition = pos;\n\t\tgo.LocalScale = scale;\n\n\t\tvar mr = go.Components.Create<ModelRenderer>();\n\t\tmr.Model = BoxModel;\n\t\tmr.MaterialOverride = TintMat;\n\t\tmr.Tint = tint;\n\n\t\tif ( collider )\n\t\t{\n\t\t\tvar col = go.Components.Create<BoxCollider>();\n\t\t\tcol.Scale = new Vector3( 50, 50, 50 );\n\t\t\tcol.Static = parent is null;\n\t\t}\n\n\t\treturn go;\n\t}\n\n\tpublic static GameObject PlaneAt( string name, Vector3 pos, Vector3 scale, Color tint, bool collider = true )\n\t{\n\t\tvar go = new GameObject( true, name );\n\t\tgo.WorldPosition = pos;\n\t\tgo.LocalScale = scale;\n\n\t\tvar mr = go.Components.Create<ModelRenderer>();\n\t\tmr.Model = PlaneModel;\n\t\tmr.MaterialOverride = TintMat;\n\t\tmr.Tint = tint;\n\n\t\tif ( collider )\n\t\t{\n\t\t\tvar col = go.Components.Create<BoxCollider>();\n\t\t\tcol.Center = new Vector3( 0, 0, -4 );\n\t\t\tcol.Scale = new Vector3( 100, 100, 8 );\n\t\t\tcol.Static = true;\n\t\t}\n\n\t\treturn go;\n\t}\n\n\tpublic static GameObject Person( string name, Vector3 pos, Color tint, float scale = 1f )\n\t{\n\t\tvar go = new GameObject( true, name );\n\t\tgo.WorldPosition = pos;\n\t\tgo.LocalScale = scale;\n\n\t\ttry\n\t\t{\n\t\t\tvar skin = go.Components.Create<SkinnedModelRenderer>();\n\t\t\tskin.Model = CitizenModel;\n\t\t\tskin.Tint = tint;\n\t\t\tskin.UseAnimGraph = true;\n\t\t}\n\t\tcatch\n\t\t{\n\t\t\tBoxAt( \"body\", Vector3.Up * 36 * scale, new Vector3( 0.4f, 0.25f, 0.9f ) * scale, tint, go, false );\n\t\t}\n\n\t\tvar col = go.Components.Create<BoxCollider>();\n\t\tcol.Center = Vector3.Up * 36 * scale;\n\t\tcol.Scale = new Vector3( 20, 20, 72 ) * scale;\n\t\tcol.Static = true;\n\t\treturn go;\n\t}\n}\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/menupanel.razor.scss",
"FileName": "menupanel.razor.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "\r\nmenupanel\r\n{\r\n position: absolute;\r\n z-index: 1000;\r\n pointer-events: all;\r\n font-size: 12px;\r\n flex-shrink: 0;\r\n\r\n .background\r\n {\r\n position: absolute;\r\n left: -5000px;\r\n right: -5000px;\r\n top: -5000px;\r\n bottom: -5000px;\r\n }\r\n\r\n > .inner\r\n {\r\n min-width: 200px;\r\n min-height: 20px;\r\n flex-direction: column;\r\n font-family: Poppins;\r\n font-weight: bold;\r\n border-radius: 10px;\r\n box-shadow: 5px 5px 30px #000e;\r\n background-color: #2a2a2a;\r\n flex-shrink: 0;\r\n\r\n .spacer\r\n {\r\n height: 1px;\r\n background-color: #0005;\r\n }\r\n\r\n .option\r\n {\r\n color: #fffa;\r\n padding: 0px 8px;\r\n cursor: pointer;\r\n flex-shrink: 0;\r\n height: 32px;\r\n\r\n &:first-child\r\n {\r\n border-top-left-radius: 10px;\r\n border-top-right-radius: 10px;\r\n }\r\n\r\n &:last-child\r\n {\r\n border-bottom-left-radius: 10px;\r\n border-bottom-right-radius: 10px;\r\n }\r\n\r\n .icon\r\n {\r\n padding: 8px;\r\n font-family: Material Icons;\r\n justify-content: center;\r\n align-items: center;\r\n flex-shrink: 0;\r\n }\r\n\r\n .text\r\n {\r\n padding: 8px;\r\n flex-shrink: 0;\r\n }\r\n\r\n &:hover\r\n {\r\n background-color: #3472e6;\r\n color: #f5f8fe;\r\n }\r\n }\r\n }\r\n}\r\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/dropdown.cs.scss",
"FileName": "dropdown.cs.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": ".dropdown\r\n{\r\n\tgap: 2px;\r\n\tflex-grow: 1;\r\n\tcursor: pointer;\r\n\tjustify-content: flex-end;\r\n\talign-items: center;\r\n\tpadding: 0px 12px;\r\n\r\n\t.button-right-column\r\n\t{\r\n\t\tflex-grow: 1;\r\n\t}\r\n}\r\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/controls/switchcontrol.razor.scss",
"FileName": "switchcontrol.razor.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "\r\n.switchcontrol\r\n{\r\n flex-direction: row;\r\n width: 100px;\r\n min-height: 24px;\r\n align-items: center;\r\n cursor: pointer;\r\n\r\n .switch-frame\r\n {\r\n flex-grow: 0;\r\n flex-shrink: 1;\r\n width: 48px;\r\n height: 16px;\r\n background-color: #fff1;\r\n margin: 0px 5px;\r\n align-items: center;\r\n border-radius: 100px;\r\n transition: all 0.4s linear;\r\n\r\n .switch-inner\r\n {\r\n position: relative;\r\n flex-grow: 0;\r\n flex-shrink: 1;\r\n background-color: #999;\r\n width: 25px;\r\n height: 25px;\r\n border-radius: 100px;\r\n left: 20%;\r\n transform: translateX( -50% );\r\n transition: all 0.3s ease-out;\r\n }\r\n }\r\n\r\n &.active\r\n {\r\n .switch-frame\r\n {\r\n background-color: #fffa;\r\n }\r\n\r\n .switch-inner\r\n {\r\n left: 80%;\r\n background-color: #fff;\r\n }\r\n }\r\n}\r\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "styles/form/_colorproperty.scss",
"FileName": "_colorproperty.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "\r\n\r\n.colorproperty\r\n{\r\n\talign-items: center;\r\n\tposition: relative;\r\n\r\n\t.colorsquare\r\n\t{\r\n\t\twidth: 20px;\r\n\t\theight: 20px;\r\n\t\tborder-radius: 4px;\r\n\t\tmargin-right: 8px;\r\n\t\tposition: absolute;\r\n\t\tleft: 7px;\r\n\t\tz-index: 1;\r\n\t\tcursor: pointer;\r\n\t}\r\n\r\n\t> .textentry:not( .a.b.c )\r\n\t{\r\n\t\tpadding-left: 36px;\r\n\t}\r\n}"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/controls/vectorcontrol.cs.scss",
"FileName": "vectorcontrol.cs.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "VectorControl\r\n{\r\n\tgap: 2px;\r\n\tflex-grow: 1;\r\n}\r\n\r\nVectorControl NumberEntry\r\n{\r\n\tflex-basis: 50%;\r\n}"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/controls/color/coloralphacontrol.cs.scss",
"FileName": "coloralphacontrol.cs.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "ColorAlphaControl\r\n{\r\n\tgap: 0.5rem;\r\n\tflex-grow: 1;\r\n\tpointer-events: all;\r\n\tbackground: linear-gradient( to right, black, white );\r\n\tborder-radius: 4px;\r\n\tpadding: 2px;\r\n\theight: 12px;\r\n\tposition: relative;\r\n\tcursor: pointer;\r\n\tborder: 1px solid #333;\r\n\r\n\t&:hover\r\n\t{\r\n\t\tborder: 1px solid #08f;\r\n\t}\r\n\r\n\t&:active\r\n\t{\r\n\t\tborder: 1px solid #fff;\r\n\t}\r\n\r\n\t.handle\r\n\t{\r\n\t\ttop: -5px;\r\n\t\tbottom: -5px;\r\n\t\taspect-ratio: 1;\r\n\t\tborder-radius: 100px;\r\n\t\tborder: 2px solid #444;\r\n\t\tposition: absolute;\r\n\t\tbackground-color: white;\r\n\t\tbox-shadow: 2px 2px 16px #000a;\r\n\t\ttransform: translateX( -50% );\r\n\t\tpointer-events: none;\r\n\t}\r\n}\r\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/controlsheet/controlsheetgroupheader.cs.scss",
"FileName": "controlsheetgroupheader.cs.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "ControlSheetGroupHeader\r\n{\r\n\tfont-size: 1.33rem;\r\n\tcolor: red;\r\n\tgap: 2px;\r\n\talign-items: center;\r\n\r\n\t&.hidden\r\n\t{\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t> .title\r\n\t{\r\n\t\tfont-weight: 600;\r\n\t}\r\n\r\n\t&.has-toggle\r\n\t{\r\n\t\tcursor: pointer;\r\n\t\topacity: 0.8;\r\n\r\n\t\t&:before\r\n\t\t{\r\n\t\t\tcontent: ' ';\r\n\t\t\twidth: 22px;\r\n\t\t\theight: 22px;\r\n\t\t\tbackground-color: #000a;\r\n\t\t\talign-items: center;\r\n\t\t\tjustify-content: center;\r\n\t\t\ttext-align: center;\r\n\t\t\tborder-radius: 5px;\r\n\t\t\tborder: 1px solid #555;\r\n\t\t}\r\n\r\n\t\t&:hover\r\n\t\t{\r\n\t\t\topacity: 1;\r\n\r\n\t\t\t&:before\r\n\t\t\t{\r\n\t\t\t\tborder-color: #888;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.checked\r\n\t\t{\r\n\t\t\t> .title\r\n\t\t\t{\r\n\t\t\t\tcolor: white;\r\n\t\t\t}\r\n\r\n\t\t\t&:before\r\n\t\t\t{\r\n\t\t\t\tcontent: '\u2713';\r\n\t\t\t\tfont-weight: bold;\r\n\t\t\t\tcolor: #08f;\r\n\t\t\t\tborder-color: #08f;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "Assembly.cs",
"FileName": "Assembly.cs",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "global using Sandbox;\nglobal using Sandbox.UI;\nglobal using System;\nglobal using System.Collections.Generic;\nglobal using System.Linq;\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "CalfPlayer.cs",
"FileName": "CalfPlayer.cs",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "namespace NiuLai;\n\npublic sealed class CalfPlayer : Component\n{\n\tpublic static CalfPlayer Instance { get; set; }\n\n\t[Property] public float WalkSpeed { get; set; } = 220f;\n\t[Property] public float RunSpeed { get; set; } = 340f;\n\t[Property] public float JumpSpeed { get; set; } = 340f;\n\n\tfloat _yaw = 180f;\n\tfloat _pitch = 18f;\n\tVector3 _vel;\n\tbool _grounded;\n\tfloat _bob;\n\tfloat _jumpDelay = -1f;\n\tfloat _jankTimer;\n\tfloat _idle;\n\tfloat _nagCool;\n\tGameObject _mesh;\n\n\tprotected override void OnAwake()\n\t{\n\t\tInstance = this;\n\t}\n\n\tprotected override void OnDestroy()\n\t{\n\t\tif ( Instance == this )\n\t\t\tInstance = null;\n\t}\n\n\tprotected override void OnStart()\n\t{\n\t\t_mesh = CowMesh.Build( GameObject, CowMesh.Calf, 1f );\n\t}\n\n\tprotected override void OnUpdate()\n\t{\n\t\tif ( Input.EscapePressed )\n\t\t{\n\t\t\tInput.EscapePressed = false;\n\t\t\tif ( GameState.Talking )\n\t\t\t\tGameState.ClearTalk();\n\t\t\telse\n\t\t\t\tGameFlow.TogglePause();\n\t\t}\n\n\t\tif ( GameFlow.BlocksWorld )\n\t\t\treturn;\n\n\t\tvar look = Input.AnalogLook;\n\t\t_yaw += look.yaw;\n\t\t_pitch = MathX.Clamp( _pitch + look.pitch, -8f, 42f );\n\n\t\tif ( FilmCut.Playing )\n\t\t{\n\t\t\tif ( PressedUse() )\n\t\t\t{\n\t\t\t\tif ( GameState.Talking )\n\t\t\t\t\tGameState.AdvanceTalk();\n\t\t\t\tFilmCut.Skip();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( GameState.Talking )\n\t\t{\n\t\t\tif ( PressedUse() )\n\t\t\t\tGameState.AdvanceTalk();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( PressedUse() )\n\t\t\tTryUse();\n\n\t\tif ( Input.Pressed( \"Moo\" ) || Input.Pressed( \"moo\" ) )\n\t\t\tMoo();\n\t}\n\n\tprotected override void OnFixedUpdate()\n\t{\n\t\tif ( GameFlow.BlocksWorld || GameState.Talking )\n\t\t{\n\t\t\t_vel = _vel.WithX( 0 ).WithY( 0 );\n\t\t\tApplyGravity( Time.Delta );\n\t\t\tSlide();\n\t\t\treturn;\n\t\t}\n\n\t\tvar dt = Time.Delta;\n\t\tvar analog = Input.AnalogMove.WithZ( 0 );\n\t\tvar cam = Rotation.FromYaw( _yaw );\n\t\tvar wish = cam * analog;\n\t\tif ( wish.Length > 1f )\n\t\t\twish = wish.Normal;\n\n\t\tvar speed = Input.Down( \"Run\" ) ? RunSpeed : WalkSpeed;\n\t\tspeed *= GameState.WalkMul;\n\t\tif ( GameState.InVoid )\n\t\t\tspeed *= 0.55f;\n\n\t\t_vel.x = wish.x * speed;\n\t\t_vel.y = wish.y * speed;\n\n\t\tif ( wish.Length > 0.1f )\n\t\t{\n\t\t\tvar face = Rotation.LookAt( wish.WithZ( 0 ), Vector3.Up );\n\t\t\tWorldRotation = Rotation.Slerp( WorldRotation, face, 1f - MathF.Pow( 0.001f, dt ) );\n\t\t\t_bob += dt * 9f;\n\t\t\t_idle = 0;\n\t\t\tif ( Input.Down( \"Run\" ) && _nagCool <= 0f && GameState.Beat == Beat.Migrate )\n\t\t\t{\n\t\t\t\t_nagCool = 10f;\n\t\t\t\tChatter.Say( \"\u725b\u5988\u5988 / Mama\", Chatter.Pick( Lines.MomSlow ) );\n\t\t\t\tGameAudio.PlayClip( GameAudio.SlowDown, 0.7f );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t_bob = 0;\n\t\t\t_idle += dt;\n\t\t\tif ( _idle > 7.5f && _nagCool <= 0f )\n\t\t\t{\n\t\t\t\t_idle = 0;\n\t\t\t\t_nagCool = 12f;\n\t\t\t\tChatter.Say( \"\u725b\u5988\u5988 / Mama\", Chatter.Pick( Lines.MomSleep ) );\n\t\t\t\tGameAudio.PlayClip( GameAudio.MamaWake, 0.75f );\n\t\t\t}\n\t\t}\n\t\t_nagCool -= dt;\n\n\t\tif ( _jumpDelay >= 0f )\n\t\t{\n\t\t\t_jumpDelay -= dt;\n\t\t\tif ( _jumpDelay <= 0f && _grounded )\n\t\t\t{\n\t\t\t\t_vel.z = JumpSpeed;\n\t\t\t\t_grounded = false;\n\t\t\t\t_jumpDelay = -1f;\n\t\t\t}\n\t\t}\n\t\telse if ( _grounded && Input.Pressed( \"Jump\" ) )\n\t\t{\n\t\t\t// Movie jank: the calf thinks about jumping, then hops too hard.\n\t\t\t_jumpDelay = 0.16f;\n\t\t\tTrophies.Unlock( \"think_jump\" );\n\t\t}\n\n\t\tApplyGravity( dt );\n\t\tSlide();\n\t\tUpdateMesh();\n\t\tUpdateCamera( dt );\n\t\tWatchBeats();\n\t}\n\n\tvoid WatchBeats()\n\t{\n\t\tif ( GameState.Beat == Beat.Migrate && GameState.GrassEaten < 1 && WorldPosition.x > 240f )\n\t\t{\n\t\t\tWorldPosition = WorldPosition.WithX( 230f );\n\t\t\tif ( !GameState.DidEatNag )\n\t\t\t{\n\t\t\t\tGameState.MarkEatNag();\n\t\t\t\tFilmCut.Play( CutId.EatFirst );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tChatter.Say( \"\u725b\u5988\u5988 / Mama\", Chatter.Pick( Lines.EatFirst ) );\n\t\t\t}\n\t\t}\n\n\t\tif ( GameState.Beat == Beat.Creek && !GameState.CreekJumped && WorldPosition.x > 500f )\n\t\t\tGameState.JumpCreek();\n\n\t\tif ( GameState.Beat == Beat.Wake && WorldPosition.y > 280f )\n\t\t\tTrophies.Unlock( \"fly_line\" );\n\n\t\tif ( !GameState.SawTail && GameState.Beat >= Beat.Night && GameState.Beat < Beat.Farewell )\n\t\t{\n\t\t\tif ( WorldBuilder.Stage.TryGetValue( \"leopard\", out var leo ) && leo.IsValid() )\n\t\t\t{\n\t\t\t\tif ( (WorldPosition - leo.WorldPosition).Length < 85f )\n\t\t\t\t{\n\t\t\t\t\tGameState.MarkTail();\n\t\t\t\t\tChatter.Say( \"\u725b\u6765 / Niu Lai\", Chatter.Pick( Lines.Tail ), 3.3f );\n\t\t\t\t\tGameAudio.PlayClip( GameAudio.Snake, 0.85f );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( _nagCool <= 0f && !GameState.Talking )\n\t\t{\n\t\t\tif ( GameState.Beat == Beat.Snake && WorldPosition.x > 220f && WorldPosition.x < 300f )\n\t\t\t{\n\t\t\t\t_nagCool = 16f;\n\t\t\t\tChatter.Say( \"\u65c1\u767d / Narrator\", Lines.Tease[0] );\n\t\t\t}\n\t\t\telse if ( GameState.Beat == Beat.Night && WorldPosition.x > 640f )\n\t\t\t{\n\t\t\t\t_nagCool = 16f;\n\t\t\t\tChatter.Say( \"\u65c1\u767d / Narrator\", Lines.Tease[1] );\n\t\t\t}\n\t\t\telse if ( GameState.Beat == Beat.Wake && WorldPosition.y > 120f )\n\t\t\t{\n\t\t\t\t_nagCool = 16f;\n\t\t\t\tChatter.Say( \"\u4e91\u738e / Yun Ding\", Lines.Tease[2] );\n\t\t\t}\n\t\t\telse if ( GameState.Beat == Beat.Cart && WorldPosition.x > 700f )\n\t\t\t{\n\t\t\t\t_nagCool = 16f;\n\t\t\t\tChatter.Say( \"\u65c1\u767d / Narrator\", Lines.Tease[3] );\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid ApplyGravity( float dt )\n\t{\n\t\tif ( !_grounded )\n\t\t\t_vel.z -= 900f * dt;\n\t}\n\n\tvoid Slide()\n\t{\n\t\tvar dt = Time.Delta;\n\t\tif ( GameState.WantHop )\n\t\t{\n\t\t\tGameState.WantHop = false;\n\t\t\t_vel.z = 420f;\n\t\t\t_grounded = false;\n\t\t}\n\n\t\tvar next = WorldPosition + _vel * dt;\n\t\tif ( !GameState.CreekJumped && next.x > 400f && next.x < 480f && GameState.Beat is Beat.Creek or Beat.Snake )\n\t\t{\n\t\t\tnext.x = 400f;\n\t\t\t_vel.x = 0;\n\t\t\tif ( _nagCool <= 0f )\n\t\t\t{\n\t\t\t\t_nagCool = 5f;\n\t\t\t\tChatter.Say( \"\u725b\u6765 / Niu Lai\", Chatter.Pick( Lines.CreekFear ) );\n\t\t\t}\n\t\t}\n\n\t\tvar wall = Scene.Trace.Ray( WorldPosition + Vector3.Up * 20f, next + Vector3.Up * 20f )\n\t\t\t.IgnoreGameObjectHierarchy( GameObject )\n\t\t\t.Radius( 14f )\n\t\t\t.Run();\n\t\tif ( wall.Hit )\n\t\t\tnext = WorldPosition + (next - WorldPosition) * MathF.Max( wall.Fraction - 0.05f, 0f );\n\n\t\tvar downFrom = next + Vector3.Up * 48f;\n\t\tvar ground = Scene.Trace.Ray( downFrom, next + Vector3.Down * 80f )\n\t\t\t.IgnoreGameObjectHierarchy( GameObject )\n\t\t\t.Run();\n\n\t\tif ( ground.Hit )\n\t\t{\n\t\t\tnext = ground.EndPosition;\n\t\t\t_grounded = _vel.z <= 20f;\n\t\t\tif ( _vel.z < 0f )\n\t\t\t\t_vel.z = 0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t_grounded = false;\n\t\t}\n\n\t\tWorldPosition = next;\n\t}\n\n\tvoid UpdateMesh()\n\t{\n\t\tif ( !_mesh.IsValid() )\n\t\t\treturn;\n\n\t\tvar g = GameState.Growth;\n\t\t_mesh.LocalScale = g;\n\t\tvar stiff = MathF.Sin( _bob ) * 8f;\n\t\t_mesh.LocalRotation = new Angles( stiff, 0, MathF.Sin( _bob * 0.5f ) * 3f );\n\t\t_mesh.LocalPosition = Vector3.Up * MathF.Abs( MathF.Sin( _bob ) ) * 3f;\n\t}\n\n\tvoid UpdateCamera( float dt )\n\t{\n\t\tif ( !Scene.Camera.IsValid() )\n\t\t\treturn;\n\n\t\t_jankTimer -= dt;\n\t\tvar hitch = _jankTimer > 0f ? 8f : 0f;\n\t\tif ( Random.Shared.Float() < 0.004f )\n\t\t\t_jankTimer = 0.08f;\n\n\t\tvar rot = Rotation.From( _pitch, _yaw, hitch );\n\t\tvar head = WorldPosition + Vector3.Up * (48f * GameState.Growth + 16f);\n\t\tvar desired = head - rot.Forward * (170f + GameState.Growth * 20f) + rot.Right * 12f;\n\n\t\tvar camHit = Scene.Trace.Ray( head, desired )\n\t\t\t.IgnoreGameObjectHierarchy( GameObject )\n\t\t\t.Run();\n\t\tif ( camHit.Hit )\n\t\t\tdesired = camHit.EndPosition + camHit.Normal * 6f;\n\n\t\tScene.Camera.WorldPosition = desired;\n\t\tScene.Camera.WorldRotation = rot;\n\t}\n\n\tvoid TryUse()\n\t{\n\t\tHotspot best = null;\n\t\tvar bestD = float.MaxValue;\n\t\tforeach ( var hs in Scene.GetAllComponents<Hotspot>() )\n\t\t{\n\t\t\tif ( !hs.IsValid() || !hs.InRange( WorldPosition ) )\n\t\t\t\tcontinue;\n\t\t\tvar d = (hs.WorldPosition - WorldPosition).Length;\n\t\t\tif ( d < bestD )\n\t\t\t{\n\t\t\t\tbestD = d;\n\t\t\t\tbest = hs;\n\t\t\t}\n\t\t}\n\n\t\tbest?.Use();\n\t}\n\n\tvoid Moo()\n\t{\n\t\tTrophies.Unlock( \"moo\" );\n\t\tHotspot near = null;\n\t\tvar best = float.MaxValue;\n\t\tforeach ( var hs in Scene.GetAllComponents<Hotspot>() )\n\t\t{\n\t\t\tif ( !hs.IsValid() )\n\t\t\t\tcontinue;\n\t\t\tvar d = (hs.WorldPosition - WorldPosition).Length;\n\t\t\tif ( d < best && d < 110f )\n\t\t\t{\n\t\t\t\tbest = d;\n\t\t\t\tnear = hs;\n\t\t\t}\n\t\t}\n\n\t\tGameState.MooWorld( near?.Id );\n\t}\n\n\tpublic void RefreshPrompt()\n\t{\n\t\tif ( GameFlow.BlocksWorld || GameState.Talking )\n\t\t\treturn;\n\n\t\tHotspot best = null;\n\t\tvar bestD = float.MaxValue;\n\t\tforeach ( var hs in Scene.GetAllComponents<Hotspot>() )\n\t\t{\n\t\t\tif ( !hs.IsValid() || !hs.InRange( WorldPosition ) )\n\t\t\t\tcontinue;\n\t\t\tvar d = (hs.WorldPosition - WorldPosition).Length;\n\t\t\tif ( d < bestD )\n\t\t\t{\n\t\t\t\tbestD = d;\n\t\t\t\tbest = hs;\n\t\t\t}\n\t\t}\n\n\t\tif ( best is null )\n\t\t{\n\t\t\tGameState.SetPrompt( \"\", \"\" );\n\t\t\treturn;\n\t\t}\n\n\t\tGameState.SetPrompt( $\"\u6309 E {best.LabelCn}\", $\"E {best.LabelEn}\" );\n\t}\n\n\tstatic bool PressedUse() =>\n\t\tInput.Pressed( \"Use\" ) || Input.Pressed( \"use\" ) || Input.Pressed( \"Submit\" ) || Input.Pressed( \"submit\" );\n}\n"
},
{
"Ident": "dogecoin.niulai",
"Path": "styles/form/_coloreditor.scss",
"FileName": "_coloreditor.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "\r\n$primary: red !default;\r\n$primary-alt: white !default;\r\n\r\n$switch-padding: 6px !default;\r\n\r\n.coloreditor\r\n{\r\n\tflex-direction: column;\r\n\tmin-width: 250px;\r\n\tmax-width: 250px;\r\n\r\n\t> .canvas\r\n\t{\r\n\t\tborder-top: 1px solid rgba( white, 0.5 );\r\n\t\tflex-grow: 1;\r\n\t\tflex-direction: column;\r\n\t\tpadding: 10px 15px;\r\n\r\n\r\n\t\t> textentry.textentry\r\n\t\t{\r\n\t\t\tflex-grow: 0;\r\n\t\t\tflex-shrink: 0;\r\n\t\t\twidth: auto;\r\n\t\t}\r\n\t}\r\n\r\n\t.slider\r\n\t{\r\n\t\tpadding: 6.5px;\r\n\t}\r\n\r\n\t.slider .track\r\n\t{\r\n\t\theight: 14px;\r\n\t\tborder-radius: 14px;\r\n\t\tleft: 0px;\r\n\t\tright: 0px;\r\n\t\ttransition: all 0.1s ease-out;\r\n\r\n\t\t.inner\r\n\t\t{\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\t.slider:hover, .slider:active\r\n\t{\r\n\t\tpadding: 7px;\r\n\r\n\t\t.track\r\n\t\t{\r\n\t\t\theight: 20px;\r\n\t\t\tborder-radius: 6px;\r\n\t\t}\r\n\r\n\t\t.thumb\r\n\t\t{\r\n\t\t\twidth: 10px;\r\n\t\t\theight: 16px;\r\n\t\t\tmargin-left: 2px;\r\n\t\t}\r\n\t}\r\n\r\n\t.slider .thumb\r\n\t{\r\n\t\twidth: 10px;\r\n\t\theight: 10px;\r\n\t\tbox-shadow: 0px 0px 0px transparent;\r\n\t\tbackground-color: white;\r\n\t\tbackdrop-filter: invert( 1 );\r\n\t\tmargin-left: 1px;\r\n\t\tpointer-events: none;\r\n\t}\r\n\r\n\t.alpha_slider .track\r\n\t{\r\n\t\tbackground-image: linear-gradient( to right, rgba( #ccc, 0.05 ), rgba( #ccc, 0.9 ) );\r\n\t}\r\n\r\n\t.hue .track\r\n\t{\r\n\t\tbackground: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n\r\n\t\t.inner\r\n\t\t{\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\t.satval\r\n\t{\r\n\t\tbackground: linear-gradient(to right, white, transparent);\r\n\t\theight: 200px;\r\n\t\tposition: relative;\r\n\r\n\t\t&:active\r\n\t\t{\r\n\t\t\tz-index: 10;\r\n\t\t\tcursor: none;\r\n\t\t}\r\n\r\n\t\t.value_gradient\r\n\t\t{\r\n\t\t\tbackground: linear-gradient(to bottom, black, white);\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\tleft: 0;\r\n\t\t\tright: 0;\r\n\t\t\tbottom: 0;\r\n\t\t\tpointer-events: none;\r\n\t\t\tmix-blend-mode: multiply;\r\n\t\t}\r\n\r\n\t\t.thumb\r\n\t\t{\r\n\t\t\tz-index: 10;\r\n\t\t}\r\n\t}\r\n\r\n\t.presets\r\n\t{\r\n\t\tflex-wrap: wrap;\r\n\t\talign-content: center;\r\n\t\tjustify-content: center;\r\n\t\tpadding: 15px;\r\n\t\tborder-top: 1px solid rgba( white, 0.5 );\r\n\r\n\t\t.preset\r\n\t\t{\r\n\t\t\tbackground-color: white;\r\n\t\t\twidth: 16px;\r\n\t\t\theight: 16px;\r\n\t\t\tmargin: 2px;\r\n\t\t\tborder-radius: 20px;\r\n\t\t\tcursor: pointer;\r\n\t\t\t\r\n\t\t\t&:hover\r\n\t\t\t{\r\n\t\t\t\tbox-shadow: 0px 0px 1px 2px white;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n.coloreditorrgba\r\n{\r\n\tflex-direction: column;\r\n\r\n\t.slider\r\n\t{\r\n\t\tpadding-right: 16px;\r\n\t}\r\n\r\n\t.slider .track\r\n\t{\r\n\t\tbackground-color: transparent;\r\n\t\theight: 14px;\r\n\t\tborder-radius: 14px;\r\n\t\tleft: 0px;\r\n\t\tright: 0px;\r\n\r\n\t\t.inner\r\n\t\t{\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\t.slider .thumb\r\n\t{\r\n\t\twidth: 12px;\r\n\t\theight: 12px;\r\n\t\tbox-shadow: 0px 0px 0px transparent;\r\n\t\tbackground-color: white;\r\n\t\tmargin-left: 2px;\r\n\t\tbackdrop-filter: invert( 1 );\r\n\t}\r\n\r\n\t.red_slider .track\r\n\t{\r\n\t\tbackground-image: linear-gradient( to right, rgba( #e63439, 0.1 ), rgba( #e63439, 0.9 ) );\r\n\t}\r\n\r\n\t.green_slider .track\r\n\t{\r\n\t\tbackground-image: linear-gradient( to right, rgba( #54be35, 0.1 ), rgba( #54be35, 0.9 ) );\r\n\t}\r\n\r\n\t.blue_slider .track\r\n\t{\r\n\t\tbackground-image: linear-gradient( to right, rgba( #3472e6, 0.1 ), rgba( #3472e6, 0.9 ) );\r\n\t}\r\n\r\n\t.alpha_slider .track\r\n\t{\r\n\t\tbackground-image: linear-gradient( to right, rgba( #ccc, 0.05 ), rgba( #ccc, 0.9 ) );\r\n\t}\r\n}\r\n\r\n\r\n.coloreditorhsva\r\n{\r\n\tflex-direction: column;\r\n\r\n\t.slider\r\n\t{\r\n\t\tpadding-right: 16px;\r\n\t}\r\n\r\n\t.slider .track\r\n\t{\r\n\t\tbackground-color: transparent;\r\n\t\theight: 14px;\r\n\t\tborder-radius: 14px;\r\n\t\tleft: 0px;\r\n\t\tright: 0px;\r\n\r\n\t\t.inner\r\n\t\t{\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t}\r\n\r\n\t.slider .thumb\r\n\t{\r\n\t\twidth: 12px;\r\n\t\theight: 12px;\r\n\t\tbox-shadow: 0px 0px 0px transparent;\r\n\t\tbackground-color: white;\r\n\t\tmargin-left: 2px;\r\n\t\tbackdrop-filter: invert( 1 );\r\n\t}\r\n\t\t\r\n\t.hue_slider .track\r\n\t{\r\n\t\tbackground-image: linear-gradient( to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00 );\r\n\t}\r\n\r\n\t.alpha_slider .track\r\n\t{\r\n\t\tbackground-image: linear-gradient( to right, rgba( #ccc, 0.05 ), rgba( #ccc, 0.9 ) );\r\n\t}\r\n}"
},
{
"Ident": "dogecoin.niulai",
"Path": "ui/controls/enumcontrol.cs.scss",
"FileName": "enumcontrol.cs.scss",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "EnumControl\r\n{\r\n\tgap: 2px;\r\n\tflex-grow: 1;\r\n}\r\n\r\nEnumControl DropDown,\r\nEnumControl ButtonGroup\r\n{\r\n\tborder-radius: 8px;\r\n\tbackground-color: #000a;\r\n\tflex-grow: 1;\r\n}\r\n\r\nEnumControl DropDown\r\n{\r\n\tflex-grow: 1;\r\n\tmin-height: 32px;\r\n}\r\n\r\nEnumControl ButtonGroup\r\n{\r\n\tborder-radius: 12px;\r\n\toverflow: hidden;\r\n\tmin-height: 32px;\r\n\r\n\tButton\r\n\t{\r\n\t\tflex-grow: 1;\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t\tgap: 4px;\r\n\t\tcolor: #aaa;\r\n\t\tfont-size: 1rem;\r\n\t\tcursor: pointer;\r\n\r\n\t\t.icon\r\n\t\t{\r\n\t\t\tcolor: #08f;\r\n\t\t}\r\n\r\n\t\t&:hover\r\n\t\t{\r\n\t\t\tcolor: #ddd;\r\n\r\n\t\t\t.icon\r\n\t\t\t{\r\n\t\t\t\tcolor: #3af;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&:active\r\n\t\t{\r\n\t\t\tbackground-color: #04a;\r\n\t\t\tcolor: white;\r\n\t\t\ttransform: translateX( 1px ) translateY( 1px );\r\n\r\n\t\t\t.icon\r\n\t\t\t{\r\n\t\t\t\tcolor: #fff;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&.active\r\n\t\t{\r\n\t\t\tbackground-color: #08f;\r\n\t\t\tcolor: white;\r\n\t\t\tpointer-events: none;\r\n\r\n\t\t\t.icon\r\n\t\t\t{\r\n\t\t\t\tcolor: #fff;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}"
},
{
"Ident": "dogecoin.niulai",
"Path": "Trophies.cs",
"FileName": "Trophies.cs",
"PackageType": "game",
"CodeKind": "Game",
"AssetVersionId": 343005,
"Code": "using Sandbox.Services;\n\nnamespace NiuLai;\n\n/// <summary>One package trophy. Ident must match the dashboard Manual achievement.</summary>\npublic sealed class TrophyDef\n{\n\tpublic string Id { get; init; }\n\tpublic string Title { get; init; }\n\tpublic string Description { get; init; }\n\tpublic int Score { get; init; }\n\tpublic bool Hidden { get; init; }\n}\n\n/// <summary>\n/// 30 film trophies. Local toast + Achievements.Unlock(ident).\n/// Paste Catalog Id / Title / Description onto the package dashboard as Manual.\n/// </summary>\npublic static class Trophies\n{\n\tpublic static readonly TrophyDef[] Catalog =\n\t{\n\t\tnew() { Id = \"walk_slow\", Title = \"You Slow A Bit\", Description = \"Start the walk. The herd is already ahead of you.\", Score = 5 },\n\t\tnew() { Id = \"five_year\", Title = \"Five-Year Handmade\", Description = \"Open the title. Loading takes five years. Joke is on us.\", Score = 5 },\n\t\tnew() { Id = \"open_eye\", Title = \"Don't Sleep\", Description = \"Talk to \u725b\u5988\u5988. She says open your eyes.\", Score = 10 },\n\t\tnew() { Id = \"grass_free\", Title = \"Grass Is Free\", Description = \"Eat one tuft. Mama said it does not cost money.\", Score = 5 },\n\t\tnew() { Id = \"bigger_little\", Title = \"I Bigger A Little\", Description = \"Eat 6 tufts and feel the model scale up.\", Score = 10 },\n\t\tnew() { Id = \"share_ready\", Title = \"Hold Some Grass\", Description = \"Carry 3 tufts. Somebody hungry is coming.\", Score = 5 },\n\t\tnew() { Id = \"yun_ding\", Title = \"Come Up On My Back\", Description = \"Meet \u4e91\u738e. Then the world goes black.\", Score = 10 },\n\t\tnew() { Id = \"pure_black\", Title = \"Pure Black Background\", Description = \"Finish the first dream with the lark.\", Score = 10 },\n\t\tnew() { Id = \"not_rope\", Title = \"I Am Not Rope\", Description = \"Let \u5c0f\u7ef3\u5934 bite you. He was never a rope.\", Score = 10 },\n\t\tnew() { Id = \"only_jump\", Title = \"Only Can Jump\", Description = \"Jump the creek because the snake is behind you.\", Score = 10 },\n\t\tnew() { Id = \"empty_bag\", Title = \"First Go Eat Grass\", Description = \"Offer \u8c79\u62c9 an empty bag. He is not impressed.\", Score = 5, Hidden = true },\n\t\tnew() { Id = \"bao_la\", Title = \"Stomach Empty\", Description = \"Find \u8c79\u62c9 at night. His belly is a cave.\", Score = 10 },\n\t\tnew() { Id = \"share_grass\", Title = \"You Give Me Food\", Description = \"Share one tuft with the leopard.\", Score = 10 },\n\t\tnew() { Id = \"niu_er\", Title = \"Identity Not Right\", Description = \"Hear \u725b\u4e8c decide \u8c79\u62c9 is the problem.\", Score = 10 },\n\t\tnew() { Id = \"wolf_come\", Title = \"Wolf Come. Really Come.\", Description = \"Survive the first wolf rush.\", Score = 10 },\n\t\tnew() { Id = \"not_allow\", Title = \"Not Allow Follow\", Description = \"Watch the herd ban \u8c79\u62c9.\", Score = 10 },\n\t\tnew() { Id = \"still_here\", Title = \"I Still Here\", Description = \"Talk to \u8c79\u62c9 after nobody believes him.\", Score = 10 },\n\t\tnew() { Id = \"dont_look_back\", Title = \"Don't Look Back\", Description = \"Hear \u5988\u5988 stay behind in the canyon.\", Score = 15 },\n\t\tnew() { Id = \"cart_big\", Title = \"The Cart Become More Big\", Description = \"Reach the \u53f0\u8f66 while it is still growing.\", Score = 10 },\n\t\tnew() { Id = \"think_jump\", Title = \"Think Then Hop\", Description = \"Press jump. Wait. Then hop too hard.\", Score = 5, Hidden = true },\n\t\tnew() { Id = \"moo\", Title = \"\u54de\u2014\u2014\u2014\u2014\", Description = \"Press F. Moo at nothing in particular.\", Score = 5 },\n\t\tnew() { Id = \"moo_cart\", Title = \"Niu Lai No Listen\", Description = \"\u4e91\u738e said don't fight. You mooed at the cart.\", Score = 15 },\n\t\tnew() { Id = \"thank_you\", Title = \"Yun Ding, Thank You\", Description = \"Say goodbye in the second black dream.\", Score = 10 },\n\t\tnew() { Id = \"stand_stable\", Title = \"Niu Lai Stand Stable\", Description = \"Wake up. Stand still for once.\", Score = 10 },\n\t\tnew() { Id = \"fly_line\", Title = \"Follow Her Fly Line\", Description = \"Follow \u4e91\u738e north after the dream.\", Score = 10 },\n\t\tnew() { Id = \"too_early\", Title = \"First Finish Your Road\", Description = \"Talk to \u725b\u7238\u7238 before you finished the road.\", Score = 5, Hidden = true },\n\t\tnew() { Id = \"herd_boss\", Title = \"I Am Cow Father\", Description = \"Find \u725b\u7238\u7238 at the end of the line.\", Score = 15 },\n\t\tnew() { Id = \"we_walk\", Title = \"We Walk Together\", Description = \"Start the reunion walk with the herd.\", Score = 15 },\n\t\tnew() { Id = \"after_rain\", Title = \"\u96e8\u540e\u8f7b\u98ce\u6709\u9999\", Description = \"Finish the movie. The song plays.\", Score = 25 },\n\t\tnew() { Id = \"watch_again\", Title = \"\u518d\u770b\u4e00\u904d\", Description = \"Start the film a second time.\", Score = 10 },\n\t};\n\n\tconst float ToastSeconds = 4.4f;\n\n\tstatic readonly HashSet<string> Got = new( StringComparer.OrdinalIgnoreCase );\n\tstatic readonly Queue<string> ToastQ = new();\n\tstatic string _toastId = \"\";\n\tstatic float _toastLeft;\n\n\tpublic static bool EverWon { get; private set; }\n\tpublic static int Version { get; private set; }\n\tpublic static bool ToastVisible => _toastLeft > 0f && !string.IsNullOrEmpty( _toastId );\n\tpublic static TrophyDef Toast => Find( _toastId );\n\n\tpublic static TrophyDef Find( string id )\n\t{\n\t\tif ( string.IsNullOrEmpty( id ) )\n\t\t\treturn null;\n\n\t\tforeach ( var d in Catalog )\n\t\t{\n\t\t\tif ( string.Equals( d.Id, id, StringComparison.OrdinalIgnoreCase ) )\n\t\t\t\treturn d;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tpublic static void Unlock( string id )\n\t{\n\t\tif ( string.IsNullOrEmpty( id ) )\n\t\t\treturn;\n\t\tif ( Find( id ) is null )\n\t\t\treturn;\n\t\tif ( !Got.Add( id ) )\n\t\t\treturn;\n\n\t\ttry\n\t\t{\n\t\t\tAchievements.Unlock( id );\n\t\t}\n\t\tcatch\n\t\t{\n\t\t\t// Dashboard ident missing or services offline \u2014 local toast still pops.\n\t\t}\n\n\t\tToastQ.Enqueue( id );\n\t\tif ( !ToastVisible )\n\t\t\tShowNext();\n\t\tVersion++;\n\t}\n\n\tpublic static void MarkWon() => EverWon = true;\n\n\tpublic static void Tick( float dt )\n\t{\n\t\tif ( _toastLeft <= 0f )\n\t\t\treturn;\n\n\t\t_toastLeft -= dt;\n\t\tif ( _toastLeft > 0f )\n\t\t\treturn;\n\n\t\t_toastLeft = 0f;\n\t\t_toastId = \"\";\n\t\tVersion++;\n\t\tShowNext();\n\t}\n\n\tpublic static void Evaluate()\n\t{\n\t\tif ( GameState.GrassEaten >= 1 )\n\t\t\tUnlock( \"grass_free\" );\n\t\tif ( GameState.GrassEaten >= 6 )\n\t\t\tUnlock( \"bigger_little\" );\n\t\tif ( GameState.GrassBag >= 3 )\n\t\t\tUnlock( \"share_ready\" );\n\t\tif ( GameState.Beat >= Beat.Snake )\n\t\t\tUnlock( \"pure_black\" );\n\t\tif ( GameState.Bitten )\n\t\t\tUnlock( \"not_rope\" );\n\t\tif ( GameState.CreekJumped )\n\t\t\tUnlock( \"only_jump\" );\n\t\tif ( GameState.FedLeopard )\n\t\t\tUnlock( \"share_grass\" );\n\t\tif ( GameState.HerdSuspects )\n\t\t\tUnlock( \"niu_er\" );\n\t\tif ( GameState.Beat >= Beat.Ban )\n\t\t\tUnlock( \"wolf_come\" );\n\t\tif ( GameState.BaoLaBanned )\n\t\t\tUnlock( \"not_allow\" );\n\t\tif ( GameState.MomGone )\n\t\t\tUnlock( \"dont_look_back\" );\n\t\tif ( GameState.Beat >= Beat.Cart )\n\t\t\tUnlock( \"cart_big\" );\n\t\tif ( GameState.MooedCart )\n\t\t\tUnlock( \"moo_cart\" );\n\t\tif ( GameState.Beat >= Beat.Farewell )\n\t\t\tUnlock( \"thank_you\" );\n\t\tif ( GameState.Beat >= Beat.Wake )\n\t\t\tUnlock( \"stand_stable\" );\n\t\tif ( GameState.FoundDad )\n\t\t\tUnlock( \"herd_boss\" );\n\t\tif ( GameState.SongWalk )\n\t\t\tUnlock( \"we_walk\" );\n\t\tif ( GameState.Won )\n\t\t\tUnlock( \"after_rain\" );\n\t}\n\n\tpublic static void OnUsed( string id )\n\t{\n\t\tswitch ( id )\n\t\t{\n\t\t\tcase \"mom\":\n\t\t\t\tUnlock( \"open_eye\" );\n\t\t\t\tbreak;\n\t\t\tcase \"lark\":\n\t\t\t\tif ( GameState.Beat == Beat.Migrate )\n\t\t\t\t\tUnlock( \"yun_ding\" );\n\t\t\t\tbreak;\n\t\t\tcase \"leopard\":\n\t\t\t\tUnlock( \"bao_la\" );\n\t\t\t\tif ( GameState.FedLeopard )\n\t\t\t\t\tUnlock( \"still_here\" );\n\t\t\t\tbreak;\n\t\t\tcase \"dad\":\n\t\t\t\tif ( GameState.Beat is not Beat.Wake and not Beat.Reunion )\n\t\t\t\t\tUnlock( \"too_early\" );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tstatic void ShowNext()\n\t{\n\t\tif ( ToastVisible || ToastQ.Count == 0 )\n\t\t\treturn;\n\n\t\t_toastId = ToastQ.Dequeue();\n\t\t_toastLeft = ToastSeconds;\n\t\tVersion++;\n\t}\n}\n"
}
]
}