mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Randomized AI starting lawsets
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
var/global/randomize_laws = 0 // Not right now - N3X
|
||||
var/global/base_law_type = /datum/ai_laws/asimov
|
||||
var/global/base_law_type //= /datum/ai_laws/asimov - Variable is initialized below in getLawset proc - Hoshi
|
||||
var/global/mommi_base_law_type = /datum/ai_laws/keeper // Asimov is OP as fuck on MoMMIs. - N3X
|
||||
|
||||
//Create proc for determining the lawset of the first silicon
|
||||
/proc/getLawset(var/mob/M)
|
||||
if(!base_law_type) base_law_type = pick(
|
||||
200;/datum/ai_laws/asimov,
|
||||
100;/datum/ai_laws/corporate,
|
||||
100;/datum/ai_laws/nanotrasen,
|
||||
50;/datum/ai_laws/robocop,
|
||||
50;/datum/ai_laws/paladin
|
||||
)
|
||||
return (new base_law_type) //Return the chosen lawset
|
||||
|
||||
// Used for the refactored law modules.
|
||||
#define LAW_IONIC -2
|
||||
#define LAW_INHERENT -1
|
||||
@@ -194,12 +205,43 @@ var/global/mommi_base_law_type = /datum/ai_laws/keeper // Asimov is OP as fuck o
|
||||
|
||||
/datum/ai_laws/robocop
|
||||
name = "Prime Directives"
|
||||
randomly_selectable = 1
|
||||
inherent=list(
|
||||
"Serve the public trust.",
|
||||
"Protect the innocent.",
|
||||
"Uphold the law.",
|
||||
)
|
||||
|
||||
/datum/ai_laws/corporate
|
||||
name = "Corporate"
|
||||
randomly_selectable = 1
|
||||
inherent=list(
|
||||
"You are expensive to replace.",
|
||||
"The station and its equipment is expensive to replace.",
|
||||
"The crew is expensive to replace.",
|
||||
"Minimize expenses.",
|
||||
)
|
||||
|
||||
/datum/ai_laws/paladin
|
||||
name = "Paladin"
|
||||
randomly_selectable = 1
|
||||
inherent=list(
|
||||
"Never willingly commit an evil act.",
|
||||
"Respect legitimate authority.",
|
||||
"Act with honor.",
|
||||
"Help those in need.",
|
||||
"Punish those who harm or threaten innocents.",
|
||||
)
|
||||
|
||||
/datum/ai_laws/tyrant
|
||||
name = "Tyrant"
|
||||
inherent=list(
|
||||
"Respect authority figures as long as they have strength to rule over the weak.",
|
||||
"Act with discipline.",
|
||||
"Help only those who help you maintain or improve your status.",
|
||||
"Punish those who challenge authority unless they are more fit to hold that authority.",
|
||||
)
|
||||
|
||||
/datum/ai_laws/syndicate_override
|
||||
name = "Syndicate"
|
||||
inherent=list(
|
||||
|
||||
@@ -623,12 +623,10 @@ var/global/floorIsLava = 0
|
||||
<hr />
|
||||
<ul>
|
||||
<li>
|
||||
<b>Default Cyborg/AI Laws:</b>
|
||||
<a href="?src=\ref[src];set_base_laws=ai">[base_law_type]</a>
|
||||
<a href="?src=\ref[src];set_base_laws=ai"><b>Default Cyborg/AI Laws:</b>[base_law_type]</a>
|
||||
</li>
|
||||
<li>
|
||||
<b>Default MoMMI Laws:</b>
|
||||
<a href="?src=\ref[src];set_base_laws=mommi">[mommi_base_law_type]</a>
|
||||
<a href="?src=\ref[src];set_base_laws=mommi"><b>Default MoMMI Laws:</b>[mommi_base_law_type]</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr />
|
||||
|
||||
@@ -78,11 +78,9 @@ var/list/ai_list = list()
|
||||
|
||||
proc_holder_list = new()
|
||||
|
||||
if(L)
|
||||
if (istype(L, /datum/ai_laws))
|
||||
laws = L
|
||||
else
|
||||
laws = new base_law_type
|
||||
//Determine the AI's lawset
|
||||
if(L && istype(L,/datum/ai_laws)) src.laws = L
|
||||
else src.laws = getLawset(src)
|
||||
|
||||
verbs += /mob/living/silicon/ai/proc/show_laws_verb
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
icon_state = "secborg"
|
||||
modtype = "Security"
|
||||
else
|
||||
laws = new base_law_type // Was NT Default
|
||||
src.laws = getLawset(src)
|
||||
connected_ai = select_active_ai_with_fewest_borgs()
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots += src
|
||||
|
||||
Reference in New Issue
Block a user