mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Renames flatten_list proc to assoc_to_values (#93453)
## About The Pull Request `/proc/flatten_list()` -> `/proc/assoc_to_values()`, also changes the code doc to mirror the language of `assoc_to_keys()`'s code doc ## Why It's Good For The Game Having a proc called `assoc_to_keys` that takes an associative list and returns a list of the keys, and also having a proc that takes an associative list and returns a list of the values, and the latter not being called `assoc_to_values` is very funny ## Changelog 🆑 code: renamed flatten_list proc to assoc_to_values /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#define HAS_SCREEN_OVERLAY(mob, type) (locate(type) in flatten_list(mob.screens))
|
||||
#define HAS_SCREEN_OVERLAY(mob, type) (locate(type) in assoc_to_values(mob.screens))
|
||||
#define HAS_CLIENT_COLOR(mob, type) (locate(type) in mob.client_colours)
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/unit_test/valid_dna_infusion
|
||||
|
||||
/datum/unit_test/valid_dna_infusion/Run()
|
||||
for(var/datum/infuser_entry/infuser_entry as anything in flatten_list(GLOB.infuser_entries))
|
||||
for(var/datum/infuser_entry/infuser_entry as anything in assoc_to_values(GLOB.infuser_entries))
|
||||
for(var/input_type in infuser_entry.input_obj_or_mob)
|
||||
if(ispath(input_type, /mob/living))
|
||||
continue
|
||||
@@ -35,7 +35,7 @@
|
||||
/datum/infuser_entry/fly,
|
||||
))
|
||||
// Fetch the globally instantiated DNA Infuser entries.
|
||||
for(var/datum/infuser_entry/infuser_entry as anything in flatten_list(GLOB.infuser_entries))
|
||||
for(var/datum/infuser_entry/infuser_entry as anything in assoc_to_values(GLOB.infuser_entries))
|
||||
var/output_organs = infuser_entry.output_organs
|
||||
var/mob/living/carbon/human/lab_rat = allocate(/mob/living/carbon/human/consistent)
|
||||
var/list/obj/item/organ/inserted_organs = list()
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
TEST_ASSERT_NOTNULL(offer_guy.has_status_effect(/datum/status_effect/offering/no_item_received/high_five), \
|
||||
"Offerer doesn't have the high five offer status effect after offering (giving) to takers nearby")
|
||||
|
||||
var/atom/movable/screen/alert/give/highfive/alert_to_click = locate() in flatten_list(take_guy.alerts)
|
||||
var/atom/movable/screen/alert/give/highfive/bystander_alert_we_dont_click = locate() in flatten_list(random_bystander.alerts)
|
||||
var/atom/movable/screen/alert/give/highfive/alert_to_click = locate() in assoc_to_values(take_guy.alerts)
|
||||
var/atom/movable/screen/alert/give/highfive/bystander_alert_we_dont_click = locate() in assoc_to_values(random_bystander.alerts)
|
||||
TEST_ASSERT_NOTNULL(alert_to_click, "Taker had no alert to click to accept the high five offer")
|
||||
TEST_ASSERT_NOTNULL(bystander_alert_we_dont_click, "Bystander had no alert from the high fiver offer")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user