mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Spindash helper warning
This commit is contained in:
parent
ca8e46b0ea
commit
2fbc8346e5
1 changed files with 25 additions and 5 deletions
|
|
@ -415,7 +415,7 @@ std::optional<TargetTracking::Tooltip> object_tooltip(const mobj_t* mobj)
|
|||
|
||||
auto conditional = [](bool val, auto&& f) { return val ? std::optional<Tooltip> {f()} : std::nullopt; };
|
||||
|
||||
Draw::Font splitfont = (r_splitscreen > 1) ? Draw::Font::kThin : Draw::Font::kMenu;
|
||||
Draw::Font splitfont = (r_splitscreen > 1) ? Draw::Font::kThin : Draw::Font::kMedium;
|
||||
|
||||
switch (mobj->type)
|
||||
{
|
||||
|
|
@ -457,7 +457,7 @@ std::optional<TargetTracking::Tooltip> object_tooltip(const mobj_t* mobj)
|
|||
case MT_GARDENTOP:
|
||||
return conditional(
|
||||
mobj->tracer == stplyr->mo && Obj_GardenTopPlayerNeedsHelp(mobj),
|
||||
[&] { return TextElement().parse("Try <r>!").font(splitfont); }
|
||||
[&] { return TextElement().parse("TRY <r_animated>").font(splitfont); }
|
||||
);
|
||||
|
||||
case MT_PLAYER:
|
||||
|
|
@ -482,6 +482,26 @@ std::optional<TargetTracking::Tooltip> object_tooltip(const mobj_t* mobj)
|
|||
.offset3d(0, 0, 32 * mobj->scale * P_MobjFlip(mobj));
|
||||
}
|
||||
|
||||
if (mobj->player == stplyr && K_ApplyOffroad(stplyr) && stplyr->offroad == FRACUNIT && !stplyr->spindash
|
||||
&& stplyr->boostpower < FRACUNIT && stplyr->speed < 2*K_GetKartSpeed(stplyr, false, false)/3)
|
||||
{
|
||||
if (stplyr->itemamount &&
|
||||
(stplyr->itemtype == KITEM_SNEAKER || stplyr->itemtype == KITEM_INVINCIBILITY || stplyr->itemtype == KITEM_ROCKETSNEAKER
|
||||
|| stplyr->itemtype == KITEM_FLAMESHIELD || stplyr->itemtype == KITEM_GROW)
|
||||
)
|
||||
return Tooltip(
|
||||
TextElement(
|
||||
TextElement().parse("BOOST <l_animated>").font(splitfont))
|
||||
)
|
||||
.offset3d(0, 0, 64 * mobj->scale * P_MobjFlip(mobj));
|
||||
|
||||
return Tooltip(
|
||||
TextElement(
|
||||
TextElement().parse("HOLD <c_animated>").font(splitfont))
|
||||
)
|
||||
.offset3d(0, 0, 64 * mobj->scale * P_MobjFlip(mobj));
|
||||
}
|
||||
|
||||
return conditional(
|
||||
mobj->player == stplyr && stplyr->icecube.frozen,
|
||||
[&] { return Tooltip(TextElement(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue