Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.20 Release Merge #325

Merged
merged 123 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
9c81f15
Merge pull request #1 from Panakotta00/master
derFreemaker Jan 30, 2024
65873fe
sync
derFreemaker Jan 31, 2024
42bdd3f
Various attempts at bug fixes.
Feb 13, 2024
e96dd4e
Merge pull request #307 from RozeDoyanawa/development
RozeDoyanawa Feb 13, 2024
90bad05
Added support for FByteProperty in reflection parsing to fix compatib…
Feb 19, 2024
1a7adc5
Various Micro Control fixes
Feb 19, 2024
d32966d
Merge pull request #308 from RozeDoyanawa/development
RozeDoyanawa Feb 19, 2024
d17713b
Added missing includes, according to IntelliJ
Feb 19, 2024
005454d
Further MP fixes to micro controls
Feb 19, 2024
b839498
Merge pull request #309 from RozeDoyanawa/development
RozeDoyanawa Feb 19, 2024
e0e01f4
fix: Try fixing GitHub-Actions
Panakotta00 Mar 7, 2024
787c740
Minor textual improvements
Apr 10, 2024
d59c191
Added a little clarification to the loadFile() description
Apr 10, 2024
e01f9ef
Documentation updated for the findClass() -> classes table change
Apr 10, 2024
6a9362d
Changed examples to use dot-form instead of array-form for classes st…
Apr 16, 2024
8f826c4
Typo fix in docs
Apr 16, 2024
55974c1
Merge pull request #311 from rostriano/master
Panakotta00 Apr 16, 2024
1037331
Updated FINGenLuaDocSumneko
derFreemaker May 29, 2024
4e13f1a
reversed FINGenLuaDoc
derFreemaker May 29, 2024
a6d084a
reversing some shit fuck up by formatting
derFreemaker May 29, 2024
38cc616
same thing
derFreemaker May 29, 2024
8c3e932
same thing
derFreemaker May 29, 2024
b9c8cfc
Merge pull request #2 from derFreemaker/master
derFreemaker May 29, 2024
cbbb1f1
rearanged some things
derFreemaker May 29, 2024
9c08c6a
added documentation but literal strings are too long to compile
derFreemaker Jun 2, 2024
9498410
complete FINGenLuaDocSumneko Command (not the best code)
derFreemaker Jun 2, 2024
1146b90
should fix the whitespace issue
derFreemaker Jun 2, 2024
86542b8
fix newline between class description and `---@class`
derFreemaker Jun 2, 2024
581d9a0
made exception more verbose
derFreemaker Jun 3, 2024
db169a4
corrected structs and fixed space issue between structs and classes
derFreemaker Jun 13, 2024
fcbeee7
added computer.media to hand writen documentation
derFreemaker Jun 13, 2024
d81f002
updated way global structs and classes is constructed and added struct
derFreemaker Jun 14, 2024
5dbdb89
fixed classes and structs not being global (because my stupid ass has
derFreemaker Jun 14, 2024
29d8573
should fixed struct construction
derFreemaker Jun 14, 2024
3194fdb
changed type naming to avoid stupid autocomplete using
derFreemaker Jun 15, 2024
5a13224
Merge pull request #3 from derFreemaker/SumnekoDocumentation
derFreemaker Jun 15, 2024
ce430c5
fixed [AFGRailroadTimeTable]:setStops(),
derFreemaker Jun 15, 2024
73913b1
not in development from Panakotta
derFreemaker Jun 15, 2024
e18a94e
Fix for newTimeTable crashing the game
Jun 15, 2024
e172823
Merge pull request #317 from RozeDoyanawa/development
RozeDoyanawa Jun 15, 2024
900ec7f
Mention that train timetable stop indices are zero-based
tom-cook-veea Jun 26, 2024
49f3e8b
Fix spelling of "Vehicle" in reflection.
tom-cook-veea Jun 26, 2024
5204f1f
Merge pull request #319 from tomkcook/fix-spelling-of-vehicle
Panakotta00 Jun 26, 2024
621f783
Merge pull request #318 from tomkcook/tt-zero-based-indices
Panakotta00 Jun 26, 2024
2965690
Merge pull request #316 from derFreemaker/ReflectionFix
Panakotta00 Jun 26, 2024
a36ffd4
Added sign Emission. Issue #283
Jun 27, 2024
e52fb0e
Fix Roze accidental undo. ,0 should remain.
Jun 27, 2024
e2d98b2
Spelling fix
Jun 28, 2024
c04084d
Merge pull request #320 from RozeDoyanawa/development
Panakotta00 Jun 29, 2024
23f7d41
Merge branch 'refs/heads/master' into development
Panakotta00 Jun 29, 2024
ddc13dc
Try add discord notification to GitHub Action
Panakotta00 Jun 29, 2024
d272d06
Update GitHub Action
Panakotta00 Jun 29, 2024
687ef9c
Add Icont and name to Discord WebHook of GitHub Action
Panakotta00 Jun 29, 2024
9c2b2ec
fix: Nick change by code
Panakotta00 Jun 29, 2024
e77d251
Try fix GitHub action discord webhook artifact
Panakotta00 Jun 29, 2024
8c0368a
docs: Describe classes and structs library
Panakotta00 Jul 4, 2024
09e6dae
docs: Some Getting Started stuff
Panakotta00 Jul 4, 2024
2e4238b
docs: Pitfalls using properties that return structs
Panakotta00 Jul 4, 2024
a8ddd1a
Update docs.yml
Panakotta00 Jul 4, 2024
0bb8d76
docs: Update Mod Integration page
Panakotta00 Jul 4, 2024
1953d23
Update build.yml
Panakotta00 Jul 4, 2024
f613cf2
feat: Add some verbose Logging & Re-Arrange FINLua files
Panakotta00 Jul 6, 2024
d1044a0
feat: Quick Refactor Lua Persistence System & Add Extra Space struct …
Panakotta00 Jul 6, 2024
009108e
feat: Add FileStream collector to Lua Extra Space
Panakotta00 Jul 6, 2024
529380d
feat: Add Lua Module System & Convert APIs to it
Panakotta00 Jul 7, 2024
972d875
feat: Add Mutex to Kernel Reference Collection
Panakotta00 Jul 7, 2024
319e59f
feat: Add Lua Module Function Signatures & Parameters & Return Values
Panakotta00 Jul 7, 2024
da9a9cd
docs: Add In-Code documentation for Lua Component API
Panakotta00 Jul 7, 2024
46fae9d
feat: Convert Lua Module Documentation to new "Comment" based
Panakotta00 Jul 7, 2024
58f5857
feat: Add Lua API Documentation for FileSystem, Computer & Event API
Panakotta00 Jul 7, 2024
4e77228
fix: #321 Updates Reflection AssetRegistry Traversal
Panakotta00 Jul 7, 2024
e882a52
feat: Add some image ressources for mod page
Panakotta00 Jul 8, 2024
4792fee
feat: Add LogFicsItNetworksNet
Panakotta00 Jul 8, 2024
2c05b33
fix: Fix failed cooking
Panakotta00 Jul 8, 2024
4e7ad98
feat: Add Automated Reflection Documentation Generation
Panakotta00 Jul 22, 2024
5bfa180
fix: Invalid build.yml
Panakotta00 Jul 22, 2024
2b111a2
feat: Do Build Cleanup after Build
Panakotta00 Jul 22, 2024
3de83a0
fix: Try to fix workflow
Panakotta00 Jul 23, 2024
2e97c32
fix: Try fix workflow & keep files on failure for manual investigation
Panakotta00 Jul 23, 2024
e534114
feat: Lua Module GlobalBareValues & Module Dependency System
Panakotta00 Jul 23, 2024
770f0e1
feat: Migrate Lua Reflection Implementation to Lua Module System
Panakotta00 Jul 23, 2024
42e6c54
fix: add missing includes to LuaGlobalLib.cpp
Panakotta00 Jul 23, 2024
fa52b59
feat: Migrate Lua Future to Module System & simple refactoring
Panakotta00 Jul 23, 2024
0df7c58
fix: Remove Unnecessary code from Worflow and disable Documentation G…
Panakotta00 Jul 23, 2024
cd7dfe2
feat: Refactor GenLuaDoc CMD
Panakotta00 Jul 23, 2024
c8d0743
feat: Add Lua Modules to Lua Doc Gen
Panakotta00 Jul 24, 2024
399ca5c
feat: Corrections for GenLuaDoc & Operator support
Panakotta00 Jul 24, 2024
5ec8348
doc: Update Component API docs
Panakotta00 Jul 24, 2024
ffb4eef
docs: GenLuaDoc now adds specific Future types for Non-Parallel refle…
Panakotta00 Jul 24, 2024
c7aa0c0
feat: `id` & `nick` now reflection properties that may throw an excep…
Panakotta00 Jul 24, 2024
f03b920
docs: GenLuaDoc generate functions & fields for StructLib & ClassLib
Panakotta00 Jul 24, 2024
4c574c3
fix: Fix github action artifact upload link
Panakotta00 Jul 24, 2024
dcb8eec
feat: Relocate Doc Gen CMDs & Rename FINGenReflectionDoc to FINGenJso…
Panakotta00 Jul 24, 2024
04cad6c
feat: Add quickRef and other attributes to the ReflectionFunction Lua…
Panakotta00 Jul 25, 2024
f107f3b
fix: Add Lua Function Return Values to FINGenJsonDoc
Panakotta00 Jul 25, 2024
662c386
feat: Make Display Name optional if not given in Gen JSON Doc
Panakotta00 Jul 26, 2024
7c534f4
fix: Force UTF-8 file output for Doc Gen CMDs
Panakotta00 Jul 26, 2024
97e4b72
feat: New Rust based ASCII Doc generator
Panakotta00 Jul 26, 2024
7cfaedd
feat: Add Static Prop to Reflection & Add static funcs/props to Lua i…
Panakotta00 Jul 26, 2024
43ddaf4
feat: Some styling changes for ASCIIDOC Gen
Panakotta00 Jul 26, 2024
a17bd5e
feat: Lua Module Docs now handling whitespace a bit better
Panakotta00 Jul 26, 2024
b63a2a6
docs: Some Doc changes to Lua-FileSystem-API
Panakotta00 Jul 26, 2024
86f141c
fix: Add missing collapsible to signal asciidoc
Panakotta00 Jul 26, 2024
2c4f203
feat: Add tags to ASCIIDOC Gen
Panakotta00 Jul 27, 2024
d93a375
feat: Remove old ASCIIDOC Gen
Panakotta00 Jul 27, 2024
dd0b6cb
docs: Some Lua API Doc Changes
Panakotta00 Jul 27, 2024
9f1a9d6
Merge remote-tracking branch 'origin/development' into development
Aug 4, 2024
cbe97e2
Micro typo
Toshayo Aug 5, 2024
a33fa5f
Merge branch 'development' into patch-1
Panakotta00 Aug 5, 2024
088457b
Merge pull request #322 from Toshayo/patch-1
Panakotta00 Aug 5, 2024
f91009f
Fix for invalid/missing CodeableSplitter signal parameters
Aug 16, 2024
648eb06
Merge pull request #323 from RozeDoyanawa/development
RozeDoyanawa Aug 22, 2024
2dee8cb
feat: Change to computer.skip to yield lua runtime instead
Panakotta00 Jul 30, 2024
7983fca
fix: Add Missing Repo Explorer Style
Panakotta00 Sep 1, 2024
da2d528
feat: Repository Integration
Panakotta00 Sep 1, 2024
4fd7174
feat: Add FS & EEPROM Labels
Panakotta00 Sep 1, 2024
765dd45
fix: Fix Lua Operator Overloading
Panakotta00 Sep 1, 2024
024c6c8
docs: Update Vector multiplication docs
Panakotta00 Sep 1, 2024
91318b9
feat: Codable Splitter `getConnectorByIndex`
Panakotta00 Sep 1, 2024
c2c5892
fix: Add FINRepo Module to .uplugin
Panakotta00 Sep 1, 2024
adc9f4d
fix: Fixes Lua Operator Overloading
Panakotta00 Sep 2, 2024
b5e87eb
docs: Update Documentation
Panakotta00 Sep 3, 2024
f2419cc
chore: Version Bump to 0.3.20
Panakotta00 Sep 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 133 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Build

on:
push:
Expand Down Expand Up @@ -26,15 +26,17 @@ on:
WWISE_PASSWORD:
required: true
GH_TOKEN:
required: false
required: true
WEBHOOK_URL:
required: true

jobs:
build:
name: Build FicsIt-Networks
runs-on: Windows2019-selfhosted
steps:
- name: Cleanup
- name: Pre Cleanup
run: Remove-Item C:\actions-runner\_work\FicsIt-Networks\FicsIt-Networks\* -Recurse -Force -Confirm:$false -ErrorAction Ignore

- uses: actions/checkout@v4
with:
repository: satisfactorymodding/SatisfactoryModLoader
Expand All @@ -46,13 +48,6 @@ jobs:
path: SatisfactoryModLoader/Mods/FicsItNetworks
submodules: recursive

# - name: List Stuff
# run: |
# dir SatisfactoryModLoader/Mods/FicsItNetworks
# dir SatisfactoryModLoader/Mods/FicsItNetworks/ThirdParty
# dir SatisfactoryModLoader/Mods/FicsItNetworks/ThirdParty/eris
# dir SatisfactoryModLoader/Mods/FicsItNetworks/ThirdParty/eris/src

- name: Apply FG Patches
working-directory: SatisfactoryModLoader
run: git apply .\Mods\FicsItNetworks\SML_Patch.patch -v
Expand Down Expand Up @@ -97,19 +92,137 @@ jobs:

# - name: Build for Linux Dedicated Server
# run: MSBuild.exe '${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.sln' /p:Configuration='Shipping Server' /p:Platform='Linux' /t:'Games\FactoryGame' -m

- name: Package FicsItNetworks Mod
run: ${{ github.workspace }}\ue\Engine\Build\BatchFiles\RunUAT.bat -ScriptsForProject='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject' PackagePlugin -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject' -clientconfig=Shipping -serverconfig=Shipping -DLCName='FicsItNetworks' -build -utf8output -platform=Win64 -nocompileeditor -installed -abslog="C:\Users\runneradmin\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+a+FicsIt-Networks+FicsIt-Networks+ue\Log.txt"

# - name: Show Package Log
# if: always()
# run: more "C:\Users\runneradmin\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+a+FicsIt-Networks+FicsIt-Networks+ue\Cook-*"

# - name: List Artifacts
# run: |
# dir ${{ github.workspace }}\SatisfactoryModLoader\Saved\ArchivedPlugins\FicsItNetworks\
# - name: Generate Reflection & Lua Documentation
# run: ${{ github.workspace }}\ue\\Engine\Binaries\Win64\UnrealEditor-Cmd.exe "${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject" -skipcompile -Unattended -NoPause -AllowSoftwareRendering "-ExecCmds=FINGenRefDoc,FINGenLuaDoc,quit_editor"

- uses: actions/upload-artifact@v4
- name: Upload FicsItNetworks-Windows.zip
id: upload-win64
uses: actions/upload-artifact@v4
with:
name: FicsItNetworks-Windows
path: ${{github.workspace}}\SatisfactoryModLoader\Saved\ArchivedPlugins\FicsItNetworks\FicsItNetworks-Windows.zip

# - name: Upload Documentation
# id: upload-documentation
# uses: actions/upload-artifact@v4
# with:
# name: Documentation
# path: |
# %LocalAppData%\FactoryGame\Saved\FINReflectionDocumentation.json
# %LocalAppData%\FactoryGame\Saved\FINLuaDocumentation.lua

- name: Create Discord Webhook Action
uses: devops-actions/[email protected]
if: success()
with:
filename: "discord-webhook.json"
json: >
{
"username": "GitHub",
"avatar_url": "https://cdn.discordapp.com/avatars/735904925900472323/df91181b3f1cf0ef1592fbe18e0962d7.webp?size=128",
"embeds": [{
"title": "${{ github.ref_name }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"description": "Build Successful!",
"color": 65280,
"fields": [{
"value": "[FicsIt-Networks.zip](${{ steps.upload-win64.outputs.artifact-url }})",
"name": "",
"inline": true
}]
}]
}
- name: Create Discord Webhook Action
uses: devops-actions/[email protected]
if: cancelled()
with:
filename: "discord-webhook.json"
json: >
{
"username": "GitHub",
"avatar_url": "https://cdn.discordapp.com/avatars/735904925900472323/df91181b3f1cf0ef1592fbe18e0962d7.webp?size=128",
"embeds": [{
"title": "${{ github.ref_name }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"description": "Build Cancelled!",
"color": 13158580
}]
}
- name: Create Discord Webhook Action
uses: devops-actions/[email protected]
if: failure()
with:
filename: "discord-webhook.json"
json: >
{
"username": "GitHub",
"avatar_url": "https://cdn.discordapp.com/avatars/735904925900472323/df91181b3f1cf0ef1592fbe18e0962d7.webp?size=128",
"embeds": [{
"title": "${{ github.ref_name }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"description": "Build Failed",
"color": 16711680
}]
}
- name: Create Discord Webhook Action
uses: devops-actions/[email protected]
if: ${{ !success() && !failure() && !cancelled() }}
with:
filename: "discord-webhook.json"
json: >
{
"username": "GitHub",
"avatar_url": "https://cdn.discordapp.com/avatars/735904925900472323/df91181b3f1cf0ef1592fbe18e0962d7.webp?size=128",
"embeds": [{
"title": "${{ github.ref_name }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"description": "Build Done!",
"color": 6579300
}]
}

- name: Discord Webhook Action
uses: tsickert/[email protected]
if: always()
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
raw-data: discord-webhook.json
# embed-title: ${{ github.ref_name }}
# embed-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
# embed-description: Build ${{ success() && 'Successful' || cancelled() && 'Cancelled' || failure() && 'Failed' || 'Done' }}!
# embed-color: ${{ success() && '65280' || cancelled() && '13158580' || failure() && '16711680' || '6579300' }}
- name: Post Cleanup
if: ${{ !failure() }}
run: Remove-Item C:\actions-runner\_work\FicsIt-Networks\FicsIt-Networks\* -Recurse -Force -Confirm:$false -ErrorAction Ignore

# documentation:
# needs: build
# if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
# name: Update Documentation
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - uses: actions/checkout@v4
# - name: Download Reflection Documentation
# uses: actions/download-artifact@v4
# with:
# name: Documentation
# path: ./docs
# - name: Rewrite ASCIIDOC with new Documentation
# run: python ./docs/PatchDocWithReflectionDoc.py FINReflectionDocumentation.json
# - name: Configure Git
# run: |
# git config user.name "$GITHUB_ACTOR"
# git config user.email "[email protected]"
# - name: Commit
# run: |
# git add index.zip
# git commit -m "Update Reflection Documentation"
# - name: Push
# run: |
# git push
5 changes: 2 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Push

on:
push:
if:
branches: main
branches: master
paths:
- 'docs/**'

Expand All @@ -17,4 +16,4 @@ jobs:
with:
token: ${{ secrets.DOCS_REPO_ACCESS_TOKEN }}
repository: satisfactorymodding/Documentation
event-type: mod-docs-update
event-type: mod-docs-update
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Content/Components/ModularPanel/MM_PureParametricMat.uasset
Binary file not shown.
Binary file not shown.
Binary file modified Content/Components/ModularPanel/Modules/Module_RCO.uasset
Binary file not shown.
Binary file added Content/Computer/Modules/CPU/BPW_FIN_Repo.uasset
Binary file not shown.
Binary file not shown.
Binary file modified Content/Computer/Modules/CPU/CPU_Lua_Widget.uasset
Binary file not shown.
Binary file modified Content/Computer/UI/Widget_ComputerInteract.uasset
Binary file not shown.
Binary file modified Content/FINConfiguration.uasset
Binary file not shown.
Binary file modified Content/Material/MM_RozeEmissiveButton.uasset
Binary file not shown.
Binary file added Content/UI/Repository/Explorer.uasset
Binary file not shown.
Binary file not shown.
Binary file added Content/UI/Widget_FIN_EditLabel.uasset
Binary file not shown.
12 changes: 11 additions & 1 deletion FicsItNetworks.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"FileVersion": 3,
"Version": 0,
"VersionName": "0.3",
"SemVersion": "0.3.19",
"SemVersion": "0.3.20",
"FriendlyName": "FicsIt-Networks",
"Description": "Adds a computer network and programmable computers to the Game.",
"Category": "Modding",
Expand Down Expand Up @@ -31,10 +31,20 @@
"Type": "Runtime",
"LoadingPhase": "PostDefault"
},
{
"Name": "FicsItNetworksDocumentation",
"Type": "Runtime",
"LoadingPhase": "Default"
},
{
"Name": "Tracy",
"Type": "Runtime",
"LoadingPhase": "PostDefault"
},
{
"Name": "FicsItNetworksRepository",
"Type": "Runtime",
"LoadingPhase": "PostDefault"
}
],
"Plugins": [
Expand Down
Binary file added Resources/FicsItLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Ficsit_Logo_White.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/InGameBanner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions Source/FicsItNetworks/Private/Components/FINCodeableSplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,19 @@ bool AFINCodeableSplitter::netFunc_canOutput(int output) {
return outputQueue.Num() < 2;
}

void AFINCodeableSplitter::netSig_ItemRequest_Implementation(const FInventoryItem& item) {}
void AFINCodeableSplitter::netSig_ItemOutputted_Implementation(int output, const FInventoryItem& item) {}
UFGFactoryConnectionComponent* AFINCodeableSplitter::netFunc_getConnectorByIndex(int outputIndex) {
switch (FMath::Abs(outputIndex) % 3) {
case 0:
return Output2;
case 1:
return Output1;
default:
return Output3;
}
}

void AFINCodeableSplitter::netSig_ItemRequest_Implementation(FInventoryItem item) {}
void AFINCodeableSplitter::netSig_ItemOutputted_Implementation(int output, FInventoryItem item) {}

TArray<FInventoryItem>& AFINCodeableSplitter::GetOutput(int output) {
output = (output < 0) ? 0 : ((output > 2) ? 2 : output);
Expand Down
10 changes: 9 additions & 1 deletion Source/FicsItNetworks/Private/Computer/FINComputerDriveDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "Components/GridSlot.h"
#include "Components/TextBlock.h"
#include "Net/UnrealNetwork.h"
#include "Utils/FINLabelContainerInterface.h"

UFINComputerDriveDesc::UFINComputerDriveDesc() {
mStackSize = EStackSize::SS_ONE;
Expand All @@ -16,7 +17,14 @@ void UFINComputerDriveDesc::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>
}

FText UFINComputerDriveDesc::GetOverridenItemName_Implementation(APlayerController* OwningPlayer, const FInventoryStack& InventoryStack) {
return UFGItemDescriptor::GetItemName(InventoryStack.Item.GetItemClass());
FText Name = UFGItemDescriptor::GetItemName(InventoryStack.Item.GetItemClass());
if (InventoryStack.Item.ItemState.IsValid() && InventoryStack.Item.ItemState.Get()->Implements<UFINLabelContainerInterface>()) {
FString Label = IFINLabelContainerInterface::Execute_GetLabel(InventoryStack.Item.ItemState.Get());
if (!Label.IsEmpty()) {
return FText::FromString(FString::Printf(TEXT("%s - \"%s\""), *Name.ToString(), *Label));
}
}
return Name;
}

FText UFINComputerDriveDesc::GetOverridenItemDescription_Implementation(APlayerController* OwningPlayer, const FInventoryStack& InventoryStack) {
Expand Down
11 changes: 11 additions & 0 deletions Source/FicsItNetworks/Private/Computer/FINComputerEEPROMDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ bool UFINComputerEEPROMDesc::CopyData_Implementation(UObject* WorldContext, cons
return From->CopyDataTo(To);
}

FText UFINComputerEEPROMDesc::GetOverridenItemName_Implementation(APlayerController* OwningPlayer, const FInventoryStack& InventoryStack) {
FText Name = UFGItemDescriptor::GetItemName(InventoryStack.Item.GetItemClass());
if (InventoryStack.Item.ItemState.IsValid() && InventoryStack.Item.ItemState.Get()->Implements<UFINLabelContainerInterface>()) {
FString Label = IFINLabelContainerInterface::Execute_GetLabel(InventoryStack.Item.ItemState.Get());
if (!Label.IsEmpty()) {
return FText::FromString(FString::Printf(TEXT("%s - \"%s\""), *Name.ToString(), *Label));
}
}
return Name;
}

AFINStateEEPROM* UFINComputerEEPROMDesc::GetEEPROM(UFGInventoryComponent* Inv, int SlotIdx) {
FInventoryStack stack;
if (!IsValid(Inv) || !Inv->GetStackFromIndex(SlotIdx, stack) || !IsValid(stack.Item.GetItemClass())) return nullptr;
Expand Down
6 changes: 6 additions & 0 deletions Source/FicsItNetworks/Private/Computer/FINComputerRCO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,9 @@ void UFINComputerRCO::LogRehandleAllEntries_Implementation(UFINLog* Log) {
void UFINComputerRCO::GPUT2MouseWheelEvent_Implementation(AFINComputerGPUT2* GPU, FVector2D Position, float Delta, int Modifiers) {
GPU->netSig_OnMouseWheel(Position, Delta, Modifiers);
}

void UFINComputerRCO::SetLabel_Implementation(UObject* Container, const FString& Label) {
if (IsValid(Container) && Container->Implements<UFINLabelContainerInterface>()) {
IFINLabelContainerInterface::Execute_SetLabel(Container, Label);
}
}
14 changes: 10 additions & 4 deletions Source/FicsItNetworks/Private/FINGlobalRegisterHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
FFINGlobalRegisterHelper FFINGlobalRegisterHelper::Instance;

void FFINGlobalRegisterHelper::Register() {
for (const RegisterFunction& Func : Get().FunctionsToCall) {
Func();
TArray<int> priorities;
Get().FunctionsToCall.GetKeys(priorities);
priorities.Sort();
Algo::Reverse(priorities);
for (int priority : priorities) {
for (const RegisterFunction& Func : Get().FunctionsToCall[priority]) {
Func();
}
}
Get().FunctionsToCall.Empty();
}

void FFINGlobalRegisterHelper::AddFunction(const RegisterFunction& Func) {
Get().FunctionsToCall.Add(Func);
void FFINGlobalRegisterHelper::AddFunction(const RegisterFunction& Func, int Priority) {
Get().FunctionsToCall.FindOrAdd(Priority).Add(Func);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ AFINFileSystemState::~AFINFileSystemState() {}
void AFINFileSystemState::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const {
Super::GetLifetimeReplicatedProps(OutLifetimeProps);

DOREPLIFETIME(AFINFileSystemState, ID);
DOREPLIFETIME(AFINFileSystemState, IdCreated);
DOREPLIFETIME(AFINFileSystemState, Usage);
DOREPLIFETIME(AFINFileSystemState, Label);
DOREPLIFETIME(AFINFileSystemState, Capacity);
}

int AskForDiskOrSave(FString Name) {
Expand Down Expand Up @@ -256,6 +260,14 @@ bool AFINFileSystemState::ShouldSave_Implementation() const {
return true;
}

FString AFINFileSystemState::GetLabel_Implementation() {
return Label;
}

void AFINFileSystemState::SetLabel_Implementation(const FString& InLabel) {
Label = InLabel;
}

CodersFileSystem::SRef<CodersFileSystem::Device> AFINFileSystemState::GetDevice(bool bInForceUpdate, bool bInForceCreate) {
if (!HasAuthority()) return nullptr;

Expand Down
2 changes: 2 additions & 0 deletions Source/FicsItNetworks/Private/FicsItKernel/FicsItKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,11 @@ int64 UFINKernelSystem::GetTimeSinceStart() const {
}

void UFINKernelSystem::AddReferencer(void* Referencer, const TFunction<void(void*, FReferenceCollector&)>& CollectorFunc) {
UE::TScopeLock Lock(ReferenceObjectMutex);
ReferencedObjects.FindOrAdd(Referencer) = CollectorFunc;
}

void UFINKernelSystem::RemoveReferencer(void* Referencer) {
UE::TScopeLock Lock(ReferenceObjectMutex);
ReferencedObjects.Remove(Referencer);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "FicsItKernel/Processor/FINStateEEPROM.h"

#include "Net/UnrealNetwork.h"

AFINStateEEPROM::AFINStateEEPROM() {
RootComponent = CreateDefaultSubobject<USceneComponent>(L"RootComponent");

Expand All @@ -10,6 +12,12 @@ AFINStateEEPROM::AFINStateEEPROM() {
SetActorTickEnabled(true);
}

void AFINStateEEPROM::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const {
Super::GetLifetimeReplicatedProps(OutLifetimeProps);

DOREPLIFETIME(AFINStateEEPROM, Label);
}

void AFINStateEEPROM::Tick(float DeltaSeconds) {
Super::Tick(DeltaSeconds);

Expand Down
Loading
Loading