mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* init new disks are in. can be spawned or printed. no weights or correctly bound techs yet. * tweak textures and naming * make tech disks respect their tier and discipline * make tech console respect tier weight * yml fixes (forgo a million things) * meow :3 reworked to use GenericVisualizer * moved staticPrice comp to shared to support different pricing per tier * unhardcoded prices; tweaked log messages * cleanup * a few fixes * updated pricing to match weights * lowering prices I forgor how many of them science can print * what * t3 texture, logger, factory * move PriceCalculationEvent & EstimatedPriceCalculationEvent to shared * remove static price comp; use EntProtoId for disk proto * moved staticPrice comp back to server * cleanup: price event, visualizer enums & yml * ummove PriceCalculationEvent * ummove PriceCalculationEvent attempt #2 * more unmoving * fixes * predict onExamine * review changes * small cleanup --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using Content.Shared.Random;
|
|
using Content.Shared.Research.Prototypes;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Research.TechnologyDisk.Components;
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
|
[AutoGenerateComponentState]
|
|
public sealed partial class TechnologyDiskComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// A discipline to constrain the disk to.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public ProtoId<TechDisciplinePrototype>? Discipline;
|
|
|
|
/// <summary>
|
|
/// A tier to constrain the disk to.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public int? Tier;
|
|
|
|
/// <summary>
|
|
/// The recipe that will be added. If null, one will be randomly generated
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public List<ProtoId<LatheRecipePrototype>>? Recipes;
|
|
|
|
/// <summary>
|
|
/// A weighted random prototype for how rare each tier should be.
|
|
/// </summary>
|
|
[DataField]
|
|
public ProtoId<WeightedRandomPrototype> TierWeightPrototype = "TechDiskTierWeights";
|
|
|
|
/// <summary>
|
|
/// Mapping of disk tiers to disk prices.
|
|
/// </summary>
|
|
[DataField]
|
|
public Dictionary<int, int> DiskPricePerTier = new()
|
|
{
|
|
[1] = 100,
|
|
[2] = 500,
|
|
[3] = 1500
|
|
};
|
|
}
|