Fixes MMI to AI law transfer (#31017)
* Fixes MMI to AI law transfer * Fixes issue with preloaded laws on AI core
This commit is contained in:
committed by
CitadelStationBot
parent
b51e4457f5
commit
10bf80139c
@@ -45,14 +45,13 @@
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
if(istype(P, /obj/item/circuitboard/aicore))
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
|
||||
update_icon()
|
||||
state = CIRCUIT_CORE
|
||||
circuit = P
|
||||
P.forceMove(src)
|
||||
return
|
||||
if(CIRCUIT_CORE)
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
@@ -143,10 +142,9 @@
|
||||
to_chat(user, "<span class='warning'>This [M.name] is mindless!</span>")
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(M,src))
|
||||
return
|
||||
|
||||
M.forceMove(src)
|
||||
brain = M
|
||||
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
|
||||
update_icon()
|
||||
@@ -176,7 +174,14 @@
|
||||
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
|
||||
if(!istype(brain.laws, /datum/ai_laws/ratvar))
|
||||
remove_servant_of_ratvar(brain.brainmob, TRUE)
|
||||
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
|
||||
|
||||
var/mob/living/silicon/ai/A = null
|
||||
|
||||
if (brain.overrides_aicore_laws)
|
||||
A = new /mob/living/silicon/ai(loc, brain.laws, brain.brainmob)
|
||||
else
|
||||
A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
|
||||
|
||||
if(brain.force_replace_ai_name)
|
||||
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
|
||||
SSblackbox.inc("cyborg_ais_created",1)
|
||||
|
||||
Reference in New Issue
Block a user