Skip to content

Conversation

@Jacob-Mango
Copy link
Collaborator

No description provided.

Copy link
Owner

@Arkensor Arkensor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the current intention of this I suggest the module name DebugUI instead of Debugger to avoid any confusion on what this is for and how it can be used.

The fully qualified name would be CF.DebugUI / CF_DebugUI

Also, where is the logic that opens the GUI and maintains data updates?

{
if (m_Entries[i].Key == "") m_Entries[i].Key = " ";
if (m_Entries[i].Value == "") m_Entries[i].Value = " ";
GetTemplateController().EntryKeys = GetTemplateController().EntryKeys + m_Entries[i].Key + "\n";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetTemplateController().EntryKeys is fetched twice, but wasn't it overridden in line 93? So shouldn't it just be "" or delete completly?

{
return "JM/CF/Debugger/layouts/Debugger_Block.layout";
}
}; No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add one empty line at the end of each text file for git. e.g.

class Name
{
};

Retrieves the Debugger block if it exists based on the name and if specified, the target.
Creates a new block if no existing block was found.
*/
Class Get(string name, Object target = null)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is class returned and not a block type?

/*
Get all blocks by name, if no name specified, get all blocks
*/
array<Class> GetAll(string name = "")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, why an array of classes and not an array of blocks

{
m_Blocks = new array<ref CF_Debugger_Block>();

m_IsEnabled = FileExist("$profile:CF_Debugger.txt");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it need this file? There should be a way to enable and disable this purely via script and or startup parameter?

e.g. DayZ.exe -CF_DebugUI

hexactsize 0
vexactsize 0
scriptclass "ViewBinding"
text "deserunt mollit anim id est laborum.\""\
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this sample text for the release and just replace it with a short "PLACEHOLDER"?

CF_Permission_ManagerBase._Init( Permission );
#endif

Debugger = new CF_Debugger();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this on world init and not game init? Is it because of UI components?


class CF_Debugger
{
private autoptr array<ref CF_Debugger_Block> m_Blocks;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use protected. I see no reason why someone could not inherit their own variant and replace their local CF.Debugger instance at runtime with their own type.

@@ -0,0 +1,5 @@
class CF_Debugger_Block_Controller: Controller
{
string EntryKeys;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keys = plural? How are multiple keys stored here?

*/
static void _Cleanup()
{
delete Debugger;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No cleanup required? To safely close UI and delete all data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants