board maker notice for dektop
authorhgn <hgodden00@gmail.com>
Tue, 17 Jun 2025 22:46:01 +0000 (23:46 +0100)
committerhgn <hgodden00@gmail.com>
Tue, 17 Jun 2025 22:46:01 +0000 (23:46 +0100)
src/board_maker.c
src/scripts/board_maker.c

index 4de30173d0be9d4cb70f83b78c598a4fdeed9848..34532cd42a1edfd6d14d977269ecd08100e59027 100644 (file)
@@ -907,6 +907,21 @@ void _board_maker_ui( ui_context *ctx )
 
 void _board_maker_open(void)
 {
+   if( vg_input.display_input_method == k_input_method_controller )
+   {
+      static bool hack = 0;
+      hack ^= 0x1;
+
+      if( hack )
+         gui_location_print_ccmd( 1, (const char *[]){ KRED "Must be using keyboard/mouse to access." } );
+      else
+         gui_location_print_ccmd( 1, (const char *[]){ KRED "Must be using keyboard/mouse to access. " } );
+      return;
+   }
+
+   if( !world_set_event( k_world_event_board_maker ) )
+      return;
+
    VG_ASSERT( _board_maker.state == k_board_maker_state_not_ready );
    VG_ASSERT( _board_maker.static_heap == NULL );
    VG_ASSERT( _board_maker.template_heap == NULL );
index 03dbf3efafdf5b661c9e0bdfffad2657764df2d3..6788e1ac8f94360a3dd169429b9c436619a50bc5 100644 (file)
@@ -17,22 +17,20 @@ static bool _skaterift_script_board_maker( ent_script_event *event )
             }
             ent_list *list = af_arritm( &world->ent_list, mdl_entity_id_id(list_id) );
 
-            if( world_set_event( k_world_event_board_maker ) )
+            struct ent_list_iter iter;
+            _ent_list_iter_start( &iter, list, k_ent_marker );
+            while( _ent_list_iter( &iter ) )
             {
-               struct ent_list_iter iter;
-               _ent_list_iter_start( &iter, list, k_ent_marker );
-               while( _ent_list_iter( &iter ) )
-               {
-                  ent_marker *marker = af_arritm( &world->ent_marker, iter.index );
-                  const char *alias = af_str( &world->meta.af, marker->pstr_alias );
+               ent_marker *marker = af_arritm( &world->ent_marker, iter.index );
+               const char *alias = af_str( &world->meta.af, marker->pstr_alias );
 
-                  if( !strcmp( alias, "$board_position" ) )
-                     v3_copy( marker->transform.co, _board_maker.origin );
-                  else if( !strcmp( alias, "$camera_position" ) )
-                     v3_copy( marker->transform.co, _board_maker.camera_pos );
-               }
-               _board_maker_open();
+               if( !strcmp( alias, "$board_position" ) )
+                  v3_copy( marker->transform.co, _board_maker.origin );
+               else if( !strcmp( alias, "$camera_position" ) )
+                  v3_copy( marker->transform.co, _board_maker.camera_pos );
             }
+
+            _board_maker_open();
          }
       }
    }