From e0525bec356b7ab8636f0a58de616cb9e8256b96 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sun, 9 Aug 2015 12:21:52 +0200 Subject: [PATCH 1/5] Fixes #10447. Corrects Icarus' designation. --- code/modules/economy/TradeDestinations.dm | 2 +- code/modules/events/rogue_drones.dm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/economy/TradeDestinations.dm b/code/modules/economy/TradeDestinations.dm index 596276006d0..2f376606d7c 100644 --- a/code/modules/economy/TradeDestinations.dm +++ b/code/modules/economy/TradeDestinations.dm @@ -42,7 +42,7 @@ var/list/weighted_mundaneevent_locations = list() return null /datum/trade_destination/icarus - name = "NMV Icarus" + name = "NDV Icarus" description = "Corvette assigned to patrol NSS Exodus local space." distance = 0.1 willing_to_buy = list() diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index f6a7a3ab710..bc7504dadf5 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -24,11 +24,11 @@ /datum/event/rogue_drone/announce() var/msg if(prob(33)) - msg = "A combat drone wing operating out of the NMV Icarus has failed to return from a sweep of this sector, if any are sighted approach with caution." + msg = "A combat drone wing operating out of the NDV Icarus has failed to return from a sweep of this sector, if any are sighted approach with caution." else if(prob(50)) - msg = "Contact has been lost with a combat drone wing operating out of the NMV Icarus. If any are sighted in the area, approach with caution." + msg = "Contact has been lost with a combat drone wing operating out of the NDV Icarus. If any are sighted in the area, approach with caution." else - msg = "Unidentified hackers have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution." + msg = "Unidentified hackers have targetted a combat drone wing deployed from the NDV Icarus. If any are sighted in the area, approach with caution." command_announcement.Announce(msg, "Rogue drone alert") /datum/event/rogue_drone/end() From d3dbf3c199972e3c6b2d7a19c9029451f127a9d7 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Mon, 10 Aug 2015 21:39:35 +0200 Subject: [PATCH 2/5] Adjusts names of two areas - Messaging Server Room -> Research Server Room - That's the server room near toxins storage/misc. research. It has absolutely nothing to do with messaging, as it houses Research's servers only. - AI Server Room -> Messaging Server Room - That's the actual server room that houses messaging server in central section of the station. --- code/game/area/Space Station 13 areas.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 55cfeaccfb4..2a7799751e8 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -914,7 +914,7 @@ area/space/atmosalert() icon_state = "tcomsatcham" /area/server - name = "\improper Messaging Server Room" + name = "\improper Research Server Room" icon_state = "server" //Crew @@ -1826,7 +1826,7 @@ area/space/atmosalert() ambience = list('sound/ambience/ambimalf.ogg') /area/turret_protected/ai_server_room - name = "AI Server Room" + name = "Messaging Server Room" icon_state = "ai_server" /area/turret_protected/ai From 7297535750e8f8a7334e5ee1f123d51e02e3e744 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Mon, 10 Aug 2015 22:39:22 +0200 Subject: [PATCH 3/5] Fixes mistake in turret code - Turrets no longer freeze any EMP that hits them for 6-60 seconds. --- code/game/machinery/portable_turret.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 8c04da619b8..12148aa6a93 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -388,9 +388,9 @@ emagged = 1 on=0 - sleep(rand(60,600)) - if(!on) - on=1 + spawn(rand(60,600)) + if(!on) + on=1 ..() From 40cb786986479dc23815c80be4b8ff8f2bca0e01 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Mon, 10 Aug 2015 22:58:33 +0200 Subject: [PATCH 4/5] Adds EMP monitoring for future EMP debugging - Adds possibility to enable EMP debugging, that monitors how long emp_act() took on object. If it took too long (configurable) it generates a message. It is disabled by default due to possible performance loss with large EMPs. --- code/game/objects/empulse.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm index 8bff463e445..cc7f7822347 100644 --- a/code/game/objects/empulse.dm +++ b/code/game/objects/empulse.dm @@ -1,3 +1,9 @@ +// Uncomment this define to check for possible lengthy processing of emp_act()s. +// If emp_act() takes more than defined deciseconds (1/10 seconds) an admin message and log is created. +// I do not recommend having this uncommented on main server, it probably causes a bit more lag, espicially with larger EMPs. + +// #define EMPDEBUG 10 + proc/empulse(turf/epicenter, heavy_range, light_range, log=0) if(!epicenter) return @@ -24,6 +30,9 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0) M << 'sound/effects/EMPulse.ogg' for(var/atom/T in range(light_range, epicenter)) + #ifdef EMPDEBUG + var/time = world.timeofday + #endif var/distance = get_dist(epicenter, T) if(distance < 0) distance = 0 @@ -36,4 +45,8 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0) T.emp_act(2) else if(distance <= light_range) T.emp_act(2) + #ifdef EMPDEBUG + if((world.timeofday - time) >= EMPDEBUG) + log_and_message_admins("EMPDEBUG: [T.name] - [T.type] - took [world.timeofday - time]ds to process emp_act()!") + #endif return 1 \ No newline at end of file From dd79e0f481b13f312711345058b27699530910cf Mon Sep 17 00:00:00 2001 From: Atlantis Date: Mon, 10 Aug 2015 23:04:37 +0200 Subject: [PATCH 5/5] Fixes lengthy emp_act() for turret controllers and doors. - Turret controllers were the same as turrets. Now completely fixes #10446 - Doors also had 10ds sleep() in them, hidden under small probability roll. Fixed. --- code/game/machinery/doors/door.dm | 3 ++- code/game/machinery/turret_control.dm | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 8c8f3cd9647..4abb68486b4 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -320,7 +320,8 @@ /obj/machinery/door/emp_act(severity) if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) ) - open() + spawn(0) + open() if(prob(40/severity)) if(secondsElectrified == 0) secondsElectrified = -1 diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index 41a98103be3..87021ba6956 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -245,9 +245,9 @@ enabled=0 updateTurrets() - sleep(rand(60,600)) - if(!enabled) - enabled=1 - updateTurrets() + spawn(rand(60,600)) + if(!enabled) + enabled=1 + updateTurrets() ..()