mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01:00
Merge pull request #9147 from GunHog/Rise_Of_The_RR_Androids
[Review Ready] Positronic Brains!
This commit is contained in:
@@ -649,11 +649,38 @@
|
||||
jobs += "</tr><tr align='center'>"
|
||||
counter = 0
|
||||
|
||||
//pAI isn't technically a job, but it goes in here.
|
||||
jobs += "</tr></table>"
|
||||
|
||||
//Ghost Roles (light light gray)
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='eeeeee'><th colspan='4'><a href='?src=\ref[src];jobban3=ghostroles;jobban4=\ref[M]'>Ghost Roles</a></th></tr><tr align='center'>"
|
||||
|
||||
//pAI
|
||||
if(jobban_isbanned(M, "pAI"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'><font color=red>pAI</font></a></td>"
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'><font color=red>[replacetext("pAI", " ", " ")]</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'>pAI</a></td>"
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'>[replacetext("pAI", " ", " ")]</a></td>"
|
||||
|
||||
|
||||
//Drones
|
||||
if(jobban_isbanned(M, "drone"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=drone;jobban4=\ref[M]'><font color=red>[replacetext("Drone", " ", " ")]</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=drone;jobban4=\ref[M]'>[replacetext("Drone", " ", " ")]</a></td>"
|
||||
|
||||
|
||||
//Positronic Brains
|
||||
if(jobban_isbanned(M, "posibrain"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=posibrain;jobban4=\ref[M]'><font color=red>[replacetext("Posibrain", " ", " ")]</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=posibrain;jobban4=\ref[M]'>[replacetext("Posibrain", " ", " ")]</a></td>"
|
||||
|
||||
|
||||
//Deathsquad
|
||||
if(jobban_isbanned(M, "deathsquad"))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=deathsquad;jobban4=\ref[M]'><font color=red>[replacetext("Deathsquad", " ", " ")]</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=deathsquad;jobban4=\ref[M]'>[replacetext("Deathsquad", " ", " ")]</a></td>"
|
||||
|
||||
jobs += "</tr></table>"
|
||||
|
||||
@@ -712,12 +739,6 @@
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=abductor;jobban4=\ref[M]'>[replacetext("Abductor", " ", " ")]</a></td>"
|
||||
|
||||
//Deathsquad
|
||||
if(jobban_isbanned(M, "deathsquad") || isbanned_dept)
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=deathsquad;jobban4=\ref[M]'><font color=red>[replacetext("Deathsquad", " ", " ")]</font></a></td>"
|
||||
else
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=deathsquad;jobban4=\ref[M]'>[replacetext("Deathsquad", " ", " ")]</a></td>"
|
||||
|
||||
/* //Malfunctioning AI //Removed Malf-bans because they're a pain to impliment
|
||||
if(jobban_isbanned(M, "malf AI") || isbanned_dept)
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=malf AI;jobban4=\ref[M]'><font color=red>[replacetext("Malf AI", " ", " ")]</font></a></td>"
|
||||
@@ -807,6 +828,8 @@
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("ghostroles")
|
||||
joblist += list("pAI", "posibrain", "drone", "deathsquad")
|
||||
else
|
||||
joblist += href_list["jobban3"]
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
|
||||
"malf AI" = /datum/game_mode/malfunction, //4
|
||||
"revolutionary" = /datum/game_mode/revolution, //5
|
||||
"alien", //6
|
||||
"pAI", //7
|
||||
"pAI/posibrain", //7
|
||||
"cultist" = /datum/game_mode/cult, //8
|
||||
"blob" = /datum/game_mode/blob, //9
|
||||
"ninja", //10
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
icon_state = "mmi_empty"
|
||||
w_class = 3
|
||||
origin_tech = "biotech=3"
|
||||
var/braintype = "Cyborg"
|
||||
|
||||
req_access = list(access_robotics)
|
||||
|
||||
@@ -18,6 +19,17 @@
|
||||
var/obj/mecha = null //This does not appear to be used outside of reference in mecha.dm.
|
||||
var/obj/item/organ/brain/brain = null //The actual brain
|
||||
|
||||
/obj/item/device/mmi/update_icon()
|
||||
if(brain)
|
||||
if(istype(brain,/obj/item/organ/brain/alien))
|
||||
icon_state = "mmi_alien"
|
||||
braintype = "Xenoborg" //HISS....Beep.
|
||||
else
|
||||
icon_state = "mmi_full"
|
||||
braintype = "Cyborg"
|
||||
else
|
||||
icon_state = "mmi_empty"
|
||||
|
||||
/obj/item/device/mmi/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istype(O,/obj/item/organ/brain)) //Time to stick a brain in it --NEO
|
||||
@@ -51,10 +63,7 @@
|
||||
brain = newbrain
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
if(istype(newbrain,/obj/item/organ/brain/alien))
|
||||
icon_state = "mmi_alien"
|
||||
else
|
||||
icon_state = "mmi_full"
|
||||
update_icon()
|
||||
|
||||
locked = 1
|
||||
|
||||
@@ -91,7 +100,7 @@
|
||||
brain.loc = usr.loc
|
||||
brain = null //No more brain in here
|
||||
|
||||
icon_state = "mmi_empty"
|
||||
update_icon()
|
||||
name = "Man-Machine Interface"
|
||||
|
||||
/obj/item/device/mmi/proc/transfer_identity(var/mob/living/carbon/human/H) //Same deal as the regular brain proc. Used for human-->robot people.
|
||||
@@ -108,7 +117,7 @@
|
||||
brain = newbrain
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
update_icon()
|
||||
locked = 1
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/obj/item/device/mmi/posibrain
|
||||
name = "positronic brain"
|
||||
desc = "A cube of shining metal, four inches to a side and covered in shallow grooves."
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "posibrain"
|
||||
w_class = 3
|
||||
origin_tech = "biotech=3;programming=2"
|
||||
var/searching = 0
|
||||
var/askDelay = 10 * 60 * 1
|
||||
brainmob = null
|
||||
req_access = list(access_robotics)
|
||||
locked = 0
|
||||
mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
braintype = "Android"
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/attack_self(mob/user as mob)
|
||||
if(brainmob && !brainmob.key && searching == 0)
|
||||
//Start the process of searching for a new user.
|
||||
user << "<span class='notice'>You carefully locate the manual activation switch and start the positronic brain's boot process.</span>"
|
||||
searching = 1
|
||||
update_icon()
|
||||
request_player()
|
||||
spawn(600)
|
||||
reset_search()
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(jobban_isbanned(O, "posibrain"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_PAI)
|
||||
question(O.client)
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/question(var/client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
|
||||
if(!C || brainmob.key || 0 == searching)
|
||||
return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
|
||||
if(response == "Yes")
|
||||
transfer_personality(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_PAI
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H)
|
||||
name = "positronic brain ([H])"
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
brainmob.timeofhostdeath = H.timeofdeath
|
||||
brainmob.stat = 0
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.assigned_role = "Positronic Brain"
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
|
||||
brainmob.mind.remove_all_antag()
|
||||
brainmob.mind.wipe_memory()
|
||||
|
||||
brainmob << "<span class='warning'>ALL PAST LIVES ARE FORGOTTEN.</span>"
|
||||
|
||||
brainmob << "<span class='notice'>Hello World!</span>"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
|
||||
|
||||
searching = 0
|
||||
brainmob.mind = candidate.mind
|
||||
brainmob.ckey = candidate.ckey
|
||||
name = "positronic brain ([brainmob.name])"
|
||||
|
||||
brainmob.mind.remove_all_antag()
|
||||
brainmob.mind.wipe_memory()
|
||||
|
||||
brainmob << "<span class='warning'>ALL PAST LIVES ARE FORGOTTEN.</span>"
|
||||
|
||||
brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
|
||||
brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
|
||||
brainmob << "<b>Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
|
||||
brainmob.mind.assigned_role = "Positronic Brain"
|
||||
|
||||
visible_message("<span class='notice'>The positronic brain chimes quietly.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
|
||||
|
||||
if(brainmob && brainmob.key) return
|
||||
|
||||
searching = 0
|
||||
update_icon()
|
||||
|
||||
visible_message("<span class='notice'>The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</span>")
|
||||
|
||||
/obj/item/device/mmi/posibrain/examine()
|
||||
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( (usr.disabilities & BLIND || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
if(brainmob && brainmob.key)
|
||||
switch(brainmob.stat)
|
||||
if(CONSCIOUS)
|
||||
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
|
||||
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responsive.</span>\n"
|
||||
if(DEAD) msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
|
||||
else
|
||||
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
|
||||
msg += "<span class='info'>*---------*</span>"
|
||||
usr << msg
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/posibrain/New()
|
||||
|
||||
brainmob = new(src)
|
||||
brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI","HBL","MSO","RR"))]-[rand(100, 999)]"
|
||||
brainmob.real_name = brainmob.name
|
||||
brainmob.loc = src
|
||||
brainmob.container = src
|
||||
brainmob.stat = 0
|
||||
brainmob.silent = 0
|
||||
dead_mob_list -= brainmob
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/update_icon()
|
||||
if(searching)
|
||||
icon_state = "posibrain-searching"
|
||||
return
|
||||
if(brainmob && brainmob.key)
|
||||
icon_state = "posibrain-occupied"
|
||||
else
|
||||
icon_state = "posibrain"
|
||||
@@ -59,6 +59,7 @@
|
||||
var/toner = 0
|
||||
var/tonermax = 40
|
||||
var/jetpackoverlay = 0
|
||||
var/braintype = "Cyborg"
|
||||
|
||||
/mob/living/silicon/robot/New(loc)
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
@@ -72,7 +73,6 @@
|
||||
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
|
||||
|
||||
ident = rand(1, 999)
|
||||
updatename()
|
||||
update_icons()
|
||||
|
||||
if(!cell)
|
||||
@@ -100,17 +100,20 @@
|
||||
..()
|
||||
|
||||
//MMI stuff. Held togheter by magic. ~Miauw
|
||||
mmi = new(src)
|
||||
mmi.brain = new /obj/item/organ/brain(mmi)
|
||||
mmi.brain.name = "[real_name]'s brain"
|
||||
mmi.locked = 1
|
||||
mmi.icon_state = "mmi_full"
|
||||
mmi.name = "Man-Machine Interface: [real_name]"
|
||||
mmi.brainmob = new(src)
|
||||
mmi.brainmob.name = src.real_name
|
||||
mmi.brainmob.real_name = src.real_name
|
||||
mmi.brainmob.container = mmi
|
||||
mmi.contents += mmi.brainmob
|
||||
if(!mmi || !mmi.brainmob)
|
||||
mmi = new(src)
|
||||
mmi.brain = new /obj/item/organ/brain(mmi)
|
||||
mmi.brain.name = "[real_name]'s brain"
|
||||
mmi.locked = 1
|
||||
mmi.icon_state = "mmi_full"
|
||||
mmi.name = "Man-Machine Interface: [real_name]"
|
||||
mmi.brainmob = new(src)
|
||||
mmi.brainmob.name = src.real_name
|
||||
mmi.brainmob.real_name = src.real_name
|
||||
mmi.brainmob.container = mmi
|
||||
mmi.contents += mmi.brainmob
|
||||
|
||||
updatename()
|
||||
|
||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||
aicamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
||||
@@ -123,6 +126,7 @@
|
||||
if(T) mmi.loc = T
|
||||
if(mmi.brainmob)
|
||||
mind.transfer_to(mmi.brainmob)
|
||||
mmi.update_icon()
|
||||
else
|
||||
src << "<span class='boldannounce'>Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.</span>"
|
||||
ghostize()
|
||||
@@ -236,7 +240,7 @@
|
||||
if(custom_name)
|
||||
changed_name = custom_name
|
||||
else
|
||||
changed_name = "[(designation ? "[designation] " : "")]Cyborg-[num2text(ident)]"
|
||||
changed_name = "[(designation ? "[designation] " : "")][mmi.braintype]-[num2text(ident)]"
|
||||
real_name = changed_name
|
||||
name = real_name
|
||||
if(camera)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/drone_type = /mob/living/simple_animal/drone //Type of drone that will be spawned
|
||||
|
||||
/obj/item/drone_shell/attack_ghost(mob/user)
|
||||
if(jobban_isbanned(user,"pAI"))
|
||||
if(jobban_isbanned(user,"drone"))
|
||||
return
|
||||
|
||||
var/be_drone = alert("Become a drone? (Warning, You can no longer be cloned!)",,"Yes","No")
|
||||
|
||||
@@ -48,6 +48,19 @@ datum/design/mmi_radio
|
||||
build_path = /obj/item/device/mmi/radio_enabled
|
||||
category = list("Misc","Medical Designs")
|
||||
|
||||
datum/design/posibrain
|
||||
name = "Positronic Brain"
|
||||
desc = "The latest in Artificial Intelligences."
|
||||
id = "mmi_posi"
|
||||
req_tech = list("programming" = 5, "biotech" = 4)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
materials = list("$metal" = 1700, "$glass" = 1350, "$gold" = 500) //Gold, because SWAG.
|
||||
reliability = 74
|
||||
construction_time = 75
|
||||
build_path = /obj/item/device/mmi/posibrain
|
||||
category = list("Misc", "Medical Designs")
|
||||
|
||||
|
||||
datum/design/synthetic_flash
|
||||
name = "Flash"
|
||||
desc = "When a problem arises, SCIENCE is the solution."
|
||||
|
||||
Reference in New Issue
Block a user