From 2c025caaf4e945467d976890ad2c3a23cdc144b3 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sun, 18 Jul 2021 16:43:12 +0100
Subject: [PATCH 1/7] Update laserpointer.dm
---
code/game/objects/items/devices/laserpointer.dm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 175bb504bf4f..ecc1bcbc1b6f 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -120,8 +120,9 @@
log_combat(user, S, "shone in the sensors", src)
//chance to actually hit the eyes depends on internal component
if(prob(effectchance * diode.rating))
- S.flash_act(affect_silicon = 1)
- S.Paralyze(rand(100,200))
+ S.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
+ S.uneq_all()
+ addtimer(CALLBACK(S, .proc/clear_fullscreen, "laserpointer", 5 SECONDS))
to_chat(S, "Your sensors were overloaded by a laser!")
outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors."
else
@@ -198,4 +199,4 @@
energy = max_energy
recharging = 0
recharge_locked = FALSE
- ..()
\ No newline at end of file
+ ..()
From 94d8f8eb9dceb7a5f070fad6e30dd5e639af03d8 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sun, 18 Jul 2021 16:48:05 +0100
Subject: [PATCH 2/7] Pulling bad
---
code/game/objects/items/devices/laserpointer.dm | 1 +
1 file changed, 1 insertion(+)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index ecc1bcbc1b6f..853e37e1837d 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -122,6 +122,7 @@
if(prob(effectchance * diode.rating))
S.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
S.uneq_all()
+ S.stop_pulling()
addtimer(CALLBACK(S, .proc/clear_fullscreen, "laserpointer", 5 SECONDS))
to_chat(S, "Your sensors were overloaded by a laser!")
outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors."
From 8323fc8bf42349c9b6c41e5edfdbd4b0b0856e71 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sun, 18 Jul 2021 16:50:33 +0100
Subject: [PATCH 3/7] Fix
---
code/game/objects/items/devices/laserpointer.dm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 853e37e1837d..7ebf416bc120 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -120,10 +120,11 @@
log_combat(user, S, "shone in the sensors", src)
//chance to actually hit the eyes depends on internal component
if(prob(effectchance * diode.rating))
- S.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
- S.uneq_all()
- S.stop_pulling()
- addtimer(CALLBACK(S, .proc/clear_fullscreen, "laserpointer", 5 SECONDS))
+ var/mob/living/silicon/robot/R = S
+ R.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
+ R.uneq_all()
+ R.stop_pulling()
+ addtimer(CALLBACK(S, R.clear_fullscreen, "laserpointer", 5 SECONDS))
to_chat(S, "Your sensors were overloaded by a laser!")
outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors."
else
From 550f24acec3253b3d24bd6dcfbc6b8e3b0f454be Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sun, 18 Jul 2021 17:13:20 +0100
Subject: [PATCH 4/7] eeee
---
code/game/objects/items/devices/laserpointer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 7ebf416bc120..d5ad20472c4a 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -124,7 +124,7 @@
R.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
R.uneq_all()
R.stop_pulling()
- addtimer(CALLBACK(S, R.clear_fullscreen, "laserpointer", 5 SECONDS))
+ addtimer(CALLBACK(S, R.clear_fullscreen(), "laserpointer", 5 SECONDS))
to_chat(S, "Your sensors were overloaded by a laser!")
outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors."
else
From ac5bce69b093a077729f23d5ed8f88de059eddbf Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sun, 18 Jul 2021 19:06:32 +0100
Subject: [PATCH 5/7] FIX
---
code/game/objects/items/devices/laserpointer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index d5ad20472c4a..780ccaecf39f 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -124,7 +124,7 @@
R.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
R.uneq_all()
R.stop_pulling()
- addtimer(CALLBACK(S, R.clear_fullscreen(), "laserpointer", 5 SECONDS))
+ addtimer(CALLBACK(R, R.clear_fullscreen(), "laserpointer", 5 SECONDS))
to_chat(S, "Your sensors were overloaded by a laser!")
outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors."
else
From 0475e8baf1cde54f31408a47303ba42a9a2e95a0 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sun, 18 Jul 2021 20:16:02 +0100
Subject: [PATCH 6/7] FIX
---
code/game/objects/items/devices/laserpointer.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 780ccaecf39f..18df5b796639 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -124,7 +124,7 @@
R.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
R.uneq_all()
R.stop_pulling()
- addtimer(CALLBACK(R, R.clear_fullscreen(), "laserpointer", 5 SECONDS))
+ addtimer(CALLBACK(R, /mob/living/silicon/robot/.proc/clear_fullscreen, "laserpointer"), 5 SECONDS)
to_chat(S, "Your sensors were overloaded by a laser!")
outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors."
else
From c254f5ec77a9e0f94b8c3f6e924196ffa41caf78 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sat, 24 Jul 2021 11:20:05 +0100
Subject: [PATCH 7/7] Take two
---
.../objects/items/devices/laserpointer.dm | 15 ++++++-----
.../mob/living/silicon/robot/inventory.dm | 27 ++++++++++---------
2 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 18df5b796639..2f3b455d5fee 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -116,19 +116,20 @@
//robots
else if(iscyborg(target))
- var/mob/living/silicon/S = target
- log_combat(user, S, "shone in the sensors", src)
+ var/mob/living/silicon/robot/R = target
+ log_combat(user, R, "shone in the sensors", src)
//chance to actually hit the eyes depends on internal component
if(prob(effectchance * diode.rating))
- var/mob/living/silicon/robot/R = S
R.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
R.uneq_all()
R.stop_pulling()
- addtimer(CALLBACK(R, /mob/living/silicon/robot/.proc/clear_fullscreen, "laserpointer"), 5 SECONDS)
- to_chat(S, "Your sensors were overloaded by a laser!")
- outmsg = "You overload [S] by shining [src] at [S.p_their()] sensors."
+ R.break_all_cyborg_slots(TRUE)
+ addtimer(CALLBACK(R, /mob/living/silicon/robot/.proc/clear_fullscreen, "laserpointer"), 7 SECONDS)
+ addtimer(CALLBACK(R, /mob/living/silicon/robot/.proc/repair_all_cyborg_slots), 7 SECONDS)
+ to_chat(R, "Your sensors were overloaded by a laser!")
+ outmsg = "You overload [R] by shining [src] at [R.p_their()] sensors."
else
- outmsg = "You fail to overload [S] by shining [src] at [S.p_their()] sensors!"
+ outmsg = "You fail to overload [R] by shining [src] at [R.p_their()] sensors!"
//cameras
else if(istype(target, /obj/machinery/camera))
diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm
index cb6214a209d1..94bc5f615d80 100644
--- a/code/modules/mob/living/silicon/robot/inventory.dm
+++ b/code/modules/mob/living/silicon/robot/inventory.dm
@@ -131,7 +131,7 @@
* Arguments
* * module_num - the slot number being repaired.
*/
-/mob/living/silicon/robot/proc/break_cyborg_slot(module_num)
+/mob/living/silicon/robot/proc/break_cyborg_slot(module_num, quiet)
if(is_invalid_module_number(module_num, TRUE))
return FALSE
@@ -147,9 +147,10 @@
inv1.icon_state = "[initial(inv1.icon_state)] +b"
disabled_modules |= BORG_MODULE_ALL_DISABLED
- playsound(src, 'sound/machines/warning-buzzer.ogg', 75, TRUE, TRUE)
- audible_message("[src] sounds an alarm! \"CRITICAL ERROR: ALL modules OFFLINE.\"")
- to_chat(src, "CRITICAL ERROR: ALL modules OFFLINE.")
+ if(!quiet)
+ playsound(src, 'sound/machines/warning-buzzer.ogg', 75, TRUE, TRUE)
+ audible_message("[src] sounds an alarm! \"CRITICAL ERROR: ALL modules OFFLINE.\"")
+ to_chat(src, "CRITICAL ERROR: ALL modules OFFLINE.")
if(2)
if(disabled_modules & BORG_MODULE_TWO_DISABLED)
@@ -158,9 +159,10 @@
inv2.icon_state = "[initial(inv2.icon_state)] +b"
disabled_modules |= BORG_MODULE_TWO_DISABLED
- playsound(src, 'sound/machines/warning-buzzer.ogg', 60, TRUE, TRUE)
- audible_message("[src] sounds an alarm! \"SYSTEM ERROR: Module [module_num] OFFLINE.\"")
- to_chat(src, "SYSTEM ERROR: Module [module_num] OFFLINE.")
+ if(!quiet)
+ playsound(src, 'sound/machines/warning-buzzer.ogg', 60, TRUE, TRUE)
+ audible_message("[src] sounds an alarm! \"SYSTEM ERROR: Module [module_num] OFFLINE.\"")
+ to_chat(src, "SYSTEM ERROR: Module [module_num] OFFLINE.")
if(3)
if(disabled_modules & BORG_MODULE_THREE_DISABLED)
@@ -169,9 +171,10 @@
inv3.icon_state = "[initial(inv3.icon_state)] +b"
disabled_modules |= BORG_MODULE_THREE_DISABLED
- playsound(src, 'sound/machines/warning-buzzer.ogg', 50, TRUE, TRUE)
- audible_message("[src] sounds an alarm! \"SYSTEM ERROR: Module [module_num] OFFLINE.\"")
- to_chat(src, "SYSTEM ERROR: Module [module_num] OFFLINE.")
+ if(!quiet)
+ playsound(src, 'sound/machines/warning-buzzer.ogg', 50, TRUE, TRUE)
+ audible_message("[src] sounds an alarm! \"SYSTEM ERROR: Module [module_num] OFFLINE.\"")
+ to_chat(src, "SYSTEM ERROR: Module [module_num] OFFLINE.")
return TRUE
@@ -179,9 +182,9 @@
/**
* Breaks all of a cyborg's slots.
*/
-/mob/living/silicon/robot/proc/break_all_cyborg_slots()
+/mob/living/silicon/robot/proc/break_all_cyborg_slots(quiet)
for(var/cyborg_slot in 1 to 3)
- break_cyborg_slot(cyborg_slot)
+ break_cyborg_slot(cyborg_slot, quiet)
/**
* Repairs the slot number, updating the icon.