-
Notifications
You must be signed in to change notification settings - Fork 4
/
Citizen.cs
162 lines (149 loc) · 6.01 KB
/
Citizen.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
using Rage;
using LSPD_First_Response.Mod.API;
using System;
using System.Collections.Generic;
using LSPD_First_Response.Engine.Scripting.Entities;
namespace YobbinCallouts
{
class Citizen : Ped
{
//PED RELATED
public string FullName { get; private set; }
public string TimesStopped { get; private set; }
public WantedInformation WantedInformation { get; private set; }
public string Forename { get; private set; }
public bool Wanted { get; private set; }
public List<string> MedicalProblems { get; private set; }
public string Gender { get; private set; }
Random monke = new Random();
//GENERAL
private List<string> commonMedicalProblems = new List<string>()
{
"Multiple Lacerations all over upper body and face",
"Gunshot wounds in the thigh, arm, neck",
"Pneumothorax",
"Shattered Femur",
"Grade 3 Concussion",
"3rd Degree Burns",
"Broken Nose",
"Broken Orbital",
"Stab wounds in the stomach",
"Bruise marks on wrists and forearms"
};
private List<string> commonMentalHealthProblems = new List<string>()
{
"Depression",
"Generalised anxiety disorder",
"Panic Disorder",
"Obsessive-Compulsive Disorder",
"Post-Traumatic Stress Disorder",
"Dissociative Identity Disorder",
"Paranoid Personality Disorder",
"Schizophrenia",
"Social Anxiety Disorder",
"Nosocomephobia(Fear of hospitals)"
};
private Persona pedPersona;
/// <summary>
/// constructors..you know how those work catYes
/// </summary>
/// <param name="ped"></param>
///
public Citizen() : base()
{
pedPersona = Functions.GetPersonaForPed(this);
FullName = pedPersona.FullName;
Forename = pedPersona.Forename;
TimesStopped = pedPersona.TimesStopped.ToString();
Wanted = pedPersona.Wanted;
WantedInformation = pedPersona.WantedInformation;
Gender = pedPersona.Gender.ToString();
MedicalProblems = new List<string>();
}
public Citizen(Model modelName, Vector3 spawnPoint) : base(spawnPoint, modelName)
{
pedPersona = Functions.GetPersonaForPed(this);
FullName = pedPersona.FullName;
Forename = pedPersona.Forename;
TimesStopped = pedPersona.TimesStopped.ToString();
Wanted = pedPersona.Wanted;
WantedInformation = pedPersona.WantedInformation;
Gender = pedPersona.Gender.ToString();
MedicalProblems = new List<string>();
}
public Citizen(Vector3 spawnPoint, float heading) : base(spawnPoint, heading)
{
pedPersona = Functions.GetPersonaForPed(this);
FullName = pedPersona.FullName;
Forename = pedPersona.Forename;
TimesStopped = pedPersona.TimesStopped.ToString();
Wanted = pedPersona.Wanted;
WantedInformation = pedPersona.WantedInformation;
Gender = pedPersona.Gender.ToString();
MedicalProblems = new List<string>();
}
public Citizen(Vector3 spawnPoint, Model modelName, float heading) : base(modelName, spawnPoint, heading)
{
pedPersona = Functions.GetPersonaForPed(this);
FullName = pedPersona.FullName;
Forename = pedPersona.Forename;
TimesStopped = pedPersona.TimesStopped.ToString();
Wanted = pedPersona.Wanted;
WantedInformation = pedPersona.WantedInformation;
Gender = pedPersona.Gender.ToString();
MedicalProblems = new List<string>();
}
public Citizen(Vector3 spawnPoint) : base(spawnPoint)
{
pedPersona = Functions.GetPersonaForPed(this);
FullName = pedPersona.FullName;
Forename = pedPersona.Forename;
TimesStopped = pedPersona.TimesStopped.ToString();
Wanted = pedPersona.Wanted;
WantedInformation = pedPersona.WantedInformation;
Gender = pedPersona.Gender.ToString();
MedicalProblems = new List<string>();
}
/// <summary>
/// sets medical problems for escaped suspect using the commonMedicalProblems list of strings
/// </summary>
public void setMedicalProblemsForEscapedSuspect()
{
MedicalProblems.Clear();
Wanted = true;
List<string> CMP = commonMedicalProblems;
for (int i = 0; i < monke.Next(1, 3); i++)
{
int num = monke.Next(0, CMP.Count);
MedicalProblems.Add(CMP[num]);
CMP.RemoveRange(num,1);
}
}
/// <summary>
///sets medical problems for mentally ill suspect using the commonMentalHealthProblems list of strings
/// </summary>
public void setMedicalProblemsForMentallyIllSuspect()
{
MedicalProblems.Clear();
Wanted = false;
List<string> CMHP = commonMentalHealthProblems;
for (int i = 0; i < monke.Next(1, 3); i++)
{
int num = monke.Next(0, CMHP.Count);
MedicalProblems.Add(CMHP[num]);
CMHP.RemoveRange(num, 1);
}
}
/// <summary>
/// Easy way to print out medical problems in toString() method
/// </summary>
/// <param name="list"></param>
/// <returns>Elements of arrays seperated by commas</returns>
public static string ListToString(List<string> list) => string.Join(", ", list);
override
public string ToString()
{
return "~w~ Wanted Status: ~y~" + Wanted + "\n" + "~w~ Times Stopped: ~o~ " + TimesStopped + "\n" + "~w~ Medical Flags: ~r~" + "Recent Medical Perscriptions";
}
}
}