mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Make sure RD can't blow borgs or fuck with AI
This commit is contained in:
@@ -88,9 +88,9 @@ datum/game_mode/nations
|
||||
H << "You are now part of the great sovereign nation of [H.mind.nation.name]!"
|
||||
continue
|
||||
|
||||
if(H.mind.assigned_role in civilian_positions)
|
||||
H << "You do not belong to any nation and are free to sell your services to the highest bidder."
|
||||
continue
|
||||
if(H.mind.assigned_role in civilian_positions)
|
||||
H << "You do not belong to any nation and are free to sell your services to the highest bidder."
|
||||
continue
|
||||
|
||||
else
|
||||
message_admins("[H.name] with [H.mind.assigned_role] could not find any nation to assign!")
|
||||
|
||||
@@ -19,12 +19,17 @@
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/computer/aifixer/attack_ai(var/mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/aifixer/attack_hand(var/mob/user as mob)
|
||||
ui_interact(user)
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode)
|
||||
ui_interact(user)
|
||||
else
|
||||
if(mode.kickoff)
|
||||
user << "<span class='warning'>You have been locked out from this console!</span>"
|
||||
|
||||
/obj/machinery/computer/aifixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
@@ -36,13 +41,13 @@
|
||||
data["active"] = active
|
||||
data["wireless"] = occupant.control_disabled
|
||||
data["radio"] = occupant.aiRadio.disabledAi
|
||||
|
||||
|
||||
var/laws[0]
|
||||
for (var/datum/ai_law/law in occupant.laws.all_laws())
|
||||
laws.Add(list(list("law" = law.law, "number" = law.get_index())))
|
||||
|
||||
laws.Add(list(list("law" = law.law, "number" = law.get_index())))
|
||||
|
||||
data["laws"] = laws
|
||||
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
@@ -54,7 +59,7 @@
|
||||
/obj/machinery/computer/aifixer/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
|
||||
if(href_list["fix"])
|
||||
src.active = 1
|
||||
while (src.occupant.health < 100)
|
||||
@@ -71,12 +76,12 @@
|
||||
sleep(10)
|
||||
src.active = 0
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
if(href_list["wireless"])
|
||||
|
||||
if(href_list["wireless"])
|
||||
var/wireless = text2num(href_list["wireless"])
|
||||
if(wireless == 0 || wireless == 1)
|
||||
occupant.control_disabled = wireless
|
||||
|
||||
|
||||
if(href_list["radio"])
|
||||
var/radio = text2num(href_list["radio"])
|
||||
if(radio == 0 || radio == 1)
|
||||
@@ -93,16 +98,16 @@
|
||||
else
|
||||
var/overlay_layer = LIGHTING_LAYER+0.2 // +0.1 from the default computer overlays
|
||||
if(active)
|
||||
overlays += image(icon,"ai-fixer-on",overlay_layer)
|
||||
overlays += image(icon,"ai-fixer-on",overlay_layer)
|
||||
if (occupant)
|
||||
switch (occupant.stat)
|
||||
if (0)
|
||||
overlays += image(icon,"ai-fixer-full",overlay_layer)
|
||||
overlays += image(icon,"ai-fixer-full",overlay_layer)
|
||||
if (2)
|
||||
overlays += image(icon,"ai-fixer-404",overlay_layer)
|
||||
overlays += image(icon,"ai-fixer-404",overlay_layer)
|
||||
else
|
||||
overlays += image(icon,"ai-fixer-empty",overlay_layer)
|
||||
|
||||
overlays += image(icon,"ai-fixer-empty",overlay_layer)
|
||||
|
||||
/obj/machinery/computer/aifixer/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/device/aicard/card)
|
||||
if(!..())
|
||||
return
|
||||
@@ -114,7 +119,7 @@
|
||||
AI.loc = src
|
||||
occupant = AI
|
||||
AI.control_disabled = 1
|
||||
AI.aiRadio.disabledAi = 1
|
||||
AI.aiRadio.disabledAi = 1
|
||||
AI << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
|
||||
user << "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
update_icon()
|
||||
@@ -130,4 +135,3 @@
|
||||
user << "<span class='boldannounce'>ERROR</span>: Reconstruction in progress."
|
||||
else if (!occupant)
|
||||
user << "<span class='boldannounce'>ERROR</span>: Unable to locate artificial intelligence."
|
||||
|
||||
@@ -9,20 +9,25 @@
|
||||
var/temp = null
|
||||
|
||||
light_color = LIGHT_COLOR_PURPLE
|
||||
|
||||
|
||||
var/safety = 1
|
||||
|
||||
/obj/machinery/computer/robotics/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/robotics/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
var/datum/game_mode/nations/mode = get_nations_mode()
|
||||
if(!mode)
|
||||
ui_interact(user)
|
||||
else
|
||||
if(mode.kickoff)
|
||||
user << "<span class='warning'>You have been locked out from this console!</span>"
|
||||
|
||||
|
||||
/obj/machinery/computer/robotics/proc/is_authenticated(var/mob/user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 1
|
||||
@@ -51,7 +56,7 @@
|
||||
/obj/machinery/computer/robotics/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
|
||||
var/mob/user = usr
|
||||
if(!is_authenticated(user))
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
@@ -127,7 +132,7 @@
|
||||
if(!istype(user, /mob/living/silicon/ai) || !(user.mind.special_role && user.mind.original == user))
|
||||
user << "<span class='warning'>Access Denied.</span>"
|
||||
return
|
||||
|
||||
|
||||
if(target.connected_ai != user)
|
||||
user << "<span class='warning'>Access Denied. This robot is not linked to you.</span>"
|
||||
return
|
||||
@@ -167,8 +172,8 @@
|
||||
return
|
||||
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] detonated all cyborgs!</span>")
|
||||
log_game("\<span class='notice'>[key_name(usr)] detonated all cyborgs!</span>")
|
||||
|
||||
log_game("\<span class='notice'>[key_name(usr)] detonated all cyborgs!</span>")
|
||||
|
||||
for(var/mob/living/silicon/robot/R in mob_list)
|
||||
if(istype(R, /mob/living/silicon/robot/drone))
|
||||
continue
|
||||
@@ -179,7 +184,7 @@
|
||||
if(R.connected_ai)
|
||||
R.connected_ai << "<br><br><span class='alert'>ALERT - Cyborg detonation detected: [R.name]</span><br>"
|
||||
spawn(10)
|
||||
R.self_destruct()
|
||||
R.self_destruct()
|
||||
|
||||
// Proc: get_cyborgs()
|
||||
// Parameters: 1 (operator - mob which is operating the console.)
|
||||
|
||||
Reference in New Issue
Block a user