Commit graph

521 commits

Author SHA1 Message Date
Brian Roberts 06e4ce01a9
Merge pull request #1024 from Azaezel/alpha41/TypeHints
add TypeHints for scenetree viewing
2023-06-02 10:46:33 -05:00
AzaezelX f79c6280b3 fix strrepeat <0 2023-05-25 18:38:45 -05:00
AzaezelX b1f118898e add TypeHints for inspector viewing
typehints operate as an additional label for a given class in the inspector, allowing one to specify what class-entry to use as a tag
examples: Prefab displays prefab filename
TSStatic displays the used shape asset name
SFXEmitter displays the played sound asset
GameBase derivatives display the datablock used
2023-05-23 12:35:07 -05:00
Brian Roberts 0d981b62cf
Merge pull request #1015 from Azaezel/alpha41/consoleCleanups
fix warn reports for buffer over-runs
2023-05-09 14:44:01 -05:00
AzaezelX b86716c670 further console cleanups. mostly of the form of correcting uninitialized values. some arithmatic sizes
(cherry picked from commit 833149e962d165aa4c10e6c760bb1a1116d1baf8)
2023-05-01 10:41:33 -05:00
AzaezelX fed381c945 more console cleanups
(cherry picked from commit a66ff6407cdcdf233996f49c74d7a42537314562)
2023-04-28 17:16:48 -05:00
AzaezelX 0ce2da3a23 clean up math varsize complaints 2023-04-27 16:10:04 -05:00
AzaezelX 339393aa85 adress https://github.com/TorqueGameEngines/Torque3D/pull/1015#discussion_r1179352178
docs for CodeBlock::calcBreakList() sizing
2023-04-27 11:12:24 -05:00
AzaezelX 9e036f142b fix warn reports for buffer oveeruns
also misc uninitialized vars
2023-04-26 22:29:32 -05:00
Brian Roberts 43b38bb8fb
Merge pull request #1007 from Azaezel/alpha41/miscFixes08-04-2023
misc warn fixes
2023-04-08 14:19:35 -05:00
AzaezelX a956264bbc misc warn fixes
parser had a few spots where it was throwing int compares to ints instead of bools for logical and/ors. not bitwise ones.
_dumpDirectories had a stray itterator dupe
2023-04-08 12:39:09 -05:00
Lukas Aldershaab 0550eb3109 Cleanup 2023-04-08 01:02:23 +02:00
Lukas Aldershaab 1d28ddf734 Cleanup and improve 2023-04-06 15:28:09 +02:00
AzaezelX 25e96b613b better callback filtering for getMethodSigs
add a bool filter to getMethodSigs so it can also return script commands

example code reminder note:

//MainMenuGui.getPrototypeList();
//MainMenuGui.getPrototypeDef("onAdd");
function simObject::getPrototypeList(%this)
{
      %methodArray = %this.getMethodSigs();
      %methodCount = %methodArray.count();
      for (%i=0;%i<%methodCount;%i++)
      {
         %methodDef = getRecord(%methodArray.getValue(%i),0);
         %methodName = strreplace(%methodDef,"::"," ");
         %methodName = getWord(strreplace(%methodName,"("," "),2);
         warn(%methodName);
      }
}

