_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
+1 -1
View File
@@ -24,7 +24,7 @@
if(A.always_unpowered)
to_chat(user, span_warning("You cannot place [src] in this area!"))
return
if(gotwallitem(T, ndir, inverse*2))
if(got_wall_item(T, ndir, inverse*2))
to_chat(user, span_warning("There's already an item on this wall!"))
return
+2 -2
View File
@@ -274,7 +274,7 @@ Code:
var/obj/machinery/power/apc/A = term.master
L += A
menu += "<PRE>Location: [get_area_name(powmonitor, TRUE)]<BR>Total power: [DisplayPower(connected_powernet.viewavail)]<BR>Total load: [DisplayPower(connected_powernet.viewload)]<BR>"
menu += "<PRE>Location: [get_area_name(powmonitor, TRUE)]<BR>Total power: [display_power(connected_powernet.viewavail)]<BR>Total load: [display_power(connected_powernet.viewload)]<BR>"
menu += "<FONT SIZE=-1>"
@@ -290,7 +290,7 @@ Code:
//would be to use <span style="width: NNNpx; overflow: none;">[A.area.name]</span>
for(var/obj/machinery/power/apc/A in L)
menu += copytext_char(add_trailing(A.area.name, 30, " "), 1, 30)
menu += " [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_leading(DisplayPower(A.lastused_total), 6, " ")] [A.cell ? "[add_leading(round(A.cell.percent()), 3, " ")]% [chg[A.charging+1]]" : " N/C"]<BR>"
menu += " [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_leading(display_power(A.lastused_total), 6, " ")] [A.cell ? "[add_leading(round(A.cell.percent()), 3, " ")]% [chg[A.charging+1]]" : " N/C"]<BR>"
menu += "</FONT></PRE>"
@@ -66,7 +66,7 @@
charges--
var/difficulty = 0
if(target.cartridge)
difficulty += BitCount(target.cartridge.access&(CART_MEDICAL | CART_SECURITY | CART_ENGINE | CART_CLOWN | CART_JANITOR | CART_MANIFEST))
difficulty += bit_count(target.cartridge.access&(CART_MEDICAL | CART_SECURITY | CART_ENGINE | CART_CLOWN | CART_JANITOR | CART_MANIFEST))
if(target.cartridge.access & CART_MANIFEST)
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
if(SEND_SIGNAL(target, COMSIG_PDA_CHECK_DETONATE) & COMPONENT_PDA_NO_DETONATE || prob(difficulty * 15))
@@ -29,7 +29,7 @@
to_chat(R, span_warning("You need a power cell installed for that."))
return
if(!R.cell.use(circuit_cost))
to_chat(R, span_warning("You don't have the energy for that (you need [DisplayEnergy(circuit_cost)].)"))
to_chat(R, span_warning("You don't have the energy for that (you need [display_energy(circuit_cost)].)"))
return
if(recharging)
to_chat(R, span_warning("[src] needs some time to recharge first."))
+1 -1
View File
@@ -83,7 +83,7 @@
if(user && user.get_active_held_item() == src) // Make sure our user is still holding us
var/turf/target_turf = get_turf(target)
if(target_turf)
var/turflist = getline(user, target_turf)
var/turflist = get_line(user, target_turf)
log_combat(user, target, "flamethrowered", src)
flame_turf(turflist)
+1 -1
View File
@@ -159,7 +159,7 @@
/obj/item/inducer/examine(mob/living/M)
. = ..()
if(cell)
. += span_notice("Its display shows: [DisplayEnergy(cell.charge)].")
. += span_notice("Its display shows: [display_energy(cell.charge)].")
else
. += span_notice("Its display is dark.")
if(opened)
+1 -1
View File
@@ -124,7 +124,7 @@
user.put_in_hands(P)
I.forceMove(P)
var/size = round(I.w_class)
P.name = "[weightclass2text(size)] parcel"
P.name = "[weight_class_to_text(size)] parcel"
P.w_class = size
size = min(size, 5)
P.icon_state = "deliverypackage[size]"
+1 -1
View File
@@ -108,7 +108,7 @@
/obj/item/storage/toolbox/mechanical/old/clean/proc/calc_damage()
var/power = 0
for (var/obj/item/stack/telecrystal/TC in GetAllContents())
for (var/obj/item/stack/telecrystal/TC in get_all_contents())
power += TC.amount
force = 19 + power
throwforce = 22 + power
+1 -1
View File
@@ -113,7 +113,7 @@
user_interact_cooldowns[user.real_name] = world.time + COOLDOWN_INTERACT
for(var/obj/item/pinpointer/wayfinding/held_pinpointer in user.GetAllContents())
for(var/obj/item/pinpointer/wayfinding/held_pinpointer in user.get_all_contents())
set_expression("veryhappy", 2 SECONDS)
say("You already have a pinpointer!")
return