void cScreenTown::check_farm(int FarmNum) { // player clicked on one of the brothels if (g_Farm.GetNumBrothels() == FarmNum) { // player doesn't own this Studio... can he buy it? static_brothel_data *bck = farm_data + FarmNum; locale syslocale(""); stringstream ss; ss.imbue(syslocale); if (!g_Gold.afford(bck->price) || g_Gangs.GetNumBusinessExtorted() < bck->business) { // can't buy it ss << gettext("This building costs ") << bck->price << gettext(" gold and you need to control at least ") << bck->business << gettext(" businesses."); if (!g_Gold.afford(bck->price)) ss << "\n" << gettext("You need ") << (bck->price - g_Gold.ival()) << gettext(" more gold to afford it."); if (g_Gangs.GetNumBusinessExtorted() < bck->business) ss << "\n" << gettext("You need to control ") << (bck->business - g_Gangs.GetNumBusinessExtorted()) << gettext(" more businesses."); g_MessageQue.AddToQue(ss.str(), 0); } else { // can buy it ss << gettext("Do you wish to purchase this building for ") << bck->price << gettext(" gold? It has ") << bck->rooms << gettext(" rooms."); g_MessageQue.AddToQue(ss.str(), 2); g_ChoiceManager.CreateChoiceBox(224, 112, 352, 384, 0, 2, 32, 8); g_ChoiceManager.AddChoice(0, gettext("Buy It"), 0); g_ChoiceManager.AddChoice(0, gettext("Don't Buy It"), 1); g_ChoiceManager.SetActive(0); BuyFarm = FarmNum; } } else { // player owns this brothel... go to it g_Building = BUILDING_FARM; g_CurrFarm = FarmNum; g_WinManager.push("Farm Screen"); } }
void cScreenHouse::init() { g_CurrentScreen = SCREEN_HOUSE; if (!g_InitWin) { return; } Focused(); g_InitWin = false; locale syslocale(""); stringstream ss; ss.imbue(syslocale); ss << gettext("CURRENT OBJECTIVE: "); sObjective* obj = g_Brothels.GetObjective(); if (obj) { switch (obj->m_Objective) { case OBJECTIVE_REACHGOLDTARGET: ss << gettext("Gather ") << obj->m_Target << gettext(" gold"); if (obj->m_Limit != -1) { ss << gettext(" in ") << obj->m_Limit << gettext(" weeks"); } ss << gettext(", ") << g_Gold.ival() << gettext(" gathered so far."); break; case OBJECTIVE_GETNEXTBROTHEL: fmt_objective(ss, gettext("Purchase the next brothel"), obj->m_Limit); break; /*---- case OBJECTIVE_PURCHASENEWGAMBLINGHALL: fmt_objective(ss, "Purchase a gambling hall", obj->m_Limit); break; case OBJECTIVE_PURCHASENEWBAR: fmt_objective(ss, "Purchase a bar", obj->m_Limit); break; ----*/ case OBJECTIVE_LAUNCHSUCCESSFULATTACK: fmt_objective(ss, gettext("Launch a successful attack"), obj->m_Limit); break; case OBJECTIVE_HAVEXGOONS: ss << gettext("Have ") << obj->m_Target << gettext(" gangs"); fmt_objective(ss, "", obj->m_Limit); break; case OBJECTIVE_STEALXAMOUNTOFGOLD: ss << gettext("Steal ") << obj->m_Target << gettext(" gold"); fmt_objective(ss, "", obj->m_Limit, obj->m_SoFar); break; case OBJECTIVE_CAPTUREXCATACOMBGIRLS: ss << gettext("Capture ") << obj->m_Target << gettext(" girls from the catacombs"); fmt_objective(ss, "", obj->m_Limit, obj->m_SoFar); break; case OBJECTIVE_HAVEXMONSTERGIRLS: ss << gettext("Have a total of ") << obj->m_Target << gettext(" monster (non-human) girls"); fmt_objective(ss, "", obj->m_Limit, g_Brothels.GetTotalNumGirls(true)); break; case OBJECTIVE_KIDNAPXGIRLS: ss << gettext("Kidnap ") << obj->m_Target << gettext(" girls from the streets"); fmt_objective(ss, "", obj->m_Limit, obj->m_SoFar); break; case OBJECTIVE_EXTORTXNEWBUSINESS: ss << gettext("Control ") << obj->m_Target << gettext(" city business"); fmt_objective(ss, "", obj->m_Limit, obj->m_SoFar); break; case OBJECTIVE_HAVEXAMOUNTOFGIRLS: ss << gettext("Have a total of ") << obj->m_Target << gettext(" girls"); fmt_objective(ss, "", obj->m_Limit, g_Brothels.GetTotalNumGirls(false)); break; } } else ss << gettext("NONE\n"); ss << gettext("\n") << gettext("Current gold: ") << g_Gold.ival() << gettext("\n") << gettext("Bank account: ") << g_Brothels.GetBankMoney() << gettext("\n") << gettext("Businesses controlled: ") << g_Gangs.GetNumBusinessExtorted() << gettext("\n") ; ss << gettext("\nCurrent number of runaways: ") << g_Brothels.GetNumRunaways() << gettext("\n"); // `J` added while loop to add runaway's names to the list if (g_Brothels.GetNumRunaways() > 0) { sGirl* rgirl = g_Brothels.m_Runaways; while (rgirl) { ss << rgirl->m_Realname << gettext(" (") << rgirl->m_RunAway << gettext(")"); rgirl = rgirl->m_Next; if (rgirl) ss << gettext(" , "); } } EditTextItem(ss.str(), details_id); obj = 0; }