function simObject::getPrototypeDef(%this, %funcName)
{
      %methodArray = %this.getMethodSigs();
      %methodCount = %methodArray.count();
      for (%i=0;%i<%methodCount;%i++)
      {
         %methodDef = %methodArray.getValue(%i);
         %methodName = strreplace(%methodDef,"::"," ");
         %methodName = getWord(strreplace(%methodName,"("," "),2);
         if (%funcName $= %methodName)
            warn(%methodDef);
      }
}
2023-03-15 00:14:20 -05:00
Brian Roberts 6cb34ab3e9
Merge pull request #988 from Azaezel/alpha41/getDirectoryList
fix getDirectoryList
2023-03-11 13:24:28 -06:00
AzaezelX 4572a0c774 fix getDirectoryList
used dStrcat (note: not dStrncat, so there the buffer destination size *is* the third var)
2023-03-11 12:48:57 -06:00
AzaezelX 7872f01689 since we do in fact allow arbitrary tack on variables to scriptobject derivatives, and thus tamls, reporting theres a non hardcoded variable entry is actively counterproductive to flexibility.
plus minor format fix
2023-03-07 16:10:46 -06:00
Brian Roberts b257ac3d1e
Merge pull request #979 from mjunix/small-fixes
Small fixes
2023-03-06 19:31:07 -06:00
Brian Roberts 59ed9ee7b6
Merge pull request #982 from Areloch/OnInspectEditorLogic
Adds logic and handling for Inspected SimObjects to be able to injectnew InspectorGroups and InspectorFields when being inspected for editing.
2023-03-04 20:07:25 -06:00
Areloch 3991019912 Adds logic and handling for Inspected SimObjects to be able to inject new InspectorGroups and InspectorFields when being inspected for editing.
Allows for expanded editing capabilities of existing classes without needing to add static fields to classes
2023-03-04 19:04:44 -06:00
Johan Mattsson 2efd5f0acd
Fix potential index out of bounds 2023-03-04 22:03:17 +01:00
Johan Mattsson acc2e73f48
Release memory 2023-03-04 21:53:02 +01:00
Johan Mattsson 518f2c6a27
Release memory 2023-03-04 21:51:56 +01:00
AzaezelX f77fa1f286 fix isFile detection, and aug for script extension searching 2023-02-23 16:59:10 -06:00
AzaezelX a8e74787b7 new method, getMethodSigs. spits out callback proto-functions 2023-02-15 17:38:45 -06:00
AzaezelX 0d35016795 fix needing to doubleclick to bring up a docs link 2023-01-28 16:15:59 -06:00
AzaezelX 1b33b01eb1 add "docsURL" filter to assignFieldsFrom to prevent it from triggering opening web pages when inheriting values 2023-01-28 16:12:05 -06:00
AzaezelX f5a34308f9 add a docsURL; macro to link a given set of script config vars to git or similar storage urls via clicking on the inspector 2023-01-27 01:13:15 -06:00
Jeff Hutchinson 1940becb2d Compilation fixes for C++20 2022-11-28 21:39:06 -05:00
Robert MacGregor 2b8f9e3999 Merge https://github.com/TorqueGameEngines/Torque3D into feature-vfs-security 2022-06-15 18:12:39 -04:00
AzaezelX a808990bc6 you want the higher number, not the lower 2022-06-15 16:46:54 -05:00
AzaezelX c91002d5ec fix out of bounds reference in arrayobject 2022-06-13 21:10:28 -05:00
Robert MacGregor bd3a990140 * BugFix: Correct the 'gotoWebPage' function not using the VFS. 2022-06-13 12:21:06 -04:00
Robert MacGregor 1cd2b3ead9 * BugFix: Correct a small typo in the script function 'compareFileTimes'. 2022-06-13 11:45:05 -04:00
Robert MacGregor a390e0d8d5 * BugFix: Correct script function 'compareFileTimes' not going through the VFS when making the comparisons. 2022-06-13 11:43:43 -04:00
Robert MacGregor 161ffc62fe Merge branch 'Preview4_0' into feature-vfs-security 2022-06-13 08:05:26 -04:00
Jeff Hutchinson 8f2beb3219 Fix edgecase where empty string was not being explicitly set to 0 in torquescript when used as integers/floats/bools.
We found this in the setInventory standard module. in setInventory, %max was being set to empty string, but being compared to 0 during TorqueScript comparison ops. I knew to look in ConsoleValue's type conversion functions, as the interpreter internally uses ConsoleValues when working with torquescript variables under the hood. ConsoleValue is responsible for handling all type conversions on the fly as needed inside of the core interpreter logic.
2022-05-23 20:25:32 -04:00
Jeff Hutchinson 3988e7baee Better allocator for TorqueScript temp conversions used during interpretation
instead of using a Vector<> that never frees and grows for torquescript temporaries created when doing type conversions)
2022-05-21 21:55:44 -04:00
Jeff Hutchinson 59125c85eb Fix weird ternary operator in torquescript regression
With a test!
2022-04-27 21:02:55 -04:00
JeffR 5c8d8fab00 Changes behavior with suffix appending of asset importer so it doesn't contaminate the original "clean" name, which is used for setting the mapTo value of material definitions
Also adds a sanity check when applying the type suffix to see if it's already there to avoid needless doubleups
Fixes offsetting/positioning behavior on icon buttons to actually respect the icon position variable
Adds sanity checks to ensure we're not trying to utilize a in-process-of-deleting decoy dummy
Fixes handling of sliders in option menus to properly store and test unapplied values
Fixes handling of display device setting to properly store and test unapplied values
Adds additional logic to creation of shape and material asset previews to attempt to force-load dependencies to improve likelihood that they'll actually be loaded when we go to generate the preview.
Temp disables creating cubemap 'assets' via the RMB context menu in the AB
2022-04-10 01:40:15 -05:00
JeffR bfe3d4d02b Shifts handling of forest brush and item elements into standard simsets for consistency
Updates the forest editor tooling to utilize the new sets, and adjusts the creation of new Brushes in the forest editor to have user select a target module first.
This ensures all a module's brushes are grouped into the new ForestBrushGroup class which auto-registers into the ForestBrushSet, thus allowing modules to have their own sets of brushes that automatically hook into the editor workflow.
2022-04-07 18:19:13 -05:00
AzaezelX d883575d0f fix compilation flaws 2022-03-17 17:38:41 -05:00
Brian Roberts 3411dab754
Merge pull request #742 from Areloch/invisibleFileFix
Tweaks handling of "invisible" files
2022-03-16 03:30:45 -05:00
JeffR b36776d567 Tweaks handling of "invisible" files, files which start with a ., effectively making them have no filename and only an extension.
This allows the engine to actually process and work with such files.
2022-03-15 21:17:37 -05:00
JeffR 1496ffac6e Adds a systemCommand console utility function, which invokes the standard system() function call, and also has an optional callback return parameter. 2022-03-15 21:10:55 -05:00
JeffR a0f8b29da7 Improves logical checks for the default value so it's more sane and stable
Allows creation of polyhedrons via constructor with a origin and vector format, allowing to have default polyhedron values on triggers and physical zones
2022-02-14 01:07:39 -06:00
JeffR 696c2e2eec Add sanity check for default value results checking when filtering out default values
Add additional utility functions for updating parsed object data in the project importer
Adds logic to find and associate FX materials to their terrainMaterials and adding them to the terrian material asset if found on project importer
2022-02-02 01:11:33 -06:00
JeffR b4e346aa3f Adjustments to save out code when writing fields such that if the TAML writer is marked as not writing defaults, it doesn't. And makes the regular simobject save out not write default values as the default behavior 2022-01-31 20:57:57 -06:00
JeffR 630285def6 Shifts handling of material and terrain material definitions to be written into the asset definition taml file instead of having an extra loose file
Also updates importers to correctly handle this change
Adds ability for taml XML serialization to properly assign array'd fields
Adds 'inheritFrom' field to simobjects for when objects with parent objects are serialized
AssetBase how inherits from SimGroup so it can have objects like material definitions embedded in them for save/load in the taml definition file
Updated loading/handling logic in terrain material asset to be more similar to regular material assets
2022-01-30 11:50:16 -06:00
JeffR ed13bdfdd2 Changes the -> syntax check from exclusively checking simgroups to checking simsets, allowing both to be used 2022-01-21 16:01:44 -06:00