diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml new file mode 100644 index 000000000..89ab5cade --- /dev/null +++ b/.github/workflows/branches.yml @@ -0,0 +1,60 @@ +name: Test Build + +on: + workflow_dispatch: # manually + + push: + branches-ignore: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Build Angular + run: | + cd editor + npm install + npm run build + + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Generate and Validate + run: | + cd editor + bun ci.ts + + compile: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - uses: dtolnay/rust-toolchain@stable + + - name: Generate + run: | + cd editor + bun cargo.ts diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/master.yml similarity index 100% rename from .github/workflows/gh-pages.yml rename to .github/workflows/master.yml diff --git a/editor/src/app/utils/command-validation.ts b/editor/src/app/utils/command-validation.ts index 8b5710b36..3ac5e6faa 100644 --- a/editor/src/app/utils/command-validation.ts +++ b/editor/src/app/utils/command-validation.ts @@ -50,7 +50,7 @@ export function doesCommandHaveAnyAttributeInvalid(command: Command): boolean { export function doesCommandHaveDuplicateName( command: Command, - otherCommands: Command[] | undefined + otherCommands: Command[] | undefined, ) { const thisCommandPlatforms = command.platforms ?? [Platform.Any]; const thisCommandVersions = command.versions ?? [Version.Any]; @@ -63,7 +63,7 @@ export function doesCommandHaveDuplicateName( intersection(thisCommandPlatforms, platforms ?? [Platform.Any]).length > 0 && intersection(thisCommandVersions, versions ?? [Version.Any]).length > 0 && - !command.attrs?.is_overload + !command.attrs?.is_overload, ); } @@ -81,7 +81,7 @@ export function isCommandParamNameDuplicate(command: Command, name: string) { export function doesCommandHaveDuplicateParamName(command: Command) { return commandParams(command).some((param) => - isCommandParamNameDuplicate(command, param.name) + isCommandParamNameDuplicate(command, param.name), ); } @@ -169,7 +169,7 @@ export function doesCommandDescriptionHaveTrailingPeriod(command: Command) { } export function doesCommandDescriptionNotStartWith3rdPersonVerb( - command: Command + command: Command, ) { return ( !!command.short_desc && !command.short_desc?.split(' ')[0]?.endsWith('s') @@ -248,7 +248,7 @@ export function doesCommandHaveInvalidArgumentWithOperator(command: Command) { export function doesSelfArgumentHaveInvalidType(command: Command) { return commandParams(command).some( - (p) => p.name === SELF && p.type !== command.class + (p) => p.name === SELF && p.type !== command.class && command.class, ); } @@ -258,7 +258,7 @@ export function doesOutputHaveInvalidSource(command: Command) { export function doesInputHaveInvalidSource(command: Command) { return inputParams(command).some( - (p) => isVarSource(p.source) && !command.operator + (p) => isVarSource(p.source) && !command.operator, ); } @@ -284,7 +284,7 @@ export function doesCommandHaveInvalidArguments(command: Command, game: Game) { } const count = commandParams(command).reduce( (m, v) => m + (v.type === PrimitiveType.arguments ? 1 : 0), - 0 + 0, ); if (count == 0) { return false; diff --git a/lcs/lcs.json b/lcs/lcs.json index 0b064bfca..9e2b9eed6 100644 --- a/lcs/lcs.json +++ b/lcs/lcs.json @@ -1,6 +1,6 @@ { "meta": { - "last_update": 1755976165004, + "last_update": 1770572541548, "version": "0.18", "url": "https://library.sannybuilder.com/#/lcs" }, @@ -1255,53 +1255,43 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "003D", "name": "IS_INT_VAR_NOT_EQUAL_TO_NUMBER", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "003E", "name": "IS_INT_LVAR_NOT_EQUAL_TO_NUMBER", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "003F", "name": "IS_INT_VAR_NOT_EQUAL_TO_INT_VAR", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0040", "name": "IS_INT_LVAR_NOT_EQUAL_TO_INT_LVAR", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0041", "name": "IS_INT_VAR_NOT_EQUAL_TO_INT_LVAR", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "input": [ @@ -1423,43 +1413,35 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0048", "name": "IS_FLOAT_LVAR_NOT_EQUAL_TO_NUMBER", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0049", "name": "IS_FLOAT_VAR_NOT_EQUAL_TO_FLOAT_VAR", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "004A", "name": "IS_FLOAT_LVAR_NOT_EQUAL_TO_FLOAT_LVAR", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "004B", "name": "IS_FLOAT_VAR_NOT_EQUAL_TO_FLOAT_LVAR", - "num_params": 0, - "operator": "!=" + "num_params": 0 }, { "attrs": { @@ -1594,7 +1576,7 @@ "output": [ { "name": "handle", - "type": "any", + "type": "Player", "source": "var_any" } ], @@ -3027,7 +3009,7 @@ "output": [ { "name": "handle", - "type": "any", + "type": "Char", "source": "var_any" } ], @@ -3308,7 +3290,7 @@ "output": [ { "name": "handle", - "type": "any", + "type": "Car", "source": "var_any" } ], @@ -6129,8 +6111,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0125", "name": "IS_PLAYER_IN_GANGZONE", @@ -6430,8 +6411,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "013D", "name": "IS_CAR_REMAP", @@ -6439,8 +6419,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "013E", "name": "HAS_CAR_JUST_SUNK", @@ -6456,8 +6435,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0140", "name": "IS_CAR_DEAD_IN_AREA_2D", @@ -6468,14 +6446,12 @@ "name": "IS_CAR_DEAD_IN_AREA_3D", "num_params": 0, "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true } }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0142", "name": "IS_TRAILER_ATTACHED", @@ -6483,8 +6459,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0143", "name": "IS_CAR_ON_TRAILER", @@ -6492,8 +6467,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0144", "name": "HAS_CAR_GOT_WEAPON", @@ -6509,8 +6483,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0146", "name": "HAS_PARK_FINISHED", @@ -6550,8 +6523,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "014B", "name": "IS_CARBOMB_ACTIVE", @@ -6829,8 +6801,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0158", "name": "IS_CHAR_IN_GANG_ZONE", @@ -7079,8 +7050,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0163", "name": "IS_CAR_IN_AIR", @@ -7670,8 +7640,7 @@ "name": "IS_CHAR_TOUCHING_OBJECT", "num_params": 0, "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true } }, { @@ -12124,8 +12093,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "023F", "name": "IS_PLAYER_TOUCHING_OBJECT_ON_FOOT", @@ -12136,8 +12104,7 @@ "name": "IS_CHAR_TOUCHING_OBJECT_ON_FOOT", "num_params": 0, "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true } }, { @@ -12405,8 +12372,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0252", "name": "HAS_PHONE_DISPLAYED_MESSAGE", @@ -13131,8 +13097,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0280", "name": "LOCATE_COLL_ANY_MEANS_2D", @@ -13140,8 +13105,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0281", "name": "LOCATE_COLL_ON_FOOT_2D", @@ -13149,8 +13113,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0282", "name": "LOCATE_COLL_IN_CAR_2D", @@ -13158,8 +13121,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0283", "name": "LOCATE_STOPPED_COLL_ANY_MEANS_2D", @@ -13167,8 +13129,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0284", "name": "LOCATE_STOPPED_COLL_ON_FOOT_2D", @@ -13176,8 +13137,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0285", "name": "LOCATE_STOPPED_COLL_IN_CAR_2D", @@ -13185,8 +13145,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0286", "name": "LOCATE_COLL_ANY_MEANS_CHAR_2D", @@ -13194,8 +13153,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0287", "name": "LOCATE_COLL_ON_FOOT_CHAR_2D", @@ -13203,8 +13161,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0288", "name": "LOCATE_COLL_IN_CAR_CHAR_2D", @@ -13212,8 +13169,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0289", "name": "LOCATE_COLL_ANY_MEANS_CAR_2D", @@ -13221,8 +13177,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "028A", "name": "LOCATE_COLL_ON_FOOT_CAR_2D", @@ -13230,8 +13185,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "028B", "name": "LOCATE_COLL_IN_CAR_CAR_2D", @@ -13239,8 +13193,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "028C", "name": "LOCATE_COLL_ANY_MEANS_PLAYER_2D", @@ -13248,8 +13201,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "028D", "name": "LOCATE_COLL_ON_FOOT_PLAYER_2D", @@ -13257,8 +13209,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "028E", "name": "LOCATE_COLL_IN_CAR_PLAYER_2D", @@ -13266,8 +13217,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "028F", "name": "IS_COLL_IN_AREA_2D", @@ -13275,8 +13225,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0290", "name": "IS_COLL_IN_AREA_ON_FOOT_2D", @@ -13284,8 +13233,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0291", "name": "IS_COLL_IN_AREA_IN_CAR_2D", @@ -13293,8 +13241,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0292", "name": "IS_COLL_STOPPED_IN_AREA_2D", @@ -13302,8 +13249,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0293", "name": "IS_COLL_STOPPED_IN_AREA_ON_FOOT_2D", @@ -13311,8 +13257,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0294", "name": "IS_COLL_STOPPED_IN_AREA_IN_CAR_2D", @@ -14385,8 +14330,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "02C0", "name": "HAS_CAR_BEEN_TAKEN_TO_GARAGE", @@ -24283,8 +24227,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "048C", "name": "IS_REPLAY_PLAYING", @@ -24458,8 +24401,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0497", "name": "IS_PLAYER_FACING_CHAR", @@ -24578,8 +24520,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "049E", "name": "IS_PLAYER_STANDING_ON_A_VEHICLE", @@ -24587,8 +24528,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "049F", "name": "IS_PLAYER_FOOT_DOWN", @@ -24596,8 +24536,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04A0", "name": "IS_CHAR_FOOT_DOWN", @@ -24854,8 +24793,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04AC", "name": "IS_CHAR_IN_ANY_BOAT", @@ -24880,8 +24818,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04AE", "name": "IS_CHAR_IN_ANY_HELI", @@ -24906,8 +24843,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04B0", "name": "IS_CHAR_IN_ANY_PLANE", @@ -25439,8 +25375,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04C8", "name": "IS_PICKUP_IN_ZONE", @@ -25543,8 +25478,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04CD", "name": "IS_CHAR_IN_FLYING_VEHICLE", @@ -25569,8 +25503,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04CF", "name": "HAS_SONY_CD_BEEN_READ", @@ -25782,17 +25715,17 @@ ], "output": [ { - "name": "value", + "name": "nodeX", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "nodeY", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "nodeZ", "type": "float", "source": "var_any" } @@ -25952,8 +25885,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04E1", "name": "HAS_PHOTOGRAPH_BEEN_TAKEN", @@ -26463,8 +26395,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "04F7", "name": "IS_OBJECT_WAITING_FOR_WORLD_COLLISION", @@ -27188,8 +27119,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "051B", "name": "IS_MISSION_AUDIO_PLAYING", @@ -27386,8 +27316,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0525", "name": "IS_CAR_DROWNING_IN_WATER", @@ -27511,8 +27440,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "052C", "name": "IS_MISSION_AUDIO_LOADING", @@ -27959,8 +27887,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "054C", "name": "IS_CHAR_TOUCHING_VEHICLE", @@ -28167,8 +28094,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0558", "name": "IS_CAR_IN_ANGLED_AREA_2D", @@ -28176,8 +28102,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "0559", "name": "IS_CAR_IN_ANGLED_AREA_3D", @@ -28529,8 +28454,7 @@ }, { "attrs": { - "is_unsupported": true, - "is_condition": true + "is_unsupported": true }, "id": "056C", "name": "WAS_VEHICLE_EVER_POLICE", @@ -30374,12 +30298,12 @@ ], "output": [ { - "name": "value", + "name": "x", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "y", "type": "float", "source": "var_any" } @@ -30923,17 +30847,17 @@ ], "output": [ { - "name": "value", + "name": "rotX", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "rotY", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "rotZ", "type": "float", "source": "var_any" } @@ -31348,17 +31272,17 @@ { "output": [ { - "name": "value", + "name": "x", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "y", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "z", "type": "float", "source": "var_any" } @@ -32090,17 +32014,17 @@ ], "output": [ { - "name": "value", + "name": "x", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "y", "type": "float", "source": "var_any" }, { - "name": "value", + "name": "z", "type": "float", "source": "var_any" } @@ -32168,11 +32092,11 @@ "type": "int" }, { - "name": "number", + "name": "total", "type": "int" }, { - "name": "countUp", + "name": "type", "type": "int" }, { @@ -32289,23 +32213,23 @@ "type": "int" }, { - "name": "number", + "name": "total", "type": "int" }, { - "name": "number2", + "name": "type", "type": "int" }, { - "name": "countUp", + "name": "totalType", "type": "int" }, { - "name": "key", + "name": "key1", "type": "string" }, { - "name": "key", + "name": "key2", "type": "string" } ] @@ -32744,4 +32668,4 @@ "desc": "" } ] -} +} \ No newline at end of file diff --git a/lcs/version.txt b/lcs/version.txt index 5dfc1ae1c..5226e43ed 100644 --- a/lcs/version.txt +++ b/lcs/version.txt @@ -1 +1 @@ -0.17 \ No newline at end of file +0.18 \ No newline at end of file