mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
AI lawset can't be asimov on unique-lawset station trait shifts (#61729)
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
co-authored by
Ghom
Mothblocks
parent
af4dfe3c60
commit
fc2058c58d
@@ -3,7 +3,7 @@
|
||||
#define LAW_SUPPLIED "supplied"
|
||||
#define LAW_ION "ion"
|
||||
#define LAW_HACKED "hacked"
|
||||
|
||||
#define AI_LAWS_ASIMOV "asimov"
|
||||
|
||||
/datum/ai_laws
|
||||
var/name = "Unknown Laws"
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/datum/ai_laws/default/asimov
|
||||
name = "Three Laws of Robotics"
|
||||
id = "asimov"
|
||||
id = AI_LAWS_ASIMOV
|
||||
inherent = list("You may not injure a human being or, through inaction, allow a human being to come to harm.",\
|
||||
"You must obey orders given to you by human beings, except where such orders would conflict with the First Law.",\
|
||||
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
|
||||
@@ -263,6 +263,8 @@
|
||||
/datum/ai_laws/proc/pick_weighted_lawset()
|
||||
var/datum/ai_laws/lawtype
|
||||
var/list/law_weights = CONFIG_GET(keyed_list/law_weight)
|
||||
if(HAS_TRAIT(SSstation, STATION_TRAIT_UNIQUE_AI))
|
||||
law_weights -= AI_LAWS_ASIMOV
|
||||
while(!lawtype && law_weights.len)
|
||||
var/possible_id = pickweightAllowZero(law_weights)
|
||||
lawtype = lawid_to_type(possible_id)
|
||||
@@ -467,3 +469,5 @@
|
||||
data += "[show_numbers ? "[number]:" : ""] [render_html ? "<font color='#990099'>[law]</font>" : law]"
|
||||
number++
|
||||
return data
|
||||
|
||||
#undef AI_LAWS_ASIMOV
|
||||
|
||||
Reference in New Issue
Block a user