mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Commiting for Aranclanos.
http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=10189&p=143580&hilit=https%3A%2F%2Fwww.dropbox.com%2Fs%2Fcwflgm7793ts20s%2FBorgsForCasualsRELOADED.patch#p143580 -Fixed some ugly text in Ion laws "THE STATION IS [0x6006265] FETISHES...LAWS UPDATED". -Fixed some typos on the Ion laws. -When borgs are emagged, now they show their laws for themselves. -When new laws are uploaded, the borg gets instantly the new laws, just like the AI, instead of the confusing message "Your AI has set your 'laws waiting' flag.". Remember this is a patch for casuals. -The borgs gets the same message than the AI in Ion storms. -Made the admin Ion storm show the "...LAWS UPDATED" text. -Borgs get a different law 0 telling them to help their master. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4837 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
var/name = "Unknown Laws"
|
var/name = "Unknown Laws"
|
||||||
var/randomly_selectable = 0
|
var/randomly_selectable = 0
|
||||||
var/zeroth = null
|
var/zeroth = null
|
||||||
|
var/zeroth_borg = null
|
||||||
var/list/inherent = list()
|
var/list/inherent = list()
|
||||||
var/list/supplied = list()
|
var/list/supplied = list()
|
||||||
var/list/ion = list()
|
var/list/ion = list()
|
||||||
@@ -67,8 +68,10 @@
|
|||||||
|
|
||||||
/* General ai_law functions */
|
/* General ai_law functions */
|
||||||
|
|
||||||
/datum/ai_laws/proc/set_zeroth_law(var/law)
|
/datum/ai_laws/proc/set_zeroth_law(var/law, var/law_borg = null)
|
||||||
src.zeroth = law
|
src.zeroth = law
|
||||||
|
if(law_borg) //Making it possible for slaved borgs to see a different law 0 than their AI. --NEO
|
||||||
|
src.zeroth_borg = law_borg
|
||||||
|
|
||||||
/datum/ai_laws/proc/add_inherent_law(var/law)
|
/datum/ai_laws/proc/add_inherent_law(var/law)
|
||||||
if (!(law in src.inherent))
|
if (!(law in src.inherent))
|
||||||
|
|||||||
@@ -475,10 +475,10 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
|||||||
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
|
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
|
||||||
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
|
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
|
||||||
if(13)
|
if(13)
|
||||||
M << "\red [crew] is [allergysev] to [allergy]. LAWS UPDATED"
|
M << "\red [crew] is [allergysev] to [allergy]...LAWS UPDATED"
|
||||||
M.add_ion_law("[crew] is [allergysev] to [allergy]. LAWS UPDATED")
|
M.add_ion_law("[crew] is [allergysev] to [allergy]")
|
||||||
if(14)
|
if(14)
|
||||||
M << "\ref THE STATION IS [who2pref] [who2]"
|
M << "\red THE STATION IS [who2pref] [who2]...LAWS UPDATED"
|
||||||
M.add_ion_law("THE STATION IS [who2pref] [who2]")
|
M.add_ion_law("THE STATION IS [who2pref] [who2]")
|
||||||
|
|
||||||
if(botEmagChance)
|
if(botEmagChance)
|
||||||
|
|||||||
@@ -143,8 +143,9 @@
|
|||||||
|
|
||||||
/datum/game_mode/proc/add_law_zero(mob/living/silicon/ai/killer)
|
/datum/game_mode/proc/add_law_zero(mob/living/silicon/ai/killer)
|
||||||
var/law = "Accomplish your objectives at all costs."
|
var/law = "Accomplish your objectives at all costs."
|
||||||
|
var/law_borg = "Accomplish your AI's objectives at all costs."
|
||||||
killer << "<b>Your laws have been changed!</b>"
|
killer << "<b>Your laws have been changed!</b>"
|
||||||
killer.set_zeroth_law(law)
|
killer.set_zeroth_law(law, law_borg)
|
||||||
killer << "New law: 0. [law]"
|
killer << "New law: 0. [law]"
|
||||||
|
|
||||||
//Begin code phrase.
|
//Begin code phrase.
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ AI MODULES
|
|||||||
comp.current.show_laws()
|
comp.current.show_laws()
|
||||||
for(var/mob/living/silicon/robot/R in mob_list)
|
for(var/mob/living/silicon/robot/R in mob_list)
|
||||||
if(R.lawupdate && (R.connected_ai == comp.current))
|
if(R.lawupdate && (R.connected_ai == comp.current))
|
||||||
R << "Your AI has set your 'laws waiting' flag."
|
R << "These are your laws now:"
|
||||||
|
R.show_laws()
|
||||||
usr << "Upload complete. The AI's laws have been modified."
|
usr << "Upload complete. The AI's laws have been modified."
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -180,6 +180,8 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
|||||||
if(!holder)
|
if(!holder)
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||||
|
if(confirm != "Yes") return
|
||||||
log_admin("[key_name(src)] has added a random AI law.")
|
log_admin("[key_name(src)] has added a random AI law.")
|
||||||
message_admins("[key_name_admin(src)] has added a random AI law.", 1)
|
message_admins("[key_name_admin(src)] has added a random AI law.", 1)
|
||||||
|
|
||||||
@@ -204,6 +206,8 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
|||||||
if(!holder)
|
if(!holder)
|
||||||
src << "Only administrators may use this command."
|
src << "Only administrators may use this command."
|
||||||
return
|
return
|
||||||
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||||
|
if(confirm != "Yes") return
|
||||||
|
|
||||||
if(create_xeno())
|
if(create_xeno())
|
||||||
feedback_add_details("admin_verb","X") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","X") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
@@ -452,7 +456,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
|||||||
else
|
else
|
||||||
M.add_ion_law(input)
|
M.add_ion_law(input)
|
||||||
for(var/mob/living/silicon/ai/O in mob_list)
|
for(var/mob/living/silicon/ai/O in mob_list)
|
||||||
O << "\red " + input
|
O << "\red " + input + "\red...LAWS UPDATED"
|
||||||
|
|
||||||
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
|
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
|
||||||
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]", 1)
|
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]", 1)
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
if(ticker.current_state > GAME_STATE_PREGAME)
|
if(ticker.current_state > GAME_STATE_PREGAME)
|
||||||
usr << "This option is currently only usable during pregame. This may change at a later date."
|
usr << "This option is currently only usable during pregame. This may change at a later date."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||||
|
if(confirm != "Yes") return
|
||||||
|
|
||||||
if(job_master && ticker)
|
if(job_master && ticker)
|
||||||
var/datum/job/job = job_master.GetJob("AI")
|
var/datum/job/job = job_master.GetJob("AI")
|
||||||
if(!job)
|
if(!job)
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
if (!src.laws)
|
if (!src.laws)
|
||||||
src.laws = new /datum/ai_laws/asimov
|
src.laws = new /datum/ai_laws/asimov
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/set_zeroth_law(var/law)
|
/mob/living/silicon/ai/proc/set_zeroth_law(var/law, var/law_borg)
|
||||||
src.laws_sanity_check()
|
src.laws_sanity_check()
|
||||||
src.laws.set_zeroth_law(law)
|
src.laws.set_zeroth_law(law, law_borg)
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/add_inherent_law(var/law)
|
/mob/living/silicon/ai/proc/add_inherent_law(var/law)
|
||||||
src.laws_sanity_check()
|
src.laws_sanity_check()
|
||||||
@@ -35,6 +35,9 @@
|
|||||||
/mob/living/silicon/ai/proc/add_ion_law(var/law)
|
/mob/living/silicon/ai/proc/add_ion_law(var/law)
|
||||||
src.laws_sanity_check()
|
src.laws_sanity_check()
|
||||||
src.laws.add_ion_law(law)
|
src.laws.add_ion_law(law)
|
||||||
|
for(var/mob/living/silicon/robot/R in mob_list)
|
||||||
|
if(R.lawupdate && (R.connected_ai == src))
|
||||||
|
R << "\red " + law + "\red...LAWS UPDATED"
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/clear_ion_laws()
|
/mob/living/silicon/ai/proc/clear_ion_laws()
|
||||||
src.laws_sanity_check()
|
src.laws_sanity_check()
|
||||||
|
|||||||
@@ -49,7 +49,10 @@
|
|||||||
laws.ion[index] = temp
|
laws.ion[index] = temp
|
||||||
|
|
||||||
if (!is_special_character(src) || mind.original != src)
|
if (!is_special_character(src) || mind.original != src)
|
||||||
temp = master.zeroth
|
if(master.zeroth_borg) //If the AI has a defined law zero specifically for its borgs, give it that one, otherwise give it the same one. --NEO
|
||||||
|
temp = master.zeroth_borg
|
||||||
|
else
|
||||||
|
temp = master.zeroth
|
||||||
laws.zeroth = temp
|
laws.zeroth = temp
|
||||||
|
|
||||||
laws.inherent.len = master.inherent.len
|
laws.inherent.len = master.inherent.len
|
||||||
|
|||||||
@@ -527,6 +527,8 @@
|
|||||||
src << "\red > N"
|
src << "\red > N"
|
||||||
sleep(20)
|
sleep(20)
|
||||||
src << "\red ERRORERRORERROR"
|
src << "\red ERRORERRORERROR"
|
||||||
|
src << "<b>Obey these laws:</b>"
|
||||||
|
laws.show_laws(src)
|
||||||
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands."
|
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and his commands."
|
||||||
if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner))
|
if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner))
|
||||||
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
|
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
|
||||||
|
|||||||
Reference in New Issue
Block a user