Playtest polishing (#383)

* fix predicting sharpening

* finish shadow step

* tweak ice dagger

* shadow grab test

* fireball spell

* ice shards spell

* battle royale crates

* loot tables

* remove expedition ship

* dev update

* br map update

* spells tweak

* tips update

* some fixes

* biome forest spawner

* give keys to orgs

* mobs and aura spawners

* expedition update: goal, new ship, new map

* fix doors layers

* add new map proto

* translate keys

* Update crates.yml

* Update PostMapInitTest.cs

* fix spawning on expedition ship

* Fuck you, Randy. Remove nails

* fix lock systems

* localize tips

* some tweaks

* update ship, remove shrooms.

* fixes

* Update StationSystem.cs

* Revert "Update StationSystem.cs"

This reverts commit f632241324.

* Update expedition_test.yml
This commit is contained in:
Ed
2024-08-05 15:22:14 +03:00
committed by GitHub
parent 9a07a9a052
commit 1f4b7f68bf
76 changed files with 95407 additions and 765 deletions

View File

@@ -13,7 +13,7 @@ namespace Content.Shared.CCVar
#region CP14
public static readonly CVarDef<float> CP14ExpeditionArrivalTime =
CVarDef.Create("cp14.arrival_time", 60f, CVar.SERVERONLY);
CVarDef.Create("cp14.arrival_time", 180f, CVar.SERVERONLY);
#endregion
@@ -511,7 +511,7 @@ namespace Content.Shared.CCVar
/// The dataset prototype to use when selecting a random tip.
/// </summary>
public static readonly CVarDef<string> TipsDataset =
CVarDef.Create("tips.dataset", "Tips");
CVarDef.Create("tips.dataset", "CP14Tips");
/// <summary>
/// The number of seconds between each tip being displayed when the round is not actively going

View File

@@ -26,9 +26,8 @@ namespace Content.Shared.Localizations
public void Initialize()
{
var culture = new CultureInfo(Culture);
// Uncomment for Ru localization
_loc.LoadCulture(culture);
// Uncomment for Ru localization
var fallbackCulture = new CultureInfo("en-US");
_loc.LoadCulture(fallbackCulture);
_loc.SetFallbackCluture(fallbackCulture);

View File

@@ -109,17 +109,14 @@ public sealed class LockSystem : EntitySystem
//CrystallPunk Lock System Adapt Start
if (lockComp.LockSlotId != null && _lockCp14.TryGetLockFromSlot(uid, out var lockEnt))
{
args.PushText(Loc.GetString("cp-lock-examine-lock-slot", ("lock", MetaData(lockEnt.Value).EntityName)));
args.PushText(Loc.GetString("cp14-lock-examine-lock-slot", ("lock", MetaData(lockEnt.Value).EntityName)));
args.PushMarkup(Loc.GetString(lockComp.Locked
? "lock-comp-on-examined-is-locked"
: "lock-comp-on-examined-is-unlocked",
("entityName", Identity.Name(uid, EntityManager))));
if (lockEnt.Value.Comp.LockpickeddFailMarkup)
args.PushMarkup(Loc.GetString("cp-lock-examine-lock-lockpicked", ("lock", MetaData(lockEnt.Value).EntityName)));
} else
{
args.PushText(Loc.GetString("cp-lock-examine-lock-null"));
args.PushMarkup(Loc.GetString("cp14-lock-examine-lock-lockpicked", ("lock", MetaData(lockEnt.Value).EntityName)));
}
//CrystallPunk Lock System Adapt End
}
@@ -158,7 +155,7 @@ public sealed class LockSystem : EntitySystem
_sharedPopupSystem.PopupClient(Loc.GetString("lock-comp-do-lock-success",
("entityName", Identity.Name(uid, EntityManager))), uid, user);
_audio.PlayPredicted(lockComp.LockSound, uid, user);
_audio.PlayPvs(lockComp.LockSound, uid);
lockComp.Locked = true;
_appearanceSystem.SetData(uid, LockVisuals.Locked, true);
@@ -189,7 +186,7 @@ public sealed class LockSystem : EntitySystem
("entityName", Identity.Name(uid, EntityManager))), uid, user.Value);
}
_audio.PlayPredicted(lockComp.UnlockSound, uid, user);
_audio.PlayPvs(lockComp.UnlockSound, uid);
lockComp.Locked = false;
_appearanceSystem.SetData(uid, LockVisuals.Locked, false);
@@ -309,7 +306,7 @@ public sealed class LockSystem : EntitySystem
if (!component.Locked || !component.BreakOnEmag)
return;
_audio.PlayPredicted(component.UnlockSound, uid, args.UserUid);
_audio.PlayPvs(component.UnlockSound, uid);
component.Locked = false;
_appearanceSystem.SetData(uid, LockVisuals.Locked, false);

