Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions code/game/objects/items/devices/laserpointer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +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))
S.flash_act(affect_silicon = 1)
S.Paralyze(rand(100,200))
to_chat(S, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
outmsg = "<span class='notice'>You overload [S] by shining [src] at [S.p_their()] sensors.</span>"
R.overlay_fullscreen("laserpointer", /obj/screen/fullscreen/flash/static)
R.uneq_all()
R.stop_pulling()
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, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
outmsg = "<span class='notice'>You overload [R] by shining [src] at [R.p_their()] sensors.</span>"
else
outmsg = "<span class='warning'>You fail to overload [S] by shining [src] at [S.p_their()] sensors!</span>"
outmsg = "<span class='warning'>You fail to overload [R] by shining [src] at [R.p_their()] sensors!</span>"

//cameras
else if(istype(target, /obj/machinery/camera))
Expand Down Expand Up @@ -198,4 +202,4 @@
energy = max_energy
recharging = 0
recharge_locked = FALSE
..()
..()
27 changes: 15 additions & 12 deletions code/modules/mob/living/silicon/robot/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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("<span class='warning'>[src] sounds an alarm! \"CRITICAL ERROR: ALL modules OFFLINE.\"</span>")
to_chat(src, "<span class='userdanger'>CRITICAL ERROR: ALL modules OFFLINE.</span>")
if(!quiet)
playsound(src, 'sound/machines/warning-buzzer.ogg', 75, TRUE, TRUE)
audible_message("<span class='warning'>[src] sounds an alarm! \"CRITICAL ERROR: ALL modules OFFLINE.\"</span>")
to_chat(src, "<span class='userdanger'>CRITICAL ERROR: ALL modules OFFLINE.</span>")

if(2)
if(disabled_modules & BORG_MODULE_TWO_DISABLED)
Expand All @@ -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("<span class='warning'>[src] sounds an alarm! \"SYSTEM ERROR: Module [module_num] OFFLINE.\"</span>")
to_chat(src, "<span class='userdanger'>SYSTEM ERROR: Module [module_num] OFFLINE.</span>")
if(!quiet)
playsound(src, 'sound/machines/warning-buzzer.ogg', 60, TRUE, TRUE)
audible_message("<span class='warning'>[src] sounds an alarm! \"SYSTEM ERROR: Module [module_num] OFFLINE.\"</span>")
to_chat(src, "<span class='userdanger'>SYSTEM ERROR: Module [module_num] OFFLINE.</span>")

if(3)
if(disabled_modules & BORG_MODULE_THREE_DISABLED)
Expand All @@ -169,19 +171,20 @@
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("<span class='warning'>[src] sounds an alarm! \"SYSTEM ERROR: Module [module_num] OFFLINE.\"</span>")
to_chat(src, "<span class='userdanger'>SYSTEM ERROR: Module [module_num] OFFLINE.</span>")
if(!quiet)
playsound(src, 'sound/machines/warning-buzzer.ogg', 50, TRUE, TRUE)
audible_message("<span class='warning'>[src] sounds an alarm! \"SYSTEM ERROR: Module [module_num] OFFLINE.\"</span>")
to_chat(src, "<span class='userdanger'>SYSTEM ERROR: Module [module_num] OFFLINE.</span>")

return TRUE


/**
* 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.
Expand Down