@@ -11,7 +11,7 @@ import { TextContext } from "@wayward/game/language/ITranslation";
1111import Translation from "@wayward/game/language/Translation" ;
1212import TranslationImpl from "@wayward/game/language/impl/TranslationImpl" ;
1313import Mod from "@wayward/game/mod/Mod" ;
14- import { ParticleType } from "@wayward/game/renderer/particle/IParticle" ;
14+ import { ParticlePhysics , ParticleType } from "@wayward/game/renderer/particle/IParticle" ;
1515import particles from "@wayward/game/renderer/particle/Particles" ;
1616import { BlockRow } from "@wayward/game/ui/component/BlockRow" ;
1717import Button from "@wayward/game/ui/component/Button" ;
@@ -57,6 +57,7 @@ export default class GeneralPanel extends DebugToolsPanel {
5757 private readonly checkButtonAudio : CheckButton ;
5858 private readonly dropdownAudio : Dropdown < SfxType > ;
5959 private readonly dropdownParticle : Dropdown < ParticleType > ;
60+ private readonly dropdownParticlePhysics : Dropdown < ParticlePhysics > ;
6061 private readonly dropdownLayer : Dropdown < WorldZ > ;
6162 private readonly dropdownTravel : IslandDropdown < string > ;
6263 private readonly checkButtonParticle : CheckButton ;
@@ -211,7 +212,7 @@ export default class GeneralPanel extends DebugToolsPanel {
211212 this . inspectButton . setChecked ( false , false ) ;
212213 this . checkButtonAudio . setChecked ( false , false ) ;
213214
214- return this . selectionLogic ( checked , tile => tile ?. createParticles ( particles [ this . dropdownParticle . selectedOption ] ) , ( ) => this . checkButtonParticle . checked ) ;
215+ return this . selectionLogic ( checked , tile => tile ?. createParticles ( particles [ this . dropdownParticle . selectedOption ] , this . dropdownParticlePhysics . selectedOption ) , ( ) => this . checkButtonParticle . checked ) ;
215216 } ) )
216217 . append ( this . dropdownParticle = new Dropdown < ParticleType > ( )
217218 . setRefreshMethod ( ( ) => ( {
@@ -221,6 +222,14 @@ export default class GeneralPanel extends DebugToolsPanel {
221222 . sort ( ( [ , t1 ] , [ , t2 ] ) => Text . toString ( t1 ) . localeCompare ( Text . toString ( t2 ) ) )
222223 . map ( ( [ id , t ] ) => Tuple ( id , ( option : Button ) => option . setText ( t ) ) ) ,
223224 } ) ) )
225+ . append ( this . dropdownParticlePhysics = new Dropdown < ParticlePhysics > ( )
226+ . setRefreshMethod ( ( ) => ( {
227+ defaultOption : ParticlePhysics . Fall ,
228+ options : Enums . values ( ParticlePhysics )
229+ . map ( physics => Tuple ( physics , TranslationImpl . generator ( ParticlePhysics [ physics ] ) ) )
230+ . sort ( ( [ , t1 ] , [ , t2 ] ) => Text . toString ( t1 ) . localeCompare ( Text . toString ( t2 ) ) )
231+ . map ( ( [ id , t ] ) => Tuple ( id , ( option : Button ) => option . setText ( t ) ) ) ,
232+ } ) ) )
224233 . appendTo ( this ) ;
225234 }
226235
0 commit comments