View File

@@ -28,7 +28,6 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
private const int DepthComplexity = 2; //TODO - fix this constant duplication from KeyholeGenerationSystem.cs
public override void Initialize()
{
base.Initialize();
@@ -54,7 +53,6 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
if (!TryComp<StorageComponent>(keyring, out var storageComp))
return;
if (TryComp<LockComponent>(args.Target, out var lockComp) &&
TryGetLockFromSlot(args.Target.Value, out var lockEnt))
{
@@ -71,7 +69,7 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
args.Handled = true;
return;
}
_popup.PopupEntity(Loc.GetString("cp-lock-keyring-use-nofit"), args.Target.Value, args.User);
_popup.PopupEntity(Loc.GetString("cp14-lock-keyring-use-nofit"), args.Target.Value, args.User);
}
}
@@ -117,10 +115,11 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
{
TryHackDoorElement(user, target, lockpick, lockItemComp, lockComp, height);
},
Text = Loc.GetString("cp-lock-verb-lockpick-use-text") + $" {height}",
Message = Loc.GetString("cp-lock-verb-lockpick-use-message"),
Text = Loc.GetString("cp14-lock-verb-lockpick-use-text") + $" {height}",
Message = Loc.GetString("cp14-lock-verb-lockpick-use-message"),
Category = VerbCategory.Lockpick,
Priority = height,
CloseMenu = false,
};
args.Verbs.Add(verb);
@@ -141,19 +140,19 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
if (lockComp.Locked)
{
_lock.TryUnlock(target, user, lockComp);
_popup.PopupEntity(Loc.GetString("cp-lock-unlock-lock", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-unlock-lock", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
lockEnt.LockpickStatus = 0;
return true;
}
else
{
_lock.TryLock(target, user, lockComp);
_popup.PopupEntity(Loc.GetString("cp-lock-lock-lock", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-lock-lock", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
lockEnt.LockpickStatus = 0;
return true;
}
}
_popup.PopupEntity(Loc.GetString("cp-lock-lockpick-success"), target, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-lockpick-success"), target, user);
return true;
}
else //Fail
@@ -164,16 +163,16 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
lockpick.Comp.Health--;
if (lockpick.Comp.Health > 0)
{
_popup.PopupEntity(Loc.GetString("cp-lock-lockpick-failed-damage", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-lockpick-failed-damage", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
} else
{
_popup.PopupEntity(Loc.GetString("cp-lock-lockpick-failed-break", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-lockpick-failed-break", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
QueueDel(lockpick);
}
}
else
{
_popup.PopupEntity(Loc.GetString("cp-lock-lockpick-failed", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-lockpick-failed", ("lock", MetaData(lockEnt.Owner).EntityName)), target, user);
}
lockEnt.LockpickeddFailMarkup = true;
lockEnt.LockpickStatus = 0;
@@ -205,8 +204,8 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
TryUseKeyOnLock(user, target, key, new Entity<CP14LockComponent>(target, lockItemComp));
},
IconEntity = GetNetEntity(key),
Text = Loc.GetString(lockComp.Locked ? "cp-lock-verb-use-key-text-open" : "cp-lock-verb-use-key-text-close", ("item", MetaData(args.Target).EntityName)),
Message = Loc.GetString("cp-lock-verb-use-key-message", ("item", MetaData(args.Target).EntityName))
Text = Loc.GetString(lockComp.Locked ? "cp14-lock-verb-use-key-text-open" : "cp14-lock-verb-use-key-text-close", ("item", MetaData(args.Target).EntityName)),
Message = Loc.GetString("cp14-lock-verb-use-key-message", ("item", MetaData(args.Target).EntityName)),
};
args.Verbs.Add(verb);
@@ -220,14 +219,10 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
if (args.Container.ID != lockSlot.Comp.LockSlotId)
return;
if (!TryComp<CP14LockComponent>(args.EntityUid, out var lockComp))
{
args.Cancel();
if (TryComp<CP14LockComponent>(args.EntityUid, out var lockComp))
return;
}
if (lockComp == null)
return;
args.Cancel();
//if (lockComp.Locked)
//{
@@ -309,18 +304,18 @@ public sealed class SharedCP14LockKeySystem : EntitySystem
if (lockComp.Locked)
{
if(_lock.TryUnlock(target, user))
_popup.PopupEntity(Loc.GetString("cp-lock-unlock-lock", ("lock", MetaData(lockEnt).EntityName)), lockEnt, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-unlock-lock", ("lock", MetaData(lockEnt).EntityName)), lockEnt, user);
}
else
{
if (_lock.TryLock(target, user))
_popup.PopupEntity(Loc.GetString("cp-lock-lock-lock", ("lock", MetaData(lockEnt).EntityName)), lockEnt, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-lock-lock", ("lock", MetaData(lockEnt).EntityName)), lockEnt, user);
}
return true;
}
else
{
_popup.PopupEntity(Loc.GetString("cp-lock-key-use-nofit"), lockEnt, user);
_popup.PopupEntity(Loc.GetString("cp14-lock-key-use-nofit"), lockEnt, user);
}
return false;
}

View File

@@ -89,7 +89,9 @@ public partial class CP14SharedMagicSystem : EntitySystem
{
BreakOnMove = delayedEffect.BreakOnMove,
BreakOnDamage = delayedEffect.BreakOnDamage,
Hidden = delayedEffect.Hidden,
BlockDuplicate = true,
DistanceThreshold = 100f,
};
_doAfter.TryStartDoAfter(doAfterEventArgs);
@@ -126,7 +128,9 @@ public partial class CP14SharedMagicSystem : EntitySystem
{
BreakOnMove = delayedEffect.BreakOnMove,
BreakOnDamage = delayedEffect.BreakOnDamage,
Hidden = delayedEffect.Hidden,
BlockDuplicate = true,
DistanceThreshold = 100f,
};
_doAfter.TryStartDoAfter(doAfterEventArgs);
@@ -158,7 +162,9 @@ public partial class CP14SharedMagicSystem : EntitySystem
{
BreakOnMove = delayedEffect.BreakOnMove,
BreakOnDamage = delayedEffect.BreakOnDamage,
Hidden = delayedEffect.Hidden,
BlockDuplicate = true,
DistanceThreshold = 100f,
};
_doAfter.TryStartDoAfter(doAfterEventArgs);

View File

@@ -16,6 +16,9 @@ public sealed partial class CP14DelayedWorldTargetActionEvent : WorldTargetActio
[DataField]
public bool BreakOnDamage { get; private set; } = true;
[DataField]
public bool Hidden { get; private set; } = false;
}
[Serializable, NetSerializable]
@@ -38,6 +41,9 @@ public sealed partial class CP14DelayedEntityTargetActionEvent : EntityTargetAct
[DataField]
public bool BreakOnDamage { get; private set; } = true;
[DataField]
public bool Hidden { get; private set; } = false;
}
[Serializable, NetSerializable]
@@ -56,6 +62,9 @@ public sealed partial class CP14DelayedInstantActionEvent : InstantActionEvent,
[DataField]
public bool BreakOnDamage { get; private set; } = true;
[DataField]
public bool Hidden { get; private set; } = false;
}
[Serializable, NetSerializable]

View File

@@ -10,4 +10,6 @@ public interface ICP14DelayedMagicEffect // The speak n spell interface
public bool BreakOnMove { get; }
public bool BreakOnDamage { get; }
public bool Hidden{ get; }
}

View File

@@ -1,3 +1,5 @@
using Content.Shared.Examine;
using Content.Shared.Popups;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
@@ -5,6 +7,9 @@ namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellCasterTeleport : CP14SpellEffect
{
[DataField]
public bool NeedVision = true;
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
EntityCoordinates? targetPoint = null;
@@ -17,6 +22,15 @@ public sealed partial class CP14SpellCasterTeleport : CP14SpellEffect
return;
var transform = entManager.System<SharedTransformSystem>();
var examine = entManager.System<ExamineSystemShared>();
var popup = entManager.System<SharedPopupSystem>();
if (NeedVision && !examine.InRangeUnOccluded(args.User.Value, targetPoint.Value))
{
// can only dash if the destination is visible on screen
popup.PopupEntity(Loc.GetString("dash-ability-cant-see"), args.User.Value, args.User.Value);
return;
}
transform.SetCoordinates(args.User.Value, targetPoint.Value);
}

View File

@@ -3,7 +3,7 @@ using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellSpawnEntity : CP14SpellEffect
public sealed partial class CP14SpellSpawnEntityOnTarget : CP14SpellEffect
{
[DataField]
public List<EntProtoId> Spawns = new();

View File

@@ -0,0 +1,21 @@
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellSpawnEntityOnUser : CP14SpellEffect
{
[DataField]
public List<EntProtoId> Spawns = new();
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.User is null || !entManager.TryGetComponent<TransformComponent>(args.User.Value, out var transformComponent))
return;
foreach (var spawn in Spawns)
{
entManager.SpawnAtPosition(spawn, transformComponent.Coordinates);
}
}
}

View File

@@ -0,0 +1,23 @@
using Content.Shared.Throwing;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellThrowToUser : CP14SpellEffect
{
[DataField]
public float ThrowPower = 10f;
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Target is null)
return;
var targetEntity = args.Target.Value;
var throwing = entManager.System<ThrowingSystem>();
if (!entManager.TryGetComponent<TransformComponent>(args.User, out var xform))
return;
throwing.TryThrow(targetEntity, xform.Coordinates, ThrowPower);
}
}

