From 16f005d17135ae7b855b5f2a9db7a71cec4d733f Mon Sep 17 00:00:00 2001 From: Eole Date: Wed, 30 Aug 2017 18:06:26 +0200 Subject: [PATCH] 2017-08-30 update. --- .../Libs/Nadeo/ChannelProgression.Script.txt | 7 +- .../Libs/Nadeo/MatchmakingMatch.Script.txt | 4 +- .../Nadeo/ShootMania/Attributes.Script.txt | 43 +- .../Libs/Nadeo/TrackMania/WarmUp4.Script.txt | 5 +- .../Nadeo/TrackMania/Chase_Client.Script.txt | 1510 ++++++++--------- .../Nadeo/TrackMania/UI_Client.Script.txt | 11 +- .../TrackMania/Base/ModeBase2.Script.txt | 2 +- .../Base/ModeMatchmaking2.Script.txt | 5 +- .../Scripts/Modes/TrackMania/Chase.Script.txt | 5 +- .../ShootMania/Royal/RoyalFun.Script.txt | 20 +- 10 files changed, 832 insertions(+), 780 deletions(-) diff --git a/Common/Scripts/Libs/Nadeo/ChannelProgression.Script.txt b/Common/Scripts/Libs/Nadeo/ChannelProgression.Script.txt index 5e98623..6ecba20 100644 --- a/Common/Scripts/Libs/Nadeo/ChannelProgression.Script.txt +++ b/Common/Scripts/Libs/Nadeo/ChannelProgression.Script.txt @@ -1,7 +1,7 @@ /** * Channel progression library */ -#Const Version "2017-06-22" +#Const Version "2017-08-30" #Const ScriptName "Libs/Nadeo/ChannelProgression.Script.txt" // ---------------------------------- // @@ -83,6 +83,9 @@ Text Private_GenerateHeaderML(Vec2 _Size, Real _Ratio) { * @return The manialink */ Text Private_GetChannelProgressionML() { + // @disabled + return ""; + declare PlayerClass = "CTmMlPlayer"; if (This is CSmMode) PlayerClass = "CSmPlayer"; @@ -983,7 +986,7 @@ main() { XP_AnimStart = BestScores_AnimStart + C_BestScores_AnimDuration + 1000; // Regional ranking declare AnimDuration = 0; - if (Owner != Null) { + if (Owner != Null && Owner.Score != Null) { declare netread Net_LibChanPro_OldXP for Owner.Score = 0; declare netread Net_LibChanPro_NewXP for Owner.Score = 0; AnimDuration = GetXPAnimDuration(Net_LibChanPro_EmblemsXP, Net_LibChanPro_OldXP, Net_LibChanPro_NewXP); diff --git a/Common/Scripts/Libs/Nadeo/MatchmakingMatch.Script.txt b/Common/Scripts/Libs/Nadeo/MatchmakingMatch.Script.txt index 5889f0e..4d85500 100644 --- a/Common/Scripts/Libs/Nadeo/MatchmakingMatch.Script.txt +++ b/Common/Scripts/Libs/Nadeo/MatchmakingMatch.Script.txt @@ -770,7 +770,7 @@ Void ManagePlayers() { if (MMCommon::GetLogDisplay("MiscDebug")) Private_Log("[SERVER] Invalid player : "^Player.User.Login^" > Transfert to the lobby : "^GetLobbyLogin()); } else if (Now >= LibMMMatch_CanBeKicked) { - declare Kicked = ServerAdmin.KickUser(Player.User, _("This matchmaking server is hosting a match. You can't join at the moment.")); + declare Kicked = ServerAdmin.Kick(Player.User, _("This matchmaking server is hosting a match. You can't join at the moment.")); if (MMCommon::GetLogDisplay("MiscDebug")) Private_Log("[SERVER] Invalid player : "^Player.User.Login^" > Kicked."); } } @@ -1448,7 +1448,7 @@ Void MatchToLobby_End() { if (MMCommon::GetLogDisplay("MiscDebug")) Private_Log("[SERVER] This is a channel server. Do not kick the players"); } else { foreach (User in Users) { - declare Kicked = ServerAdmin.KickUser(User, _("Match over. You should have been transferred back to the lobby.")); + declare Kicked = ServerAdmin.Kick(User, _("Match over. You should have been transferred back to the lobby.")); if (MMCommon::GetLogDisplay("MiscDebug")) Private_Log("[SERVER] Match over but "^User.Login^" was not transferred. Kick him : "^Kicked); } } diff --git a/Common/Scripts/Libs/Nadeo/ShootMania/Attributes.Script.txt b/Common/Scripts/Libs/Nadeo/ShootMania/Attributes.Script.txt index 9a50369..fb5de15 100644 --- a/Common/Scripts/Libs/Nadeo/ShootMania/Attributes.Script.txt +++ b/Common/Scripts/Libs/Nadeo/ShootMania/Attributes.Script.txt @@ -3,7 +3,7 @@ * * Manage players' attributes */ -#Const Version "2016-12-23" +#Const Version "2017-08-10" #Const ScriptName "Libs/Nadeo/ShootMania/Exp/Attributes.Script.txt" // ---------------------------------- // @@ -237,6 +237,34 @@ Void SetBase(Integer _Attribute, Real _Value) { G_BaseAttributes[_Attribute] = _Value; } +// ---------------------------------- // +/** Update a player specific + * attribute base value + * + * @param _Player The player to update + * @param _Attribute The attribute to update + * @param _Value The new base value + */ +Void SetPlayerBase(CSmPlayer _Player, Integer _Attribute, Real _Value) { + if (_Player == Null) return; + declare LibExpAttributes_Base for _Player = Real[Integer]; + LibExpAttributes_Base[_Attribute] = _Value; +} + +// ---------------------------------- // +/** Update a player specific + * attribute base value + * + * @param _Player The player to update + * @param _Attribute The attribute to update + * @param _Value The new base value + */ +Void ResetPlayerBase(CSmPlayer _Player) { + if (_Player == Null) return; + declare LibExpAttributes_Base for _Player = Real[Integer]; + LibExpAttributes_Base = Real[Integer]; +} + // ---------------------------------- // /** Add a bonus to a player's attribute * This bonus will be added to the base @@ -415,7 +443,16 @@ Void RemoveLock(CSmPlayer _Player, Integer _Attribute, Text _Id) { * @param _Player The player to update */ Void Apply(CSmPlayer _Player) { - foreach (Attribute => Value in G_BaseAttributes) { + if (_Player == Null) return; + + declare LibExpAttributes_Base for _Player = Real[Integer]; + + foreach (Attribute => BaseValue in G_BaseAttributes) { + // Use the player base instead of the default one if it exists + declare Value = BaseValue; + if (LibExpAttributes_Base.existskey(Attribute)) { + Value = LibExpAttributes_Base[Attribute]; + } Private_ApplyAttribute(_Player, Attribute, Value); } } @@ -519,6 +556,8 @@ Void Unload() { LibExpAttributes_DamagePower = C_Base_DamagePower; LibExpAttributes_CaptureSpeed = C_Base_CaptureSpeed; LibExpAttributes_ShieldArmorMax = C_Base_ShieldArmorMax; + + ResetPlayerBase(Player); } } diff --git a/Common/Scripts/Libs/Nadeo/TrackMania/WarmUp4.Script.txt b/Common/Scripts/Libs/Nadeo/TrackMania/WarmUp4.Script.txt index 9b6f336..ff1f7c1 100644 --- a/Common/Scripts/Libs/Nadeo/TrackMania/WarmUp4.Script.txt +++ b/Common/Scripts/Libs/Nadeo/TrackMania/WarmUp4.Script.txt @@ -1,7 +1,7 @@ /** * WarmUp lib */ -#Const Version "2017-04-10" +#Const Version "2017-08-11" #Const ScriptName "WarmUp4.Script.txt" #Include "Libs/Nadeo/TrackMania/Events.Script.txt" as Events @@ -389,7 +389,8 @@ Void Loop() { /// Default events management Void ManageEvents() { foreach (Event in PendingEvents) { - Events::Valid(Event); + declare Processed = Events::Valid(Event); + if (!Processed) continue; // ---------------------------------- // // Waypoint diff --git a/Common/Scripts/ManiaApps/Nadeo/TrackMania/Chase_Client.Script.txt b/Common/Scripts/ManiaApps/Nadeo/TrackMania/Chase_Client.Script.txt index 064b5d7..6b4545f 100644 --- a/Common/Scripts/ManiaApps/Nadeo/TrackMania/Chase_Client.Script.txt +++ b/Common/Scripts/ManiaApps/Nadeo/TrackMania/Chase_Client.Script.txt @@ -1,756 +1,756 @@ -/** - * Chase UI - */ -#Const Version "2017-06-15" -#Const ScriptName "ManiaApps/Nadeo/TrackMania/Chase.Script.txt" - -// ---------------------------------- // -// Constants -// ---------------------------------- // -#Const C_Layer_UI "ChaseUI" -#Const C_Layer_Markers "ChaseMarkers" - -// ---------------------------------- // -// Libraries -// ---------------------------------- // -#Include "ManiaApps/Nadeo/Layers.Script.txt" as Layers - -// ---------------------------------- // -// Functions -// ---------------------------------- // -// ---------------------------------- // -// Private -// ---------------------------------- // -// ---------------------------------- // -/** Get the manialink of the Chase UI - * - * @return Chase UI manialink - */ -Text Private_GetChaseML() { - declare ImgPath = "file://Media/Manialinks/Nadeo/TrackMania/Chase"; - declare PointsMax = 10; - declare SizeX_Point = 4.; - declare SizeX_Gauge = (PointsMax * (SizeX_Point + 1.)) - 1.; - - declare GapLeftML = ""; - declare GapRightML = ""; - for (I, 1, PointsMax) { - GapLeftML ^= """"""; - GapRightML ^= """"""; - } - return """ - - -