mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 01:22:24 +00:00
Merge pull request #8531 from Spookerton/spkrtn/sys/global-agenda
updates all bare globals to use /global/ semantics, and all shared members to /static/
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
var/datum/gear_tweak/color/gear_tweak_free_color_choice = new()
|
||||
var/datum/gear_tweak/implant_location/gear_tweak_implant_location = new()
|
||||
var/global/datum/gear_tweak/color/gear_tweak_free_color_choice = new()
|
||||
var/global/datum/gear_tweak/implant_location/gear_tweak_implant_location = new()
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/admins = list() //list of all clients whom are admins
|
||||
var/global/list/admins = list() //list of all clients whom are admins
|
||||
|
||||
//Since it didn't really belong in any other category, I'm putting this here
|
||||
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
|
||||
@@ -23,7 +23,7 @@ var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
|
||||
#define all_genders_define_list list(MALE,FEMALE,PLURAL,NEUTER)
|
||||
#define all_genders_text_list list("Male","Female","Plural","Neuter")
|
||||
|
||||
var/list/mannequins_
|
||||
var/global/list/mannequins_
|
||||
|
||||
// Times that players are allowed to respawn ("ckey" = world.time)
|
||||
GLOBAL_LIST_EMPTY(respawn_timers)
|
||||
@@ -50,7 +50,7 @@ var/global/list/wing_styles_list = list() // Stores /datum/sprite_accessory/wing
|
||||
|
||||
GLOBAL_LIST_INIT(custom_species_bases, new) // Species that can be used for a Custom Species icon base
|
||||
//Underwear
|
||||
var/datum/category_collection/underwear/global_underwear = new()
|
||||
var/global/datum/category_collection/underwear/global_underwear = new()
|
||||
|
||||
//Backpacks
|
||||
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt", "Messenger Bag", "Sports Bag")
|
||||
@@ -58,9 +58,9 @@ var/global/list/pdachoicelist = list("Default", "Slim", "Old", "Rugged", "Hologr
|
||||
var/global/list/exclude_jobs = list(/datum/job/ai,/datum/job/cyborg)
|
||||
|
||||
// Visual nets
|
||||
var/list/datum/visualnet/visual_nets = list()
|
||||
var/datum/visualnet/camera/cameranet = new()
|
||||
var/datum/visualnet/cult/cultnet = new()
|
||||
var/global/list/datum/visualnet/visual_nets = list()
|
||||
var/global/datum/visualnet/camera/cameranet = new()
|
||||
var/global/datum/visualnet/cult/cultnet = new()
|
||||
|
||||
// Runes
|
||||
var/global/list/rune_list = new()
|
||||
|
||||
@@ -15,7 +15,7 @@ CHANGING ICONS
|
||||
Several new procs have been added to the /icon datum to simplify working with icons. To use them,
|
||||
remember you first need to setup an /icon var like so:
|
||||
|
||||
var/icon/my_icon = new('iconfile.dmi')
|
||||
var/icon/my_icon = new('iconfile.dmi')
|
||||
|
||||
icon/ChangeOpacity(amount = 1)
|
||||
A very common operation in DM is to try to make an icon more or less transparent. Making an icon more
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
return list(1,0,0, 0,1,0, 0,0,1, power,power,power)
|
||||
|
||||
/var/list/delta_index = list(
|
||||
var/global/list/delta_index = list(
|
||||
0, 0.01, 0.02, 0.04, 0.05, 0.06, 0.07, 0.08, 0.1, 0.11,
|
||||
0.12, 0.14, 0.15, 0.16, 0.17, 0.18, 0.20, 0.21, 0.22, 0.24,
|
||||
0.25, 0.27, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 0.42,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/church_name = null
|
||||
var/global/church_name = null
|
||||
/proc/church_name()
|
||||
if (church_name)
|
||||
return church_name
|
||||
@@ -25,7 +25,7 @@ var/church_name = null
|
||||
|
||||
return name
|
||||
|
||||
var/religion_name = null
|
||||
var/global/religion_name = null
|
||||
/proc/religion_name()
|
||||
if (religion_name)
|
||||
return religion_name
|
||||
@@ -111,7 +111,7 @@ var/religion_name = null
|
||||
|
||||
return name
|
||||
|
||||
var/syndicate_name = null
|
||||
var/global/syndicate_name = null
|
||||
/proc/syndicate_name()
|
||||
if (syndicate_name)
|
||||
return syndicate_name
|
||||
@@ -143,8 +143,8 @@ var/syndicate_name = null
|
||||
|
||||
|
||||
//Traitors and traitor silicons will get these. Revs will not.
|
||||
var/syndicate_code_phrase//Code phrase for traitors.
|
||||
var/syndicate_code_response//Code response for traitors.
|
||||
var/global/syndicate_code_phrase//Code phrase for traitors.
|
||||
var/global/syndicate_code_response//Code response for traitors.
|
||||
|
||||
/*
|
||||
Should be expanded.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define MIN_GALLOP 7
|
||||
|
||||
//This is a global instance to allow much of this code to be reused. The interfaces are kept separately
|
||||
var/datum/sortInstance/sortInstance = new()
|
||||
var/global/datum/sortInstance/sortInstance = new()
|
||||
/datum/sortInstance
|
||||
//The array being sorted.
|
||||
var/list/L
|
||||
|
||||
@@ -370,8 +370,8 @@
|
||||
//For generating neat chat tag-images
|
||||
//The icon var could be local in the proc, but it's a waste of resources
|
||||
// to always create it and then throw it out.
|
||||
/var/icon/text_tag_icons = 'icons/chattags.dmi'
|
||||
/var/list/text_tag_cache = list()
|
||||
var/global/icon/text_tag_icons = 'icons/chattags.dmi'
|
||||
var/global/list/text_tag_cache = list()
|
||||
/proc/create_text_tag(var/tagname, var/tagdesc = tagname, var/client/C = null)
|
||||
if(!(C && C.is_preference_enabled(/datum/client_preference/chat_tags)))
|
||||
return tagdesc
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
#define TICKS2DS(T) ((T) TICKS) // Convert ticks to deciseconds
|
||||
#define DS2NEARESTTICK(DS) TICKS2DS(-round(-(DS2TICKS(DS))))
|
||||
|
||||
var/world_startup_time
|
||||
var/global/world_startup_time
|
||||
|
||||
/proc/get_game_time()
|
||||
var/global/time_offset = 0
|
||||
var/global/last_time = 0
|
||||
var/global/last_usage = 0
|
||||
var/static/time_offset = 0
|
||||
var/static/last_time = 0
|
||||
var/static/last_usage = 0
|
||||
|
||||
var/wtime = world.time
|
||||
var/wusage = TICK_USAGE * 0.01
|
||||
@@ -39,8 +39,8 @@ var/world_startup_time
|
||||
return wtime + (time_offset + wusage) * world.tick_lag
|
||||
|
||||
GLOBAL_VAR_INIT(roundstart_hour, pick(2,7,12,17))
|
||||
var/station_date = ""
|
||||
var/next_station_date_change = 1 DAY
|
||||
var/global/station_date = ""
|
||||
var/global/next_station_date_change = 1 DAY
|
||||
|
||||
#define duration2stationtime(time) time2text(station_time_in_ds + time, "hh:mm")
|
||||
#define worldtime2stationtime(time) time2text(GLOB.roundstart_hour HOURS + time, "hh:mm")
|
||||
@@ -91,8 +91,8 @@ var/next_station_date_change = 1 DAY
|
||||
//else
|
||||
//return 1
|
||||
|
||||
var/next_duration_update = 0
|
||||
var/last_round_duration = 0
|
||||
var/global/next_duration_update = 0
|
||||
var/global/last_round_duration = 0
|
||||
GLOBAL_VAR_INIT(round_start_time, 0)
|
||||
|
||||
/hook/roundstart/proc/start_timer()
|
||||
@@ -117,8 +117,8 @@ GLOBAL_VAR_INIT(round_start_time, 0)
|
||||
next_duration_update = world.time + 1 MINUTES
|
||||
return last_round_duration
|
||||
|
||||
/var/midnight_rollovers = 0
|
||||
/var/rollovercheck_last_timeofday = 0
|
||||
var/global/midnight_rollovers = 0
|
||||
var/global/rollovercheck_last_timeofday = 0
|
||||
/proc/update_midnight_rollover()
|
||||
if (world.timeofday < rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS!
|
||||
return midnight_rollovers++
|
||||
|
||||
@@ -1193,7 +1193,7 @@ var/global/list/common_tools = list(
|
||||
Checks if that loc and dir has a item on the wall
|
||||
TODO - Fix this ancient list of wall items. Preferably make it dynamically populated. ~Leshana
|
||||
*/
|
||||
var/list/WALLITEMS = list(
|
||||
var/global/list/WALLITEMS = list(
|
||||
/obj/machinery/power/apc, /obj/machinery/alarm, /obj/item/radio/intercom, /obj/structure/frame,
|
||||
/obj/structure/extinguisher_cabinet, /obj/structure/reagent_dispensers/peppertank,
|
||||
/obj/machinery/status_display, /obj/machinery/requests_console, /obj/machinery/light_switch, /obj/structure/sign,
|
||||
@@ -1258,7 +1258,7 @@ var/list/WALLITEMS = list(
|
||||
var/color = hex || rgb(red, green, blue)
|
||||
return "<span style='font-face: fixedsys; font-size: 14px; background-color: [color]; color: [color]'>___</span>"
|
||||
|
||||
var/mob/dview/dview_mob = new
|
||||
var/global/mob/dview/dview_mob = new
|
||||
|
||||
//Version of view() which ignores darkness, because BYOND doesn't have it.
|
||||
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
|
||||
|
||||
Reference in New Issue
Block a user