Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Do not track these files.

# Node artifact files
node_modules/
dist/

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]
__pycache__

# Log files
log/
*.log

# Package files
*.jar
/*egg-info/

# Maven
target/

# JetBrains IDE
.idea/
venv/

# Visual Studio
.vs*

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

# Temporary files
~$*.doc*
~$*.xls*
~$*.ppt*
2 changes: 1 addition & 1 deletion CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"configurations": [
{
"name": "x86-Release",
"generator": "Visual Studio 15 2017",
"generator": "Visual Studio 17 2022",
"configurationType": "Release",
"inheritEnvironments": [
"msvc_x86"
Expand Down
18 changes: 9 additions & 9 deletions Main/Source/human.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
{DBGLN;
craft* Craft = craft::Spawn(this);DBGLN;
DBG4(rpd.GetTool(),rpd.GetTool2(),GetRightArm()?GetRightArm()->IsUsable():0,GetLeftArm()?GetLeftArm()->IsUsable():0);

bool b1OK=false;
bool b2OK=false;
item* it;
Expand All @@ -1901,7 +1901,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
b1OK=true;
Craft->SetMoveCraftTool(false);
}

if(!b1OK && GetRightArm() && GetRightArm()->IsUsable()){
if((it = GetRightWielded())){
Craft->SetRightBackupID(it->GetID());
Expand All @@ -1914,7 +1914,7 @@ truth humanoid::SwitchToCraft(recipedata rpd)
b1OK=true;
Craft->SetMoveCraftTool(true);
}

if(!b1OK && GetLeftArm() && GetLeftArm()->IsUsable()){
if((it = GetLeftWielded())){
Craft->SetLeftBackupID(it->GetID());
Expand All @@ -1927,19 +1927,19 @@ truth humanoid::SwitchToCraft(recipedata rpd)
b1OK=true;
Craft->SetMoveCraftTool(true);
}

}else{
b1OK=true; //can craft somethings w/o tools
}

//TODO let the GetTool2() be equipped too?

if(b1OK){
Craft->SetCraftWhat(rpd);DBGLN;
SetAction(Craft);DBGLN;
return true;
}

ADD_MESSAGE("You have no usable arm.");
rpd.SetAlreadyExplained();
return false;
Expand Down Expand Up @@ -5390,7 +5390,7 @@ void FixSumoWrestlerHouse(festring fsCmdParams)
break;
}
}

if(SM){
for(int d = 0; d < SM->GetNeighbourSquares(); ++d)
{
Expand All @@ -5412,7 +5412,7 @@ void sumowrestler::GetAICommand()
devcons::AddDevCmd("FixSumoHouse",FixSumoWrestlerHouse,
"BugFix sumo wrestler house in case banana growers over crowd it.");
return true;}();

EditNP(-25);

SeekLeader(GetLeader());
Expand Down Expand Up @@ -7227,7 +7227,7 @@ void aslonawizard::GetAICommand()
}

if(NearestEnemy && NearestEnemy->GetPos().IsAdjacent(Pos) &&
(!(RAND() & 4) || StateIsActivated(PANIC)))
(!(RAND() % 4) || StateIsActivated(PANIC)))
{
if(CanBeSeenByPlayer())
ADD_MESSAGE("%s invokes a spell and disappears.", CHAR_NAME(DEFINITE));
Expand Down
3 changes: 2 additions & 1 deletion Main/Source/nonhuman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ truth feline::Catches(item* Thingy)
if(CanBeSeenByPlayer())
ADD_MESSAGE("%s catches %s and eats it.", CHAR_NAME(DEFINITE), Thingy->CHAR_NAME(DEFINITE));

if(PLAYER->GetRelativeDanger(this, true) > 0.1)
if(PLAYER->GetRelativeDanger(this, true) > 0.1) {
ChangeTeam(PLAYER->GetTeam());
ADD_MESSAGE("%s seems to be much more friendly towards you.", CHAR_NAME(DEFINITE));
}
}
}
else if(IsPlayer())
Expand Down