From 318807d3c276a73b967b30dd038a18947d9d8df3 Mon Sep 17 00:00:00 2001 From: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com> Date: Mon, 10 Apr 2023 12:25:26 +0200 Subject: [PATCH] level_script_parse description (#340) enhanced level_script_parse description --- autogen/lua_definitions/manual.lua | 6 +++- mods/sm74/dialog.lua | 45 +++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/autogen/lua_definitions/manual.lua b/autogen/lua_definitions/manual.lua index 0ecdb6de..bab2a3eb 100644 --- a/autogen/lua_definitions/manual.lua +++ b/autogen/lua_definitions/manual.lua @@ -222,8 +222,12 @@ function djui_hud_render_texture_tile_interpolated(texInfo, prevX, prevY, prevSc end --- @param levelNum number ---- @param func fun(areaNum:number, bhv:table) +--- @param func fun(areaIndex:number, bhvData:table, macroBhvIds:table, macroBhvArgs:table) --- @return nil +--- When `func` is called, arguments are filled depending on the level command: +--- - `AREA` command: only `areaIndex` is filled. It's a number. +--- - `OBJECT` command: only `bhvData` is filled. `bhvData` is a table with two fields: `behavior` and `behaviorArg`. +--- - `MACRO` command: only `macroBhvIds` and `macroBhvArgs` are filled. `macrobhvIds` is a list of behavior ids. `macroBhvArgs` is a list of behavior params. Both lists have the same size and start at index 0. function level_script_parse(levelNum, func) -- ... end diff --git a/mods/sm74/dialog.lua b/mods/sm74/dialog.lua index cabb1ad9..1f1e58d9 100644 --- a/mods/sm74/dialog.lua +++ b/mods/sm74/dialog.lua @@ -2195,27 +2195,46 @@ possibility.\ Good luck and\ frustration resistance.") +-- smlua_text_utils_dialog_replace(DIALOG_063,1,5,30,200, "It's really a shame but\ +-- this level was way too\ +-- big for the level importer\ +-- so I had to split it\ +-- into two parts.\ +-- That means I CAN'T place\ +-- red coins in the whole\ +-- level. Sad, isn't it?\ +-- I know that you would\ +-- enjoy collecting 30\ +-- red coins, right?\ +-- Well then, instead,\ +-- the red coins are all\ +-- beyond the cannon.\ +-- And since they are so\ +-- close together\ +-- I won't tell you how\ +-- many there are.\ +-- \ +-- (Well, honestly, I forgot\ +-- how many I placed.)") + smlua_text_utils_dialog_replace(DIALOG_063,1,5,30,200, "It's really a shame but\ this level was way too\ big for the level importer\ so I had to split it\ into two parts.\ -That means I CAN'T place\ +Nah! Just kidding!\ +You're no longer playing\ +a Nintendo 64 rom-hack.\ +It's the pc port we're\ +talking about!\ +That means I CAN place\ red coins in the whole\ -level. Sad, isn't it?\ +level. Great, isn't it?\ I know that you would\ enjoy collecting 30\ -red coins, right?\ -Well then, instead,\ -the red coins are all\ -beyond the cannon.\ -And since they are so\ -close together\ -I won't tell you how\ -many there are.\ -\ -(Well, honestly, I forgot\ -how many I placed.)") +red coins. So, after 9\ +years, it's finally\ +possible. Have fun!") smlua_text_utils_dialog_replace(DIALOG_064,1,5,30,200, "You should already know\ the concept of this\