Твики (#491)

* Economy additions

* Tweak implant cooldowns

* Cult stuff

* Random appearance aspect nuke ops fix

* Auto shuttle enable on round end

* Holy water threshold
This commit is contained in:
Aviu00
2023-10-17 00:52:02 +09:00
committed by Aviu00
parent 007cf13a71
commit 0962aa2978
12 changed files with 68 additions and 22 deletions

View File

@@ -12,7 +12,7 @@
<Label Name="StatusLabel"/>
<SliderIntInput Name="WithdrawSlider"/>
<BoxContainer HorizontalExpand="True" VerticalExpand="True" VerticalAlignment="Bottom" Orientation="Horizontal">
<LineEdit Name="PinLineEdit" HorizontalExpand="True" Text="Enter PIN"/>
<LineEdit Name="PinLineEdit" HorizontalExpand="True" Text="{Loc 'atm-ui-enter-pin'}"/>
<Button Name="WithdrawButton" Text="{Loc 'store-ui-default-withdraw-text'}"/>
</BoxContainer>
</BoxContainer>

View File

@@ -40,6 +40,7 @@ public sealed partial class AtmWindow : DefaultWindow
StatusLabel.Text = cast.InfoMessage;
BalanceLabel.Visible = false;
Divider.Visible = false;
StatusLabel.Visible = true;
WithdrawSlider.Visible = false;
PinLineEdit.Visible = false;
WithdrawButton.Visible = false;
@@ -50,13 +51,25 @@ public sealed partial class AtmWindow : DefaultWindow
BalanceLabel.Text = Loc.GetString("atm-ui-balance", ("balance", cast.AccountBalance));
BalanceLabel.Visible = true;
Divider.Visible = true;
WithdrawSlider.Visible = true;
PinLineEdit.Visible = true;
WithdrawButton.Visible = true;
WithdrawSlider.MaxValue = cast.AccountBalance;
WithdrawSlider.Value = Math.Min(WithdrawSlider.Value, cast.AccountBalance);
if (cast.AccountBalance > 0)
{
Divider.Visible = true;
StatusLabel.Visible = true;
WithdrawSlider.Visible = true;
PinLineEdit.Visible = true;
WithdrawButton.Visible = true;
WithdrawSlider.MaxValue = cast.AccountBalance;
WithdrawSlider.Value = Math.Min(WithdrawSlider.Value, cast.AccountBalance);
return;
}
Divider.Visible = false;
StatusLabel.Visible = false;
WithdrawSlider.Visible = false;
PinLineEdit.Visible = false;
WithdrawButton.Visible = false;
}
protected override void FrameUpdate(FrameEventArgs args)

View File

@@ -459,6 +459,7 @@ namespace Content.Server.GameTicking
ResettingCleanup();
IncrementRoundNumber();
SendRoundStartingDiscordMessage();
EnableShuttleCall(); // WD
if (!LobbyEnabled)
{
@@ -572,6 +573,15 @@ namespace Content.Server.GameTicking
_utkaSocketWrapper.SendMessageToAll(utkaRoundStatusEvent);
}
private void EnableShuttleCall()
{
if (_configurationManager.GetCVar(WhiteCVars.EmergencyShuttleCallEnabled))
return;
_configurationManager.SetCVar(WhiteCVars.EmergencyShuttleCallEnabled, true);
_chatManager.SendAdminAnnouncement("Вызов шаттла включен.");
}
//WD-EDIT
private void UpdateRoundFlow(float frameTime)

View File

@@ -164,7 +164,10 @@ namespace Content.Server.VendingMachines
private void OnEmagged(EntityUid uid, VendingMachineComponent component, ref GotEmaggedEvent args)
{
// only emag if there are emag-only items
args.Handled = component.EmaggedInventory.Count > 0;
args.Handled = component.EmaggedInventory.Count > 0 || component.PriceMultiplier > 0; // WD EDIT START
component.PriceMultiplier = 0;
UpdateVendingMachineInterfaceState(uid, component);
// WD EDIT END
}
private void OnDamage(EntityUid uid, VendingMachineComponent component, DamageChangedEvent args)

View File

