Skip to content

Commit

Permalink
chore: more mod names in log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
massclown authored and UE4SS committed Dec 29, 2024
1 parent 0c55285 commit 4440fdf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion assets/Mods/CheatManagerEnablerMod/Scripts/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ RegisterHook("/Script/Engine.PlayerController:ClientRestart", function(self, New
PlayerController.CheatManager = CreatedCheatManager
print("[CheatManager Creator] Enabled CheatManager\n")
else
print("[CheatManager Creator] Was unable to construct CheatManager, therefor, could not enable Cheat Manager\n")
print("[CheatManager Creator] Was unable to construct CheatManager, therefore, could not enable Cheat Manager\n")
end
end)
2 changes: 1 addition & 1 deletion assets/Mods/ConsoleCommandsMod/Scripts/main.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GlobalAr = nil

function Log(Message)
print(Message .. "\n")
print("[ConsoleCommandsMod] " .. Message .. "\n")
if type(GlobalAr) == "userdata" and GlobalAr:type() == "FOutputDevice" then
GlobalAr:Log(Message)
end
Expand Down
10 changes: 5 additions & 5 deletions assets/Mods/LineTraceMod/Scripts/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ local IsInitialized = false
local function Init()
if not GetKismetSystemLibrary():IsValid() then error("KismetSystemLibrary not valid\n") end

print(string.format("KismetSystemLibrary: %s\n", GetKismetSystemLibrary():GetFullName()))
print(string.format("[LineTraceMod] KismetSystemLibrary: %s\n", GetKismetSystemLibrary():GetFullName()))

if not GetKismetMathLibrary():IsValid() then error("KismetMathLibrary not valid\n") end

print(string.format("KismetMathLibrary: %s\n", GetKismetMathLibrary():GetFullName()))
print(string.format("[LineTraceMod] KismetMathLibrary: %s\n", GetKismetMathLibrary():GetFullName()))

IsInitialized = true
end
Expand Down Expand Up @@ -51,7 +51,7 @@ local function GetObjectName()
local ETraceTypeQuery_TraceTypeQuery1 = 0
local ActorsToIgnore = {
}
print("Doing line trace\n")
print("[LineTraceMod] Doing line trace\n")
local HitResult = {}
local WasHit = GetKismetSystemLibrary():LineTraceSingle(
PlayerPawn,
Expand All @@ -70,9 +70,9 @@ local function GetObjectName()

if WasHit then
HitActor = GetActorFromHitResult(HitResult)
print(string.format("HitActor: %s\n", HitActor:GetFullName()))
print(string.format("[LineTraceMod] HitActor: %s\n", HitActor:GetFullName()))
else
return print("Nothing hit.\n")
return print("[LineTraceMod] Nothing hit.\n")
end
end

Expand Down
28 changes: 14 additions & 14 deletions assets/Mods/SplitScreenMod/Scripts/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ local PlayerControllerTable = {}
local function Init()
GetGameMapsSettings().bUseSplitscreen = true
GetGameMapsSettings().bOffsetPlayerGamepadIds = bOffsetGamepad
print(string.format("UseSplitScreen: %s\n", GetGameMapsSettings().bUseSplitscreen))
print(string.format("OffsetPlayerGamepadIds: %s\n", GetGameMapsSettings().bOffsetPlayerGamepadIds))
print(string.format("[SplitScreenMod] UseSplitScreen: %s\n", GetGameMapsSettings().bUseSplitscreen))
print(string.format("[SplitScreenMod] OffsetPlayerGamepadIds: %s\n", GetGameMapsSettings().bOffsetPlayerGamepadIds))

IsInitialized = true
end
Expand All @@ -32,18 +32,18 @@ Init()

local function CreatePlayer()

print("Creating player..\n")
print("[SplitScreenMod] Creating player..\n")
CachePlayerControllers()

print(string.format("GameplayStatics: %s\n", GetGameplayStatics():GetFullName()))
print(string.format("[SplitScreenMod] GameplayStatics: %s\n", GetGameplayStatics():GetFullName()))
ExecuteInGameThread(function()
NewController = GetGameplayStatics():CreatePlayer(PlayerControllerTable[1], #PlayerControllerTable, true)
end)
if NewController:IsValid() then
table.insert(PlayerControllerTable, NewController)
print(string.format("Player %s created.\n", #PlayerControllerTable))
print(string.format("[SplitScreenMod] Player %s created.\n", #PlayerControllerTable))
else
print("Player could not be created.\n")
print("[SplitScreenMod] Player could not be created.\n")
end

end
Expand All @@ -54,14 +54,14 @@ function DestroyPlayer()
CachePlayerControllers()

if #PlayerControllerTable == 1 then
print("Player could not be destroyed, only 1 player exists.\n")
print("[SplitScreenMod] Player could not be destroyed, only 1 player exists.\n")
return
end
print(string.format("GameplayStatics: %s\n", GetGameplayStatics():GetFullName()))
print(string.format("[SplitScreenMod] GameplayStatics: %s\n", GetGameplayStatics():GetFullName()))

local ControllerToRemove = PlayerControllerTable[#PlayerControllerTable]
print(string.format("Removing %s\n", ControllerToRemove:GetFullName()))
if not ControllerToRemove:IsValid() then print("PlayerController to be removed is not valid.\nPlayerController could not be destroyed.\n") return end
print(string.format("[SplitScreenMod] Removing %s\n", ControllerToRemove:GetFullName()))
if not ControllerToRemove:IsValid() then print("[SplitScreenMod] PlayerController to be removed is not valid.\nPlayerController could not be destroyed.\n") return end

ExecuteInGameThread(function()
GetGameplayStatics():RemovePlayer(ControllerToRemove, true)
Expand All @@ -73,13 +73,13 @@ function TeleportPlayers()
CachePlayerControllers()

if #PlayerControllerTable == 1 then
print("Players could not be teleported, only 1 player exists.\n")
print("[SplitScreenMod] Players could not be teleported, only 1 player exists.\n")
return
end

local DidTeleport = false

print(string.format("Attempting to Teleport to Player 1..\n"))
print(string.format("[SplitScreenMod] Attempting to Teleport to Player 1..\n"))

ExecuteInGameThread(function()
PlayerPawn = PlayerControllerTable[1].Pawn
Expand All @@ -95,9 +95,9 @@ function TeleportPlayers()
end)

if DidTeleport then
print("Players teleport to Player 1.\n")
print("[SplitScreenMod] Players teleport to Player 1.\n")
else
print("No players could be teleported\n")
print("[SplitScreenMod] No players could be teleported\n")
end
end

Expand Down

0 comments on commit 4440fdf

Please sign in to comment.