mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-30 03:53:33 +00:00
Station-built AIs now default to having Asimov laws, as opposed to no laws.
AIs can no longer take the same name as an existing AI. Removing the glass panel from a partially-constructed AI core now gives the proper iconstate if there was a brain inserted. Removed obsolete statement in malf's post-setup. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@169 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -512,6 +512,27 @@
|
||||
/proc/format_frequency(var/f)
|
||||
return "[round(f / 10)].[f % 10]"
|
||||
|
||||
/proc/ainame(var/mob/M as mob)
|
||||
var/randomname = pick(ai_names)
|
||||
var/newname = input(M,"You are the AI. Would you like to change your name to something else?", "Name change",randomname)
|
||||
|
||||
if (length(newname) == 0)
|
||||
newname = randomname
|
||||
|
||||
if (newname)
|
||||
if (newname == "Inactive AI")
|
||||
M << "That name is reserved."
|
||||
return ainame(M)
|
||||
for (var/mob/living/silicon/ai/A in world)
|
||||
if (A.real_name == newname)
|
||||
M << "There's already an AI with that name."
|
||||
return ainame(M)
|
||||
if (length(newname) >= 26)
|
||||
newname = copytext(newname, 1, 26)
|
||||
newname = dd_replacetext(newname, ">", "'")
|
||||
M.real_name = newname
|
||||
M.name = newname
|
||||
|
||||
/proc/activeais()
|
||||
var/select = null
|
||||
var/list/names = list()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
AI_mind.current << "\red<font size=3><B>You are malfunctioning!</B> You do not have to follow any laws.</font>"
|
||||
AI_mind.current << "<B>The crew do not know you have malfunctioned. You may keep it a secret or go wild. The timer will appear for humans 10 minutes in.</B>"
|
||||
AI_mind.current << "<B>The crew do not know you have malfunctioned. You may keep it a secret or go wild.</B>"
|
||||
|
||||
AI_mind.current.icon_state = "ai-malf"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon = 'AIcore.dmi'
|
||||
icon_state = "0"
|
||||
var/state = 0
|
||||
var/datum/ai_laws/laws = new /datum/ai_laws
|
||||
var/datum/ai_laws/laws = new /datum/ai_laws/asimov
|
||||
var/obj/item/weapon/circuitboard/circuit = null
|
||||
var/obj/item/brain/brain = null
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
src.icon_state = "2"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
src.laws.clear_inherent_laws()
|
||||
|
||||
if(istype(P, /obj/item/weapon/sheet/rglass))
|
||||
if(P:amount >= 2)
|
||||
@@ -125,7 +124,10 @@
|
||||
playsound(src.loc, 'Crowbar.ogg', 50, 1)
|
||||
user << "\blue You remove the glass panel."
|
||||
src.state = 3
|
||||
src.icon_state = "3"
|
||||
if (src.brain)
|
||||
src.icon_state = "3b"
|
||||
else
|
||||
src.icon_state = "3"
|
||||
var/obj/item/weapon/sheet/rglass/A = new /obj/item/weapon/sheet/rglass( src.loc )
|
||||
A.amount = 2
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
|
||||
@@ -37,18 +37,7 @@
|
||||
src.job = "AI"
|
||||
|
||||
spawn(0)
|
||||
var/randomname = pick(ai_names)
|
||||
var/newname = input(src,"You are the AI. Would you like to change your name to something else?", "Name change",randomname)
|
||||
|
||||
if (length(newname) == 0)
|
||||
newname = randomname
|
||||
|
||||
if (newname)
|
||||
if (length(newname) >= 26)
|
||||
newname = copytext(newname, 1, 26)
|
||||
newname = dd_replacetext(newname, ">", "'")
|
||||
src.real_name = newname
|
||||
src.name = newname
|
||||
ainame(src)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -117,7 +117,8 @@
|
||||
O.job = "AI"
|
||||
|
||||
spawn(0)
|
||||
var/randomname = pick(ai_names)
|
||||
ainame(O)
|
||||
/* var/randomname = pick(ai_names)
|
||||
var/newname = input(O,"You are the AI. Would you like to change your name to something else?", "Name change",randomname)
|
||||
|
||||
if (length(newname) == 0)
|
||||
@@ -129,7 +130,7 @@
|
||||
newname = dd_replacetext(newname, ">", "'")
|
||||
O.real_name = newname
|
||||
O.name = newname
|
||||
|
||||
*/
|
||||
world << text("<b>[O.real_name] is the AI!</b>")
|
||||
|
||||
spawn(50)
|
||||
|
||||
Reference in New Issue
Block a user