RND Rework [Death to Techweb] (#16370)
* Techweb rework * more ui work * finishing ui * Finish all the C# logic * the techs + lathes * remove old-tech * mirror-review
This commit is contained in:
@@ -49,7 +49,7 @@ public sealed partial class ResearchSystem
|
||||
|
||||
if (!CanRun(uid))
|
||||
return;
|
||||
AddPointsToServer(uid, PointsPerSecond(uid, component) * time, component);
|
||||
ModifyServerPoints(uid, GetPointsPerSecond(uid, component) * time, component);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -60,15 +60,14 @@ public sealed partial class ResearchSystem
|
||||
/// <param name="clientComponent"></param>
|
||||
/// <param name="serverComponent"></param>
|
||||
/// <param name="dirtyServer">Whether or not to dirty the server component after registration</param>
|
||||
/// <returns>Whether or not the client was successfully registered to the server</returns>
|
||||
public bool RegisterClient(EntityUid client, EntityUid server, ResearchClientComponent? clientComponent = null,
|
||||
public void RegisterClient(EntityUid client, EntityUid server, ResearchClientComponent? clientComponent = null,
|
||||
ResearchServerComponent? serverComponent = null, bool dirtyServer = true)
|
||||
{
|
||||
if (!Resolve(client, ref clientComponent) || !Resolve(server, ref serverComponent))
|
||||
return false;
|
||||
return;
|
||||
|
||||
if (serverComponent.Clients.Contains(client))
|
||||
return false;
|
||||
return;
|
||||
|
||||
serverComponent.Clients.Add(client);
|
||||
clientComponent.Server = server;
|
||||
@@ -78,7 +77,6 @@ public sealed partial class ResearchSystem
|
||||
|
||||
var ev = new ResearchRegistrationChangedEvent(server);
|
||||
RaiseLocalEvent(client, ref ev);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -130,7 +128,7 @@ public sealed partial class ResearchSystem
|
||||
/// <param name="uid"></param>
|
||||
/// <param name="component"></param>
|
||||
/// <returns></returns>
|
||||
public int PointsPerSecond(EntityUid uid, ResearchServerComponent? component = null)
|
||||
public int GetPointsPerSecond(EntityUid uid, ResearchServerComponent? component = null)
|
||||
{
|
||||
var points = 0;
|
||||
|
||||
@@ -154,7 +152,7 @@ public sealed partial class ResearchSystem
|
||||
/// <param name="uid">The server</param>
|
||||
/// <param name="points">The amount of points being added</param>
|
||||
/// <param name="component"></param>
|
||||
public void AddPointsToServer(EntityUid uid, int points, ResearchServerComponent? component = null)
|
||||
public void ModifyServerPoints(EntityUid uid, int points, ResearchServerComponent? component = null)
|
||||
{
|
||||
if (points == 0)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user