mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
zeroth laws can be removed with core boards
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
var/list/inherent = list()
|
||||
var/list/supplied = list()
|
||||
var/list/ion = list()
|
||||
var/mob/living/silicon/owner
|
||||
|
||||
/datum/ai_laws/default/asimov
|
||||
name = "Three Laws of Robotics"
|
||||
@@ -169,3 +170,20 @@
|
||||
if (length(law) > 0)
|
||||
who << "[number]. [law]"
|
||||
number++
|
||||
|
||||
/datum/ai_laws/proc/clear_zeroth_law(var/force) //only removes zeroth from antag ai if force is 1
|
||||
if(force)
|
||||
src.zeroth = null
|
||||
src.zeroth_borg = null
|
||||
return
|
||||
else
|
||||
if(src.owner.mind.special_role)
|
||||
return
|
||||
else
|
||||
src.zeroth = null
|
||||
src.zeroth_borg = null
|
||||
return
|
||||
|
||||
/datum/ai_laws/proc/associate(var/mob/living/silicon/M)
|
||||
if(!owner)
|
||||
owner = M
|
||||
@@ -109,12 +109,14 @@
|
||||
if(istype(P, /obj/item/weapon/aiModule/core/full)) //Allows any full core boards to be applied to AI cores.
|
||||
var/obj/item/weapon/aiModule/core/M = P
|
||||
laws.clear_inherent_laws()
|
||||
laws.clear_zeroth_law(0)
|
||||
for(var/templaw in M.laws)
|
||||
laws.add_inherent_law(templaw)
|
||||
usr << "<span class='notice'>Law module applied.</span>"
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule/reset/purge))
|
||||
laws.clear_inherent_laws()
|
||||
laws.clear_zeroth_law(0)
|
||||
usr << "<span class='notice'>Laws cleared applied.</span>"
|
||||
|
||||
|
||||
|
||||
@@ -239,11 +239,13 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/reset/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
..()
|
||||
target.clear_inherent_laws()
|
||||
target.clear_zeroth_law(0)
|
||||
|
||||
/******************* Full Core Boards *******************/
|
||||
|
||||
/obj/item/weapon/aiModule/core/full/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) //These boards replace inherent laws.
|
||||
target.clear_inherent_laws()
|
||||
target.clear_zeroth_law(0)
|
||||
..()
|
||||
|
||||
/******************** Asimov ********************/
|
||||
|
||||
@@ -40,3 +40,8 @@
|
||||
if(2)
|
||||
var/datum/ai_laws/lawtype = pick(typesof(/datum/ai_laws/default) - /datum/ai_laws/default)
|
||||
laws = new lawtype()
|
||||
laws.associate(src)
|
||||
|
||||
/mob/living/silicon/proc/clear_zeroth_law(var/force)
|
||||
laws_sanity_check()
|
||||
laws.clear_zeroth_law(force)
|
||||
@@ -583,6 +583,7 @@
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
clear_zeroth_law(0)
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
|
||||
Reference in New Issue
Block a user