diff --git a/Content.Server/_LP/Power/Systems/InducerSystem.cs b/Content.Server/_LP/Power/Systems/InducerSystem.cs new file mode 100644 index 00000000000..029695b6511 --- /dev/null +++ b/Content.Server/_LP/Power/Systems/InducerSystem.cs @@ -0,0 +1,149 @@ +using System.Linq; +using Content.Server.Power.Components; +using Content.Shared.Containers.ItemSlots; +using Content.Shared.DoAfter; +using Content.Shared.Interaction; +using Content.Shared.Popups; +using Content.Shared.Power.Components; +using Content.Shared.Verbs; +using Robust.Shared.Utility; + +namespace Content.Server.Power.EntitySystems; + +public sealed class InducerSystem : EntitySystem +{ + [Dependency] private readonly BatterySystem _battery = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; + [Dependency] private readonly ItemSlotsSystem _itemSlots = default!; + [Dependency] private readonly SharedPopupSystem _popup = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnAfterInteract); + SubscribeLocalEvent(OnDoAfter); + SubscribeLocalEvent>(OnGetVerbs); + } + + private void OnAfterInteract(EntityUid uid, InducerComponent component, AfterInteractEvent args) + { + if (args.Handled || args.Target == null || !args.CanReach) + return; + + var target = args.Target.Value; + + if (!TryComp(target, out var targetBattery)) + { + _popup.PopupEntity(Loc.GetString("inducer-no-battery"), uid, args.User); + return; + } + + if (!_itemSlots.TryGetSlot(uid, component.PowerCellSlotId, out var slot) || slot.Item == null || + !TryComp(slot.Item.Value, out var sourceBattery)) + { + _popup.PopupEntity(Loc.GetString("inducer-no-power-cell"), uid, args.User); + return; + } + + if (sourceBattery.CurrentCharge <= 0) + { + _popup.PopupEntity(Loc.GetString("inducer-empty"), uid, args.User); + return; + } + + if (_battery.IsFull(target, targetBattery)) + { + _popup.PopupEntity(Loc.GetString("inducer-target-full"), uid, args.User); + return; + } + + var doAfterArgs = new DoAfterArgs(EntityManager, args.User, component.TransferDelay, new InducerDoAfterEvent(), uid, target: target, used: uid) + { + BreakOnMove = true, + BreakOnDamage = true, + RequireCanInteract = true, + DistanceThreshold = component.MaxDistance, + CancelDuplicate = false, + }; + + _doAfter.TryStartDoAfter(doAfterArgs); + args.Handled = true; + } + + private void OnDoAfter(EntityUid uid, InducerComponent component, DoAfterEvent args) + { + if (args.Cancelled || args.Handled || args.Target == null) + return; + + var target = args.Target.Value; + + if (!TryComp(target, out var targetBattery)) + return; + + if (!_itemSlots.TryGetSlot(uid, component.PowerCellSlotId, out var slot) || slot.Item == null) + return; + + if (!TryComp(slot.Item.Value, out var sourceBattery)) + return; + + var energyToTransfer = component.TransferRate; + energyToTransfer = Math.Min(energyToTransfer, sourceBattery.CurrentCharge); + + var freeSpace = targetBattery.MaxCharge - targetBattery.CurrentCharge; + energyToTransfer = Math.Min(energyToTransfer, freeSpace); + + if (energyToTransfer <= 0) + return; + + if (_battery.TryUseCharge(slot.Item.Value, energyToTransfer, sourceBattery)) + { + _battery.AddCharge(target, energyToTransfer, targetBattery); + var percent = (int)(targetBattery.CurrentCharge / targetBattery.MaxCharge * 100); + _popup.PopupEntity(Loc.GetString("inducer-success", ("percent", percent)), uid, args.User); + + if (targetBattery.CurrentCharge < targetBattery.MaxCharge * 0.95f) + { + args.Repeat = true; + } + else + { + args.Repeat = false; + } + } + else + { + _battery.SetCharge(target, targetBattery.CurrentCharge + energyToTransfer, targetBattery); + _battery.SetCharge(slot.Item.Value, sourceBattery.CurrentCharge - energyToTransfer, sourceBattery); + args.Repeat = false; + } + } + + private void OnGetVerbs(EntityUid uid, InducerComponent component, GetVerbsEvent args) + { + if (!args.CanAccess || !args.CanInteract) + return; + + var priority = 0; + foreach (var rate in component.AvailableTransferRates) + { + AlternativeVerb verb = new() + { + Text = Loc.GetString("inducer-set-transfer-rate", ("rate", rate)), + Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/zap.svg.192dpi.png")), + Category = VerbCategory.SelectType, + Act = () => + { + component.TransferRate = rate; + Dirty(uid, component); + _popup.PopupEntity(Loc.GetString("inducer-transfer-rate-set", ("rate", rate)), uid, args.User); + }, + Priority = priority + }; + + priority--; + + args.Verbs.Add(verb); + } + } +} diff --git a/Content.Shared/_LP/Power/Components/InducerComponent.cs b/Content.Shared/_LP/Power/Components/InducerComponent.cs new file mode 100644 index 00000000000..233fd28ebf3 --- /dev/null +++ b/Content.Shared/_LP/Power/Components/InducerComponent.cs @@ -0,0 +1,27 @@ +using Robust.Shared.GameStates; +using Robust.Shared.Serialization; +using Content.Shared.DoAfter; + +namespace Content.Shared.Power.Components; + +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +public sealed partial class InducerComponent : Component +{ + [DataField] + public string PowerCellSlotId = "inducer_power_cell_slot"; + + [DataField, AutoNetworkedField] + public float TransferRate = default!; + + [DataField] + public List AvailableTransferRates = new(); + + [DataField] + public float TransferDelay = default!; + + [DataField] + public float MaxDistance = default!; +} + +[Serializable, NetSerializable] +public sealed partial class InducerDoAfterEvent : SimpleDoAfterEvent; diff --git a/Content.Shared/_LP/Power/Systems/SharedInducerSystem.cs b/Content.Shared/_LP/Power/Systems/SharedInducerSystem.cs new file mode 100644 index 00000000000..4e194c697fa --- /dev/null +++ b/Content.Shared/_LP/Power/Systems/SharedInducerSystem.cs @@ -0,0 +1,22 @@ +using Content.Shared.Examine; +using Content.Shared.Power.Components; + +namespace Content.Shared.Power.EntitySystems; + +public sealed class SharedInducerSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnExamined); + } + + private void OnExamined(EntityUid uid, InducerComponent component, ExaminedEvent args) + { + if (!args.IsInDetailsRange) + return; + + args.PushMarkup(Loc.GetString("inducer-examine-rate", ("rate", component.TransferRate))); + } +} diff --git a/Resources/Locale/ru-RU/_ADT/research/technologies.ftl b/Resources/Locale/ru-RU/_ADT/research/technologies.ftl new file mode 100644 index 00000000000..02921199ddd --- /dev/null +++ b/Resources/Locale/ru-RU/_ADT/research/technologies.ftl @@ -0,0 +1,3 @@ +research-technology-basemegacells = Мегабатареи + +research-technology-advancedmegacells = Сверхэффективные мегабатареи diff --git a/Resources/Locale/ru-RU/_LP/power/inducer.ftl b/Resources/Locale/ru-RU/_LP/power/inducer.ftl new file mode 100644 index 00000000000..d6fe557fbbd --- /dev/null +++ b/Resources/Locale/ru-RU/_LP/power/inducer.ftl @@ -0,0 +1,8 @@ +inducer-no-battery = В цели нет батареи! +inducer-no-power-cell = В индукторе нет батареи! +inducer-empty = Батарея устройства разряжена! +inducer-target-full = Батарея цели уже полностью заряжена! +inducer-success = Энергия передана. Заряд цели: {$percent}% +inducer-set-transfer-rate = Установить {$rate} Дж/с +inducer-transfer-rate-set = Скорость передачи установлена на {$rate} Дж/с +inducer-examine-rate = Текущая скорость передачи: [color=yellow]{$rate} Дж/с[/color] diff --git a/Resources/Locale/ru-RU/_LP/research/technologies.ftl b/Resources/Locale/ru-RU/_LP/research/technologies.ftl new file mode 100644 index 00000000000..0373b43a9cc --- /dev/null +++ b/Resources/Locale/ru-RU/_LP/research/technologies.ftl @@ -0,0 +1 @@ +research-technology-inducer = Беспроводная передача энергии diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/objects/devices/circuitboards/machine/production.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/objects/devices/circuitboards/machine/production.ftl new file mode 100644 index 00000000000..7af05ba62a5 --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/objects/devices/circuitboards/machine/production.ftl @@ -0,0 +1,2 @@ +ent-ADTMegaCellRechargerCircuitboard = зарядник мегабатарей (машинная плата) + .desc = Печатная плата зарядника мегабатарей. diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/objects/power/megacells.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/objects/power/megacells.ftl new file mode 100644 index 00000000000..cdd172afd79 --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/objects/power/megacells.ftl @@ -0,0 +1,27 @@ +ent-ADTMegaCellSmall = мегабатарея малой ёмкости + .desc = Перезаряжаемый энергоэлемент высшего класса. Скромная по меркам серии, но на порядок превосходит устаревшие промышленные аккумуляторы. Из-за особенностей конструкции несовместима с обычными зарядниками. + .suffix = Полный +ent-ADTMegaCellSmallPrinted = { ent-ADTMegaCellSmall } + .suffix = Пустой + .desc = { ent-ADTMegaCellSmall.desc } +ent-ADTMegaCellMedium = мегабатарея средней ёмкости + .desc = Энергоэлемент продвинутой конструкции. Обладает выдающейся стабильностью и ёмкостью. Из-за особенностей конструкции несовместима с обычными зарядниками. + .suffix = Полный +ent-ADTMegaCellMediumPrinted = { ent-ADTMegaCellMedium } + .suffix = Пустой + .desc = { ent-ADTMegaCellMedium.desc } +ent-ADTMegaCellHigh = мегабатарея высокой ёмкости + .desc = Высокоёмкий источник энергии нового поколения. Обеспечивает длительное энергоснабжение без потери производительности. Из-за особенностей конструкции несовместима с обычными зарядниками. + .suffix = Полный +ent-ADTMegaCellHighPrinted = { ent-ADTMegaCellHigh } + .suffix = Пустой + .desc = { ent-ADTMegaCellHigh.desc } +ent-ADTMegaCellHyper = мегабатарея гипер ёмкости + .desc = Эталон инженерной мысли в сфере энергосистем. Способна вмещать в себя колоссальное количество энергии и сохранять её с безупречной стабильностью. Из-за особенностей конструкции несовместима с обычными зарядниками. + .suffix = Полный +ent-ADTMegaCellHyperPrinted = { ent-ADTMegaCellHyper } + .suffix = Пустой + .desc = { ent-ADTMegaCellHyper.desc } +ent-ADTMegaCellInfinite = квантовая мегабатарея + .desc = Абсолютная вершина энергетических технологий. Квантовая матрица внутри корпуса обеспечивает практически неисчерпаемый запас энергии, нарушая все известные законы термодинамики. + .suffix = Бесконечный \ No newline at end of file diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/structures/power/chargers.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/structures/power/chargers.ftl new file mode 100644 index 00000000000..45ca6c1fd1d --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_adt/entities/structures/power/chargers.ftl @@ -0,0 +1,2 @@ +ent-ADTMegaCellRecharger = зарядник мегабатарей + .desc = Модифицированный зарядник промышленного класса, предназначенный исключительно для зарядки мегабатарей. Оснащён контактным основанием и усиленными энергоканалами для безопасной и эффективной передачи электричества. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/_lp/entities/objects/tools/tools.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/_lp/entities/objects/tools/tools.ftl new file mode 100644 index 00000000000..a9bb241c0da --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/_lp/entities/objects/tools/tools.ftl @@ -0,0 +1,12 @@ +ent-LPPEngiInducer = индуктор + .desc = Устройство для беспроводной передачи энергии от собственной батареи к батареям других устройств. + .suffix = Пустой, Инженерный +ent-LPPEngiInducerBattery = { ent-LPPEngiInducer } + .desc = { ent-LPPEngiInducer.desc } + .suffix = Батарея, Инженерный +ent-LPPRNDInducer = { ent-LPPEngiInducer } + .desc = { ent-LPPEngiInducer.desc } + .suffix = Пустой, РНД +ent-LPPRNDInducerBattery = { ent-LPPEngiInducer } + .desc = { ent-LPPEngiInducer.desc } + .suffix = Батарея, РНД diff --git a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml index 53db7180aae..bb852fef517 100644 --- a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml +++ b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml @@ -329,6 +329,11 @@ slots: cell_slot: name: power-cell-slot-component-slot-name-default + # LP Edit Start + blacklist: + tags: + - ADTMegaCell + # LP Edit End - type: Body bodyType: Simple - type: StatusEffects diff --git a/Resources/Prototypes/Entities/Structures/Power/chargers.yml b/Resources/Prototypes/Entities/Structures/Power/chargers.yml index c36b58f3b2b..80501e06a12 100644 --- a/Resources/Prototypes/Entities/Structures/Power/chargers.yml +++ b/Resources/Prototypes/Entities/Structures/Power/chargers.yml @@ -155,6 +155,11 @@ tags: - PowerCell - PowerCellSmall + # ADT-tweak-start + blacklist: + tags: + - ADTMegaCell + # ADT-tweak-end - type: entity parent: [ BaseItemRecharger, ConstructibleMachine ] @@ -280,6 +285,7 @@ blacklist: tags: - PotatoBattery + - ADTMegaCell # ADT-Tweak - WizardWand # Goobstation components: # Goobstation - MaterialEnergy diff --git a/Resources/Prototypes/_ADT/Entities/Objects/Devices/Circuitboards/Machine/production.yml b/Resources/Prototypes/_ADT/Entities/Objects/Devices/Circuitboards/Machine/production.yml new file mode 100644 index 00000000000..f4f2620835e --- /dev/null +++ b/Resources/Prototypes/_ADT/Entities/Objects/Devices/Circuitboards/Machine/production.yml @@ -0,0 +1,21 @@ +- type: entity + id: ADTMegaCellRechargerCircuitboard + parent: BaseMachineCircuitboard + name: megacell recharger machine board + description: A machine printed circuit board for a megacell recharger. + components: + - type: Sprite + sprite: Objects/Misc/module.rsi + state: engineering + - type: MachineBoard + prototype: ADTMegaCellRecharger + stackRequirements: + Manipulator: 5 + Gold: 20 + Cable: 5 + - type: PhysicalComposition + materialComposition: + Steel: 30 + Plastic: 30 + - type: StaticPrice + price: 15 diff --git a/Resources/Prototypes/_ADT/Entities/Objects/Power/megapowercells.yml b/Resources/Prototypes/_ADT/Entities/Objects/Power/megapowercells.yml new file mode 100644 index 00000000000..023ef074e9a --- /dev/null +++ b/Resources/Prototypes/_ADT/Entities/Objects/Power/megapowercells.yml @@ -0,0 +1,203 @@ +- type: entity + id: ADTBaseMegaCell + abstract: true + parent: BaseItem + components: + - type: Item + storedRotation: -90 + - type: Battery + pricePerJoule: 0.15 + - type: PowerCell + - type: Explosive + explosionType: HardBomb + maxIntensity: 2500 + intensitySlope: 1.5 + totalIntensity: 400 + - type: Sprite + sprite: _ADT/Objects/Devices/megacells.rsi + - type: SolutionContainerManager + solutions: + battery: + maxVol: 5 + - type: InjectableSolution + solution: battery + - type: DrawableSolution + solution: battery + - type: Extractable + juiceSolution: + reagents: + - ReagentId: Gold + Quantity: 15 + - type: Tag + tags: + - ADTMegaCell + - PowerCell + - type: Appearance + - type: PowerCellVisuals + - type: Riggable + +- type: entity + name: megacell small + description: damnation + id: ADTMegaCellSmall + suffix: Full + parent: ADTBaseMegaCell + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + - type: Battery + maxCharge: 62500 + startingCharge: 62500 + - type: Tag + tags: + - ADTMegaCell + +- type: entity + id: ADTMegaCellSmallPrinted + suffix: Empty + parent: ADTMegaCellSmall + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + visible: false + - type: Battery + maxCharge: 62500 + startingCharge: 0 + +- type: entity + name: megacell medium + description: damnation + id: ADTMegaCellMedium + suffix: Full + parent: ADTBaseMegaCell + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: m_megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + - type: Battery + maxCharge: 125000 + startingCharge: 125000 + +- type: entity + id: ADTMegaCellMediumPrinted + suffix: Empty + parent: ADTMegaCellMedium + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: m_megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + visible: false + - type: Battery + maxCharge: 125000 + startingCharge: 0 + +- type: entity + name: megacell high + description: damnation + id: ADTMegaCellHigh + suffix: Full + parent: ADTBaseMegaCell + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: h_megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + - type: Battery + maxCharge: 187500 + startingCharge: 187500 + +- type: entity + id: ADTMegaCellHighPrinted + suffix: Empty + parent: ADTMegaCellHigh + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: h_megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + visible: false + - type: Battery + maxCharge: 187500 + startingCharge: 0 + +- type: entity + name: megacell hyper + description: damnation + id: ADTMegaCellHyper + suffix: Full + parent: ADTBaseMegaCell + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: hyp_megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + - type: Battery + maxCharge: 250000 + startingCharge: 250000 + +- type: entity + id: ADTMegaCellHyperPrinted + suffix: Empty + parent: ADTMegaCellHyper + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: hyp_megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + visible: false + - type: Battery + maxCharge: 250000 + startingCharge: 0 + +- type: entity + name: infinite power cell + description: damnation + id: ADTMegaCellInfinite + parent: ADTBaseMegaCell + components: + - type: Sprite + layers: + - map: [ "enum.PowerCellVisualLayers.Base" ] + state: inf_megacell + - map: [ "enum.PowerCellVisualLayers.Unshaded" ] + state: o2 + shader: unshaded + - type: StaticPrice + price: 25000 + - type: Battery + maxCharge: 1000000 + startingCharge: 1000000 + pricePerJoule: 0 # Без этого StaticPrice работать не будет, что уж! + - type: BatterySelfRecharger + autoRecharge: true + autoRechargeRate: 100 diff --git a/Resources/Prototypes/_ADT/Entities/Structures/Power/megacharger.yml b/Resources/Prototypes/_ADT/Entities/Structures/Power/megacharger.yml new file mode 100644 index 00000000000..4b98751e777 --- /dev/null +++ b/Resources/Prototypes/_ADT/Entities/Structures/Power/megacharger.yml @@ -0,0 +1,38 @@ +- type: entity + parent: PowerCellRecharger + id: ADTMegaCellRecharger + name: megacell recharger + components: + - type: Sprite + sprite: _ADT/Structures/Power/megacharger.rsi + layers: + - map: ["enum.PowerChargerVisualLayers.Base"] + state: "empty" + - map: ["enum.PowerChargerVisualLayers.Light"] + state: "light-off" + shader: "unshaded" + - state: open + map: ["enum.WiresVisualLayers.MaintenancePanel"] + visible: false + - type: Machine + board: ADTMegaCellRechargerCircuitboard + - type: WiresPanel + - type: GenericVisualizer + visuals: + enum.WiresVisuals.MaintenancePanelState: + enum.WiresVisualLayers.MaintenancePanel: + True: { visible: true } + False: { visible: false } + - type: PowerCellSlot + cellSlotId: charger_slot + - type: Charger + chargeRate: 3000.0 + slotId: charger_slot + - type: ItemSlots + slots: + charger_slot: + ejectOnInteract: true + name: power-cell-slot-component-slot-name-default + whitelist: + tags: + - ADTMegaCell diff --git a/Resources/Prototypes/_ADT/Recipes/Lathes/Packs/engineering.yml b/Resources/Prototypes/_ADT/Recipes/Lathes/Packs/engineering.yml new file mode 100644 index 00000000000..d2c454ffd02 --- /dev/null +++ b/Resources/Prototypes/_ADT/Recipes/Lathes/Packs/engineering.yml @@ -0,0 +1,12 @@ +# - type: latheRecipePack +# id: ADTMegaCellPack +# recipes: +# - ADTMegaCellSmallRecipe +# - ADTMegaCellMediumRecipe +# - ADTMegaCellHighRecipe +# - ADTMegaCellHyperRecipe + +# - type: latheRecipePack +# id: ADTMegaCharger +# recipes: +# - ADTMegaCellRechargerCircuitboardRecipe diff --git a/Resources/Prototypes/_ADT/Recipes/Lathes/electronics.yml b/Resources/Prototypes/_ADT/Recipes/Lathes/electronics.yml new file mode 100644 index 00000000000..bd7f6876aee --- /dev/null +++ b/Resources/Prototypes/_ADT/Recipes/Lathes/electronics.yml @@ -0,0 +1,10 @@ +- type: latheRecipe + parent: BaseGoldCircuitboardRecipe + id: ADTMegaCellRechargerCircuitboardRecipe + result: ADTMegaCellRechargerCircuitboard + completetime: 10 + materials: + Steel: 1500 + Glass: 1000 + Gold: 600 + Silver: 600 diff --git a/Resources/Prototypes/_ADT/Recipes/Lathes/powercells.yml b/Resources/Prototypes/_ADT/Recipes/Lathes/powercells.yml new file mode 100644 index 00000000000..22ed7fb45ae --- /dev/null +++ b/Resources/Prototypes/_ADT/Recipes/Lathes/powercells.yml @@ -0,0 +1,39 @@ +- type: latheRecipe + id: ADTMegaCellSmallRecipe + result: ADTMegaCellSmallPrinted + completetime: 15 + materials: + Steel: 8000 + Glass: 5600 + Gold: 600 + Silver: 600 + +- type: latheRecipe + id: ADTMegaCellMediumRecipe + result: ADTMegaCellMediumPrinted + completetime: 15 + materials: + Steel: 10000 + Glass: 7000 + Gold: 600 + Silver: 600 + +- type: latheRecipe + id: ADTMegaCellHighRecipe + result: ADTMegaCellHighPrinted + completetime: 15 + materials: + Steel: 12000 + Glass: 8400 + Gold: 600 + Silver: 600 + +- type: latheRecipe + id: ADTMegaCellHyperRecipe + result: ADTMegaCellHyperPrinted + completetime: 20 + materials: + Steel: 14000 + Glass: 9800 + Gold: 600 + Silver: 600 diff --git a/Resources/Prototypes/_ADT/Research/industrial.yml b/Resources/Prototypes/_ADT/Research/industrial.yml new file mode 100644 index 00000000000..b672a4b0038 --- /dev/null +++ b/Resources/Prototypes/_ADT/Research/industrial.yml @@ -0,0 +1,32 @@ +# - type: technology +# id: ADTMegaCells +# name: research-technology-basemegacells +# icon: +# sprite: _ADT/Objects/Devices/megacells.rsi +# state: megacell +# discipline: Industrial +# tier: 2 +# cost: 15000 +# recipeUnlocks: +# - ADTMegaCellRechargerCircuitboardRecipe +# - ADTMegaCellSmallRecipe +# - ADTMegaCellMediumRecipe +# position: 1,-8 # LP Edit +# technologyPrerequisites: +# - AdvancedPowercells + +# - type: technology +# id: ADTMegaCellsAdvanced +# name: research-technology-advancedmegacells +# icon: +# sprite: _ADT/Objects/Devices/megacells.rsi +# state: hyp_megacell +# discipline: Industrial +# tier: 3 +# cost: 35000 +# recipeUnlocks: +# - ADTMegaCellHighRecipe +# - ADTMegaCellHyperRecipe +# position: 1,-10 # LP Edit +# technologyPrerequisites: +# - LPPInducer # LP Edit diff --git a/Resources/Prototypes/_ADT/tags.yml b/Resources/Prototypes/_ADT/tags.yml new file mode 100644 index 00000000000..0c1d0f47ecc --- /dev/null +++ b/Resources/Prototypes/_ADT/tags.yml @@ -0,0 +1,2 @@ +- type: Tag + id: ADTMegaCell diff --git a/Resources/Prototypes/_LP/Entities/Objects/Tools/inducer.yml b/Resources/Prototypes/_LP/Entities/Objects/Tools/inducer.yml new file mode 100644 index 00000000000..9378538e072 --- /dev/null +++ b/Resources/Prototypes/_LP/Entities/Objects/Tools/inducer.yml @@ -0,0 +1,91 @@ +- type: entity + parent: BaseItem + id: LPPEngiInducer + name: inducer + description: A device for wirelessly transferring energy from a battery to other devices. + suffix: Empty, Engineering + components: + - type: Sprite + sprite: _LP/Objects/Tools/inducer-engi.rsi + state: icon + - type: Item + size: Small + - type: Inducer + availableTransferRates: + - 7500 + - 10000 + - 12000 + - 15000 + transferRate: 7500 + transferDelay: 2.5 + maxDistance: 3 + - type: PowerCellSlot + cellSlotId: inducer_power_cell_slot + - type: ContainerContainer + containers: + inducer_power_cell_slot: !type:ContainerSlot + - type: ItemSlots + slots: + inducer_power_cell_slot: + name: power-cell-slot-component-slot-name-default + insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg + ejectSound: /Audio/Weapons/Guns/MagOut/batrifle_magout.ogg + whitelist: + tags: + - ADTMegaCell + - type: ItemMapper + mapLayers: + inducer-bat: + whitelist: + tags: + - ADTMegaCell + sprite: _LP/Objects/Tools/inducer-engi.rsi + - type: Appearance + +- type: entity + parent: LPPEngiInducer + id: LPPEngiInducerBattery + name: inducer + description: A device for wirelessly transferring energy from a battery to other devices. + suffix: Battery, Engineering + components: + - type: ItemSlots + slots: + inducer_power_cell_slot: + startingItem: ADTMegaCellMedium + +- type: entity + parent: LPPEngiInducer + id: LPPRNDInducer + name: inducer + description: A device for wirelessly transferring energy from a battery to other devices. + suffix: Empty, RND + components: + - type: Sprite + sprite: _LP/Objects/Tools/inducer-rnd.rsi + state: icon + - type: Inducer + availableTransferRates: + - 3750 + transferRate: 3750 + transferDelay: 1 + maxDistance: 6 + - type: ItemMapper + mapLayers: + inducer-bat: + whitelist: + tags: + - ADTMegaCell + sprite: _LP/Objects/Tools/inducer-rnd.rsi + +- type: entity + parent: LPPRNDInducer + id: LPPRNDInducerBattery + name: inducer + description: A device for wirelessly transferring energy from a battery to other devices. + suffix: Battery, RND + components: + - type: ItemSlots + slots: + inducer_power_cell_slot: + startingItem: ADTMegaCellMedium diff --git a/Resources/Prototypes/_LP/Recipes/Lathes/Packs/engineering.yml b/Resources/Prototypes/_LP/Recipes/Lathes/Packs/engineering.yml new file mode 100644 index 00000000000..7c6fb1e5d2d --- /dev/null +++ b/Resources/Prototypes/_LP/Recipes/Lathes/Packs/engineering.yml @@ -0,0 +1,15 @@ +# - type: latheRecipePack +# id: LPPRNDInducer +# recipes: +# - LPPRNDInducerRecipe + +# - type: latheRecipePack +# id: LPPEngiInducer +# recipes: +# - LPPEngiInducerRecipe + +# - type: latheRecipePack +# id: LPPInducerBoth +# recipes: +# - LPPEngiInducerRecipe +# - LPPRNDInducerRecipe diff --git a/Resources/Prototypes/_LP/Recipes/Lathes/tools.yml b/Resources/Prototypes/_LP/Recipes/Lathes/tools.yml new file mode 100644 index 00000000000..32bff927ae5 --- /dev/null +++ b/Resources/Prototypes/_LP/Recipes/Lathes/tools.yml @@ -0,0 +1,15 @@ +- type: latheRecipe + id: LPPRNDInducerRecipe + result: LPPRNDInducer + completetime: 8 + materials: + Steel: 1000 + Plastic: 100 + +- type: latheRecipe + id: LPPEngiInducerRecipe + result: LPPEngiInducer + completetime: 8 + materials: + Steel: 1000 + Plastic: 100 diff --git a/Resources/Prototypes/_LP/Research/industrial.yml b/Resources/Prototypes/_LP/Research/industrial.yml new file mode 100644 index 00000000000..9e84584f25b --- /dev/null +++ b/Resources/Prototypes/_LP/Research/industrial.yml @@ -0,0 +1,15 @@ +# - type: technology +# id: LPPInducer +# name: research-technology-inducer +# icon: +# sprite: _LP/Objects/Tools/inducer-rnd.rsi +# state: icon +# discipline: Industrial +# tier: 2 +# cost: 10000 +# recipeUnlocks: +# - LPPRNDInducerRecipe +# - LPPEngiInducerRecipe +# position: 1,-9 +# technologyPrerequisites: +# - ADTMegaCells diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/h_megacell.png b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/h_megacell.png new file mode 100644 index 00000000000..aeb5c4d44da Binary files /dev/null and b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/h_megacell.png differ diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/hyp_megacell.png b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/hyp_megacell.png new file mode 100644 index 00000000000..2387e41b3ff Binary files /dev/null and b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/hyp_megacell.png differ diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/inf_megacell.png b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/inf_megacell.png new file mode 100644 index 00000000000..8d816afa125 Binary files /dev/null and b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/inf_megacell.png differ diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/m_megacell.png b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/m_megacell.png new file mode 100644 index 00000000000..e95ca9cd391 Binary files /dev/null and b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/m_megacell.png differ diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/megacell.png b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/megacell.png new file mode 100644 index 00000000000..6182c85eef9 Binary files /dev/null and b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/megacell.png differ diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/meta.json b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/meta.json new file mode 100644 index 00000000000..d22708d9d6f --- /dev/null +++ b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/meta.json @@ -0,0 +1,35 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tg station at commit c76efcfba42bfdbee733a48aa289a6483cbe926a and commit dfab3c542b13dc006b6e660e0be39be105d7beee.", + "states": [ + { + "name": "megacell" + }, + { + "name": "m_megacell" + }, + { + "name": "h_megacell" + }, + { + "name": "hyp_megacell" + }, + { + "name": "inf_megacell" + }, + { + "name": "o0" + }, + { + "name": "o1" + }, + { + "name": "o2" + } + ] +} diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o0.png b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o0.png new file mode 100644 index 00000000000..8ea8ce0ab14 Binary files /dev/null and b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o0.png differ diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o1.png b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o1.png new file mode 100644 index 00000000000..9d03123cf60 Binary files /dev/null and b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o1.png differ diff --git a/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o2.png b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o2.png new file mode 100644 index 00000000000..7c84d428797 Binary files /dev/null and b/Resources/Textures/_ADT/Objects/Devices/megacells.rsi/o2.png differ diff --git a/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/empty.png b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/empty.png new file mode 100644 index 00000000000..1da76ce9c4a Binary files /dev/null and b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/empty.png differ diff --git a/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/full.png b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/full.png new file mode 100644 index 00000000000..141cb60cbae Binary files /dev/null and b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/full.png differ diff --git a/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-charged.png b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-charged.png new file mode 100644 index 00000000000..0cf87abe290 Binary files /dev/null and b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-charged.png differ diff --git a/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-charging.png b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-charging.png new file mode 100644 index 00000000000..c50cc4f55d8 Binary files /dev/null and b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-charging.png differ diff --git a/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-empty.png b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-empty.png new file mode 100644 index 00000000000..919d1cb4817 Binary files /dev/null and b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-empty.png differ diff --git a/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-off.png b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-off.png new file mode 100644 index 00000000000..d5bd292faab Binary files /dev/null and b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/light-off.png differ diff --git a/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/meta.json b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/meta.json new file mode 100644 index 00000000000..2072eb88f8a --- /dev/null +++ b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/meta.json @@ -0,0 +1,52 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Made by StasNeStasNe, commit 33db16769254c263f989822060436398a6bb0734, ADT", + "states": [ + { + "name": "light-off" + }, + { + "name": "empty" + }, + { + "name": "full" + }, + { + "name": "open" + }, + { + "name": "light-charging", + "delays": [ + [ + 0.3, + 0.3, + 0.3, + 0.3 + ] + ] + }, + { + "name": "light-charged", + "delays": [ + [ + 0.6, + 0.6 + ] + ] + }, + { + "name": "light-empty", + "delays": [ + [ + 0.8, + 0.8 + ] + ] + } + ] +} diff --git a/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/open.png b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/open.png new file mode 100644 index 00000000000..189cf150d82 Binary files /dev/null and b/Resources/Textures/_ADT/Structures/Power/megacharger.rsi/open.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/icon.png b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/icon.png new file mode 100644 index 00000000000..ad970ef86ab Binary files /dev/null and b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/icon.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inducer-bat.png b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inducer-bat.png new file mode 100644 index 00000000000..b56cd3f8da4 Binary files /dev/null and b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inducer-bat.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inhand-left.png b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inhand-left.png new file mode 100644 index 00000000000..4ee7019e8d1 Binary files /dev/null and b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inhand-left.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inhand-right.png b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inhand-right.png new file mode 100644 index 00000000000..4803ac6ae42 Binary files /dev/null and b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/inhand-right.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/meta.json b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/meta.json new file mode 100644 index 00000000000..09ed964a0a0 --- /dev/null +++ b/Resources/Textures/_LP/Objects/Tools/inducer-engi.rsi/meta.json @@ -0,0 +1,27 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/tgstation/tgstation.", + "size": + { + "x": 32, + "y": 32 + }, + "states": + [ + { + "name": "icon" + }, + { + "name": "inducer-bat" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/icon.png b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/icon.png new file mode 100644 index 00000000000..feff2422c3b Binary files /dev/null and b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/icon.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inducer-bat.png b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inducer-bat.png new file mode 100644 index 00000000000..b56cd3f8da4 Binary files /dev/null and b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inducer-bat.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inhand-left.png b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inhand-left.png new file mode 100644 index 00000000000..a9b41ecf5f5 Binary files /dev/null and b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inhand-left.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inhand-right.png b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inhand-right.png new file mode 100644 index 00000000000..8d701579e1b Binary files /dev/null and b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/inhand-right.png differ diff --git a/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/meta.json b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/meta.json new file mode 100644 index 00000000000..09ed964a0a0 --- /dev/null +++ b/Resources/Textures/_LP/Objects/Tools/inducer-rnd.rsi/meta.json @@ -0,0 +1,27 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/tgstation/tgstation.", + "size": + { + "x": 32, + "y": 32 + }, + "states": + [ + { + "name": "icon" + }, + { + "name": "inducer-bat" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +}