public void GUI_HireCrewMember(CrewManagementMemberViewModel crew) { var crewman = crew.Member; //Check to see if player has enough money to hire if (GameVars.playerShipVariables.ship.currency >= crew.CostToHire) { //Now check to see if there is room to hire a new crew member! if (GameVars.playerShipVariables.ship.crewRoster.Count < GameVars.playerShipVariables.ship.crewCapacity) { // remove from settlement first so the where filter for not in your crew still applies on remove Settlement.availableCrew.Remove(crewman); GameVars.playerShipVariables.ship.crewRoster.Add(crewman); //Subtract the cost from the ship's money GameVars.playerShipVariables.ship.currency -= crew.CostToHire; //If there isn't room, then let the player know } else { GameVars.ShowANotificationMessage("You don't have room on the ship to hire " + crewman.name + "."); } //If not enough money, then let the player know } else { GameVars.ShowANotificationMessage("You can't afford to hire " + crewman.name + "."); } }
public void OnCrewClicked(CrewManagementMemberViewModel crew) { if (Globals.UI.IsShown <CityView>()) { Globals.UI.Hide <CityView>(); } Globals.UI.Show <CrewDetailsScreen, CrewManagementMemberViewModel>(crew); }
//---------------------------------------------------------------------------- //----------------------------CREW PANEL HELPER FUNCTIONS public void GUI_FireCrewMember(CrewManagementMemberViewModel crew) { var crewman = crew.Member; // remove from your crew first so the where filter for not in your crew applies on add to settlement list GameVars.playerShipVariables.ship.crewRoster.Remove(crewman); Settlement.availableCrew.Add(crewman); GameVars.ShowANotificationMessage(crewman.name + " looked at you sadly and said before leaving, 'I thought I was doing so well. I'm sorry I let you down. Guess I'll go drink some cheap wine..."); }
//================================================================================================================= // SETUP THE CREW MANAGEMENT PANEL //================================================================================================================= private void OnCrewClicked(CrewManagementMemberViewModel crew) { if (crew.IsInCrew) { GUI_FireCrewMember(crew); } else { GUI_HireCrewMember(crew); } }
void OnCrewClicked(CrewManagementMemberViewModel crew) { // hide a previous details view if one was already showing so they don't stack on top of eachother and confuse the user Globals.UI.Hide <CrewDetailsScreen>(); Globals.UI.Show <CrewDetailsScreen, CrewManagementMemberViewModel>(crew); }
public void GUI_GetBackgroundInfo(CrewManagementMemberViewModel crew) { GameVars.ShowANotificationMessage(crew.BackgroundInfo); }