Add prediction for Tech Disks, cleanup (#29061)
* Add prediction for Tech Disks, cleanup * Remove IsServer check in OnMapInit * Use HashSet for techs, remove LINQ
This commit is contained in:
@@ -131,25 +131,6 @@ public sealed partial class ResearchSystem
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a lathe recipe to the specified technology database
|
||||
/// without checking if it can be unlocked.
|
||||
/// </summary>
|
||||
public void AddLatheRecipe(EntityUid uid, string recipe, TechnologyDatabaseComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
return;
|
||||
|
||||
if (component.UnlockedRecipes.Contains(recipe))
|
||||
return;
|
||||
|
||||
component.UnlockedRecipes.Add(recipe);
|
||||
Dirty(uid, component);
|
||||
|
||||
var ev = new TechnologyDatabaseModifiedEvent();
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether a technology can be unlocked on this database,
|
||||
/// taking parent technologies into account.
|
||||
|
||||
Reference in New Issue
Block a user