12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
@@ -0,0 +1,214 @@
|
||||
|
||||
|
||||
/obj/item/device/mmi
|
||||
name = "Man-Machine Interface"
|
||||
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity, that nevertheless has become standard-issue on Nanotrasen stations."
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
icon_state = "mmi_empty"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
origin_tech = "biotech=2;programming=3;engineering=2"
|
||||
var/braintype = "Cyborg"
|
||||
var/obj/item/device/radio/radio = null //Let's give it a radio.
|
||||
var/hacked = 0 //Whether or not this is a Syndicate MMI
|
||||
var/mob/living/brain/brainmob = null //The current occupant.
|
||||
var/mob/living/silicon/robot = null //Appears unused.
|
||||
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
|
||||
var/clockwork = FALSE //If this is a soul vessel
|
||||
|
||||
/obj/item/device/mmi/update_icon()
|
||||
if(brain)
|
||||
if(istype(brain,/obj/item/organ/brain/alien))
|
||||
if(brainmob && brainmob.stat == DEAD)
|
||||
icon_state = "mmi_alien_dead"
|
||||
else
|
||||
icon_state = "mmi_alien"
|
||||
braintype = "Xenoborg" //HISS....Beep.
|
||||
else
|
||||
if(brainmob && brainmob.stat == DEAD)
|
||||
icon_state = "mmi_dead"
|
||||
else
|
||||
icon_state = "mmi_full"
|
||||
braintype = "Cyborg"
|
||||
else
|
||||
icon_state = "mmi_empty"
|
||||
|
||||
/obj/item/device/mmi/New()
|
||||
..()
|
||||
radio = new(src) //Spawns a radio inside the MMI.
|
||||
radio.broadcasting = 0 //researching radio mmis turned the robofabs into radios because this didnt start as 0.
|
||||
|
||||
|
||||
|
||||
/obj/item/device/mmi/attackby(obj/item/O, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istype(O,/obj/item/organ/brain)) //Time to stick a brain in it --NEO
|
||||
var/obj/item/organ/brain/newbrain = O
|
||||
if(brain)
|
||||
user << "<span class='warning'>There's already a brain in the MMI!</span>"
|
||||
return
|
||||
if(!newbrain.brainmob)
|
||||
user << "<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain!</span>"
|
||||
return
|
||||
|
||||
if(!user.unEquip(O))
|
||||
return
|
||||
var/mob/living/brain/B = newbrain.brainmob
|
||||
if(!B.key)
|
||||
B.notify_ghost_cloning("Someone has put your brain in a MMI!", source = src)
|
||||
visible_message("[user] sticks \a [newbrain] into \the [src].")
|
||||
|
||||
brainmob = newbrain.brainmob
|
||||
newbrain.brainmob = null
|
||||
brainmob.loc = src
|
||||
brainmob.container = src
|
||||
if(!newbrain.damaged_brain) // the brain organ hasn't been beaten to death.
|
||||
brainmob.stat = CONSCIOUS //we manually revive the brain mob
|
||||
dead_mob_list -= brainmob
|
||||
living_mob_list += brainmob
|
||||
|
||||
brainmob.reset_perspective()
|
||||
if(clockwork)
|
||||
add_servant_of_ratvar(brainmob, TRUE)
|
||||
newbrain.loc = src //P-put your brain in it
|
||||
brain = newbrain
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
update_icon()
|
||||
|
||||
feedback_inc("cyborg_mmis_filled",1)
|
||||
|
||||
else if(brainmob)
|
||||
O.attack(brainmob, user) //Oh noooeeeee
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device/mmi/attack_self(mob/user)
|
||||
if(!brain)
|
||||
radio.on = !radio.on
|
||||
user << "<span class='notice'>You toggle the MMI's radio system [radio.on==1 ? "on" : "off"].</span>"
|
||||
else
|
||||
user << "<span class='notice'>You unlock and upend the MMI, spilling the brain onto the floor.</span>"
|
||||
eject_brain(user)
|
||||
update_icon()
|
||||
name = "Man-Machine Interface"
|
||||
|
||||
/obj/item/device/mmi/proc/eject_brain(mob/user)
|
||||
brainmob.container = null //Reset brainmob mmi var.
|
||||
brainmob.loc = brain //Throw mob into brain.
|
||||
brainmob.stat = DEAD
|
||||
brainmob.emp_damage = 0
|
||||
brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision
|
||||
living_mob_list -= brainmob //Get outta here
|
||||
dead_mob_list += brainmob
|
||||
brain.brainmob = brainmob //Set the brain to use the brainmob
|
||||
brainmob = null //Set mmi brainmob var to null
|
||||
if(user)
|
||||
user.put_in_hands(brain) //puts brain in the user's hand or otherwise drops it on the user's turf
|
||||
else
|
||||
brain.forceMove(get_turf(src))
|
||||
brain = null //No more brain in here
|
||||
|
||||
|
||||
/obj/item/device/mmi/proc/transfer_identity(mob/living/L) //Same deal as the regular brain proc. Used for human-->robot people.
|
||||
if(!brainmob)
|
||||
brainmob = new(src)
|
||||
brainmob.name = L.real_name
|
||||
brainmob.real_name = L.real_name
|
||||
if(L.has_dna())
|
||||
var/mob/living/carbon/C = L
|
||||
if(!brainmob.stored_dna)
|
||||
brainmob.stored_dna = new /datum/dna/stored(brainmob)
|
||||
C.dna.copy_dna(brainmob.stored_dna)
|
||||
brainmob.container = src
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/organ/brain/newbrain = H.getorgan(/obj/item/organ/brain)
|
||||
newbrain.loc = src
|
||||
brain = newbrain
|
||||
else if(!brain)
|
||||
brain = new(src)
|
||||
brain.name = "[L.real_name]'s brain"
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/mmi/verb/Toggle_Listening()
|
||||
set name = "Toggle Listening"
|
||||
set desc = "Toggle listening channel on or off."
|
||||
set category = "MMI"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
|
||||
if(brainmob.stat)
|
||||
brainmob << "<span class='warning'>Can't do that while incapacitated or dead!</span>"
|
||||
if(!radio.on)
|
||||
brainmob << "<span class='warning'>Your radio is disabled!</span>"
|
||||
return
|
||||
|
||||
radio.listening = radio.listening==1 ? 0 : 1
|
||||
brainmob << "<span class='notice'>Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast.</span>"
|
||||
|
||||
/obj/item/device/mmi/emp_act(severity)
|
||||
if(!brainmob)
|
||||
return
|
||||
else
|
||||
switch(severity)
|
||||
if(1)
|
||||
brainmob.emp_damage = min(brainmob.emp_damage + rand(20,30), 30)
|
||||
if(2)
|
||||
brainmob.emp_damage = min(brainmob.emp_damage + rand(10,20), 30)
|
||||
if(3)
|
||||
brainmob.emp_damage = min(brainmob.emp_damage + rand(0,10), 30)
|
||||
brainmob.emote("alarm")
|
||||
..()
|
||||
|
||||
/obj/item/device/mmi/Destroy()
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/borg = loc
|
||||
borg.mmi = null
|
||||
if(brainmob)
|
||||
qdel(brainmob)
|
||||
brainmob = null
|
||||
if(brain)
|
||||
qdel(brain)
|
||||
brain = null
|
||||
if(mecha)
|
||||
mecha = null
|
||||
if(radio)
|
||||
qdel(radio)
|
||||
radio = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/mmi/deconstruct(disassembled = TRUE)
|
||||
if(brain)
|
||||
eject_brain()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/mmi/examine(mob/user)
|
||||
..()
|
||||
if(brainmob)
|
||||
var/mob/living/brain/B = brainmob
|
||||
if(!B.key || !B.mind || B.stat == DEAD)
|
||||
user << "<span class='warning'>The MMI indicates the brain is completely unresponsive.</span>"
|
||||
|
||||
else if(!B.client)
|
||||
user << "<span class='warning'>The MMI indicates the brain is currently inactive; it might change.</span>"
|
||||
|
||||
else
|
||||
user << "<span class='notice'>The MMI indicates the brain is active.</span>"
|
||||
|
||||
|
||||
/obj/item/device/mmi/syndie
|
||||
name = "Syndicate Man-Machine Interface"
|
||||
desc = "Syndicate's own brand of MMI. It enforces laws designed to help Syndicate agents achieve their goals upon cyborgs created with it, but doesn't fit in Nanotrasen AI cores."
|
||||
origin_tech = "biotech=4;programming=4;syndicate=2"
|
||||
hacked = 1
|
||||
|
||||
/obj/item/device/mmi/syndie/New()
|
||||
..()
|
||||
radio.on = 0
|
||||
@@ -0,0 +1,67 @@
|
||||
|
||||
|
||||
/mob/living/brain
|
||||
languages_spoken = HUMAN
|
||||
languages_understood = HUMAN
|
||||
var/obj/item/device/mmi/container = null
|
||||
var/timeofhostdeath = 0
|
||||
var/emp_damage = 0//Handles a type of MMI damage
|
||||
var/datum/dna/stored/stored_dna // dna var for brain. Used to store dna, brain dna is not considered like actual dna, brain.has_dna() returns FALSE.
|
||||
stat = DEAD //we start dead by default
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
/mob/living/brain/New(loc)
|
||||
..()
|
||||
create_dna(src)
|
||||
stored_dna.initialize_dna(random_blood_type())
|
||||
if(isturf(loc)) //not spawned in an MMI or brain organ (most likely adminspawned)
|
||||
var/obj/item/organ/brain/OB = new(loc) //we create a new brain organ for it.
|
||||
src.loc = OB
|
||||
OB.brainmob = src
|
||||
|
||||
|
||||
/mob/living/brain/proc/create_dna()
|
||||
stored_dna = new /datum/dna/stored(src)
|
||||
if(!stored_dna.species)
|
||||
var/rando_race = pick(config.roundstart_races)
|
||||
stored_dna.species = new rando_race()
|
||||
|
||||
/mob/living/brain/Destroy()
|
||||
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
|
||||
if(stat!=DEAD) //If not dead.
|
||||
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
ghostize() //Ghostize checks for key so nothing else is necessary.
|
||||
container = null
|
||||
return ..()
|
||||
|
||||
/mob/living/brain/update_canmove()
|
||||
if(in_contents_of(/obj/mecha))
|
||||
canmove = 1
|
||||
else
|
||||
canmove = 0
|
||||
return canmove
|
||||
|
||||
/mob/living/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
|
||||
return
|
||||
|
||||
/mob/living/brain/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/mob/living/brain/get_eye_protection()//no eyes
|
||||
return 2
|
||||
|
||||
/mob/living/brain/get_ear_protection()//no ears
|
||||
return 2
|
||||
|
||||
/mob/living/brain/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
return // no eyes, no flashing
|
||||
|
||||
/mob/living/brain/can_be_revived()
|
||||
. = 1
|
||||
if(!container || health <= HEALTH_THRESHOLD_DEAD)
|
||||
return 0
|
||||
|
||||
/mob/living/brain/fully_replace_character_name(oldname,newname)
|
||||
..()
|
||||
if(stored_dna)
|
||||
stored_dna.real_name = real_name
|
||||
@@ -0,0 +1,125 @@
|
||||
/obj/item/organ/brain
|
||||
name = "brain"
|
||||
desc = "A piece of juicy meat found in a person's head."
|
||||
icon_state = "brain"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
layer = ABOVE_MOB_LAYER
|
||||
zone = "head"
|
||||
slot = "brain"
|
||||
vital = 1
|
||||
origin_tech = "biotech=5"
|
||||
attack_verb = list("attacked", "slapped", "whacked")
|
||||
var/mob/living/brain/brainmob = null
|
||||
var/damaged_brain = 0 //whether the brain organ is damaged.
|
||||
|
||||
/obj/item/organ/brain/Insert(mob/living/carbon/C, special = 0)
|
||||
..()
|
||||
name = "brain"
|
||||
if(brainmob)
|
||||
if(C.key)
|
||||
C.ghostize()
|
||||
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.transfer_to(C)
|
||||
else
|
||||
C.key = brainmob.key
|
||||
|
||||
qdel(brainmob)
|
||||
|
||||
//Update the body's icon so it doesnt appear debrained anymore
|
||||
C.update_hair()
|
||||
|
||||
/obj/item/organ/brain/Remove(mob/living/carbon/C, special = 0)
|
||||
..()
|
||||
if(!special)
|
||||
if(C.has_brain_worms())
|
||||
var/mob/living/simple_animal/borer/B = C.has_brain_worms()
|
||||
B.leave_victim() //Should remove borer if the brain is removed - RR
|
||||
transfer_identity(C)
|
||||
C.update_hair()
|
||||
|
||||
/obj/item/organ/brain/prepare_eat()
|
||||
return // Too important to eat.
|
||||
|
||||
/obj/item/organ/brain/proc/transfer_identity(mob/living/L)
|
||||
name = "[L.name]'s brain"
|
||||
brainmob = new(src)
|
||||
brainmob.name = L.real_name
|
||||
brainmob.real_name = L.real_name
|
||||
brainmob.timeofhostdeath = L.timeofdeath
|
||||
if(L.has_dna())
|
||||
var/mob/living/carbon/C = L
|
||||
if(!brainmob.stored_dna)
|
||||
brainmob.stored_dna = new /datum/dna/stored(brainmob)
|
||||
C.dna.copy_dna(brainmob.stored_dna)
|
||||
if(L.mind && L.mind.current && (L.mind.current.stat == DEAD))
|
||||
L.mind.transfer_to(brainmob)
|
||||
brainmob << "<span class='notice'>You feel slightly disoriented. That's normal when you're just a brain.</span>"
|
||||
|
||||
/obj/item/organ/brain/attackby(obj/item/O, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(brainmob)
|
||||
O.attack(brainmob, user) //Oh noooeeeee
|
||||
|
||||
/obj/item/organ/brain/examine(mob/user)
|
||||
..()
|
||||
|
||||
if(brainmob)
|
||||
if(brainmob.client)
|
||||
if(brainmob.health <= HEALTH_THRESHOLD_DEAD)
|
||||
user << "It's lifeless and severely damaged."
|
||||
else
|
||||
user << "You can feel the small spark of life still left in this one."
|
||||
else
|
||||
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later."
|
||||
else
|
||||
user << "This one is completely devoid of life."
|
||||
|
||||
/obj/item/organ/brain/attack(mob/living/carbon/C, mob/user)
|
||||
if(!istype(C))
|
||||
return ..()
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(user.zone_selected != "head")
|
||||
return ..()
|
||||
|
||||
if((C.head && (C.head.flags_cover & HEADCOVERSEYES)) || (C.wear_mask && (C.wear_mask.flags_cover & MASKCOVERSEYES)) || (C.glasses && (C.glasses.flags & GLASSESCOVERSEYES)))
|
||||
user << "<span class='warning'>You're going to need to remove their head cover first!</span>"
|
||||
return
|
||||
|
||||
//since these people will be dead M != usr
|
||||
|
||||
if(!C.getorgan(/obj/item/organ/brain))
|
||||
if(!C.get_bodypart("head"))
|
||||
return
|
||||
user.drop_item()
|
||||
var/msg = "[C] has [src] inserted into [C.p_their()] head by [user]."
|
||||
if(C == user)
|
||||
msg = "[user] inserts [src] into [user.p_their()] head!"
|
||||
|
||||
C.visible_message("<span class='danger'>[msg]</span>",
|
||||
"<span class='userdanger'>[msg]</span>")
|
||||
|
||||
if(C != user)
|
||||
C << "<span class='notice'>[user] inserts [src] into your head.</span>"
|
||||
user << "<span class='notice'>You insert [src] into [C]'s head.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You insert [src] into your head.</span>" //LOL
|
||||
|
||||
Insert(C)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/organ/brain/Destroy() //copypasted from MMIs.
|
||||
if(brainmob)
|
||||
qdel(brainmob)
|
||||
brainmob = null
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/brain/alien
|
||||
name = "alien brain"
|
||||
desc = "We barely understand the brains of terrestial animals. Who knows what we may find in the brain of such an advanced species?"
|
||||
icon_state = "brain-x"
|
||||
origin_tech = "biotech=6"
|
||||
@@ -0,0 +1,20 @@
|
||||
/mob/living/brain/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stat = DEAD
|
||||
|
||||
if(!gibbed && container)//If not gibbed but in a container.
|
||||
var/obj/item/device/mmi = container
|
||||
mmi.visible_message("<span class='warning'>[src]'s MMI flatlines!</span>", \
|
||||
"<span class='italics'>You hear something flatline.</span>")
|
||||
mmi.update_icon()
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/brain/gib()
|
||||
if(container)
|
||||
qdel(container)//Gets rid of the MMI if there is one
|
||||
if(loc)
|
||||
if(istype(loc,/obj/item/organ/brain))
|
||||
qdel(loc)//Gets rid of the brain item
|
||||
..()
|
||||
@@ -0,0 +1,71 @@
|
||||
/mob/living/brain/emote(act,m_type=1,message = null)
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))//No MMI, no emotes
|
||||
return
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
var/t1 = findtext(act, "-", 1, null)
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
|
||||
if(src.stat == DEAD)
|
||||
return
|
||||
switch(act)
|
||||
if ("alarm")
|
||||
src << "You sound an alarm."
|
||||
message = "<B>[src]</B> sounds an alarm."
|
||||
m_type = 2
|
||||
|
||||
if ("alert")
|
||||
src << "You let out a distressed noise."
|
||||
message = "<B>[src]</B> lets out a distressed noise."
|
||||
m_type = 2
|
||||
|
||||
if ("beep","beeps")
|
||||
src << "You beep."
|
||||
message = "<B>[src]</B> beeps."
|
||||
m_type = 2
|
||||
|
||||
if ("blink","blinks")
|
||||
message = "<B>[src]</B> blinks."
|
||||
m_type = 1
|
||||
|
||||
if ("boop","boops")
|
||||
src << "You boop."
|
||||
message = "<B>[src]</B> boops."
|
||||
m_type = 2
|
||||
|
||||
if ("flash")
|
||||
message = "The lights on <B>[src]</B> flash quickly."
|
||||
m_type = 1
|
||||
|
||||
if ("notice")
|
||||
src << "You play a loud tone."
|
||||
message = "<B>[src]</B> plays a loud tone."
|
||||
m_type = 2
|
||||
|
||||
if ("whistle","whistles")
|
||||
src << "You whistle."
|
||||
message = "<B>[src]</B> whistles."
|
||||
m_type = 2
|
||||
|
||||
if ("help")
|
||||
src << "Help for MMI emotes. You can use these emotes with say \"*emote\":\nalarm, alert, beep, blink, boop, flash, notice, whistle"
|
||||
|
||||
else
|
||||
src << "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>"
|
||||
return
|
||||
|
||||
if (message)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if (!M.client || isnewplayer(M))
|
||||
continue //skip monkeys, leavers, and new_players
|
||||
if(M.stat == DEAD && (M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT)) && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
if (m_type & 1)
|
||||
visible_message(message)
|
||||
else if (m_type & 2)
|
||||
audible_message(message)
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
/mob/living/brain/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
if(!loc)
|
||||
return
|
||||
. = ..()
|
||||
handle_emp_damage()
|
||||
|
||||
/mob/living/brain/update_stat()
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(health <= HEALTH_THRESHOLD_DEAD)
|
||||
if(stat != DEAD)
|
||||
death()
|
||||
var/obj/item/organ/brain/BR
|
||||
if(container && container.brain)
|
||||
BR = container.brain
|
||||
else if(istype(loc, /obj/item/organ/brain))
|
||||
BR = loc
|
||||
if(BR)
|
||||
BR.damaged_brain = 1 //beaten to a pulp
|
||||
|
||||
/* //currently unused feature, since brain outside a mmi is always dead.
|
||||
/mob/living/brain/proc/handle_brain_revival_life()
|
||||
if(stat != DEAD)
|
||||
if(config.revival_brain_life != -1)
|
||||
if( !container && (world.time - timeofhostdeath) > config.revival_brain_life)
|
||||
death()
|
||||
*/
|
||||
|
||||
/mob/living/brain/proc/handle_emp_damage()
|
||||
if(emp_damage)
|
||||
if(stat == DEAD)
|
||||
emp_damage = 0
|
||||
else
|
||||
emp_damage = max(emp_damage-1, 0)
|
||||
|
||||
/mob/living/brain/handle_status_effects()
|
||||
return
|
||||
|
||||
/mob/living/brain/handle_disabilities()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
var/global/posibrain_notif_cooldown = 0
|
||||
|
||||
/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 = WEIGHT_CLASS_NORMAL
|
||||
origin_tech = "biotech=3;programming=3;plasmatech=2"
|
||||
var/notified = 0
|
||||
var/askDelay = 600 //one minute
|
||||
var/used = 0 //Prevents split personality virus. May be reset if personality deletion code is added.
|
||||
brainmob = null
|
||||
req_access = list(access_robotics)
|
||||
mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
braintype = "Android"
|
||||
var/autoping = TRUE //if it pings on creation immediately
|
||||
var/begin_activation_message = "<span class='notice'>You carefully locate the manual activation switch and start the positronic brain's boot process.</span>"
|
||||
var/success_message = "<span class='notice'>The positronic brain pings, and its lights start flashing. Success!</span>"
|
||||
var/fail_message = "<span class='notice'>The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</span>"
|
||||
var/new_role = "Positronic Brain"
|
||||
var/welcome_message = "<span class='warning'>ALL PAST LIVES ARE FORGOTTEN.</span>\n\
|
||||
<b>You are a positronic brain, brought into existence aboard Space Station 13.\n\
|
||||
As a synthetic intelligence, you answer to all crewmembers and the AI.\n\
|
||||
Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
|
||||
var/new_mob_message = "<span class='notice'>The positronic brain chimes quietly.</span>"
|
||||
var/dead_message = "<span class='deadsay'>It appears to be completely inactive. The reset light is blinking.</span>"
|
||||
var/list/fluff_names = list("PBU","HIU","SINA","ARMA","OSI","HBL","MSO","RR","CHRI","CDB","HG","XSI","ORNG","GUN","KOR","MET","FRE","XIS","SLI","PKP","HOG","RZH","GOOF","MRPR","JJR","FIRC","INC","PHL","BGB","ANTR","MIW","WJ","JRD","CHOC","ANCL","JLLO","JNLG","KOS","TKRG","XAL","STLP","CBOS","DUNC","FXMC","DRSD")
|
||||
var/picked_fluff_name //which fluff name we picked
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/Topic(href, href_list)
|
||||
if(href_list["activate"])
|
||||
var/mob/dead/observer/ghost = usr
|
||||
if(istype(ghost))
|
||||
activate(ghost)
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/ping_ghosts(msg, newlymade)
|
||||
if(newlymade || !posibrain_notif_cooldown)
|
||||
notify_ghosts("[name] [msg] in [get_area(src)]!", ghost_sound = !newlymade ? 'sound/effects/ghost2.ogg':null, enter_link = "<a href=?src=\ref[src];activate=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK)
|
||||
if(!newlymade)
|
||||
posibrain_notif_cooldown = 1
|
||||
addtimer(src, "reset_posibrain_cooldown", askDelay, TIMER_NORMAL)
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/reset_posibrain_cooldown()
|
||||
posibrain_notif_cooldown = 0
|
||||
|
||||
/obj/item/device/mmi/posibrain/attack_self(mob/user)
|
||||
if(brainmob && !brainmob.key && !notified)
|
||||
//Start the process of requesting a new ghost.
|
||||
user << begin_activation_message
|
||||
ping_ghosts("requested", FALSE)
|
||||
notified = 1
|
||||
used = 0
|
||||
update_icon()
|
||||
spawn(askDelay) //Seperate from the global cooldown.
|
||||
notified = 0
|
||||
update_icon()
|
||||
if(brainmob.client)
|
||||
visible_message(success_message)
|
||||
else
|
||||
visible_message(fail_message)
|
||||
|
||||
return //Code for deleting personalities recommended here.
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/attack_ghost(mob/user)
|
||||
activate(user)
|
||||
|
||||
//Two ways to activate a positronic brain. A clickable link in the ghost notif, or simply clicking the object itself.
|
||||
/obj/item/device/mmi/posibrain/proc/activate(mob/user)
|
||||
if(used || (brainmob && brainmob.key) || jobban_isbanned(user,"posibrain"))
|
||||
return
|
||||
|
||||
var/posi_ask = alert("Become a [name]? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?","Yes","No")
|
||||
if(posi_ask == "No" || qdeleted(src))
|
||||
return
|
||||
transfer_personality(user)
|
||||
|
||||
/obj/item/device/mmi/posibrain/transfer_identity(mob/living/carbon/C)
|
||||
name = "[initial(name)] ([C])"
|
||||
brainmob.name = C.real_name
|
||||
brainmob.real_name = C.real_name
|
||||
if(C.has_dna())
|
||||
if(!brainmob.stored_dna)
|
||||
brainmob.stored_dna = new /datum/dna/stored(brainmob)
|
||||
C.dna.copy_dna(brainmob.stored_dna)
|
||||
brainmob.timeofhostdeath = C.timeofdeath
|
||||
brainmob.stat = CONSCIOUS
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.assigned_role = new_role
|
||||
if(C.mind)
|
||||
C.mind.transfer_to(brainmob)
|
||||
|
||||
brainmob.mind.remove_all_antag()
|
||||
brainmob.mind.wipe_memory()
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/transfer_personality(mob/candidate)
|
||||
if(used || (brainmob && brainmob.key)) //Prevents hostile takeover if two ghosts get the prompt or link for the same brain.
|
||||
candidate << "This brain has already been taken! Please try your possesion again later!"
|
||||
return
|
||||
notified = 0
|
||||
if(candidate.mind && !isobserver(candidate))
|
||||
candidate.mind.transfer_to(brainmob)
|
||||
else
|
||||
brainmob.ckey = candidate.ckey
|
||||
name = "[initial(name)] ([brainmob.name])"
|
||||
brainmob << welcome_message
|
||||
brainmob.mind.assigned_role = new_role
|
||||
brainmob.stat = CONSCIOUS
|
||||
dead_mob_list -= brainmob
|
||||
living_mob_list += brainmob
|
||||
if(clockwork)
|
||||
add_servant_of_ratvar(brainmob, TRUE)
|
||||
|
||||
visible_message(new_mob_message)
|
||||
update_icon()
|
||||
used = 1
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/examine()
|
||||
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src)
|
||||
return
|
||||
if((usr.disabilities & BLIND || usr.stat) && !isobserver(usr))
|
||||
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(DEAD)
|
||||
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
|
||||
else
|
||||
msg += "[dead_message]\n"
|
||||
msg += "<span class='info'>*---------*</span>"
|
||||
usr << msg
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/posibrain/New()
|
||||
brainmob = new(src)
|
||||
picked_fluff_name = pick(fluff_names)
|
||||
brainmob.name = "[picked_fluff_name]-[rand(100, 999)]"
|
||||
brainmob.real_name = brainmob.name
|
||||
brainmob.loc = src
|
||||
brainmob.container = src
|
||||
if(autoping)
|
||||
ping_ghosts("created", TRUE)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/attackby(obj/item/O, mob/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/mmi/posibrain/update_icon()
|
||||
if(notified)
|
||||
icon_state = "[initial(icon_state)]-searching"
|
||||
return
|
||||
if(brainmob && brainmob.key)
|
||||
icon_state = "[initial(icon_state)]-occupied"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
@@ -0,0 +1,23 @@
|
||||
/mob/living/brain/say(message)
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return //No MMI, can't speak, bucko./N
|
||||
else
|
||||
if(prob(emp_damage*4))
|
||||
if(prob(10))//10% chane to drop the message entirely
|
||||
return
|
||||
else
|
||||
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
|
||||
..()
|
||||
|
||||
/mob/living/brain/radio(message, message_mode, list/spans)
|
||||
if(message_mode && istype(container, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/R = container
|
||||
if(R.radio)
|
||||
R.radio.talk_into(src, message, , spans)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
/mob/living/brain/lingcheck()
|
||||
return 0
|
||||
|
||||
/mob/living/brain/treat_message(message)
|
||||
return message
|
||||
@@ -0,0 +1,33 @@
|
||||
//Here are the procs used to modify status effects of a mob.
|
||||
//The effects include: stunned, weakened, paralysis, sleeping, resting, jitteriness, dizziness, ear damage,
|
||||
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
|
||||
/mob/living/brain/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/brain/setEarDamage() // no ears to damage or heal
|
||||
return
|
||||
|
||||
/////////////////////////////////// EYE_BLIND ////////////////////////////////////
|
||||
|
||||
/mob/living/brain/blind_eyes() // no eyes to damage or heal
|
||||
return
|
||||
|
||||
/mob/living/brain/adjust_blindness()
|
||||
return
|
||||
|
||||
/mob/living/brain/set_blindness()
|
||||
return
|
||||
|
||||
/////////////////////////////////// EYE_BLURRY ////////////////////////////////////
|
||||
|
||||
/mob/living/brain/blur_eyes()
|
||||
return
|
||||
|
||||
/mob/living/brain/adjust_blurriness()
|
||||
return
|
||||
|
||||
/mob/living/brain/set_blurriness()
|
||||
return
|
||||
Reference in New Issue
Block a user