Skip to content

Commit

Permalink
Fixed dungeon generation (by retrying), fixable sumo house (thru DevC…
Browse files Browse the repository at this point in the history
…ons cmd), etc. (#597)

* Fixed dungeon generation about "invalid config sought" that would ABORT;
Added a dev cmd to fix the over crowded sumo house;
Added some command line commands, environment variables and a --help command, mainly for developers;
Fixed crafting a item that breaks and has no BROKEN config;
Fixed developer console to use festring and more reliable MACROS;
Added many new commands to developer console;

* rm extra static truth InstallDataBaseIfPossible()

* Fix Banana Growers blocking the Sumo's door

Co-authored-by: fejoa <[email protected]>
  • Loading branch information
AquariusPower and ryfactor authored Dec 1, 2021
1 parent e91cdad commit 4120086
Show file tree
Hide file tree
Showing 15 changed files with 974 additions and 205 deletions.
12 changes: 12 additions & 0 deletions FeLib/Include/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
#define SIGNALS 8
#endif

class genericException
{
public:
genericException(cchar* pc);
cchar* GetMsg(){return pcMsg;};
static truth IsGenNewLvl(){return bGeneratingNewDungeonLevel;}
static truth ToggleGenNewLvl(){return bGeneratingNewDungeonLevel = !bGeneratingNewDungeonLevel;return bGeneratingNewDungeonLevel;}
private:
cchar* pcMsg;
static truth bGeneratingNewDungeonLevel;
};

class globalerrorhandler
{
public:
Expand Down
10 changes: 10 additions & 0 deletions FeLib/Source/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ void globalerrorhandler::DumpStackTraceToStdErr(int Signal){
}
#endif


genericException::genericException(cchar* pc)
{
pcMsg=pc;
DBG1(pc);
DBGBREAKPOINT;
}

void globalerrorhandler::Install()
{
static truth AlreadyInstalled = false;
Expand Down Expand Up @@ -218,3 +226,5 @@ void globalerrorhandler::SignalHandler(int Signal)
}

#endif

truth genericException::bGeneratingNewDungeonLevel=false;
4 changes: 2 additions & 2 deletions Main/Include/bugworkaround.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ class bugfixdp{
static void init();
static character* ValidatePlayerAt(square* sqr);
static bool IsFixing();
static std::vector<character*> FindCharactersOnLevel(bool bOnlyPlayers=false);

private:
static character* BugWorkaroundDupPlayer();
static void DevConsCmd(std::string strCmdParams);
static void DevConsCmd(festring fsCmdParams);

static void GatherAllItemInLevel();
static bool ItemWork(character* Char, item* it, bool bFix, const char* cInfo, std::vector<item*>* pvItem,bool bSendToHell);
Expand All @@ -42,7 +43,6 @@ class bugfixdp{

static character* FindByPlayerID1(v2 ReqPosL,bool bAndFixIt);
static std::vector<character*> FindByPlayerFlag();
static std::vector<character*> FindCharactersOnLevel(bool bOnlyPlayers=false);
static bool ScanLevelForCharactersAndItemsWork(item*, bool, bool, std::vector<bugWorkaroundDupPlayerCharItem>*);
static void CollectAllItemsOnLevel(std::vector<item*>* pvAllItemsOnLevel);
static void CollectAllCharactersOnLevel(std::vector<character*>* pvCharsOnLevel);
Expand Down
1 change: 1 addition & 0 deletions Main/Include/char.h
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,7 @@ class character : public entity, public id
void SetNewVomitMaterial(int What) { MyVomitMaterial = What; }
festring GetHitPointDescription() const;
truth WillGetTurnSoon() const;
virtual void SetFeedingSumo(truth What) { return; }
protected:
static truth DamageTypeDestroysBodyPart(int);
virtual void LoadSquaresUnder();
Expand Down
Loading

0 comments on commit 4120086

Please sign in to comment.