Example #1
0
    /// <summary>
    /// Will show profesion. IWll address if homer or insider
    /// </summary>
    /// <returns></returns>
    internal string ProfessionDescriptionToShow()
    {
        Job res = ProfDescription;

        if (ProfDescription == Job.Homer)
        {
            res = Person.ReturnJobType(_person.Work);
        }
        if (res == Job.Insider)
        {
            if (_person.Work != null)
            {
                if (_person.Work.HType.ToString().Contains("School"))
                {
                    return("Teacher");
                }
                else if (_person.Work.HType == H.BlackSmith)
                {
                    return("BlackSmith");
                }
            }

            return(_person.Work.HType + " worker");
        }
        return(Naming.CaseItRight(res + ""));
    }
Example #2
0
    /// <summary>
    /// Will show profesion. Will address if homer, or insider
    /// </summary>
    /// <returns></returns>
    internal string ProfessionDescriptionToShow()
    {
        Job res = ProfDescription;

        if (ProfDescription == Job.Homer)
        {
            res = Person.ReturnJobType(_person.Work);
        }
        if (res == Job.Insider)
        {
            if (_person.Work != null)
            {
                if (_person.Work.HType.ToString().Contains("School"))
                {
                    return(Languages.ReturnString("Teacher"));
                }
                else if (_person.Work.HType == H.BlackSmith)
                {
                    return(Languages.ReturnString("BlackSmith"));
                }
                else if (_person.Work.HType == H.SugarMill)
                {
                    return(Languages.ReturnString("SugarMiller"));
                }
            }
            return(Languages.ReturnString(_person.Work.HType + "") + " " + Languages.ReturnString("worker"));
        }
        if (_person != null && _person.Work != null && _person.Work.HType == H.HeavyLoad)
        {
            return(Languages.ReturnString("Hauler"));
        }

        return(Naming.CaseItRight(res + ""));
    }
Example #3
0
    internal static string MissingResources(H hType)
    {
        var stat = Book.GiveMeStat(hType);

        bool wood = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Wood) >= stat.Wood || stat.Wood == 0;//if is zero
        //the needed amt will pass reagardless the amt we have on storage
        bool stone  = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Stone) >= stat.Stone || stat.Stone == 0;
        bool brick  = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Brick) >= stat.Brick || stat.Brick == 0;
        bool iron   = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Iron) >= stat.Iron || stat.Iron == 0;
        bool gold   = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Gold) >= stat.Gold || stat.Gold == 0;
        bool dollar = Program.gameScene.GameController1.Dollars >= stat.Dollar || stat.Dollar == 0;

        bool nail      = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Nail) >= stat.Nail || stat.Nail == 0;
        bool furniture = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Furniture) >= stat.Furniture ||
                         stat.Furniture == 0;
        bool mortar = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Mortar) >= stat.Mortar || stat.Mortar == 0;
        bool floor  = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.FloorTile) >= stat.FloorTile ||
                      stat.FloorTile == 0;
        bool roof = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.RoofTile) >= stat.RoofTile ||
                    stat.RoofTile == 0;
        bool machine = GameController.ResumenInventory1.ReturnAmtOfItemOnInv(P.Machinery) >= stat.Machinery ||
                       stat.Machinery == 0;

        List <bool> passed = new List <bool>()
        {
            wood, stone, brick, iron, gold, dollar,
            nail, furniture, mortar, floor, roof, machine
        };

        string res = "";

        for (int i = 0; i < passed.Count; i++)
        {
            if (!passed[i])
            {
                res += Naming.CaseItRight(_resources[i]) + ", ";
            }
        }

        res = res.Substring(0, res.Length - 2);
        return(res);
    }