Fix crash with emscripten version during story scenes. Fix inproper Blacksmith equipment displays for crafting menu (chapter check missing, wrong enhancement level checks). Fix Blacksmith trigger not unlocking on the right node. Fix Chapter 2 trigger. Fix emscripten build scripts. Release Version 7848.

pull/35/head
sigonasr2 9 months ago
parent 93e5921e57
commit aa4d35d754
  1. 4
      Adventures in Lestoria/InventoryCreator.cpp
  2. 4
      Adventures in Lestoria/MenuLabel.h
  3. 4
      Adventures in Lestoria/OverworldMapLevelWindow.cpp
  4. 5
      Adventures in Lestoria/State_OverworldMap.cpp
  5. 2
      Adventures in Lestoria/Version.h
  6. 4
      Adventures in Lestoria/VisualNovel.cpp
  7. 340
      Adventures in Lestoria/assets/config/items/Equipment.txt
  8. 6
      Adventures in Lestoria/assets/config/items/Weapons.txt
  9. 2
      Adventures in Lestoria/buildtemplate.html
  10. 2
      Adventures in Lestoria/emscripten_build.ps1
  11. 2
      Adventures in Lestoria/emscripten_debug_build.ps1
  12. 2
      distribute.ps1
  13. 19
      emscripten_build.ps1
  14. 19
      emscripten_debug_build.ps1
  15. BIN
      x64/Release/Adventures in Lestoria.exe

