From 539b5cc0c80db28a1eac0a8e015a4665b3baa21b Mon Sep 17 00:00:00 2001 From: Atlantiscze Date: Sun, 3 May 2020 23:29:03 +0200 Subject: [PATCH] Implements another batch of feedback --- code/modules/power/batteryrack.dm | 4 +- code/modules/power/debug_items.dm | 24 +++++------ code/modules/power/power.dm | 4 +- code/modules/power/smes.dm | 70 +++++++++++++++---------------- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index 3d73a6890a..d6fe46fa2b 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -261,9 +261,9 @@ return if(istype(W, /obj/item/weapon/cell)) // ID Card, try to insert it. if(insert_cell(W, user)) - to_chat(user, "You insert \the [W] into \the [src].") + to_chat(user, "You insert \the [W] into \the [src].") else - to_chat(user, "\The [src] has no empty slot for \the [W]") + to_chat(user, "\The [src] has no empty slot for \the [W]") /obj/machinery/power/smes/batteryrack/attack_hand(var/mob/user) ui_interact(user) diff --git a/code/modules/power/debug_items.dm b/code/modules/power/debug_items.dm index 2f56fa85d8..6fee9cce22 100644 --- a/code/modules/power/debug_items.dm +++ b/code/modules/power/debug_items.dm @@ -12,15 +12,15 @@ /obj/machinery/power/debug_items/proc/show_info(var/mob/user) if(!powernet) - to_chat(user, "This device is not connected to a powernet") + to_chat(user, "This device is not connected to a powernet") return - to_chat(user, "Connected to powernet: [powernet]") - to_chat(user, "Available power: [num2text(powernet.avail, 20)] W") - to_chat(user, "Load: [num2text(powernet.viewload, 20)] W") - to_chat(user, "Has alert: [powernet.problem ? "YES" : "NO"]") - to_chat(user, "Cables: [powernet.cables.len]") - to_chat(user, "Nodes: [powernet.nodes.len]") + to_chat(user, "Connected to powernet: [powernet]") + to_chat(user, "Available power: [num2text(powernet.avail, 20)] W") + to_chat(user, "Load: [num2text(powernet.viewload, 20)] W") + to_chat(user, "Has alert: [powernet.problem ? "YES" : "NO"]") + to_chat(user, "Cables: [powernet.cables.len]") + to_chat(user, "Nodes: [powernet.nodes.len]") // An infinite power generator. Adds energy to connected cable. @@ -34,7 +34,7 @@ /obj/machinery/power/debug_items/infinite_generator/show_info(var/mob/user) ..() - to_chat(user, "Generator is providing [num2text(power_generation_rate, 20)] W") + to_chat(user, "Generator is providing [num2text(power_generation_rate, 20)] W") // A cable powersink, without the explosion/network alarms normal powersink causes. @@ -49,8 +49,8 @@ /obj/machinery/power/debug_items/infinite_cable_powersink/show_info(var/mob/user) ..() - to_chat(user, "Power sink is demanding [num2text(power_usage_rate, 20)] W") - to_chat(user, "[num2text(last_used, 20)] W was actually used last tick") + to_chat(user, "Power sink is demanding [num2text(power_usage_rate, 20)] W") + to_chat(user, "[num2text(last_used, 20)] W was actually used last tick") /obj/machinery/power/debug_items/infinite_apc_powersink @@ -61,5 +61,5 @@ /obj/machinery/power/debug_items/infinite_apc_powersink/show_info(var/mob/user) ..() - to_chat(user, "Dummy load is using [num2text(active_power_usage, 20)] W") - to_chat(user, "Powered: [powered() ? "YES" : "NO"]") \ No newline at end of file + to_chat(user, "Dummy load is using [num2text(active_power_usage, 20)] W") + to_chat(user, "Powered: [powered() ? "YES" : "NO"]") \ No newline at end of file diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 244aa983cc..91d88d2822 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -35,8 +35,8 @@ /obj/machinery/power/proc/add_avail(var/amount) if(powernet) powernet.newavail += amount - return 1 - return 0 + return TRUE + return FALSE /obj/machinery/power/proc/draw_power(var/amount) if(powernet) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 1bc25d77d1..e655570545 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -207,7 +207,7 @@ //Will return 1 on failure /obj/machinery/power/smes/proc/make_terminal(const/mob/user) if (user.loc == loc) - to_chat(user, "You must not be on the same tile as the [src].") + to_chat(user, "You must not be on the same tile as the [src].") return 1 //Direction the terminal will face to @@ -219,15 +219,15 @@ tempDir = WEST var/turf/tempLoc = get_step(src, reverse_direction(tempDir)) if (istype(tempLoc, /turf/space)) - to_chat(user, "You can't build a terminal on space.") + to_chat(user, "You can't build a terminal on space.") return 1 else if (istype(tempLoc)) if(!tempLoc.is_plating()) - to_chat(user, "You must remove the floor plating first.") + to_chat(user, "You must remove the floor plating first.") return 1 if(check_terminal_exists(tempLoc, user, tempDir)) return 1 - to_chat(user, "You start adding cable to the [src].") + to_chat(user, "You start adding cable to the [src].") if(do_after(user, 50)) if(check_terminal_exists(tempLoc, user, tempDir)) return 1 @@ -242,7 +242,7 @@ /obj/machinery/power/smes/proc/check_terminal_exists(var/turf/location, var/mob/user, var/direction) for(var/obj/machinery/power/terminal/term in location) if(term.dir == direction) - to_chat(user, "There is already a terminal here.") + to_chat(user, "There is already a terminal here.") return 1 return 0 @@ -268,41 +268,41 @@ /obj/machinery/power/smes/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) if(default_deconstruction_screwdriver(user, W)) - return + return FALSE if (!panel_open) - to_chat(user, "You need to open access hatch on [src] first!") - return 0 + to_chat(user, "You need to open access hatch on [src] first!") + return FALSE if(istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W if(!WT.isOn()) - to_chat(user, "Turn on \the [WT] first!") - return 0 + to_chat(user, "Turn on \the [WT] first!") + return FALSE if(!damage) - to_chat(user, "\The [src] is already fully repaired.") - return 0 + to_chat(user, "\The [src] is already fully repaired.") + return FALSE if(WT.remove_fuel(0,user) && do_after(user, damage, src)) - to_chat(user, "You repair all structural damage to \the [src]") + to_chat(user, "You repair all structural damage to \the [src]") damage = 0 - return 0 + return FALSE else if(istype(W, /obj/item/stack/cable_coil) && !building_terminal) building_terminal = 1 var/obj/item/stack/cable_coil/CC = W if (CC.get_amount() < 10) - to_chat(user, "You need more cables.") + to_chat(user, "You need more cables.") building_terminal = 0 - return 0 + return FALSE if (make_terminal(user)) building_terminal = 0 - return 0 + return FALSE building_terminal = 0 CC.use(10) user.visible_message(\ - "[user.name] has added cables to the [src].",\ - "You added cables to the [src].") + "[user.name] has added cables to the [src].",\ + "You added cables to the [src].") stat = 0 - return 0 + return FALSE else if(W.is_wirecutter() && !building_terminal) building_terminal = TRUE @@ -312,15 +312,15 @@ term = T break if(!term) - to_chat(user, "There is no terminal on this tile.") + to_chat(user, "There is no terminal on this tile.") building_terminal = FALSE - return 0 + return FALSE var/turf/tempTDir = get_turf(term) if (istype(tempTDir)) if(!tempTDir.is_plating()) - to_chat(user, "You must remove the floor plating first.") + to_chat(user, "You must remove the floor plating first.") else - to_chat(user, "You begin to cut the cables...") + to_chat(user, "You begin to cut the cables...") playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 50 * W.toolspeed)) if (prob(50) && electrocute_mob(usr, term.powernet, term)) @@ -329,16 +329,16 @@ s.start() building_terminal = FALSE if(usr.stunned) - return 0 + return FALSE new /obj/item/stack/cable_coil(loc,10) user.visible_message(\ - "[user.name] cut the cables and dismantled the power terminal.",\ - "You cut the cables and dismantle the power terminal.") + "[user.name] cut the cables and dismantled the power terminal.",\ + "You cut the cables and dismantle the power terminal.") terminals -= term qdel(term) building_terminal = FALSE - return 0 - return 1 + return FALSE + return TRUE /obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) @@ -427,7 +427,7 @@ amount = max(0, round(amount)) damage += amount if(damage > maxdamage) - visible_message("\The [src] explodes in large rain of sparks and smoke!") + visible_message("\The [src] explodes in large shower of sparks and smoke!") // Depending on stored charge percentage cause damage. switch(Percentage()) if(75 to INFINITY) @@ -460,16 +460,16 @@ /obj/machinery/power/smes/examine(var/mob/user) ..() - user << "The service hatch is [panel_open ? "open" : "closed"]." + to_chat(user, "The service hatch is [panel_open ? "open" : "closed"].") if(!damage) return var/damage_percentage = round((damage / maxdamage) * 100) switch(damage_percentage) if(75 to INFINITY) - to_chat(user, "It's casing is severely damaged, and sparking circuitry may be seen through the holes!") + to_chat(user, "It's casing is severely damaged, and sparking circuitry may be seen through the holes!") if(50 to 74) - to_chat(user, "It's casing is considerably damaged, and some of the internal circuits appear to be exposed!") + to_chat(user, "It's casing is considerably damaged, and some of the internal circuits appear to be exposed!") if(25 to 49) - to_chat(user, "It's casing is quite seriously damaged.") + to_chat(user, "It's casing is quite seriously damaged.") if(0 to 24) - to_chat(user, "It's casing has some minor damage.") \ No newline at end of file + to_chat(user, "It's casing has some minor damage.") \ No newline at end of file