@@ -1,6 +1,9 @@
using System.Linq;
using Content.Server.Stack;
using Content.Server.Store.Components;
using Content.Shared.Destructible;
using Content.Shared.Emag.Components;
using Content.Shared.Emag.Systems;
using Content.Shared.Interaction;
using Content.Shared.Popups;
using Content.Shared.Stacks;
@@ -32,6 +35,12 @@ public sealed class ATMSystem : SharedATMSystem
SubscribeLocalEvent<ATMComponent, ATMRequestWithdrawMessage>(OnWithdrawRequest);
SubscribeLocalEvent<ATMComponent, InteractUsingEvent>(OnInteractUsing);
SubscribeLocalEvent<ATMComponent, ComponentStartup>(OnComponentStartup);
SubscribeLocalEvent<ATMComponent, GotEmaggedEvent>(OnEmag);
}
private void OnEmag(EntityUid uid, ATMComponent component, ref GotEmaggedEvent args)
{
args.Handled = true;
}
private void OnComponentStartup(EntityUid uid, ATMComponent component, ComponentStartup args)
@@ -89,7 +98,8 @@ public sealed class ATMSystem : SharedATMSystem
return;
}
if (!_bankCardSystem.TryGetAccount(bankCard.BankAccountId.Value, out var account) || account.AccountPin != args.Pin)
if (!_bankCardSystem.TryGetAccount(bankCard.BankAccountId.Value, out var account) ||
account.AccountPin != args.Pin && !HasComp<EmaggedComponent>(uid))
{
_popupSystem.PopupEntity(Loc.GetString("atm-wrong-pin"), uid);
_audioSystem.PlayPvs(component.SoundDeny, uid);

View File

@@ -26,7 +26,7 @@ public sealed class EftposSystem : EntitySystem
private void OnInteractUsing(EntityUid uid, EftposComponent component, InteractUsingEvent args)
{
if (component.BankAccountId == null || !TryComp(args.Used, out BankCardComponent? bankCard) ||
bankCard.BankAccountId == component.BankAccountId || component.Amount <= 0)
bankCard.BankAccountId == component.BankAccountId || component.Amount <= 0 || bankCard.CommandBudgetCard)
return;
if (_bankCardSystem.TryChangeBalance(bankCard.BankAccountId!.Value, -component.Amount) &&

View File

@@ -1,7 +1,10 @@
using System.Linq;
using Content.Server.Access.Systems;
using Content.Server.Humanoid;
using Content.Server.IdentityManagement;
using Content.Server.Mind.Components;
using Content.Server.PDA;
using Content.Server.Roles;
using Content.Shared.Access.Components;
using Content.Shared.Inventory;
using Content.Shared.PDA;
@@ -31,6 +34,10 @@ public sealed class RandomHumanSystem : EntitySystem
_humanoid.LoadProfile(uid, newProfile);
if (TryComp(uid, out MindContainerComponent? mindContainer) && mindContainer.HasMind &&
mindContainer.Mind.Roles.OfType<NukeopsRole>().Any())
return;
_metaData.SetEntityName(uid, newProfile.Name);
if (!_inventorySystem.TryGetSlotEntity(uid, "id", out var idUid))

View File

@@ -0,0 +1 @@
reagent-effect-guidebook-deconvert-cultist = Деконвертирует культиста

View File

@@ -3,6 +3,7 @@ atm-wrong-pin = Неверный PIN-код.
atm-not-enough-cash = Недостаточно средств.
atm-ui-enter-pin = Введите PIN
atm-ui-select-withdraw-amount = Выберите сумму вывода.
atm-ui-insert-card = Вставьте карту.
atm-ui-balance = Баланс: { $balance } ¢

View File

@@ -114,8 +114,7 @@
noSpawn: true
components:
- type: InstantAction
charges: 3
useDelay: 5
useDelay: 40
itemIconStyle: BigAction
priority: -20
icon:

View File

@@ -5,7 +5,7 @@
noSpawn: true
components:
- type: InstantAction
useDelay: 20
useDelay: 40
itemIconStyle: BigAction
priority: -20
icon:

View File

@@ -44,15 +44,17 @@
enabled: false
sound:
path: /Audio/Ambience/Objects/vending_machine_hum.ogg
# - type: Destructible
# thresholds:
# - trigger:
# !type:DamageTrigger
# damage: 100
# behaviors:
# - !type:DoActsBehavior
# acts: ["Breakage"]
# - !type:EjectVendorItems
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- type: ActivatableUI
key: enum.ATMUiKey.Key
singleUser: true