Skip to content

Commit

Permalink
фвыфыв
Browse files Browse the repository at this point in the history
  • Loading branch information
Anorak2024 committed Sep 18, 2024
1 parent 047bf6b commit 7bd7963
Show file tree
Hide file tree
Showing 21 changed files with 150 additions and 71 deletions.
9 changes: 8 additions & 1 deletion code/__DEFINES/insurance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
#define INSURANCE_STANDART 3000
#define INSURANCE_EXTENDED 6000
#define INSURANCE_DELUXE 10000
#define INSURANCE_NT_SPECIAL 100000
#define INSURANCE_NT_SPECIAL 100000 // CC roles don't have accounts, but if they do, they will have this insurance.

#define INSURANCE_TYPE_NONE "None"
#define INSURANCE_TYPE_BUDGETARY "Bugetary"
#define INSURANCE_TYPE_STANDART "Standart"
#define INSURANCE_TYPE_EXTENDED "Extended"
#define INSURANCE_TYPE_DELUXE "Deluxe"
#define INSURANCE_TYPE_NT_SPECIAL "NT Special"

#define REQ_INSURANCE_BRUT 1.5
#define REQ_INSURANCE_BURN 1.5
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystem/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,8 @@ SUBSYSTEM_DEF(jobs)
/datum/controller/subsystem/jobs/proc/CreateMoneyAccount(mob/living/H, rank, datum/job/job)
var/money_amount = job ? rand(500, 1500) * get_job_factor(job, job.random_money_factor) : rand(500, 1500)
var/datum/money_account/M = create_account(H.real_name, money_amount, null)
if (H.dna)
GLOB.dna2account[H.dna] = M
var/remembered_info = ""

remembered_info += "<b>Номер вашего аккаунта:</b> #[M.account_number]<br>"
Expand Down
7 changes: 0 additions & 7 deletions code/defines/procs/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,3 @@
freq_text = format_frequency(display_freq)

return freq_text

/proc/get_message_server()
if(GLOB.message_servers)
for(var/obj/machinery/message_server/MS in GLOB.message_servers)
if(MS.active)
return MS
return null
2 changes: 1 addition & 1 deletion code/game/jobs/job/civilian.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
alt_titles = list("Tourist","Businessman","Trader","Assistant")
random_money_factor = TRUE
outfit = /datum/outfit/job/assistant
insurance = INSURANCE_BUDGETARY
insurance_type = INSURANCE_TYPE_BUDGETARY

/datum/job/civilian/get_access()
if(CONFIG_GET(flag/assistant_maint))
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
exp_type = EXP_TYPE_ENGINEERING
money_factor = 7
outfit = /datum/outfit/job/chief_engineer
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/chief_engineer
name = "Chief Engineer"
Expand Down
19 changes: 17 additions & 2 deletions code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
var/optional_objectives=list() // Objectives that are SOMETIMES added.

/// Roundstart insurance normal for this job
var/insurance = INSURANCE_STANDART
var/insurance
var/insurance_type = INSURANCE_TYPE_STANDART

//Only override this proc
/datum/job/proc/after_spawn(mob/living/carbon/human/H)
Expand Down Expand Up @@ -284,7 +285,21 @@

if(H.mind && H.mind.initial_account)
C.associated_account_number = H.mind.initial_account.account_number
H.mind.initial_account.insurance = J.insurance
H.mind.initial_account.insurance_type = J.insurance_type
switch (J.insurance_type)
if (INSURANCE_TYPE_NONE)
H.mind.initial_account.insurance = INSURANCE_NONE
if (INSURANCE_TYPE_BUDGETARY)
H.mind.initial_account.insurance = INSURANCE_BUDGETARY
if (INSURANCE_TYPE_STANDART)
H.mind.initial_account.insurance = INSURANCE_STANDART
if (INSURANCE_TYPE_EXTENDED)
H.mind.initial_account.insurance = INSURANCE_EXTENDED
if (INSURANCE_TYPE_DELUXE)
H.mind.initial_account.insurance = INSURANCE_DELUXE
if (INSURANCE_TYPE_NT_SPECIAL)
H.mind.initial_account.insurance = INSURANCE_NT_SPECIAL

C.owner_uid = H.UID()
C.owner_ckey = H.ckey

Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
exp_type = EXP_TYPE_MEDICAL
money_factor = 7
outfit = /datum/outfit/job/cmo
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/cmo
name = JOB_TITLE_CMO
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/science.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
)
money_factor = 8
outfit = /datum/outfit/job/rd
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE


