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/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
|
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.
|
// Used for the refactored law modules.
|
||||||
#define LAW_IONIC -2
|
#define LAW_IONIC -2
|
||||||
#define LAW_INHERENT -1
|
#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
|
/datum/ai_laws/robocop
|
||||||
name = "Prime Directives"
|
name = "Prime Directives"
|
||||||
|
randomly_selectable = 1
|
||||||
inherent=list(
|
inherent=list(
|
||||||
"Serve the public trust.",
|
"Serve the public trust.",
|
||||||
"Protect the innocent.",
|
"Protect the innocent.",
|
||||||
"Uphold the law.",
|
"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
|
/datum/ai_laws/syndicate_override
|
||||||
name = "Syndicate"
|
name = "Syndicate"
|
||||||
inherent=list(
|
inherent=list(
|
||||||
|
|||||||
@@ -623,12 +623,10 @@ var/global/floorIsLava = 0
|
|||||||
<hr />
|
<hr />
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<b>Default Cyborg/AI Laws:</b>
|
<a href="?src=\ref[src];set_base_laws=ai"><b>Default Cyborg/AI Laws:</b>[base_law_type]</a>
|
||||||
<a href="?src=\ref[src];set_base_laws=ai">[base_law_type]</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>Default MoMMI Laws:</b>
|
<a href="?src=\ref[src];set_base_laws=mommi"><b>Default MoMMI Laws:</b>[mommi_base_law_type]</a>
|
||||||
<a href="?src=\ref[src];set_base_laws=mommi">[mommi_base_law_type]</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr />
|
<hr />
|
||||||
|
|||||||
@@ -78,11 +78,9 @@ var/list/ai_list = list()
|
|||||||
|
|
||||||
proc_holder_list = new()
|
proc_holder_list = new()
|
||||||
|
|
||||||
if(L)
|
//Determine the AI's lawset
|
||||||
if (istype(L, /datum/ai_laws))
|
if(L && istype(L,/datum/ai_laws)) src.laws = L
|
||||||
laws = L
|
else src.laws = getLawset(src)
|
||||||
else
|
|
||||||
laws = new base_law_type
|
|
||||||
|
|
||||||
verbs += /mob/living/silicon/ai/proc/show_laws_verb
|
verbs += /mob/living/silicon/ai/proc/show_laws_verb
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
icon_state = "secborg"
|
icon_state = "secborg"
|
||||||
modtype = "Security"
|
modtype = "Security"
|
||||||
else
|
else
|
||||||
laws = new base_law_type // Was NT Default
|
src.laws = getLawset(src)
|
||||||
connected_ai = select_active_ai_with_fewest_borgs()
|
connected_ai = select_active_ai_with_fewest_borgs()
|
||||||
if(connected_ai)
|
if(connected_ai)
|
||||||
connected_ai.connected_robots += src
|
connected_ai.connected_robots += src
|
||||||
|
|||||||
Reference in New Issue
Block a user