_HELPERS/unsorted.dm has been sorted (#61882)

bring code up to latest standards, move many procs to named files inside _HELPERS
no idea where to put some of these procs, help is appreciated
made more files to contain some unique code, deleted unsorted.dm, we can rest now
This commit is contained in:
Ghilker
2021-10-05 20:22:57 +01:00
committed by GitHub
parent 51562ac38d
commit b95c0366a4
139 changed files with 1712 additions and 1671 deletions
+4 -4
View File
@@ -939,7 +939,7 @@
"powerCellStatus" = cell ? cell.percent() : null,
"chargeMode" = chargemode,
"chargingStatus" = charging,
"totalLoad" = DisplayPower(lastused_total),
"totalLoad" = display_power(lastused_total),
"coverLocked" = coverlocked,
"siliconUser" = user.has_unlimited_silicon_privilege || user.using_power_flow_console(),
"malfStatus" = get_malf_status(user),
@@ -949,7 +949,7 @@
"powerChannels" = list(
list(
"title" = "Equipment",
"powerLoad" = DisplayPower(lastused_equip),
"powerLoad" = display_power(lastused_equip),
"status" = equipment,
"topicParams" = list(
"auto" = list("eqp" = 3),
@@ -959,7 +959,7 @@
),
list(
"title" = "Lighting",
"powerLoad" = DisplayPower(lastused_light),
"powerLoad" = display_power(lastused_light),
"status" = lighting,
"topicParams" = list(
"auto" = list("lgt" = 3),
@@ -969,7 +969,7 @@
),
list(
"title" = "Environment",
"powerLoad" = DisplayPower(lastused_environ),
"powerLoad" = display_power(lastused_environ),
"status" = environ,
"topicParams" = list(
"auto" = list("env" = 3),
+1 -1
View File
@@ -180,7 +180,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
/obj/structure/cable/proc/get_power_info()
if(powernet?.avail > 0)
return span_danger("Total power: [DisplayPower(powernet.avail)]\nLoad: [DisplayPower(powernet.load)]\nExcess power: [DisplayPower(surplus())]")
return span_danger("Total power: [display_power(powernet.avail)]\nLoad: [display_power(powernet.load)]\nExcess power: [display_power(surplus())]")
else
return span_danger("The cable is not powered.")
+1 -1
View File
@@ -47,7 +47,7 @@
maxcharge = override_maxcharge
charge = maxcharge
if(ratingdesc)
desc += " This one has a rating of [DisplayEnergy(maxcharge)], and you should not swallow it."
desc += " This one has a rating of [display_energy(maxcharge)], and you should not swallow it."
update_appearance()
/obj/item/stock_parts/cell/create_reagents(max_vol, flags)
+1 -1
View File
@@ -113,7 +113,7 @@
t += "<div class='statusDisplay'>"
t += "Output: [DisplayPower(lastgenlev)]"
t += "Output: [display_power(lastgenlev)]"
t += "<BR>"
+3 -3
View File
@@ -98,8 +98,8 @@
data["areas"] = list()
if(connected_powernet)
data["supply"] = DisplayPower(connected_powernet.viewavail)
data["demand"] = DisplayPower(connected_powernet.viewload)
data["supply"] = display_power(connected_powernet.viewavail)
data["demand"] = display_power(connected_powernet.viewload)
for(var/obj/machinery/power/terminal/term in connected_powernet.nodes)
var/obj/machinery/power/apc/A = term.master
if(istype(A))
@@ -111,7 +111,7 @@
data["areas"] += list(list(
"name" = A.area.name,
"charge" = cell_charge,
"load" = DisplayPower(A.lastused_total),
"load" = display_power(A.lastused_total),
"charging" = A.charging,
"eqp" = A.equipment,
"lgt" = A.lighting,
+4 -4
View File
@@ -119,7 +119,7 @@
/obj/machinery/power/port_gen/pacman/examine(mob/user)
. = ..()
. += span_notice("The generator has [sheets] units of [sheet_name] fuel left, producing [DisplayPower(power_gen)] per cycle.")
. += span_notice("The generator has [sheets] units of [sheet_name] fuel left, producing [display_power(power_gen)] per cycle.")
if(anchored)
. += span_notice("It is anchored to the ground.")
if(in_range(user, src) || isobserver(user))
@@ -245,9 +245,9 @@
data["anchored"] = anchored
data["connected"] = (powernet == null ? 0 : 1)
data["ready_to_boot"] = anchored && HasFuel()
data["power_generated"] = DisplayPower(power_gen)
data["power_output"] = DisplayPower(power_gen * power_output)
data["power_available"] = (powernet == null ? 0 : DisplayPower(avail()))
data["power_generated"] = display_power(power_gen)
data["power_output"] = display_power(power_gen * power_output)
data["power_available"] = (powernet == null ? 0 : display_power(avail()))
data["current_heat"] = current_heat
. = data
+1 -1
View File
@@ -160,7 +160,7 @@
// Therefore, its units are joules per SSmachines.wait * 0.1 seconds.
// So joules = stored_energy * SSmachines.wait * 0.1
var/joules = stored_energy * SSmachines.wait * 0.1
. += span_notice("[src]'s display states that it has stored <b>[DisplayJoules(joules)]</b>, and is processing <b>[DisplayPower(RAD_COLLECTOR_OUTPUT)]</b>.")
. += span_notice("[src]'s display states that it has stored <b>[display_joules(joules)]</b>, and is processing <b>[display_power(RAD_COLLECTOR_OUTPUT)]</b>.")
/obj/machinery/power/rad_collector/atom_break(damage_flag)
. = ..()
+1 -1
View File
@@ -130,7 +130,7 @@
. += span_notice("Its status display is glowing faintly.")
else
. += span_notice("Its status display reads: Emitting one beam every <b>[DisplayTimeText(fire_delay)]</b>.")
. += span_notice("Power consumption at <b>[DisplayPower(active_power_usage)]</b>.")
. += span_notice("Power consumption at <b>[display_power(active_power_usage)]</b>.")
/obj/machinery/power/emitter/ComponentInitialize()
. = ..()
+2 -2
View File
@@ -323,13 +323,13 @@
"inputAttempt" = input_attempt,
"inputting" = inputting,
"inputLevel" = input_level,
"inputLevel_text" = DisplayPower(input_level),
"inputLevel_text" = display_power(input_level),
"inputLevelMax" = input_level_max,
"inputAvailable" = input_available,
"outputAttempt" = output_attempt,
"outputting" = outputting,
"outputLevel" = output_level,
"outputLevel_text" = DisplayPower(output_level),
"outputLevel_text" = display_power(output_level),
"outputLevelMax" = output_level_max,
"outputUsed" = output_used,
)
+2 -2
View File
@@ -263,7 +263,7 @@
data["turbine"] = compressor?.turbine ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.machine_stat & BROKEN)) ? TRUE : FALSE
data["online"] = compressor?.starter
data["power"] = DisplayPower(compressor?.turbine?.lastgen)
data["power"] = display_power(compressor?.turbine?.lastgen)
data["rpm"] = compressor?.rpm
data["temp"] = compressor?.gas_contained.temperature
return data
@@ -325,7 +325,7 @@
data["turbine"] = compressor?.turbine ? TRUE : FALSE
data["turbine_broke"] = (!compressor || !compressor.turbine || (compressor.turbine.machine_stat & BROKEN)) ? TRUE : FALSE
data["online"] = compressor?.starter
data["power"] = DisplayPower(compressor?.turbine?.lastgen)
data["power"] = display_power(compressor?.turbine?.lastgen)
data["rpm"] = compressor?.rpm
data["temp"] = compressor?.gas_contained.temperature
return data