/datum/outfit/job/rd
Expand Down
12 changes: 6 additions & 6 deletions code/game/jobs/job/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
disabilities_allowed = 0
money_factor = 7
outfit = /datum/outfit/job/hos
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/hos
name = "Head of Security"
Expand Down Expand Up @@ -78,7 +78,7 @@
exp_type = EXP_TYPE_SECURITY
money_factor = 6
outfit = /datum/outfit/job/warden
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/warden
name = "Warden"
Expand Down Expand Up @@ -129,7 +129,7 @@
exp_type = EXP_TYPE_SECURITY
money_factor = 4
outfit = /datum/outfit/job/detective
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/detective
name = "Detective"
Expand Down Expand Up @@ -191,7 +191,7 @@
exp_type = EXP_TYPE_CREW
money_factor = 3
outfit = /datum/outfit/job/officer
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/officer
name = "Security Officer"
Expand Down Expand Up @@ -256,7 +256,7 @@
exp_type = EXP_TYPE_MEDICAL
money_factor = 4
outfit = /datum/outfit/job/brigdoc
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/brigdoc
name = "Brig Physician"
Expand Down Expand Up @@ -294,7 +294,7 @@
exp_type = EXP_TYPE_SECURITY
money_factor = 4
outfit = /datum/outfit/job/pilot
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/pilot
name = "Security Pod Pilot"
Expand Down
4 changes: 2 additions & 2 deletions code/game/jobs/job/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
minimal_player_age = 30
exp_requirements = 3000
exp_type = EXP_TYPE_SILICON
insurance = INSURANCE_NONE
insurance_type = INSURANCE_TYPE_NONE

/datum/job/ai/equip(mob/living/carbon/human/H)
if(!H)
Expand All @@ -34,7 +34,7 @@
exp_requirements = 300
exp_type = EXP_TYPE_CREW
alt_titles = list("Robot")
insurance = INSURANCE_NONE
insurance_type = INSURANCE_TYPE_NONE

/datum/job/cyborg/equip(mob/living/carbon/human/H)
if(!H)
Expand Down
12 changes: 6 additions & 6 deletions code/game/jobs/job/supervisor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
disabilities_allowed = 0
money_factor = 10
outfit = /datum/outfit/job/captain
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/job/captain/get_access()
return get_all_accesses()
Expand Down Expand Up @@ -88,7 +88,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
ACCESS_CLOWN, ACCESS_MIME, ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM)
money_factor = 9
outfit = /datum/outfit/job/hop
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/hop
name = "Head of Personnel"
Expand Down Expand Up @@ -143,7 +143,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
alt_titles = list("NT Consultant","Central Command Consultant")
money_factor = 9
outfit = /datum/outfit/job/nanotrasenrep
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/nanotrasenrep
name = "Nanotrasen Representative"
Expand Down Expand Up @@ -190,7 +190,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_HEADS, ACCESS_BLUESHIELD, ACCESS_WEAPONS)
money_factor = 7
outfit = /datum/outfit/job/blueshield
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/blueshield
name = "Blueshield"
Expand Down Expand Up @@ -246,7 +246,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
alt_titles = list("Judge")
money_factor = 9
outfit = /datum/outfit/job/judge
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/judge
name = "Magistrate"
Expand Down Expand Up @@ -293,7 +293,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
exp_type = EXP_TYPE_CREW
money_factor = 6
outfit = /datum/outfit/job/lawyer
insurance = INSURANCE_DELUXE
insurance_type = INSURANCE_TYPE_DELUXE

/datum/outfit/job/lawyer
name = "Internal Affairs Agent"
Expand Down
4 changes: 2 additions & 2 deletions code/game/jobs/job/support.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
alt_titles = list("Chief Supply Manager")
money_factor = 6
outfit = /datum/outfit/job/qm
insurance = INSURANCE_DELUXE // Always has been.
insurance_type = INSURANCE_TYPE_DELUXE // Always has been.

/datum/outfit/job/qm
name = "Quartermaster"
Expand Down Expand Up @@ -81,7 +81,7 @@
alt_titles = list("Spelunker")
money_factor = 3
outfit = /datum/outfit/job/mining
insurance = INSURANCE_EXTENDED
insurance_type = INSURANCE_TYPE_EXTENDED

/datum/outfit/job/mining
name = "Shaft Miner"
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/syndicate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
admin_only = 1
syndicate_command = 1
outfit = /datum/outfit/job/syndicateofficer
insurance = INSURANCE_NONE
insurance_type = INSURANCE_TYPE_NONE

/datum/job/syndicateofficer/get_access()
return get_syndicate_access(title)
Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/adv_med.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
var/mob/living/carbon/human/occupant
var/known_implants = list(/obj/item/implant/chem, /obj/item/implant/death_alarm, /obj/item/implant/mindshield, /obj/item/implant/tracking, /obj/item/implant/health)
var/isPrinting = FALSE
var/obj/item/card/id/inserted_id = null

/obj/machinery/bodyscanner/Destroy()
go_out()
Expand Down Expand Up @@ -387,6 +388,8 @@
P.info += "<br><br><b>Notes:</b><br>"
P.name = "Body Scan - [name]"
isPrinting = FALSE
if ("insurance")
do_insurance_collection(occupant, inserted_id ? inserted_id.associated_account_number : null)
else
return FALSE

Expand Down
Loading

0 comments on commit 7bd7963

Please sign in to comment.