initial commit
All checks were successful
CI / build (push) Successful in 32s
CI / release (push) Successful in 32s
CI / lint (push) Successful in 30s

This commit is contained in:
Kamal Tufekcic 2026-07-05 13:28:35 +03:00
commit d701598350
67 changed files with 9351 additions and 0 deletions

View file

@ -0,0 +1,47 @@
using System.Collections.Frozen;
namespace Outnumbered.Engine;
// Every engine string/identifier in one place: schema classes + fields, designer names, entity classnames, item-def
// indices. A CS2/CSSharp rename becomes a one-line fix here instead of a hunt across files (engine churn is when, not if).
internal static class EngineNames
{
// schema classes
public const string CBaseEntity = "CBaseEntity";
public const string CCSPlayerPawn = "CCSPlayerPawn";
public const string CCSPlayerController = "CCSPlayerController";
public const string CBasePlayerWeapon = "CBasePlayerWeapon";
public const string CTakeDamageInfo = "CTakeDamageInfo";
public const string CTakeDamageResult = "CTakeDamageResult";
// schema fields
public const string Health = "m_iHealth";
public const string MaxHealth = "m_iMaxHealth";
public const string ArmorValue = "m_ArmorValue";
public const string MoveType = "m_MoveType";
public const string Clan = "m_szClan";
public const string Inflictor = "m_hInflictor";
public const string Attacker = "m_hAttacker";
public const string OriginatingInfo = "m_pOriginatingInfo";
public const string NextPrimaryAttackTick = "m_nNextPrimaryAttackTick";
// pawn designer-name varies by build — FrozenSet for the per-pellet membership check in the damage hook
public static readonly FrozenSet<string> PlayerPawnDesigners =
new[] { "cs_player_pawn", "player" }.ToFrozenSet(StringComparer.Ordinal);
// entity classnames / designer names
public const string PointWorldText = "point_worldtext";
public const string GameRulesDesigner = "cs_gamerules";
// (the HE projectile is spawned via the native create func in GrenadeSpawner, not by classname)
// common item designer-names given/compared in loadouts (the knife rung, the spawn armor, the default-pool fallback)
public const string WeaponKnife = "weapon_knife";
public const string ItemAssaultSuit = "item_assaultsuit";
public const string WeaponAk47 = "weapon_ak47";
// the two shop "carrier" items every human spawns with: the healthshot (X toggles the menu) + the zeus (shop key 3)
public const string ShopCarrier = "weapon_healthshot";
public const string ShopMelee = "weapon_taser";
// item-def index for the HE grenade (native projectile create)
public const int HeGrenadeItemDef = 44;
}