PhantomGamesDevelopment / TWM2

Total Warfare Mod 2 for Tribes 2
0 stars 0 forks source link

Validator Warnings Worth Looking At #10

Open Ragora opened 8 years ago

Ragora commented 8 years ago

Been fiddling with my Torque Script validator / reference generator and TWM2 came to mind as a possible test subject considering its recent revival on your servers. Here is the various things the thing had a bone to pick about (note that its still a WIP project so some of these may be false positives, but so far I haven't found conditions where the system is completely wrong):

INFO: Processing '/home/ragora/Desktop/TWM2/' ... INFO: Building file list for directory '/home/ragora/Desktop/TWM2/' ... INFO: Performing parse stage ... INFO: Performing declaration analysis. ... Warning: Global function 'dropplayeratcamera' redeclared in /home/ragora/Desktop/TWM2/scripts/controlDefaults.cs, line 1075! (Original declaration in /home/ragora/Desktop/TWM2/scripts/controlDefaults.cs, line 1063) Warning: Bound function 'doordeployableimage::onmount' redeclared in /home/ragora/Desktop/TWM2/scripts/packs/door.cs, line 327! (Original declaration in /home/ragora/Desktop/TWM2/scripts/packs/door.cs, line 83) Warning: Bound function 'doordeployableimage::onunmount' redeclared in /home/ragora/Desktop/TWM2/scripts/packs/door.cs, line 337! (Original declaration in /home/ragora/Desktop/TWM2/scripts/packs/door.cs, line 94) Warning: Bound function 'bomberbombimage::onunmount' redeclared in /home/ragora/Desktop/TWM2/scripts/weapTurretCode.cs, line 422! (Original declaration in /home/ragora/Desktop/TWM2/scripts/weapTurretCode.cs, line 375) Warning: Bound function 'bomberbombpairimage::onunmount' redeclared in /home/ragora/Desktop/TWM2/scripts/weapTurretCode.cs, line 426! (Original declaration in /home/ragora/Desktop/TWM2/scripts/weapTurretCode.cs, line 379) Warning: Datablock 'grenadeswitchsound' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/grenadeLauncher.cs:8 In /home/ragora/Desktop/TWM2/scripts/weapons/Grenades/grenade.cs:10 Warning: Datablock 'shocklanceswitchsound' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:6 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:6 Warning: Datablock 'napalmexplosion' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/vehicles/vehicle_strikeFighter.cs:649 In /home/ragora/Desktop/TWM2/scripts/TWM2/Bosses/GhostOfFire.cs:121 Warning: Datablock 'shocklancemisssound' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:36 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:36 Warning: Datablock 'shockparticleemitter' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:105 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:105 Warning: Datablock 'basicshocker' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:155 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:155 Warning: Datablock 'shocklance' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:270 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:199 Warning: Datablock 'ssturretbasesensorobj' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/vehicles/vehicle_Stormseige.cs:1 In /home/ragora/Desktop/TWM2/scripts/vehicles/vehicle_helicopter.cs:238 Warning: Datablock 'shocklanceimage' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:285 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:214 Warning: Datablock 'shockparticle' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:47 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:47 Warning: Datablock 'shocklancehitsound' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:16 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:16 Warning: Datablock 'shocklancehit' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:123 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:123 Warning: Datablock 'shocklancedryfiresound' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:29 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:29 Warning: Datablock 'shocklancereloadsound' redeclared 2 times! In /home/ragora/Desktop/TWM2/scripts/weapons/T2Guns/shockLance.cs:22 In /home/ragora/Desktop/TWM2/scripts/weapons/Pistols/shocklance.cs:22 INFO: Performing datablock inheritance analysis ... INFO: Performing datablock reference analysis ... Inherited Property Warning: runninglightdata Datablock mpblight1 'radius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/vehicles/vehicle_mpb.cs, line 67) Inherited Property Warning: runninglightdata Datablock mpblight2 'radius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/vehicles/vehicle_mpb.cs, line 74) Property Warning (Datablock 'satchelchargethrown', type itemdata. Declaration in /home/ragora/Desktop/TWM2/scripts/packs/satchelCharge.cs, line 632): Items should have >= 1 pickup radius. Property Warning (Datablock 'escapepodvehicle', type hovervehicledata. Declaration in /home/ragora/Desktop/TWM2/scripts/vehicles/vehicle_escapepod.cs, line 2): floatThrustFactor must be >= 0 && <= 1.0 Property Warning (Datablock 'c4deployed', type itemdata. Declaration in /home/ragora/Desktop/TWM2/scripts/weapons/Equipment/C4.cs, line 1): Items should have >= 1 pickup radius. Inherited Property Warning: itemdata Datablock deployedlight 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 38) Inherited Property Warning: itemdata Datablock deployedlight0 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 49) Inherited Property Warning: itemdata Datablock deployedlight1 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 53) Inherited Property Warning: itemdata Datablock deployedlight2 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 57) Inherited Property Warning: itemdata Datablock deployedlight3 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 61) Inherited Property Warning: itemdata Datablock deployedlight4 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 65) Inherited Property Warning: itemdata Datablock deployedlight5 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 69) Inherited Property Warning: itemdata Datablock deployedlight6 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 73) Inherited Property Warning: itemdata Datablock deployedlight7 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 79) Inherited Property Warning: itemdata Datablock deployedlight8 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 86) Inherited Property Warning: itemdata Datablock deployedlight9 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 93) Inherited Property Warning: itemdata Datablock deployedlight10 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 100) Inherited Property Warning: itemdata Datablock deployedlight11 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 107) Inherited Property Warning: itemdata Datablock deployedlight12 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 114) Inherited Property Warning: itemdata Datablock deployedlight13 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/packs/lightpack.cs, line 121) Inherited Property Warning: itemdata Datablock shocklight0 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/ion.cs, line 254) Inherited Property Warning: itemdata Datablock shocklight1 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/ion.cs, line 261) Inherited Property Warning: itemdata Datablock shocklight2 'pickupradius' property not declared and parent datablocks do not declare it! (Declaration in /home/ragora/Desktop/TWM2/scripts/ion.cs, line 268) INFO: Done. INFO: Exporting data ... Done processing. Operation Completion----------------------- 4.519556 Seconds

Happy bug hunting. And yes, there is a known bug where it confuses packaged functions for redeclarations -- I just need to make the current regex take into consideration outer package blocks.

The warning list is rather small, but that's because there is hardly any property validators active in the codebase right now.

And the web output is much less fine tuned (this isn't TWM2 at this link): http://dx.no-ip.org/out/scripts/deployables.html

Ragora commented 8 years ago

I fine tuned the rules a little bit better and added optional rules, so it should be a little less pedantic in the report above.

Phantom139 commented 7 years ago

As I've gotten some renewed interest in TWM2 lately, I've decided to proceed with my plans for the 3.91 / 3.92 (Originally titled 3.9a / 3.9b) releases. I'll add this to my to-do list for that.

Ragora commented 7 years ago

I have a WIP code base that would have the capacity to perform much more in depth analysis at https://github.com/Ragora/Python-TorqueScript but I need to find time to work on it.