-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
плазменные резаки, ретекстур моргов (#463)
**Проверки** <!-- Выполнение всех следующих действий, если это приемлемо для вида изменений сильно ускорит разбор вашего PR --> - [x] PR полностью завершён и мне не нужна помощь чтобы его закончить. - [x] Я внимательно просмотрел все свои изменения и багов в них не нашёл. - [x] Я запускал локальный сервер со своими изменениями и всё протестировал. - [x] Я добавил скриншот/видео демонстрации PR в игре, **или** этот PR этого не требует. **Изменения** <!-- Здесь вы можете написать список изменений, который будет автоматически добавлен в игру, когда ваш PR будет принят. В журнал изменений следует помещать только то, что действительно важно игрокам. В списке изменений тип значка не является часть предложения, поэтому явно указывайте - Добавлен, Удалён, Изменён. плохо: - add: Новый инструмент для инженеров хорошо: - add: Добавлен новый инструмент для инженеров Вы можете указать своё имя после символа 🆑 именно оно будет отображаться в журнале изменений (иначе будет использоваться ваше имя на GitHub) Например: 🆑 Ian --> 🆑 Ratyyy - add: С секторов лун ару доставили технологии плазменных резаков! - tweak: Технология создания моргов потерпела дефект в чертеже. Работники фабрики моргов не заметили изменений и продолжили создавать морги с дефектными корпусами. - tweak: НТ сменили дизайн крематориев в угоду практичности.
- Loading branch information
Showing
35 changed files
with
403 additions
and
3 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
Content.Server/ADT/PlasmaCutter/BatteryRechargeComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
///TAKEN FROM: https://github.com/Workbench-Team/space-station-14/pull/327 | ||
|
||
namespace Content.Server.AruMoon.Plasmacutter; | ||
|
||
[RegisterComponent] | ||
public sealed partial class BatteryRechargeComponent : Component | ||
{ | ||
|
||
/// <summary> | ||
/// NOT (material.Amount * Multiplier) | ||
/// This is (material.materialComposition * Multiplier) | ||
/// 1 plasma sheet = 100 material units | ||
/// 1 plasma ore = 500 material units | ||
/// </summary> | ||
/// | ||
[DataField("multiplier"), ViewVariables(VVAccess.ReadWrite)] | ||
public float Multiplier = 1.0f; | ||
|
||
|
||
/// <summary> | ||
/// Max material storage limit | ||
/// 7500 = 15 plasma ore | ||
/// </summary> | ||
[DataField("storageMaxCapacity"), ViewVariables(VVAccess.ReadWrite)] | ||
public int StorageMaxCapacity = 7500; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
///TAKEN FROM: https://github.com/Workbench-Team/space-station-14/pull/327 | ||
|
||
using Content.Server.Materials; | ||
using Content.Shared.Materials; | ||
using Content.Server.Power.EntitySystems; | ||
using Content.Server.Power.Components; | ||
|
||
namespace Content.Server.AruMoon.Plasmacutter | ||
{ | ||
|
||
/// <summary> | ||
/// This CODE FULL OF SHICODE!!! | ||
/// <see cref="BatteryRechargeComponent"/> | ||
/// </summary> | ||
public sealed class BatteryRechargeSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly MaterialStorageSystem _materialStorage = default!; | ||
[Dependency] private readonly BatterySystem _batterySystem = default!; | ||
|
||
|
||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<MaterialStorageComponent, MaterialEntityInsertedEvent>(OnMaterialAmountChanged); | ||
SubscribeLocalEvent<BatteryRechargeComponent, ChargeChangedEvent>(OnChargeChanged); | ||
} | ||
|
||
private void OnMaterialAmountChanged(EntityUid uid, MaterialStorageComponent component, MaterialEntityInsertedEvent args) | ||
{ | ||
if (component.MaterialWhiteList != null) | ||
foreach (var fuelType in component.MaterialWhiteList) | ||
{ | ||
FuelAddCharge(uid, fuelType); | ||
} | ||
} | ||
|
||
private void OnChargeChanged(EntityUid uid, BatteryRechargeComponent component, ChargeChangedEvent args) | ||
{ | ||
ChangeStorageLimit(uid, component.StorageMaxCapacity); | ||
} | ||
|
||
private void ChangeStorageLimit( | ||
EntityUid uid, | ||
int value, | ||
BatteryComponent? battery = null) | ||
{ | ||
if (!Resolve(uid, ref battery)) | ||
return; | ||
if (battery.CurrentCharge == battery.MaxCharge) | ||
value = 0; | ||
_materialStorage.TryChangeStorageLimit(uid, value); | ||
} | ||
|
||
private void FuelAddCharge( | ||
EntityUid uid, | ||
string fuelType, | ||
BatteryRechargeComponent? recharge = null) | ||
{ | ||
if (!Resolve(uid, ref recharge)) | ||
return; | ||
|
||
var availableMaterial = _materialStorage.GetMaterialAmount(uid, fuelType); | ||
var chargePerMaterial = availableMaterial * recharge.Multiplier; | ||
|
||
if (_materialStorage.TryChangeMaterialAmount(uid, fuelType, -availableMaterial)) | ||
{ | ||
_batterySystem.TryAddCharge(uid, chargePerMaterial); | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
research-technology-salvage-weapons-adv = Продвинутое оружие утилизаторов |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- type: latheRecipe | ||
id: ADTWeaponCutter | ||
result: ADTWeaponCutter | ||
completetime: 10 | ||
materials: | ||
Steel: 1100 | ||
Glass: 200 | ||
Gold: 300 | ||
Plasma: 800 | ||
|
||
- type: latheRecipe | ||
id: ADTWeaponCutterAdv | ||
result: ADTWeaponCutterAdv | ||
completetime: 10 | ||
materials: | ||
Steel: 1700 | ||
Glass: 200 | ||
Gold: 300 | ||
Plasma: 900 | ||
Diamond: 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- type: technology | ||
id: AdvSalvageWeapons | ||
name: research-technology-salvage-weapons-adv | ||
icon: | ||
sprite: ADT/Objects/Weapons/Guns/Battery/cutteradv.rsi | ||
state: icon | ||
discipline: Arsenal | ||
tier: 2 | ||
cost: 10000 | ||
recipeUnlocks: | ||
- ADTWeaponCutterAdv | ||
technologyPrerequisites: | ||
- SalvageWeapons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.04 KB
Resources/Textures/ADT/Objects/Weapons/Guns/Battery/cutter.rsi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.04 KB
Resources/Textures/ADT/Objects/Weapons/Guns/Battery/cutter.rsi/inhand-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.03 KB
Resources/Textures/ADT/Objects/Weapons/Guns/Battery/cutter.rsi/inhand-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
Resources/Textures/ADT/Objects/Weapons/Guns/Battery/cutter.rsi/meta.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"version": 1, | ||
"license": "CC-BY-SA-3.0", | ||
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/2b8b045d5a237147d736e3ba3c77c8cc5fb66cb5", | ||
"size": { | ||
"x": 32, | ||
"y": 32 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "icon" | ||
}, | ||
{ | ||
"name": "inhand-left", | ||
"directions": 4 | ||
}, | ||
{ | ||
"name": "inhand-right", | ||
"directions": 4 | ||
} | ||
] | ||
} |
Binary file added
BIN
+895 Bytes
Resources/Textures/ADT/Objects/Weapons/Guns/Battery/cutteradv.rsi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.03 KB
Resources/Textures/ADT/Objects/Weapons/Guns/Battery/cutteradv.rsi/inhand-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.04 KB
Resources/Textures/ADT/Objects/Weapons/Guns/Battery/cutteradv.rsi/inhand-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.