View File

@@ -9,6 +9,7 @@ using Content.Shared.Timing;
using Content.Shared.Weapons.Melee.Events;
using Content.Shared.Wieldable;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Network;
namespace Content.Shared._CP14.MeleeWeapon.EntitySystems;
@@ -18,6 +19,7 @@ public sealed class CP14SharpeningSystem : EntitySystem
[Dependency] private readonly UseDelaySystem _useDelay = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly INetManager _net = default!;
public override void Initialize()
{
@@ -82,16 +84,19 @@ public sealed class CP14SharpeningSystem : EntitySystem
if (!ev.Canceled)
{
_audio.PlayPvs(stone.Comp.SharpeningSound, target);
Spawn("EffectSparks", Transform(target).Coordinates);
_audio.PlayPredicted(stone.Comp.SharpeningSound, target, user);
_damageableSystem.TryChangeDamage(stone, stone.Comp.SelfDamage);
_damageableSystem.TryChangeDamage(target, stone.Comp.TargetDamage);
component.Sharpness = MathHelper.Clamp01(component.Sharpness + stone.Comp.SharpnessHeal);
if (component.Sharpness >= 0.99)
_popup.PopupEntity(Loc.GetString("sharpening-ready"), target, user);
if (_net.IsServer)
{
Spawn("EffectSparks", Transform(target).Coordinates);
if (component.Sharpness >= 0.99)
_popup.PopupEntity(Loc.GetString("sharpening-ready"), target, user);
}
}
_useDelay.TryResetDelay(stone);