예제 #1
0
    /// Add any missing systems:
    private void InitSystems()
    {
        registerTile = GetComponent <RegisterTile>();
        //Always include blood for living entities:
        bloodSystem = GetComponent <BloodSystem>();
        if (bloodSystem == null)
        {
            bloodSystem = gameObject.AddComponent <BloodSystem>();
        }

        //Always include respiratory for living entities:
        respiratorySystem = GetComponent <RespiratorySystem>();
        if (respiratorySystem == null)
        {
            respiratorySystem = gameObject.AddComponent <RespiratorySystem>();
        }

        var tryGetHead = FindBodyPart(BodyPartType.Head);

        if (tryGetHead != null && brainSystem == null)
        {
            if (tryGetHead.Type != BodyPartType.Chest)
            {
                //Head exists, install a brain system
                brainSystem = gameObject.AddComponent <BrainSystem>();
            }
        }
    }
예제 #2
0
 void Awake()
 {
     bloodSystem           = GetComponent <BloodSystem>();
     livingHealthBehaviour = GetComponent <LivingHealthBehaviour>();
     playerScript          = GetComponent <PlayerScript>();
     equipment             = GetComponent <Equipment>();
 }
예제 #3
0
 void Awake()
 {
     bloodSystem           = GetComponent <BloodSystem>();
     livingHealthBehaviour = GetComponent <LivingHealthBehaviour>();
     playerScript          = GetComponent <PlayerScript>();
     registerTile          = GetComponent <RegisterTile>();
     equipment             = GetComponent <Equipment>();
     objectBehaviour       = GetComponent <ObjectBehaviour>();
 }
예제 #4
0
    void InitSystem()
    {
        playerScript          = GetComponent <PlayerScript>();
        bloodSystem           = GetComponent <BloodSystem>();
        respiratorySystem     = GetComponent <RespiratorySystem>();
        livingHealthBehaviour = GetComponent <LivingHealthBehaviour>();

        //Server only
        if (CustomNetworkManager.Instance._isServer)
        {
            //Spawn a brain and connect the brain to this living entity
            brain = new Brain();
            brain.ConnectBrainToBody(gameObject);
            if (playerScript != null)
            {
                //TODO: See https://github.com/unitystation/unitystation/issues/1429
            }
            init = true;
        }
    }
예제 #5
0
 void Awake()
 {
     bloodSystem = GetComponent <BloodSystem>();
     playerMove  = GetComponent <PlayerMove>();
 }
예제 #6
0
 public Physical(Anthropometrics metrics = null, Head head = null, Chest chest = null, Abdomen abdomen = null, BloodSystem blood = null, Limbs limbs = null, Infections infections = null, VascularSystem vascularSystem = null)
 {
     _anthropometrics = metrics ?? new Anthropometrics();
     Head             = head ?? new Head();
     Chest            = chest ?? new Chest();
     Abdomen          = abdomen ?? new Abdomen();
     Blood            = blood ?? new BloodSystem();
     Limbs            = limbs ?? new Limbs();
     Infections       = infections ?? new Infections();
     VascularSystem   = vascularSystem ?? new VascularSystem();
 }
예제 #7
0
    protected virtual void Start()
    {
        instance = this;

        PreSpawnAllBloods();
    }
예제 #8
0
        static void Main(string[] args)
        {
            PatientPod Pod = new PatientPod();

            #region SetupPatient
            Blood bs = new Blood(new BloodType()
            {
                ABO = BloodABO.AB, Rhesus = BloodRhesus.Positive
            });
            BloodSystem     blood   = new BloodSystem(bs);
            Abdomen         abs     = new Abdomen(reproductives: new Reproductive_Male());
            Anthropometrics metrics = new Anthropometrics(21, 181, 120);
            Physical        body    = new Physical(blood: blood, abdomen: abs);
            Patient         pt      = new Patient(body: body);
            #endregion //This sucks
            Pod.TryAddPatient(pt);


            pt.Body.VascularSystem.OxygenatedVessels["LeftCoronary"].Patency = 0.25f;

            Pod.PerformProceedure(new ExamineHeartCoronaryAngiogram(), out bool _);


            //VascularSystem vs = new VascularSystem();

            //vs.OxygenatedVessels["AscendingAorta"].Patency = 0.35f;
            //vs.OxygenatedVessels["LeftCoronary"].Patency = 0.25f;

            //System.Console.WriteLine(vs.GetSupply(new  Heart()));
            //Vessel restrictionPoint = vs.OxygenatedVessels["LeftAnteriorDescending"].GetLowestPatencyVessel();
            //System.Console.WriteLine($"{restrictionPoint.Name}: {restrictionPoint.Patency}");

            //Console.WriteLine(pt.Body.Anthropometrics.BMI);
            //LeftLung left = new LeftLung();
            //RightLung right = new RightLung();

            //RespiratorySystem respiratorySystem = new RespiratorySystem(left, right);

            ////respiratorySystem.RemoveLung(true, out Lung temp);
            ////respiratorySystem.InsertLung(left);

            //PatientExamination exam = new ExamineLungsAuscultateLungs();
            //Pod.PerformProceedure(exam, out bool _);

            //exam = new ExamineLungsPrecussLungs();
            //Pod.PerformProceedure(exam, out bool _);


            //var t = pt.Body.Infections.Chest.GetInfections();

            //System.Console.WriteLine(Pod.PatientResults.RespiratorySystem.LeftLung.BreathSounds[LungLobeLocation.Upper]);
            //System.Console.WriteLine(Pod.TotalWasteProduced);
            //PatientProceedure intervention = new PerformLumbarPuncture();
            //Pod.PerformProceedure(intervention, out bool _);
            //System.Console.WriteLine(Pod.TotalWasteProduced);


            //Lung test = new RightLung();
            //test.Lobes[LungLobeLocation.Upper]._organHealth = 0.045f;
            //test.Lobes[LungLobeLocation.Lower]._organHealth = 0.065f;
            //OrganState t = test.OrganState;

            //System.Console.WriteLine(    test.OxygenRequirement);

            System.Console.WriteLine("FOR DEBUGGING");
        }