Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Panakotta00 committed Feb 13, 2021
2 parents d099d3f + d5673c9 commit 8df216f
Show file tree
Hide file tree
Showing 279 changed files with 10,402 additions and 7,786 deletions.
5 changes: 5 additions & 0 deletions Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,9 @@ r.XGEShaderCompile.Mode = 1
+PropertyRedirects=(OldName="/Script/FicsItNetworks.FINNetworkConnector:Nick",NewName="/Script/FicsItNetworks.FINAdvancedNetworkConnectionComponent:Nick")
+PropertyRedirects=(OldName="FINCodeableSplitter.InputConnector",NewName="FINCodeableSplitter.Input1")

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/FicsItNetworks/Maps/ReflectionTest.ReflectionTest

[/Script/Engine.PhysicsSettings]
DefaultGravityZ=-980.000000
DefaultTerminalVelocity=4000.000000
Expand Down Expand Up @@ -686,4 +689,6 @@ InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/FicsItNetworks/Maps/ReflectionTest.ReflectionTest

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/FicsItNetworks/Computer/Modules/CPU/CPU_Lua.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Content/FicsItNetworks/Maps/ReflectionTest.umap
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 not shown.
Binary file modified Content/FicsItNetworks/Network/Utils/ComponentListEntry.uasset
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 added Content/FicsItNetworks/UI/OPENSANS-BOLD.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Content/FicsItNetworks/UI/OPENSANS-ITALIC.uasset
Binary file not shown.
Binary file added Content/FicsItNetworks/UI/OPENSANS-LIGHT.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Content/FicsItNetworks/UI/OpenSans.uasset
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/Splash/EdSplash.bmp
Binary file not shown.
Binary file removed Content/Splash/EdSplash.png
Binary file not shown.
Binary file removed Content/Splash/EdSplash.uasset
Binary file not shown.
Binary file modified Content/Splash/Splash.bmp
Binary file not shown.
Binary file removed Content/Splash/Splash.png
Binary file not shown.
Binary file removed Content/Splash/Splash.uasset
Binary file not shown.
Binary file modified FicsItNetworks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,20 @@ pipeline {

stage('Setup SML & Assets') {
steps {
bat label: '', script: 'git clone --branch %SML_BRANCH% https://github.com/satisfactorymodding/SatisfactoryModLoader.git'
checkout scm: [
$class: 'GitSCM',
branches: [[
name: "07f4ae52099642e2fba016ae9642df41bf164749"
]],
extensions: [[
$class: 'RelativeTargetDirectory',
relativeTargetDir: 'SatisfactoryModLoader'
]],
userRemoteConfigs: [[
url: 'https://github.com/satisfactorymodding/SatisfactoryModLoader.git'
]]
]
// bat label: '', script: 'git clone https://github.com/satisfactorymodding/SatisfactoryModLoader.git'
bat label: '', script: 'xcopy /Y /E /I SatisfactoryModLoader\\Source\\FactoryGame FicsIt-Networks\\Source\\FactoryGame > copy.log'
bat label: '', script: 'xcopy /Y /E /I SatisfactoryModLoader\\Source\\SML FicsIt-Networks\\Source\\SML > copy.log'
bat label: '', script: 'xcopy /Y /E /I SatisfactoryModLoader\\Plugins\\Alpakit FicsIt-Networks\\Plugins\\Alpakit > copy.log'
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FicsIt-Networks [![Build Status](https://jenkins.massivebytes.net/job/FicsIt-Networks/job/master/badge/icon)](https://jenkins.massivebytes.net/job/FicsIt-Networks/job/master)
===============
FicsIt-Networks is a mod for Satisfactory, written in C++/BP using Unreal Engine and the Satisfactory Modloader, which allows you to control, monitor, manage and automate each process of your factory by providing a network system and programmable computers, aswell as other I/O.
It is inspired by [OpenComputers](https://github.com/MightyPirates/OpenComputers).

**If you want to learn more:**
[please visit the Documentation](https://docs.ficsit.app/ficsit-networks/0.0.1)
Expand All @@ -27,7 +28,7 @@ You can download the latest build version [here](https://jenkins.massivebytes.ne

Streams
=======
The biggest part of making this mod does get stream at [CoderDE](https://twitch.tv/coderde).
The biggest part of making this mod does get stream at [Panakotta00](https://twitch.tv/panakotta00).

You-Tube
========
Expand Down Expand Up @@ -61,6 +62,11 @@ Features
Monitors and GPUs allow you to visualize data in multiple different forms. They also allow you to use montiors as user inputs like Keyboard, Mouse and Touch.
- Vehicle Scanner
Allows to interact with vehicles that pass over it. It also looks nice ;-)
- Reflection System
The Reflection System allows to check data-types, functions, properties, signals and more. You can look up all sort of information and it helps you
for a more dynamic way to interact with the machines. This system also provides a abstraction layer so that further language implementations and such can get implemented more
easily and quicker. It also provides a dependency-less system so other mods can provide functionality that can be used by ficsit-networks.
It also provides the reflection viewer which is UI Widget allowing you to browse and explore the reflection data, like an ingame documentation.

Dependencies
============
Expand All @@ -72,11 +78,9 @@ Roadmap
=======
You can find the detailed progress in the [project board](https://github.com/CoderDE/FicsIt-Networks/projects/1).

- fixing some bugs
- add new sensors (like player sensors)
- microcontrollers
- computer power consumption
- tune and make improvements to general concepts and performance
- adding support for a visual scripting language
- port the mod to official mod kit (when released)
(the list is dynamic and gets updated based on new ideas)
Expand Down
5 changes: 4 additions & 1 deletion Source/FicsItNetworks.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ public FicsItNetworksTarget(TargetInfo Target) : base(Target)
//default link type for game is static, but we need modular
//to get attachable module dll for mod loading
LinkType = TargetLinkType.Modular;

ExtraModuleNames.AddRange( new string[] { "FactoryGame", "SML", "FicsItNetworks" } );

bUseChecksInShipping = true;
bUseLoggingInShipping = true;
}
}
16 changes: 3 additions & 13 deletions Source/FicsItNetworks/Components/FINCodeableMerger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@ void AFINCodeableMerger::GetDismantleRefund_Implementation(TArray<FInventoryStac
out_refund.Append(InputQueue3);
}

void AFINCodeableMerger::AddListener_Implementation(FFINNetworkTrace listener) {
SignalListeners.Add(listener);
}

void AFINCodeableMerger::RemoveListener_Implementation(FFINNetworkTrace listener) {
SignalListeners.Remove(listener);
}

TSet<FFINNetworkTrace> AFINCodeableMerger::GetListeners_Implementation() {
return SignalListeners;
}

UObject* AFINCodeableMerger::GetSignalSenderOverride_Implementation() {
return NetworkConnector;
}
Expand Down Expand Up @@ -93,6 +81,7 @@ bool AFINCodeableMerger::Factory_GrabOutput_Implementation(UFGFactoryConnectionC
if (OutputQueue.Num() > 0) {
out_item = OutputQueue[0];
OutputQueue.RemoveAt(0);
netSig_ItemOutputted(out_item);
return true;
}
return false;
Expand All @@ -119,11 +108,12 @@ FInventoryItem AFINCodeableMerger::netFunc_getInput(int input) {
return FInventoryItem();
}

bool AFINCodeableMerger::netFunc_canOutput() {
bool AFINCodeableMerger::netPropGet_canOutput() {
return OutputQueue.Num() < 2;
}

void AFINCodeableMerger::netSig_ItemRequest_Implementation(int input, const FInventoryItem& item) {}
void AFINCodeableMerger::netSig_ItemOutputted_Implementation(const FInventoryItem& item) {}

TArray<FInventoryItem>& AFINCodeableMerger::GetInput(int output) {
output = (output < 0) ? 0 : ((output > 2) ? 2 : output);
Expand Down
76 changes: 63 additions & 13 deletions Source/FicsItNetworks/Components/FINCodeableMerger.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
#include "Buildables/FGBuildableAttachmentSplitter.h"
#include "FGFactoryConnectionComponent.h"
#include "Network/FINAdvancedNetworkConnectionComponent.h"
#include "Network/FINNetworkCustomType.h"

#include "FINCodeableMerger.generated.h"

UCLASS()
class AFINCodeableMerger : public AFGBuildableConveyorAttachment, public IFINSignalSender, public IFINNetworkCustomType {
class AFINCodeableMerger : public AFGBuildableConveyorAttachment, public IFINSignalSender {
GENERATED_BODY()

public:
Expand Down Expand Up @@ -40,9 +39,6 @@ class AFINCodeableMerger : public AFGBuildableConveyorAttachment, public IFINSig
UPROPERTY(SaveGame)
TArray<FInventoryItem> InputQueue3;

UPROPERTY(SaveGame)
TSet<FFINNetworkTrace> SignalListeners;

AFINCodeableMerger();
~AFINCodeableMerger();

Expand All @@ -51,9 +47,6 @@ class AFINCodeableMerger : public AFGBuildableConveyorAttachment, public IFINSig
// End IFGDismantleInterface

// Begin IFINSignalSender
virtual void AddListener_Implementation(FFINNetworkTrace listener) override;
virtual void RemoveListener_Implementation(FFINNetworkTrace listener) override;
virtual TSet<FFINNetworkTrace> GetListeners_Implementation() override;
virtual UObject* GetSignalSenderOverride_Implementation() override;
// End IFINSignalSender

Expand All @@ -64,40 +57,97 @@ class AFINCodeableMerger : public AFGBuildableConveyorAttachment, public IFINSig
// TODO: Upgrade Implementation
// End AFGBuildable

// Begin IFINNetworkCustomType
virtual FString GetCustomTypeName_Implementation() const override { return TEXT("CodeableMerger"); }
// End IFINNetworkCustomType

private:
/**
* This function is used in tick for internal handling of a input.
*/
void TickInput(UFGFactoryConnectionComponent* Connector, int InputID);
public:
UFUNCTION()
void netClass_Meta(FString& InternalName, FText& DisplayName, TMap<FString, FString>& PropertyInternalNames, TMap<FString, FText>& PropertyDisplayNames, TMap<FString, FText>& PropertyDescriptions, TMap<FString, int32>& PropertyRuntimes) {
InternalName = TEXT("CodeableMerger");
DisplayName = FText::FromString(TEXT("Codeable Merger"));
PropertyInternalNames.Add("canOutput", "canOutput");
PropertyDisplayNames.Add("canOutput", FText::FromString("Can Output"));
PropertyDescriptions.Add("canOutput", FText::FromString("Is true if the output queue has a slot available for an item from one of the input queues."));
}

/**
* This function transfers the next item from the input queue with the given index to the output queue.
*/
UFUNCTION(BlueprintCallable, Category = "Network|Components|CodeableSplitter")
bool netFunc_transferItem(int input);
UFUNCTION()
void netFuncMeta_transferItem(FString& InternalName, FText& DisplayName, FText& Description, TArray<FString>& ParameterInternalNames, TArray<FText>& ParameterDisplayNames, TArray<FText>& ParameterDescriptions, int32& Runtime) {
InternalName = "transferItem";
DisplayName = FText::FromString("Transfer Item");
Description = FText::FromString("Allows to transfer an item from the given input queue to the output queue if possible.");
ParameterInternalNames.Add("input");
ParameterDisplayNames.Add(FText::FromString("Input"));
ParameterDescriptions.Add(FText::FromString("The index of the input queue you want to transfer the next item to the output queue. (0 = middle, 1 = left, 2 = right)"));
ParameterInternalNames.Add("transfered");
ParameterDisplayNames.Add(FText::FromString("Transfered"));
ParameterDescriptions.Add(FText::FromString("true if it was able to transfer the item."));
Runtime = 1;
}

/**
* Allows to peek the next item at the input queue with the given index.
*/
UFUNCTION(BlueprintCallable, Category = "Network|Components|CodeableSplitter")
FInventoryItem netFunc_getInput(int input);
UFUNCTION()
void netFuncMeta_getInput(FString& InternalName, FText& DisplayName, FText& Description, TArray<FString>& ParameterInternalNames, TArray<FText>& ParameterDisplayNames, TArray<FText>& ParameterDescriptions, int32& Runtime) {
InternalName = "getInput";
DisplayName = FText::FromString("Get Input");
Description = FText::FromString("Returns the next item in the given input queue.");
ParameterInternalNames.Add("input");
ParameterDisplayNames.Add(FText::FromString("Input"));
ParameterDescriptions.Add(FText::FromString("The index of the input queue you want to check (0 = middle, 1 = left, 2 = right)"));
ParameterInternalNames.Add("item");
ParameterDisplayNames.Add(FText::FromString("Item"));
ParameterDescriptions.Add(FText::FromString("The next item in the input queue."));
Runtime = 1;
}

/**
* Checks if the output queue with is able to contain one more item.
*/
UFUNCTION(BlueprintCallable, Category = "Network|Components|CodeableSplitter")
bool netFunc_canOutput();
bool netPropGet_canOutput();

/**
* This signal gets emit when a new item got pushed to the input queue with the given index.
*/
UFUNCTION(BlueprintNativeEvent, Category = "Network|Components|CodeableSplitter")
void netSig_ItemRequest(int input, const FInventoryItem& item);
UFUNCTION()
void netSigMeta_ItemRequest(FString& InternalName, FText& DisplayName, FText& Description, TArray<FString>& ParameterInternalNames, TArray<FText>& ParameterDisplayNames, TArray<FText>& ParameterDescriptions) {
InternalName = "ItemRequest";
DisplayName = FText::FromString("Item Request");
Description = FText::FromString("Triggers when a new item is ready in one of the input queues.");
ParameterInternalNames.Add("input");
ParameterDisplayNames.Add(FText::FromString("Input"));
ParameterDescriptions.Add(FText::FromString("The index of the input queue at which the item is ready."));
ParameterInternalNames.Add("item");
ParameterDisplayNames.Add(FText::FromString("Item"));
ParameterDescriptions.Add(FText::FromString("The new item in the input queue."));
}

/**
* This signal gets emitted when a item is popped from the output queue (aka it got outputted to an conveyor)
*/
UFUNCTION(BlueprintNativeEvent, Category = "Network|Components|CodeableSplitter")
void netSig_ItemOutputted(const FInventoryItem& item);
UFUNCTION()
void netSigMeta_ItemOutputted(FString& InternalName, FText& DisplayName, FText& Description, TArray<FString>& ParameterInternalNames, TArray<FText>& ParameterDisplayNames, TArray<FText>& ParameterDescriptions) {
InternalName = "ItemOutputted";
DisplayName = FText::FromString("Item Outputted");
Description = FText::FromString("Triggers when an item is popped from the output queue (aka it got transferred to a conveyor).");
ParameterInternalNames.Add("item");
ParameterDisplayNames.Add(FText::FromString("Item"));
ParameterDescriptions.Add(FText::FromString("The item removed from the output queue."));
}

TArray<FInventoryItem>& GetInput(int input);
TArray<FInventoryItem>& GetInput(UFGFactoryConnectionComponent* connection);
Expand Down
38 changes: 16 additions & 22 deletions Source/FicsItNetworks/Components/FINCodeableSplitter.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "FINCodeableSplitter.h"

#include "FicsItNetworksModule.h"
#include "Computer/FINComputerSubsystem.h"

AFINCodeableSplitter::AFINCodeableSplitter() {
Expand Down Expand Up @@ -39,7 +39,7 @@ void AFINCodeableSplitter::OnConstruction(const FTransform& transform) {
Super::OnConstruction(transform);
#if !WITH_EDITOR
if (HasAuthority() && AFINComputerSubsystem::GetComputerSubsystem(this)->Version < EFINCustomVersion::FINCodeableSplitterAttachmentFixes) {
SML::Logging::warning("Old Splitter found. Try to apply construction update fixes... '", TCHAR_TO_UTF8(*this->GetName()), "'");
UE_LOG(LogFicsItNetworks, Warning, TEXT("Old Splitter found. Try to apply construction update fixes... '%s'"), *this->GetName());
Input1->Rename(TEXT("InputConnector"));
}
#endif
Expand All @@ -48,7 +48,7 @@ void AFINCodeableSplitter::OnConstruction(const FTransform& transform) {
void AFINCodeableSplitter::BeginPlay() {
Super::BeginPlay();
if (HasAuthority() && AFINComputerSubsystem::GetComputerSubsystem(this)->Version < EFINCustomVersion::FINCodeableSplitterAttachmentFixes) {
SML::Logging::warning("Old Splitter found. Try to apply beginplay update fixes... '", TCHAR_TO_UTF8(*this->GetName()), "'");
UE_LOG(LogFicsItNetworks, Log, TEXT("Old Splitter found. Try to apply beginplay update fixes... '%s'"), *this->GetName());
Input1->Rename(TEXT("Input1"));
RootComponent->AddRelativeRotation(FRotator(0,-90.0f,0));
UFGFactoryConnectionComponent* NewOutput2 = Output1->GetConnection();
Expand Down Expand Up @@ -82,10 +82,12 @@ bool AFINCodeableSplitter::Factory_PeekOutput_Implementation(const UFGFactoryCon
}

bool AFINCodeableSplitter::Factory_GrabOutput_Implementation(UFGFactoryConnectionComponent* connection, FInventoryItem& out_item, float& out_OffsetBeyond, TSubclassOf<UFGItemDescriptor> type) {
TArray<FInventoryItem>& outputQueue = GetOutput(connection);
int32 Index = 0;
TArray<FInventoryItem>& outputQueue = GetOutput(connection, &Index);
if (outputQueue.Num() > 0) {
out_item = outputQueue[0];
outputQueue.RemoveAt(0);
netSig_ItemOutputted(Index, out_item);
return true;
}
return false;
Expand All @@ -105,18 +107,6 @@ void AFINCodeableSplitter::GatherDependencies_Implementation(TArray<UObject*>& o
out_dependentObjects.Add(AFINComputerSubsystem::GetComputerSubsystem(this));
}

void AFINCodeableSplitter::AddListener_Implementation(FFINNetworkTrace listener) {
SignalListeners.Add(listener);
}

void AFINCodeableSplitter::RemoveListener_Implementation(FFINNetworkTrace listener) {
SignalListeners.Remove(listener);
}

TSet<FFINNetworkTrace> AFINCodeableSplitter::GetListeners_Implementation() {
return SignalListeners;
}

UObject* AFINCodeableSplitter::GetSignalSenderOverride_Implementation() {
return NetworkConnector;
}
Expand Down Expand Up @@ -146,6 +136,7 @@ bool AFINCodeableSplitter::netFunc_canOutput(int output) {
}

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

TArray<FInventoryItem>& AFINCodeableSplitter::GetOutput(int output) {
output = (output < 0) ? 0 : ((output > 2) ? 2 : output);
Expand All @@ -159,16 +150,19 @@ TArray<FInventoryItem>& AFINCodeableSplitter::GetOutput(int output) {
}
}

TArray<FInventoryItem>& AFINCodeableSplitter::GetOutput(UFGFactoryConnectionComponent* connection) {
return const_cast<TArray<FInventoryItem>&>(GetOutput((const UFGFactoryConnectionComponent*) connection));
TArray<FInventoryItem>& AFINCodeableSplitter::GetOutput(UFGFactoryConnectionComponent* connection, int32* Index) {
return const_cast<TArray<FInventoryItem>&>(GetOutput((const UFGFactoryConnectionComponent*) connection, Index));
}

const TArray<FInventoryItem>& AFINCodeableSplitter::GetOutput(const UFGFactoryConnectionComponent* connection) const {
const TArray<FInventoryItem>& AFINCodeableSplitter::GetOutput(const UFGFactoryConnectionComponent* connection, int32* Index) const {
if (connection == Output1) {
if (Index) *Index = 1;
return OutputQueue1;
} else if (connection == Output2) {
}
if (connection == Output2) {
if (Index) *Index = 0;
return OutputQueue2;
} else {
return OutputQueue3;
}
if (Index) *Index = 2;
return OutputQueue3;
}
Loading

0 comments on commit 8df216f

Please sign in to comment.