mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 14:47:50 +01:00
[MIRROR] code/global.dm => code/_global_vars/ (#10689)
Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Selis
Kashargul
parent
a7718c6177
commit
f04f992cfe
@@ -6,14 +6,14 @@
|
||||
event_type = /datum/event2/event/manifest_malfunction
|
||||
|
||||
/datum/event2/meta/manifest_malfunction/get_weight()
|
||||
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||
var/security = GLOB.metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||
|
||||
if(!security || !data_core)
|
||||
if(!security || !GLOB.data_core)
|
||||
return 0
|
||||
|
||||
var/command = metric.count_people_with_job(/datum/job/hop) + metric.count_people_with_job(/datum/job/captain)
|
||||
var/synths = metric.count_people_in_department(DEPARTMENT_SYNTHETIC)
|
||||
var/everyone = metric.count_people_in_department(DEPARTMENT_EVERYONE) - (synths + security + command) // So they don't get counted twice.
|
||||
var/command = GLOB.metric.count_people_with_job(/datum/job/hop) + GLOB.metric.count_people_with_job(/datum/job/captain)
|
||||
var/synths = GLOB.metric.count_people_in_department(DEPARTMENT_SYNTHETIC)
|
||||
var/everyone = GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) - (synths + security + command) // So they don't get counted twice.
|
||||
|
||||
return (security * 10) + (synths * 20) + (command * 20) + (everyone * 5)
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
|
||||
switch(record_class_to_delete)
|
||||
if("security")
|
||||
R = safepick(data_core.security)
|
||||
R = safepick(GLOB.data_core.security)
|
||||
|
||||
if("medical")
|
||||
R = safepick(data_core.medical)
|
||||
R = safepick(GLOB.data_core.medical)
|
||||
|
||||
if(R)
|
||||
log_debug("Manifest malfunction event is now deleting [R.fields["name"]]'s [record_class_to_delete] record.")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
event_type = /datum/event2/event/money_hacker
|
||||
|
||||
/datum/event2/meta/money_hacker/get_weight()
|
||||
var/command = metric.count_people_with_job(/datum/job/hop) + metric.count_people_with_job(/datum/job/captain)
|
||||
var/command = GLOB.metric.count_people_with_job(/datum/job/hop) + GLOB.metric.count_people_with_job(/datum/job/captain)
|
||||
|
||||
if(!command)
|
||||
return 0
|
||||
@@ -34,13 +34,13 @@
|
||||
Notifications will be sent as updates occur."
|
||||
var/my_department = "[location_name()] Firewall Subroutines"
|
||||
|
||||
for(var/obj/machinery/message_server/MS in machines)
|
||||
for(var/obj/machinery/message_server/MS in GLOB.machines)
|
||||
if(!MS.active)
|
||||
continue
|
||||
MS.send_rc_message(JOB_HEAD_OF_PERSONNEL + "'s Desk", my_department, "[message]<br>", "", "", 2)
|
||||
|
||||
// Nobody reads the requests consoles so lets use the radio as well.
|
||||
global_announcer.autosay(message, my_department, DEPARTMENT_COMMAND)
|
||||
GLOB.global_announcer.autosay(message, my_department, DEPARTMENT_COMMAND)
|
||||
|
||||
/datum/event2/event/money_hacker/end()
|
||||
var/message = null
|
||||
@@ -55,11 +55,11 @@
|
||||
|
||||
var/my_department = "[location_name()] Firewall Subroutines"
|
||||
|
||||
for(var/obj/machinery/message_server/MS in machines)
|
||||
for(var/obj/machinery/message_server/MS in GLOB.machines)
|
||||
if(!MS.active) continue
|
||||
MS.send_rc_message(JOB_HEAD_OF_PERSONNEL + "'s Desk", my_department, message, "", "", 2)
|
||||
|
||||
global_announcer.autosay(message, my_department, DEPARTMENT_COMMAND)
|
||||
GLOB.global_announcer.autosay(message, my_department, DEPARTMENT_COMMAND)
|
||||
|
||||
/datum/event2/event/money_hacker/proc/hack_account(datum/money_account/A)
|
||||
// Subtract the money.
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
event_type = /datum/event2/event/raise_funds
|
||||
|
||||
/datum/event2/meta/raise_funds/get_weight()
|
||||
var/command = metric.count_people_in_department(DEPARTMENT_COMMAND)
|
||||
var/command = GLOB.metric.count_people_in_department(DEPARTMENT_COMMAND)
|
||||
if(!command) // Need someone to read the centcom message.
|
||||
return 0
|
||||
|
||||
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
|
||||
var/cargo = GLOB.metric.count_people_in_department(DEPARTMENT_CARGO)
|
||||
return (command * 20) + (cargo * 20)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user