All other things

This commit is contained in:
DGamerL
2024-04-18 03:04:47 +02:00
parent 89c924e94d
commit 6574442eb6
122 changed files with 317 additions and 317 deletions
+1 -1
View File
@@ -27,7 +27,7 @@
return null
. = L[1]
L[1] = L[L.len]
L[1] = L[length(L)]
L.Cut(L.len)
Sink(1)
+12 -12
View File
@@ -276,7 +276,7 @@
//Returns the top(last) element from the list and removes it from the list (typical stack function)
/proc/pop(list/L)
if(L.len)
. = L[L.len]
. = L[length(L)]
L.len--
/proc/popleft(list/L)
@@ -293,7 +293,7 @@
/proc/reverselist(list/L)
var/list/output = list()
if(L)
for(var/i = L.len; i >= 1; i--)
for(var/i = length(L); i >= 1; i--)
output += L[i]
return output
@@ -303,7 +303,7 @@
return
L = L.Copy()
for(var/i=1, i<L.len, ++i)
for(var/i=1, i<length(L), ++i)
L.Swap(i,rand(i,L.len))
return L
@@ -440,10 +440,10 @@
if(sorttext(L[Li][key], R[Ri][key]) < 1)
// Works around list += list2 merging lists; it's not pretty but it works
result += "temp item"
result[result.len] = R[Ri++]
result[length(result)] = R[Ri++]
else
result += "temp item"
result[result.len] = L[Li++]
result[length(result)] = L[Li++]
if(Li <= L.len)
return (result + L.Copy(Li, 0))
@@ -475,7 +475,7 @@
/proc/bitfield2list(bitfield = 0, list/wordlist)
var/list/r = list()
if(istype(wordlist,/list))
var/max = min(wordlist.len,16)
var/max = min(length(wordlist),16)
var/bit = 1
for(var/i=1, i<=max, i++)
if(bitfield & bit)
@@ -506,12 +506,12 @@
//Don't use this on lists larger than half a dozen or so
/proc/insertion_sort_numeric_list_ascending(list/L)
//log_world("ascending len input: [L.len]")
//log_world("ascending len input: [length(L)]")
var/list/out = list(pop(L))
for(var/entry in L)
if(isnum(entry))
var/success = 0
for(var/i=1, i<=out.len, i++)
for(var/i=1, i<=length(out), i++)
if(entry <= out[i])
success = 1
out.Insert(i, entry)
@@ -519,13 +519,13 @@
if(!success)
out.Add(entry)
//log_world(" output: [out.len]")
//log_world(" output: [length(out)]")
return out
/proc/insertion_sort_numeric_list_descending(list/L)
//log_world("descending len input: [L.len]")
//log_world("descending len input: [length(L)]")
var/list/out = insertion_sort_numeric_list_ascending(L)
//log_world(" output: [out.len]")
//log_world(" output: [length(out)]")
return reverselist(out)
//Copies a list, and all lists inside it recusively
@@ -707,7 +707,7 @@
if(!L)
return
for(var/i=1, i<L.len, ++i)
for(var/i=1, i<length(L), ++i)
L.Swap(i,rand(i,L.len))
//Return a list with no duplicate entries
+2 -2
View File
@@ -42,7 +42,7 @@
var/list/output_list = list()
for(var/thing in verbs_list)
var/procpath/verb_to_add = thing
output_list[++output_list.len] = list(verb_to_add.category, verb_to_add.name)
output_list[++length(output_list)] = list(verb_to_add.category, verb_to_add.name)
target.stat_panel.send_message("add_verb_list", output_list)
@@ -89,6 +89,6 @@
var/list/output_list = list()
for(var/thing in verbs_list)
var/procpath/verb_to_remove = thing
output_list[++output_list.len] = list(verb_to_remove.category, verb_to_remove.name)
output_list[++length(output_list)] = list(verb_to_remove.category, verb_to_remove.name)
target.stat_panel.send_message("remove_verb_list", output_list)
+1 -1
View File
@@ -187,7 +187,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
selected_choice = choices_values[choice_id]
/datum/radial_menu/proc/get_next_id()
return "c_[choices.len]"
return "c_[length(choices)]"
/datum/radial_menu/proc/set_choices(list/new_choices)
if(choices.len)
+1 -1
View File
@@ -54,7 +54,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
var/list/global_procs = typesof(/datum/controller/global_vars/proc)
var/expected_len = vars.len - gvars_datum_in_built_vars.len
if(global_procs.len != expected_len)
warning("Unable to detect all global initialization procs! Expected [expected_len] got [global_procs.len]!")
warning("Unable to detect all global initialization procs! Expected [expected_len] got [length(global_procs)]!")
if(global_procs.len)
var/list/expected_global_procs = vars - gvars_datum_in_built_vars
for(var/I in global_procs)
+1 -1
View File
@@ -26,7 +26,7 @@ SUBSYSTEM_DEF(acid)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/O = currentrun[currentrun.len]
var/obj/O = currentrun[length(currentrun)]
currentrun.len--
if(!O || QDELETED(O))
processing -= O
+15 -15
View File
@@ -59,13 +59,13 @@ SUBSYSTEM_DEF(air)
msg += "DPN:[round(cost_deferred_pipenets,1)]|"
msg += "AM:[round(cost_atmos_machinery,1)]"
msg += "} "
msg += "AT:[active_turfs.len]|"
msg += "EG:[excited_groups.len]|"
msg += "HS:[hotspots.len]|"
msg += "PN:[networks.len]|"
msg += "HP:[high_pressure_delta.len]|"
msg += "AS:[active_super_conductivity.len]|"
msg += "AT/MS:[round((cost ? active_turfs.len/cost : 0),0.1)]"
msg += "AT:[length(active_turfs)]|"
msg += "EG:[length(excited_groups)]|"
msg += "HS:[length(hotspots)]|"
msg += "PN:[length(networks)]|"
msg += "HP:[length(high_pressure_delta)]|"
msg += "AS:[length(active_super_conductivity)]|"
msg += "AT/MS:[round((cost ? length(active_turfs)/cost : 0),0.1)]"
return msg.Join("")
/datum/controller/subsystem/air/get_metrics()
@@ -180,7 +180,7 @@ SUBSYSTEM_DEF(air)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/machinery/atmospherics/A = currentrun[currentrun.len]
var/obj/machinery/atmospherics/A = currentrun[length(currentrun)]
currentrun.len--
if(A)
A.build_network(remove_deferral = TRUE)
@@ -195,7 +195,7 @@ SUBSYSTEM_DEF(air)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/datum/pipeline/thing = currentrun[currentrun.len]
var/datum/pipeline/thing = currentrun[length(currentrun)]
currentrun.len--
if(thing)
thing.process()
@@ -211,7 +211,7 @@ SUBSYSTEM_DEF(air)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/machinery/atmospherics/M = currentrun[currentrun.len]
var/obj/machinery/atmospherics/M = currentrun[length(currentrun)]
currentrun.len--
if(!M || (M.process_atmos(seconds) == PROCESS_KILL))
atmos_machinery.Remove(M)
@@ -224,7 +224,7 @@ SUBSYSTEM_DEF(air)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/turf/simulated/T = currentrun[currentrun.len]
var/turf/simulated/T = currentrun[length(currentrun)]
currentrun.len--
T.super_conduct()
if(MC_TICK_CHECK)
@@ -236,7 +236,7 @@ SUBSYSTEM_DEF(air)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/effect/hotspot/H = currentrun[currentrun.len]
var/obj/effect/hotspot/H = currentrun[length(currentrun)]
currentrun.len--
if(H)
H.process()
@@ -247,7 +247,7 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/proc/process_high_pressure_delta(resumed = 0)
while(high_pressure_delta.len)
var/turf/simulated/T = high_pressure_delta[high_pressure_delta.len]
var/turf/simulated/T = high_pressure_delta[length(high_pressure_delta)]
high_pressure_delta.len--
T.high_pressure_movements()
T.pressure_difference = 0
@@ -262,7 +262,7 @@ SUBSYSTEM_DEF(air)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/turf/simulated/T = currentrun[currentrun.len]
var/turf/simulated/T = currentrun[length(currentrun)]
currentrun.len--
if(T)
T.process_cell(fire_count)
@@ -275,7 +275,7 @@ SUBSYSTEM_DEF(air)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/datum/excited_group/EG = currentrun[currentrun.len]
var/datum/excited_group/EG = currentrun[length(currentrun)]
currentrun.len--
EG.breakdown_cooldown++
if(EG.breakdown_cooldown == 10)
+1 -1
View File
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(fires)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/O = currentrun[currentrun.len]
var/obj/O = currentrun[length(currentrun)]
currentrun.len--
if(!O || QDELETED(O))
processing -= O
+1 -1
View File
@@ -238,7 +238,7 @@ SUBSYSTEM_DEF(garbage)
var/list/queue = queues[level]
queue[++queue.len] = list(queue_time, refid, D.gc_destroyed) // not += for byond reasons
queue[++length(queue)] = list(queue_time, refid, D.gc_destroyed) // not += for byond reasons
//this is mainly to separate things profile wise.
/datum/controller/subsystem/garbage/proc/HardDelete(datum/D)
+1 -1
View File
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(icon_smooth)
/datum/controller/subsystem/icon_smooth/fire()
while(smooth_queue.len)
var/atom/A = smooth_queue[smooth_queue.len]
var/atom/A = smooth_queue[length(smooth_queue)]
smooth_queue.len--
A.smooth_icon()
if(MC_TICK_CHECK)
+1 -1
View File
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(idlenpcpool)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
var/mob/living/simple_animal/SA = currentrun[length(currentrun)]
--currentrun.len
if(!SA)
log_debug("idlenpcpool encountered an invalid entry, resumed: [resumed], SA [SA], type of SA [SA?.type], null [SA == null], qdelled [QDELETED(SA)], SA in AI_IDLE list: [SA in GLOB.simple_animals[AI_IDLE]]")
+2 -2
View File
@@ -317,7 +317,7 @@ SUBSYSTEM_DEF(jobs)
if(player.ready && player.mind && !player.mind.assigned_role)
unassigned += player
Debug("DO, Len: [unassigned.len]")
Debug("DO, Len: [length(unassigned)]")
if(!length(unassigned))
return FALSE
@@ -330,7 +330,7 @@ SUBSYSTEM_DEF(jobs)
Debug("DO, Running Assistant Check 1")
var/datum/job/ast = new /datum/job/assistant()
var/list/assistant_candidates = FindOccupationCandidates(ast, 3)
Debug("AC1, Candidates: [assistant_candidates.len]")
Debug("AC1, Candidates: [length(assistant_candidates)]")
for(var/mob/new_player/player in assistant_candidates)
Debug("AC1 pass, Player: [player]")
AssignRole(player, "Assistant")
+4 -4
View File
@@ -39,7 +39,7 @@ SUBSYSTEM_DEF(machines)
propagate_network(PC, PC.powernet)
/datum/controller/subsystem/machines/get_stat_details()
return "Machines: [processing.len] | Powernets: [powernets.len] | Deferred: [deferred_powernet_rebuilds.len]"
return "Machines: [length(processing)] | Powernets: [length(powernets)] | Deferred: [length(deferred_powernet_rebuilds)]"
/datum/controller/subsystem/machines/proc/process_defered_powernets(resumed = 0)
if(!resumed)
@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(machines)
//cache for sanid speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/O = currentrun[currentrun.len]
var/obj/O = currentrun[length(currentrun)]
currentrun.len--
if(O && !QDELETED(O))
var/datum/regional_powernet/newPN = new() // create a new powernet...
@@ -63,7 +63,7 @@ SUBSYSTEM_DEF(machines)
//cache for sanid speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/datum/regional_powernet/P = currentrun[currentrun.len]
var/datum/regional_powernet/P = currentrun[length(currentrun)]
currentrun.len--
if(P)
P.process_power() // reset the power state
@@ -79,7 +79,7 @@ SUBSYSTEM_DEF(machines)
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/machinery/thing = currentrun[currentrun.len]
var/obj/machinery/thing = currentrun[length(currentrun)]
currentrun.len--
if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL)
if(prob(MACHINE_FLICKER_CHANCE))
+1 -1
View File
@@ -36,7 +36,7 @@ SUBSYSTEM_DEF(mobs)
var/list/currentrun = src.currentrun
var/times_fired = src.times_fired
while(currentrun.len)
var/mob/living/L = currentrun[currentrun.len]
var/mob/living/L = currentrun[length(currentrun)]
currentrun.len--
if(L)
L.Life(seconds, times_fired)
+1 -1
View File
@@ -19,7 +19,7 @@ SUBSYSTEM_DEF(npcpool)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
var/mob/living/simple_animal/SA = currentrun[length(currentrun)]
--currentrun.len
if(!SA)
log_debug("npcpool encountered an invalid entry, resumed: [resumed], SA [SA], type of SA [SA?.type], null [SA == null], qdelled [QDELETED(SA)], SA in AI_ON list: [SA in GLOB.simple_animals[AI_ON]]")
+1 -1
View File
@@ -31,7 +31,7 @@ SUBSYSTEM_DEF(parallax)
var/list/currentrun = src.currentrun
while(length(currentrun))
var/client/C = currentrun[currentrun.len]
var/client/C = currentrun[length(currentrun)]
currentrun.len--
if(!C || !C.eye)
if(MC_TICK_CHECK)
+1 -1
View File
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(ping)
var/list/current_run = src.current_run
while(length(current_run))
var/client/client = current_run[current_run.len]
var/client/client = current_run[length(current_run)]
current_run.len--
if(client?.tgui_panel?.is_ready())
+1 -1
View File
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(spacedrift)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/atom/movable/AM = currentrun[currentrun.len]
var/atom/movable/AM = currentrun[length(currentrun)]
currentrun.len--
if(!AM)
processing -= AM
+4 -4
View File
@@ -38,7 +38,7 @@ SUBSYSTEM_DEF(statpanels)
if(SSshuttle.emergency)
var/eta = SSshuttle.emergency.getModeStr()
if(eta)
global_data[++global_data.len] = list("[eta]", "[SSshuttle.emergency.getTimerStr()]")
global_data[++length(global_data)] = list("[eta]", "[SSshuttle.emergency.getTimerStr()]")
src.currentrun = GLOB.clients.Copy()
mc_data = null
@@ -148,7 +148,7 @@ SUBSYSTEM_DEF(statpanels)
continue
// We already have it. Success!
if(existing_image)
turf_items[++turf_items.len] = list("[turf_item.name]", turf_item.UID(), existing_image)
turf_items[++length(turf_items)] = list("[turf_item.name]", turf_item.UID(), existing_image)
continue
// Now, we're gonna queue image generation out of those refs
to_make += turf_item
@@ -172,8 +172,8 @@ SUBSYSTEM_DEF(statpanels)
list("","")
)
for(var/datum/controller/subsystem/sub_system as anything in Master.subsystems)
mc_data[++mc_data.len] = list("\[[sub_system.state_letter()]][sub_system.name]", sub_system.stat_entry(), "[sub_system.UID()]")
mc_data[++mc_data.len] = list("Camera Net", "Cameras: [length(GLOB.cameranet.cameras)] | Chunks: [length(GLOB.cameranet.chunks)]", "[GLOB.cameranet.UID()]")
mc_data[++length(mc_data)] = list("\[[sub_system.state_letter()]][sub_system.name]", sub_system.stat_entry(), "[sub_system.UID()]")
mc_data[++length(mc_data)] = list("Camera Net", "Cameras: [length(GLOB.cameranet.cameras)] | Chunks: [length(GLOB.cameranet.chunks)]", "[GLOB.cameranet.UID()]")
///immediately update the active statpanel tab of the target client
/datum/controller/subsystem/statpanels/proc/immediate_send_stat_data(client/target)
+1 -1
View File
@@ -43,7 +43,7 @@ SUBSYSTEM_DEF(tgui)
// Cache for sanic speed (lists are references anyways)
var/list/current_run = src.current_run
while(current_run.len)
var/datum/tgui/ui = current_run[current_run.len]
var/datum/tgui/ui = current_run[length(current_run)]
current_run.len--
// TODO: Move user/src_object check to process()
if(ui && ui.user && ui.src_object)
+1 -1
View File
@@ -30,7 +30,7 @@ SUBSYSTEM_DEF(throwing)
var/list/currentrun = src.currentrun
while(length(currentrun))
var/atom/movable/AM = currentrun[currentrun.len]
var/atom/movable/AM = currentrun[length(currentrun)]
var/datum/thrownthing/TT = currentrun[AM]
currentrun.len--
if(!AM || !TT)
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(processing)
var/list/current_run = currentrun
while(current_run.len)
var/datum/thing = current_run[current_run.len]
var/datum/thing = current_run[length(current_run)]
current_run.len--
if(QDELETED(thing))
processing -= thing
+1 -1
View File
@@ -203,7 +203,7 @@
var/index = laws.Find(law)
if(index)
laws -= law
for(index, index < state.len, index++)
for(index, index < length(state), index++)
state[index] = state[index+1]
sorted_laws.Cut()
+2 -2
View File
@@ -16,7 +16,7 @@ GLOBAL_DATUM_INIT(air_alarm_repository, /datum/repository/air_alarm, new())
if(SSticker && SSticker.current_state < GAME_STATE_PLAYING && istype(passed_alarm)) // Generating the list for the first time as the game hasn't started - no need to run through the machines list everything every time
alarms = cache_entry.data // Don't deleate the list
if(is_station_contact(passed_alarm.z) && passed_alarm.remote_control) // Still need sanity checks
alarms[++alarms.len] = passed_alarm.get_console_data()
alarms[++length(alarms)] = passed_alarm.get_console_data()
else
for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : GLOB.air_alarms)) // Generating the whole list again is a bad habit but I can't be bothered to fix it right now
if(!monitored_alarms && !is_station_contact(alarm.z))
@@ -26,7 +26,7 @@ GLOBAL_DATUM_INIT(air_alarm_repository, /datum/repository/air_alarm, new())
continue
if(!alarm.remote_control)
continue
alarms[++alarms.len] = alarm.get_console_data()
alarms[++length(alarms)] = alarm.get_console_data()
cache_entry.timestamp = world.time //+ 10 SECONDS
cache_entry.data = alarms
+1 -1
View File
@@ -21,7 +21,7 @@ GLOBAL_DATUM_INIT(apc_repository, /datum/repository/apc, new())
var/list/Status = list("Off","AOff","On","AOn") // Status: off, auto-off, on, auto-on
var/list/chg = list("N","C","F") // Charging: no, charging, full
for(var/obj/machinery/power/apc/A in L)
apcData[++apcData.len] = list(
apcData[++length(apcData)] = list(
"Name" = html_encode(A.apc_area.name),
"Equipment" = Status[A.equipment_channel + 1],
"Lights" = Status[A.lighting_channel + 1],
+1 -1
View File
@@ -62,7 +62,7 @@ GLOBAL_DATUM_INIT(crew_repository, /datum/repository/crew, new())
crewmemberData["x"] = pos.x
crewmemberData["y"] = pos.y
crewmembers[++crewmembers.len] = crewmemberData
crewmembers[++length(crewmembers)] = crewmemberData
crewmembers = sortByKey(crewmembers, "name")
cache_entry.timestamp = world.time + 5 SECONDS
+1 -1
View File
@@ -13,7 +13,7 @@ GLOBAL_DATUM_INIT(powermonitor_repository, /datum/repository/powermonitor, new()
for(var/obj/machinery/computer/monitor/pMon in GLOB.power_monitors)
if(!(pMon.stat & (NOPOWER|BROKEN)) && !pMon.is_secret_monitor)
pMonData[++pMonData.len] = list ("Area" = get_area_name(pMon), "uid" = "[pMon.UID()]")
pMonData[++length(pMonData)] = list ("Area" = get_area_name(pMon), "uid" = "[pMon.UID()]")
cache_entry.timestamp = world.time //+ 30 SECONDS
cache_entry.data = pMonData
+9 -9
View File
@@ -35,54 +35,54 @@ GLOBAL_LIST_EMPTY(PDA_Manifest)
var/department = 0
var/depthead = 0 // Department Heads will be placed at the top of their lists.
if(real_rank in GLOB.command_positions)
heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive)
heads[++length(heads)] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
depthead = 1
if(rank == "Captain" && heads.len != 1)
heads.Swap(1, heads.len)
if(real_rank in GLOB.active_security_positions)
sec[++sec.len] = list("name" = name, "rank" = rank, "active" = isactive)
sec[++length(sec)] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && sec.len != 1)
sec.Swap(1, sec.len)
if(real_rank in GLOB.engineering_positions)
eng[++eng.len] = list("name" = name, "rank" = rank, "active" = isactive)
eng[++length(eng)] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && eng.len != 1)
eng.Swap(1, eng.len)
if(real_rank in GLOB.medical_positions)
med[++med.len] = list("name" = name, "rank" = rank, "active" = isactive)
med[++length(med)] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && med.len != 1)
med.Swap(1, med.len)
if(real_rank in GLOB.science_positions)
sci[++sci.len] = list("name" = name, "rank" = rank, "active" = isactive)
sci[++length(sci)] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && sci.len != 1)
sci.Swap(1, sci.len)
if(real_rank in GLOB.service_positions)
ser[++ser.len] = list("name" = name, "rank" = rank, "active" = isactive)
ser[++length(ser)] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && ser.len != 1)
ser.Swap(1, ser.len)
if(real_rank in GLOB.supply_positions)
sup[++sup.len] = list("name" = name, "rank" = rank, "active" = isactive)
sup[++length(sup)] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(depthead && sup.len != 1)
sup.Swap(1, sup.len)
if(real_rank in GLOB.nonhuman_positions)
bot[++bot.len] = list("name" = name, "rank" = rank, "active" = isactive)
bot[++length(bot)] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
if(!department && !(name in heads))
misc[++misc.len] = list("name" = name, "rank" = rank, "active" = isactive)
misc[++length(misc)] = list("name" = name, "rank" = rank, "active" = isactive)
GLOB.PDA_Manifest = list(\
+5 -5
View File
@@ -523,10 +523,10 @@
items += debug_variable(key, val, level + 1, sanitize = sanitize)
item = "<a href='byond://?_src_=vars;VarsList=\ref[L]'>[VV_HTML_ENCODE(name)] = /list ([L.len])</a><ul>[items.Join()]</ul>"
item = "<a href='byond://?_src_=vars;VarsList=\ref[L]'>[VV_HTML_ENCODE(name)] = /list ([length(L)])</a><ul>[items.Join()]</ul>"
else
item = "<a href='byond://?_src_=vars;VarsList=\ref[L]'>[VV_HTML_ENCODE(name)] = /list ([L.len])</a>"
item = "<a href='byond://?_src_=vars;VarsList=\ref[L]'>[VV_HTML_ENCODE(name)] = /list ([length(L)])</a>"
else
item = "[VV_HTML_ENCODE(name)] = <span class='value'>[VV_HTML_ENCODE(value)]</span>"
@@ -1400,9 +1400,9 @@
return TRUE
L.len = value["value"]
log_world("### ListVarEdit by [src]: /list len: [L.len]")
log_admin("[key_name(src)] modified list's len: [L.len]")
message_admins("[key_name_admin(src)] modified list's len: [L.len]")
log_world("### ListVarEdit by [src]: /list len: [length(L)]")
log_admin("[key_name(src)] modified list's len: [length(L)]")
message_admins("[key_name_admin(src)] modified list's len: [length(L)]")
return TRUE
if(href_list["listshuffle"])
+1 -1
View File
@@ -172,7 +172,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
while(prob(20))
number_of += 1
for(var/i = 1; number_of >= i && possible_symptoms.len; i++)
for(var/i = 1; number_of >= i && length(possible_symptoms); i++)
generated += pick_n_take(possible_symptoms)
return generated
@@ -18,7 +18,7 @@ GLOBAL_LIST_INIT(list_symptoms, subtypesof(/datum/symptom))
/datum/symptom/New()
var/list/S = GLOB.list_symptoms
for(var/i = 1; i <= S.len; i++)
for(var/i = 1; i <= length(S); i++)
if(type == S[i])
id = "[i]"
return
+2 -2
View File
@@ -110,7 +110,7 @@
/datum/async_input/ranked/render_choices()
var/dat = "<div>"
dat += "<table id='choices' uid=[UID()] style='margin: auto; text-align: left;'>"
for(var/i = 1, i <= choices.len, i++)
for(var/i = 1, i <= length(choices), i++)
var/choice = choices[i]
dat += "<tr>"
dat += "<td>[button("+", i != 1 ? "upvote=[i]" : "", null, i == 1)]</td>"
@@ -157,7 +157,7 @@
..()
popup.add_script("autocomplete.js", 'html/browser/autocomplete.js')
for(var/i=1, i <= choices.len, i++)
for(var/i=1, i <= length(choices), i++)
var/C = choices[choices[i]]
choices[i] = url_encode(choices[i], TRUE)
choices[choices[i]] = C
@@ -37,7 +37,7 @@
return 0
/datum/construction/proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type.
var/list/L = steps[steps.len]
var/list/L = steps[length(steps)]
if(do_tool_or_atom_check(used_atom, L["key"]))
return steps.len
return 0
@@ -67,7 +67,7 @@
return 1
/datum/construction/proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
for(var/i=1;i<=steps.len;i++)
for(var/i=1;i<=length(steps);i++)
var/list/L = steps[i]
if(do_tool_or_atom_check(used_atom, L["key"]) && custom_action(i, used_atom, user))
steps[i]=null;//stupid byond list from list removal...
+1 -1
View File
@@ -48,7 +48,7 @@
devices_line += device
// var/list/obj/devices_line___ = devices[filter_str]
// var/l = devices_line___.len
//log_admin("DEBUG: devices_line.len=[devices_line.len]")
//log_admin("DEBUG: devices_line.len=[length(devices_line)]")
//log_admin("DEBUG: devices(filter_str).len=[l]")
/datum/radio_frequency/proc/remove_listener(obj/device)
+1 -1
View File
@@ -351,7 +351,7 @@
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(list/buffer)
var/list/arr = list()
for(var/i = 1, i <= buffer.len, i++)
for(var/i = 1, i <= length(buffer), i++)
arr += "[i]:[EncodeDNABlock(buffer[i])]"
return arr
+1 -1
View File
@@ -435,7 +435,7 @@
var/list/words = splittext(message," ")
var/list/rearranged = list()
for(var/i=1;i<=words.len;i++)
for(var/i=1;i<=length(words);i++)
var/cword = pick(words)
words.Remove(cword)
var/suffix = copytext(cword,length(cword)-1,length(cword))
+2 -2
View File
@@ -700,8 +700,8 @@
if(H.mind && H.mind.initial_account)
numbers += H.mind.initial_account.account_number
numbers += H.mind.initial_account.account_pin
if(numbers.len>0)
to_chat(user, "<span class='notice'><b>Numbers</b>: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].</span>")
if(length(numbers)>0)
to_chat(user, "<span class='notice'><b>Numbers</b>: You sense the number[length(numbers)>1?"s":""] [english_list(numbers)] [length(numbers)>1?"are":"is"] important to [M.name].</span>")
to_chat(user, "<span class='notice'><b>Thoughts</b>: [M.name] is currently [thoughts].</span>")
if(M.dna?.GetSEState(GLOB.empathblock))
@@ -29,7 +29,7 @@
var/list/status_tab_data = ..()
. = status_tab_data
if(stealthcooldown >= world.time)
status_tab_data[++status_tab_data.len] = list("Stealth Cooldown Remaining:", "[max(round((stealthcooldown - world.time) * 0.1, 0.1), 0)] seconds")
status_tab_data[++length(status_tab_data)] = list("Stealth Cooldown Remaining:", "[max(round((stealthcooldown - world.time) * 0.1, 0.1), 0)] seconds")
/mob/living/simple_animal/hostile/guardian/assassin/AttackingTarget()
. = ..()
@@ -14,7 +14,7 @@
var/list/status_tab_data = ..()
. = status_tab_data
if(bomb_cooldown >= world.time)
status_tab_data[++status_tab_data.len] = list("Bomb Cooldown Remaining:", "[max(round((bomb_cooldown - world.time) * 0.1, 0.1), 0)] seconds")
status_tab_data[++length(status_tab_data)] = list("Bomb Cooldown Remaining:", "[max(round((bomb_cooldown - world.time) * 0.1, 0.1), 0)] seconds")
/mob/living/simple_animal/hostile/guardian/bomb/AltClickOn(atom/movable/A)
if(!istype(A))
@@ -51,9 +51,9 @@
var/list/status_tab_data = ..()
. = status_tab_data
if(beacon_cooldown >= world.time)
status_tab_data[++status_tab_data.len] = list("Bluespace Beacon Cooldown Remaining:", "[max(round((beacon_cooldown - world.time) * 0.1, 0.1), 0)] seconds")
status_tab_data[++length(status_tab_data)] = list("Bluespace Beacon Cooldown Remaining:", "[max(round((beacon_cooldown - world.time) * 0.1, 0.1), 0)] seconds")
if(surgical_cooldown >= world.time)
status_tab_data[++status_tab_data.len] = list("Surgical Cooldown Remaining:", "[max(round((surgical_cooldown - world.time) * 0.1, 0.1), 0)] seconds")
status_tab_data[++length(status_tab_data)] = list("Surgical Cooldown Remaining:", "[max(round((surgical_cooldown - world.time) * 0.1, 0.1), 0)] seconds")
/mob/living/simple_animal/hostile/guardian/healer/AttackingTarget()
. = ..()
@@ -74,7 +74,7 @@
/mob/living/simple_animal/hostile/morph/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Food Stored:", "[gathered_food]")
status_tab_data[++length(status_tab_data)] = list("Food Stored:", "[gathered_food]")
/mob/living/simple_animal/hostile/morph/wizard
name = "magical morph"
@@ -268,12 +268,12 @@
/mob/living/simple_animal/demon/pulse_demon/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Charge:", "[format_si_suffix(charge)]W")
status_tab_data[++status_tab_data.len] = list("Maximum Charge:", "[format_si_suffix(maxcharge)]W")
status_tab_data[++status_tab_data.len] = list("Drained Charge:", "[format_si_suffix(charge_drained)]W")
status_tab_data[++status_tab_data.len] = list("Hijacked APCs:", "[length(hijacked_apcs)]")
status_tab_data[++status_tab_data.len] = list("Drain Rate:", "[format_si_suffix(power_drain_rate)]W")
status_tab_data[++status_tab_data.len] = list("Hijack Time:", "[hijack_time / 10] seconds")
status_tab_data[++length(status_tab_data)] = list("Charge:", "[format_si_suffix(charge)]W")
status_tab_data[++length(status_tab_data)] = list("Maximum Charge:", "[format_si_suffix(maxcharge)]W")
status_tab_data[++length(status_tab_data)] = list("Drained Charge:", "[format_si_suffix(charge_drained)]W")
status_tab_data[++length(status_tab_data)] = list("Hijacked APCs:", "[length(hijacked_apcs)]")
status_tab_data[++length(status_tab_data)] = list("Drain Rate:", "[format_si_suffix(power_drain_rate)]W")
status_tab_data[++length(status_tab_data)] = list("Hijack Time:", "[hijack_time / 10] seconds")
/mob/living/simple_animal/demon/pulse_demon/dust()
return death()
@@ -127,9 +127,9 @@
/mob/living/simple_animal/revenant/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Current essence:", "[essence]/[essence_regen_cap]E")
status_tab_data[++status_tab_data.len] = list("Stolen essence:", "[essence_accumulated]E")
status_tab_data[++status_tab_data.len] = list("Stolen perfect souls:", "[perfectsouls]")
status_tab_data[++length(status_tab_data)] = list("Current essence:", "[essence]/[essence_regen_cap]E")
status_tab_data[++length(status_tab_data)] = list("Stolen essence:", "[essence_accumulated]E")
status_tab_data[++length(status_tab_data)] = list("Stolen perfect souls:", "[perfectsouls]")
/mob/living/simple_animal/revenant/New()
..()
+1 -1
View File
@@ -129,4 +129,4 @@
warning("DNA2: Mutation [mutation.name] trying to add to already assigned gene block list (used by [english_list(GLOB.assigned_mutation_blocks[block])])")
GLOB.assigned_mutation_blocks[block] = mutation
//testing("DNA2: [numsToAssign.len] blocks are unused: [english_list(numsToAssign)]")
//testing("DNA2: [length(numsToAssign)] blocks are unused: [english_list(numsToAssign)]")
+1 -1
View File
@@ -691,7 +691,7 @@ GLOBAL_LIST_EMPTY(multiverse)
spooky_scaries |= M
to_chat(M, "<span class='userdanger'>You have been revived by </span><B>[user.real_name]!</B>")
to_chat(M, "<span class='userdanger'>[user.p_theyre(TRUE)] your master now, assist them even if it costs you your new life!</span>")
desc = "A shard capable of resurrecting humans as skeleton thralls[unlimited ? "." : ", [spooky_scaries.len]/3 active thralls."]"
desc = "A shard capable of resurrecting humans as skeleton thralls[unlimited ? "." : ", [length(spooky_scaries)]/3 active thralls."]"
/obj/item/necromantic_stone/proc/check_spooky()
if(unlimited) //no point, the list isn't used.
+1 -1
View File
@@ -881,7 +881,7 @@
dat += "</ul>"
var/datum/spellbook_entry/E
for(var/i=1,i<=entries.len,i++)
for(var/i=1,i<=length(entries),i++)
var/spell_info = ""
E = entries[i]
spell_info += E.GetInfo()
+1 -1
View File
@@ -67,7 +67,7 @@
/datum/game_mode/wizard/declare_completion(ragin = 0)
if(finished && !ragin)
SSticker.mode_result = "wizard loss - wizard killed"
to_chat(world, "<span class='warning'><FONT size = 3><B> The wizard[(wizards.len>1)?"s":""] has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!</B></FONT></span>")
to_chat(world, "<span class='warning'><FONT size = 3><B> The wizard[(length(wizards)>1)?"s":""] has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!</B></FONT></span>")
..()
return TRUE
+3 -3
View File
@@ -238,8 +238,8 @@
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] / coeff)))
has_glass = 0
data[++data.len] = list("name" = "metal", "amount" = D.materials[MAT_METAL] / coeff, "is_red" = !has_metal)
data[++data.len] = list("name" = "glass", "amount" = D.materials[MAT_GLASS] / coeff, "is_red" = !has_glass)
data[++length(data)] = list("name" = "metal", "amount" = D.materials[MAT_METAL] / coeff, "is_red" = !has_metal)
data[++length(data)] = list("name" = "glass", "amount" = D.materials[MAT_GLASS] / coeff, "is_red" = !has_glass)
return data
@@ -253,7 +253,7 @@
for(var/list/L in queue)
var/datum/design/D = L[1]
var/list/LL = get_design_cost_as_list(D, L[2])
data_queue[++data_queue.len] = list("name" = initial(D.name), "can_build" = can_build(D, L[2], temp_metal, temp_glass), "multiplier" = L[2])
data_queue[++length(data_queue)] = list("name" = initial(D.name), "can_build" = can_build(D, L[2], temp_metal, temp_glass), "multiplier" = L[2])
temp_metal = max(temp_metal - LL[1], 1)
temp_glass = max(temp_glass - LL[2], 1)
data["queue"] = data_queue
+1 -1
View File
@@ -195,7 +195,7 @@
var/obj/machinery/camera/a
var/obj/machinery/camera/b
for(var/i = L.len, i > 0, i--)
for(var/i = length(L), i > 0, i--)
for(var/j = 1 to i - 1)
a = L[j]
b = L[j + 1]
+1 -1
View File
@@ -43,7 +43,7 @@
timer["time_set_seconds"] = round(T.timetoset / 10, 1)
timer["time_left_seconds"] = round(T.timeleft(), 1)
timer["ref"] = "\ref[T]"
timers[++timers.len] += timer
timers[++length(timers)] += timer
timers = sortByKey(timers, "cell_id")
data["cells"] = timers
return data
@@ -475,7 +475,7 @@
data["str_security_level"] = capitalize(SSsecurity_level.get_current_level_as_text())
var/list/msg_data = list()
for(var/i = 1; i <= messagetext.len; i++)
for(var/i = 1; i <= length(messagetext); i++)
msg_data.Add(list(list("title" = messagetitle[i], "body" = messagetext[i], "id" = i)))
data["messages"] = msg_data
+21 -21
View File
@@ -101,7 +101,7 @@
var/list/records = list()
data["records"] = records
for(var/datum/data/record/R in sortRecord(GLOB.data_core.general))
records[++records.len] = list(
records[++length(records)] = list(
"ref" = "\ref[R]",
"name" = R.fields["name"],
"id" = R.fields["id"],
@@ -114,17 +114,17 @@
if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1))
var/list/fields = list()
general["fields"] = fields
fields[++fields.len] = FIELD("Name", active1.fields["name"], null)
fields[++fields.len] = FIELD("ID", active1.fields["id"], null)
fields[++fields.len] = FIELD("Sex", active1.fields["sex"], "sex")
fields[++fields.len] = FIELD("Age", active1.fields["age"], "age")
fields[++fields.len] = FIELD("Fingerprint", active1.fields["fingerprint"], "fingerprint")
fields[++fields.len] = FIELD("Physical Status", active1.fields["p_stat"], "p_stat")
fields[++fields.len] = FIELD("Mental Status", active1.fields["m_stat"], "m_stat")
fields[++length(fields)] = FIELD("Name", active1.fields["name"], null)
fields[++length(fields)] = FIELD("ID", active1.fields["id"], null)
fields[++length(fields)] = FIELD("Sex", active1.fields["sex"], "sex")
fields[++length(fields)] = FIELD("Age", active1.fields["age"], "age")
fields[++length(fields)] = FIELD("Fingerprint", active1.fields["fingerprint"], "fingerprint")
fields[++length(fields)] = FIELD("Physical Status", active1.fields["p_stat"], "p_stat")
fields[++length(fields)] = FIELD("Mental Status", active1.fields["m_stat"], "m_stat")
var/list/photos = list()
general["photos"] = photos
photos[++photos.len] = active1.fields["photo-south"]
photos[++photos.len] = active1.fields["photo-west"]
photos[++length(photos)] = active1.fields["photo-south"]
photos[++length(photos)] = active1.fields["photo-west"]
general["has_photos"] = (active1.fields["photo-south"] || active1.fields["photo-west"] ? 1 : 0)
general["empty"] = 0
else
@@ -135,17 +135,17 @@
if(istype(active2, /datum/data/record) && GLOB.data_core.medical.Find(active2))
var/list/fields = list()
medical["fields"] = fields
fields[++fields.len] = MED_FIELD("Blood Type", active2.fields["blood_type"], "blood_type", FALSE)
fields[++fields.len] = MED_FIELD("DNA", active2.fields["b_dna"], "b_dna", TRUE)
fields[++fields.len] = MED_FIELD("Minor Disabilities", active2.fields["mi_dis"], "mi_dis", FALSE)
fields[++fields.len] = MED_FIELD("Details", active2.fields["mi_dis_d"], "mi_dis_d", FALSE)
fields[++fields.len] = MED_FIELD("Major Disabilities", active2.fields["ma_dis"], "ma_dis", FALSE)
fields[++fields.len] = MED_FIELD("Details", active2.fields["ma_dis_d"], "ma_dis_d", TRUE)
fields[++fields.len] = MED_FIELD("Allergies", active2.fields["alg"], "alg", FALSE)
fields[++fields.len] = MED_FIELD("Details", active2.fields["alg_d"], "alg_d", FALSE)
fields[++fields.len] = MED_FIELD("Current Diseases", active2.fields["cdi"], "cdi", FALSE)
fields[++fields.len] = MED_FIELD("Details", active2.fields["cdi_d"], "cdi_d", TRUE)
fields[++fields.len] = MED_FIELD("Important Notes", active2.fields["notes"], "notes", FALSE)
fields[++length(fields)] = MED_FIELD("Blood Type", active2.fields["blood_type"], "blood_type", FALSE)
fields[++length(fields)] = MED_FIELD("DNA", active2.fields["b_dna"], "b_dna", TRUE)
fields[++length(fields)] = MED_FIELD("Minor Disabilities", active2.fields["mi_dis"], "mi_dis", FALSE)
fields[++length(fields)] = MED_FIELD("Details", active2.fields["mi_dis_d"], "mi_dis_d", FALSE)
fields[++length(fields)] = MED_FIELD("Major Disabilities", active2.fields["ma_dis"], "ma_dis", FALSE)
fields[++length(fields)] = MED_FIELD("Details", active2.fields["ma_dis_d"], "ma_dis_d", TRUE)
fields[++length(fields)] = MED_FIELD("Allergies", active2.fields["alg"], "alg", FALSE)
fields[++length(fields)] = MED_FIELD("Details", active2.fields["alg_d"], "alg_d", FALSE)
fields[++length(fields)] = MED_FIELD("Current Diseases", active2.fields["cdi"], "cdi", FALSE)
fields[++length(fields)] = MED_FIELD("Details", active2.fields["cdi_d"], "cdi_d", TRUE)
fields[++length(fields)] = MED_FIELD("Important Notes", active2.fields["notes"], "notes", FALSE)
if(!active2.fields["comments"] || !islist(active2.fields["comments"]))
active2.fields["comments"] = list()
medical["comments"] = active2.fields["comments"]
@@ -104,7 +104,7 @@
var/list/record_line = list("uid_gen" = G.UID(), "id" = G.fields["id"], "name" = G.fields["name"], "rank" = G.fields["rank"], "fingerprint" = G.fields["fingerprint"])
record_line["status"] = S?.fields["criminal"] || "No record"
record_line["uid_sec"] = S?.UID() // So we don't have to perform the search through a for loop again later
records[++records.len] = record_line
records[++length(records)] = record_line
if(SEC_DATA_RECORD)
var/list/general = list()
data["general"] = general
@@ -276,7 +276,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/get_equip_info()
var/output = ..()
if(output)
return "[output] \[<a href='byond://?src=[UID()];toggle_mode=1'>[mode? "Analyze" : "Launch"]</a>\]<br />\[Syringes: [syringes.len]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]<br /><a href='byond://?src=[UID()];show_reagents=1'>Reagents list</a>"
return "[output] \[<a href='byond://?src=[UID()];toggle_mode=1'>[mode? "Analyze" : "Launch"]</a>\]<br />\[Syringes: [length(syringes)]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]<br /><a href='byond://?src=[UID()];show_reagents=1'>Reagents list</a>"
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/action(atom/movable/target)
if(!action_checks(target))
@@ -442,7 +442,7 @@
return output || "None"
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/load_syringe(obj/item/reagent_containers/syringe/S)
if(syringes.len<max_syringes)
if(length(syringes)<max_syringes)
if(get_dist(src,S) >= 2)
occupant_message("The syringe is too far away.")
return FALSE
+3 -3
View File
@@ -137,7 +137,7 @@
. += "<div class='links'>"
for(var/obj/item/mecha_parts/mecha_equipment/W in equipment)
. += "[W.name] <a href='byond://?src=[W.UID()];detach=1'>Detach</a><br>"
. += "<b>Available equipment slots:</b> [max_equip-equipment.len]"
. += "<b>Available equipment slots:</b> [max_equip-length(equipment)]"
. += "</div></div>"
/obj/mecha/proc/get_equipment_list() //outputs mecha equipment list in html
@@ -229,11 +229,11 @@
/obj/mecha/proc/log_message(message as text,red=null)
log.len++
log[log.len] = list("time"=world.timeofday,"message"="[red?"<font color='red'>":null][message][red?"</font>":null]")
log[length(log)] = list("time"=world.timeofday,"message"="[red?"<font color='red'>":null][message][red?"</font>":null]")
return log.len
/obj/mecha/proc/log_append_to_last(message as text,red=null)
var/list/last_entry = log[log.len]
var/list/last_entry = log[length(log)]
last_entry["message"] += "<br>[red?"<font color='red'>":null][message][red?"</font>":null]"
return
+1 -1
View File
@@ -155,7 +155,7 @@
var/turf/T = get_turf(O)
if(T)
T.Entered(O)
log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - cargo.len]")
log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - length(cargo)]")
return
+2 -2
View File
@@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(world_uplinks)
var/list/cats = list()
for(var/category in uplink_items)
cats[++cats.len] = list("cat" = category, "items" = list())
cats[++length(cats)] = list("cat" = category, "items" = list())
for(var/datum/uplink_item/I in uplink_items[category])
if(I.job && I.job.len)
if(!(I.job.Find(job)) && uplink_type != UPLINK_TYPE_ADMIN)
@@ -70,7 +70,7 @@ GLOBAL_LIST_EMPTY(world_uplinks)
if(length(I.species))
if(!(I.species.Find(species)) && uplink_type != UPLINK_TYPE_ADMIN)
continue
cats[cats.len]["items"] += list(list(
cats[length(cats)]["items"] += list(list(
"name" = sanitize(I.name),
"desc" = sanitize(I.description()),
"cost" = I.cost,
+1 -1
View File
@@ -26,7 +26,7 @@
to_chat(user, "<span class='warning'>You should clean [src] before you use it for food prep.</span>")
return 0
if(is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_MICROWAVE]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_GRILL]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_OVEN]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_CANDY]))
if(contents.len>=max_n_of_items)
if(length(contents)>=max_n_of_items)
to_chat(user, "<span class='alert'>This [src] is full of ingredients, you cannot put more.</span>")
return 1
if(istype(I, /obj/item/stack))
@@ -232,7 +232,7 @@
new cigarette_type(src)
/obj/item/storage/fancy/cigarettes/update_icon_state()
icon_state = "[initial(icon_state)][contents.len]"
icon_state = "[initial(icon_state)][length(contents)]"
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!ismob(M))
@@ -240,7 +240,7 @@
if(istype(M) && M == user && user.zone_selected == "mouth" && contents.len > 0 && !user.wear_mask)
var/got_cig = 0
for(var/num=1, num <= contents.len, num++)
for(var/num=1, num <= length(contents), num++)
var/obj/item/I = contents[num]
if(istype(I, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/C = I
@@ -722,7 +722,7 @@
// But then again a tesseract would destroy the server anyways
// Also I wish I could just insert a list instead of it reading it the wrong way
content_list.len++
content_list[content_list.len] = AM.serialize()
content_list[length(content_list)] = AM.serialize()
return data
/obj/item/storage/deserialize(list/data)
+2 -2
View File
@@ -340,7 +340,7 @@ LINEN BINS
var/obj/item/bedsheet/B
if(sheets.len > 0)
B = sheets[sheets.len]
B = sheets[length(sheets)]
sheets.Remove(B)
else
@@ -365,7 +365,7 @@ LINEN BINS
var/obj/item/bedsheet/B
if(sheets.len > 0)
B = sheets[sheets.len]
B = sheets[length(sheets)]
sheets.Remove(B)
else
+1 -1
View File
@@ -246,7 +246,7 @@ GLOBAL_LIST_EMPTY(safes)
var/list/contents_names = list()
data["contents"] = contents_names
for(var/obj/O in contents)
contents_names[++contents_names.len] = list("name" = O.name, "sprite" = O.icon_state)
contents_names[++length(contents_names)] = list("name" = O.name, "sprite" = O.icon_state)
user << browse_rsc(icon(O.icon, O.icon_state), "[O.icon_state].png")
return data
+1 -1
View File
@@ -129,7 +129,7 @@
/turf/simulated/wall/proc/generate_overlays()
var/alpha_inc = 256 / damage_overlays.len
for(var/i = 1; i <= damage_overlays.len; i++)
for(var/i = 1; i <= length(damage_overlays); i++)
var/image/img = image(icon = 'icons/turf/walls.dmi', icon_state = "overlay_damage")
img.blend_mode = BLEND_MULTIPLY
img.alpha = (i * alpha_inc) - 1
+2 -2
View File
@@ -282,7 +282,7 @@
var/result = 0
var/val
for(var/i = start, i <= expression.len, i++)
for(var/i = start, i <= length(expression), i++)
var/op = ""
if(i > start)
@@ -441,7 +441,7 @@
/proc/SDQL_function(datum/object, procname, list/arguments, source)
var/list/new_args = list()
for(var/arg in arguments)
new_args[++new_args.len] = SDQL_expression(source, arg)
new_args[++length(new_args)] = SDQL_expression(source, arg)
if(object == world) // Global proc.
return (WrapAdminProcCall(GLOBAL_PROC, procname, new_args))
+11 -11
View File
@@ -301,7 +301,7 @@
var/list/bool = list()
i = expression(i, bool)
node[++node.len] = bool
node[++length(node)] = bool
if(tokenl(i) in boolean_operators)
i = bool_operator(i, node)
@@ -332,7 +332,7 @@
//variable: <variable name> | <variable name> '.' variable
/datum/SDQL_parser/proc/variable(i, list/node)
var/list/L = list(token(i))
node[++node.len] = L
node[++length(node)] = L
if(token(i) == "\[")
L += token(i + 1)
@@ -349,7 +349,7 @@
var/list/arguments = list()
i = call_function(i, null, arguments)
L += ":"
L[++L.len] = arguments
L[++length(L)] = arguments
else if(token(i + 1) == "\[") // list index
var/list/expression = list()
@@ -358,7 +358,7 @@
parse_error("Missing ] at the end of list access.")
L += "\["
L[++L.len] = expression
L[++length(L)] = expression
i++
else
@@ -431,15 +431,15 @@
i = expression(i + 1, temp_expression_list)
if(token(i) == ",")
expression_list[++expression_list.len] = temp_expression_list
expression_list[++length(expression_list)] = temp_expression_list
temp_expression_list = list()
while(token(i) && token(i) != "}")
expression_list[++expression_list.len] = temp_expression_list
expression_list[++length(expression_list)] = temp_expression_list
else
i++
node[++node.len] = expression_list
node[++length(node)] = expression_list
return i + 1
//call_function: <function name> ['(' [arguments] ')']
@@ -494,7 +494,7 @@
else
i++
node[++node.len] = expr
node[++length(node)] = expr
else
i = value(i, node)
@@ -509,7 +509,7 @@
var/list/rhs = list()
i = expression(i, rhs)
node[++node.len] = rhs
node[++length(node)] = rhs
return i
@@ -538,12 +538,12 @@
else
i++
unary_exp[++unary_exp.len] = expr
unary_exp[++length(unary_exp)] = expr
else
i = value(i, unary_exp)
node[++node.len] = unary_exp
node[++length(node)] = unary_exp
else
+1 -1
View File
@@ -92,7 +92,7 @@
if(!f)
output += "&nbsp;&nbsp;[filters[filter]]: ERROR<br>"
continue
output += "&nbsp;&nbsp;[filters[filter]]: [f.len]<br>"
output += "&nbsp;&nbsp;[filters[filter]]: [length(f)]<br>"
for(var/device in f)
if(isobj(device))
output += "&nbsp;&nbsp;&nbsp;&nbsp;[device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
+4 -4
View File
@@ -111,7 +111,7 @@
if(VV_RESTORE_DEFAULT)
to_chat(src, "Finding items...")
var/list/items = get_all_of_type(O.type, method)
to_chat(src, "Changing [items.len] items...")
to_chat(src, "Changing [length(items)] items...")
for(var/thing in items)
if(!thing)
continue
@@ -137,7 +137,7 @@
to_chat(src, "Finding items...")
var/list/items = get_all_of_type(O.type, method)
to_chat(src, "Changing [items.len] items...")
to_chat(src, "Changing [length(items)] items...")
for(var/thing in items)
if(!thing)
continue
@@ -165,7 +165,7 @@
var/type = value["type"]
to_chat(src, "Finding items...")
var/list/items = get_all_of_type(O.type, method)
to_chat(src, "Changing [items.len] items...")
to_chat(src, "Changing [length(items)] items...")
for(var/thing in items)
if(!thing)
continue
@@ -183,7 +183,7 @@
else
to_chat(src, "Finding items...")
var/list/items = get_all_of_type(O.type, method)
to_chat(src, "Changing [items.len] items...")
to_chat(src, "Changing [length(items)] items...")
for(var/thing in items)
if(!thing)
continue
+4 -4
View File
@@ -61,7 +61,7 @@
candidates += applicant
if(candidates.len)
var/numTraitors = min(candidates.len, antnum)
var/numTraitors = min(length(candidates), antnum)
for(var/i = 0, i<numTraitors, i++)
H = pick(candidates)
@@ -92,7 +92,7 @@
candidates += applicant
if(candidates.len)
var/numChangelings = min(candidates.len, antnum)
var/numChangelings = min(length(candidates), antnum)
for(var/i = 0, i<numChangelings, i++)
H = pick(candidates)
@@ -122,7 +122,7 @@
candidates += applicant
if(candidates.len)
var/numRevs = min(candidates.len, antnum)
var/numRevs = min(length(candidates), antnum)
for(var/i = 0, i<numRevs, i++)
H = pick(candidates)
@@ -277,7 +277,7 @@
candidates += applicant
if(candidates.len)
var/numVampires = min(candidates.len, antnum)
var/numVampires = min(length(candidates), antnum)
for(var/i = 0, i<numVampires, i++)
H = pick(candidates)
+12 -12
View File
@@ -744,24 +744,24 @@
for(var/g in gas_names)
thresholds += list(list("name" = gas_names[g], "settings" = list()))
selected = TLV[g]
thresholds[thresholds.len]["settings"] += list(list("env" = g, "val" = "min2", "selected" = selected.min2))
thresholds[thresholds.len]["settings"] += list(list("env" = g, "val" = "min1", "selected" = selected.min1))
thresholds[thresholds.len]["settings"] += list(list("env" = g, "val" = "max1", "selected" = selected.max1))
thresholds[thresholds.len]["settings"] += list(list("env" = g, "val" = "max2", "selected" = selected.max2))
thresholds[length(thresholds)]["settings"] += list(list("env" = g, "val" = "min2", "selected" = selected.min2))
thresholds[length(thresholds)]["settings"] += list(list("env" = g, "val" = "min1", "selected" = selected.min1))
thresholds[length(thresholds)]["settings"] += list(list("env" = g, "val" = "max1", "selected" = selected.max1))
thresholds[length(thresholds)]["settings"] += list(list("env" = g, "val" = "max2", "selected" = selected.max2))
selected = TLV["pressure"]
thresholds += list(list("name" = "Pressure", "settings" = list()))
thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min2", "selected" = selected.min2))
thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "min1", "selected" = selected.min1))
thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max1", "selected" = selected.max1))
thresholds[thresholds.len]["settings"] += list(list("env" = "pressure", "val" = "max2", "selected" = selected.max2))
thresholds[length(thresholds)]["settings"] += list(list("env" = "pressure", "val" = "min2", "selected" = selected.min2))
thresholds[length(thresholds)]["settings"] += list(list("env" = "pressure", "val" = "min1", "selected" = selected.min1))
thresholds[length(thresholds)]["settings"] += list(list("env" = "pressure", "val" = "max1", "selected" = selected.max1))
thresholds[length(thresholds)]["settings"] += list(list("env" = "pressure", "val" = "max2", "selected" = selected.max2))
selected = TLV["temperature"]
thresholds += list(list("name" = "Temperature", "settings" = list()))
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min2", "selected" = selected.min2))
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "min1", "selected" = selected.min1))
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1))
thresholds[thresholds.len]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2))
thresholds[length(thresholds)]["settings"] += list(list("env" = "temperature", "val" = "min2", "selected" = selected.min2))
thresholds[length(thresholds)]["settings"] += list(list("env" = "temperature", "val" = "min1", "selected" = selected.min1))
thresholds[length(thresholds)]["settings"] += list(list("env" = "temperature", "val" = "max1", "selected" = selected.max1))
thresholds[length(thresholds)]["settings"] += list(list("env" = "temperature", "val" = "max2", "selected" = selected.max2))
return thresholds
@@ -40,12 +40,12 @@
if(!air)
air = new
var/list/possible_expansions = list(base)
while(possible_expansions.len>0)
while(length(possible_expansions)>0)
for(var/obj/machinery/atmospherics/borderline in possible_expansions)
var/list/result = borderline.pipeline_expansion(src)
if(result.len>0)
if(length(result)>0)
for(var/obj/machinery/atmospherics/P in result)
if(istype(P, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/item = P
@@ -186,7 +186,7 @@
var/list/datum/pipeline/PL = list()
PL += src
for(var/i=1;i<=PL.len;i++)
for(var/i=1;i<=length(PL);i++)
var/datum/pipeline/P = PL[i]
if(!P)
return
@@ -105,7 +105,7 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new())
if(!gridLines.len) // Skip it if only blank lines exist.
continue
if(gridLines.len && gridLines[gridLines.len] == "")
if(gridLines.len && gridLines[length(gridLines)] == "")
gridLines.Cut(gridLines.len) // Remove only one blank line at the end.
bounds[MAP_MINY] = min(bounds[MAP_MINY], ycrd)
+1 -1
View File
@@ -1206,7 +1206,7 @@
if(!istext(verb_to_init.category))
continue
panel_tabs |= verb_to_init.category
verblist[++verblist.len] = list(verb_to_init.category, verb_to_init.name)
verblist[++length(verblist)] = list(verb_to_init.category, verb_to_init.name)
src.stat_panel.send_message("init_verbs", list(panel_tabs = panel_tabs, verblist = verblist))
/client/proc/check_panel_loaded()
+1 -1
View File
@@ -826,7 +826,7 @@
data["accessories"] = accessories_list
for(var/obj/item/clothing/accessory/A in accessories)
accessories_list.len++
accessories_list[accessories_list.len] = A.serialize()
accessories_list[length(accessories_list)] = A.serialize()
return data
+2 -2
View File
@@ -112,8 +112,8 @@
var/list/status_tab_data = ..()
. = status_tab_data
if(blob_core)
status_tab_data[++status_tab_data.len] = list("Core Health:", "[blob_core.obj_integrity]")
status_tab_data[++status_tab_data.len] = list("Power Stored:", "[blob_points]/[max_blob_points]")
status_tab_data[++length(status_tab_data)] = list("Core Health:", "[blob_core.obj_integrity]")
status_tab_data[++length(status_tab_data)] = list("Power Stored:", "[blob_points]/[max_blob_points]")
/mob/camera/blob/Move(NewLoc, Dir = 0)
var/obj/structure/blob/B = locate() in range("3x3", NewLoc)
@@ -95,7 +95,7 @@
to_chat(user, "<span class='warning'>[src] is full, please remove or process the contents first.</span>")
return
var/slot_inserted = 0
for(var/i = 1, i <= slots.len, i++)
for(var/i = 1, i <= length(slots), i++)
if(!slots[i])
slots[i] = O
slot_inserted = i
@@ -111,7 +111,7 @@
/obj/machinery/bottler/proc/eject_items(slot)
var/obj/item/O = null
if(!slot)
for(var/i = 1, i <= slots.len, i++)
for(var/i = 1, i <= length(slots), i++)
if(slots[i])
O = slots[i]
O.forceMove(loc)
@@ -205,7 +205,7 @@
/obj/machinery/bottler/proc/select_recipe()
for(var/datum/bottler_recipe/recipe in available_recipes)
var/number_matches = 0
for(var/i = 1, i <= slots.len, i++)
for(var/i = 1, i <= length(slots), i++)
var/obj/item/O = slots[i]
if(istype(O, recipe.ingredients[i]))
number_matches++
@@ -335,7 +335,7 @@
dat += "</tr>"
dat += "<tr>"
for(var/i = 1, i <= slots.len, i++)
for(var/i = 1, i <= length(slots), i++)
var/obj/O = slots[i]
if(O)
dat += "<td>[bicon(O)]<br>[O.name]</td>"
@@ -349,7 +349,7 @@
dat += "</tr>"
dat += "<tr>"
for(var/i = 1, i <= slots.len, i++)
for(var/i = 1, i <= length(slots), i++)
if(slots[i])
dat += "<td><A href='byond://?src=[UID()];eject=[i]'>Eject</a></td>"
else
@@ -270,7 +270,7 @@
desc = "A box suited for pizzas. It appears to have a [pizza.name] inside."
else if(boxes.len > 0)
desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile."
var/obj/item/pizzabox/top_box = boxes[boxes.len]
var/obj/item/pizzabox/top_box = boxes[length(boxes)]
var/top_tag = top_box.box_tag
if(top_tag != "")
desc = "[desc] The box on top has a tag, it reads: '[top_tag]'."
@@ -299,7 +299,7 @@
// Stupid code because byondcode sucks
var/set_tag = TRUE
if(boxes.len > 0)
var/obj/item/pizzabox/top_box = boxes[boxes.len]
var/obj/item/pizzabox/top_box = boxes[length(boxes)]
if(top_box.box_tag != "")
set_tag = TRUE
else
@@ -322,7 +322,7 @@
if(user.is_in_inactive_hand(src))
..()
return
var/obj/item/pizzabox/box = boxes[boxes.len]
var/obj/item/pizzabox/box = boxes[length(boxes)]
boxes -= box
user.put_in_hands(box)
to_chat(user, "<span class='warning'>You remove the topmost [src] from your hand.</span>")
@@ -390,7 +390,7 @@
return
var/obj/item/pizzabox/boxtotagto = src
if(boxes.len > 0)
boxtotagto = boxes[boxes.len]
boxtotagto = boxes[length(boxes)]
boxtotagto.box_tag = copytext("[t]", 1, 30)
update_appearance(UPDATE_DESC|UPDATE_ICON)
return
@@ -140,7 +140,7 @@
if(honeycombs.len)
var/plural = honeycombs.len > 1
. += "<span class='notice'>There [plural? "are" : "is"] [honeycombs.len] uncollected honeycomb[plural ? "s":""] in the apiary.</span>"
. += "<span class='notice'>There [plural? "are" : "is"] [length(honeycombs)] uncollected honeycomb[plural ? "s":""] in the apiary.</span>"
if(honeycombs.len >= get_max_honeycomb())
. += "<span class='warning'>there's no room for more honeycomb!</span>"
@@ -33,10 +33,10 @@
accents[key] = oct_acc //if they misspelled it/fucked up that's on them lmao, no safety checks.
else //octave
octaves[key] = clamp(num, octave_min, octave_max)
compiled_chord[++compiled_chord.len] = list(key, accents[key], octaves[key])
compiled_chord[++length(compiled_chord)] = list(key, accents[key], octaves[key])
compiled_chord += tempodiv //this goes last
if(length(compiled_chord))
compiled_chords[++compiled_chords.len] = compiled_chord
compiled_chords[++length(compiled_chords)] = compiled_chord
/**
* Proc to play a legacy note. Just plays the sound to hearing mobs (and does hearcheck if necessary), no fancy channel/sustain/management.
@@ -36,7 +36,7 @@
compiled_chord += clamp((note_offset_lookup[key] + octaves[key] * 12 + accent_lookup[accents[key]]), key_min, key_max)
compiled_chord += tempodiv //this goes last
if(length(compiled_chord))
compiled_chords[++compiled_chords.len] = compiled_chord
compiled_chords[++length(compiled_chords)] = compiled_chord
/**
* Plays a specific numerical key from our instrument to anyone who can hear us.
@@ -292,7 +292,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Respawnability:", "[HAS_TRAIT(src, TRAIT_RESPAWNABLE) ? "Yes" : "No"]")
status_tab_data[++length(status_tab_data)] = list("Respawnability:", "[HAS_TRAIT(src, TRAIT_RESPAWNABLE) ? "Yes" : "No"]")
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
@@ -84,8 +84,8 @@ I'm using this for Stat to give it a more nifty interface to work with
. = status_tab_data
if(has_synthetic_assistance() && ismecha(loc))
var/obj/mecha/M = loc
status_tab_data[++status_tab_data.len] = list("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]")
status_tab_data[++status_tab_data.len] = list("Exosuit Integrity:", "[!M.obj_integrity ? "0" : "[(M.obj_integrity / M.max_integrity) * 100]"]%")
status_tab_data[++length(status_tab_data)] = list("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]")
status_tab_data[++length(status_tab_data)] = list("Exosuit Integrity:", "[!M.obj_integrity ? "0" : "[(M.obj_integrity / M.max_integrity) * 100]"]%")
/mob/living/brain/can_safely_leave_loc()
return 0 //You're not supposed to be ethereal jaunting, brains
@@ -111,8 +111,8 @@
/mob/living/carbon/alien/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Intent:", "[a_intent]")
status_tab_data[++status_tab_data.len] = list("Move Mode:", "[m_intent]")
status_tab_data[++length(status_tab_data)] = list("Intent:", "[a_intent]")
status_tab_data[++length(status_tab_data)] = list("Move Mode:", "[m_intent]")
/mob/living/carbon/alien/SetStunned(amount, updating = TRUE, force = 0)
..()
@@ -43,7 +43,7 @@
/mob/living/carbon/alien/larva/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Progress:", "[amount_grown]/[max_grown]")
status_tab_data[++length(status_tab_data)] = list("Progress:", "[amount_grown]/[max_grown]")
/mob/living/carbon/alien/larva/add_plasma(amount)
if(stat != DEAD && amount > 0)
@@ -1002,7 +1002,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
. = status_tab_data
var/obj/item/organ/internal/alien/plasmavessel/vessel = get_int_organ(/obj/item/organ/internal/alien/plasmavessel)
if(vessel)
status_tab_data[++status_tab_data.len] = list("Plasma Stored:", "[vessel.stored_plasma]/[vessel.max_plasma]")
status_tab_data[++length(status_tab_data)] = list("Plasma Stored:", "[vessel.stored_plasma]/[vessel.max_plasma]")
/mob/living/carbon/get_all_slots()
return list(l_hand,
@@ -174,34 +174,34 @@
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Intent:", "[a_intent]")
status_tab_data[++status_tab_data.len] = list("Move Mode:", "[m_intent]")
status_tab_data[++length(status_tab_data)] = list("Intent:", "[a_intent]")
status_tab_data[++length(status_tab_data)] = list("Move Mode:", "[m_intent]")
if(HAS_TRAIT(src, TRAIT_HAS_GPS))
var/turf/T = get_turf(src)
status_tab_data[++status_tab_data.len] = list("GPS:", "[COORD(T)]")
status_tab_data[++length(status_tab_data)] = list("GPS:", "[COORD(T)]")
if(HAS_TRAIT(src, TRAIT_CAN_VIEW_HEALTH))
status_tab_data[++status_tab_data.len] = list("Health:", "[health]")
status_tab_data[++length(status_tab_data)] = list("Health:", "[health]")
if(internal)
if(!internal.air_contents)
qdel(internal)
else
status_tab_data[++status_tab_data.len] = list("Internal Atmosphere Info:", "[internal.name]")
status_tab_data[++status_tab_data.len] = list("Tank Pressure:", "[internal.air_contents.return_pressure()]")
status_tab_data[++status_tab_data.len] = list("Distribution Pressure:", "[internal.distribute_pressure]")
status_tab_data[++length(status_tab_data)] = list("Internal Atmosphere Info:", "[internal.name]")
status_tab_data[++length(status_tab_data)] = list("Tank Pressure:", "[internal.air_contents.return_pressure()]")
status_tab_data[++length(status_tab_data)] = list("Distribution Pressure:", "[internal.distribute_pressure]")
// I REALLY need to split up status panel things into datums
if(mind)
var/datum/antagonist/changeling/cling = mind.has_antag_datum(/datum/antagonist/changeling)
if(cling)
status_tab_data[++status_tab_data.len] = list("Chemical Storage:", "[cling.chem_charges]/[cling.chem_storage]")
status_tab_data[++status_tab_data.len] = list("Absorbed DNA:", "[cling.absorbed_count]")
status_tab_data[++length(status_tab_data)] = list("Chemical Storage:", "[cling.chem_charges]/[cling.chem_storage]")
status_tab_data[++length(status_tab_data)] = list("Absorbed DNA:", "[cling.absorbed_count]")
var/datum/antagonist/vampire/V = mind.has_antag_datum(/datum/antagonist/vampire)
if(V)
status_tab_data[++status_tab_data.len] = list("Total Blood:", "[V.bloodtotal]")
status_tab_data[++status_tab_data.len] = list("Usable Blood:", "[V.bloodusable]")
status_tab_data[++length(status_tab_data)] = list("Total Blood:", "[V.bloodtotal]")
status_tab_data[++length(status_tab_data)] = list("Usable Blood:", "[V.bloodusable]")
/mob/living/carbon/human/ex_act(severity)
if(status_flags & GODMODE)
+3 -3
View File
@@ -291,7 +291,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
var/list/status_tab_data = ..()
. = status_tab_data
if(stat)
status_tab_data[++status_tab_data.len] = list("System status:", "Nonfunctional")
status_tab_data[++length(status_tab_data)] = list("System status:", "Nonfunctional")
return
status_tab_data = show_borg_info(status_tab_data)
@@ -336,7 +336,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
src << browse(dat_text, "window=aialerts&can_close=0")
/mob/living/silicon/ai/proc/show_borg_info(list/status_tab_data)
status_tab_data[++status_tab_data.len] = list("Connected cyborg count:", "[length(connected_robots)]")
status_tab_data[++length(status_tab_data)] = list("Connected cyborg count:", "[length(connected_robots)]")
for(var/mob/living/silicon/robot/R in connected_robots)
var/robot_status = "Nominal"
if(R.stat || !R.client)
@@ -346,7 +346,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
// Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies!
var/area/A = get_area(R)
var/area_name = A ? sanitize(A.name) : "Unknown"
status_tab_data[++status_tab_data.len] = list("[R.name]:", "S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge] / [R.cell.maxcharge]" : "Empty"] | \
status_tab_data[++length(status_tab_data)] = list("[R.name]:", "S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge] / [R.cell.maxcharge]" : "Empty"] | \
Module: [R.designation] | Loc: [area_name] | Status: [robot_status]")
return status_tab_data
+1 -1
View File
@@ -163,7 +163,7 @@
/mob/living/silicon/pai/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = show_silenced()
status_tab_data[++length(status_tab_data)] = show_silenced()
/mob/living/silicon/pai/blob_act()
if(stat != DEAD)
@@ -16,7 +16,7 @@
var/list/emote = list()
emote["name"] = name
emote["id"] = GLOB.pai_emotions[name]
emotions[++emotions.len] = emote
emotions[++length(emotions)] = emote
data["emotions"] = emotions
data["current_emotion"] = user.card.current_emotion
@@ -26,7 +26,7 @@
var/list/speech = list()
speech["name"] = name
speech["id"] = length(speech_types)
speech_types[++speech_types.len] = speech
speech_types[++length(speech_types)] = speech
data["current_speech_verb"] = user.speech_state
data["speech_verbs"] = speech_types
@@ -42,7 +42,7 @@
chassis_to_update_with["name"] = name
chassis_to_update_with["icon"] = chassis_choices[name]
chassis_to_update_with["id"] = length(chassis_to_update_with)
chassises_to_add[++chassises_to_add.len] = chassis_to_update_with
chassises_to_add[++length(chassises_to_add)] = chassis_to_update_with
data["available_chassises"] = chassises_to_add
data["current_chassis"] = user.chassis
@@ -795,16 +795,16 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = show_cell_power()
status_tab_data[++length(status_tab_data)] = show_cell_power()
if(!module)
return
if(locate(/obj/item/gps/cyborg) in module.modules)
status_tab_data[++status_tab_data.len] = show_gps_coords()
status_tab_data[++length(status_tab_data)] = show_gps_coords()
for(var/datum/robot_storage/robot_storage in module.storages)
status_tab_data[++status_tab_data.len] = show_stack_energy(robot_storage)
status_tab_data[++length(status_tab_data)] = show_stack_energy(robot_storage)
/mob/living/silicon/robot/restrained()
return 0
@@ -326,7 +326,7 @@
/mob/living/silicon/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = show_system_integrity()
status_tab_data[++length(status_tab_data)] = show_system_integrity()
//Silicon mob language procs
@@ -59,7 +59,7 @@
. = status_tab_data
// Provides a status panel indicator, showing mothers how many regen points they have.
if(ckey && stat == CONSCIOUS)
status_tab_data[++status_tab_data.len] = list("Regeneration Points:", "[regen_points]")
status_tab_data[++length(status_tab_data)] = list("Regeneration Points:", "[regen_points]")
/mob/living/simple_animal/hostile/poison/terror_spider/mother/examine(mob/user)
. = ..()
@@ -102,13 +102,13 @@
if(spider_myqueen)
var/area/A = get_area(spider_myqueen)
if(degenerate)
status_tab_data[++status_tab_data.len] = list("Link:", "<font color='#eb4034'>BROKEN</font>") // color=red
status_tab_data[++length(status_tab_data)] = list("Link:", "<font color='#eb4034'>BROKEN</font>") // color=red
else if(queen_visible)
status_tab_data[++status_tab_data.len] = list("Link:", "<font color='#32a852'>[spider_myqueen] is near</font>") // color=green
status_tab_data[++length(status_tab_data)] = list("Link:", "<font color='#32a852'>[spider_myqueen] is near</font>") // color=green
else if(cycles_noqueen >= 12)
status_tab_data[++status_tab_data.len] = list("Link:", "<font color='#eb4034'>Critical - return to [spider_myqueen] in [A]</font>") // color=red
status_tab_data[++length(status_tab_data)] = list("Link:", "<font color='#eb4034'>Critical - return to [spider_myqueen] in [A]</font>") // color=red
else
status_tab_data[++status_tab_data.len] = list("Link:", "<font color='#fcba03'>Warning - return to [spider_myqueen] in [A]</font>") // color=orange
status_tab_data[++length(status_tab_data)] = list("Link:", "<font color='#fcba03'>Warning - return to [spider_myqueen] in [A]</font>") // color=orange
@@ -423,7 +423,7 @@ GLOBAL_LIST_EMPTY(ts_infected_list)
// Uses <font color='#X'> because the status panel does NOT accept <span class='X'>.
if(ckey && stat == CONSCIOUS)
if(degenerate)
status_tab_data[++status_tab_data.len] = list("Hivemind Connection Severed!", "<font color='#eb4034'>Dying...</font>") // color=red
status_tab_data[++length(status_tab_data)] = list("Hivemind Connection Severed!", "<font color='#eb4034'>Dying...</font>") // color=red
return
if(health != maxHealth)
var/hp_points_per_second = 0
@@ -441,7 +441,7 @@ GLOBAL_LIST_EMPTY(ts_infected_list)
hp_points_per_second = 1 / secs_per_tick
if(hp_points_per_second > 0)
var/pc_of_max_per_second = round(((hp_points_per_second / maxHealth) * 100), 0.1)
status_tab_data[++status_tab_data.len] = list("Regeneration:", "[ltext]: <font color='[lcolor]'>[num2text(pc_of_max_per_second)]% of health per second</font>")
status_tab_data[++length(status_tab_data)] = list("Regeneration:", "[ltext]: <font color='[lcolor]'>[num2text(pc_of_max_per_second)]% of health per second</font>")
/mob/living/simple_animal/hostile/poison/terror_spider/proc/DoRemoteView()
if(!isturf(loc))
@@ -128,7 +128,7 @@
/mob/living/simple_animal/parrot/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Held Item:", "[held_item]")
status_tab_data[++length(status_tab_data)] = list("Held Item:", "[held_item]")
/*
* Attack responces
@@ -375,7 +375,7 @@
/mob/living/simple_animal/get_status_tab_items()
var/list/status_tab_data = ..()
. = status_tab_data
status_tab_data[++status_tab_data.len] = list("Health:", "[round((health / maxHealth) * 100)]%")
status_tab_data[++length(status_tab_data)] = list("Health:", "[round((health / maxHealth) * 100)]%")
/mob/living/simple_animal/proc/drop_loot()
if(length(loot))
@@ -229,12 +229,12 @@
var/list/status_tab_data = ..()
. = status_tab_data
if(!docile)
status_tab_data[++status_tab_data.len] = list("Nutrition:", "[nutrition]/[get_max_nutrition()]")
status_tab_data[++length(status_tab_data)] = list("Nutrition:", "[nutrition]/[get_max_nutrition()]")
if(amount_grown >= SLIME_EVOLUTION_THRESHOLD)
status_tab_data[++status_tab_data.len] = list("You can:", is_adult ? "reproduce!" : "evolve!")
status_tab_data[++length(status_tab_data)] = list("You can:", is_adult ? "reproduce!" : "evolve!")
else
status_tab_data[++status_tab_data.len] = list("Power Level:", "[powerlevel]")
status_tab_data[++length(status_tab_data)] = list("Power Level:", "[powerlevel]")
/mob/living/simple_animal/slime/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
+2 -2
View File
@@ -1222,7 +1222,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
var/new_log = "\[[time_stamp()]] [text]"
if(target.len)//if there are other logs already present
var/previous_log = target[target.len]//get the latest log
var/previous_log = target[length(target)]//get the latest log
var/last_log_is_range = (copytext(previous_log, 10, 11) == "-") //whether the last log is a time range or not. The "-" will be an indicator that it is.
var/x_sign_position = findtext(previous_log, "x")
@@ -1247,7 +1247,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
rep = text2num(copytext(previous_log, 44, x_sign_position))//get whatever number is right before the 'x'
new_log = "\[[old_timestamp]-[time_stamp()]]<font color='purple'><b>[rep?rep+1:2]x</b></font> [text]"
target -= target[target.len]//remove the last log
target -= target[length(target)]//remove the last log
target += new_log
+2 -2
View File
@@ -158,9 +158,9 @@
var/selection = trim_right(lowertext(copytext(message, i, i + 3)))
var/datum/language/L = GLOB.language_keys[selection]
if(L != null && can_speak_language(L)) // What the fuck... remove the L != null check if you ever find out what the fuck is adding `null` to the languages list on absolutely random mobs... seriously what the hell...
prefixes[++prefixes.len] = list(L, i, i + length(selection))
prefixes[++length(prefixes)] = list(L, i, i + length(selection))
else if(!L && i == 1)
prefixes[++prefixes.len] = list(get_default_language(), i, i)
prefixes[++length(prefixes)] = list(get_default_language(), i, i)
return prefixes
+5 -5
View File
@@ -93,18 +93,18 @@
. = status_tab_data
if(SSticker)
if(!SSticker.hide_mode)
status_tab_data[++status_tab_data.len] = list("Game Mode:", "[GLOB.master_mode]")
status_tab_data[++length(status_tab_data)] = list("Game Mode:", "[GLOB.master_mode]")
else
status_tab_data[++status_tab_data.len] = list("Game Mode:", "Secret")
status_tab_data[++length(status_tab_data)] = list("Game Mode:", "Secret")
if(SSticker.current_state == GAME_STATE_PREGAME)
status_tab_data[++status_tab_data.len] = list("Time To Start:", SSticker.ticker_going ? deciseconds_to_time_stamp(SSticker.pregame_timeleft) : "DELAYED")
status_tab_data[++length(status_tab_data)] = list("Time To Start:", SSticker.ticker_going ? deciseconds_to_time_stamp(SSticker.pregame_timeleft) : "DELAYED")
if(check_rights(R_ADMIN, 0, src))
status_tab_data[++status_tab_data.len] = list("Players Ready:", "[totalPlayersReady]")
status_tab_data[++length(status_tab_data)] = list("Players Ready:", "[totalPlayersReady]")
totalPlayersReady = 0
for(var/mob/new_player/player in GLOB.player_list)
if(check_rights(R_ADMIN, 0, src))
status_tab_data[++status_tab_data.len] = list("[player.key]", player.ready ? "(Ready)" : "(Not ready)")
status_tab_data[++length(status_tab_data)] = list("[player.key]", player.ready ? "(Ready)" : "(Not ready)")
if(player.ready)
totalPlayersReady++
+2 -2
View File
@@ -70,7 +70,7 @@
var/obj/item/paper/P
if(papers.len > 0) //If there's any custom paper on the stack, use that instead of creating a new paper.
P = papers[papers.len]
P = papers[length(papers)]
papers.Remove(P)
else
if(letterhead_type && alert("Choose a style", null,"Letterhead","Blank")=="Letterhead")
@@ -134,7 +134,7 @@
var/obj/item/paper/carbon/P
if(papers.len > 0) //If there's any custom paper on the stack, use that instead of creating a new paper.
P = papers[papers.len]
P = papers[length(papers)]
papers.Remove(P)
else
P = new /obj/item/paper/carbon

Some files were not shown because too many files have changed in this diff Show More