mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Fixes synched borgs not syncing laws (#14338)
* fixes annoying bug * more
This commit is contained in:
@@ -29,6 +29,11 @@
|
||||
. = ..()
|
||||
for(var/mob/living/silicon/ai/ai as anything in GLOB.ai_list)
|
||||
ai.show_laws()
|
||||
//SKYRAT ADDITION START
|
||||
for(var/mob/living/silicon/robot/cyborg as anything in ai.connected_robots)
|
||||
if(cyborg.connected_ai && cyborg.lawupdate)
|
||||
cyborg.lawsync()
|
||||
//SKYRAT ADDITION END
|
||||
|
||||
/datum/station_trait/ian_adventure
|
||||
name = "Ian's Adventure"
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
affected_cyborgs += owned_borg
|
||||
borg_flw += "[ADMIN_LOOKUPFLW(owned_borg)], "
|
||||
borg_txt += "[owned_borg.name]([owned_borg.key]), "
|
||||
owned_borg.lawsync() //SKYRAT ADDITION
|
||||
|
||||
borg_txt = borg_txt.Join()
|
||||
GLOB.lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) used [src.name] on [ainame]([aikey]).[law2log ? " The law specified [law2log]" : ""], [length(affected_cyborgs) ? ", impacting synced borgs [borg_txt]" : ""]")
|
||||
@@ -510,7 +511,7 @@
|
||||
|
||||
/obj/item/ai_module/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
|
||||
name = "hacked circuitry" //SKYRAT CHANGE
|
||||
desc = "A suspicious circuit board modified beyond recognition. It appears to be a module for bleeding edge technology." //SKYRAT CHANGE
|
||||
desc = "A suspicious circuit board modified beyond recognition. It appears to be a module for bleeding edge technology." //SKYRAT CHANGE
|
||||
laws = list("")
|
||||
special_desc_requirement = EXAMINE_CHECK_JOB // Skyrat edit
|
||||
special_desc_jobs = list("Scientist", "Roboticist", "Research Director", "Cyborg", "AI") //SKYRAT CHANGE
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
affected_cyborgs += owned_borg
|
||||
borg_flw += "[ADMIN_LOOKUPFLW(owned_borg)], "
|
||||
borg_txt += "[owned_borg.name]([owned_borg.key]), "
|
||||
owned_borg.lawsync() //SKYRAT ADDITION
|
||||
|
||||
borg_txt = borg_txt.Join()
|
||||
GLOB.lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) used [src.name] on [ainame]([aikey]).[law2log ? " The law specified [law2log]" : ""], [length(affected_cyborgs) ? ", impacting synced borgs [borg_txt]" : ""]")
|
||||
|
||||
@@ -23,6 +23,13 @@
|
||||
addtimer(CALLBACK(src, .proc/show_laws), 0)
|
||||
addtimer(CALLBACK(src, .proc/deadchat_lawchange), 0)
|
||||
last_lawchange_announce = world.time
|
||||
//SKYRAT ADDITION START: AI LAWSYNC
|
||||
if(isAI(src))
|
||||
var/mob/living/silicon/ai/ai = src
|
||||
for(var/mob/living/silicon/robot/cyborg as anything in ai.connected_robots)
|
||||
if(cyborg.connected_ai && cyborg.lawupdate)
|
||||
cyborg.lawsync()
|
||||
//SKYRAT ADDITON END
|
||||
|
||||
/mob/living/silicon/proc/set_zeroth_law(law, law_borg, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
|
||||
Reference in New Issue
Block a user