mirror of
https://github.com/a2x/cs2-dumper.git
synced 2025-04-02 21:45:35 +08:00
Handle empty names and duplicate values in Rust generator
This commit is contained in:
parent
3f6c894097
commit
09413db57a
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cs2-dumper"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
authors = ["a2x"]
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: animationsystem.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper {
|
||||
// Module: client.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: client.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: engine2.dll
|
||||
// Classes count: 48
|
||||
// Classes count: 44
|
||||
// Enums count: 4
|
||||
public static class Engine2Dll {
|
||||
// Alignment: 4
|
||||
@ -288,21 +288,5 @@ namespace CS2Dumper.Schemas {
|
||||
// Fields count: 0
|
||||
public static class EventServerPollNetworking_t {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
public static class {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
public static class {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
public static class {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
public static class {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
namespace cs2_dumper {
|
||||
namespace schemas {
|
||||
// Module: engine2.dll
|
||||
// Classes count: 48
|
||||
// Classes count: 44
|
||||
// Enums count: 4
|
||||
namespace engine2_dll {
|
||||
// Alignment: 4
|
||||
@ -293,22 +293,6 @@ namespace cs2_dumper {
|
||||
// Fields count: 0
|
||||
namespace EventServerPollNetworking_t {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
namespace {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
namespace {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
namespace {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
namespace {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,6 @@
|
||||
{
|
||||
"engine2.dll": {
|
||||
"classes": {
|
||||
"": {
|
||||
"fields": {},
|
||||
"metadata": [],
|
||||
"parent": null
|
||||
},
|
||||
"CEmptyEntityInstance": {
|
||||
"fields": {},
|
||||
"metadata": [],
|
||||
|
@ -1,12 +1,12 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
pub mod cs2_dumper {
|
||||
pub mod schemas {
|
||||
// Module: engine2.dll
|
||||
// Classes count: 48
|
||||
// Classes count: 44
|
||||
// Enums count: 4
|
||||
pub mod engine2_dll {
|
||||
// Alignment: 4
|
||||
@ -295,22 +295,6 @@ pub mod cs2_dumper {
|
||||
// Fields count: 0
|
||||
pub mod EventServerPollNetworking_t {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
pub mod {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
pub mod {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
pub mod {
|
||||
}
|
||||
// Parent: None
|
||||
// Fields count: 0
|
||||
pub mod {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: host.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"build_number": 14009,
|
||||
"timestamp": "2024-05-24T01:30:25.777667800+00:00"
|
||||
"timestamp": "2024-05-24T10:58:30.509826500+00:00"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Interfaces {
|
||||
// Module: animationsystem.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: materialsystem2.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: networksystem.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Offsets {
|
||||
// Module: client.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: panorama.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: particles.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
@ -243,8 +243,7 @@ pub mod cs2_dumper {
|
||||
#[repr(u32)]
|
||||
pub enum ParticleParentSetMode_t {
|
||||
PARTICLE_SET_PARENT_NO = 0x0,
|
||||
PARTICLE_SET_PARENT_IMMEDIATE = 0x1,
|
||||
PARTICLE_SET_PARENT_ROOT = 0x1
|
||||
PARTICLE_SET_PARENT_IMMEDIATE = 0x1
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 5
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: pulse_system.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: rendersystemdx11.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: resourcesystem.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: scenesystem.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: schemasystem.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: server.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
@ -238,8 +238,7 @@ pub mod cs2_dumper {
|
||||
USE_ROTATION_EXPANDED_BOUNDS = 0x5,
|
||||
USE_ROTATION_EXPANDED_ORIENTED_BOUNDS = 0x6,
|
||||
USE_COLLISION_BOUNDS_NEVER_VPHYSICS = 0x7,
|
||||
USE_ROTATION_EXPANDED_SEQUENCE_BOUNDS = 0x8,
|
||||
SURROUNDING_TYPE_BIT_COUNT = 0x3
|
||||
USE_ROTATION_EXPANDED_SEQUENCE_BOUNDS = 0x8
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 5
|
||||
@ -594,11 +593,7 @@ pub mod cs2_dumper {
|
||||
TS_AT_TOP = 0x0,
|
||||
TS_AT_BOTTOM = 0x1,
|
||||
TS_GOING_UP = 0x2,
|
||||
TS_GOING_DOWN = 0x3,
|
||||
DOOR_OPEN = 0x0,
|
||||
DOOR_CLOSED = 0x1,
|
||||
DOOR_OPENING = 0x2,
|
||||
DOOR_CLOSING = 0x3
|
||||
TS_GOING_DOWN = 0x3
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 74
|
||||
@ -608,8 +603,6 @@ pub mod cs2_dumper {
|
||||
LOADOUT_SLOT_INVALID = u32::MAX,
|
||||
LOADOUT_SLOT_MELEE = 0x0,
|
||||
LOADOUT_SLOT_C4 = 0x1,
|
||||
LOADOUT_SLOT_FIRST_AUTO_BUY_WEAPON = 0x0,
|
||||
LOADOUT_SLOT_LAST_AUTO_BUY_WEAPON = 0x1,
|
||||
LOADOUT_SLOT_SECONDARY0 = 0x2,
|
||||
LOADOUT_SLOT_SECONDARY1 = 0x3,
|
||||
LOADOUT_SLOT_SECONDARY2 = 0x4,
|
||||
@ -634,32 +627,22 @@ pub mod cs2_dumper {
|
||||
LOADOUT_SLOT_HEAVY3 = 0x17,
|
||||
LOADOUT_SLOT_HEAVY4 = 0x18,
|
||||
LOADOUT_SLOT_HEAVY5 = 0x19,
|
||||
LOADOUT_SLOT_FIRST_WHEEL_WEAPON = 0x2,
|
||||
LOADOUT_SLOT_LAST_WHEEL_WEAPON = 0x19,
|
||||
LOADOUT_SLOT_FIRST_PRIMARY_WEAPON = 0x8,
|
||||
LOADOUT_SLOT_LAST_PRIMARY_WEAPON = 0x19,
|
||||
LOADOUT_SLOT_FIRST_WHEEL_GRENADE = 0x1A,
|
||||
LOADOUT_SLOT_GRENADE0 = 0x1A,
|
||||
LOADOUT_SLOT_GRENADE1 = 0x1B,
|
||||
LOADOUT_SLOT_GRENADE2 = 0x1C,
|
||||
LOADOUT_SLOT_GRENADE3 = 0x1D,
|
||||
LOADOUT_SLOT_GRENADE4 = 0x1E,
|
||||
LOADOUT_SLOT_GRENADE5 = 0x1F,
|
||||
LOADOUT_SLOT_LAST_WHEEL_GRENADE = 0x1F,
|
||||
LOADOUT_SLOT_EQUIPMENT0 = 0x20,
|
||||
LOADOUT_SLOT_EQUIPMENT1 = 0x21,
|
||||
LOADOUT_SLOT_EQUIPMENT2 = 0x22,
|
||||
LOADOUT_SLOT_EQUIPMENT3 = 0x23,
|
||||
LOADOUT_SLOT_EQUIPMENT4 = 0x24,
|
||||
LOADOUT_SLOT_EQUIPMENT5 = 0x25,
|
||||
LOADOUT_SLOT_FIRST_WHEEL_EQUIPMENT = 0x20,
|
||||
LOADOUT_SLOT_LAST_WHEEL_EQUIPMENT = 0x25,
|
||||
LOADOUT_SLOT_CLOTHING_CUSTOMPLAYER = 0x26,
|
||||
LOADOUT_SLOT_CLOTHING_CUSTOMHEAD = 0x27,
|
||||
LOADOUT_SLOT_CLOTHING_FACEMASK = 0x28,
|
||||
LOADOUT_SLOT_CLOTHING_HANDS = 0x29,
|
||||
LOADOUT_SLOT_FIRST_COSMETIC = 0x29,
|
||||
LOADOUT_SLOT_LAST_COSMETIC = 0x29,
|
||||
LOADOUT_SLOT_CLOTHING_EYEWEAR = 0x2A,
|
||||
LOADOUT_SLOT_CLOTHING_HAT = 0x2B,
|
||||
LOADOUT_SLOT_CLOTHING_LOWERBODY = 0x2C,
|
||||
@ -675,8 +658,6 @@ pub mod cs2_dumper {
|
||||
LOADOUT_SLOT_MUSICKIT = 0x36,
|
||||
LOADOUT_SLOT_FLAIR0 = 0x37,
|
||||
LOADOUT_SLOT_SPRAY0 = 0x38,
|
||||
LOADOUT_SLOT_FIRST_ALL_CHARACTER = 0x36,
|
||||
LOADOUT_SLOT_LAST_ALL_CHARACTER = 0x38,
|
||||
LOADOUT_SLOT_COUNT = 0x39
|
||||
}
|
||||
// Alignment: 4
|
||||
@ -688,7 +669,6 @@ pub mod cs2_dumper {
|
||||
NAV_MESH_NON_ZUP = 0x8000,
|
||||
NAV_MESH_SHORT_HEIGHT = 0x10000,
|
||||
NAV_MESH_NON_ZUP_TRANSITION = 0x20000,
|
||||
NAV_MESH_CROUCH = 0x10000,
|
||||
NAV_MESH_JUMP = 0x2,
|
||||
NAV_MESH_PRECISE = 0x4,
|
||||
NAV_MESH_NO_JUMP = 0x8,
|
||||
@ -769,8 +749,7 @@ pub mod cs2_dumper {
|
||||
pub enum BeamClipStyle_t {
|
||||
kNOCLIP = 0x0,
|
||||
kGEOCLIP = 0x1,
|
||||
kMODELCLIP = 0x2,
|
||||
kBEAMCLIPSTYLE_NUMBITS = 0x2
|
||||
kMODELCLIP = 0x2
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 4
|
||||
@ -876,9 +855,7 @@ pub mod cs2_dumper {
|
||||
GEAR_SLOT_RESERVED_SLOT11 = 0xA,
|
||||
GEAR_SLOT_BOOSTS = 0xB,
|
||||
GEAR_SLOT_UTILITY = 0xC,
|
||||
GEAR_SLOT_COUNT = 0xD,
|
||||
GEAR_SLOT_FIRST = 0x0,
|
||||
GEAR_SLOT_LAST = 0xC
|
||||
GEAR_SLOT_COUNT = 0xD
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 10
|
||||
@ -990,7 +967,6 @@ pub mod cs2_dumper {
|
||||
IN_SPEED = 0x10000,
|
||||
IN_JOYAUTOSPRINT = 0x20000,
|
||||
IN_FIRST_MOD_SPECIFIC_BIT = 0x100000000,
|
||||
IN_USEORRELOAD = 0x100000000,
|
||||
IN_SCORE = 0x200000000,
|
||||
IN_ZOOM = 0x400000000,
|
||||
IN_LOOK_AT_WEAPON = 0x800000000
|
||||
@ -1083,8 +1059,7 @@ pub mod cs2_dumper {
|
||||
#[repr(u32)]
|
||||
pub enum AmmoFlags_t {
|
||||
AMMO_FORCE_DROP_IF_CARRIED = 0x1,
|
||||
AMMO_RESERVE_STAYS_WITH_WEAPON = 0x2,
|
||||
AMMO_FLAG_MAX = 0x2
|
||||
AMMO_RESERVE_STAYS_WITH_WEAPON = 0x2
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 6
|
||||
@ -1393,7 +1368,6 @@ pub mod cs2_dumper {
|
||||
DMG_DISSOLVE = 0x200000,
|
||||
DMG_BLAST_SURFACE = 0x400000,
|
||||
DMG_BUCKSHOT = 0x1000000,
|
||||
DMG_LASTGENERICFLAG = 0x1000000,
|
||||
DMG_HEADSHOT = 0x2000000,
|
||||
DMG_DANGERZONE = 0x4000000
|
||||
}
|
||||
@ -1420,8 +1394,7 @@ pub mod cs2_dumper {
|
||||
MOVECOLLIDE_FLY_BOUNCE = 0x1,
|
||||
MOVECOLLIDE_FLY_CUSTOM = 0x2,
|
||||
MOVECOLLIDE_FLY_SLIDE = 0x3,
|
||||
MOVECOLLIDE_COUNT = 0x4,
|
||||
MOVECOLLIDE_MAX_BITS = 0x3
|
||||
MOVECOLLIDE_COUNT = 0x4
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 7
|
||||
@ -1607,7 +1580,6 @@ pub mod cs2_dumper {
|
||||
DFLAG_ALWAYS_FIRE_DAMAGE_EVENTS = 0x200,
|
||||
DFLAG_RADIUS_DMG = 0x400,
|
||||
DFLAG_FORCEREDUCEARMOR_DMG = 0x800,
|
||||
DMG_LASTDFLAG = 0x800,
|
||||
DFLAG_IGNORE_ARMOR = 0x1000,
|
||||
DFLAG_SUPPRESS_UTILREMOVE = 0x2000
|
||||
}
|
||||
@ -1626,12 +1598,7 @@ pub mod cs2_dumper {
|
||||
D_HT = 0x1,
|
||||
D_FR = 0x2,
|
||||
D_LI = 0x3,
|
||||
D_NU = 0x4,
|
||||
D_ERROR = 0x0,
|
||||
D_HATE = 0x1,
|
||||
D_FEAR = 0x2,
|
||||
D_LIKE = 0x3,
|
||||
D_NEUTRAL = 0x4
|
||||
D_NU = 0x4
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 3
|
||||
@ -1693,9 +1660,7 @@ pub mod cs2_dumper {
|
||||
MOVETYPE_OBSERVER = 0x8,
|
||||
MOVETYPE_LADDER = 0x9,
|
||||
MOVETYPE_CUSTOM = 0xA,
|
||||
MOVETYPE_LAST = 0xB,
|
||||
MOVETYPE_INVALID = 0xB,
|
||||
MOVETYPE_MAX_BITS = 0x5
|
||||
MOVETYPE_LAST = 0xB
|
||||
}
|
||||
// Parent: CBaseCombatCharacter
|
||||
// Fields count: 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: soundsystem.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
@ -135,14 +135,11 @@ pub mod cs2_dumper {
|
||||
SNDLVL_50dB = 0x32,
|
||||
SNDLVL_55dB = 0x37,
|
||||
SNDLVL_IDLE = 0x3C,
|
||||
SNDLVL_60dB = 0x3C,
|
||||
SNDLVL_65dB = 0x41,
|
||||
SNDLVL_STATIC = 0x42,
|
||||
SNDLVL_70dB = 0x46,
|
||||
SNDLVL_NORM = 0x4B,
|
||||
SNDLVL_75dB = 0x4B,
|
||||
SNDLVL_80dB = 0x50,
|
||||
SNDLVL_TALKING = 0x50,
|
||||
SNDLVL_85dB = 0x55,
|
||||
SNDLVL_90dB = 0x5A,
|
||||
SNDLVL_95dB = 0x5F,
|
||||
@ -152,7 +149,6 @@ pub mod cs2_dumper {
|
||||
SNDLVL_120dB = 0x78,
|
||||
SNDLVL_130dB = 0x82,
|
||||
SNDLVL_GUNFIRE = 0x8C,
|
||||
SNDLVL_140dB = 0x8C,
|
||||
SNDLVL_150dB = 0x96,
|
||||
SNDLVL_180dB = 0xB4
|
||||
}
|
||||
@ -212,8 +208,7 @@ pub mod cs2_dumper {
|
||||
FILTER_SLOPE_12dB = 0x4,
|
||||
FILTER_SLOPE_24dB = 0x5,
|
||||
FILTER_SLOPE_36dB = 0x6,
|
||||
FILTER_SLOPE_48dB = 0x7,
|
||||
FILTER_SLOPE_MAX = 0x7
|
||||
FILTER_SLOPE_48dB = 0x7
|
||||
}
|
||||
// Alignment: 4
|
||||
// Members count: 8
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: vphysics2.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
namespace CS2Dumper.Schemas {
|
||||
// Module: worldrenderer.dll
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Generated using https://github.com/a2x/cs2-dumper
|
||||
// 2024-05-24 01:30:25.777667800 UTC
|
||||
// 2024-05-24 10:58:30.509826500 UTC
|
||||
|
||||
#![allow(non_upper_case_globals, non_camel_case_types, non_snake_case, unused)]
|
||||
|
||||
|
@ -89,6 +89,10 @@ fn read_class_binding(
|
||||
|
||||
let name = binding.name.read_string(process)?.to_string();
|
||||
|
||||
if name.is_empty() {
|
||||
return Err(Error::Other("empty class name"));
|
||||
}
|
||||
|
||||
let parent = binding.base_classes.non_null().and_then(|ptr| {
|
||||
let base_class = ptr.read(process).ok()?;
|
||||
let parent_class = base_class.prev.read(process).ok()?;
|
||||
@ -215,6 +219,10 @@ fn read_enum_binding(
|
||||
let binding = binding_ptr.read(process)?;
|
||||
let name = binding.name.read_string(process)?.to_string();
|
||||
|
||||
if name.is_empty() {
|
||||
return Err(Error::Other("empty enum name"));
|
||||
}
|
||||
|
||||
let members = read_enum_binding_members(process, &binding)?;
|
||||
|
||||
debug!(
|
||||
|
@ -53,7 +53,7 @@ impl CodeWriter for Vec<Button> {
|
||||
BTreeMap::from_iter([("client.dll", buttons)])
|
||||
};
|
||||
|
||||
fmt.write_str(&serde_json::to_string_pretty(&content).expect("failed to serialize"))
|
||||
fmt.write_str(&serde_json::to_string_pretty(&content).expect("unable to serialize json"))
|
||||
}
|
||||
|
||||
fn write_rs(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
|
||||
|
@ -15,6 +15,7 @@ impl<'a> Formatter<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Refactor this.
|
||||
pub fn block<F>(&mut self, heading: &str, semicolon: bool, f: F) -> fmt::Result
|
||||
where
|
||||
F: FnOnce(&mut Self) -> fmt::Result,
|
||||
|
@ -40,11 +40,8 @@ impl<'a> Item<'a> {
|
||||
|
||||
trait CodeWriter {
|
||||
fn write_cs(&self, fmt: &mut Formatter<'_>) -> fmt::Result;
|
||||
|
||||
fn write_hpp(&self, fmt: &mut Formatter<'_>) -> fmt::Result;
|
||||
|
||||
fn write_json(&self, fmt: &mut Formatter<'_>) -> fmt::Result;
|
||||
|
||||
fn write_rs(&self, fmt: &mut Formatter<'_>) -> fmt::Result;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
use heck::{AsPascalCase, AsSnakeCase};
|
||||
@ -37,8 +37,6 @@ impl CodeWriter for SchemaMap {
|
||||
&format!("public enum {} : {}", slugify(&enum_.name), type_name),
|
||||
false,
|
||||
|fmt| {
|
||||
// TODO: Handle the case where multiple members share
|
||||
// the same value.
|
||||
let members = enum_
|
||||
.members
|
||||
.iter()
|
||||
@ -58,7 +56,7 @@ impl CodeWriter for SchemaMap {
|
||||
.parent
|
||||
.as_ref()
|
||||
.map(|parent| slugify(&parent.name))
|
||||
.unwrap_or_else(|| "None".to_string());
|
||||
.unwrap_or_else(|| String::from("None"));
|
||||
|
||||
writeln!(fmt, "// Parent: {}", parent_name)?;
|
||||
writeln!(fmt, "// Fields count: {}", class.fields.len())?;
|
||||
@ -122,8 +120,6 @@ impl CodeWriter for SchemaMap {
|
||||
&format!("enum class {} : {}", slugify(&enum_.name), type_name),
|
||||
true,
|
||||
|fmt| {
|
||||
// TODO: Handle the case where multiple members share
|
||||
// the same value.
|
||||
let members = enum_
|
||||
.members
|
||||
.iter()
|
||||
@ -143,7 +139,7 @@ impl CodeWriter for SchemaMap {
|
||||
.parent
|
||||
.as_ref()
|
||||
.map(|parent| slugify(&parent.name))
|
||||
.unwrap_or_else(|| "None".to_string());
|
||||
.unwrap_or_else(|| String::from("None"));
|
||||
|
||||
writeln!(fmt, "// Parent: {}", parent_name)?;
|
||||
writeln!(fmt, "// Fields count: {}", class.fields.len())?;
|
||||
@ -299,21 +295,24 @@ impl CodeWriter for SchemaMap {
|
||||
),
|
||||
false,
|
||||
|fmt| {
|
||||
// TODO: Handle the case where multiple members share
|
||||
// the same value.
|
||||
let mut used_values = HashSet::new();
|
||||
|
||||
let members = enum_
|
||||
.members
|
||||
.iter()
|
||||
.map(|member| {
|
||||
format!(
|
||||
"{} = {}",
|
||||
member.name,
|
||||
if member.value == -1 {
|
||||
.filter_map(|member| {
|
||||
// Filter out duplicate values.
|
||||
if used_values.insert(member.value) {
|
||||
let value = if member.value == -1 {
|
||||
format!("{}::MAX", type_name)
|
||||
} else {
|
||||
format!("{:#X}", member.value)
|
||||
}
|
||||
)
|
||||
};
|
||||
|
||||
Some(format!("{} = {}", member.name, value))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(",\n");
|
||||
@ -328,7 +327,7 @@ impl CodeWriter for SchemaMap {
|
||||
.parent
|
||||
.as_ref()
|
||||
.map(|parent| slugify(&parent.name))
|
||||
.unwrap_or_else(|| "None".to_string());
|
||||
.unwrap_or_else(|| String::from("None"));
|
||||
|
||||
writeln!(fmt, "// Parent: {}", parent_name)?;
|
||||
writeln!(fmt, "// Fields count: {}", class.fields.len())?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user