mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-07 07:53:15 +00:00
Fix list_values to support lists of lists. Fix missing variable init.
This commit is contained in:
@@ -324,9 +324,11 @@ This actually tests if they have the same entries and values.
|
||||
|
||||
// Return a list of the values in an assoc list (including null)
|
||||
/proc/list_values(var/list/L)
|
||||
. = list()
|
||||
for(var/e in L)
|
||||
. += L[e]
|
||||
var/list/V = list()
|
||||
V.len = L.len // Preallocate!
|
||||
for(var/i in 1 to L.len)
|
||||
V[i] = L[L[i]] // We avoid += in case the value is itself a list
|
||||
return V
|
||||
|
||||
//Mergesort: divides up the list into halves to begin the sort
|
||||
/proc/sortKey(var/list/client/L, var/order = 1)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
var/datum/computer/file/embedded_program/airlock/multi_docking/airlock_program // Cast to proper type
|
||||
var/datum/computer/file/embedded_program/airlock/multi_docking/airlock_program = program // Cast to proper type
|
||||
|
||||
data = list(
|
||||
"chamber_pressure" = round(airlock_program.memory["chamber_sensor_pressure"]),
|
||||
|
||||
Reference in New Issue
Block a user