1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Fix modules crashing simulation when in a weapon slot, fix some movement placements #17

This commit is contained in:
NG (Graham)
2025-05-19 17:17:09 -04:00
parent a9510a7495
commit a94d545858
2 changed files with 41 additions and 32 deletions

View File

@@ -4240,7 +4240,7 @@
"id": 3947193935, "id": 3947193935,
"info": { "info": {
"category": "Rotor", "category": "Rotor",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strMass": "12.5 [strKilograms]", "strMass": "12.5 [strKilograms]",
"strCPU": "31 [strPFlops]S", "strCPU": "31 [strPFlops]S",
@@ -4293,7 +4293,7 @@
"id": 3789940851, "id": 3789940851,
"info": { "info": {
"category": "Rotor", "category": "Rotor",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strMass": "17.5 [strKilograms]", "strMass": "17.5 [strKilograms]",
"strCPU": "34 [strPFlops]S", "strCPU": "34 [strPFlops]S",
@@ -4346,7 +4346,7 @@
"id": 1802864184, "id": 1802864184,
"info": { "info": {
"category": "Rotor", "category": "Rotor",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strMass": "22.5 [strKilograms]", "strMass": "22.5 [strKilograms]",
"strCPU": "36 [strPFlops]S", "strCPU": "36 [strPFlops]S",
@@ -4399,7 +4399,7 @@
"id": 3980928804, "id": 3980928804,
"info": { "info": {
"category": "Wing", "category": "Wing",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "23[strPFlops]S", "strCPU": "23[strPFlops]S",
"strRobotRanking": "453.00", "strRobotRanking": "453.00",
@@ -4455,7 +4455,7 @@
"id": 2205394221, "id": 2205394221,
"info": { "info": {
"category": "Wing", "category": "Wing",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "25 [strPFlops]S", "strCPU": "25 [strPFlops]S",
"strRobotRanking": "3,587.00", "strRobotRanking": "3,587.00",
@@ -4511,7 +4511,7 @@
"id": 2312317713, "id": 2312317713,
"info": { "info": {
"category": "Wing", "category": "Wing",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "27 [strPFlops]S", "strCPU": "27 [strPFlops]S",
"strRobotRanking": "28,243.00", "strRobotRanking": "28,243.00",
@@ -4567,7 +4567,7 @@
"id": 2865954846, "id": 2865954846,
"info": { "info": {
"category": "Wing", "category": "Wing",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "27 [strPFlops]S", "strCPU": "27 [strPFlops]S",
"strRobotRanking": "28,243.00", "strRobotRanking": "28,243.00",
@@ -4603,7 +4603,7 @@
"id": 2464192350, "id": 2464192350,
"info": { "info": {
"category": "Wing", "category": "Wing",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "29 [strPFlops]S", "strCPU": "29 [strPFlops]S",
"strRobotRanking": "221,142.00", "strRobotRanking": "221,142.00",
@@ -4659,7 +4659,7 @@
"id": 2863842421, "id": 2863842421,
"info": { "info": {
"category": "Wing", "category": "Wing",
"placements": 60, "placements": 63,
"stats": {}, "stats": {},
"description": "strWingBatDesc", "description": "strWingBatDesc",
"size": "T5", "size": "T5",
@@ -4690,7 +4690,7 @@
"id": 2369778644, "id": 2369778644,
"info": { "info": {
"category": "Rudder", "category": "Rudder",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "20 [strPFlops]S", "strCPU": "20 [strPFlops]S",
"strRobotRanking": "394.00", "strRobotRanking": "394.00",
@@ -4746,7 +4746,7 @@
"id": 3808719325, "id": 3808719325,
"info": { "info": {
"category": "Rudder", "category": "Rudder",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "22 [strPFlops]S", "strCPU": "22 [strPFlops]S",
"strRobotRanking": "3,157.00", "strRobotRanking": "3,157.00",
@@ -4802,7 +4802,7 @@
"id": 3919904737, "id": 3919904737,
"info": { "info": {
"category": "Rudder", "category": "Rudder",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "24 [strPFlops]S", "strCPU": "24 [strPFlops]S",
"strRobotRanking": "25,105.00", "strRobotRanking": "25,105.00",
@@ -4858,7 +4858,7 @@
"id": 2404311559, "id": 2404311559,
"info": { "info": {
"category": "Rudder", "category": "Rudder",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "24 [strPFlops]S", "strCPU": "24 [strPFlops]S",
"strRobotRanking": "25,105.00", "strRobotRanking": "25,105.00",
@@ -4894,7 +4894,7 @@
"id": 2608683011, "id": 2608683011,
"info": { "info": {
"category": "Rudder", "category": "Rudder",
"placements": 60, "placements": 63,
"stats": { "stats": {
"strCPU": "26 [strPFlops]S", "strCPU": "26 [strPFlops]S",
"strRobotRanking": "198,266.00", "strRobotRanking": "198,266.00",
@@ -4950,7 +4950,7 @@
"id": 2928920064, "id": 2928920064,
"info": { "info": {
"category": "Rudder", "category": "Rudder",
"placements": 60, "placements": 63,
"stats": {}, "stats": {},
"description": "strRudderBatDesc", "description": "strRudderBatDesc",
"size": "T5", "size": "T5",
@@ -8196,7 +8196,7 @@
"type": "Module", "type": "Module",
"active": true, "active": true,
"cpu": 150, "cpu": 150,
"ignore_in_weapon_list": true, "ignore_in_weapon_list": false,
"health": 123750, "health": 123750,
"visibility": "Mothership", "visibility": "Mothership",
"ranking": 15000 "ranking": 15000
@@ -8232,7 +8232,7 @@
"size": "T5", "size": "T5",
"type": "Module", "type": "Module",
"active": true, "active": true,
"ignore_in_weapon_list": true, "ignore_in_weapon_list": false,
"health": 169125, "health": 169125,
"cpu": 205, "cpu": 205,
"visibility": "Mothership", "visibility": "Mothership",
@@ -8272,7 +8272,7 @@
"size": "T5", "size": "T5",
"type": "Module", "type": "Module",
"active": true, "active": true,
"ignore_in_weapon_list": true, "ignore_in_weapon_list": false,
"health": 165000, "health": 165000,
"cpu": 200, "cpu": 200,
"visibility": "Mothership", "visibility": "Mothership",
@@ -8314,7 +8314,7 @@
"size": "T5", "size": "T5",
"type": "Module", "type": "Module",
"active": true, "active": true,
"ignore_in_weapon_list": true, "ignore_in_weapon_list": false,
"health": 189750, "health": 189750,
"cpu": 230, "cpu": 230,
"visibility": "Mothership", "visibility": "Mothership",
@@ -8354,7 +8354,7 @@
"size": "T5", "size": "T5",
"type": "Module", "type": "Module",
"active": true, "active": true,
"ignore_in_weapon_list": true, "ignore_in_weapon_list": false,
"health": 144375, "health": 144375,
"cpu": 175, "cpu": 175,
"visibility": "Mothership", "visibility": "Mothership",
@@ -8395,7 +8395,7 @@
"size": "T5", "size": "T5",
"type": "Module", "type": "Module",
"active": true, "active": true,
"ignore_in_weapon_list": true, "ignore_in_weapon_list": false,
"health": 180000, "health": 180000,
"cpu": 100, "cpu": 100,
"visibility": "Mothership", "visibility": "Mothership",
@@ -9187,11 +9187,10 @@
"size": "NoTier", "size": "NoTier",
"type": "Cosmetic", "type": "Cosmetic",
"active": true, "active": true,
"protonium": true, "visibility": "Mothership",
"ignore_in_weapon_list": true, "ignore_in_weapon_list": true,
"health": 1, "health": 1,
"cpu": 1, "cpu": 1,
"visibility": "Mothership",
"ranking": 1 "ranking": 1
}, },
"spriteName": "Protonium_League_Badge", "spriteName": "Protonium_League_Badge",
@@ -9210,11 +9209,10 @@
"size": "NoTier", "size": "NoTier",
"type": "Cosmetic", "type": "Cosmetic",
"active": true, "active": true,
"protonium": true, "visibility": "Mothership",
"ignore_in_weapon_list": true, "ignore_in_weapon_list": true,
"health": 1, "health": 1,
"cpu": 1, "cpu": 1,
"visibility": "Mothership",
"ranking": 1 "ranking": 1
}, },
"spriteName": "Protonium_League_Five_Stars_Badge", "spriteName": "Protonium_League_Five_Stars_Badge",
@@ -12271,6 +12269,7 @@
"type": "NotAFunctionalItem", "type": "NotAFunctionalItem",
"active": true, "active": true,
"protonium": true, "protonium": true,
"visibility": "None",
"ignore_in_weapon_list": true "ignore_in_weapon_list": true
}, },
"spriteName": "CubeThumb_LightChassis_Cube", "spriteName": "CubeThumb_LightChassis_Cube",
@@ -12289,6 +12288,7 @@
"size": "NoTier", "size": "NoTier",
"type": "NotAFunctionalItem", "type": "NotAFunctionalItem",
"active": true, "active": true,
"visibility": "None",
"ignore_in_weapon_list": true "ignore_in_weapon_list": true
}, },
"spriteName": "CubeThumb_LightChassis_Cube", "spriteName": "CubeThumb_LightChassis_Cube",
@@ -12307,7 +12307,7 @@
"size": "NoTier", "size": "NoTier",
"type": "NotAFunctionalItem", "type": "NotAFunctionalItem",
"active": true, "active": true,
"protonium": true, "visibility": "None",
"ignore_in_weapon_list": true "ignore_in_weapon_list": true
}, },
"spriteName": "CubeThumb_LightChassis_Cube", "spriteName": "CubeThumb_LightChassis_Cube",
@@ -12326,6 +12326,7 @@
"size": "NoTier", "size": "NoTier",
"type": "NotAFunctionalItem", "type": "NotAFunctionalItem",
"active": true, "active": true,
"visibility": "None",
"ignore_in_weapon_list": true "ignore_in_weapon_list": true
}, },
"spriteName": "CubeThumb_LightChassis_Cube", "spriteName": "CubeThumb_LightChassis_Cube",

18
utils/cube_gen.py Normal file → Executable file
View File

@@ -146,14 +146,14 @@ CATEGORIES_PLACEMENTS = {
"NotAFunctionalItem": ALL_FACES, "NotAFunctionalItem": ALL_FACES,
"Wheel": 0b00001100, "Wheel": 0b00001100,
"Hover": 0b00111100, "Hover": 0b00111100,
"Wing": 0b00111100, "Wing": ALL_FACES, #0b00111100,
"Rudder": 0b00111100, "Rudder": ALL_FACES, #0b00111100,
"Thruster": ALL_FACES, "Thruster": ALL_FACES,
"InsectLeg": 0b00111100, "InsectLeg": 0b00111100,
"MechLeg": 0b00000011, "MechLeg": 0b00000011,
"Ski": 0b00000011, "Ski": 0b00000011,
"TankTrack": 0b00111100, "TankTrack": 0b00111100,
"Rotor": 0b00111100, "Rotor": ALL_FACES, #0b00111100,
"SprinterLeg": 0b00000011, "SprinterLeg": 0b00000011,
"Propeller": ALL_FACES, "Propeller": ALL_FACES,
"Laser": None, "Laser": None,
@@ -452,6 +452,12 @@ def main(asset_in, cubes=None, weapons=None, movement=None):
"jam_club", "jam_club",
], ],
}, },
"factory": {
"adapter": {
"variant": "Arc",
"uri": "sqlite:../../arc/rc_archive.db?mode=ro"
}
},
"settings": { "settings": {
"banners": [{ "banners": [{
"message": msg, "message": msg,
@@ -505,8 +511,10 @@ def main(asset_in, cubes=None, weapons=None, movement=None):
"hexId": str(cube["1 string itemCode"]), "hexId": str(cube["1 string itemCode"]),
"isVariant": is_variant_guess(cube["1 string nameStrKey"], cube["1 string spriteName"]), "isVariant": is_variant_guess(cube["1 string nameStrKey"], cube["1 string spriteName"]),
} }
if "protonium" in name.lower(): if "protoniumcrystal" in name.lower():
new_entry["info"]["protonium"] = True new_entry["info"]["protonium"] = True
if "fusion" in name.lower() or "equalizer" in name.lower() or "protonium" in name.lower():
new_entry["info"]["visibility"] = "None"
if "CPU LOAD" in stats: if "CPU LOAD" in stats:
new_entry["info"]["cpu"] = int(stats["CPU LOAD"].strip().split(" ")[0].strip()) new_entry["info"]["cpu"] = int(stats["CPU LOAD"].strip().split(" ")[0].strip())
if "ARMOR" in stats: if "ARMOR" in stats:
@@ -541,7 +549,7 @@ def main(asset_in, cubes=None, weapons=None, movement=None):
if new_entry["info"]["category"] in WEAPONS: if new_entry["info"]["category"] in WEAPONS:
if new_entry["info"]["size"] in WEAPONS[new_entry["info"]["category"]]: if new_entry["info"]["size"] in WEAPONS[new_entry["info"]["category"]]:
new_entry["weapon"] = WEAPONS[new_entry["info"]["category"]][new_entry["info"]["size"]] new_entry["weapon"] = WEAPONS[new_entry["info"]["category"]][new_entry["info"]["size"]]
new_entry["info"]["ignore_in_weapon_list"] = new_entry["info"]["type"] != "Weapon" new_entry["info"]["ignore_in_weapon_list"] = new_entry["info"]["type"] not in ["Weapon", "Module"]
# tech tree # tech tree
if new_entry["info"]["category"] != "NotAFunctionalItem" and is_original: if new_entry["info"]["category"] != "NotAFunctionalItem" and is_original: