Files
crystall-punk-14/Content.Shared/_CP14/Skill/Restrictions/TimeGate.cs
Red 906033633e Vampire clan battle gamemode (#1672)
* vampire returns + transformstions redo

* carcat fangs fix + greetings music update

* vampire skill trees

* Blood essence gathering

Introduces the vampire blood essence mechanic, including the CP14SpellVampireGatherEssence spell, new skill point consumable component, and related UI/localization updates. Adds clientside effects for spell casting, new vampire skill and action, and refines skill point gain/loss popups. Also restructures vampire components, updates spell logic for client/server prediction, and removes unused parallax files.

* perma damage

* Add skill point cost to magic system and vampire essence spell

Introduced CP14MagicEffectSkillPointCostComponent to allow magic effects to consume skill points. Updated the shared magic system to handle skill point checks and consumption. Added a new vampire spell for creating blood essence, including new icons and localization. Adjusted vampire component to grant and remove skill points, and updated related skill tree and spell prototypes. Minor fixes and refactoring in spell logic and descriptions.

* blood step + blood vision skills

* vampire clans icons

* 50 players limit + vampire objectives

* fixes

* devourers altar transmutation

* Remove StealTarget component from animal, dino, and mole NPCs

The StealTarget component and associated stealGroup were removed from boar, dinosaur, and mole NPC definitions. This likely disables these entities from being targeted for stealing, possibly to adjust gameplay balance or fix unintended behavior.

* fix

* essence creation improve

* altars

* voice masks

* transmutation fix

* teleportation glyph

* crimson candles

* candle crafting

* fix pointer predictions

* Add Vampire Clan Battle gamemode and update vampire roles

Introduces the 'Vampire Clan Battle' gamemode with new localization in English and Russian, updated game preset definitions, and secret weights. Refactors vampire antagonist briefings and objectives for multiple clans, adjusts vampire role preferences and team settings, and reduces the damage of the Vampire Gather Essence spell. Also includes minor improvements to spell and game mode descriptions, and corrects file naming for game preset locales.

* powerful kicks in

* time gates + vampire tree

* vampire proto faction

* fix

* fixes

* tree progression

* search enemy

* Update CP14SharedVampireSystem.cs

* blood essence gathering redo

* essence gathering refactor 2

* blood healing

* Update secret_weights.yml

* tree planting

* boodgrass

* tree upgrade announcement

* construction graph integration

* delete transmutation system

* workbench crafting returns

* cloaks crafting + cloak invisibility

* make vampire tree is generic red tree (sad)

* clan heart sprite

* Refactor vampire tree to clan heart system

Replaces the CP14VampireTreeComponent with CP14VampireClanHeartComponent, updating all related logic, appearance, and localization. Adjusts skill requirements, examination, and level progression to use the new clan heart system. Updates entity prototypes, visuals, and adds new orb sprites for clan heart levels. Localization strings and logic are updated to reflect the new terminology and mechanics.

* Update SpeciesBlacklist.cs

* Refactor vampire clan heart and remove tree spell

Refactored the vampire clan heart to support essence regeneration over time and adjusted level thresholds. Removed the vampire tree planting spell and related prototype fields, as well as unused tree system code. Updated localization, entity prototypes, and faction definitions to reflect these changes.

* Add clan heart construction for vampire clans

Introduces construction graphs, entities, and conditions for building unique clan hearts for each vampire clan (Unnameable, Devourers, NightChildrens). Adds new construction conditions (all clan vampires required, singleton enforcement), updates skill tree to unlock constructions, and removes the now-obsolete CP14MagicEffectAllVampireClanRequiredComponent. Also adds new frame sprites and updates localization and prototype files accordingly.

* level up vfx

* VFX + lobby track

* orb resprite

* sprites

* Add vampire altar mechanics and improve clan heart behavior

Introduces the CP14VampireAltarComponent and altar entity, which doubles blood essence extraction when victims are strapped to the altar. Adds a custom explosion behavior for vampire clan hearts upon destruction, updates construction graphs and recipes for altars, and improves localization. Also refines skill description handling and adjusts vampire bite action text.

* essence get when heart destruction

* Add clan heart damage and destruction announcements

Introduces announcements for when a vampire clan heart is damaged or destroyed, with cooldown to prevent spam. Refactors examination logic and updates localization files for both English and Russian to support new messages and sender formatting.

* glyph adaptation

* resurrection

* Add round end summary for Vampire Clan Battles

Implemented detailed round end text for the Vampire Clan Battles game mode, displaying victory, defeat, or draw outcomes based on surviving factions and population percentage. Refactored alive player percentage logic into a shared method and updated localization files with new outcome messages in English and Russian. Also removed an unused field from the defence condition component.

* Update vampire_cloak.yml

* fix

* fix

* Update portal_glyph.yml
2025-08-22 18:46:28 +03:00

41 lines
1.4 KiB
C#

using Content.Shared._CP14.Skill.Prototypes;
using Content.Shared.CCVar;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Prototypes;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
namespace Content.Shared._CP14.Skill.Restrictions;
public sealed partial class TimeGate : CP14SkillRestriction
{
[DataField(required: true)]
public int Minutes = 1;
public override bool Check(IEntityManager entManager, EntityUid target)
{
var timing = IoCManager.Resolve<IGameTiming>();
var cfg = IoCManager.Resolve<IConfigurationManager>();
if (cfg.GetCVar(CCVars.CP14SkillTimers) == false)
return true;
return timing.CurTime >= TimeSpan.FromMinutes(Minutes);
}
public override string GetDescription(IEntityManager entManager, IPrototypeManager protoManager)
{
var timing = IoCManager.Resolve<IGameTiming>();
var cfg = IoCManager.Resolve<IConfigurationManager>();
var leftoverTime = TimeSpan.FromMinutes(Minutes) - timing.CurTime;
leftoverTime = leftoverTime < TimeSpan.Zero ? TimeSpan.Zero : leftoverTime;
if (cfg.GetCVar(CCVars.CP14SkillTimers) == false)
return Loc.GetString("cp14-skill-req-timegate-disabled", ("minute", Minutes));
return Loc.GetString("cp14-skill-req-timegate", ("minute", Minutes), ("left", Math.Ceiling(leftoverTime.TotalMinutes)));
}
}