mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Changes all .len to length() where applicable (#25174)
* Globals work
* Double access works
* All other things
* Revert "All other things"
This reverts commit 6574442eb6.
* More changes that compile and work
* IT WORKS AAAAAA
* Changes even more .len to length()
* Apply suggestions from code review
* Update code/datums/mind.dm
* Update code/__HELPERS/sorts/InsertSort.dm
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
* Update code/__HELPERS/sanitize_values.dm
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
---------
Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
This commit is contained in:
@@ -807,11 +807,11 @@
|
||||
var/datum/robolimb/L = new limb_type()
|
||||
if(limb in L.parts) //Make sure that only models that provide the parts the user needs populate the list.
|
||||
robolimb_models[L.company] = L
|
||||
if(robolimb_models.len == 1) //If there's only one model available in the list, autoselect it to avoid having to bother the user with a dialog that provides only one option.
|
||||
if(length(robolimb_models) == 1) //If there's only one model available in the list, autoselect it to avoid having to bother the user with a dialog that provides only one option.
|
||||
subchoice = L.company //If there ends up being more than one model populating the list, subchoice will be overwritten later anyway, so this isn't a problem.
|
||||
if(second_limb in L.parts) //If the child limb of the limb the user selected is also present in the model's parts list, state it's been found so the second limb can be set later.
|
||||
in_model = 1
|
||||
if(robolimb_models.len > 1) //If there's more than one model in the list that can provide the part the user wants, let them choose.
|
||||
if(length(robolimb_models) > 1) //If there's more than one model in the list that can provide the part the user wants, let them choose.
|
||||
subchoice = tgui_input_list(user, "Which model of [choice] [limb_name] do you wish to use?", "[limb_name] - Prosthesis - Model", robolimb_models)
|
||||
if(subchoice)
|
||||
choice = subchoice
|
||||
|
||||
@@ -81,14 +81,14 @@
|
||||
|
||||
/datum/gear_tweak/contents/get_default()
|
||||
. = list()
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
for(var/i = 1 to length(valid_contents))
|
||||
. += "Random"
|
||||
|
||||
/datum/gear_tweak/contents/get_metadata(user, list/metadata)
|
||||
. = list()
|
||||
for(var/i = metadata.len to valid_contents.len)
|
||||
for(var/i = length(metadata) to length(valid_contents))
|
||||
metadata += "Random"
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
for(var/i = 1 to length(valid_contents))
|
||||
var/entry = input(user, "Choose an entry.", "Character Preference", metadata[i]) as null|anything in (valid_contents[i] + list("Random", "None"))
|
||||
if(entry)
|
||||
. += entry
|
||||
@@ -96,9 +96,9 @@
|
||||
return metadata
|
||||
|
||||
/datum/gear_tweak/contents/tweak_item(obj/item/I, list/metadata)
|
||||
if(metadata.len != valid_contents.len)
|
||||
if(length(metadata) != length(valid_contents))
|
||||
return
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
for(var/i = 1 to length(valid_contents))
|
||||
var/path
|
||||
var/list/contents = valid_contents[i]
|
||||
if(metadata[i] == "Random")
|
||||
|
||||
Reference in New Issue
Block a user