mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Borgs and AI's
- No longer able to be cultists because their objectives completely contradicts robotic laws. Fixes issue 510. - No longer able to be revolutionaries. - - There was existing code for this already, but it should function properly now. - - It now takes into account admin's borging players. pAI's can no longer see revolutionaries or cultists. - pAI's get a brand new mind instead of wiping their previous antag status. - This way it prevents players exploiting the cult/rev hud icons and it does not affect the end-round scores and statistics. Piano's 'repeat' has a limit of 10. - This will stop byond from thinking playsong() is an infinite loop and crashing the server. - Added a check so that players can not bypass the limit without stopping the song first. - 10 is just an arbitrary number I chose, feel free to change it but keep it within reason... and byond's limits. Fixed a bunch of 'emergancy' misspellings. - Commit log worthy material right here. Fixed a bunch of 'emergancy' misspellings. - Commit log worthy material right here. Changelog updated. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3878 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -61,9 +61,6 @@
|
||||
spawn(0)
|
||||
ainame(src)
|
||||
|
||||
if(src.mind)
|
||||
ticker.mode.remove_revolutionary(src.mind)
|
||||
|
||||
if(client)
|
||||
for(var/obj/effect/rune/rune in world)
|
||||
var/image/blood = image('blood.dmi', loc = rune, icon_state = "floor[rand(1,7)]")
|
||||
|
||||
@@ -31,21 +31,30 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
pai.name = candidate.name
|
||||
pai.real_name = pai.name
|
||||
pai.key = candidate.key
|
||||
|
||||
pai.mind = new()//Make a new mind for the pai
|
||||
pai.mind.current = pai
|
||||
pai.mind.assigned_role = "Assistant"//Default to an assistant.
|
||||
|
||||
card.pai = pai
|
||||
card.looking_for_personality = 0
|
||||
|
||||
ticker.mode.update_cult_icons_removed(card.pai.mind)
|
||||
ticker.mode.update_rev_icons_removed(card.pai.mind)
|
||||
|
||||
pai_candidates.Remove(candidate)
|
||||
usr << browse(null, "window=findPai")
|
||||
|
||||
if(href_list["new"])
|
||||
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
|
||||
var/option = href_list["option"]
|
||||
var/t = ""
|
||||
var/maxNameLen = 26
|
||||
|
||||
switch(option)
|
||||
if("name")
|
||||
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
|
||||
if(t)
|
||||
candidate.name = copytext(sanitize(t),1,maxNameLen)
|
||||
candidate.name = copytext(sanitize(t),1,MAX_NAME_LEN)
|
||||
if("desc")
|
||||
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
|
||||
if(t)
|
||||
@@ -64,7 +73,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
candidate.savefile_load(usr)
|
||||
//In case people have saved unsanitized stuff.
|
||||
if(candidate.name)
|
||||
candidate.name = copytext(sanitize(candidate.name),1,maxNameLen)
|
||||
candidate.name = copytext(sanitize(candidate.name),1,MAX_NAME_LEN)
|
||||
if(candidate.description)
|
||||
candidate.description = copytext(sanitize(candidate.description),1,MAX_MESSAGE_LEN)
|
||||
if(candidate.role)
|
||||
|
||||
@@ -51,8 +51,6 @@
|
||||
var/obj/item/weapon/cell/C = new(src)
|
||||
C.charge = 1500
|
||||
cell = C
|
||||
if(src.mind)
|
||||
ticker.mode.remove_revolutionary(src.mind)
|
||||
started = 1
|
||||
..()
|
||||
|
||||
@@ -521,41 +519,6 @@
|
||||
spark_system.start()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/restart/
|
||||
name = "Borg emergancy restart module"
|
||||
name = "Borg emergency restart module"
|
||||
desc = "Used to force a restart of a disabled-but-repaired borg, bringing it back online."
|
||||
construction_cost = list("metal"=60000 , "glass"=5000)
|
||||
icon_state = "cyborg_upgrade1"
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
// O.verbs += /mob/living/silicon/ai/proc/ai_cancel_call
|
||||
O.job = "AI"
|
||||
|
||||
if(O.mind)
|
||||
ticker.mode.remove_cultist(O.mind, 1)
|
||||
ticker.mode.remove_revolutionary(O.mind, 1)
|
||||
|
||||
spawn(0)
|
||||
ainame(O)
|
||||
world << text("<b>[O.real_name] is the AI!</b>")
|
||||
@@ -205,6 +209,10 @@
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.transfer_identity(src)//Does not transfer key/client.
|
||||
|
||||
if(O.mind)
|
||||
ticker.mode.remove_cultist(O.mind, 1)
|
||||
ticker.mode.remove_revolutionary(O.mind, 1)
|
||||
|
||||
spawn(0)//To prevent the proc from returning null.
|
||||
del(src)
|
||||
return O
|
||||
|
||||
Reference in New Issue
Block a user