-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
initial code to sync buildings placement during gameplay #74
Conversation
…ame veins now (but do not mine when powered)
…s are linked now (atleast for miners)
NebulaPatcher/NebulaPatcher.csproj
Outdated
<Reference Include="Assembly-CSharp"> | ||
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change intentional ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really 😅
NebulaWorld/Factory/EntityManager.cs
Outdated
rot = rot | ||
}, 0); | ||
|
||
GameMain.mainPlayer.controller.actionBuild.NotifyBuilt(-0, ret); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be 0
not -0
|
||
namespace NebulaModel.Packets.Factory | ||
{ | ||
public class EntityPlaced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like another struct candidate
for(int i = 0; i < recipe.productIds.Length; i++) | ||
{ | ||
GameMain.mainPlayer.package.AddItemStacked(recipe.productIds[i], count); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this add to the Mecha's storage, not the main player's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, this is debug code.
|
||
for (int i = 0; i < veinsInAreaNonAlloc; i++) | ||
{ | ||
if(minerType == EMinerType.Vein) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over here, maybe moving the miner type switch above the loop might be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll PR.
minerPool[minerId].pcId = pcID; | ||
} | ||
minerPool[minerId].GetMinimumVeinAmount(GameMain.mainPlayer.factory, GameMain.mainPlayer.factory.veinPool); | ||
// TODO: do some stuff with entitySignPool, is it important? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is basically updating the image overlays on top of rendered objects. In example, logistics stations, recipes in assembler, etc.
This is just a start, there is still a lot missing. Whats working so far is:
It also includes a debug patch to free craft buildings and items.