@ -140,7 +140,7 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)>
[](InventoryScrollableWindowComponent&component,ITCategory cat){
std::vector<std::weak_ptr<Item>>weapons;
std::copy_if(Inventory::get("Equipment").begin(),Inventory::get("Equipment").end(),std::back_inserter(weapons),[](std::shared_ptr<Item>item){return item->IsWeapon();});
std::copy_if(Inventory::blacksmithInventory.begin(),Inventory::blacksmithInventory.end(),std::back_inserter(weapons),[](std::shared_ptr<Item>item){return item->CanEnhanceItem()&&item->GetClass()==game->GetPlayer()->GetClassName()&&item->IsWeapon();});
std::copy_if(Inventory::blacksmithInventory.begin(),Inventory::blacksmithInventory.end(),std::back_inserter(weapons),[](std::shared_ptr<Item>item){return item->GetEnhancementInfo().size()>0&&game->GetCurrentChapter()>=item->GetEnhancementInfo()[0].chapterAvailable&&item->GetClass()==game->GetPlayer()->GetClassName()&&item->IsWeapon();});
std::sort(weapons.begin(),weapons.end(),[](const std::weak_ptr<Item>&it1,const std::weak_ptr<Item>&it2){
return ItemSortRules::GetItemSortRanking(it1)<ItemSortRules::GetItemSortRanking(it2);
@ -181,7 +181,7 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)>
[](InventoryScrollableWindowComponent&component,ITCategory cat){
std::vector<std::weak_ptr<Item>>armor;
std::copy_if(Inventory::get("Equipment").begin(),Inventory::get("Equipment").end(),std::back_inserter(armor),[](std::shared_ptr<Item>item){return item->IsArmor();});
std::copy_if(Inventory::blacksmithInventory.begin(),Inventory::blacksmithInventory.end(),std::back_inserter(armor),[](std::shared_ptr<Item>item){return item->CanEnhanceItem()&&item->GetClass()==game->GetPlayer()->GetClassName()&&item->IsArmor();});
std::copy_if(Inventory::blacksmithInventory.begin(),Inventory::blacksmithInventory.end(),std::back_inserter(armor),[](std::shared_ptr<Item>item){return item->GetEnhancementInfo().size()>0&&game->GetCurrentChapter()>=item->GetEnhancementInfo()[0].chapterAvailable&&item->GetClass()==game->GetPlayer()->GetClassName()&&item->IsArmor();});
std::sort(armor.begin(),armor.end(),[](const std::weak_ptr<Item>&it1,const std::weak_ptr<Item>&it2){
return ItemSortRules::GetItemSortRanking(it1)<ItemSortRules::GetItemSortRanking(it2);

@ -149,9 +149,9 @@ protected:
}
private:
inline void CalculateWrappedLabel(){
if(multiLineCentered){
lines.clear();
offsets.clear();
if(multiLineCentered){
wrappedLabel=util::WrapText(game,GetLabel(),rect.size.x,true,{1.f,1.f});
int labelInd=0;
float largestWidth=0;
@ -172,11 +172,11 @@ private:
float width=game->GetTextSizeProp(text).x;
offsets.push_back(rect.size.x/2.f-width/2);
}
}
//Recalculate label height based on line count.
rect.size.y=lines.size()*10.f;
if(!parentComponent.expired()){
parentComponent.lock()->CalculateBounds();
}
}
}
};

@ -38,7 +38,7 @@ All rights reserved.
#include "AdventuresInLestoria.h"
#include "DEFINES.h"
#include "Menu.h"
#include "EncountersSpawnListScrollableWindowComponent.h"a
#include "EncountersSpawnListScrollableWindowComponent.h"
#include "MenuLabel.h"
#include "MenuComponent.h"
#include "State_OverworldMap.h"
@ -63,7 +63,7 @@ void Menu::InitializeOverworldMapLevelWindow(){
levelSelectWindow->ADD("Spawns List",EncountersSpawnListScrollableWindowComponent)(geom2d::rect<float>{{1,64},{windowSize.x-2,84}},ComponentAttr::BACKGROUND)END;
levelSelectWindow->ADD("Enter Button",MenuComponent)(geom2d::rect<float>{{0,166},{windowSize.x-1,16}},"Enter",[](MenuFuncData data){
if(State_OverworldMap::GetCurrentConnectionPoint().map=="HUB"&&Unlock::IsUnlocked("CAMPAIGN_1_3")&&!Tutorial::TaskIsComplete(TutorialTaskName::BLACKSMITH)){
if(State_OverworldMap::GetCurrentConnectionPoint().map=="HUB"&&Unlock::IsUnlocked("STORY_1_2")&&!Tutorial::TaskIsComplete(TutorialTaskName::BLACKSMITH)){
Tutorial::SetNextTask(TutorialTaskName::BLACKSMITH);
}

@ -62,6 +62,11 @@ State_OverworldMap::State_OverworldMap(){
void State_OverworldMap::OnStateChange(GameState*prevState){
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->SetGrayedOut(false);
SaveFile::SaveGame();
if(Unlock::IsUnlocked("STORY_1_3")){
game->SetChapter(2);
}
game->LoadLevel("WORLD_MAP");
};
void State_OverworldMap::OnLevelLoad(){

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 4
#define VERSION_PATCH 0
#define VERSION_BUILD 7841
#define VERSION_BUILD 7848
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -275,13 +275,15 @@ void VisualNovel::Draw(){
vf2d dialogDisplaySize={game->GetScreenSize().x-48.f,20.f};
Menu::DrawThemedWindow(dialogDisplayPos,dialogDisplaySize);
FontRect dialogTextSize=font.GetStringBounds(activeText);
FontRect speakerTextSize=font.GetStringBounds(displayedName);
if(dialogTextSize.size.x>0&&dialogTextSize.size.y>0){
if(displayedName.length()>0){
FontRect speakerTextSize=font.GetStringBounds(displayedName);
game->DrawShadowStringDecal(font,nameDisplayPos-vf2d{10,7}+(nameDisplayWindowSize+vf2d{24,0})/2-speakerTextSize.size/2+speakerTextSize.offset/2,displayedName);
game->DrawShadowStringDecal(font,dialogDisplayPos-vf2d{10,6}+dialogTextSize.offset,activeText);
}else{
game->DrawDropShadowStringDecal(narratorFont,dialogDisplayPos-vf2d{10,6}+dialogTextSize.offset,activeText,{190,190,220});
}
}
float yOffset=util::lerp(dialogDisplaySize.y+12,-8,textScrollTime/maxTextScrollTime);
game->DrawPolygonDecal(
Menu::GetPatchPart(1,1).Decal(),

File diff suppressed because it is too large Load Diff

@ -27,7 +27,7 @@ Equipment
{
# When this crafting recipe is available.
AvailableChapter = 1
Item[0] = Wolf Skin,1
Item[0] = Logs,1
Gold = 5
@ -161,7 +161,7 @@ Equipment
{
# When this crafting recipe is available.
AvailableChapter = 1
Item[0] = Wolf Skin,1
Item[0] = Logs,1
Gold = 5
@ -284,7 +284,7 @@ Equipment
{
# When this crafting recipe is available.
AvailableChapter = 1
Item[0] = Wolf Skin,1
Item[0] = Logs,1
Gold = 5

@ -35,7 +35,7 @@ var Module = {
})(),
};
</script>
<script async type="text/javascript" src="_REPLACEME_"></script>
<script async type="text/javascript" src="AdventuresInLestoria.js"></script>
<script type="text/javascript">
Module.canvas.addEventListener("resize", (e) => {

@ -1,4 +1,4 @@
$ErrorActionPreference = "Stop"
cd ..
./emscripten_build.ps1
if ($LASTEXITCODE -eq 0) {

@ -1,4 +1,4 @@
$ErrorActionPreference = "Stop"
cd ..
./emscripten_debug_build.ps1
if ($LASTEXITCODE -eq 0) {

@ -1,3 +1,5 @@
rm -R bin
mkdir bin
mkdir bin/assets

@ -1,3 +1,22 @@
clear
rm -R bin
mkdir bin
mkdir bin/assets
$ErrorActionPreference = "Stop"
cp -R 'Adventures in Lestoria/buildtemplate.html' bin/index.html
cp -R "Adventures in Lestoria/assets/Campaigns" bin/assets
cp -R "Adventures in Lestoria/assets/config" bin/assets
cp -R "Adventures in Lestoria/assets/maps" bin/assets
cp -R "Adventures in Lestoria/assets/backgrounds" bin/assets
rm -R bin/assets/backgrounds/commercial_assets
rm -R bin/assets/maps/commercial_assets
cp -R "Adventures in Lestoria/assets/monsters" bin/assets
cp -R "Adventures in Lestoria/assets/music" bin/assets
cp -R "Adventures in Lestoria/assets/npcs" bin/assets
cp -R "Adventures in Lestoria/assets/sounds" bin/assets
cp -R "Adventures in Lestoria/assets/themes" bin/assets
cp -R "Adventures in Lestoria/assets/gamepack.pak" bin/assets
cp -R "Adventures in Lestoria/assets/*.ttf" bin/assets
emcmake cmake -DCMAKE_BUILD_TYPE=Release .
cmake --build . -j 20

@ -1,3 +1,22 @@
clear
rm -R bin
mkdir bin
mkdir bin/assets
$ErrorActionPreference = "Stop"
cp -R 'Adventures in Lestoria/buildtemplate.html' bin/index.html
cp -R "Adventures in Lestoria/assets/Campaigns" bin/assets
cp -R "Adventures in Lestoria/assets/config" bin/assets
cp -R "Adventures in Lestoria/assets/maps" bin/assets
cp -R "Adventures in Lestoria/assets/backgrounds" bin/assets
rm -R bin/assets/backgrounds/commercial_assets
rm -R bin/assets/maps/commercial_assets
cp -R "Adventures in Lestoria/assets/monsters" bin/assets
cp -R "Adventures in Lestoria/assets/music" bin/assets
cp -R "Adventures in Lestoria/assets/npcs" bin/assets
cp -R "Adventures in Lestoria/assets/sounds" bin/assets
cp -R "Adventures in Lestoria/assets/gamepack.pak" bin/assets
cp -R "Adventures in Lestoria/assets/themes" bin/assets
cp -R "Adventures in Lestoria/assets/*.ttf" bin/assets
emcmake cmake -DCMAKE_BUILD_TYPE=Debug -D_DEBUG=1 .
cmake --build . -j 20
Loading…
Cancel
Save