From: <Kha...@us...> - 2010-03-15 11:30:24
|
Revision: 5697 http://planeshift.svn.sourceforge.net/planeshift/?rev=5697&view=rev Author: Khakilord Date: 2010-03-15 11:30:16 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Increased cost for tribe to be resurrected when all members are dead. Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2010-03-15 11:22:22 UTC (rev 5696) +++ trunk/src/npcclient/tribe.cpp 2010-03-15 11:30:16 UTC (rev 5697) @@ -404,8 +404,9 @@ // Handle special case for dead npc's if (!npc->IsAlive()) { - if (AliveCount() == 0) // Resurrect without cost if every member is dead. + if (AliveCount() == 0 && CountResource(wealth_resource_name) >= 10 * reproduction_cost) // Resurrect with large cost if every member is dead. { + AddResource(wealth_resource_name,-10*reproduction_cost); return RESURRECT; } else if (CanGrow()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-02-27 00:24:19
|
Revision: 7003 http://planeshift.svn.sourceforge.net/planeshift/?rev=7003&view=rev Author: magodra Date: 2011-02-27 00:24:12 +0000 (Sun, 27 Feb 2011) Log Message: ----------- - Use PS::Utility::StringArray instead of psSplit Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2011-02-26 23:45:09 UTC (rev 7002) +++ trunk/src/npcclient/tribe.cpp 2011-02-27 00:24:12 UTC (rev 7003) @@ -21,6 +21,7 @@ // Crystal Space Includes //============================================================================= #include <csutil/csstring.h> +#include <csutil/stringarray.h> #include <iutil/object.h> #include <iengine/sector.h> #include <iengine/engine.h> @@ -102,7 +103,8 @@ need = new TribeNeedGeneric(needName,perception,needStartValue,needGrowthValue); } else if (needType.CompareNoCase(TribeNeed::TribeNeedTypeName[TribeNeed::TIME_OF_DAY])) { - csArray<csString> arguments = psSplit(row.GetString("arguments"), ','); + CS::Utility::StringArray<> arguments; + arguments.SplitString(row.GetString("arguments"), ","); if (arguments.GetSize() != 2) { Error3("No start and end time for time of day vent for tribe %d need %d",id,needId); @@ -354,7 +356,8 @@ { csString name = perception->GetName(); - csArray<csString> strarr = psSplit(name,':'); + CS::Utility::StringArray<> strarr; + strarr.SplitString(name, ":"); if (strarr[0] == "transfer") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wel...@us...> - 2011-03-04 14:11:19
|
Revision: 7032 http://planeshift.svn.sourceforge.net/planeshift/?rev=7032&view=rev Author: weltall2 Date: 2011-03-04 14:11:13 +0000 (Fri, 04 Mar 2011) Log Message: ----------- fixed string comparison Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2011-03-03 19:59:17 UTC (rev 7031) +++ trunk/src/npcclient/tribe.cpp 2011-03-04 14:11:13 UTC (rev 7032) @@ -359,7 +359,7 @@ CS::Utility::StringArray<> strarr; strarr.SplitString(name, ":"); - if (strarr[0] == "transfer") + if (strarr[0] == csString("transfer")) { InventoryPerception *invPcpt = dynamic_cast<InventoryPerception*>(perception); if (!invPcpt) return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wel...@us...> - 2011-05-03 07:24:55
|
Revision: 7207 http://planeshift.svn.sourceforge.net/planeshift/?rev=7207&view=rev Author: weltall2 Date: 2011-05-03 07:24:49 +0000 (Tue, 03 May 2011) Log Message: ----------- fixed warning Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2011-05-03 03:50:58 UTC (rev 7206) +++ trunk/src/npcclient/tribe.cpp 2011-05-03 07:24:49 UTC (rev 7207) @@ -318,7 +318,7 @@ // Some checks to see if this NPC is fitt for this Tribe if (tribeMemberType >= needSet.GetSize()) { - Error5("Trying to attach a NPC %s(%u) that have a type %d largert than the supported type %d", + Error5("Trying to attach a NPC %s(%u) that have a type %d largert than the supported type %zu", npc->GetName(),npc->GetPID().Unbox(),tribeMemberType, needSet.GetSize()); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-05-05 18:07:10
|
Revision: 7214 http://planeshift.svn.sourceforge.net/planeshift/?rev=7214&view=rev Author: magodra Date: 2011-05-05 18:07:02 +0000 (Thu, 05 May 2011) Log Message: ----------- - Dump behaviors when member not accepted to tribe due to missing "do nothing" behavior. Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2011-05-05 13:32:57 UTC (rev 7213) +++ trunk/src/npcclient/tribe.cpp 2011-05-05 18:07:02 UTC (rev 7214) @@ -328,6 +328,8 @@ { Error4("Trying to attach a NPC %s(%u) to tribe without matching idle behavior of %s", npc->GetName(),npc->GetPID().Unbox(), npcIdleBehavior.GetDataSafe()); + // Dump the behavior list so that we see what behaviors we have for this npc. + npc->DumpBehaviorList(); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-12-19 11:09:23
|
Revision: 7846 http://planeshift.svn.sourceforge.net/planeshift/?rev=7846&view=rev Author: magodra Date: 2011-12-19 11:09:12 +0000 (Mon, 19 Dec 2011) Log Message: ----------- - Removed some console output and put it under LOG_TRIBES. Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2011-12-19 07:57:40 UTC (rev 7845) +++ trunk/src/npcclient/tribe.cpp 2011-12-19 11:09:12 UTC (rev 7846) @@ -461,7 +461,7 @@ csString rName = bestRecipe->recipe->GetName(); if(rName != "do nothing") { - CPrintf(CON_CMDOUTPUT, "Recipe %s completed.\n", rName.GetData()); + Debug2(LOG_TRIBES, id, "Recipe %s completed.", rName.GetData()); } tribalRecipe->RemoveChild(bestRecipe); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-01-20 18:47:14
|
Revision: 8018 http://planeshift.svn.sourceforge.net/planeshift/?rev=8018&view=rev Author: magodra Date: 2012-01-20 18:47:08 +0000 (Fri, 20 Jan 2012) Log Message: ----------- - Prevent resource growth to infinit when not active. Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2012-01-20 17:57:41 UTC (rev 8017) +++ trunk/src/npcclient/tribe.cpp 2012-01-20 18:47:08 UTC (rev 8018) @@ -366,7 +366,7 @@ // We need to help tribes that have no members with some resources // so that they can spawn the first entity - if (AliveCount() <= 0) + if (AliveCount() <= 0 && CountResource(wealthResourceName) < reproductionCost) { growth = wealthResourceGrowth; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lpa...@us...> - 2012-07-10 12:01:06
|
Revision: 8374 http://planeshift.svn.sourceforge.net/planeshift/?rev=8374&view=rev Author: lpancallo Date: 2012-07-10 12:00:57 +0000 (Tue, 10 Jul 2012) Log Message: ----------- Added info on tribe failing to load a recipe Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2012-07-04 07:39:32 UTC (rev 8373) +++ trunk/src/npcclient/tribe.cpp 2012-07-10 12:00:57 UTC (rev 8374) @@ -1009,12 +1009,12 @@ if(!recipe) { // Avoid a segFault and signal the issue - CPrintf(CON_ERROR, "Could not add recipe. Received null pointer for recipe.\n"); + Error2("Could not add recipe. Received null pointer for recipe while loading tribe %s.\n",GetName()); return; } if(!parentRecipe) { - CPrintf(CON_ERROR, "Could not add recipe. Received null pointer for parent recipe.\n"); + Error2("Could not add recipe. Received null pointer for parent recipe while loading tribe %s.\n",GetName()); return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ral...@us...> - 2014-07-15 01:39:14
|
Revision: 9527 http://sourceforge.net/p/planeshift/code/9527 Author: ralphcampbell Date: 2014-07-15 01:39:07 +0000 (Tue, 15 Jul 2014) Log Message: ----------- Fix typo: fitt Modified Paths: -------------- trunk/src/npcclient/tribe.cpp Modified: trunk/src/npcclient/tribe.cpp =================================================================== --- trunk/src/npcclient/tribe.cpp 2014-07-15 01:38:34 UTC (rev 9526) +++ trunk/src/npcclient/tribe.cpp 2014-07-15 01:39:07 UTC (rev 9527) @@ -257,7 +257,7 @@ bool Tribe::AttachMember(NPC* npc, const char* tribeMemberType) { - // Some checks to see if this NPC is fitt for this Tribe + // Some checks to see if this NPC is fit for this Tribe Behavior* idleBehavior = npc->GetBrain()->Find(npcIdleBehavior.GetDataSafe()); if(!idleBehavior) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |