From: hgn Date: Tue, 13 May 2025 19:02:26 +0000 (+0100) Subject: board maker in t he hub X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=0c8b49374acf047003aa0252a6cee429559c2264;p=carveJwlIkooP6JGAAIwe30JlM.git board maker in t he hub --- diff --git a/content_skaterift/maps/dev_hub/main.mdl b/content_skaterift/maps/dev_hub/main.mdl index 5dc735a..42fbf25 100644 Binary files a/content_skaterift/maps/dev_hub/main.mdl and b/content_skaterift/maps/dev_hub/main.mdl differ diff --git a/src/ent_npc.c b/src/ent_npc.c index 6427496..311b0fe 100644 --- a/src/ent_npc.c +++ b/src/ent_npc.c @@ -116,6 +116,15 @@ static _gino_contexts[] = { NULL, NULL }, } }, + { + "boardmaker", .subtitles = (const cs_subtitle[]) + { + { "a1", KCOL_JESUS "Now that you know how to make boards" }, + { "a2", KCOL_JESUS "We moved a workshop in upstairs.." }, + { "a3", KCOL_JESUS ":)" }, + { NULL, NULL }, + } + }, /* VOLCANO world */ { diff --git a/src/player_remote.c b/src/player_remote.c index 08f2df0..618b663 100644 --- a/src/player_remote.c +++ b/src/player_remote.c @@ -1120,7 +1120,8 @@ void remote_players_chat_imgui( ui_context *ctx ) } else { - if( (skaterift.activity == k_skaterift_default) && button_down( k_srbind_chat ) ) + if( (skaterift.activity == k_skaterift_default) && button_down( k_srbind_chat ) && + (_world.event != k_world_event_board_maker) ) { netplayers.chatting = 1; netplayers.chat_buffer[0] = '\0'; diff --git a/src/scripts/hub.c b/src/scripts/hub.c index 9c58b20..690e76c 100644 --- a/src/scripts/hub.c +++ b/src/scripts/hub.c @@ -106,5 +106,36 @@ static bool _skaterift_script_hub( ent_script_event *event ) return 1; } + u64 status; + if( on_nugget_changed( event, "board_maker_unlock", &status ) ) + { + ent_list *list = _ent_list_get_aliased( "gino_board_maker" ); + bool visible = 0; + + if( status ) + { + u64 view = _skaterift_script_nugget_status( "board_maker_hub_view" ); + if( view == 0 ) + visible = 1; + } + + _ent_list_set_visible( list, visible ); + } + + if( on_function_trigger( event, 5 ) ) + { + _skaterift_script_nugget_set( "board_maker_hub_view", 1 ); + + // Hide just the notifier + struct ent_list_iter iter; + _ent_list_iter_start( &iter, _ent_list_get_aliased( "gino_board_maker" ), k_ent_marker ); + if( _ent_list_iter( &iter ) ) + { + world_instance *world = &_world.main; + ent_marker *marker = af_arritm( &world->ent_marker, iter.index ); + marker->flags |= (u32)k_ent_marker_flag_hidden; + } + } + return 0; } diff --git a/src/skaterift_script.c b/src/skaterift_script.c index 73d49d7..fdc136e 100644 --- a/src/skaterift_script.c +++ b/src/skaterift_script.c @@ -683,6 +683,7 @@ struct script_save_nugget _skaterift_script_savedata[] = { { "board_maker_unlock" }, + { "board_maker_hub_view" }, { "intro_view" }, { "hub_info_view" },