Remove early exit when detecting opposite connection points. Was causing incorrect behaviors between different platforms
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
1f62a0867a
commit
6d4eba57e4
@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
Portions of this software are copyright © 2023 The FreeType
|
||||
Portions of this software are copyright <EFBFBD> 2023 The FreeType
|
||||
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
|
||||
All rights reserved.
|
||||
*/
|
||||
@ -59,7 +59,7 @@ struct MerchantFunctionPrimingData:public FunctionPrimingData{
|
||||
:FunctionPrimingData(dependentFunction){}
|
||||
virtual inline void Validate(IT item,uint32_t amt){
|
||||
if(!primed)ERR(std::format("WARNING! {} should be called before running this function! Priming Requirement!",dependentFunction));
|
||||
if(this->item!=item)ERR(std::format("WARNING! Primed items are not matching! {}!={}",this->item,item));
|
||||
if(this->item!=item)ERR(std::format("WARNING! Primed items are not matching! {}!={}",std::string(this->item),std::string(item)));
|
||||
if(this->amt!=amt)ERR(std::format("WARNING! Primed amounts are not matching! {}!={}",this->amt,amt));
|
||||
primed=false;
|
||||
}
|
||||
@ -76,7 +76,7 @@ struct ItemEnhancementFunctionPrimingData:public FunctionPrimingData{
|
||||
:FunctionPrimingData(dependentFunction){}
|
||||
virtual inline void Validate(IT item,uint8_t enhancementLevel,uint8_t qty){
|
||||
if(!primed)ERR(std::format("WARNING! {} should be called before running this function! Priming Requirement!",dependentFunction));
|
||||
if(this->item!=item)ERR(std::format("WARNING! Primed items are not matching! {}!={}",this->item,item));
|
||||
if(this->item!=item)ERR(std::format("WARNING! Primed items are not matching! {}!={}",std::string(this->item),std::string(item)));
|
||||
if(this->qty!=qty)ERR(std::format("WARNING! Primed items do not have the same quantity! {}!={}",this->qty,qty));
|
||||
if(this->enhancementLevel!=enhancementLevel)ERR(std::format("WARNING! Primed enhancement levels are not matching! {}!={}",this->enhancementLevel,enhancementLevel));
|
||||
primed=false;
|
||||
|
@ -102,6 +102,7 @@ std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)>
|
||||
#pragma region Row Merchant Updates
|
||||
std::function<void(InventoryScrollableWindowComponent&component,ITCategory cat)> InventoryCreator::RowMerchant_InventorySlotsUpdate=
|
||||
[](InventoryScrollableWindowComponent&component,ITCategory cat){
|
||||
const std::vector<std::shared_ptr<Item>>&merchantInv=Merchant::GetCurrentTravelingMerchant().GetShopItems();
|
||||
component.RemoveAllComponents();
|
||||
for(std::shared_ptr<Item> item:merchantInv){
|
||||
component.AddButtonOnSlotUpdate(cat);
|
||||
|
@ -686,7 +686,7 @@ const std::string Item::Description(CompactText compact)const{
|
||||
for(const auto&[name,amt]:info.craftingRequirement.GetItems()){
|
||||
description+=std::format("{}{} x{} ({})\n",
|
||||
Inventory::GetItemCount(name)<amt?"#FF0000":"#FFFFFF",
|
||||
name,
|
||||
std::string(const_cast<IT&>(name)),
|
||||
amt,
|
||||
Inventory::GetItemCount(name));
|
||||
}
|
||||
|
@ -45,6 +45,6 @@ struct ItemMapData{
|
||||
int chance;
|
||||
inline ItemMapData(IT item,uint8_t minAmt,uint8_t maxAmt,int chance)
|
||||
:item(item),minAmt(minAmt),maxAmt(maxAmt),chance(chance){
|
||||
if(minAmt>maxAmt)ERR(std::format("WARNING! The max amount specified for item {} is less than the minimum amount! {} > {}!",item,minAmt,maxAmt));
|
||||
if(minAmt>maxAmt)ERR(std::format("WARNING! The max amount specified for item {} is less than the minimum amount! {} > {}!",std::string(item),minAmt,maxAmt));
|
||||
}
|
||||
};
|
@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
Portions of this software are copyright © 2023 The FreeType
|
||||
Portions of this software are copyright <EFBFBD> 2023 The FreeType
|
||||
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
|
||||
All rights reserved.
|
||||
*/
|
||||
@ -78,7 +78,7 @@ protected:
|
||||
Pixel textCol=WHITE;
|
||||
if(Inventory::GetItemCount(name)<amt*qty)textCol=RED;
|
||||
vf2d drawPos=rect.pos+vf2d{drawWidth*(index%3),12.f*(index/3)};
|
||||
std::string labelText=std::format("{}",name);
|
||||
std::string labelText=std::format("{}",std::string(const_cast<IT&>(name)));
|
||||
float labelWidth=game->GetTextSizeProp(labelText).x;
|
||||
window.DrawShadowStringDecal(drawPos,std::format("{:>3}",amt*qty),textCol,BLACK);
|
||||
window.DrawShadowStringPropDecal(drawPos+vf2d{26,0},labelText,textCol,BLACK,{std::min(1.f,(drawWidth-26-2)/labelWidth),1.f});
|
||||
|
@ -668,7 +668,6 @@ class TMXParser{
|
||||
|
||||
if(neighbor.neighbors[targetInd]==-1){ //We insert our neighbor pairing here.
|
||||
neighbor.neighbors[targetInd]=counter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
directionInd++;
|
||||
|
@ -330,7 +330,7 @@ if (EMSCRIPTEN)
|
||||
-sLLD_REPORT_UNDEFINED
|
||||
-sFETCH=1
|
||||
-sEXPORTED_RUNTIME_METHODS=stringToNewUTF8
|
||||
-std=c++20
|
||||
-std=c++2a
|
||||
--proxy-to-worker
|
||||
--preload-file ${SOURCE_DATA_DIR}@assets)
|
||||
else()
|
||||
@ -344,7 +344,7 @@ if (EMSCRIPTEN)
|
||||
-sUSE_FREETYPE=1
|
||||
-sFETCH=1
|
||||
-sEXPORTED_RUNTIME_METHODS=stringToNewUTF8
|
||||
-std=c++20
|
||||
-std=c++2a
|
||||
--proxy-to-worker
|
||||
-sLLD_REPORT_UNDEFINED)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user