From 0a41d8b60d1702cbcd79acde4a93ea3f4ae65f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pl=C3=BCss=20Roland?= Date: Sun, 2 Jun 2024 14:28:15 +0200 Subject: [PATCH] cleaning up and adding visual studio code workspace files --- audioTest/audioTest.code-workspace | 10 +++++++++ .../data/scripts/DragonessActionHearPlayer.ds | 13 +++++------ audioTest/data/scripts/PlayerActorAction.ds | 6 ++--- .../scripts/DialogEditTestConfiguration.ds | 10 ++++----- degraphicstest/degraphicstest.code-workspace | 10 +++++++++ exampleApp/data/scripts/CowardlyActorAI.ds | 4 ---- .../data/scripts/PlayerActionCustomColor.ds | 1 - .../scripts/PlayerActionInteractToggle.ds | 1 - exampleApp/exampleApp.code-workspace | 10 +++++++++ exampleVR/data/scripts/action/HAHoldObject.ds | 2 +- .../scripts/behavior/ECBHighlightPointedAt.ds | 1 - exampleVR/exampleVR.code-workspace | 10 +++++++++ network/.kdev4/network.kdev4 | 5 ----- network/data/scripts/JoinGame.ds | 2 +- network/data/scripts/NetworkPlayerClient.ds | 22 +++++++++---------- network/network.code-workspace | 10 +++++++++ network/network.kdev4 | 3 --- videoplayer/videoplayer.code-workspace | 10 +++++++++ 18 files changed, 87 insertions(+), 43 deletions(-) create mode 100644 audioTest/audioTest.code-workspace create mode 100644 degraphicstest/degraphicstest.code-workspace create mode 100644 exampleApp/exampleApp.code-workspace create mode 100644 exampleVR/exampleVR.code-workspace delete mode 100644 network/.kdev4/network.kdev4 create mode 100644 network/network.code-workspace delete mode 100644 network/network.kdev4 create mode 100644 videoplayer/videoplayer.code-workspace diff --git a/audioTest/audioTest.code-workspace b/audioTest/audioTest.code-workspace new file mode 100644 index 0000000..32e499f --- /dev/null +++ b/audioTest/audioTest.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "data" + } + ], + "settings": { + "dragonscriptLanguage.requiresPackageDragengine": true + } +} \ No newline at end of file diff --git a/audioTest/data/scripts/DragonessActionHearPlayer.ds b/audioTest/data/scripts/DragonessActionHearPlayer.ds index 17d5b5b..23cdd78 100644 --- a/audioTest/data/scripts/DragonessActionHearPlayer.ds +++ b/audioTest/data/scripts/DragonessActionHearPlayer.ds @@ -131,13 +131,13 @@ class DragonessActionHearPlayer extends DragonessAction implements SoundLevelMet // player. For this reason we do a full navigation path finding here although it // is potentially an expensive operation. Doing this often for many actors is most // probably a bad idea but doing it once per frame update is not a problem - var Navigator navigator = navigator.getNavigator() - var NavigationInfo navinfo = navigator.nearestPoint(player.getPosition(), 10) + var Navigator nav = navigator.getNavigator() + var NavigationInfo navinfo = nav.nearestPoint(player.getPosition(), 10) if navinfo == null return end var NavigatorPath path = NavigatorPath.new() - navigator.findPath(path, actor.getPosition(), navinfo.getPosition()) + nav.findPath(path, actor.getPosition(), navinfo.getPosition()) if path.getLength() > capturePlayerDistance return @@ -176,12 +176,11 @@ class DragonessActionHearPlayer extends DragonessAction implements SoundLevelMet // though only make the actor look at this location. By calling forceBodyAdjustment() the // locomotion is forced to adjust the body until the looking left-right become 0. // Doing it this way lets the locomotion do a smooth turning - var Locomotion locomotion = locomotion.getLocomotion() + var Locomotion loco = locomotion.getLocomotion() var DVector direction = (player.getElementMatrix() * actor.getInverseElementMatrix()) * DVector.new(0, 0, 0.5) var float orientation = -DEMath.atan2(direction.getX(), direction.getZ()) - var float lookHorizontal = DEMath.normalize(orientation, -180.0, 180.0) - locomotion.setLookHorizontalGoal(orientation) - locomotion.forceBodyAdjustment() + loco.setLookHorizontalGoal(orientation) + loco.forceBodyAdjustment() BaseGameApp.getApp().getTriggerTable().getOrAddNamed(StringID.new("caughtPlayer")).fire() end diff --git a/audioTest/data/scripts/PlayerActorAction.ds b/audioTest/data/scripts/PlayerActorAction.ds index c8c5b6a..68bdf62 100644 --- a/audioTest/data/scripts/PlayerActorAction.ds +++ b/audioTest/data/scripts/PlayerActorAction.ds @@ -118,9 +118,9 @@ class PlayerActorAction extends BAAFirstPerson implements BAAInteract /** \brief Start primary action. */ public func void primaryActionStart() - var PlayerActor actor = getActor() cast PlayerActor - if actor.lookAt.hasLookAtElement() - actor.lookAt.getLookAtElement().visit(InteractPrimaryAction.new(actor)) + var PlayerActor player = getActor() cast PlayerActor + if player.lookAt.hasLookAtElement() + player.lookAt.getLookAtElement().visit(InteractPrimaryAction.new(player)) end end diff --git a/degraphicstest/data/scripts/DialogEditTestConfiguration.ds b/degraphicstest/data/scripts/DialogEditTestConfiguration.ds index 785e8ad..35174d9 100644 --- a/degraphicstest/data/scripts/DialogEditTestConfiguration.ds +++ b/degraphicstest/data/scripts/DialogEditTestConfiguration.ds @@ -476,11 +476,11 @@ class DialogEditTestConfiguration extends WindowDialog info.add( "No module parameter with this name exists" ) end - var String message = info.fold( block String folded, String each + var String msg = info.fold( block String folded, String each return folded + "\n" + each end ) cast String - WindowDialog.message( this, "Module Parameter '" + name + "'", message, null, null, null ) + WindowDialog.message( this, "Module Parameter '" + name + "'", msg, null, null, null ) end /** \brief Add parameter. */ @@ -652,10 +652,10 @@ class DialogEditTestConfiguration extends WindowDialog LoadTestConfiguration.new().saveToFile( windowUI.getPathTestConfiguration(), pTestConfiguration ) catch Exception e - var String message = "Failed saving test configuration to '" \ + var String msg = "Failed saving test configuration to '" \ + windowUI.getPathTestConfiguration() + "'." - BaseGameApp.getApp().getConsole().addError( message, e ) - WindowDialog.message( this, "Save Test Configuration", message, null, null, null ) + BaseGameApp.getApp().getConsole().addError( msg, e ) + WindowDialog.message( this, "Save Test Configuration", msg, null, null, null ) return false end diff --git a/degraphicstest/degraphicstest.code-workspace b/degraphicstest/degraphicstest.code-workspace new file mode 100644 index 0000000..32e499f --- /dev/null +++ b/degraphicstest/degraphicstest.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "data" + } + ], + "settings": { + "dragonscriptLanguage.requiresPackageDragengine": true + } +} \ No newline at end of file diff --git a/exampleApp/data/scripts/CowardlyActorAI.ds b/exampleApp/data/scripts/CowardlyActorAI.ds index 5af747b..b50f1fc 100644 --- a/exampleApp/data/scripts/CowardlyActorAI.ds +++ b/exampleApp/data/scripts/CowardlyActorAI.ds @@ -74,8 +74,6 @@ class CowardlyActorAI extends BAAIBehaviorTree end public func BTResult runAction( BTContext context, Dictionary parameters ) - var CowardlyActorAI ai = getAI() cast CowardlyActorAI - if context.getActionFirstRun() if not DEMath.probability( 0.25 ) return BTResult.failure // action launcher but missed chance @@ -155,8 +153,6 @@ class CowardlyActorAI extends BAAIBehaviorTree end protected func BTResult moveStart( bool run ) - var CowardlyActorAI ai = getAI() cast CowardlyActorAI - var DVector player = BaseGameApp.getApp().getPlayerControlledActor().getActor().getElement().getPosition() var float distance = 8 var DVector vector = getActor().getPosition() - player diff --git a/exampleApp/data/scripts/PlayerActionCustomColor.ds b/exampleApp/data/scripts/PlayerActionCustomColor.ds index e766e34..dc4c1d7 100644 --- a/exampleApp/data/scripts/PlayerActionCustomColor.ds +++ b/exampleApp/data/scripts/PlayerActionCustomColor.ds @@ -237,7 +237,6 @@ class PlayerActionCustomColor extends BAAFirstPerson - public var ECBehaviorActorMover.Instance actorMover public var ECBehaviorAlignActor.Instance alignActor public var ECBehaviorOccupier.Instance occupier public var BehaviorChangeCustomColors.Instance changeCustomColors diff --git a/exampleApp/data/scripts/PlayerActionInteractToggle.ds b/exampleApp/data/scripts/PlayerActionInteractToggle.ds index 74b94db..7ae7ba4 100644 --- a/exampleApp/data/scripts/PlayerActionInteractToggle.ds +++ b/exampleApp/data/scripts/PlayerActionInteractToggle.ds @@ -52,7 +52,6 @@ class PlayerActionInteractToggle extends BAAFirstPerson end - public var ECBehaviorActorMover.Instance actorMover public var ECBehaviorAlignActor.Instance alignActor public var ECBehaviorOccupier.Instance occupier public var BehaviorInteractToggle.Instance interactToggle diff --git a/exampleApp/exampleApp.code-workspace b/exampleApp/exampleApp.code-workspace new file mode 100644 index 0000000..32e499f --- /dev/null +++ b/exampleApp/exampleApp.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "data" + } + ], + "settings": { + "dragonscriptLanguage.requiresPackageDragengine": true + } +} \ No newline at end of file diff --git a/exampleVR/data/scripts/action/HAHoldObject.ds b/exampleVR/data/scripts/action/HAHoldObject.ds index 5a9b28c..9a2b43d 100644 --- a/exampleVR/data/scripts/action/HAHoldObject.ds +++ b/exampleVR/data/scripts/action/HAHoldObject.ds @@ -216,7 +216,7 @@ class HAHoldObject extends BaseVRHandAction implements BAAVRGrab // Doing a strong throw move with VR gear is between between 2.8 and 4 m/s. // A gentle throw move with VR gear is between 1.6 and 2.8 m/s. We use thus // a range between 1.5 and 4 m/s as throwing range - var float speedThrowGentle = 1.5 + // var float speedThrowGentle = 1.5 var float speedThrowStrong = 4 // Increase speed to make it easier with VR gear to throw objects. The actual diff --git a/exampleVR/data/scripts/behavior/ECBHighlightPointedAt.ds b/exampleVR/data/scripts/behavior/ECBHighlightPointedAt.ds index db1fc6a..d1cbc3c 100644 --- a/exampleVR/data/scripts/behavior/ECBHighlightPointedAt.ds +++ b/exampleVR/data/scripts/behavior/ECBHighlightPointedAt.ds @@ -72,7 +72,6 @@ class ECBHighlightPointedAt extends DefaultECBehavior throw ENullPointer.new("vrHandPointedAt") end - var String prefix = "highlightPointedAt." pVRHandPointedAt = vrHandPointedAt pOutline = ECBehaviorOutline.new(eclass, component, collider, "highlightPointedAt") diff --git a/exampleVR/exampleVR.code-workspace b/exampleVR/exampleVR.code-workspace new file mode 100644 index 0000000..32e499f --- /dev/null +++ b/exampleVR/exampleVR.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "data" + } + ], + "settings": { + "dragonscriptLanguage.requiresPackageDragengine": true + } +} \ No newline at end of file diff --git a/network/.kdev4/network.kdev4 b/network/.kdev4/network.kdev4 deleted file mode 100644 index b3634a8..0000000 --- a/network/.kdev4/network.kdev4 +++ /dev/null @@ -1,5 +0,0 @@ -[Buildset] -BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x1c\x00n\x00e\x00t\x00w\x00o\x00r\x00k\x00e\x00x\x00a\x00m\x00p\x00l\x00e) - -[Project] -VersionControlSupport=kdevgit diff --git a/network/data/scripts/JoinGame.ds b/network/data/scripts/JoinGame.ds index 9c1d208..50ac566 100644 --- a/network/data/scripts/JoinGame.ds +++ b/network/data/scripts/JoinGame.ds @@ -124,7 +124,7 @@ class JoinGame extends WindowGameWorld.Loader */ public func void onLoadWorldFinished() var GameApp app = BaseGameApp.getApp() cast GameApp - var GameWorld gameWorld = getStubWorld().getGameWorld() + // var GameWorld gameWorld = getStubWorld().getGameWorld() // Set dummy camera directory until fully joined. // getWindow().setCameraDirector( FixedCameraDirector.new( DVector.new( 0, 2, 0 ), Quaternion.new() ) ) diff --git a/network/data/scripts/NetworkPlayerClient.ds b/network/data/scripts/NetworkPlayerClient.ds index 7eeaa74..fe3430e 100644 --- a/network/data/scripts/NetworkPlayerClient.ds +++ b/network/data/scripts/NetworkPlayerClient.ds @@ -122,25 +122,25 @@ class NetworkPlayerClient extends NetworkPlayer + playerState.id + " pathWorldFile=" + requestLoadGameWorld ) case NetworkPlayer.MessageCode.playerJoined - var PlayerState playerState = PlayerState.new( UniqueID.readFromFile( reader ) ) - playerState.name = UnicodeString.newFromUTF8( reader.readString16() ) - app.gameState.players.add( playerState ) + var PlayerState pstate = PlayerState.new( UniqueID.readFromFile( reader ) ) + pstate.name = UnicodeString.newFromUTF8( reader.readString16() ) + app.gameState.players.add( pstate ) app.getConsole().addMessage( "received player joined: playerID=" \ - + playerState.id + " name='" + playerState.name + "'" ) + + pstate.id + " name='" + pstate.name + "'" ) case NetworkPlayer.MessageCode.playerLeft - var PlayerState playerState = GameState.getGameState().getPlayer( UniqueID.readFromFile( reader ) ) + var PlayerState pstate = GameState.getGameState().getPlayer( UniqueID.readFromFile( reader ) ) app.getConsole().addMessage( "received player left: playerID=" \ - + playerState.id + " name='" + playerState.name + "'" ) - app.gameState.players.remove( playerState ) - playerState.dispose() + + pstate.id + " name='" + pstate.name + "'" ) + app.gameState.players.remove( pstate ) + pstate.dispose() case NetworkPlayer.MessageCode.spawnActor - var PlayerState playerState = GameState.getGameState().getPlayer( UniqueID.readFromFile( reader ) ) + var PlayerState pstatet = GameState.getGameState().getPlayer( UniqueID.readFromFile( reader ) ) var String spawnName = reader.readString8() app.getConsole().addMessage( "received spawn actor: playerID=" \ - + playerState.id + " spawn='" + spawnName + "'" ) - playerState.spawnActor( spawnName ) + + pstatet.id + " spawn='" + spawnName + "'" ) + pstatet.spawnActor( spawnName ) else dispose() diff --git a/network/network.code-workspace b/network/network.code-workspace new file mode 100644 index 0000000..32e499f --- /dev/null +++ b/network/network.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "data" + } + ], + "settings": { + "dragonscriptLanguage.requiresPackageDragengine": true + } +} \ No newline at end of file diff --git a/network/network.kdev4 b/network/network.kdev4 deleted file mode 100644 index c85b52e..0000000 --- a/network/network.kdev4 +++ /dev/null @@ -1,3 +0,0 @@ -[Project] -Name=network -Manager=KDevGenericManager diff --git a/videoplayer/videoplayer.code-workspace b/videoplayer/videoplayer.code-workspace new file mode 100644 index 0000000..32e499f --- /dev/null +++ b/videoplayer/videoplayer.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "data" + } + ], + "settings": { + "dragonscriptLanguage.requiresPackageDragengine": true + } +} \ No newline at end of file