Skip to content

Commit

Permalink
[release] v1.0 Public Release
Browse files Browse the repository at this point in the history
- ReloadOptions now fully supports ServerPerks + Vanilla
  • Loading branch information
Vel-San committed Apr 17, 2021
1 parent 1059d93 commit 3f2d166
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 150 deletions.
13 changes: 7 additions & 6 deletions ReloadOptionsSP/Classes/ReloadOptionsSP.uc
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ function Mutate(string MutateString, PlayerController Sender) {

/* Add the interaction. */
simulated function Tick(float DeltaTime) {
local PlayerController localController;
local PlayerController PC;
local RldOptInteraction NewInteraction;

localController= Level.GetLocalPlayerController();
if (localController != none)
{
localController.Player.InteractionMaster.AddInteraction("ReloadOptionsSP.RldOptInteraction", localController.Player);
PC = Level.GetLocalPlayerController();
if (PC != None && !PC.PlayerReplicationInfo.bIsSpectator) {
NewInteraction = RldOptInteraction(PC.Player.InteractionMaster.AddInteraction("ReloadOptionsSP.RldOptInteraction", PC.Player));
NewInteraction.RegisterMutator(Self);
Disable('Tick');
}
Disable('Tick');
}

defaultproperties
Expand Down
10 changes: 3 additions & 7 deletions ReloadOptionsSP/Classes/RldOptInteraction.uc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ var GUI.GUITabItem ReloadOpt_Tab;
var config bool bAllowInterrupt, bDisableAuto, bNoAmmoMsg, bInterruptMsg, bNeedReloadMsg;
var config array<string> InterruptAliases;
var float timeReloaded, timeReceivedMessage;
var string ReloadOptClass_SP;

///////////////////////////
// INTERACTION //
Expand All @@ -32,7 +31,7 @@ function RegisterMutator(ReloadOptionsSP aMut) {

function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta) {
local string Alias, Alias_SP, LeftPart, RigthPart;
local MidGamePanel panel;
local RldOptMidGameOptions panel;
local UT2K4PlayerLoginMenu escMenu;
local int i;

Expand Down Expand Up @@ -72,12 +71,10 @@ function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta) {
}
escMenu= UT2K4PlayerLoginMenu(KFGUIController(ViewportOwner.GUIController).ActivePage);
if (escMenu != none && escMenu.c_Main.TabIndex(ReloadOpt_Tab.caption) == -1) {
if (escMenu.IsA('SRInvasionLoginMenu')) {
ReloadOpt_Tab.ClassName = ReloadOptClass_SP;
}
panel= MidGamePanel(escMenu.c_Main.AddTabItem(ReloadOpt_Tab));
panel = RldOptMidGameOptions(escMenu.c_Main.AddTabItem(ReloadOpt_Tab));
if (panel != none) {
panel.ModifiedChatRestriction= escMenu.UpdateChatRestriction;
panel.MyInteraction = self;
}
}
}
Expand Down Expand Up @@ -263,7 +260,6 @@ function InterruptReload(optional bool bFireAlias, optional bool bAltFireAlias)

defaultproperties
{
ReloadOptClass_SP="ReloadOptionsSP.RldOptMidGameOptions_SP"
ReloadOpt_Tab=(ClassName="ReloadOptionsSP.RldOptMidGameOptions",Caption="Reload Options",Hint="Options to customize reload.")
InterruptAliases(0)="Fire"
InterruptAliases(1)="AltFire"
Expand Down
4 changes: 2 additions & 2 deletions ReloadOptionsSP/Classes/RldOptMidGameOptions.uc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RldOptMidGameOptions extends MidGamePanel DependsOn(ReloadOptionsSP);
class RldOptMidGameOptions extends MidGamePanel;

var RldOptInteraction MyInteraction;
var automated GUISectionBackground i_BGCenter;
Expand Down Expand Up @@ -70,7 +70,7 @@ defaultproperties
Begin Object Class=GUISectionBackground Name=BGCenter
// bFillClient=True
Caption="Reload Options"
WinTop=0.05
WinTop=0.03
WinLeft=0.25
WinWidth=0.5
WinHeight=0.5
Expand Down
135 changes: 0 additions & 135 deletions ReloadOptionsSP/Classes/RldOptMidGameOptions_SP.uc

This file was deleted.

0 comments on commit 3f2d166

Please sign in to comment.