Skip to content

Commit

Permalink
Fixes a *potential* exploit
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 authored and clusterfack committed Apr 2, 2016
1 parent c9096aa commit a8c2b16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions code/game/machinery/computer/law.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

if (current.stat == 2 || current.control_disabled == 1)
to_chat(usr, "Upload failed. No signal is being detected from the AI.")
else if (current.see_in_dark == 0)
else if (current.aiRestorePowerRoutine)
to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.")
else
// Modules should throw their own errors.
Expand All @@ -52,7 +52,7 @@
return 0
if(!M.upload(current.laws,current,user))
return 0
return 1
return 1

proc/announce_law_changes(var/mob/user)
to_chat(current, "These are your laws now:")
Expand Down Expand Up @@ -87,7 +87,7 @@

if (current.stat == 2 || current.control_disabled == 1)
to_chat(usr, "Upload failed. No signal is being detected from the AI.")
else if (current.see_in_dark == 0)
else if (current.aiRestorePowerRoutine)
to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.")
else
var/obj/item/weapon/planning_frame/frame=O
Expand Down Expand Up @@ -243,4 +243,3 @@
else
to_chat(usr, "[src.current.name] selected for law changes.")
return

2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/ai_modules/AI_modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ Refactored AI modules by N3X15
/obj/item/weapon/aiModule/keeper/validate(var/datum/ai_laws/laws, var/atom/target, var/mob/sender)
..()
to_chat(sender, "<span class='warning'>How the fuck did you get this?</span>")
return 0
return 0

0 comments on commit a8c2b16

Please sign in to comment.