mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 06:00:23 +01:00
var/global/list -> GLOB. conversion (#17928)
* These two are easy * !!!runlevel_flags the fact it was global.runlevel_flags.len has me a bit...iffy on this. * !!!json_cache Same as above. used global. * player_list & observer_mob_list * mechas_list * this wasn't even used * surgery_steps * event_triggers * landmarks_list * dead_mob_list * living_mob_list * ai_list * cable_list * cleanbot_reserved_turfs * listening_objects * silicon_mob_list * human_mob_list * Update global_lists.dm * joblist * mob_list * Update global_lists.dm * holomap_markers * mapping_units * mapping_beacons * hair_styles_list * facial_hair_styles_list * Update global_lists.dm * facial_hair_styles_male_list * facial_hair_styles_female_list * body_marking_styles_list * body_marking_nopersist_list * ear_styles_list * hair_styles_male_list * tail_styles_list * wing_styles_list * escape_list & rune_list & endgame_exits these were all really small * endgame_safespawns * stool_cache * emotes_by_key * random_maps & map_count * item_tf_spawnpoints * narsie_list * active_radio_jammers * unused * paikeys * pai_software_by_key & default_pai_software * plant_seed_sprites * magazine_icondata_keys & magazine_icondata_states * unused * ashtray_cache * light_type_cache * HOLIDAY!!! this one was annoying * faction stuff (red?!) * Update preferences_factions.dm * vs edit removal * backbaglist, pdachoicelist, exclude_jobs * item_digestion_blacklist, edible_tech, blacklisted_artifact_effect, selectable_footstep, hexNums, syndicate_access * string_slot_flags and hexdigits->hexNums * possible_changeling_IDs * vr_mob_tf_options * vr_mob_spawner_options * pipe_colors * vr_mob_spawner_options * common_tools * newscaster_standard_feeds * Update periodic_news.dm * changeling_fabricated_clothing * semirandom_mob_spawner_decisions * id_card_states * Update syndicate_ids.dm * overlay_cache & gear_distributed_to * more * radio_channels_by_freq * Update global_lists.dm * proper * default_medbay_channels & default_internal_channels default_internal_channels is weird as it has a mapbased proc() but that proc is never called... * valid_ringtones * move this * possible_plants * more * separate these moves xeno2chemlist from a hook to a new global list. * tube_dir_list * valid_bloodreagents & monitor_states * Junk * valid_bloodtypes * breach_burn_descriptors & burn * more!! appliance_available_recipes seems uber cursed, re-look at later * Appliance code is cursed * wide_chassis & flying_chassis * allows_eye_color * all_tooltip_styles * direction_table * gun_choices * severity_to_string * old event_viruses * description_icons * MOVE_KEY_MAPPINGS * more more * pai & robot modules * Update global_lists.dm * GEOSAMPLES Also swaps a .len to LAZYLEN() * shieldgens * reagent recipies * global ammo types * rad collector * old file and unused global * nif_look_messages * FESH * nifsoft * chamelion * the death of sortAtom * globulins * lazylen that * Update global_lists.dm * LAZY * Theese too * quick fix --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
f6ccd518ac
commit
84dc5535dc
@@ -1,7 +1,5 @@
|
||||
#define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var)
|
||||
|
||||
var/global/list/image/splatter_cache=list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
var/dryname = "dried blood"
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
// 5 seconds
|
||||
#define TRACKS_CRUSTIFY_TIME 50
|
||||
|
||||
// color-dir-dry
|
||||
var/global/list/image/fluidtrack_cache=list()
|
||||
|
||||
/datum/fluidtrack
|
||||
var/direction=0
|
||||
var/basecolor="#A10808"
|
||||
|
||||
@@ -60,10 +60,10 @@
|
||||
GLOB.xeno_spawn += loc
|
||||
delete_me = TRUE
|
||||
if("endgame_exit")
|
||||
endgame_safespawns += loc
|
||||
GLOB.endgame_safespawns += loc
|
||||
delete_me = TRUE
|
||||
if("bluespacerift")
|
||||
endgame_exits += loc
|
||||
GLOB.endgame_exits += loc
|
||||
delete_me = TRUE
|
||||
//VOREStation Add Start
|
||||
if("vinestart")
|
||||
@@ -74,11 +74,11 @@
|
||||
if(delete_me)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
else
|
||||
landmarks_list += src
|
||||
GLOB.landmarks_list += src
|
||||
|
||||
/obj/effect/landmark/Destroy(var/force = FALSE)
|
||||
if(force)
|
||||
landmarks_list -= src
|
||||
GLOB.landmarks_list -= src
|
||||
return ..()
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
|
||||
return
|
||||
name = new_name
|
||||
creator_ckey = M.ckey
|
||||
if(!event_triggers[creator_ckey])
|
||||
event_triggers[creator_ckey] = list()
|
||||
event_triggers[creator_ckey] |= list(src)
|
||||
if(!GLOB.event_triggers[creator_ckey])
|
||||
GLOB.event_triggers[creator_ckey] = list()
|
||||
GLOB.event_triggers[creator_ckey] |= list(src)
|
||||
isTeamwork = (tgui_alert(M, "Notify rest of team?", "Teamwork", list("No", "Yes")) == "Yes" ? TRUE : FALSE)
|
||||
if(!isTeamwork)
|
||||
isLoud = (tgui_alert(M, "Should it make a bwoink when triggered for YOU?", "bwoink", list("No", "Yes")) == "Yes" ? TRUE : FALSE)
|
||||
@@ -41,8 +41,8 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
|
||||
log_admin("[M.ckey] has created a [isNarrate ? "Narrtion" : "Notification"] landmark trigger at [coordinates]")
|
||||
|
||||
/obj/effect/landmark/event_trigger/Destroy()
|
||||
if(event_triggers[creator_ckey])
|
||||
event_triggers[creator_ckey] -= src
|
||||
if(GLOB.event_triggers[creator_ckey])
|
||||
GLOB.event_triggers[creator_ckey] -= src
|
||||
. = ..()
|
||||
|
||||
/obj/effect/landmark/event_trigger/Crossed(var/atom/movable/AM)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/effect/manifest/proc/manifest()
|
||||
var/dat = span_bold("Crew Manifest") + ":<BR>"
|
||||
for(var/mob/living/carbon/human/M in mob_list)
|
||||
for(var/mob/living/carbon/human/M in GLOB.mob_list)
|
||||
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
|
||||
var/obj/item/paper/P = new /obj/item/paper( src.loc )
|
||||
P.info = dat
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
if(!proximity_to)
|
||||
return FALSE
|
||||
|
||||
for(var/thing in player_list)
|
||||
var/mob/M = thing // Avoiding typechecks for more speed, player_list will only contain mobs anyways.
|
||||
for(var/thing in GLOB.player_list)
|
||||
var/mob/M = thing // Avoiding typechecks for more speed, GLOB.player_list will only contain mobs anyways.
|
||||
if(ignore_ghosts && isobserver(M))
|
||||
continue
|
||||
if(ignore_afk && M.client && M.client.is_afk(5 MINUTES))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/shake_strength = 1 // How much it shakes.
|
||||
|
||||
/obj/effect/map_effect/interval/screen_shaker/trigger()
|
||||
for(var/mob/M as anything in player_list)
|
||||
for(var/mob/M as anything in GLOB.player_list)
|
||||
if(M.z == src.z && get_dist(src, M) <= shake_radius)
|
||||
shake_camera(M, shake_duration, shake_strength)
|
||||
..()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
var/global/list/semirandom_mob_spawner_decisions = list()
|
||||
|
||||
/obj/random/mob/semirandom_mob_spawner
|
||||
name = "Semi-Random Spawner"
|
||||
desc = "Spawns groups of mobs that are all of the same theme type/theme."
|
||||
@@ -308,11 +306,11 @@ var/global/list/semirandom_mob_spawner_decisions = list()
|
||||
)
|
||||
|
||||
/obj/random/mob/semirandom_mob_spawner/item_to_spawn()
|
||||
var/list/choice = semirandom_mob_spawner_decisions[type]
|
||||
var/list/choice = GLOB.semirandom_mob_spawner_decisions[type]
|
||||
|
||||
if(!choice)
|
||||
choice = pickweight(possible_mob_types)
|
||||
semirandom_mob_spawner_decisions[type] = choice
|
||||
GLOB.semirandom_mob_spawner_decisions[type] = choice
|
||||
|
||||
return pickweight(choice)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/effect/temp_visual/Initialize(mapload)
|
||||
. = ..()
|
||||
if(randomdir)
|
||||
set_dir(pick(global.GLOB.cardinal))
|
||||
set_dir(pick(GLOB.cardinal))
|
||||
|
||||
spawn(duration)
|
||||
qdel(src)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
far_dist += heavy_impact_range * 5
|
||||
far_dist += devastation_range * 20
|
||||
var/frequency = get_rand_frequency()
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.z == epicenter.z)
|
||||
var/turf/M_turf = get_turf(M)
|
||||
var/dist = get_dist(M_turf, epicenter)
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
var/close = range(world.view+round(devastation_range,1), epicenter)
|
||||
// to all distanced mobs play a different sound
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.z == epicenter.z)
|
||||
if(!(M in close))
|
||||
// check if the mob can hear
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
/obj/item/Destroy()
|
||||
if(item_tf_spawn_allowed)
|
||||
item_tf_spawnpoints -= src
|
||||
GLOB.item_tf_spawnpoints -= src
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.drop_from_inventory(src)
|
||||
@@ -1122,12 +1122,12 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen
|
||||
/obj/item/proc/item_tf_spawnpoint_set()
|
||||
if(!item_tf_spawn_allowed)
|
||||
item_tf_spawn_allowed = TRUE
|
||||
item_tf_spawnpoints += src
|
||||
GLOB.item_tf_spawnpoints += src
|
||||
|
||||
/obj/item/proc/item_tf_spawnpoint_used()
|
||||
if(item_tf_spawn_allowed)
|
||||
item_tf_spawn_allowed = FALSE
|
||||
item_tf_spawnpoints -= src
|
||||
GLOB.item_tf_spawnpoints -= src
|
||||
|
||||
// Ported from TG, used when dropping items on tables/closets.
|
||||
/obj/item/proc/do_drop_animation(atom/moving_from)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var/mob/living/carrier = isliving(loc) ? loc : null
|
||||
|
||||
// First, let's check if any AIs are actively tracking them.
|
||||
for(var/mob/living/silicon/ai/AI in silicon_mob_list)
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.silicon_mob_list)
|
||||
if(carrier && AI.cameraFollow == carrier)
|
||||
if(!carrier.tracking_status()) // Successful tracking returns a 0, so we need to invert it.
|
||||
return PROXIMITY_TRACKING
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", ui.user)
|
||||
var/obj/item/communicator/comm = exonet.get_atom_from_address(their_address)
|
||||
to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], <b>\"[text]\"</b> (<a href='byond://?src=\ref[src];action=Reply;target=\ref[exonet.get_atom_from_address(comm.exonet.address)]'>Reply</a>)"))
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
|
||||
if(isnewplayer(M) || M.forbid_seeing_deadchat)
|
||||
continue
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
//
|
||||
// Allows ghosts to roleplay with crewmembers without having to commit to joining the round, and also allows communications between two communicators.
|
||||
|
||||
var/global/list/obj/item/communicator/all_communicators = list() //Don't change this to GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator) for now. Sortatoms goes berserk.
|
||||
|
||||
// List of core tabs the communicator can switch to
|
||||
#define HOMETAB 1
|
||||
#define PHONTAB 2
|
||||
@@ -98,7 +96,7 @@ var/global/list/obj/item/communicator/all_communicators = list() //Don't change
|
||||
/obj/item/communicator/Initialize(mapload)
|
||||
. = ..()
|
||||
all_communicators += src
|
||||
all_communicators = sortAtom(all_communicators)
|
||||
all_communicators = sort_names(all_communicators)
|
||||
node = get_exonet_node()
|
||||
START_PROCESSING(SSobj, src)
|
||||
camera = new(src)
|
||||
@@ -191,7 +189,7 @@ var/global/list/obj/item/communicator/all_communicators = list() //Don't change
|
||||
if(!comm || !comm.exonet || !comm.exonet.address || comm.exonet.address == src.exonet.address) //Don't add addressless devices, and don't add ourselves.
|
||||
continue
|
||||
src.known_devices |= comm
|
||||
for(var/mob/observer/dead/O in dead_mob_list)
|
||||
for(var/mob/observer/dead/O in GLOB.dead_mob_list)
|
||||
if(!O.client || O.client.prefs.communicator_visibility == 0)
|
||||
continue
|
||||
src.known_devices |= O
|
||||
@@ -316,7 +314,7 @@ var/global/list/obj/item/communicator/all_communicators = list() //Don't change
|
||||
//Clean up references that might point at us
|
||||
all_communicators -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
listening_objects.Remove(src)
|
||||
GLOB.listening_objects.Remove(src)
|
||||
QDEL_NULL(camera)
|
||||
QDEL_NULL(exonet)
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
if (usr != src)
|
||||
return //something is terribly wrong
|
||||
|
||||
for(var/mob/living/L in mob_list) //Simple check so you don't have dead people calling.
|
||||
for(var/mob/living/L in GLOB.mob_list) //Simple check so you don't have dead people calling.
|
||||
if(src.client.prefs.real_name == L.real_name)
|
||||
to_chat(src, span_danger("Your identity is already present in the game world. Please load in a different character first."))
|
||||
return
|
||||
@@ -160,7 +160,7 @@
|
||||
to_chat(src, span_notice("You have sent '[text_message]' to [chosen_communicator]."))
|
||||
exonet_messages.Add(span_bold("To [chosen_communicator]:") + "<br>[text_message]")
|
||||
log_pda("(DCOMM: [src]) sent \"[text_message]\" to [chosen_communicator]", src)
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
|
||||
if(isnewplayer(M) || M.forbid_seeing_deadchat)
|
||||
continue
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
if(!comm || !istype(comm)) return
|
||||
|
||||
communicating |= comm
|
||||
listening_objects |= src
|
||||
GLOB.listening_objects |= src
|
||||
update_icon()
|
||||
|
||||
// Proc: del_communicating()
|
||||
@@ -73,7 +73,7 @@
|
||||
new_voice.mind = candidate.mind //Transfer the mind, if any.
|
||||
new_voice.ckey = candidate.ckey //Finally, bring the client over.
|
||||
voice_mobs.Add(new_voice)
|
||||
listening_objects |= src
|
||||
GLOB.listening_objects |= src
|
||||
|
||||
var/obj/screen/blackness = new() //Makes a black screen, so the candidate can't see what's going on before actually 'connecting' to the communicator.
|
||||
blackness.screen_loc = ui_entire_screen
|
||||
@@ -139,7 +139,7 @@
|
||||
comm.end_video()
|
||||
|
||||
if(voice_mobs.len == 0 && communicating.len == 0)
|
||||
listening_objects.Remove(src)
|
||||
GLOB.listening_objects.Remove(src)
|
||||
|
||||
// Proc: request()
|
||||
// Parameters: 1 (candidate - the ghost or communicator wanting to call the device)
|
||||
@@ -294,7 +294,7 @@
|
||||
to_chat(src, span_danger("You have used the antagHUD and cannot respawn or use communicators!"))
|
||||
return
|
||||
|
||||
for(var/mob/living/L in mob_list) //Simple check so you don't have dead people calling.
|
||||
for(var/mob/living/L in GLOB.mob_list) //Simple check so you don't have dead people calling.
|
||||
if(src.client.prefs.real_name == L.real_name)
|
||||
to_chat(src, span_danger("Your identity is already present in the game world. Please load in a different character first."))
|
||||
return
|
||||
|
||||
@@ -488,10 +488,10 @@
|
||||
add_attack_logs(user,H,"Shocked using [name]")
|
||||
|
||||
/obj/item/shockpaddles/proc/make_alive(mob/living/carbon/human/M) //This revives the mob
|
||||
dead_mob_list.Remove(M)
|
||||
if((M in living_mob_list) || (M in dead_mob_list))
|
||||
GLOB.dead_mob_list.Remove(M)
|
||||
if((M in GLOB.living_mob_list) || (M in GLOB.dead_mob_list))
|
||||
WARNING("Mob [M] was defibbed but already in the living or dead list still!")
|
||||
living_mob_list += M
|
||||
GLOB.living_mob_list += M
|
||||
|
||||
M.timeofdeath = 0
|
||||
M.set_stat(UNCONSCIOUS) //Life() can bring them back to consciousness if it needs to.
|
||||
|
||||
@@ -1,22 +1,3 @@
|
||||
var/global/list/radio_channels_by_freq = list(
|
||||
num2text(PUB_FREQ) = CHANNEL_COMMON,
|
||||
num2text(AI_FREQ) = CHANNEL_AI_PRIVATE,
|
||||
num2text(ENT_FREQ) = CHANNEL_ENTERTAINMENT,
|
||||
num2text(ERT_FREQ) = CHANNEL_RESPONSE_TEAM,
|
||||
num2text(COMM_FREQ)= CHANNEL_COMMAND,
|
||||
num2text(ENG_FREQ) = CHANNEL_ENGINEERING,
|
||||
num2text(MED_FREQ) = CHANNEL_MEDICAL,
|
||||
num2text(MED_I_FREQ)=CHANNEL_MEDICAL_1,
|
||||
num2text(SEC_FREQ) = CHANNEL_SECURITY,
|
||||
num2text(SEC_I_FREQ)=CHANNEL_SECURITY_1,
|
||||
num2text(SCI_FREQ) = CHANNEL_SCIENCE,
|
||||
num2text(SUP_FREQ) = CHANNEL_SUPPLY,
|
||||
num2text(SRV_FREQ) = CHANNEL_SERVICE,
|
||||
num2text(EXP_FREQ) = CHANNEL_EXPLORATION
|
||||
)
|
||||
|
||||
GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard)
|
||||
|
||||
/obj/item/paicard
|
||||
name = "personal AI device"
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
@@ -73,7 +54,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard)
|
||||
to_chat(user,span_warning("You cannot join a pAI card when you are banned from playing as a pAI."))
|
||||
return
|
||||
|
||||
for(var/ourkey in paikeys)
|
||||
for(var/ourkey in GLOB.paikeys)
|
||||
if(ourkey == user.ckey)
|
||||
to_chat(user, span_warning("You can't just rejoin any old pAI card!!! Your card still exists."))
|
||||
return
|
||||
@@ -96,14 +77,14 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard)
|
||||
var/obj/item/paicard/typeb/card = new(location)
|
||||
var/mob/living/silicon/pai/new_pai = new(card)
|
||||
new_pai.key = user.key
|
||||
paikeys |= new_pai.ckey
|
||||
GLOB.paikeys |= new_pai.ckey
|
||||
card.setPersonality(new_pai)
|
||||
new_pai.SetName(actual_pai_name)
|
||||
else
|
||||
var/obj/item/paicard/card = new(location)
|
||||
var/mob/living/silicon/pai/new_pai = new(card)
|
||||
new_pai.key = user.key
|
||||
paikeys |= new_pai.ckey
|
||||
GLOB.paikeys |= new_pai.ckey
|
||||
card.setPersonality(new_pai)
|
||||
new_pai.SetName(actual_pai_name)
|
||||
|
||||
@@ -112,7 +93,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard)
|
||||
var/obj/item/paicard/typeb/card = new(location)
|
||||
var/mob/living/silicon/pai/new_pai = new(card)
|
||||
new_pai.key = user.key
|
||||
paikeys |= new_pai.ckey
|
||||
GLOB.paikeys |= new_pai.ckey
|
||||
card.setPersonality(new_pai)
|
||||
if(!new_pai.savefile_load(new_pai))
|
||||
var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name")
|
||||
@@ -123,7 +104,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard)
|
||||
var/obj/item/paicard/card = new(location)
|
||||
var/mob/living/silicon/pai/new_pai = new(card)
|
||||
new_pai.key = user.key
|
||||
paikeys |= new_pai.ckey
|
||||
GLOB.paikeys |= new_pai.ckey
|
||||
card.setPersonality(new_pai)
|
||||
if(!new_pai.savefile_load(new_pai))
|
||||
var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name")
|
||||
@@ -517,7 +498,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard)
|
||||
channels = list()
|
||||
|
||||
for(var/internal_chan in internal_channels)
|
||||
var/ch_name = radio_channels_by_freq[internal_chan]
|
||||
var/ch_name = GLOB.radio_channels_by_freq[internal_chan]
|
||||
if(has_channel_access(card.pai, internal_chan))
|
||||
channels += ch_name
|
||||
channels[ch_name] = 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/list/paikeys = list()
|
||||
GLOBAL_LIST_EMPTY(paikeys)
|
||||
|
||||
/obj/item/paicard
|
||||
var/panel_open = FALSE
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/pipe_painter/Initialize(mapload)
|
||||
. = ..()
|
||||
modes = new()
|
||||
for(var/C in pipe_colors)
|
||||
for(var/C in GLOB.pipe_colors)
|
||||
modes += "[C]"
|
||||
mode = pick(modes)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
|
||||
P.change_color(pipe_colors[mode])
|
||||
P.change_color(GLOB.pipe_colors[mode])
|
||||
|
||||
/obj/item/pipe_painter/attack_self(mob/user as mob)
|
||||
var/new_mode = tgui_input_list(user, "Which colour do you want to use?", "Pipe painter", modes)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/obj/item/radio/intercom/department/medbay/Initialize(mapload)
|
||||
. = ..()
|
||||
internal_channels = default_medbay_channels.Copy()
|
||||
internal_channels = GLOB.default_medbay_channels.Copy()
|
||||
|
||||
/obj/item/radio/intercom/department/security/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/list/active_radio_jammers = list()
|
||||
GLOBAL_LIST_EMPTY(active_radio_jammers)
|
||||
|
||||
/proc/is_jammed(var/obj/radio)
|
||||
var/turf/Tr = get_turf(radio)
|
||||
@@ -9,7 +9,7 @@ var/global/list/active_radio_jammers = list()
|
||||
if(our_area.no_comms)
|
||||
return TRUE
|
||||
|
||||
for(var/obj/item/radio_jammer/J as anything in active_radio_jammers)
|
||||
for(var/obj/item/radio_jammer/J as anything in GLOB.active_radio_jammers)
|
||||
var/turf/Tj = get_turf(J)
|
||||
|
||||
if(J.on && Tj.z == Tr.z) //If we're on the same Z, it's worth checking.
|
||||
@@ -52,7 +52,7 @@ var/global/list/active_radio_jammers = list()
|
||||
if(user)
|
||||
to_chat(user,span_warning("\The [src] deactivates."))
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
active_radio_jammers -= src
|
||||
GLOB.active_radio_jammers -= src
|
||||
on = FALSE
|
||||
update_icon()
|
||||
|
||||
@@ -60,7 +60,7 @@ var/global/list/active_radio_jammers = list()
|
||||
if(user)
|
||||
to_chat(user,span_notice("\The [src] is now active."))
|
||||
START_PROCESSING(SSobj, src)
|
||||
active_radio_jammers += src
|
||||
GLOB.active_radio_jammers += src
|
||||
on = TRUE
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -1,27 +1,4 @@
|
||||
#define CANBROADCAST_INNERBOX 0.7071067811865476 //This is sqrt(2)/2
|
||||
// Access check is of the type requires one. These have been carefully selected to avoid allowing the janitor to see channels he shouldn't
|
||||
var/global/list/default_internal_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
num2text(AI_FREQ) = list(access_synth),
|
||||
num2text(ENT_FREQ) = list(),
|
||||
num2text(ERT_FREQ) = list(access_cent_specops),
|
||||
num2text(COMM_FREQ)= list(access_heads),
|
||||
num2text(ENG_FREQ) = list(access_engine_equip, access_atmospherics),
|
||||
num2text(MED_FREQ) = list(access_medical_equip),
|
||||
num2text(MED_I_FREQ)=list(access_medical_equip),
|
||||
num2text(SEC_FREQ) = list(access_security),
|
||||
num2text(SEC_I_FREQ)=list(access_security),
|
||||
num2text(SCI_FREQ) = list(access_tox, access_robotics, access_xenobiology),
|
||||
num2text(SUP_FREQ) = list(access_cargo, access_mining_station),
|
||||
num2text(SRV_FREQ) = list(access_janitor, access_library, access_hydroponics, access_bar, access_kitchen),
|
||||
num2text(EXP_FREQ) = list(access_explorer)
|
||||
)
|
||||
|
||||
var/global/list/default_medbay_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
num2text(MED_FREQ) = list(),
|
||||
num2text(MED_I_FREQ) = list()
|
||||
)
|
||||
|
||||
/obj/item/radio
|
||||
icon = 'icons/obj/radio_vr.dmi'
|
||||
@@ -83,8 +60,8 @@ var/global/list/default_medbay_channels = list(
|
||||
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
wires = new(src)
|
||||
internal_channels = default_internal_channels.Copy()
|
||||
listening_objects += src
|
||||
internal_channels = GLOB.default_internal_channels.Copy()
|
||||
GLOB.listening_objects += src
|
||||
|
||||
if(bluespace_radio && (bs_tx_preload_id || bs_rx_preload_id))
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
@@ -128,7 +105,7 @@ var/global/list/default_medbay_channels = list(
|
||||
/obj/item/radio/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
listening_objects -= src
|
||||
GLOB.listening_objects -= src
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
for (var/ch_name in channels)
|
||||
@@ -766,7 +743,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
|
||||
/obj/item/radio/phone/medbay/Initialize(mapload)
|
||||
. = ..()
|
||||
internal_channels = default_medbay_channels.Copy()
|
||||
internal_channels = GLOB.default_medbay_channels.Copy()
|
||||
|
||||
/obj/item/radio/proc/can_broadcast_to()
|
||||
var/list/output = list()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/obj/item/radio/emergency/Initialize(mapload)
|
||||
. = ..()
|
||||
internal_channels = default_medbay_channels.Copy()
|
||||
internal_channels = GLOB.default_medbay_channels.Copy()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
|
||||
return
|
||||
|
||||
var/target_ref = href_list["target"]
|
||||
var/mob/living/target = locate(target_ref) in mob_list
|
||||
var/mob/living/target = locate(target_ref) in GLOB.mob_list
|
||||
if(!target)
|
||||
to_chat(usr,span_warning("Unable to operate on that target."))
|
||||
return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define OVERLAY_CACHE_LEN 50
|
||||
#define overlay_cache_LEN 50
|
||||
|
||||
/obj/item/t_scanner
|
||||
name = "\improper T-ray scanner"
|
||||
@@ -18,8 +18,6 @@
|
||||
var/client/user_client //since making sure overlays are properly added and removed is pretty important, so we track the current user explicitly
|
||||
var/flicker = 0
|
||||
|
||||
var/global/list/overlay_cache = list() //cache recent overlays
|
||||
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
@@ -82,8 +80,8 @@
|
||||
/obj/item/t_scanner/proc/get_overlay(obj/scanned)
|
||||
//Use a cache so we don't create a whole bunch of new images just because someone's walking back and forth in a room.
|
||||
//Also means that images are reused if multiple people are using t-rays to look at the same objects.
|
||||
if(scanned in overlay_cache)
|
||||
. = overlay_cache[scanned]
|
||||
if(scanned in GLOB.overlay_cache)
|
||||
. = GLOB.overlay_cache[scanned]
|
||||
else
|
||||
var/image/I = image(loc = scanned, icon = scanned.icon, icon_state = scanned.icon_state, layer = HUD_LAYER)
|
||||
|
||||
@@ -98,9 +96,9 @@
|
||||
. = I
|
||||
|
||||
// Add it to cache, cutting old entries if the list is too long
|
||||
overlay_cache[scanned] = .
|
||||
if(overlay_cache.len > OVERLAY_CACHE_LEN)
|
||||
overlay_cache.Cut(1, overlay_cache.len-OVERLAY_CACHE_LEN-1)
|
||||
GLOB.overlay_cache[scanned] = .
|
||||
if(GLOB.overlay_cache.len > overlay_cache_LEN)
|
||||
GLOB.overlay_cache.Cut(1, GLOB.overlay_cache.len-overlay_cache_LEN-1)
|
||||
|
||||
/obj/item/t_scanner/proc/get_scanned_objects(var/scan_dist)
|
||||
. = list()
|
||||
@@ -152,4 +150,4 @@
|
||||
scan_range = 7
|
||||
|
||||
|
||||
#undef OVERLAY_CACHE_LEN
|
||||
#undef overlay_cache_LEN
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
if(ispath(mytape))
|
||||
mytape = new mytape(src)
|
||||
update_icon()
|
||||
listening_objects += src
|
||||
GLOB.listening_objects += src
|
||||
|
||||
/obj/item/taperecorder/empty
|
||||
mytape = null
|
||||
|
||||
/obj/item/taperecorder/Destroy()
|
||||
listening_objects -= src
|
||||
GLOB.listening_objects -= src
|
||||
if(mytape)
|
||||
qdel(mytape)
|
||||
mytape = null
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
return
|
||||
else
|
||||
listening = 1
|
||||
listening_objects |= src
|
||||
GLOB.listening_objects |= src
|
||||
if(mult_icons)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
to_chat(user, span_notice("You enable \the [src], translating into [langset.name]."))
|
||||
else //Turning OFF
|
||||
listening = 0
|
||||
listening_objects -= src
|
||||
GLOB.listening_objects -= src
|
||||
langset = null
|
||||
icon_state = "[initial(icon_state)]"
|
||||
to_chat(user, span_notice("You disable \the [src]."))
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
/obj/item/tvcamera/Initialize(mapload)
|
||||
. = ..()
|
||||
listening_objects += src
|
||||
GLOB.listening_objects += src
|
||||
|
||||
/obj/item/tvcamera/Destroy()
|
||||
listening_objects -= src
|
||||
GLOB.listening_objects -= src
|
||||
qdel(camera)
|
||||
qdel(radio)
|
||||
camera = null
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
if(!M.brainmob.key)
|
||||
var/ghost_can_reenter = 0
|
||||
if(M.brainmob.mind)
|
||||
for(var/mob/observer/dead/G in player_list)
|
||||
for(var/mob/observer/dead/G in GLOB.player_list)
|
||||
if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
|
||||
ghost_can_reenter = 1 //May come in use again at another point.
|
||||
to_chat(user, span_notice("\The [W] is completely unresponsive; though it may be able to auto-resuscitate.")) //Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems.
|
||||
|
||||
@@ -86,14 +86,14 @@
|
||||
return 0
|
||||
|
||||
if(!R.key)
|
||||
for(var/mob/observer/dead/ghost in player_list)
|
||||
for(var/mob/observer/dead/ghost in GLOB.player_list)
|
||||
if(ghost.mind && ghost.mind.current == R)
|
||||
R.key = ghost.key
|
||||
|
||||
R.set_stat(CONSCIOUS)
|
||||
R.add_robot_verbs()
|
||||
dead_mob_list -= R
|
||||
living_mob_list |= R
|
||||
GLOB.dead_mob_list -= R
|
||||
GLOB.living_mob_list |= R
|
||||
R.notify_ai(ROBOT_NOTIFICATION_NEW_UNIT)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -48,9 +48,6 @@
|
||||
|
||||
slowdown = round(amount / 10, 0.1)
|
||||
|
||||
var/global/list/datum/stack_recipe/sandbag_recipes = list( \
|
||||
new/datum/stack_recipe("barricade", /obj/structure/barricade/sandbag, 3, time = 5 SECONDS, one_per_turf = 1, on_floor = 1, pass_stack_color = TRUE))
|
||||
|
||||
/obj/item/stack/sandbags/produce_recipe(datum/stack_recipe/recipe, var/quantity, mob/user)
|
||||
var/required = quantity*recipe.req_amount
|
||||
var/produced = min(quantity*recipe.res_amount, recipe.max_res_amount)
|
||||
|
||||
@@ -542,7 +542,7 @@
|
||||
/obj/item/toy/AI/attack_self(mob/user as mob)
|
||||
var/list/players = list()
|
||||
|
||||
for(var/mob/living/carbon/human/player in player_list)
|
||||
for(var/mob/living/carbon/human/player in GLOB.player_list)
|
||||
if(!player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10))
|
||||
continue
|
||||
players += player.real_name
|
||||
|
||||
@@ -60,7 +60,7 @@ AI MODULES
|
||||
src.transmitInstructions(comp.current, user)
|
||||
to_chat(comp.current, "These are your laws now:")
|
||||
comp.current.show_laws()
|
||||
for(var/mob/living/silicon/robot/R in mob_list)
|
||||
for(var/mob/living/silicon/robot/R in GLOB.mob_list)
|
||||
if(R.lawupdate && (R.connected_ai == comp.current))
|
||||
to_chat(R, "These are your laws now:")
|
||||
R.show_laws()
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"preview_rows" = recipe.get_preview(p_dir),
|
||||
"categories" = list(),
|
||||
"selected_color" = paint_color,
|
||||
"paint_colors" = pipe_colors,
|
||||
"paint_colors" = GLOB.pipe_colors,
|
||||
"mode" = mode
|
||||
)
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
if(!istype(A, /obj/machinery/atmospherics/pipe/simple/heat_exchanging) && istype(A, /obj/machinery/atmospherics/pipe))
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
P.change_color(pipe_colors[paint_color])
|
||||
P.change_color(GLOB.pipe_colors[paint_color])
|
||||
user.visible_message(span_notice("[user] paints \the [P] [paint_color]."), span_notice("You paint \the [P] [paint_color]."))
|
||||
return
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
P.update()
|
||||
P.add_fingerprint(user)
|
||||
if(R.paintable)
|
||||
P.color = pipe_colors[paint_color]
|
||||
P.color = GLOB.pipe_colors[paint_color]
|
||||
P.setPipingLayer(queued_piping_layer)
|
||||
if(queued_p_flipped)
|
||||
P.do_a_flip()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/card/id/syndicate/Initialize(mapload)
|
||||
. = ..()
|
||||
agentcard_module = new(src)
|
||||
access = syndicate_access.Copy()
|
||||
access = GLOB.syndicate_access.Copy()
|
||||
|
||||
/obj/item/card/id/syndicate/station_access/Initialize(mapload)
|
||||
. = ..() // Same as the normal Syndicate id, only already has all station access
|
||||
@@ -64,10 +64,9 @@
|
||||
registered_user.unregister(OBSERVER_EVENT_DESTROY, src)
|
||||
registered_user = null
|
||||
|
||||
/var/global/list/id_card_states
|
||||
/proc/id_card_states()
|
||||
if(!id_card_states)
|
||||
id_card_states = list()
|
||||
if(!GLOB.id_card_states)
|
||||
GLOB.id_card_states = list()
|
||||
for(var/path in typesof(/obj/item/card/id))
|
||||
var/obj/item/card/id/ID = new path()
|
||||
var/datum/card_state/CS = new()
|
||||
@@ -75,10 +74,10 @@
|
||||
CS.item_state = initial(ID.item_state)
|
||||
CS.sprite_stack = ID.initial_sprite_stack
|
||||
CS.name = initial(ID.name)
|
||||
id_card_states += CS
|
||||
id_card_states = dd_sortedObjectList(id_card_states)
|
||||
GLOB.id_card_states += CS
|
||||
GLOB.id_card_states = dd_sortedObjectList(GLOB.id_card_states)
|
||||
|
||||
return id_card_states
|
||||
return GLOB.id_card_states
|
||||
|
||||
/datum/card_state
|
||||
var/name
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
else
|
||||
forceMove(source)
|
||||
|
||||
listening_objects |= src
|
||||
GLOB.listening_objects |= src
|
||||
|
||||
// Takes place after handle_implant, if that returns TRUE
|
||||
/obj/item/implant/proc/post_implant(var/mob/source)
|
||||
@@ -75,7 +75,7 @@
|
||||
if(part)
|
||||
part.implants.Remove(src)
|
||||
part = null
|
||||
listening_objects.Remove(src)
|
||||
GLOB.listening_objects.Remove(src)
|
||||
imp_in = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/list/ashtray_cache = list()
|
||||
GLOBAL_LIST_EMPTY(ashtray_cache)
|
||||
|
||||
/obj/item/material/ashtray
|
||||
name = "ashtray"
|
||||
@@ -24,21 +24,21 @@ var/global/list/ashtray_cache = list()
|
||||
color = null
|
||||
cut_overlays()
|
||||
var/cache_key = "base-[material.name]"
|
||||
if(!ashtray_cache[cache_key])
|
||||
if(!GLOB.ashtray_cache[cache_key])
|
||||
var/image/I = image('icons/obj/objects.dmi',"ashtray")
|
||||
I.color = material.icon_colour
|
||||
ashtray_cache[cache_key] = I
|
||||
add_overlay(ashtray_cache[cache_key])
|
||||
GLOB.ashtray_cache[cache_key] = I
|
||||
add_overlay(GLOB.ashtray_cache[cache_key])
|
||||
|
||||
if (contents.len == max_butts)
|
||||
if(!ashtray_cache["full"])
|
||||
ashtray_cache["full"] = image('icons/obj/objects.dmi',"ashtray_full")
|
||||
add_overlay(ashtray_cache["full"])
|
||||
if(!GLOB.ashtray_cache["full"])
|
||||
GLOB.ashtray_cache["full"] = image('icons/obj/objects.dmi',"ashtray_full")
|
||||
add_overlay(GLOB.ashtray_cache["full"])
|
||||
desc = "It's stuffed full."
|
||||
else if (contents.len > max_butts/2)
|
||||
if(!ashtray_cache["half"])
|
||||
ashtray_cache["half"] = image('icons/obj/objects.dmi',"ashtray_half")
|
||||
add_overlay(ashtray_cache["half"])
|
||||
if(!GLOB.ashtray_cache["half"])
|
||||
GLOB.ashtray_cache["half"] = image('icons/obj/objects.dmi',"ashtray_half")
|
||||
add_overlay(GLOB.ashtray_cache["half"])
|
||||
desc = "It's half-filled."
|
||||
else
|
||||
desc = "An ashtray made of [material.display_name]."
|
||||
|
||||
@@ -95,4 +95,4 @@
|
||||
new_voice.name = "cursed sword" //Cursed swords shouldn't be known characters.
|
||||
new_voice.real_name = "cursed sword"
|
||||
voice_mobs.Add(new_voice)
|
||||
listening_objects |= src
|
||||
GLOB.listening_objects |= src
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
//NEVER USE THIS IT SUX -PETETHEGOAT
|
||||
//THE GOAT WAS RIGHT - RKF
|
||||
|
||||
var/global/list/cached_icons = list()
|
||||
|
||||
/obj/item/reagent_containers/glass/paint
|
||||
desc = "It's a paint bucket."
|
||||
name = "paint bucket"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
new_voice.name = "[name]" //No name given? Give them the name of the object they're inhabiting.
|
||||
new_voice.real_name = "[new_voice.real_name]" //We still know their real name though!
|
||||
possessed_voice.Add(new_voice)
|
||||
listening_objects |= src
|
||||
GLOB.listening_objects |= src
|
||||
remove_verb(new_voice, /mob/living/voice/verb/change_name) //No changing your name! Bad!
|
||||
remove_verb(new_voice, /mob/living/voice/verb/hang_up) //Also you can't hang up. You are the item!
|
||||
src.item_tf_spawnpoint_used()
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
/obj/item/mail/proc/setRecipient(mob/user)
|
||||
var/list/recipients = list()
|
||||
var/mob/living/recipient_mob
|
||||
for(var/mob/living/player in player_list)
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
if(!player_is_antag(player.mind) && player.mind.show_in_directory)
|
||||
recipients += player
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
if(!chosen)
|
||||
return
|
||||
|
||||
for(var/mob/living/player in player_list)
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
recipients += player
|
||||
|
||||
var/mob/living/chosen_player = tgui_input_list(usr, "Choose recipient", "Recipients", recipients, recipients)
|
||||
@@ -315,7 +315,7 @@
|
||||
/obj/structure/closet/crate/mail/full/Initialize(mapload)
|
||||
. = ..()
|
||||
var/list/mail_recipients = list()
|
||||
for(var/mob/living/carbon/human/alive in player_list)
|
||||
for(var/mob/living/carbon/human/alive in GLOB.player_list)
|
||||
if(alive.stat != DEAD && alive.client && alive.client.inactivity <= 10 MINUTES)
|
||||
mail_recipients += alive
|
||||
for(var/iterator in 1 to storage_capacity)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return 0
|
||||
for(var/mob/living/L in player_list)
|
||||
for(var/mob/living/L in GLOB.player_list)
|
||||
var/turf/L_T
|
||||
if(L.stat == DEAD)
|
||||
continue
|
||||
|
||||
@@ -42,38 +42,36 @@
|
||||
var/build_path = item_to_spawn()
|
||||
return new build_path(drop_location())
|
||||
|
||||
var/list/random_junk_
|
||||
var/list/random_useful_
|
||||
/proc/get_random_useful_type()
|
||||
if(!random_useful_)
|
||||
random_useful_ = subtypesof(/obj/item/pen/crayon)
|
||||
random_useful_ += /obj/item/pen
|
||||
random_useful_ += /obj/item/pen/blue
|
||||
random_useful_ += /obj/item/pen/red
|
||||
random_useful_ += /obj/item/pen/multi
|
||||
random_useful_ += /obj/item/storage/box/matches
|
||||
random_useful_ += /obj/item/stack/material/cardboard
|
||||
return pick(random_useful_)
|
||||
if(!LAZYLEN(GLOB.random_useful_))
|
||||
GLOB.random_useful_ = subtypesof(/obj/item/pen/crayon)
|
||||
GLOB.random_useful_ += /obj/item/pen
|
||||
GLOB.random_useful_ += /obj/item/pen/blue
|
||||
GLOB.random_useful_ += /obj/item/pen/red
|
||||
GLOB.random_useful_ += /obj/item/pen/multi
|
||||
GLOB.random_useful_ += /obj/item/storage/box/matches
|
||||
GLOB.random_useful_ += /obj/item/stack/material/cardboard
|
||||
return pick(GLOB.random_useful_)
|
||||
|
||||
/proc/get_random_junk_type()
|
||||
if(prob(20)) // Misc. clutter
|
||||
return /obj/effect/decal/cleanable/generic
|
||||
if(prob(70)) // Misc. junk
|
||||
if(!random_junk_)
|
||||
random_junk_ = subtypesof(/obj/item/trash)
|
||||
random_junk_ += /obj/effect/decal/cleanable/bug_remains
|
||||
random_junk_ += /obj/effect/decal/remains/mouse
|
||||
random_junk_ += /obj/effect/decal/remains/robot
|
||||
random_junk_ += /obj/item/paper/crumpled
|
||||
random_junk_ += /obj/item/inflatable/torn
|
||||
random_junk_ += /obj/effect/decal/cleanable/molten_item
|
||||
random_junk_ += /obj/item/material/shard
|
||||
if(!LAZYLEN(GLOB.random_junk_))
|
||||
GLOB.random_junk_ = subtypesof(/obj/item/trash)
|
||||
GLOB.random_junk_ += /obj/effect/decal/cleanable/bug_remains
|
||||
GLOB.random_junk_ += /obj/effect/decal/remains/mouse
|
||||
GLOB.random_junk_ += /obj/effect/decal/remains/robot
|
||||
GLOB.random_junk_ += /obj/item/paper/crumpled
|
||||
GLOB.random_junk_ += /obj/item/inflatable/torn
|
||||
GLOB.random_junk_ += /obj/effect/decal/cleanable/molten_item
|
||||
GLOB.random_junk_ += /obj/item/material/shard
|
||||
|
||||
random_junk_ -= /obj/item/trash/plate
|
||||
random_junk_ -= /obj/item/trash/snack_bowl
|
||||
random_junk_ -= /obj/item/trash/syndi_cakes
|
||||
random_junk_ -= /obj/item/trash/tray
|
||||
return pick(random_junk_)
|
||||
GLOB.random_junk_ -= /obj/item/trash/plate
|
||||
GLOB.random_junk_ -= /obj/item/trash/snack_bowl
|
||||
GLOB.random_junk_ -= /obj/item/trash/syndi_cakes
|
||||
GLOB.random_junk_ -= /obj/item/trash/tray
|
||||
return pick(GLOB.random_junk_)
|
||||
// Misc. actually useful stuff
|
||||
return get_random_useful_type()
|
||||
|
||||
|
||||
@@ -9,13 +9,6 @@
|
||||
active_power_usage = 5
|
||||
var/interference = FALSE
|
||||
var/icon/plant = null
|
||||
var/global/list/possible_plants = list(
|
||||
"plant-1",
|
||||
"plant-10",
|
||||
"plant-09",
|
||||
"plant-15",
|
||||
"plant-13"
|
||||
)
|
||||
|
||||
/obj/machinery/holoplant/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -82,7 +75,7 @@
|
||||
|
||||
/obj/machinery/holoplant/proc/prepare_icon(var/state)
|
||||
if(!state)
|
||||
state = pick(possible_plants)
|
||||
state = pick(GLOB.possible_plants)
|
||||
var/plant_icon = icon(icon, state)
|
||||
return getHologramIcon(plant_icon, 0)
|
||||
|
||||
|
||||
@@ -1493,8 +1493,8 @@
|
||||
/obj/structure/sign/calendar/examine(mob/user)
|
||||
. = ..()
|
||||
. += "The calendar shows that the date is [stationdate2text()]."
|
||||
if (Holiday.len)
|
||||
. += "Today is " + span_bold(span_green("[english_list(Holiday)]")) + "."
|
||||
if (GLOB.Holiday.len)
|
||||
. += "Today is " + span_bold(span_green("[english_list(GLOB.Holiday)]")) + "."
|
||||
|
||||
/obj/structure/sign/explosive
|
||||
name = "\improper HIGH EXPLOSIVES sign"
|
||||
|
||||
@@ -46,20 +46,20 @@
|
||||
cut_overlays()
|
||||
// Base icon.
|
||||
var/cache_key = "[base_icon]-[material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
if(isnull(GLOB.stool_cache[cache_key]))
|
||||
var/image/I = image(icon, base_icon)
|
||||
if(applies_material_colour) //VOREStation Add - Goes with added var
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
GLOB.stool_cache[cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[cache_key])
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]"
|
||||
if(isnull(stool_cache[padding_cache_key]))
|
||||
if(isnull(GLOB.stool_cache[padding_cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_padding")
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
add_overlay(stool_cache[padding_cache_key])
|
||||
GLOB.stool_cache[padding_cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[padding_cache_key])
|
||||
// Strings.
|
||||
desc = initial(desc)
|
||||
if(padding_material)
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
..()
|
||||
if(has_buckled_mobs())
|
||||
var/cache_key = "[base_icon]-armrest-[padding_material ? padding_material.name : "no_material"]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
if(isnull(GLOB.stool_cache[cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_armrest")
|
||||
I.plane = MOB_PLANE
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
if(padding_material)
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
GLOB.stool_cache[cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[cache_key])
|
||||
|
||||
/obj/structure/bed/chair/proc/update_layer()
|
||||
if(src.dir == NORTH)
|
||||
@@ -329,14 +329,14 @@
|
||||
/obj/structure/bed/chair/sofa/corner/update_icon()
|
||||
..()
|
||||
var/cache_key = "[base_icon]-armrest-[padding_material ? padding_material.name : "no_material"]-permanent"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
if(isnull(GLOB.stool_cache[cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_armrest")
|
||||
I.plane = MOB_PLANE
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
if(padding_material)
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
GLOB.stool_cache[cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[cache_key])
|
||||
|
||||
// Wooden nonsofa - no corners
|
||||
/obj/structure/bed/chair/sofa/pew
|
||||
|
||||
@@ -54,66 +54,66 @@
|
||||
|
||||
// Base icon (base material color)
|
||||
var/cache_key = "[base_icon]-[material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
if(isnull(GLOB.stool_cache[cache_key]))
|
||||
var/image/I = image(icon, base_icon)
|
||||
if(applies_material_colour)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
GLOB.stool_cache[cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[cache_key])
|
||||
|
||||
// Padding ('_padding') (padding material color)
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]"
|
||||
if(isnull(stool_cache[padding_cache_key]))
|
||||
if(isnull(GLOB.stool_cache[padding_cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_padding")
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
add_overlay(stool_cache[padding_cache_key])
|
||||
GLOB.stool_cache[padding_cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[padding_cache_key])
|
||||
|
||||
// Over ('_over') (base material color)
|
||||
cache_key = "[base_icon]-[material.name]-over"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
if(isnull(GLOB.stool_cache[cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_over")
|
||||
I.plane = MOB_PLANE
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
if(applies_material_colour)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
GLOB.stool_cache[cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[cache_key])
|
||||
|
||||
// Padding Over ('_padding_over') (padding material color)
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]-over"
|
||||
if(isnull(stool_cache[padding_cache_key]))
|
||||
if(isnull(GLOB.stool_cache[padding_cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_padding_over")
|
||||
I.color = padding_material.icon_colour
|
||||
I.plane = MOB_PLANE
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
stool_cache[padding_cache_key] = I
|
||||
add_overlay(stool_cache[padding_cache_key])
|
||||
GLOB.stool_cache[padding_cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[padding_cache_key])
|
||||
|
||||
if(has_buckled_mobs())
|
||||
if(padding_material)
|
||||
cache_key = "[base_icon]-armrest-[padding_material.name]"
|
||||
// Armrest ('_armrest') (base material color)
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
if(isnull(GLOB.stool_cache[cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_armrest")
|
||||
I.plane = MOB_PLANE
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
if(applies_material_colour)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
GLOB.stool_cache[cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[cache_key])
|
||||
if(padding_material)
|
||||
cache_key = "[base_icon]-padding-armrest-[padding_material.name]"
|
||||
// Padding Armrest ('_padding_armrest') (padding material color)
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
if(isnull(GLOB.stool_cache[cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_padding_armrest")
|
||||
I.plane = MOB_PLANE
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
GLOB.stool_cache[cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[cache_key])
|
||||
|
||||
/obj/structure/bed/chair/bay/chair
|
||||
name = "mounted chair"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
//Todo: add leather and cloth for arbitrary coloured stools.
|
||||
var/global/list/stool_cache = list() //haha stool
|
||||
|
||||
/obj/item/stool
|
||||
name = "stool"
|
||||
@@ -40,19 +39,19 @@ var/global/list/stool_cache = list() //haha stool
|
||||
cut_overlays()
|
||||
// Base icon.
|
||||
var/cache_key = "[base_icon]-[material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
if(isnull(GLOB.stool_cache[cache_key]))
|
||||
var/image/I = image(icon, base_icon)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
add_overlay(stool_cache[cache_key])
|
||||
GLOB.stool_cache[cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[cache_key])
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]"
|
||||
if(isnull(stool_cache[padding_cache_key]))
|
||||
if(isnull(GLOB.stool_cache[padding_cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_padding") //VOREStation Edit
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
add_overlay(stool_cache[padding_cache_key])
|
||||
GLOB.stool_cache[padding_cache_key] = I
|
||||
add_overlay(GLOB.stool_cache[padding_cache_key])
|
||||
// Strings.
|
||||
if(padding_material)
|
||||
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
|
||||
|
||||
@@ -13,13 +13,6 @@
|
||||
var/exit_delay = 2
|
||||
var/enter_delay = 1
|
||||
|
||||
// GLOB.alldirs in global.dm is the same list of directions, but since
|
||||
// the specific order matters to get a usable icon_state, it is
|
||||
// copied here so that, in the unlikely case that GLOB.alldirs is changed,
|
||||
// this continues to work.
|
||||
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
|
||||
|
||||
// A place where tube pods stop, and people can get in or out.
|
||||
// Mappers: use "Generate Instances from Directions" for this
|
||||
// one.
|
||||
@@ -439,7 +432,7 @@
|
||||
var/list/connected = list()
|
||||
var/list/connected_auto = list()
|
||||
|
||||
for(var/direction in tube_dir_list)
|
||||
for(var/direction in GLOB.tube_dir_list)
|
||||
var/location = get_step(loc, direction)
|
||||
for(var/obj/structure/transit_tube/tube in location)
|
||||
if(tube.directions() == null && tube.icon_state == "auto")
|
||||
@@ -454,7 +447,7 @@
|
||||
|
||||
tube_dirs = select_automatic_dirs(connected)
|
||||
|
||||
if(length(tube_dirs) == 2 && tube_dir_list.Find(tube_dirs[1]) > tube_dir_list.Find(tube_dirs[2]))
|
||||
if(length(tube_dirs) == 2 && GLOB.tube_dir_list.Find(tube_dirs[1]) > GLOB.tube_dir_list.Find(tube_dirs[2]))
|
||||
tube_dirs.Swap(1, 2)
|
||||
|
||||
generate_automatic_corners(tube_dirs)
|
||||
@@ -527,10 +520,9 @@
|
||||
// but it is probably safer to assume the existence of, and
|
||||
// rely on, a sufficiently smart compiler/optimizer.
|
||||
/obj/structure/transit_tube/proc/parse_dirs(text)
|
||||
var/global/list/direction_table = list()
|
||||
|
||||
if(text in direction_table)
|
||||
return direction_table[text]
|
||||
if(text in GLOB.direction_table)
|
||||
return GLOB.direction_table[text]
|
||||
|
||||
var/list/split_text = splittext(text, "-")
|
||||
|
||||
@@ -538,7 +530,7 @@
|
||||
// a purely decorative tube, and doesn't actually
|
||||
// connect to anything.
|
||||
if(split_text[1] == "D")
|
||||
direction_table[text] = list()
|
||||
GLOB.direction_table[text] = list()
|
||||
return null
|
||||
|
||||
var/list/directions = list()
|
||||
@@ -549,7 +541,7 @@
|
||||
if(direction > 0)
|
||||
directions += direction
|
||||
|
||||
direction_table[text] = directions
|
||||
GLOB.direction_table[text] = directions
|
||||
return directions
|
||||
|
||||
|
||||
|
||||
@@ -17,17 +17,6 @@
|
||||
|
||||
//These are types that can only spawn once, and then will be removed from this list.
|
||||
//Alpha and beta lists are in their respective procs.
|
||||
var/global/list/unique_gamma = list(
|
||||
/obj/item/perfect_tele,
|
||||
/obj/item/bluespace_harpoon,
|
||||
/obj/item/clothing/glasses/thermal/syndi,
|
||||
/obj/item/gun/energy/netgun,
|
||||
/obj/item/gun/projectile/dartgun,
|
||||
/obj/item/clothing/gloves/black/bloodletter,
|
||||
/obj/item/gun/energy/mouseray/metamorphosis
|
||||
)
|
||||
|
||||
var/global/list/allocated_gamma = list()
|
||||
|
||||
/obj/structure/trash_pile/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -53,12 +42,12 @@
|
||||
|
||||
/obj/structure/trash_pile/attackby(obj/item/W as obj, mob/user as mob)
|
||||
var/w_type = W.type
|
||||
if(w_type in allocated_gamma)
|
||||
if(w_type in GLOB.allocated_gamma)
|
||||
to_chat(user,span_notice("You feel \the [W] slip from your hand, and disappear into the trash pile."))
|
||||
user.unEquip(W)
|
||||
W.forceMove(src)
|
||||
allocated_gamma -= w_type
|
||||
unique_gamma += w_type
|
||||
GLOB.allocated_gamma -= w_type
|
||||
GLOB.unique_gamma += w_type
|
||||
qdel(W)
|
||||
|
||||
else
|
||||
@@ -332,18 +321,18 @@
|
||||
return I
|
||||
|
||||
/obj/structure/trash_pile/proc/produce_gamma_item()
|
||||
var/path = pick_n_take(unique_gamma)
|
||||
var/path = pick_n_take(GLOB.unique_gamma)
|
||||
if(!path) //Tapped out, reallocate?
|
||||
for(var/P in allocated_gamma)
|
||||
var/obj/item/I = allocated_gamma[P]
|
||||
for(var/P in GLOB.allocated_gamma)
|
||||
var/obj/item/I = GLOB.allocated_gamma[P]
|
||||
if(QDELETED(I) || istype(I.loc,/obj/machinery/computer/cryopod))
|
||||
allocated_gamma -= P
|
||||
GLOB.allocated_gamma -= P
|
||||
path = P
|
||||
break
|
||||
|
||||
if(path)
|
||||
var/obj/item/I = new path()
|
||||
allocated_gamma[path] = I
|
||||
GLOB.allocated_gamma[path] = I
|
||||
return I
|
||||
else
|
||||
return produce_beta_item()
|
||||
|
||||
Reference in New Issue
Block a user