mirror of
https://gitlab.com/YuukiPS/GC-Proto.git
synced 2024-12-25 07:59:24 +03:00
Update cmdid
This commit is contained in:
parent
2a3611c3fa
commit
e421fd849c
7132
PacketOpcodes.java
7132
PacketOpcodes.java
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
# Anime Game Protos 4.0 (For Grasscutters)
|
||||
# Anime Game Protos 4.5 (For Grasscutters)
|
||||
This repository contains the [ProtoBuf](https://github.com/google/protobuf) `.proto` files for Anime Game API.<br/>
|
||||
|
||||
## Credits
|
||||
- [Beach Simulator](https://github.com/SlushinPS/beach-simulator) for 4.0 public<br/>
|
||||
- [UnknownAnimeGamePS](https://github.com/XeonSucksLAB/UnknownAnimeGamePS) for 4.5 public<br/>
|
28164
cmdid_gc.json
28164
cmdid_gc.json
File diff suppressed because it is too large
Load Diff
11
op.js
11
op.js
@ -99,22 +99,27 @@ function read_cmdid_ht_json() {
|
||||
}
|
||||
|
||||
// create cmdid from gc which comes from PacketOpcodes
|
||||
var tes = 50000;
|
||||
function get_cmdid_gc() {
|
||||
const inputStreamcmdid = fs.createReadStream(read_cmdid_gc);
|
||||
var lineReadercmdid = readline.createInterface({
|
||||
input: inputStreamcmdid,
|
||||
terminal: false,
|
||||
});
|
||||
//41528
|
||||
lineReadercmdid.on("line", function (line) {
|
||||
var config = line.split(" = ");
|
||||
var name = config[0];
|
||||
var id = parseInt(config[1]);
|
||||
if (name.includes("public static final int")) {
|
||||
name = name.replace("\tpublic static final int ", "");
|
||||
name = name.replace(" public static final int ", "");
|
||||
// skip 0 ?
|
||||
if (id == 0) {
|
||||
return;
|
||||
}
|
||||
if (id == 8888888) {
|
||||
id = tes++;
|
||||
}
|
||||
var subdata = new Object();
|
||||
subdata["name"] = name;
|
||||
subdata["id"] = id;
|
||||
@ -294,7 +299,7 @@ function cmdid_to_op() {
|
||||
//const read_file_gcneed = fs.readFileSync(file_gc_needed2);
|
||||
//const json_gcneed_raw = JSON.parse(read_file_gcneed);
|
||||
|
||||
const cmdidfix_raw = fs.readFileSync(read_cmdid_output_gc_update);
|
||||
const cmdidfix_raw = fs.readFileSync(read_cmdid_output_gc);
|
||||
const json_cmdidfix_raw = JSON.parse(cmdidfix_raw);
|
||||
|
||||
//const json_cmdidfix_raw = read_json(read_cmdid_output_gc_update);
|
||||
@ -988,7 +993,7 @@ function cmdid_json_to_csv() {
|
||||
// get_cmdid_json(); // 2. get last cmdid.csv to json
|
||||
// now we have cmdid_gc.json and cmdid.json
|
||||
// update_cmdid_gc(); // 3. update gc cmdid (mode by id)
|
||||
// cmdid_to_op(); // 4. update op
|
||||
cmdid_to_op(); // 4. update op
|
||||
// npx prettier --write PacketOpcodes.java
|
||||
// scan_gc(); // 5. scan gc
|
||||
// clean_proto_event(); // 6. clean event, need manual
|
||||
|
Loading…
Reference in New Issue
Block a user