diff --git a/code/game/gamemodes/malfunction/malf_hardware.dm b/code/game/gamemodes/malfunction/malf_hardware.dm index 58171ae6d1..da12528712 100644 --- a/code/game/gamemodes/malfunction/malf_hardware.dm +++ b/code/game/gamemodes/malfunction/malf_hardware.dm @@ -19,10 +19,10 @@ /datum/malf_hardware/apu_gen name = "APU Generator" desc = "Auxiliary Power Unit that will keep you operational even without external power. Has to be manually activated. When APU is operational most abilities will be unavailable, and ability research will temporarily stop." - driver = new/datum/game_mode/malfunction/verb/ai_toggle_apu() + driver = /datum/game_mode/malfunction/verb/ai_toggle_apu /datum/malf_hardware/apu_gen/get_examine_desc() - var/msg = "It seems to have some sort of power generator attached to it's core." + var/msg = "It seems to have some sort of power generator attached to its core." if(owner.hardware_integrity() < 50) msg += " It seems to be too damaged to function properly." else if(owner.APU_power) @@ -34,7 +34,7 @@ desc = "Secondary coprocessor that increases amount of generated CPU power by 50%" /datum/malf_hardware/dual_cpu/get_examine_desc() - return "It seems to have additional CPU connected to it's core." + return "It seems to have an additional CPU connected to it's core." /datum/malf_hardware/dual_ram name = "Secondary Memory Bank" @@ -46,10 +46,10 @@ /datum/malf_hardware/core_bomb name = "Self-Destruct Explosives" desc = "High yield explosives are attached to your physical mainframe. This hardware comes with special driver that allows activation of these explosives. Timer is set to 15 seconds after manual activation. This is a doomsday device that will destroy both you and any intruders in your core." - driver = new/datum/game_mode/malfunction/verb/ai_self_destruct() + driver = /datum/game_mode/malfunction/verb/ai_self_destruct /datum/malf_hardware/core_bomb/get_examine_desc() - return "It seems to have grey blocks of unknown substance and some circuitry connected to it's core. [owner.bombing_core ? "Red light is blinking on the circuit." : ""]" + return "It seems to have grey blocks of unknown substance and some circuitry connected to it's core. [owner.bombing_core ? "A red light is blinking on the circuit." : ""]" /datum/malf_hardware/strong_turrets name = "Turrets Focus Enhancer" @@ -61,12 +61,12 @@ /datum/malf_hardware/strong_turrets/install() ..() for(var/obj/machinery/turret/T in machines) - T.maxhealth += 30 - T.shot_delay = 7 // Half of default time. + T.maxhealth = round(initial(T.maxhealth) * 1.4) + T.shot_delay = round(initial(T.shot_delay) / 2) T.auto_repair = 1 - T.active_power_usage = 25000 + T.active_power_usage = round(initial(T.active_power_usage) * 5) for(var/obj/machinery/porta_turret/T in machines) - T.maxhealth += 30 - T.shot_delay = 7 // Half of default time. + T.maxhealth = round(initial(T.maxhealth) * 1.4) + T.shot_delay = round(initial(T.shot_delay) / 2) T.auto_repair = 1 - T.active_power_usage = 25000 \ No newline at end of file + T.active_power_usage = round(initial(T.active_power_usage) * 5) \ No newline at end of file diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm index 34c82f6853..2fffaa3ca8 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm @@ -23,10 +23,13 @@ user.bombing_core = 0 return - var/choice = input("Really destroy core?") in list("YES", "NO") + var/choice = alert("Really destroy core?", "Core self-destruct", "YES", "NO") if(choice != "YES") return + if(!ability_prechecks(user, 0, 1)) + return + user.bombing_core = 1 user << "***** CORE SELF-DESTRUCT SEQUENCE ACTIVATED *****" @@ -79,9 +82,11 @@ user.bombing_station = 0 return - var/choice = input("Really destroy station?") in list("YES", "NO") + var/choice = alert("Really destroy station?", "Station self-destruct", "YES", "NO") if(choice != "YES") return + if(!ability_prechecks(user, 0, 0)) + return user << "***** STATION SELF-DESTRUCT SEQUENCE INITIATED *****" user << "Self-destructing in 2 minutes. Use this command again to abort." user.bombing_station = 1 diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm index 83944b4f9c..441ab6f7cc 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm @@ -47,7 +47,7 @@ error("Hardware without description: [C]") return - var/confirmation = input("[note] - Is this what you want?") in list("Yes", "No") + var/confirmation = alert("[note] - Is this what you want?", "Hardware selection", "Yes", "No") if(confirmation != "Yes") user << "Selection cancelled. Use command again to select" return @@ -65,9 +65,9 @@ set desc = "Opens help window with overview of available hardware, software and other important information." var/mob/living/silicon/ai/user = usr - var/help = file2text("ingame_manuals/malf_ai.txt") + var/help = file2text("ingame_manuals/malf_ai.html") if(!help) - help = "Error loading help (file /ingame_manuals/malf_ai.txt is probably missing). Please report this to server administration staff." + help = "Error loading help (file /ingame_manuals/malf_ai.html is probably missing). Please report this to server administration staff." user << browse(help, "window=malf_ai_help;size=600x500") @@ -151,13 +151,13 @@ var/fulltext = "" switch(user.hack_fails) if(1) - fulltext = "We have detected hack attempt into your [text]. The intruder failed to access anything of importance, but disconnected before we could complete our traces." + fulltext = "We have detected a hack attempt into your [text]. The intruder failed to access anything of importance, but disconnected before we could complete our traces." if(2) - fulltext = "We have detected another hack attempt. It was targeting [text]. The intruder almost gained control of the system, so we had to disconnect them. We partially finished trace and it seems to be originating either from the station, or it's immediate vicinity." + fulltext = "We have detected another hack attempt. It was targeting [text]. The intruder almost gained control of the system, so we had to disconnect them. We partially finished our trace and it seems to be originating either from the station, or its immediate vicinity." if(3) - fulltext = "Another hack attempt has been detected, this time targeting [text]. We are certain the intruder entered the network via terminal located somewhere on the station." + fulltext = "Another hack attempt has been detected, this time targeting [text]. We are certain the intruder entered the network via a terminal located somewhere on the station." if(4) - fulltext = "We have finished our traces and it seems the recent hack attempts are originating from your AI system. We reccomend investigation." + fulltext = "We have finished our traces and it seems the recent hack attempts are originating from your AI system. We recommend investigation." else fulltext = "Another hack attempt has been detected, targeting [text]. The source still seems to be your AI system." @@ -183,6 +183,8 @@ for(var/mob/living/silicon/robot/RB in mob_list) if(istype(RB, /mob/living/silicon/robot/drone)) continue + if(RB in A.connected_robots) + continue L.Add(RB) return L @@ -197,5 +199,7 @@ var/list/L = list() for(var/mob/living/silicon/ai/AT in mob_list) + if(L == A) + continue L.Add(AT) return L diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm index 329734a02c..dbb2694d7f 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm @@ -54,7 +54,7 @@ AP.set_broken() -/datum/game_mode/malfunction/verb/hack_camera(var/obj/machinery/camera/target = null as null|obj in cameranet.cameras) +/datum/game_mode/malfunction/verb/hack_camera(var/obj/machinery/camera/target in cameranet.cameras) set name = "Hack Camera" set desc = "100 CPU - Hacks existing camera, allowing you to add upgrade of your choice to it. Alternatively it lets you reactivate broken camera." set category = "Software" @@ -129,7 +129,7 @@ user.hacking = 0 -/datum/game_mode/malfunction/verb/machine_overload(obj/machinery/M as null|obj in machines) +/datum/game_mode/malfunction/verb/machine_overload(obj/machinery/M in machines) set name = "Machine Overload" set desc = "400 CPU - Causes cyclic short-circuit in machine, resulting in weak explosion after some time." set category = "Software" diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 93bff8e055..eeaaa03c4f 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -173,7 +173,11 @@ var/global/list/engineering_networks = list( assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly)) setPowerUsage() if(!(src in machines)) - machines.Add(src) + if(!machinery_sort_required && ticker) + dd_insertObjectList(machines, src) + else + machines += src + machinery_sort_required = 1 update_coverage() /obj/machinery/camera/proc/setPowerUsage() diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index d73b588ebf..45c6a3816b 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -19,9 +19,9 @@ msg += "Its casing is melted and heat-warped!\n" if (src.getOxyLoss()) if (src.getOxyLoss() > 175) - msg += "It seems to be running on backup power. It's display is blinking \"BACKUP POWER CRITICAL\" warning.\n" + msg += "It seems to be running on backup power. Its display is blinking a \"BACKUP POWER CRITICAL\" warning.\n" else if(src.getOxyLoss() > 100) - msg += "It seems to be running on backup power. It's display is blinking \"BACKUP POWER LOW\" warning.\n" + msg += "It seems to be running on backup power. Its display is blinking a \"BACKUP POWER LOW\" warning.\n" else msg += "It seems to be running on backup power.\n" diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 6d56bc7cb0..225b2bf6ea 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -57,26 +57,26 @@ src.see_in_dark = 8 src.see_invisible = SEE_INVISIBLE_LIVING - if (src:aiRestorePowerRoutine==2) + if (aiRestorePowerRoutine==2) src << "Alert cancelled. Power has been restored without our assistance." - src:aiRestorePowerRoutine = 0 + aiRestorePowerRoutine = 0 src.blind.layer = 0 return - else if (src:aiRestorePowerRoutine==3) + else if (aiRestorePowerRoutine==3) src << "Alert cancelled. Power has been restored." - src:aiRestorePowerRoutine = 0 + aiRestorePowerRoutine = 0 src.blind.layer = 0 return else if (APU_power) - src:aiRestorePowerRoutine = 0 + aiRestorePowerRoutine = 0 src.blind.layer = 0 return else var/area/current_area = get_area(src) if (lacks_power()) - if (src:aiRestorePowerRoutine==0) - src:aiRestorePowerRoutine = 1 + if (aiRestorePowerRoutine==0) + aiRestorePowerRoutine = 1 //Blind the AI @@ -144,7 +144,7 @@ theAPC.operating = 1 theAPC.equipment = 3 theAPC.update() - src:aiRestorePowerRoutine = 3 + aiRestorePowerRoutine = 3 src << "Here are your current laws:" src.show_laws() sleep(50) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 328ae954dc..eac509bf09 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -575,7 +575,7 @@ if(has_electronics==0) has_electronics = 1 user << "You place the power control board inside the frame." - qdel(W) // qdel + qdel(W) else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN))) user << "You cannot put the board inside, the frame is damaged." return diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index 15ac929701..15bfa973ed 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -13,8 +13,8 @@ var/shield_idle_power = 1500 //how much power we use when just being sustained. /obj/machinery/shield/malfai - name = "Emergency Forcefield" - desc = "Weak forcefield which seems to be projected by station's emergency atmosphere containment field" + name = "emergency forcefield" + desc = "A weak forcefield which seems to be projected by the station's emergency atmosphere containment field" health = max_health/2 // Half health, it's not suposed to resist much. /obj/machinery/shield/malfai/process() @@ -23,7 +23,7 @@ /obj/machinery/shield/proc/check_failure() if (src.health <= 0) - visible_message("The [src] dissipates!") + visible_message("\The [src] dissipates!") qdel(src) return @@ -100,7 +100,7 @@ /obj/machinery/shield/hitby(AM as mob|obj) //Let everyone know we've been hit! - visible_message("[src] was hit by [AM].") + visible_message("\[src] was hit by [AM].") //Super realistic, resource-intensive, real-time damage calculations. var/tforce = 0 diff --git a/ingame_manuals/malf_ai.txt b/ingame_manuals/malf_ai.html similarity index 100% rename from ingame_manuals/malf_ai.txt rename to ingame_manuals/malf_ai.html